github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sesv2/getEmailIdentityMailFromAttributes.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 Mail From Attributes. 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 // example, err := sesv2.LookupEmailIdentity(ctx, &sesv2.LookupEmailIdentityArgs{ 34 // EmailIdentity: "example.com", 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // _, err = sesv2.LookupEmailIdentityMailFromAttributes(ctx, &sesv2.LookupEmailIdentityMailFromAttributesArgs{ 40 // EmailIdentity: example.EmailIdentity, 41 // }, nil) 42 // if err != nil { 43 // return err 44 // } 45 // return nil 46 // }) 47 // } 48 // 49 // ``` 50 // <!--End PulumiCodeChooser --> 51 func LookupEmailIdentityMailFromAttributes(ctx *pulumi.Context, args *LookupEmailIdentityMailFromAttributesArgs, opts ...pulumi.InvokeOption) (*LookupEmailIdentityMailFromAttributesResult, error) { 52 opts = internal.PkgInvokeDefaultOpts(opts) 53 var rv LookupEmailIdentityMailFromAttributesResult 54 err := ctx.Invoke("aws:sesv2/getEmailIdentityMailFromAttributes:getEmailIdentityMailFromAttributes", args, &rv, opts...) 55 if err != nil { 56 return nil, err 57 } 58 return &rv, nil 59 } 60 61 // A collection of arguments for invoking getEmailIdentityMailFromAttributes. 62 type LookupEmailIdentityMailFromAttributesArgs struct { 63 // The name of the email identity. 64 EmailIdentity string `pulumi:"emailIdentity"` 65 } 66 67 // A collection of values returned by getEmailIdentityMailFromAttributes. 68 type LookupEmailIdentityMailFromAttributesResult struct { 69 // The action to take if the required MX record isn't found when you send an email. Valid values: `USE_DEFAULT_VALUE`, `REJECT_MESSAGE`. 70 BehaviorOnMxFailure string `pulumi:"behaviorOnMxFailure"` 71 EmailIdentity string `pulumi:"emailIdentity"` 72 // The provider-assigned unique ID for this managed resource. 73 Id string `pulumi:"id"` 74 // The custom MAIL FROM domain that you want the verified identity to use. 75 MailFromDomain string `pulumi:"mailFromDomain"` 76 } 77 78 func LookupEmailIdentityMailFromAttributesOutput(ctx *pulumi.Context, args LookupEmailIdentityMailFromAttributesOutputArgs, opts ...pulumi.InvokeOption) LookupEmailIdentityMailFromAttributesResultOutput { 79 return pulumi.ToOutputWithContext(context.Background(), args). 80 ApplyT(func(v interface{}) (LookupEmailIdentityMailFromAttributesResult, error) { 81 args := v.(LookupEmailIdentityMailFromAttributesArgs) 82 r, err := LookupEmailIdentityMailFromAttributes(ctx, &args, opts...) 83 var s LookupEmailIdentityMailFromAttributesResult 84 if r != nil { 85 s = *r 86 } 87 return s, err 88 }).(LookupEmailIdentityMailFromAttributesResultOutput) 89 } 90 91 // A collection of arguments for invoking getEmailIdentityMailFromAttributes. 92 type LookupEmailIdentityMailFromAttributesOutputArgs struct { 93 // The name of the email identity. 94 EmailIdentity pulumi.StringInput `pulumi:"emailIdentity"` 95 } 96 97 func (LookupEmailIdentityMailFromAttributesOutputArgs) ElementType() reflect.Type { 98 return reflect.TypeOf((*LookupEmailIdentityMailFromAttributesArgs)(nil)).Elem() 99 } 100 101 // A collection of values returned by getEmailIdentityMailFromAttributes. 102 type LookupEmailIdentityMailFromAttributesResultOutput struct{ *pulumi.OutputState } 103 104 func (LookupEmailIdentityMailFromAttributesResultOutput) ElementType() reflect.Type { 105 return reflect.TypeOf((*LookupEmailIdentityMailFromAttributesResult)(nil)).Elem() 106 } 107 108 func (o LookupEmailIdentityMailFromAttributesResultOutput) ToLookupEmailIdentityMailFromAttributesResultOutput() LookupEmailIdentityMailFromAttributesResultOutput { 109 return o 110 } 111 112 func (o LookupEmailIdentityMailFromAttributesResultOutput) ToLookupEmailIdentityMailFromAttributesResultOutputWithContext(ctx context.Context) LookupEmailIdentityMailFromAttributesResultOutput { 113 return o 114 } 115 116 // The action to take if the required MX record isn't found when you send an email. Valid values: `USE_DEFAULT_VALUE`, `REJECT_MESSAGE`. 117 func (o LookupEmailIdentityMailFromAttributesResultOutput) BehaviorOnMxFailure() pulumi.StringOutput { 118 return o.ApplyT(func(v LookupEmailIdentityMailFromAttributesResult) string { return v.BehaviorOnMxFailure }).(pulumi.StringOutput) 119 } 120 121 func (o LookupEmailIdentityMailFromAttributesResultOutput) EmailIdentity() pulumi.StringOutput { 122 return o.ApplyT(func(v LookupEmailIdentityMailFromAttributesResult) string { return v.EmailIdentity }).(pulumi.StringOutput) 123 } 124 125 // The provider-assigned unique ID for this managed resource. 126 func (o LookupEmailIdentityMailFromAttributesResultOutput) Id() pulumi.StringOutput { 127 return o.ApplyT(func(v LookupEmailIdentityMailFromAttributesResult) string { return v.Id }).(pulumi.StringOutput) 128 } 129 130 // The custom MAIL FROM domain that you want the verified identity to use. 131 func (o LookupEmailIdentityMailFromAttributesResultOutput) MailFromDomain() pulumi.StringOutput { 132 return o.ApplyT(func(v LookupEmailIdentityMailFromAttributesResult) string { return v.MailFromDomain }).(pulumi.StringOutput) 133 } 134 135 func init() { 136 pulumi.RegisterOutputType(LookupEmailIdentityMailFromAttributesResultOutput{}) 137 }