AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi
aws.servicediscovery.getDnsNamespace
Explore with Pulumi AI
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",
});
import pulumi
import pulumi_aws as aws
test = aws.servicediscovery.get_dns_namespace(name="example.service.local",
type="DNS_PRIVATE")
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
})
}
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 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());
}
}
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:
getDnsNamespace Result
The following output properties are available:
- Arn string
- ARN of the namespace.
- Description string
- Description of the namespace.
- Hosted
Zone 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
- Dictionary<string, string>
- Map of tags for the resource.
- Type string
- Arn string
- ARN of the namespace.
- Description string
- Description of the namespace.
- Hosted
Zone 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
- map[string]string
- Map of tags for the resource.
- Type string
- arn String
- ARN of the namespace.
- description String
- Description of the namespace.
- hosted
Zone 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
- Map<String,String>
- Map of tags for the resource.
- type String
- arn string
- ARN of the namespace.
- description string
- Description of the namespace.
- hosted
Zone 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
- {[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
- Mapping[str, str]
- Map of tags for the resource.
- type str
- arn String
- ARN of the namespace.
- description String
- Description of the namespace.
- hosted
Zone 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
- 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.