1. Packages
  2. AWS Classic
  3. API Docs
  4. servicediscovery
  5. getDnsNamespace

Try AWS Native preview for resources not in the classic version.

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

aws.servicediscovery.getDnsNamespace

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

    Retrieves information about a Service Discovery private or public DNS namespace.

    Example Usage

    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",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/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
    	})
    }
    
    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());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.servicediscovery.get_dns_namespace(name="example.service.local",
        type="DNS_PRIVATE")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = aws.servicediscovery.getDnsNamespace({
        name: "example.service.local",
        type: "DNS_PRIVATE",
    });
    
    variables:
      test:
        fn::invoke:
          Function: aws:servicediscovery:getDnsNamespace
          Arguments:
            name: example.service.local
            type: DNS_PRIVATE
    

    Using getDnsNamespace

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDnsNamespace(args: GetDnsNamespaceArgs, opts?: InvokeOptions): Promise<GetDnsNamespaceResult>
    function getDnsNamespaceOutput(args: GetDnsNamespaceOutputArgs, opts?: InvokeOptions): Output<GetDnsNamespaceResult>
    def get_dns_namespace(name: Optional[str] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          type: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetDnsNamespaceResult
    def get_dns_namespace_output(name: Optional[pulumi.Input[str]] = None,
                          tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                          type: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetDnsNamespaceResult]
    func GetDnsNamespace(ctx *Context, args *GetDnsNamespaceArgs, opts ...InvokeOption) (*GetDnsNamespaceResult, error)
    func GetDnsNamespaceOutput(ctx *Context, args *GetDnsNamespaceOutputArgs, opts ...InvokeOption) GetDnsNamespaceResultOutput

    > Note: This function is named GetDnsNamespace in the Go SDK.

    public static class GetDnsNamespace 
    {
        public static Task<GetDnsNamespaceResult> InvokeAsync(GetDnsNamespaceArgs args, InvokeOptions? opts = null)
        public static Output<GetDnsNamespaceResult> Invoke(GetDnsNamespaceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDnsNamespaceResult> getDnsNamespace(GetDnsNamespaceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:servicediscovery/getDnsNamespace:getDnsNamespace
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string

    Name of the namespace.

    Type string

    Type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

    Tags Dictionary<string, string>

    Map of tags for the resource.

    Name string

    Name of the namespace.

    Type string

    Type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

    Tags map[string]string

    Map of tags for the resource.

    name String

    Name of the namespace.

    type String

    Type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

    tags Map<String,String>

    Map of tags for the resource.

    name string

    Name of the namespace.

    type string

    Type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

    tags {[key: string]: string}

    Map of tags for the resource.

    name str

    Name of the namespace.

    type str

    Type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

    tags Mapping[str, str]

    Map of tags for the resource.

    name String

    Name of the namespace.

    type String

    Type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

    tags Map<String>

    Map of tags for the resource.

    getDnsNamespace Result

    The following output properties are available:

    Arn string

    ARN of the namespace.

    Description string

    Description of the namespace.

    HostedZone string

    ID for the hosted zone that Amazon Route 53 creates when you create a namespace.

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string
    Tags Dictionary<string, string>

    Map of tags for the resource.

    Type string
    Arn string

    ARN of the namespace.

    Description string

    Description of the namespace.

    HostedZone string

    ID for the hosted zone that Amazon Route 53 creates when you create a namespace.

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string
    Tags map[string]string

    Map of tags for the resource.

    Type string
    arn String

    ARN of the namespace.

    description String

    Description of the namespace.

    hostedZone String

    ID for the hosted zone that Amazon Route 53 creates when you create a namespace.

    id String

    The provider-assigned unique ID for this managed resource.

    name String
    tags Map<String,String>

    Map of tags for the resource.

    type String
    arn string

    ARN of the namespace.

    description string

    Description of the namespace.

    hostedZone string

    ID for the hosted zone that Amazon Route 53 creates when you create a namespace.

    id string

    The provider-assigned unique ID for this managed resource.

    name string
    tags {[key: string]: string}

    Map of tags for the resource.

    type string
    arn str

    ARN of the namespace.

    description str

    Description of the namespace.

    hosted_zone str

    ID for the hosted zone that Amazon Route 53 creates when you create a namespace.

    id str

    The provider-assigned unique ID for this managed resource.

    name str
    tags Mapping[str, str]

    Map of tags for the resource.

    type str
    arn String

    ARN of the namespace.

    description String

    Description of the namespace.

    hostedZone String

    ID for the hosted zone that Amazon Route 53 creates when you create a namespace.

    id String

    The provider-assigned unique ID for this managed resource.

    name String
    tags Map<String>

    Map of tags for the resource.

    type String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi