github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sesv2/configurationSet.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) Configuration Set.
    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.NewConfigurationSet(ctx, "example", &sesv2.ConfigurationSetArgs{
    35  //				ConfigurationSetName: pulumi.String("example"),
    36  //				DeliveryOptions: &sesv2.ConfigurationSetDeliveryOptionsArgs{
    37  //					TlsPolicy: pulumi.String("REQUIRE"),
    38  //				},
    39  //				ReputationOptions: &sesv2.ConfigurationSetReputationOptionsArgs{
    40  //					ReputationMetricsEnabled: pulumi.Bool(false),
    41  //				},
    42  //				SendingOptions: &sesv2.ConfigurationSetSendingOptionsArgs{
    43  //					SendingEnabled: pulumi.Bool(true),
    44  //				},
    45  //				SuppressionOptions: &sesv2.ConfigurationSetSuppressionOptionsArgs{
    46  //					SuppressedReasons: pulumi.StringArray{
    47  //						pulumi.String("BOUNCE"),
    48  //						pulumi.String("COMPLAINT"),
    49  //					},
    50  //				},
    51  //				TrackingOptions: &sesv2.ConfigurationSetTrackingOptionsArgs{
    52  //					CustomRedirectDomain: pulumi.String("example.com"),
    53  //				},
    54  //			})
    55  //			if err != nil {
    56  //				return err
    57  //			}
    58  //			return nil
    59  //		})
    60  //	}
    61  //
    62  // ```
    63  // <!--End PulumiCodeChooser -->
    64  //
    65  // ## Import
    66  //
    67  // Using `pulumi import`, import SESv2 (Simple Email V2) Configuration Set using the `configuration_set_name`. For example:
    68  //
    69  // ```sh
    70  // $ pulumi import aws:sesv2/configurationSet:ConfigurationSet example example
    71  // ```
    72  type ConfigurationSet struct {
    73  	pulumi.CustomResourceState
    74  
    75  	// ARN of the Configuration Set.
    76  	Arn pulumi.StringOutput `pulumi:"arn"`
    77  	// The name of the configuration set.
    78  	ConfigurationSetName pulumi.StringOutput `pulumi:"configurationSetName"`
    79  	// An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.
    80  	DeliveryOptions ConfigurationSetDeliveryOptionsPtrOutput `pulumi:"deliveryOptions"`
    81  	// An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set.
    82  	ReputationOptions ConfigurationSetReputationOptionsOutput `pulumi:"reputationOptions"`
    83  	// An object that defines whether or not Amazon SES can send email that you send using the configuration set.
    84  	SendingOptions ConfigurationSetSendingOptionsOutput `pulumi:"sendingOptions"`
    85  	// An object that contains information about the suppression list preferences for your account.
    86  	SuppressionOptions ConfigurationSetSuppressionOptionsPtrOutput `pulumi:"suppressionOptions"`
    87  	// A map of tags to assign to the service. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    88  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    89  	// Deprecated: Please use `tags` instead.
    90  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    91  	// An object that defines the open and click tracking options for emails that you send using the configuration set.
    92  	TrackingOptions ConfigurationSetTrackingOptionsPtrOutput `pulumi:"trackingOptions"`
    93  	// An object that defines the VDM settings that apply to emails that you send using the configuration set.
    94  	VdmOptions ConfigurationSetVdmOptionsPtrOutput `pulumi:"vdmOptions"`
    95  }
    96  
    97  // NewConfigurationSet registers a new resource with the given unique name, arguments, and options.
    98  func NewConfigurationSet(ctx *pulumi.Context,
    99  	name string, args *ConfigurationSetArgs, opts ...pulumi.ResourceOption) (*ConfigurationSet, error) {
   100  	if args == nil {
   101  		return nil, errors.New("missing one or more required arguments")
   102  	}
   103  
   104  	if args.ConfigurationSetName == nil {
   105  		return nil, errors.New("invalid value for required argument 'ConfigurationSetName'")
   106  	}
   107  	opts = internal.PkgResourceDefaultOpts(opts)
   108  	var resource ConfigurationSet
   109  	err := ctx.RegisterResource("aws:sesv2/configurationSet:ConfigurationSet", name, args, &resource, opts...)
   110  	if err != nil {
   111  		return nil, err
   112  	}
   113  	return &resource, nil
   114  }
   115  
   116  // GetConfigurationSet gets an existing ConfigurationSet resource's state with the given name, ID, and optional
   117  // state properties that are used to uniquely qualify the lookup (nil if not required).
   118  func GetConfigurationSet(ctx *pulumi.Context,
   119  	name string, id pulumi.IDInput, state *ConfigurationSetState, opts ...pulumi.ResourceOption) (*ConfigurationSet, error) {
   120  	var resource ConfigurationSet
   121  	err := ctx.ReadResource("aws:sesv2/configurationSet:ConfigurationSet", name, id, state, &resource, opts...)
   122  	if err != nil {
   123  		return nil, err
   124  	}
   125  	return &resource, nil
   126  }
   127  
   128  // Input properties used for looking up and filtering ConfigurationSet resources.
   129  type configurationSetState struct {
   130  	// ARN of the Configuration Set.
   131  	Arn *string `pulumi:"arn"`
   132  	// The name of the configuration set.
   133  	ConfigurationSetName *string `pulumi:"configurationSetName"`
   134  	// An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.
   135  	DeliveryOptions *ConfigurationSetDeliveryOptions `pulumi:"deliveryOptions"`
   136  	// An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set.
   137  	ReputationOptions *ConfigurationSetReputationOptions `pulumi:"reputationOptions"`
   138  	// An object that defines whether or not Amazon SES can send email that you send using the configuration set.
   139  	SendingOptions *ConfigurationSetSendingOptions `pulumi:"sendingOptions"`
   140  	// An object that contains information about the suppression list preferences for your account.
   141  	SuppressionOptions *ConfigurationSetSuppressionOptions `pulumi:"suppressionOptions"`
   142  	// A map of tags to assign to the service. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   143  	Tags map[string]string `pulumi:"tags"`
   144  	// Deprecated: Please use `tags` instead.
   145  	TagsAll map[string]string `pulumi:"tagsAll"`
   146  	// An object that defines the open and click tracking options for emails that you send using the configuration set.
   147  	TrackingOptions *ConfigurationSetTrackingOptions `pulumi:"trackingOptions"`
   148  	// An object that defines the VDM settings that apply to emails that you send using the configuration set.
   149  	VdmOptions *ConfigurationSetVdmOptions `pulumi:"vdmOptions"`
   150  }
   151  
   152  type ConfigurationSetState struct {
   153  	// ARN of the Configuration Set.
   154  	Arn pulumi.StringPtrInput
   155  	// The name of the configuration set.
   156  	ConfigurationSetName pulumi.StringPtrInput
   157  	// An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.
   158  	DeliveryOptions ConfigurationSetDeliveryOptionsPtrInput
   159  	// An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set.
   160  	ReputationOptions ConfigurationSetReputationOptionsPtrInput
   161  	// An object that defines whether or not Amazon SES can send email that you send using the configuration set.
   162  	SendingOptions ConfigurationSetSendingOptionsPtrInput
   163  	// An object that contains information about the suppression list preferences for your account.
   164  	SuppressionOptions ConfigurationSetSuppressionOptionsPtrInput
   165  	// A map of tags to assign to the service. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   166  	Tags pulumi.StringMapInput
   167  	// Deprecated: Please use `tags` instead.
   168  	TagsAll pulumi.StringMapInput
   169  	// An object that defines the open and click tracking options for emails that you send using the configuration set.
   170  	TrackingOptions ConfigurationSetTrackingOptionsPtrInput
   171  	// An object that defines the VDM settings that apply to emails that you send using the configuration set.
   172  	VdmOptions ConfigurationSetVdmOptionsPtrInput
   173  }
   174  
   175  func (ConfigurationSetState) ElementType() reflect.Type {
   176  	return reflect.TypeOf((*configurationSetState)(nil)).Elem()
   177  }
   178  
   179  type configurationSetArgs struct {
   180  	// The name of the configuration set.
   181  	ConfigurationSetName string `pulumi:"configurationSetName"`
   182  	// An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.
   183  	DeliveryOptions *ConfigurationSetDeliveryOptions `pulumi:"deliveryOptions"`
   184  	// An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set.
   185  	ReputationOptions *ConfigurationSetReputationOptions `pulumi:"reputationOptions"`
   186  	// An object that defines whether or not Amazon SES can send email that you send using the configuration set.
   187  	SendingOptions *ConfigurationSetSendingOptions `pulumi:"sendingOptions"`
   188  	// An object that contains information about the suppression list preferences for your account.
   189  	SuppressionOptions *ConfigurationSetSuppressionOptions `pulumi:"suppressionOptions"`
   190  	// A map of tags to assign to the service. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   191  	Tags map[string]string `pulumi:"tags"`
   192  	// An object that defines the open and click tracking options for emails that you send using the configuration set.
   193  	TrackingOptions *ConfigurationSetTrackingOptions `pulumi:"trackingOptions"`
   194  	// An object that defines the VDM settings that apply to emails that you send using the configuration set.
   195  	VdmOptions *ConfigurationSetVdmOptions `pulumi:"vdmOptions"`
   196  }
   197  
   198  // The set of arguments for constructing a ConfigurationSet resource.
   199  type ConfigurationSetArgs struct {
   200  	// The name of the configuration set.
   201  	ConfigurationSetName pulumi.StringInput
   202  	// An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.
   203  	DeliveryOptions ConfigurationSetDeliveryOptionsPtrInput
   204  	// An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set.
   205  	ReputationOptions ConfigurationSetReputationOptionsPtrInput
   206  	// An object that defines whether or not Amazon SES can send email that you send using the configuration set.
   207  	SendingOptions ConfigurationSetSendingOptionsPtrInput
   208  	// An object that contains information about the suppression list preferences for your account.
   209  	SuppressionOptions ConfigurationSetSuppressionOptionsPtrInput
   210  	// A map of tags to assign to the service. 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  	// An object that defines the open and click tracking options for emails that you send using the configuration set.
   213  	TrackingOptions ConfigurationSetTrackingOptionsPtrInput
   214  	// An object that defines the VDM settings that apply to emails that you send using the configuration set.
   215  	VdmOptions ConfigurationSetVdmOptionsPtrInput
   216  }
   217  
   218  func (ConfigurationSetArgs) ElementType() reflect.Type {
   219  	return reflect.TypeOf((*configurationSetArgs)(nil)).Elem()
   220  }
   221  
   222  type ConfigurationSetInput interface {
   223  	pulumi.Input
   224  
   225  	ToConfigurationSetOutput() ConfigurationSetOutput
   226  	ToConfigurationSetOutputWithContext(ctx context.Context) ConfigurationSetOutput
   227  }
   228  
   229  func (*ConfigurationSet) ElementType() reflect.Type {
   230  	return reflect.TypeOf((**ConfigurationSet)(nil)).Elem()
   231  }
   232  
   233  func (i *ConfigurationSet) ToConfigurationSetOutput() ConfigurationSetOutput {
   234  	return i.ToConfigurationSetOutputWithContext(context.Background())
   235  }
   236  
   237  func (i *ConfigurationSet) ToConfigurationSetOutputWithContext(ctx context.Context) ConfigurationSetOutput {
   238  	return pulumi.ToOutputWithContext(ctx, i).(ConfigurationSetOutput)
   239  }
   240  
   241  // ConfigurationSetArrayInput is an input type that accepts ConfigurationSetArray and ConfigurationSetArrayOutput values.
   242  // You can construct a concrete instance of `ConfigurationSetArrayInput` via:
   243  //
   244  //	ConfigurationSetArray{ ConfigurationSetArgs{...} }
   245  type ConfigurationSetArrayInput interface {
   246  	pulumi.Input
   247  
   248  	ToConfigurationSetArrayOutput() ConfigurationSetArrayOutput
   249  	ToConfigurationSetArrayOutputWithContext(context.Context) ConfigurationSetArrayOutput
   250  }
   251  
   252  type ConfigurationSetArray []ConfigurationSetInput
   253  
   254  func (ConfigurationSetArray) ElementType() reflect.Type {
   255  	return reflect.TypeOf((*[]*ConfigurationSet)(nil)).Elem()
   256  }
   257  
   258  func (i ConfigurationSetArray) ToConfigurationSetArrayOutput() ConfigurationSetArrayOutput {
   259  	return i.ToConfigurationSetArrayOutputWithContext(context.Background())
   260  }
   261  
   262  func (i ConfigurationSetArray) ToConfigurationSetArrayOutputWithContext(ctx context.Context) ConfigurationSetArrayOutput {
   263  	return pulumi.ToOutputWithContext(ctx, i).(ConfigurationSetArrayOutput)
   264  }
   265  
   266  // ConfigurationSetMapInput is an input type that accepts ConfigurationSetMap and ConfigurationSetMapOutput values.
   267  // You can construct a concrete instance of `ConfigurationSetMapInput` via:
   268  //
   269  //	ConfigurationSetMap{ "key": ConfigurationSetArgs{...} }
   270  type ConfigurationSetMapInput interface {
   271  	pulumi.Input
   272  
   273  	ToConfigurationSetMapOutput() ConfigurationSetMapOutput
   274  	ToConfigurationSetMapOutputWithContext(context.Context) ConfigurationSetMapOutput
   275  }
   276  
   277  type ConfigurationSetMap map[string]ConfigurationSetInput
   278  
   279  func (ConfigurationSetMap) ElementType() reflect.Type {
   280  	return reflect.TypeOf((*map[string]*ConfigurationSet)(nil)).Elem()
   281  }
   282  
   283  func (i ConfigurationSetMap) ToConfigurationSetMapOutput() ConfigurationSetMapOutput {
   284  	return i.ToConfigurationSetMapOutputWithContext(context.Background())
   285  }
   286  
   287  func (i ConfigurationSetMap) ToConfigurationSetMapOutputWithContext(ctx context.Context) ConfigurationSetMapOutput {
   288  	return pulumi.ToOutputWithContext(ctx, i).(ConfigurationSetMapOutput)
   289  }
   290  
   291  type ConfigurationSetOutput struct{ *pulumi.OutputState }
   292  
   293  func (ConfigurationSetOutput) ElementType() reflect.Type {
   294  	return reflect.TypeOf((**ConfigurationSet)(nil)).Elem()
   295  }
   296  
   297  func (o ConfigurationSetOutput) ToConfigurationSetOutput() ConfigurationSetOutput {
   298  	return o
   299  }
   300  
   301  func (o ConfigurationSetOutput) ToConfigurationSetOutputWithContext(ctx context.Context) ConfigurationSetOutput {
   302  	return o
   303  }
   304  
   305  // ARN of the Configuration Set.
   306  func (o ConfigurationSetOutput) Arn() pulumi.StringOutput {
   307  	return o.ApplyT(func(v *ConfigurationSet) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   308  }
   309  
   310  // The name of the configuration set.
   311  func (o ConfigurationSetOutput) ConfigurationSetName() pulumi.StringOutput {
   312  	return o.ApplyT(func(v *ConfigurationSet) pulumi.StringOutput { return v.ConfigurationSetName }).(pulumi.StringOutput)
   313  }
   314  
   315  // An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.
   316  func (o ConfigurationSetOutput) DeliveryOptions() ConfigurationSetDeliveryOptionsPtrOutput {
   317  	return o.ApplyT(func(v *ConfigurationSet) ConfigurationSetDeliveryOptionsPtrOutput { return v.DeliveryOptions }).(ConfigurationSetDeliveryOptionsPtrOutput)
   318  }
   319  
   320  // An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set.
   321  func (o ConfigurationSetOutput) ReputationOptions() ConfigurationSetReputationOptionsOutput {
   322  	return o.ApplyT(func(v *ConfigurationSet) ConfigurationSetReputationOptionsOutput { return v.ReputationOptions }).(ConfigurationSetReputationOptionsOutput)
   323  }
   324  
   325  // An object that defines whether or not Amazon SES can send email that you send using the configuration set.
   326  func (o ConfigurationSetOutput) SendingOptions() ConfigurationSetSendingOptionsOutput {
   327  	return o.ApplyT(func(v *ConfigurationSet) ConfigurationSetSendingOptionsOutput { return v.SendingOptions }).(ConfigurationSetSendingOptionsOutput)
   328  }
   329  
   330  // An object that contains information about the suppression list preferences for your account.
   331  func (o ConfigurationSetOutput) SuppressionOptions() ConfigurationSetSuppressionOptionsPtrOutput {
   332  	return o.ApplyT(func(v *ConfigurationSet) ConfigurationSetSuppressionOptionsPtrOutput { return v.SuppressionOptions }).(ConfigurationSetSuppressionOptionsPtrOutput)
   333  }
   334  
   335  // A map of tags to assign to the service. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   336  func (o ConfigurationSetOutput) Tags() pulumi.StringMapOutput {
   337  	return o.ApplyT(func(v *ConfigurationSet) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   338  }
   339  
   340  // Deprecated: Please use `tags` instead.
   341  func (o ConfigurationSetOutput) TagsAll() pulumi.StringMapOutput {
   342  	return o.ApplyT(func(v *ConfigurationSet) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   343  }
   344  
   345  // An object that defines the open and click tracking options for emails that you send using the configuration set.
   346  func (o ConfigurationSetOutput) TrackingOptions() ConfigurationSetTrackingOptionsPtrOutput {
   347  	return o.ApplyT(func(v *ConfigurationSet) ConfigurationSetTrackingOptionsPtrOutput { return v.TrackingOptions }).(ConfigurationSetTrackingOptionsPtrOutput)
   348  }
   349  
   350  // An object that defines the VDM settings that apply to emails that you send using the configuration set.
   351  func (o ConfigurationSetOutput) VdmOptions() ConfigurationSetVdmOptionsPtrOutput {
   352  	return o.ApplyT(func(v *ConfigurationSet) ConfigurationSetVdmOptionsPtrOutput { return v.VdmOptions }).(ConfigurationSetVdmOptionsPtrOutput)
   353  }
   354  
   355  type ConfigurationSetArrayOutput struct{ *pulumi.OutputState }
   356  
   357  func (ConfigurationSetArrayOutput) ElementType() reflect.Type {
   358  	return reflect.TypeOf((*[]*ConfigurationSet)(nil)).Elem()
   359  }
   360  
   361  func (o ConfigurationSetArrayOutput) ToConfigurationSetArrayOutput() ConfigurationSetArrayOutput {
   362  	return o
   363  }
   364  
   365  func (o ConfigurationSetArrayOutput) ToConfigurationSetArrayOutputWithContext(ctx context.Context) ConfigurationSetArrayOutput {
   366  	return o
   367  }
   368  
   369  func (o ConfigurationSetArrayOutput) Index(i pulumi.IntInput) ConfigurationSetOutput {
   370  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConfigurationSet {
   371  		return vs[0].([]*ConfigurationSet)[vs[1].(int)]
   372  	}).(ConfigurationSetOutput)
   373  }
   374  
   375  type ConfigurationSetMapOutput struct{ *pulumi.OutputState }
   376  
   377  func (ConfigurationSetMapOutput) ElementType() reflect.Type {
   378  	return reflect.TypeOf((*map[string]*ConfigurationSet)(nil)).Elem()
   379  }
   380  
   381  func (o ConfigurationSetMapOutput) ToConfigurationSetMapOutput() ConfigurationSetMapOutput {
   382  	return o
   383  }
   384  
   385  func (o ConfigurationSetMapOutput) ToConfigurationSetMapOutputWithContext(ctx context.Context) ConfigurationSetMapOutput {
   386  	return o
   387  }
   388  
   389  func (o ConfigurationSetMapOutput) MapIndex(k pulumi.StringInput) ConfigurationSetOutput {
   390  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConfigurationSet {
   391  		return vs[0].(map[string]*ConfigurationSet)[vs[1].(string)]
   392  	}).(ConfigurationSetOutput)
   393  }
   394  
   395  func init() {
   396  	pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationSetInput)(nil)).Elem(), &ConfigurationSet{})
   397  	pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationSetArrayInput)(nil)).Elem(), ConfigurationSetArray{})
   398  	pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationSetMapInput)(nil)).Elem(), ConfigurationSetMap{})
   399  	pulumi.RegisterOutputType(ConfigurationSetOutput{})
   400  	pulumi.RegisterOutputType(ConfigurationSetArrayOutput{})
   401  	pulumi.RegisterOutputType(ConfigurationSetMapOutput{})
   402  }