github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sesv2/emailIdentityFeedbackAttributes.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 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Resource for managing an AWS SESv2 (Simple Email V2) Email Identity Feedback Attributes. 16 // 17 // ## Example Usage 18 // 19 // ### Basic Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sesv2" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // example, err := sesv2.NewEmailIdentity(ctx, "example", &sesv2.EmailIdentityArgs{ 35 // EmailIdentity: pulumi.String("example.com"), 36 // }) 37 // if err != nil { 38 // return err 39 // } 40 // _, err = sesv2.NewEmailIdentityFeedbackAttributes(ctx, "example", &sesv2.EmailIdentityFeedbackAttributesArgs{ 41 // EmailIdentity: example.EmailIdentity, 42 // EmailForwardingEnabled: pulumi.Bool(true), 43 // }) 44 // if err != nil { 45 // return err 46 // } 47 // return nil 48 // }) 49 // } 50 // 51 // ``` 52 // <!--End PulumiCodeChooser --> 53 // 54 // ## Import 55 // 56 // Using `pulumi import`, import SESv2 (Simple Email V2) Email Identity Feedback Attributes using the `email_identity`. For example: 57 // 58 // ```sh 59 // $ pulumi import aws:sesv2/emailIdentityFeedbackAttributes:EmailIdentityFeedbackAttributes example example.com 60 // ``` 61 type EmailIdentityFeedbackAttributes struct { 62 pulumi.CustomResourceState 63 64 // Sets the feedback forwarding configuration for the identity. 65 EmailForwardingEnabled pulumi.BoolPtrOutput `pulumi:"emailForwardingEnabled"` 66 // The email identity. 67 EmailIdentity pulumi.StringOutput `pulumi:"emailIdentity"` 68 } 69 70 // NewEmailIdentityFeedbackAttributes registers a new resource with the given unique name, arguments, and options. 71 func NewEmailIdentityFeedbackAttributes(ctx *pulumi.Context, 72 name string, args *EmailIdentityFeedbackAttributesArgs, opts ...pulumi.ResourceOption) (*EmailIdentityFeedbackAttributes, error) { 73 if args == nil { 74 return nil, errors.New("missing one or more required arguments") 75 } 76 77 if args.EmailIdentity == nil { 78 return nil, errors.New("invalid value for required argument 'EmailIdentity'") 79 } 80 opts = internal.PkgResourceDefaultOpts(opts) 81 var resource EmailIdentityFeedbackAttributes 82 err := ctx.RegisterResource("aws:sesv2/emailIdentityFeedbackAttributes:EmailIdentityFeedbackAttributes", name, args, &resource, opts...) 83 if err != nil { 84 return nil, err 85 } 86 return &resource, nil 87 } 88 89 // GetEmailIdentityFeedbackAttributes gets an existing EmailIdentityFeedbackAttributes resource's state with the given name, ID, and optional 90 // state properties that are used to uniquely qualify the lookup (nil if not required). 91 func GetEmailIdentityFeedbackAttributes(ctx *pulumi.Context, 92 name string, id pulumi.IDInput, state *EmailIdentityFeedbackAttributesState, opts ...pulumi.ResourceOption) (*EmailIdentityFeedbackAttributes, error) { 93 var resource EmailIdentityFeedbackAttributes 94 err := ctx.ReadResource("aws:sesv2/emailIdentityFeedbackAttributes:EmailIdentityFeedbackAttributes", name, id, state, &resource, opts...) 95 if err != nil { 96 return nil, err 97 } 98 return &resource, nil 99 } 100 101 // Input properties used for looking up and filtering EmailIdentityFeedbackAttributes resources. 102 type emailIdentityFeedbackAttributesState struct { 103 // Sets the feedback forwarding configuration for the identity. 104 EmailForwardingEnabled *bool `pulumi:"emailForwardingEnabled"` 105 // The email identity. 106 EmailIdentity *string `pulumi:"emailIdentity"` 107 } 108 109 type EmailIdentityFeedbackAttributesState struct { 110 // Sets the feedback forwarding configuration for the identity. 111 EmailForwardingEnabled pulumi.BoolPtrInput 112 // The email identity. 113 EmailIdentity pulumi.StringPtrInput 114 } 115 116 func (EmailIdentityFeedbackAttributesState) ElementType() reflect.Type { 117 return reflect.TypeOf((*emailIdentityFeedbackAttributesState)(nil)).Elem() 118 } 119 120 type emailIdentityFeedbackAttributesArgs struct { 121 // Sets the feedback forwarding configuration for the identity. 122 EmailForwardingEnabled *bool `pulumi:"emailForwardingEnabled"` 123 // The email identity. 124 EmailIdentity string `pulumi:"emailIdentity"` 125 } 126 127 // The set of arguments for constructing a EmailIdentityFeedbackAttributes resource. 128 type EmailIdentityFeedbackAttributesArgs struct { 129 // Sets the feedback forwarding configuration for the identity. 130 EmailForwardingEnabled pulumi.BoolPtrInput 131 // The email identity. 132 EmailIdentity pulumi.StringInput 133 } 134 135 func (EmailIdentityFeedbackAttributesArgs) ElementType() reflect.Type { 136 return reflect.TypeOf((*emailIdentityFeedbackAttributesArgs)(nil)).Elem() 137 } 138 139 type EmailIdentityFeedbackAttributesInput interface { 140 pulumi.Input 141 142 ToEmailIdentityFeedbackAttributesOutput() EmailIdentityFeedbackAttributesOutput 143 ToEmailIdentityFeedbackAttributesOutputWithContext(ctx context.Context) EmailIdentityFeedbackAttributesOutput 144 } 145 146 func (*EmailIdentityFeedbackAttributes) ElementType() reflect.Type { 147 return reflect.TypeOf((**EmailIdentityFeedbackAttributes)(nil)).Elem() 148 } 149 150 func (i *EmailIdentityFeedbackAttributes) ToEmailIdentityFeedbackAttributesOutput() EmailIdentityFeedbackAttributesOutput { 151 return i.ToEmailIdentityFeedbackAttributesOutputWithContext(context.Background()) 152 } 153 154 func (i *EmailIdentityFeedbackAttributes) ToEmailIdentityFeedbackAttributesOutputWithContext(ctx context.Context) EmailIdentityFeedbackAttributesOutput { 155 return pulumi.ToOutputWithContext(ctx, i).(EmailIdentityFeedbackAttributesOutput) 156 } 157 158 // EmailIdentityFeedbackAttributesArrayInput is an input type that accepts EmailIdentityFeedbackAttributesArray and EmailIdentityFeedbackAttributesArrayOutput values. 159 // You can construct a concrete instance of `EmailIdentityFeedbackAttributesArrayInput` via: 160 // 161 // EmailIdentityFeedbackAttributesArray{ EmailIdentityFeedbackAttributesArgs{...} } 162 type EmailIdentityFeedbackAttributesArrayInput interface { 163 pulumi.Input 164 165 ToEmailIdentityFeedbackAttributesArrayOutput() EmailIdentityFeedbackAttributesArrayOutput 166 ToEmailIdentityFeedbackAttributesArrayOutputWithContext(context.Context) EmailIdentityFeedbackAttributesArrayOutput 167 } 168 169 type EmailIdentityFeedbackAttributesArray []EmailIdentityFeedbackAttributesInput 170 171 func (EmailIdentityFeedbackAttributesArray) ElementType() reflect.Type { 172 return reflect.TypeOf((*[]*EmailIdentityFeedbackAttributes)(nil)).Elem() 173 } 174 175 func (i EmailIdentityFeedbackAttributesArray) ToEmailIdentityFeedbackAttributesArrayOutput() EmailIdentityFeedbackAttributesArrayOutput { 176 return i.ToEmailIdentityFeedbackAttributesArrayOutputWithContext(context.Background()) 177 } 178 179 func (i EmailIdentityFeedbackAttributesArray) ToEmailIdentityFeedbackAttributesArrayOutputWithContext(ctx context.Context) EmailIdentityFeedbackAttributesArrayOutput { 180 return pulumi.ToOutputWithContext(ctx, i).(EmailIdentityFeedbackAttributesArrayOutput) 181 } 182 183 // EmailIdentityFeedbackAttributesMapInput is an input type that accepts EmailIdentityFeedbackAttributesMap and EmailIdentityFeedbackAttributesMapOutput values. 184 // You can construct a concrete instance of `EmailIdentityFeedbackAttributesMapInput` via: 185 // 186 // EmailIdentityFeedbackAttributesMap{ "key": EmailIdentityFeedbackAttributesArgs{...} } 187 type EmailIdentityFeedbackAttributesMapInput interface { 188 pulumi.Input 189 190 ToEmailIdentityFeedbackAttributesMapOutput() EmailIdentityFeedbackAttributesMapOutput 191 ToEmailIdentityFeedbackAttributesMapOutputWithContext(context.Context) EmailIdentityFeedbackAttributesMapOutput 192 } 193 194 type EmailIdentityFeedbackAttributesMap map[string]EmailIdentityFeedbackAttributesInput 195 196 func (EmailIdentityFeedbackAttributesMap) ElementType() reflect.Type { 197 return reflect.TypeOf((*map[string]*EmailIdentityFeedbackAttributes)(nil)).Elem() 198 } 199 200 func (i EmailIdentityFeedbackAttributesMap) ToEmailIdentityFeedbackAttributesMapOutput() EmailIdentityFeedbackAttributesMapOutput { 201 return i.ToEmailIdentityFeedbackAttributesMapOutputWithContext(context.Background()) 202 } 203 204 func (i EmailIdentityFeedbackAttributesMap) ToEmailIdentityFeedbackAttributesMapOutputWithContext(ctx context.Context) EmailIdentityFeedbackAttributesMapOutput { 205 return pulumi.ToOutputWithContext(ctx, i).(EmailIdentityFeedbackAttributesMapOutput) 206 } 207 208 type EmailIdentityFeedbackAttributesOutput struct{ *pulumi.OutputState } 209 210 func (EmailIdentityFeedbackAttributesOutput) ElementType() reflect.Type { 211 return reflect.TypeOf((**EmailIdentityFeedbackAttributes)(nil)).Elem() 212 } 213 214 func (o EmailIdentityFeedbackAttributesOutput) ToEmailIdentityFeedbackAttributesOutput() EmailIdentityFeedbackAttributesOutput { 215 return o 216 } 217 218 func (o EmailIdentityFeedbackAttributesOutput) ToEmailIdentityFeedbackAttributesOutputWithContext(ctx context.Context) EmailIdentityFeedbackAttributesOutput { 219 return o 220 } 221 222 // Sets the feedback forwarding configuration for the identity. 223 func (o EmailIdentityFeedbackAttributesOutput) EmailForwardingEnabled() pulumi.BoolPtrOutput { 224 return o.ApplyT(func(v *EmailIdentityFeedbackAttributes) pulumi.BoolPtrOutput { return v.EmailForwardingEnabled }).(pulumi.BoolPtrOutput) 225 } 226 227 // The email identity. 228 func (o EmailIdentityFeedbackAttributesOutput) EmailIdentity() pulumi.StringOutput { 229 return o.ApplyT(func(v *EmailIdentityFeedbackAttributes) pulumi.StringOutput { return v.EmailIdentity }).(pulumi.StringOutput) 230 } 231 232 type EmailIdentityFeedbackAttributesArrayOutput struct{ *pulumi.OutputState } 233 234 func (EmailIdentityFeedbackAttributesArrayOutput) ElementType() reflect.Type { 235 return reflect.TypeOf((*[]*EmailIdentityFeedbackAttributes)(nil)).Elem() 236 } 237 238 func (o EmailIdentityFeedbackAttributesArrayOutput) ToEmailIdentityFeedbackAttributesArrayOutput() EmailIdentityFeedbackAttributesArrayOutput { 239 return o 240 } 241 242 func (o EmailIdentityFeedbackAttributesArrayOutput) ToEmailIdentityFeedbackAttributesArrayOutputWithContext(ctx context.Context) EmailIdentityFeedbackAttributesArrayOutput { 243 return o 244 } 245 246 func (o EmailIdentityFeedbackAttributesArrayOutput) Index(i pulumi.IntInput) EmailIdentityFeedbackAttributesOutput { 247 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EmailIdentityFeedbackAttributes { 248 return vs[0].([]*EmailIdentityFeedbackAttributes)[vs[1].(int)] 249 }).(EmailIdentityFeedbackAttributesOutput) 250 } 251 252 type EmailIdentityFeedbackAttributesMapOutput struct{ *pulumi.OutputState } 253 254 func (EmailIdentityFeedbackAttributesMapOutput) ElementType() reflect.Type { 255 return reflect.TypeOf((*map[string]*EmailIdentityFeedbackAttributes)(nil)).Elem() 256 } 257 258 func (o EmailIdentityFeedbackAttributesMapOutput) ToEmailIdentityFeedbackAttributesMapOutput() EmailIdentityFeedbackAttributesMapOutput { 259 return o 260 } 261 262 func (o EmailIdentityFeedbackAttributesMapOutput) ToEmailIdentityFeedbackAttributesMapOutputWithContext(ctx context.Context) EmailIdentityFeedbackAttributesMapOutput { 263 return o 264 } 265 266 func (o EmailIdentityFeedbackAttributesMapOutput) MapIndex(k pulumi.StringInput) EmailIdentityFeedbackAttributesOutput { 267 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EmailIdentityFeedbackAttributes { 268 return vs[0].(map[string]*EmailIdentityFeedbackAttributes)[vs[1].(string)] 269 }).(EmailIdentityFeedbackAttributesOutput) 270 } 271 272 func init() { 273 pulumi.RegisterInputType(reflect.TypeOf((*EmailIdentityFeedbackAttributesInput)(nil)).Elem(), &EmailIdentityFeedbackAttributes{}) 274 pulumi.RegisterInputType(reflect.TypeOf((*EmailIdentityFeedbackAttributesArrayInput)(nil)).Elem(), EmailIdentityFeedbackAttributesArray{}) 275 pulumi.RegisterInputType(reflect.TypeOf((*EmailIdentityFeedbackAttributesMapInput)(nil)).Elem(), EmailIdentityFeedbackAttributesMap{}) 276 pulumi.RegisterOutputType(EmailIdentityFeedbackAttributesOutput{}) 277 pulumi.RegisterOutputType(EmailIdentityFeedbackAttributesArrayOutput{}) 278 pulumi.RegisterOutputType(EmailIdentityFeedbackAttributesMapOutput{}) 279 }