github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sesv2/dedicatedIpPool.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) Dedicated IP Pool.
    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.NewDedicatedIpPool(ctx, "example", &sesv2.DedicatedIpPoolArgs{
    35  //				PoolName: pulumi.String("my-pool"),
    36  //			})
    37  //			if err != nil {
    38  //				return err
    39  //			}
    40  //			return nil
    41  //		})
    42  //	}
    43  //
    44  // ```
    45  // <!--End PulumiCodeChooser -->
    46  //
    47  // ### Managed Pool
    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.NewDedicatedIpPool(ctx, "example", &sesv2.DedicatedIpPoolArgs{
    63  //				PoolName:    pulumi.String("my-managed-pool"),
    64  //				ScalingMode: pulumi.String("MANAGED"),
    65  //			})
    66  //			if err != nil {
    67  //				return err
    68  //			}
    69  //			return nil
    70  //		})
    71  //	}
    72  //
    73  // ```
    74  // <!--End PulumiCodeChooser -->
    75  //
    76  // ## Import
    77  //
    78  // Using `pulumi import`, import SESv2 (Simple Email V2) Dedicated IP Pool using the `pool_name`. For example:
    79  //
    80  // ```sh
    81  // $ pulumi import aws:sesv2/dedicatedIpPool:DedicatedIpPool example my-pool
    82  // ```
    83  type DedicatedIpPool struct {
    84  	pulumi.CustomResourceState
    85  
    86  	// ARN of the Dedicated IP Pool.
    87  	Arn pulumi.StringOutput `pulumi:"arn"`
    88  	// Name of the dedicated IP pool.
    89  	//
    90  	// The following arguments are optional:
    91  	PoolName pulumi.StringOutput `pulumi:"poolName"`
    92  	// IP pool scaling mode. Valid values: `STANDARD`, `MANAGED`. If omitted, the AWS API will default to a standard pool.
    93  	ScalingMode pulumi.StringOutput `pulumi:"scalingMode"`
    94  	// A map of tags to assign to the pool. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    95  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    96  	// Deprecated: Please use `tags` instead.
    97  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    98  }
    99  
   100  // NewDedicatedIpPool registers a new resource with the given unique name, arguments, and options.
   101  func NewDedicatedIpPool(ctx *pulumi.Context,
   102  	name string, args *DedicatedIpPoolArgs, opts ...pulumi.ResourceOption) (*DedicatedIpPool, error) {
   103  	if args == nil {
   104  		return nil, errors.New("missing one or more required arguments")
   105  	}
   106  
   107  	if args.PoolName == nil {
   108  		return nil, errors.New("invalid value for required argument 'PoolName'")
   109  	}
   110  	opts = internal.PkgResourceDefaultOpts(opts)
   111  	var resource DedicatedIpPool
   112  	err := ctx.RegisterResource("aws:sesv2/dedicatedIpPool:DedicatedIpPool", name, args, &resource, opts...)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	return &resource, nil
   117  }
   118  
   119  // GetDedicatedIpPool gets an existing DedicatedIpPool resource's state with the given name, ID, and optional
   120  // state properties that are used to uniquely qualify the lookup (nil if not required).
   121  func GetDedicatedIpPool(ctx *pulumi.Context,
   122  	name string, id pulumi.IDInput, state *DedicatedIpPoolState, opts ...pulumi.ResourceOption) (*DedicatedIpPool, error) {
   123  	var resource DedicatedIpPool
   124  	err := ctx.ReadResource("aws:sesv2/dedicatedIpPool:DedicatedIpPool", name, id, state, &resource, opts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	return &resource, nil
   129  }
   130  
   131  // Input properties used for looking up and filtering DedicatedIpPool resources.
   132  type dedicatedIpPoolState struct {
   133  	// ARN of the Dedicated IP Pool.
   134  	Arn *string `pulumi:"arn"`
   135  	// Name of the dedicated IP pool.
   136  	//
   137  	// The following arguments are optional:
   138  	PoolName *string `pulumi:"poolName"`
   139  	// IP pool scaling mode. Valid values: `STANDARD`, `MANAGED`. If omitted, the AWS API will default to a standard pool.
   140  	ScalingMode *string `pulumi:"scalingMode"`
   141  	// A map of tags to assign to the pool. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   142  	Tags map[string]string `pulumi:"tags"`
   143  	// Deprecated: Please use `tags` instead.
   144  	TagsAll map[string]string `pulumi:"tagsAll"`
   145  }
   146  
   147  type DedicatedIpPoolState struct {
   148  	// ARN of the Dedicated IP Pool.
   149  	Arn pulumi.StringPtrInput
   150  	// Name of the dedicated IP pool.
   151  	//
   152  	// The following arguments are optional:
   153  	PoolName pulumi.StringPtrInput
   154  	// IP pool scaling mode. Valid values: `STANDARD`, `MANAGED`. If omitted, the AWS API will default to a standard pool.
   155  	ScalingMode pulumi.StringPtrInput
   156  	// A map of tags to assign to the pool. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   157  	Tags pulumi.StringMapInput
   158  	// Deprecated: Please use `tags` instead.
   159  	TagsAll pulumi.StringMapInput
   160  }
   161  
   162  func (DedicatedIpPoolState) ElementType() reflect.Type {
   163  	return reflect.TypeOf((*dedicatedIpPoolState)(nil)).Elem()
   164  }
   165  
   166  type dedicatedIpPoolArgs struct {
   167  	// Name of the dedicated IP pool.
   168  	//
   169  	// The following arguments are optional:
   170  	PoolName string `pulumi:"poolName"`
   171  	// IP pool scaling mode. Valid values: `STANDARD`, `MANAGED`. If omitted, the AWS API will default to a standard pool.
   172  	ScalingMode *string `pulumi:"scalingMode"`
   173  	// A map of tags to assign to the pool. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   174  	Tags map[string]string `pulumi:"tags"`
   175  }
   176  
   177  // The set of arguments for constructing a DedicatedIpPool resource.
   178  type DedicatedIpPoolArgs struct {
   179  	// Name of the dedicated IP pool.
   180  	//
   181  	// The following arguments are optional:
   182  	PoolName pulumi.StringInput
   183  	// IP pool scaling mode. Valid values: `STANDARD`, `MANAGED`. If omitted, the AWS API will default to a standard pool.
   184  	ScalingMode pulumi.StringPtrInput
   185  	// A map of tags to assign to the pool. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   186  	Tags pulumi.StringMapInput
   187  }
   188  
   189  func (DedicatedIpPoolArgs) ElementType() reflect.Type {
   190  	return reflect.TypeOf((*dedicatedIpPoolArgs)(nil)).Elem()
   191  }
   192  
   193  type DedicatedIpPoolInput interface {
   194  	pulumi.Input
   195  
   196  	ToDedicatedIpPoolOutput() DedicatedIpPoolOutput
   197  	ToDedicatedIpPoolOutputWithContext(ctx context.Context) DedicatedIpPoolOutput
   198  }
   199  
   200  func (*DedicatedIpPool) ElementType() reflect.Type {
   201  	return reflect.TypeOf((**DedicatedIpPool)(nil)).Elem()
   202  }
   203  
   204  func (i *DedicatedIpPool) ToDedicatedIpPoolOutput() DedicatedIpPoolOutput {
   205  	return i.ToDedicatedIpPoolOutputWithContext(context.Background())
   206  }
   207  
   208  func (i *DedicatedIpPool) ToDedicatedIpPoolOutputWithContext(ctx context.Context) DedicatedIpPoolOutput {
   209  	return pulumi.ToOutputWithContext(ctx, i).(DedicatedIpPoolOutput)
   210  }
   211  
   212  // DedicatedIpPoolArrayInput is an input type that accepts DedicatedIpPoolArray and DedicatedIpPoolArrayOutput values.
   213  // You can construct a concrete instance of `DedicatedIpPoolArrayInput` via:
   214  //
   215  //	DedicatedIpPoolArray{ DedicatedIpPoolArgs{...} }
   216  type DedicatedIpPoolArrayInput interface {
   217  	pulumi.Input
   218  
   219  	ToDedicatedIpPoolArrayOutput() DedicatedIpPoolArrayOutput
   220  	ToDedicatedIpPoolArrayOutputWithContext(context.Context) DedicatedIpPoolArrayOutput
   221  }
   222  
   223  type DedicatedIpPoolArray []DedicatedIpPoolInput
   224  
   225  func (DedicatedIpPoolArray) ElementType() reflect.Type {
   226  	return reflect.TypeOf((*[]*DedicatedIpPool)(nil)).Elem()
   227  }
   228  
   229  func (i DedicatedIpPoolArray) ToDedicatedIpPoolArrayOutput() DedicatedIpPoolArrayOutput {
   230  	return i.ToDedicatedIpPoolArrayOutputWithContext(context.Background())
   231  }
   232  
   233  func (i DedicatedIpPoolArray) ToDedicatedIpPoolArrayOutputWithContext(ctx context.Context) DedicatedIpPoolArrayOutput {
   234  	return pulumi.ToOutputWithContext(ctx, i).(DedicatedIpPoolArrayOutput)
   235  }
   236  
   237  // DedicatedIpPoolMapInput is an input type that accepts DedicatedIpPoolMap and DedicatedIpPoolMapOutput values.
   238  // You can construct a concrete instance of `DedicatedIpPoolMapInput` via:
   239  //
   240  //	DedicatedIpPoolMap{ "key": DedicatedIpPoolArgs{...} }
   241  type DedicatedIpPoolMapInput interface {
   242  	pulumi.Input
   243  
   244  	ToDedicatedIpPoolMapOutput() DedicatedIpPoolMapOutput
   245  	ToDedicatedIpPoolMapOutputWithContext(context.Context) DedicatedIpPoolMapOutput
   246  }
   247  
   248  type DedicatedIpPoolMap map[string]DedicatedIpPoolInput
   249  
   250  func (DedicatedIpPoolMap) ElementType() reflect.Type {
   251  	return reflect.TypeOf((*map[string]*DedicatedIpPool)(nil)).Elem()
   252  }
   253  
   254  func (i DedicatedIpPoolMap) ToDedicatedIpPoolMapOutput() DedicatedIpPoolMapOutput {
   255  	return i.ToDedicatedIpPoolMapOutputWithContext(context.Background())
   256  }
   257  
   258  func (i DedicatedIpPoolMap) ToDedicatedIpPoolMapOutputWithContext(ctx context.Context) DedicatedIpPoolMapOutput {
   259  	return pulumi.ToOutputWithContext(ctx, i).(DedicatedIpPoolMapOutput)
   260  }
   261  
   262  type DedicatedIpPoolOutput struct{ *pulumi.OutputState }
   263  
   264  func (DedicatedIpPoolOutput) ElementType() reflect.Type {
   265  	return reflect.TypeOf((**DedicatedIpPool)(nil)).Elem()
   266  }
   267  
   268  func (o DedicatedIpPoolOutput) ToDedicatedIpPoolOutput() DedicatedIpPoolOutput {
   269  	return o
   270  }
   271  
   272  func (o DedicatedIpPoolOutput) ToDedicatedIpPoolOutputWithContext(ctx context.Context) DedicatedIpPoolOutput {
   273  	return o
   274  }
   275  
   276  // ARN of the Dedicated IP Pool.
   277  func (o DedicatedIpPoolOutput) Arn() pulumi.StringOutput {
   278  	return o.ApplyT(func(v *DedicatedIpPool) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   279  }
   280  
   281  // Name of the dedicated IP pool.
   282  //
   283  // The following arguments are optional:
   284  func (o DedicatedIpPoolOutput) PoolName() pulumi.StringOutput {
   285  	return o.ApplyT(func(v *DedicatedIpPool) pulumi.StringOutput { return v.PoolName }).(pulumi.StringOutput)
   286  }
   287  
   288  // IP pool scaling mode. Valid values: `STANDARD`, `MANAGED`. If omitted, the AWS API will default to a standard pool.
   289  func (o DedicatedIpPoolOutput) ScalingMode() pulumi.StringOutput {
   290  	return o.ApplyT(func(v *DedicatedIpPool) pulumi.StringOutput { return v.ScalingMode }).(pulumi.StringOutput)
   291  }
   292  
   293  // A map of tags to assign to the pool. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   294  func (o DedicatedIpPoolOutput) Tags() pulumi.StringMapOutput {
   295  	return o.ApplyT(func(v *DedicatedIpPool) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   296  }
   297  
   298  // Deprecated: Please use `tags` instead.
   299  func (o DedicatedIpPoolOutput) TagsAll() pulumi.StringMapOutput {
   300  	return o.ApplyT(func(v *DedicatedIpPool) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   301  }
   302  
   303  type DedicatedIpPoolArrayOutput struct{ *pulumi.OutputState }
   304  
   305  func (DedicatedIpPoolArrayOutput) ElementType() reflect.Type {
   306  	return reflect.TypeOf((*[]*DedicatedIpPool)(nil)).Elem()
   307  }
   308  
   309  func (o DedicatedIpPoolArrayOutput) ToDedicatedIpPoolArrayOutput() DedicatedIpPoolArrayOutput {
   310  	return o
   311  }
   312  
   313  func (o DedicatedIpPoolArrayOutput) ToDedicatedIpPoolArrayOutputWithContext(ctx context.Context) DedicatedIpPoolArrayOutput {
   314  	return o
   315  }
   316  
   317  func (o DedicatedIpPoolArrayOutput) Index(i pulumi.IntInput) DedicatedIpPoolOutput {
   318  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DedicatedIpPool {
   319  		return vs[0].([]*DedicatedIpPool)[vs[1].(int)]
   320  	}).(DedicatedIpPoolOutput)
   321  }
   322  
   323  type DedicatedIpPoolMapOutput struct{ *pulumi.OutputState }
   324  
   325  func (DedicatedIpPoolMapOutput) ElementType() reflect.Type {
   326  	return reflect.TypeOf((*map[string]*DedicatedIpPool)(nil)).Elem()
   327  }
   328  
   329  func (o DedicatedIpPoolMapOutput) ToDedicatedIpPoolMapOutput() DedicatedIpPoolMapOutput {
   330  	return o
   331  }
   332  
   333  func (o DedicatedIpPoolMapOutput) ToDedicatedIpPoolMapOutputWithContext(ctx context.Context) DedicatedIpPoolMapOutput {
   334  	return o
   335  }
   336  
   337  func (o DedicatedIpPoolMapOutput) MapIndex(k pulumi.StringInput) DedicatedIpPoolOutput {
   338  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DedicatedIpPool {
   339  		return vs[0].(map[string]*DedicatedIpPool)[vs[1].(string)]
   340  	}).(DedicatedIpPoolOutput)
   341  }
   342  
   343  func init() {
   344  	pulumi.RegisterInputType(reflect.TypeOf((*DedicatedIpPoolInput)(nil)).Elem(), &DedicatedIpPool{})
   345  	pulumi.RegisterInputType(reflect.TypeOf((*DedicatedIpPoolArrayInput)(nil)).Elem(), DedicatedIpPoolArray{})
   346  	pulumi.RegisterInputType(reflect.TypeOf((*DedicatedIpPoolMapInput)(nil)).Elem(), DedicatedIpPoolMap{})
   347  	pulumi.RegisterOutputType(DedicatedIpPoolOutput{})
   348  	pulumi.RegisterOutputType(DedicatedIpPoolArrayOutput{})
   349  	pulumi.RegisterOutputType(DedicatedIpPoolMapOutput{})
   350  }