AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.4.0 published on Wednesday, May 4, 2022 by Pulumi

getDnsNamespace

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

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Aws.ServiceDiscovery.GetDnsNamespace.InvokeAsync(new Aws.ServiceDiscovery.GetDnsNamespaceArgs
        {
            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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = Output.of(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 = pulumi.output(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,
                      type: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDnsNamespaceResult
def get_dns_namespace_output(name: Optional[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

The name of the namespace.

Type string

The type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

Name string

The name of the namespace.

Type string

The type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

name String

The name of the namespace.

type String

The type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

name string

The name of the namespace.

type string

The type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

name str

The name of the namespace.

type str

The type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

name String

The name of the namespace.

type String

The type of the namespace. Allowed values are DNS_PUBLIC or DNS_PRIVATE.

getDnsNamespace Result

The following output properties are available:

Arn string

The Amazon Resource Name (ARN) of the namespace.

Description string

A description of the namespace.

HostedZone string

The 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
Type string
Arn string

The Amazon Resource Name (ARN) of the namespace.

Description string

A description of the namespace.

HostedZone string

The 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
Type string
arn String

The Amazon Resource Name (ARN) of the namespace.

description String

A description of the namespace.

hostedZone String

The 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
type String
arn string

The Amazon Resource Name (ARN) of the namespace.

description string

A description of the namespace.

hostedZone string

The 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
type string
arn str

The Amazon Resource Name (ARN) of the namespace.

description str

A description of the namespace.

hosted_zone str

The 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
type str
arn String

The Amazon Resource Name (ARN) of the namespace.

description String

A description of the namespace.

hostedZone String

The 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
type String

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.