github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sesv2/contactList.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) Contact List. 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 // _, err := sesv2.NewContactList(ctx, "example", &sesv2.ContactListArgs{ 35 // ContactListName: pulumi.String("example"), 36 // }) 37 // if err != nil { 38 // return err 39 // } 40 // return nil 41 // }) 42 // } 43 // 44 // ``` 45 // <!--End PulumiCodeChooser --> 46 // 47 // ### Extended Usage 48 // 49 // <!--Start PulumiCodeChooser --> 50 // ```go 51 // package main 52 // 53 // import ( 54 // 55 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sesv2" 56 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 57 // 58 // ) 59 // 60 // func main() { 61 // pulumi.Run(func(ctx *pulumi.Context) error { 62 // _, err := sesv2.NewContactList(ctx, "example", &sesv2.ContactListArgs{ 63 // ContactListName: pulumi.String("example"), 64 // Description: pulumi.String("description"), 65 // Topics: sesv2.ContactListTopicArray{ 66 // &sesv2.ContactListTopicArgs{ 67 // DefaultSubscriptionStatus: pulumi.String("OPT_IN"), 68 // Description: pulumi.String("topic description"), 69 // DisplayName: pulumi.String("Example Topic"), 70 // TopicName: pulumi.String("example-topic"), 71 // }, 72 // }, 73 // }) 74 // if err != nil { 75 // return err 76 // } 77 // return nil 78 // }) 79 // } 80 // 81 // ``` 82 // <!--End PulumiCodeChooser --> 83 // 84 // ## Import 85 // 86 // Using `pulumi import`, import SESv2 (Simple Email V2) Contact List using the `id`. For example: 87 // 88 // ```sh 89 // $ pulumi import aws:sesv2/contactList:ContactList example example 90 // ``` 91 type ContactList struct { 92 pulumi.CustomResourceState 93 94 Arn pulumi.StringOutput `pulumi:"arn"` 95 // Name of the contact list. 96 // 97 // The following arguments are optional: 98 ContactListName pulumi.StringOutput `pulumi:"contactListName"` 99 // Timestamp noting when the contact list was created in ISO 8601 format. 100 CreatedTimestamp pulumi.StringOutput `pulumi:"createdTimestamp"` 101 // Description of what the contact list is about. 102 Description pulumi.StringPtrOutput `pulumi:"description"` 103 // Timestamp noting the last time the contact list was updated in ISO 8601 format. 104 LastUpdatedTimestamp pulumi.StringOutput `pulumi:"lastUpdatedTimestamp"` 105 // Key-value map of resource tags for the contact list. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 106 Tags pulumi.StringMapOutput `pulumi:"tags"` 107 // Deprecated: Please use `tags` instead. 108 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 109 // Configuration block(s) with topic for the contact list. Detailed below. 110 Topics ContactListTopicArrayOutput `pulumi:"topics"` 111 } 112 113 // NewContactList registers a new resource with the given unique name, arguments, and options. 114 func NewContactList(ctx *pulumi.Context, 115 name string, args *ContactListArgs, opts ...pulumi.ResourceOption) (*ContactList, error) { 116 if args == nil { 117 return nil, errors.New("missing one or more required arguments") 118 } 119 120 if args.ContactListName == nil { 121 return nil, errors.New("invalid value for required argument 'ContactListName'") 122 } 123 opts = internal.PkgResourceDefaultOpts(opts) 124 var resource ContactList 125 err := ctx.RegisterResource("aws:sesv2/contactList:ContactList", name, args, &resource, opts...) 126 if err != nil { 127 return nil, err 128 } 129 return &resource, nil 130 } 131 132 // GetContactList gets an existing ContactList resource's state with the given name, ID, and optional 133 // state properties that are used to uniquely qualify the lookup (nil if not required). 134 func GetContactList(ctx *pulumi.Context, 135 name string, id pulumi.IDInput, state *ContactListState, opts ...pulumi.ResourceOption) (*ContactList, error) { 136 var resource ContactList 137 err := ctx.ReadResource("aws:sesv2/contactList:ContactList", name, id, state, &resource, opts...) 138 if err != nil { 139 return nil, err 140 } 141 return &resource, nil 142 } 143 144 // Input properties used for looking up and filtering ContactList resources. 145 type contactListState struct { 146 Arn *string `pulumi:"arn"` 147 // Name of the contact list. 148 // 149 // The following arguments are optional: 150 ContactListName *string `pulumi:"contactListName"` 151 // Timestamp noting when the contact list was created in ISO 8601 format. 152 CreatedTimestamp *string `pulumi:"createdTimestamp"` 153 // Description of what the contact list is about. 154 Description *string `pulumi:"description"` 155 // Timestamp noting the last time the contact list was updated in ISO 8601 format. 156 LastUpdatedTimestamp *string `pulumi:"lastUpdatedTimestamp"` 157 // Key-value map of resource tags for the contact list. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 158 Tags map[string]string `pulumi:"tags"` 159 // Deprecated: Please use `tags` instead. 160 TagsAll map[string]string `pulumi:"tagsAll"` 161 // Configuration block(s) with topic for the contact list. Detailed below. 162 Topics []ContactListTopic `pulumi:"topics"` 163 } 164 165 type ContactListState struct { 166 Arn pulumi.StringPtrInput 167 // Name of the contact list. 168 // 169 // The following arguments are optional: 170 ContactListName pulumi.StringPtrInput 171 // Timestamp noting when the contact list was created in ISO 8601 format. 172 CreatedTimestamp pulumi.StringPtrInput 173 // Description of what the contact list is about. 174 Description pulumi.StringPtrInput 175 // Timestamp noting the last time the contact list was updated in ISO 8601 format. 176 LastUpdatedTimestamp pulumi.StringPtrInput 177 // Key-value map of resource tags for the contact list. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 178 Tags pulumi.StringMapInput 179 // Deprecated: Please use `tags` instead. 180 TagsAll pulumi.StringMapInput 181 // Configuration block(s) with topic for the contact list. Detailed below. 182 Topics ContactListTopicArrayInput 183 } 184 185 func (ContactListState) ElementType() reflect.Type { 186 return reflect.TypeOf((*contactListState)(nil)).Elem() 187 } 188 189 type contactListArgs struct { 190 // Name of the contact list. 191 // 192 // The following arguments are optional: 193 ContactListName string `pulumi:"contactListName"` 194 // Description of what the contact list is about. 195 Description *string `pulumi:"description"` 196 // Key-value map of resource tags for the contact list. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 197 Tags map[string]string `pulumi:"tags"` 198 // Configuration block(s) with topic for the contact list. Detailed below. 199 Topics []ContactListTopic `pulumi:"topics"` 200 } 201 202 // The set of arguments for constructing a ContactList resource. 203 type ContactListArgs struct { 204 // Name of the contact list. 205 // 206 // The following arguments are optional: 207 ContactListName pulumi.StringInput 208 // Description of what the contact list is about. 209 Description pulumi.StringPtrInput 210 // Key-value map of resource tags for the contact list. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 211 Tags pulumi.StringMapInput 212 // Configuration block(s) with topic for the contact list. Detailed below. 213 Topics ContactListTopicArrayInput 214 } 215 216 func (ContactListArgs) ElementType() reflect.Type { 217 return reflect.TypeOf((*contactListArgs)(nil)).Elem() 218 } 219 220 type ContactListInput interface { 221 pulumi.Input 222 223 ToContactListOutput() ContactListOutput 224 ToContactListOutputWithContext(ctx context.Context) ContactListOutput 225 } 226 227 func (*ContactList) ElementType() reflect.Type { 228 return reflect.TypeOf((**ContactList)(nil)).Elem() 229 } 230 231 func (i *ContactList) ToContactListOutput() ContactListOutput { 232 return i.ToContactListOutputWithContext(context.Background()) 233 } 234 235 func (i *ContactList) ToContactListOutputWithContext(ctx context.Context) ContactListOutput { 236 return pulumi.ToOutputWithContext(ctx, i).(ContactListOutput) 237 } 238 239 // ContactListArrayInput is an input type that accepts ContactListArray and ContactListArrayOutput values. 240 // You can construct a concrete instance of `ContactListArrayInput` via: 241 // 242 // ContactListArray{ ContactListArgs{...} } 243 type ContactListArrayInput interface { 244 pulumi.Input 245 246 ToContactListArrayOutput() ContactListArrayOutput 247 ToContactListArrayOutputWithContext(context.Context) ContactListArrayOutput 248 } 249 250 type ContactListArray []ContactListInput 251 252 func (ContactListArray) ElementType() reflect.Type { 253 return reflect.TypeOf((*[]*ContactList)(nil)).Elem() 254 } 255 256 func (i ContactListArray) ToContactListArrayOutput() ContactListArrayOutput { 257 return i.ToContactListArrayOutputWithContext(context.Background()) 258 } 259 260 func (i ContactListArray) ToContactListArrayOutputWithContext(ctx context.Context) ContactListArrayOutput { 261 return pulumi.ToOutputWithContext(ctx, i).(ContactListArrayOutput) 262 } 263 264 // ContactListMapInput is an input type that accepts ContactListMap and ContactListMapOutput values. 265 // You can construct a concrete instance of `ContactListMapInput` via: 266 // 267 // ContactListMap{ "key": ContactListArgs{...} } 268 type ContactListMapInput interface { 269 pulumi.Input 270 271 ToContactListMapOutput() ContactListMapOutput 272 ToContactListMapOutputWithContext(context.Context) ContactListMapOutput 273 } 274 275 type ContactListMap map[string]ContactListInput 276 277 func (ContactListMap) ElementType() reflect.Type { 278 return reflect.TypeOf((*map[string]*ContactList)(nil)).Elem() 279 } 280 281 func (i ContactListMap) ToContactListMapOutput() ContactListMapOutput { 282 return i.ToContactListMapOutputWithContext(context.Background()) 283 } 284 285 func (i ContactListMap) ToContactListMapOutputWithContext(ctx context.Context) ContactListMapOutput { 286 return pulumi.ToOutputWithContext(ctx, i).(ContactListMapOutput) 287 } 288 289 type ContactListOutput struct{ *pulumi.OutputState } 290 291 func (ContactListOutput) ElementType() reflect.Type { 292 return reflect.TypeOf((**ContactList)(nil)).Elem() 293 } 294 295 func (o ContactListOutput) ToContactListOutput() ContactListOutput { 296 return o 297 } 298 299 func (o ContactListOutput) ToContactListOutputWithContext(ctx context.Context) ContactListOutput { 300 return o 301 } 302 303 func (o ContactListOutput) Arn() pulumi.StringOutput { 304 return o.ApplyT(func(v *ContactList) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 305 } 306 307 // Name of the contact list. 308 // 309 // The following arguments are optional: 310 func (o ContactListOutput) ContactListName() pulumi.StringOutput { 311 return o.ApplyT(func(v *ContactList) pulumi.StringOutput { return v.ContactListName }).(pulumi.StringOutput) 312 } 313 314 // Timestamp noting when the contact list was created in ISO 8601 format. 315 func (o ContactListOutput) CreatedTimestamp() pulumi.StringOutput { 316 return o.ApplyT(func(v *ContactList) pulumi.StringOutput { return v.CreatedTimestamp }).(pulumi.StringOutput) 317 } 318 319 // Description of what the contact list is about. 320 func (o ContactListOutput) Description() pulumi.StringPtrOutput { 321 return o.ApplyT(func(v *ContactList) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 322 } 323 324 // Timestamp noting the last time the contact list was updated in ISO 8601 format. 325 func (o ContactListOutput) LastUpdatedTimestamp() pulumi.StringOutput { 326 return o.ApplyT(func(v *ContactList) pulumi.StringOutput { return v.LastUpdatedTimestamp }).(pulumi.StringOutput) 327 } 328 329 // Key-value map of resource tags for the contact list. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 330 func (o ContactListOutput) Tags() pulumi.StringMapOutput { 331 return o.ApplyT(func(v *ContactList) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 332 } 333 334 // Deprecated: Please use `tags` instead. 335 func (o ContactListOutput) TagsAll() pulumi.StringMapOutput { 336 return o.ApplyT(func(v *ContactList) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 337 } 338 339 // Configuration block(s) with topic for the contact list. Detailed below. 340 func (o ContactListOutput) Topics() ContactListTopicArrayOutput { 341 return o.ApplyT(func(v *ContactList) ContactListTopicArrayOutput { return v.Topics }).(ContactListTopicArrayOutput) 342 } 343 344 type ContactListArrayOutput struct{ *pulumi.OutputState } 345 346 func (ContactListArrayOutput) ElementType() reflect.Type { 347 return reflect.TypeOf((*[]*ContactList)(nil)).Elem() 348 } 349 350 func (o ContactListArrayOutput) ToContactListArrayOutput() ContactListArrayOutput { 351 return o 352 } 353 354 func (o ContactListArrayOutput) ToContactListArrayOutputWithContext(ctx context.Context) ContactListArrayOutput { 355 return o 356 } 357 358 func (o ContactListArrayOutput) Index(i pulumi.IntInput) ContactListOutput { 359 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ContactList { 360 return vs[0].([]*ContactList)[vs[1].(int)] 361 }).(ContactListOutput) 362 } 363 364 type ContactListMapOutput struct{ *pulumi.OutputState } 365 366 func (ContactListMapOutput) ElementType() reflect.Type { 367 return reflect.TypeOf((*map[string]*ContactList)(nil)).Elem() 368 } 369 370 func (o ContactListMapOutput) ToContactListMapOutput() ContactListMapOutput { 371 return o 372 } 373 374 func (o ContactListMapOutput) ToContactListMapOutputWithContext(ctx context.Context) ContactListMapOutput { 375 return o 376 } 377 378 func (o ContactListMapOutput) MapIndex(k pulumi.StringInput) ContactListOutput { 379 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ContactList { 380 return vs[0].(map[string]*ContactList)[vs[1].(string)] 381 }).(ContactListOutput) 382 } 383 384 func init() { 385 pulumi.RegisterInputType(reflect.TypeOf((*ContactListInput)(nil)).Elem(), &ContactList{}) 386 pulumi.RegisterInputType(reflect.TypeOf((*ContactListArrayInput)(nil)).Elem(), ContactListArray{}) 387 pulumi.RegisterInputType(reflect.TypeOf((*ContactListMapInput)(nil)).Elem(), ContactListMap{}) 388 pulumi.RegisterOutputType(ContactListOutput{}) 389 pulumi.RegisterOutputType(ContactListArrayOutput{}) 390 pulumi.RegisterOutputType(ContactListMapOutput{}) 391 }