github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sesv2/getEmailIdentity.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 sesv2
     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  // Data source for managing an AWS SESv2 (Simple Email V2) Email Identity.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### Basic Usage
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sesv2"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := sesv2.LookupEmailIdentity(ctx, &sesv2.LookupEmailIdentityArgs{
    34  //				EmailIdentity: "example.com",
    35  //			}, nil)
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  func LookupEmailIdentity(ctx *pulumi.Context, args *LookupEmailIdentityArgs, opts ...pulumi.InvokeOption) (*LookupEmailIdentityResult, error) {
    46  	opts = internal.PkgInvokeDefaultOpts(opts)
    47  	var rv LookupEmailIdentityResult
    48  	err := ctx.Invoke("aws:sesv2/getEmailIdentity:getEmailIdentity", args, &rv, opts...)
    49  	if err != nil {
    50  		return nil, err
    51  	}
    52  	return &rv, nil
    53  }
    54  
    55  // A collection of arguments for invoking getEmailIdentity.
    56  type LookupEmailIdentityArgs struct {
    57  	// The name of the email identity.
    58  	EmailIdentity string `pulumi:"emailIdentity"`
    59  	// Key-value mapping of resource tags.
    60  	Tags map[string]string `pulumi:"tags"`
    61  }
    62  
    63  // A collection of values returned by getEmailIdentity.
    64  type LookupEmailIdentityResult struct {
    65  	// ARN of the Email Identity.
    66  	Arn                  string `pulumi:"arn"`
    67  	ConfigurationSetName string `pulumi:"configurationSetName"`
    68  	// A list of objects that contains at most one element with information about the private key and selector that you want to use to configure DKIM for the identity for Bring Your Own DKIM (BYODKIM) for the identity, or, configures the key length to be used for Easy DKIM.
    69  	DkimSigningAttributes []GetEmailIdentityDkimSigningAttribute `pulumi:"dkimSigningAttributes"`
    70  	EmailIdentity         string                                 `pulumi:"emailIdentity"`
    71  	// The provider-assigned unique ID for this managed resource.
    72  	Id string `pulumi:"id"`
    73  	// The email identity type. Valid values: `EMAIL_ADDRESS`, `DOMAIN`.
    74  	IdentityType string `pulumi:"identityType"`
    75  	// Key-value mapping of resource tags.
    76  	Tags map[string]string `pulumi:"tags"`
    77  	// Specifies whether or not the identity is verified.
    78  	VerifiedForSendingStatus bool `pulumi:"verifiedForSendingStatus"`
    79  }
    80  
    81  func LookupEmailIdentityOutput(ctx *pulumi.Context, args LookupEmailIdentityOutputArgs, opts ...pulumi.InvokeOption) LookupEmailIdentityResultOutput {
    82  	return pulumi.ToOutputWithContext(context.Background(), args).
    83  		ApplyT(func(v interface{}) (LookupEmailIdentityResult, error) {
    84  			args := v.(LookupEmailIdentityArgs)
    85  			r, err := LookupEmailIdentity(ctx, &args, opts...)
    86  			var s LookupEmailIdentityResult
    87  			if r != nil {
    88  				s = *r
    89  			}
    90  			return s, err
    91  		}).(LookupEmailIdentityResultOutput)
    92  }
    93  
    94  // A collection of arguments for invoking getEmailIdentity.
    95  type LookupEmailIdentityOutputArgs struct {
    96  	// The name of the email identity.
    97  	EmailIdentity pulumi.StringInput `pulumi:"emailIdentity"`
    98  	// Key-value mapping of resource tags.
    99  	Tags pulumi.StringMapInput `pulumi:"tags"`
   100  }
   101  
   102  func (LookupEmailIdentityOutputArgs) ElementType() reflect.Type {
   103  	return reflect.TypeOf((*LookupEmailIdentityArgs)(nil)).Elem()
   104  }
   105  
   106  // A collection of values returned by getEmailIdentity.
   107  type LookupEmailIdentityResultOutput struct{ *pulumi.OutputState }
   108  
   109  func (LookupEmailIdentityResultOutput) ElementType() reflect.Type {
   110  	return reflect.TypeOf((*LookupEmailIdentityResult)(nil)).Elem()
   111  }
   112  
   113  func (o LookupEmailIdentityResultOutput) ToLookupEmailIdentityResultOutput() LookupEmailIdentityResultOutput {
   114  	return o
   115  }
   116  
   117  func (o LookupEmailIdentityResultOutput) ToLookupEmailIdentityResultOutputWithContext(ctx context.Context) LookupEmailIdentityResultOutput {
   118  	return o
   119  }
   120  
   121  // ARN of the Email Identity.
   122  func (o LookupEmailIdentityResultOutput) Arn() pulumi.StringOutput {
   123  	return o.ApplyT(func(v LookupEmailIdentityResult) string { return v.Arn }).(pulumi.StringOutput)
   124  }
   125  
   126  func (o LookupEmailIdentityResultOutput) ConfigurationSetName() pulumi.StringOutput {
   127  	return o.ApplyT(func(v LookupEmailIdentityResult) string { return v.ConfigurationSetName }).(pulumi.StringOutput)
   128  }
   129  
   130  // A list of objects that contains at most one element with information about the private key and selector that you want to use to configure DKIM for the identity for Bring Your Own DKIM (BYODKIM) for the identity, or, configures the key length to be used for Easy DKIM.
   131  func (o LookupEmailIdentityResultOutput) DkimSigningAttributes() GetEmailIdentityDkimSigningAttributeArrayOutput {
   132  	return o.ApplyT(func(v LookupEmailIdentityResult) []GetEmailIdentityDkimSigningAttribute {
   133  		return v.DkimSigningAttributes
   134  	}).(GetEmailIdentityDkimSigningAttributeArrayOutput)
   135  }
   136  
   137  func (o LookupEmailIdentityResultOutput) EmailIdentity() pulumi.StringOutput {
   138  	return o.ApplyT(func(v LookupEmailIdentityResult) string { return v.EmailIdentity }).(pulumi.StringOutput)
   139  }
   140  
   141  // The provider-assigned unique ID for this managed resource.
   142  func (o LookupEmailIdentityResultOutput) Id() pulumi.StringOutput {
   143  	return o.ApplyT(func(v LookupEmailIdentityResult) string { return v.Id }).(pulumi.StringOutput)
   144  }
   145  
   146  // The email identity type. Valid values: `EMAIL_ADDRESS`, `DOMAIN`.
   147  func (o LookupEmailIdentityResultOutput) IdentityType() pulumi.StringOutput {
   148  	return o.ApplyT(func(v LookupEmailIdentityResult) string { return v.IdentityType }).(pulumi.StringOutput)
   149  }
   150  
   151  // Key-value mapping of resource tags.
   152  func (o LookupEmailIdentityResultOutput) Tags() pulumi.StringMapOutput {
   153  	return o.ApplyT(func(v LookupEmailIdentityResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   154  }
   155  
   156  // Specifies whether or not the identity is verified.
   157  func (o LookupEmailIdentityResultOutput) VerifiedForSendingStatus() pulumi.BoolOutput {
   158  	return o.ApplyT(func(v LookupEmailIdentityResult) bool { return v.VerifiedForSendingStatus }).(pulumi.BoolOutput)
   159  }
   160  
   161  func init() {
   162  	pulumi.RegisterOutputType(LookupEmailIdentityResultOutput{})
   163  }