get Dns Namespace
Retrieves information about a Service Discovery private or public DNS namespace.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.servicediscovery.getDnsNamespace({
name: "example.service.local",
type: "DNS_PRIVATE",
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
test = aws.servicediscovery.get_dns_namespace(name="example.service.local",
type="DNS_PRIVATE")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.ServiceDiscovery.GetDnsNamespace.Invoke(new()
{
Name = "example.service.local",
Type = "DNS_PRIVATE",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicediscovery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicediscovery.GetDnsNamespace(ctx, &servicediscovery.GetDnsNamespaceArgs{
Name: "example.service.local",
Type: "DNS_PRIVATE",
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.servicediscovery.ServicediscoveryFunctions;
import com.pulumi.aws.servicediscovery.inputs.GetDnsNamespaceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var test = ServicediscoveryFunctions.getDnsNamespace(GetDnsNamespaceArgs.builder()
.name("example.service.local")
.type("DNS_PRIVATE")
.build());
}
}
Content copied to clipboard
variables:
test:
fn::invoke:
function: aws:servicediscovery:getDnsNamespace
arguments:
name: example.service.local
type: DNS_PRIVATE
Content copied to clipboard
Return
A collection of values returned by getDnsNamespace.
Parameters
argument
A collection of arguments for invoking getDnsNamespace.
suspend fun getDnsNamespace(name: String, tags: Map<String, String>? = null, type: String): GetDnsNamespaceResult
Return
A collection of values returned by getDnsNamespace.
Parameters
name
Name of the namespace.
tags
Map of tags for the resource.
type
Type of the namespace. Allowed values are DNS_PUBLIC
or DNS_PRIVATE
.
See also
suspend fun getDnsNamespace(argument: suspend GetDnsNamespacePlainArgsBuilder.() -> Unit): GetDnsNamespaceResult
Return
A collection of values returned by getDnsNamespace.
Parameters
argument
Builder for com.pulumi.aws.servicediscovery.kotlin.inputs.GetDnsNamespacePlainArgs.