github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/route53/getDelegationSet.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package route53
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // `route53.DelegationSet` provides details about a specific Route 53 Delegation Set.
    15  //
    16  // This data source allows to find a list of name servers associated with a specific delegation set.
    17  //
    18  // ## Example Usage
    19  //
    20  // The following example shows how to get a delegation set from its id.
    21  //
    22  // <!--Start PulumiCodeChooser -->
    23  // ```go
    24  // package main
    25  //
    26  // import (
    27  //
    28  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
    29  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    30  //
    31  // )
    32  //
    33  //	func main() {
    34  //		pulumi.Run(func(ctx *pulumi.Context) error {
    35  //			_, err := route53.LookupDelegationSet(ctx, &route53.LookupDelegationSetArgs{
    36  //				Id: "MQWGHCBFAKEID",
    37  //			}, nil)
    38  //			if err != nil {
    39  //				return err
    40  //			}
    41  //			return nil
    42  //		})
    43  //	}
    44  //
    45  // ```
    46  // <!--End PulumiCodeChooser -->
    47  func LookupDelegationSet(ctx *pulumi.Context, args *LookupDelegationSetArgs, opts ...pulumi.InvokeOption) (*LookupDelegationSetResult, error) {
    48  	opts = internal.PkgInvokeDefaultOpts(opts)
    49  	var rv LookupDelegationSetResult
    50  	err := ctx.Invoke("aws:route53/getDelegationSet:getDelegationSet", args, &rv, opts...)
    51  	if err != nil {
    52  		return nil, err
    53  	}
    54  	return &rv, nil
    55  }
    56  
    57  // A collection of arguments for invoking getDelegationSet.
    58  type LookupDelegationSetArgs struct {
    59  	// Delegation set ID.
    60  	//
    61  	// The following attribute is additionally exported:
    62  	Id string `pulumi:"id"`
    63  }
    64  
    65  // A collection of values returned by getDelegationSet.
    66  type LookupDelegationSetResult struct {
    67  	Arn             string   `pulumi:"arn"`
    68  	CallerReference string   `pulumi:"callerReference"`
    69  	Id              string   `pulumi:"id"`
    70  	NameServers     []string `pulumi:"nameServers"`
    71  }
    72  
    73  func LookupDelegationSetOutput(ctx *pulumi.Context, args LookupDelegationSetOutputArgs, opts ...pulumi.InvokeOption) LookupDelegationSetResultOutput {
    74  	return pulumi.ToOutputWithContext(context.Background(), args).
    75  		ApplyT(func(v interface{}) (LookupDelegationSetResult, error) {
    76  			args := v.(LookupDelegationSetArgs)
    77  			r, err := LookupDelegationSet(ctx, &args, opts...)
    78  			var s LookupDelegationSetResult
    79  			if r != nil {
    80  				s = *r
    81  			}
    82  			return s, err
    83  		}).(LookupDelegationSetResultOutput)
    84  }
    85  
    86  // A collection of arguments for invoking getDelegationSet.
    87  type LookupDelegationSetOutputArgs struct {
    88  	// Delegation set ID.
    89  	//
    90  	// The following attribute is additionally exported:
    91  	Id pulumi.StringInput `pulumi:"id"`
    92  }
    93  
    94  func (LookupDelegationSetOutputArgs) ElementType() reflect.Type {
    95  	return reflect.TypeOf((*LookupDelegationSetArgs)(nil)).Elem()
    96  }
    97  
    98  // A collection of values returned by getDelegationSet.
    99  type LookupDelegationSetResultOutput struct{ *pulumi.OutputState }
   100  
   101  func (LookupDelegationSetResultOutput) ElementType() reflect.Type {
   102  	return reflect.TypeOf((*LookupDelegationSetResult)(nil)).Elem()
   103  }
   104  
   105  func (o LookupDelegationSetResultOutput) ToLookupDelegationSetResultOutput() LookupDelegationSetResultOutput {
   106  	return o
   107  }
   108  
   109  func (o LookupDelegationSetResultOutput) ToLookupDelegationSetResultOutputWithContext(ctx context.Context) LookupDelegationSetResultOutput {
   110  	return o
   111  }
   112  
   113  func (o LookupDelegationSetResultOutput) Arn() pulumi.StringOutput {
   114  	return o.ApplyT(func(v LookupDelegationSetResult) string { return v.Arn }).(pulumi.StringOutput)
   115  }
   116  
   117  func (o LookupDelegationSetResultOutput) CallerReference() pulumi.StringOutput {
   118  	return o.ApplyT(func(v LookupDelegationSetResult) string { return v.CallerReference }).(pulumi.StringOutput)
   119  }
   120  
   121  func (o LookupDelegationSetResultOutput) Id() pulumi.StringOutput {
   122  	return o.ApplyT(func(v LookupDelegationSetResult) string { return v.Id }).(pulumi.StringOutput)
   123  }
   124  
   125  func (o LookupDelegationSetResultOutput) NameServers() pulumi.StringArrayOutput {
   126  	return o.ApplyT(func(v LookupDelegationSetResult) []string { return v.NameServers }).(pulumi.StringArrayOutput)
   127  }
   128  
   129  func init() {
   130  	pulumi.RegisterOutputType(LookupDelegationSetResultOutput{})
   131  }