github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ses/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 ses
     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  // Provides an SES configuration set resource.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### Basic Example
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ses"
    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 := ses.NewConfigurationSet(ctx, "test", &ses.ConfigurationSetArgs{
    34  //				Name: pulumi.String("some-configuration-set-test"),
    35  //			})
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  //
    46  // ### Require TLS Connections
    47  //
    48  // <!--Start PulumiCodeChooser -->
    49  // ```go
    50  // package main
    51  //
    52  // import (
    53  //
    54  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ses"
    55  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    56  //
    57  // )
    58  //
    59  //	func main() {
    60  //		pulumi.Run(func(ctx *pulumi.Context) error {
    61  //			_, err := ses.NewConfigurationSet(ctx, "test", &ses.ConfigurationSetArgs{
    62  //				Name: pulumi.String("some-configuration-set-test"),
    63  //				DeliveryOptions: &ses.ConfigurationSetDeliveryOptionsArgs{
    64  //					TlsPolicy: pulumi.String("Require"),
    65  //				},
    66  //			})
    67  //			if err != nil {
    68  //				return err
    69  //			}
    70  //			return nil
    71  //		})
    72  //	}
    73  //
    74  // ```
    75  // <!--End PulumiCodeChooser -->
    76  //
    77  // ### Tracking Options
    78  //
    79  // <!--Start PulumiCodeChooser -->
    80  // ```go
    81  // package main
    82  //
    83  // import (
    84  //
    85  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ses"
    86  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    87  //
    88  // )
    89  //
    90  //	func main() {
    91  //		pulumi.Run(func(ctx *pulumi.Context) error {
    92  //			_, err := ses.NewConfigurationSet(ctx, "test", &ses.ConfigurationSetArgs{
    93  //				Name: pulumi.String("some-configuration-set-test"),
    94  //				TrackingOptions: &ses.ConfigurationSetTrackingOptionsArgs{
    95  //					CustomRedirectDomain: pulumi.String("sub.example.com"),
    96  //				},
    97  //			})
    98  //			if err != nil {
    99  //				return err
   100  //			}
   101  //			return nil
   102  //		})
   103  //	}
   104  //
   105  // ```
   106  // <!--End PulumiCodeChooser -->
   107  //
   108  // ## Import
   109  //
   110  // Using `pulumi import`, import SES Configuration Sets using their `name`. For example:
   111  //
   112  // ```sh
   113  // $ pulumi import aws:ses/configurationSet:ConfigurationSet test some-configuration-set-test
   114  // ```
   115  type ConfigurationSet struct {
   116  	pulumi.CustomResourceState
   117  
   118  	// SES configuration set ARN.
   119  	Arn pulumi.StringOutput `pulumi:"arn"`
   120  	// Whether messages that use the configuration set are required to use TLS. See below.
   121  	DeliveryOptions ConfigurationSetDeliveryOptionsPtrOutput `pulumi:"deliveryOptions"`
   122  	// Date and time at which the reputation metrics for the configuration set were last reset. Resetting these metrics is known as a fresh start.
   123  	LastFreshStart pulumi.StringOutput `pulumi:"lastFreshStart"`
   124  	// Name of the configuration set.
   125  	//
   126  	// The following argument is optional:
   127  	Name pulumi.StringOutput `pulumi:"name"`
   128  	// Whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. The default value is `false`.
   129  	ReputationMetricsEnabled pulumi.BoolPtrOutput `pulumi:"reputationMetricsEnabled"`
   130  	// Whether email sending is enabled or disabled for the configuration set. The default value is `true`.
   131  	SendingEnabled pulumi.BoolPtrOutput `pulumi:"sendingEnabled"`
   132  	// Domain that is used to redirect email recipients to an Amazon SES-operated domain. See below. **NOTE:** This functionality is best effort.
   133  	TrackingOptions ConfigurationSetTrackingOptionsPtrOutput `pulumi:"trackingOptions"`
   134  }
   135  
   136  // NewConfigurationSet registers a new resource with the given unique name, arguments, and options.
   137  func NewConfigurationSet(ctx *pulumi.Context,
   138  	name string, args *ConfigurationSetArgs, opts ...pulumi.ResourceOption) (*ConfigurationSet, error) {
   139  	if args == nil {
   140  		args = &ConfigurationSetArgs{}
   141  	}
   142  
   143  	aliases := pulumi.Aliases([]pulumi.Alias{
   144  		{
   145  			Type: pulumi.String("aws:ses/confgurationSet:ConfgurationSet"),
   146  		},
   147  	})
   148  	opts = append(opts, aliases)
   149  	opts = internal.PkgResourceDefaultOpts(opts)
   150  	var resource ConfigurationSet
   151  	err := ctx.RegisterResource("aws:ses/configurationSet:ConfigurationSet", name, args, &resource, opts...)
   152  	if err != nil {
   153  		return nil, err
   154  	}
   155  	return &resource, nil
   156  }
   157  
   158  // GetConfigurationSet gets an existing ConfigurationSet resource's state with the given name, ID, and optional
   159  // state properties that are used to uniquely qualify the lookup (nil if not required).
   160  func GetConfigurationSet(ctx *pulumi.Context,
   161  	name string, id pulumi.IDInput, state *ConfigurationSetState, opts ...pulumi.ResourceOption) (*ConfigurationSet, error) {
   162  	var resource ConfigurationSet
   163  	err := ctx.ReadResource("aws:ses/configurationSet:ConfigurationSet", name, id, state, &resource, opts...)
   164  	if err != nil {
   165  		return nil, err
   166  	}
   167  	return &resource, nil
   168  }
   169  
   170  // Input properties used for looking up and filtering ConfigurationSet resources.
   171  type configurationSetState struct {
   172  	// SES configuration set ARN.
   173  	Arn *string `pulumi:"arn"`
   174  	// Whether messages that use the configuration set are required to use TLS. See below.
   175  	DeliveryOptions *ConfigurationSetDeliveryOptions `pulumi:"deliveryOptions"`
   176  	// Date and time at which the reputation metrics for the configuration set were last reset. Resetting these metrics is known as a fresh start.
   177  	LastFreshStart *string `pulumi:"lastFreshStart"`
   178  	// Name of the configuration set.
   179  	//
   180  	// The following argument is optional:
   181  	Name *string `pulumi:"name"`
   182  	// Whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. The default value is `false`.
   183  	ReputationMetricsEnabled *bool `pulumi:"reputationMetricsEnabled"`
   184  	// Whether email sending is enabled or disabled for the configuration set. The default value is `true`.
   185  	SendingEnabled *bool `pulumi:"sendingEnabled"`
   186  	// Domain that is used to redirect email recipients to an Amazon SES-operated domain. See below. **NOTE:** This functionality is best effort.
   187  	TrackingOptions *ConfigurationSetTrackingOptions `pulumi:"trackingOptions"`
   188  }
   189  
   190  type ConfigurationSetState struct {
   191  	// SES configuration set ARN.
   192  	Arn pulumi.StringPtrInput
   193  	// Whether messages that use the configuration set are required to use TLS. See below.
   194  	DeliveryOptions ConfigurationSetDeliveryOptionsPtrInput
   195  	// Date and time at which the reputation metrics for the configuration set were last reset. Resetting these metrics is known as a fresh start.
   196  	LastFreshStart pulumi.StringPtrInput
   197  	// Name of the configuration set.
   198  	//
   199  	// The following argument is optional:
   200  	Name pulumi.StringPtrInput
   201  	// Whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. The default value is `false`.
   202  	ReputationMetricsEnabled pulumi.BoolPtrInput
   203  	// Whether email sending is enabled or disabled for the configuration set. The default value is `true`.
   204  	SendingEnabled pulumi.BoolPtrInput
   205  	// Domain that is used to redirect email recipients to an Amazon SES-operated domain. See below. **NOTE:** This functionality is best effort.
   206  	TrackingOptions ConfigurationSetTrackingOptionsPtrInput
   207  }
   208  
   209  func (ConfigurationSetState) ElementType() reflect.Type {
   210  	return reflect.TypeOf((*configurationSetState)(nil)).Elem()
   211  }
   212  
   213  type configurationSetArgs struct {
   214  	// Whether messages that use the configuration set are required to use TLS. See below.
   215  	DeliveryOptions *ConfigurationSetDeliveryOptions `pulumi:"deliveryOptions"`
   216  	// Name of the configuration set.
   217  	//
   218  	// The following argument is optional:
   219  	Name *string `pulumi:"name"`
   220  	// Whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. The default value is `false`.
   221  	ReputationMetricsEnabled *bool `pulumi:"reputationMetricsEnabled"`
   222  	// Whether email sending is enabled or disabled for the configuration set. The default value is `true`.
   223  	SendingEnabled *bool `pulumi:"sendingEnabled"`
   224  	// Domain that is used to redirect email recipients to an Amazon SES-operated domain. See below. **NOTE:** This functionality is best effort.
   225  	TrackingOptions *ConfigurationSetTrackingOptions `pulumi:"trackingOptions"`
   226  }
   227  
   228  // The set of arguments for constructing a ConfigurationSet resource.
   229  type ConfigurationSetArgs struct {
   230  	// Whether messages that use the configuration set are required to use TLS. See below.
   231  	DeliveryOptions ConfigurationSetDeliveryOptionsPtrInput
   232  	// Name of the configuration set.
   233  	//
   234  	// The following argument is optional:
   235  	Name pulumi.StringPtrInput
   236  	// Whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. The default value is `false`.
   237  	ReputationMetricsEnabled pulumi.BoolPtrInput
   238  	// Whether email sending is enabled or disabled for the configuration set. The default value is `true`.
   239  	SendingEnabled pulumi.BoolPtrInput
   240  	// Domain that is used to redirect email recipients to an Amazon SES-operated domain. See below. **NOTE:** This functionality is best effort.
   241  	TrackingOptions ConfigurationSetTrackingOptionsPtrInput
   242  }
   243  
   244  func (ConfigurationSetArgs) ElementType() reflect.Type {
   245  	return reflect.TypeOf((*configurationSetArgs)(nil)).Elem()
   246  }
   247  
   248  type ConfigurationSetInput interface {
   249  	pulumi.Input
   250  
   251  	ToConfigurationSetOutput() ConfigurationSetOutput
   252  	ToConfigurationSetOutputWithContext(ctx context.Context) ConfigurationSetOutput
   253  }
   254  
   255  func (*ConfigurationSet) ElementType() reflect.Type {
   256  	return reflect.TypeOf((**ConfigurationSet)(nil)).Elem()
   257  }
   258  
   259  func (i *ConfigurationSet) ToConfigurationSetOutput() ConfigurationSetOutput {
   260  	return i.ToConfigurationSetOutputWithContext(context.Background())
   261  }
   262  
   263  func (i *ConfigurationSet) ToConfigurationSetOutputWithContext(ctx context.Context) ConfigurationSetOutput {
   264  	return pulumi.ToOutputWithContext(ctx, i).(ConfigurationSetOutput)
   265  }
   266  
   267  // ConfigurationSetArrayInput is an input type that accepts ConfigurationSetArray and ConfigurationSetArrayOutput values.
   268  // You can construct a concrete instance of `ConfigurationSetArrayInput` via:
   269  //
   270  //	ConfigurationSetArray{ ConfigurationSetArgs{...} }
   271  type ConfigurationSetArrayInput interface {
   272  	pulumi.Input
   273  
   274  	ToConfigurationSetArrayOutput() ConfigurationSetArrayOutput
   275  	ToConfigurationSetArrayOutputWithContext(context.Context) ConfigurationSetArrayOutput
   276  }
   277  
   278  type ConfigurationSetArray []ConfigurationSetInput
   279  
   280  func (ConfigurationSetArray) ElementType() reflect.Type {
   281  	return reflect.TypeOf((*[]*ConfigurationSet)(nil)).Elem()
   282  }
   283  
   284  func (i ConfigurationSetArray) ToConfigurationSetArrayOutput() ConfigurationSetArrayOutput {
   285  	return i.ToConfigurationSetArrayOutputWithContext(context.Background())
   286  }
   287  
   288  func (i ConfigurationSetArray) ToConfigurationSetArrayOutputWithContext(ctx context.Context) ConfigurationSetArrayOutput {
   289  	return pulumi.ToOutputWithContext(ctx, i).(ConfigurationSetArrayOutput)
   290  }
   291  
   292  // ConfigurationSetMapInput is an input type that accepts ConfigurationSetMap and ConfigurationSetMapOutput values.
   293  // You can construct a concrete instance of `ConfigurationSetMapInput` via:
   294  //
   295  //	ConfigurationSetMap{ "key": ConfigurationSetArgs{...} }
   296  type ConfigurationSetMapInput interface {
   297  	pulumi.Input
   298  
   299  	ToConfigurationSetMapOutput() ConfigurationSetMapOutput
   300  	ToConfigurationSetMapOutputWithContext(context.Context) ConfigurationSetMapOutput
   301  }
   302  
   303  type ConfigurationSetMap map[string]ConfigurationSetInput
   304  
   305  func (ConfigurationSetMap) ElementType() reflect.Type {
   306  	return reflect.TypeOf((*map[string]*ConfigurationSet)(nil)).Elem()
   307  }
   308  
   309  func (i ConfigurationSetMap) ToConfigurationSetMapOutput() ConfigurationSetMapOutput {
   310  	return i.ToConfigurationSetMapOutputWithContext(context.Background())
   311  }
   312  
   313  func (i ConfigurationSetMap) ToConfigurationSetMapOutputWithContext(ctx context.Context) ConfigurationSetMapOutput {
   314  	return pulumi.ToOutputWithContext(ctx, i).(ConfigurationSetMapOutput)
   315  }
   316  
   317  type ConfigurationSetOutput struct{ *pulumi.OutputState }
   318  
   319  func (ConfigurationSetOutput) ElementType() reflect.Type {
   320  	return reflect.TypeOf((**ConfigurationSet)(nil)).Elem()
   321  }
   322  
   323  func (o ConfigurationSetOutput) ToConfigurationSetOutput() ConfigurationSetOutput {
   324  	return o
   325  }
   326  
   327  func (o ConfigurationSetOutput) ToConfigurationSetOutputWithContext(ctx context.Context) ConfigurationSetOutput {
   328  	return o
   329  }
   330  
   331  // SES configuration set ARN.
   332  func (o ConfigurationSetOutput) Arn() pulumi.StringOutput {
   333  	return o.ApplyT(func(v *ConfigurationSet) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   334  }
   335  
   336  // Whether messages that use the configuration set are required to use TLS. See below.
   337  func (o ConfigurationSetOutput) DeliveryOptions() ConfigurationSetDeliveryOptionsPtrOutput {
   338  	return o.ApplyT(func(v *ConfigurationSet) ConfigurationSetDeliveryOptionsPtrOutput { return v.DeliveryOptions }).(ConfigurationSetDeliveryOptionsPtrOutput)
   339  }
   340  
   341  // Date and time at which the reputation metrics for the configuration set were last reset. Resetting these metrics is known as a fresh start.
   342  func (o ConfigurationSetOutput) LastFreshStart() pulumi.StringOutput {
   343  	return o.ApplyT(func(v *ConfigurationSet) pulumi.StringOutput { return v.LastFreshStart }).(pulumi.StringOutput)
   344  }
   345  
   346  // Name of the configuration set.
   347  //
   348  // The following argument is optional:
   349  func (o ConfigurationSetOutput) Name() pulumi.StringOutput {
   350  	return o.ApplyT(func(v *ConfigurationSet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   351  }
   352  
   353  // Whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. The default value is `false`.
   354  func (o ConfigurationSetOutput) ReputationMetricsEnabled() pulumi.BoolPtrOutput {
   355  	return o.ApplyT(func(v *ConfigurationSet) pulumi.BoolPtrOutput { return v.ReputationMetricsEnabled }).(pulumi.BoolPtrOutput)
   356  }
   357  
   358  // Whether email sending is enabled or disabled for the configuration set. The default value is `true`.
   359  func (o ConfigurationSetOutput) SendingEnabled() pulumi.BoolPtrOutput {
   360  	return o.ApplyT(func(v *ConfigurationSet) pulumi.BoolPtrOutput { return v.SendingEnabled }).(pulumi.BoolPtrOutput)
   361  }
   362  
   363  // Domain that is used to redirect email recipients to an Amazon SES-operated domain. See below. **NOTE:** This functionality is best effort.
   364  func (o ConfigurationSetOutput) TrackingOptions() ConfigurationSetTrackingOptionsPtrOutput {
   365  	return o.ApplyT(func(v *ConfigurationSet) ConfigurationSetTrackingOptionsPtrOutput { return v.TrackingOptions }).(ConfigurationSetTrackingOptionsPtrOutput)
   366  }
   367  
   368  type ConfigurationSetArrayOutput struct{ *pulumi.OutputState }
   369  
   370  func (ConfigurationSetArrayOutput) ElementType() reflect.Type {
   371  	return reflect.TypeOf((*[]*ConfigurationSet)(nil)).Elem()
   372  }
   373  
   374  func (o ConfigurationSetArrayOutput) ToConfigurationSetArrayOutput() ConfigurationSetArrayOutput {
   375  	return o
   376  }
   377  
   378  func (o ConfigurationSetArrayOutput) ToConfigurationSetArrayOutputWithContext(ctx context.Context) ConfigurationSetArrayOutput {
   379  	return o
   380  }
   381  
   382  func (o ConfigurationSetArrayOutput) Index(i pulumi.IntInput) ConfigurationSetOutput {
   383  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConfigurationSet {
   384  		return vs[0].([]*ConfigurationSet)[vs[1].(int)]
   385  	}).(ConfigurationSetOutput)
   386  }
   387  
   388  type ConfigurationSetMapOutput struct{ *pulumi.OutputState }
   389  
   390  func (ConfigurationSetMapOutput) ElementType() reflect.Type {
   391  	return reflect.TypeOf((*map[string]*ConfigurationSet)(nil)).Elem()
   392  }
   393  
   394  func (o ConfigurationSetMapOutput) ToConfigurationSetMapOutput() ConfigurationSetMapOutput {
   395  	return o
   396  }
   397  
   398  func (o ConfigurationSetMapOutput) ToConfigurationSetMapOutputWithContext(ctx context.Context) ConfigurationSetMapOutput {
   399  	return o
   400  }
   401  
   402  func (o ConfigurationSetMapOutput) MapIndex(k pulumi.StringInput) ConfigurationSetOutput {
   403  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConfigurationSet {
   404  		return vs[0].(map[string]*ConfigurationSet)[vs[1].(string)]
   405  	}).(ConfigurationSetOutput)
   406  }
   407  
   408  func init() {
   409  	pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationSetInput)(nil)).Elem(), &ConfigurationSet{})
   410  	pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationSetArrayInput)(nil)).Elem(), ConfigurationSetArray{})
   411  	pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationSetMapInput)(nil)).Elem(), ConfigurationSetMap{})
   412  	pulumi.RegisterOutputType(ConfigurationSetOutput{})
   413  	pulumi.RegisterOutputType(ConfigurationSetArrayOutput{})
   414  	pulumi.RegisterOutputType(ConfigurationSetMapOutput{})
   415  }