github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ses/getDomainIdentity.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 ses
     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  // Retrieve the SES domain identity
    15  //
    16  // ## Example Usage
    17  //
    18  // <!--Start PulumiCodeChooser -->
    19  // ```go
    20  // package main
    21  //
    22  // import (
    23  //
    24  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ses"
    25  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    26  //
    27  // )
    28  //
    29  //	func main() {
    30  //		pulumi.Run(func(ctx *pulumi.Context) error {
    31  //			_, err := ses.LookupDomainIdentity(ctx, &ses.LookupDomainIdentityArgs{
    32  //				Domain: "example.com",
    33  //			}, nil)
    34  //			if err != nil {
    35  //				return err
    36  //			}
    37  //			return nil
    38  //		})
    39  //	}
    40  //
    41  // ```
    42  // <!--End PulumiCodeChooser -->
    43  func LookupDomainIdentity(ctx *pulumi.Context, args *LookupDomainIdentityArgs, opts ...pulumi.InvokeOption) (*LookupDomainIdentityResult, error) {
    44  	opts = internal.PkgInvokeDefaultOpts(opts)
    45  	var rv LookupDomainIdentityResult
    46  	err := ctx.Invoke("aws:ses/getDomainIdentity:getDomainIdentity", args, &rv, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return &rv, nil
    51  }
    52  
    53  // A collection of arguments for invoking getDomainIdentity.
    54  type LookupDomainIdentityArgs struct {
    55  	// Name of the domain
    56  	Domain string `pulumi:"domain"`
    57  }
    58  
    59  // A collection of values returned by getDomainIdentity.
    60  type LookupDomainIdentityResult struct {
    61  	// ARN of the domain identity.
    62  	Arn string `pulumi:"arn"`
    63  	// Name of the domain
    64  	Domain string `pulumi:"domain"`
    65  	// The provider-assigned unique ID for this managed resource.
    66  	Id string `pulumi:"id"`
    67  	// Code which when added to the domain as a TXT record will signal to SES that the owner of the domain has authorized SES to act on their behalf.
    68  	VerificationToken string `pulumi:"verificationToken"`
    69  }
    70  
    71  func LookupDomainIdentityOutput(ctx *pulumi.Context, args LookupDomainIdentityOutputArgs, opts ...pulumi.InvokeOption) LookupDomainIdentityResultOutput {
    72  	return pulumi.ToOutputWithContext(context.Background(), args).
    73  		ApplyT(func(v interface{}) (LookupDomainIdentityResult, error) {
    74  			args := v.(LookupDomainIdentityArgs)
    75  			r, err := LookupDomainIdentity(ctx, &args, opts...)
    76  			var s LookupDomainIdentityResult
    77  			if r != nil {
    78  				s = *r
    79  			}
    80  			return s, err
    81  		}).(LookupDomainIdentityResultOutput)
    82  }
    83  
    84  // A collection of arguments for invoking getDomainIdentity.
    85  type LookupDomainIdentityOutputArgs struct {
    86  	// Name of the domain
    87  	Domain pulumi.StringInput `pulumi:"domain"`
    88  }
    89  
    90  func (LookupDomainIdentityOutputArgs) ElementType() reflect.Type {
    91  	return reflect.TypeOf((*LookupDomainIdentityArgs)(nil)).Elem()
    92  }
    93  
    94  // A collection of values returned by getDomainIdentity.
    95  type LookupDomainIdentityResultOutput struct{ *pulumi.OutputState }
    96  
    97  func (LookupDomainIdentityResultOutput) ElementType() reflect.Type {
    98  	return reflect.TypeOf((*LookupDomainIdentityResult)(nil)).Elem()
    99  }
   100  
   101  func (o LookupDomainIdentityResultOutput) ToLookupDomainIdentityResultOutput() LookupDomainIdentityResultOutput {
   102  	return o
   103  }
   104  
   105  func (o LookupDomainIdentityResultOutput) ToLookupDomainIdentityResultOutputWithContext(ctx context.Context) LookupDomainIdentityResultOutput {
   106  	return o
   107  }
   108  
   109  // ARN of the domain identity.
   110  func (o LookupDomainIdentityResultOutput) Arn() pulumi.StringOutput {
   111  	return o.ApplyT(func(v LookupDomainIdentityResult) string { return v.Arn }).(pulumi.StringOutput)
   112  }
   113  
   114  // Name of the domain
   115  func (o LookupDomainIdentityResultOutput) Domain() pulumi.StringOutput {
   116  	return o.ApplyT(func(v LookupDomainIdentityResult) string { return v.Domain }).(pulumi.StringOutput)
   117  }
   118  
   119  // The provider-assigned unique ID for this managed resource.
   120  func (o LookupDomainIdentityResultOutput) Id() pulumi.StringOutput {
   121  	return o.ApplyT(func(v LookupDomainIdentityResult) string { return v.Id }).(pulumi.StringOutput)
   122  }
   123  
   124  // Code which when added to the domain as a TXT record will signal to SES that the owner of the domain has authorized SES to act on their behalf.
   125  func (o LookupDomainIdentityResultOutput) VerificationToken() pulumi.StringOutput {
   126  	return o.ApplyT(func(v LookupDomainIdentityResult) string { return v.VerificationToken }).(pulumi.StringOutput)
   127  }
   128  
   129  func init() {
   130  	pulumi.RegisterOutputType(LookupDomainIdentityResultOutput{})
   131  }