github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/elasticache/serverlessCache.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 elasticache
     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  // Provides an ElastiCache Serverless Cache resource which manages memcached or redis.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Memcached Serverless
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  // func main() {
    32  // pulumi.Run(func(ctx *pulumi.Context) error {
    33  // var splat0 []interface{}
    34  // for _, val0 := range testAwsSubnet {
    35  // splat0 = append(splat0, val0.Id)
    36  // }
    37  // _, err := elasticache.NewServerlessCache(ctx, "example", &elasticache.ServerlessCacheArgs{
    38  // Engine: pulumi.String("memcached"),
    39  // Name: pulumi.String("example"),
    40  // CacheUsageLimits: &elasticache.ServerlessCacheCacheUsageLimitsArgs{
    41  // DataStorage: &elasticache.ServerlessCacheCacheUsageLimitsDataStorageArgs{
    42  // Maximum: pulumi.Int(10),
    43  // Unit: pulumi.String("GB"),
    44  // },
    45  // EcpuPerSeconds: elasticache.ServerlessCacheCacheUsageLimitsEcpuPerSecondArray{
    46  // &elasticache.ServerlessCacheCacheUsageLimitsEcpuPerSecondArgs{
    47  // Maximum: pulumi.Int(5000),
    48  // },
    49  // },
    50  // },
    51  // Description: pulumi.String("Test Server"),
    52  // KmsKeyId: pulumi.Any(test.Arn),
    53  // MajorEngineVersion: pulumi.String("1.6"),
    54  // SecurityGroupIds: pulumi.StringArray{
    55  // testAwsSecurityGroup.Id,
    56  // },
    57  // SubnetIds: toPulumiArray(splat0),
    58  // })
    59  // if err != nil {
    60  // return err
    61  // }
    62  // return nil
    63  // })
    64  // }
    65  // func toPulumiArray(arr []) pulumi.Array {
    66  // var pulumiArr pulumi.Array
    67  // for _, v := range arr {
    68  // pulumiArr = append(pulumiArr, pulumi.(v))
    69  // }
    70  // return pulumiArr
    71  // }
    72  // ```
    73  // <!--End PulumiCodeChooser -->
    74  //
    75  // ### Redis Serverless
    76  //
    77  // <!--Start PulumiCodeChooser -->
    78  // ```go
    79  // package main
    80  //
    81  // import (
    82  //
    83  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
    84  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    85  //
    86  // )
    87  // func main() {
    88  // pulumi.Run(func(ctx *pulumi.Context) error {
    89  // var splat0 []interface{}
    90  // for _, val0 := range testAwsSubnet {
    91  // splat0 = append(splat0, val0.Id)
    92  // }
    93  // _, err := elasticache.NewServerlessCache(ctx, "example", &elasticache.ServerlessCacheArgs{
    94  // Engine: pulumi.String("redis"),
    95  // Name: pulumi.String("example"),
    96  // CacheUsageLimits: &elasticache.ServerlessCacheCacheUsageLimitsArgs{
    97  // DataStorage: &elasticache.ServerlessCacheCacheUsageLimitsDataStorageArgs{
    98  // Maximum: pulumi.Int(10),
    99  // Unit: pulumi.String("GB"),
   100  // },
   101  // EcpuPerSeconds: elasticache.ServerlessCacheCacheUsageLimitsEcpuPerSecondArray{
   102  // &elasticache.ServerlessCacheCacheUsageLimitsEcpuPerSecondArgs{
   103  // Maximum: pulumi.Int(5000),
   104  // },
   105  // },
   106  // },
   107  // DailySnapshotTime: pulumi.String("09:00"),
   108  // Description: pulumi.String("Test Server"),
   109  // KmsKeyId: pulumi.Any(test.Arn),
   110  // MajorEngineVersion: pulumi.String("7"),
   111  // SnapshotRetentionLimit: pulumi.Int(1),
   112  // SecurityGroupIds: pulumi.StringArray{
   113  // testAwsSecurityGroup.Id,
   114  // },
   115  // SubnetIds: toPulumiArray(splat0),
   116  // })
   117  // if err != nil {
   118  // return err
   119  // }
   120  // return nil
   121  // })
   122  // }
   123  // func toPulumiArray(arr []) pulumi.Array {
   124  // var pulumiArr pulumi.Array
   125  // for _, v := range arr {
   126  // pulumiArr = append(pulumiArr, pulumi.(v))
   127  // }
   128  // return pulumiArr
   129  // }
   130  // ```
   131  // <!--End PulumiCodeChooser -->
   132  //
   133  // ## Import
   134  //
   135  // Using `pulumi import`, import ElastiCache Serverless Cache using the `name`. For example:
   136  //
   137  // ```sh
   138  // $ pulumi import aws:elasticache/serverlessCache:ServerlessCache my_cluster my_cluster
   139  // ```
   140  type ServerlessCache struct {
   141  	pulumi.CustomResourceState
   142  
   143  	// The Amazon Resource Name (ARN) of the serverless cache.
   144  	Arn pulumi.StringOutput `pulumi:"arn"`
   145  	// Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See configuration below.
   146  	CacheUsageLimits ServerlessCacheCacheUsageLimitsPtrOutput `pulumi:"cacheUsageLimits"`
   147  	// Timestamp of when the serverless cache was created.
   148  	CreateTime pulumi.StringOutput `pulumi:"createTime"`
   149  	// The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
   150  	DailySnapshotTime pulumi.StringOutput `pulumi:"dailySnapshotTime"`
   151  	// User-provided description for the serverless cache. The default is NULL.
   152  	Description pulumi.StringOutput `pulumi:"description"`
   153  	// Represents the information required for client programs to connect to a cache node. See config below for details.
   154  	Endpoints ServerlessCacheEndpointArrayOutput `pulumi:"endpoints"`
   155  	// Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
   156  	Engine pulumi.StringOutput `pulumi:"engine"`
   157  	// The name and version number of the engine the serverless cache is compatible with.
   158  	FullEngineVersion pulumi.StringOutput `pulumi:"fullEngineVersion"`
   159  	// ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
   160  	KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"`
   161  	// The version of the cache engine that will be used to create the serverless cache.
   162  	// See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
   163  	MajorEngineVersion pulumi.StringOutput `pulumi:"majorEngineVersion"`
   164  	// The Cluster name which serves as a unique identifier to the serverless cache
   165  	//
   166  	// The following arguments are optional:
   167  	Name pulumi.StringOutput `pulumi:"name"`
   168  	// Represents the information required for client programs to connect to a cache node. See config below for details.
   169  	ReaderEndpoints ServerlessCacheReaderEndpointArrayOutput `pulumi:"readerEndpoints"`
   170  	// A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
   171  	SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
   172  	// The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
   173  	SnapshotArnsToRestores pulumi.StringArrayOutput `pulumi:"snapshotArnsToRestores"`
   174  	// The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
   175  	SnapshotRetentionLimit pulumi.IntOutput `pulumi:"snapshotRetentionLimit"`
   176  	// The current status of the serverless cache. The allowed values are CREATING, AVAILABLE, DELETING, CREATE-FAILED and MODIFYING.
   177  	Status pulumi.StringOutput `pulumi:"status"`
   178  	// A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
   179  	SubnetIds pulumi.StringArrayOutput `pulumi:"subnetIds"`
   180  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   181  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   182  	// Deprecated: Please use `tags` instead.
   183  	TagsAll  pulumi.StringMapOutput           `pulumi:"tagsAll"`
   184  	Timeouts ServerlessCacheTimeoutsPtrOutput `pulumi:"timeouts"`
   185  	// The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
   186  	UserGroupId pulumi.StringPtrOutput `pulumi:"userGroupId"`
   187  }
   188  
   189  // NewServerlessCache registers a new resource with the given unique name, arguments, and options.
   190  func NewServerlessCache(ctx *pulumi.Context,
   191  	name string, args *ServerlessCacheArgs, opts ...pulumi.ResourceOption) (*ServerlessCache, error) {
   192  	if args == nil {
   193  		return nil, errors.New("missing one or more required arguments")
   194  	}
   195  
   196  	if args.Engine == nil {
   197  		return nil, errors.New("invalid value for required argument 'Engine'")
   198  	}
   199  	opts = internal.PkgResourceDefaultOpts(opts)
   200  	var resource ServerlessCache
   201  	err := ctx.RegisterResource("aws:elasticache/serverlessCache:ServerlessCache", name, args, &resource, opts...)
   202  	if err != nil {
   203  		return nil, err
   204  	}
   205  	return &resource, nil
   206  }
   207  
   208  // GetServerlessCache gets an existing ServerlessCache resource's state with the given name, ID, and optional
   209  // state properties that are used to uniquely qualify the lookup (nil if not required).
   210  func GetServerlessCache(ctx *pulumi.Context,
   211  	name string, id pulumi.IDInput, state *ServerlessCacheState, opts ...pulumi.ResourceOption) (*ServerlessCache, error) {
   212  	var resource ServerlessCache
   213  	err := ctx.ReadResource("aws:elasticache/serverlessCache:ServerlessCache", name, id, state, &resource, opts...)
   214  	if err != nil {
   215  		return nil, err
   216  	}
   217  	return &resource, nil
   218  }
   219  
   220  // Input properties used for looking up and filtering ServerlessCache resources.
   221  type serverlessCacheState struct {
   222  	// The Amazon Resource Name (ARN) of the serverless cache.
   223  	Arn *string `pulumi:"arn"`
   224  	// Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See configuration below.
   225  	CacheUsageLimits *ServerlessCacheCacheUsageLimits `pulumi:"cacheUsageLimits"`
   226  	// Timestamp of when the serverless cache was created.
   227  	CreateTime *string `pulumi:"createTime"`
   228  	// The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
   229  	DailySnapshotTime *string `pulumi:"dailySnapshotTime"`
   230  	// User-provided description for the serverless cache. The default is NULL.
   231  	Description *string `pulumi:"description"`
   232  	// Represents the information required for client programs to connect to a cache node. See config below for details.
   233  	Endpoints []ServerlessCacheEndpoint `pulumi:"endpoints"`
   234  	// Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
   235  	Engine *string `pulumi:"engine"`
   236  	// The name and version number of the engine the serverless cache is compatible with.
   237  	FullEngineVersion *string `pulumi:"fullEngineVersion"`
   238  	// ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
   239  	KmsKeyId *string `pulumi:"kmsKeyId"`
   240  	// The version of the cache engine that will be used to create the serverless cache.
   241  	// See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
   242  	MajorEngineVersion *string `pulumi:"majorEngineVersion"`
   243  	// The Cluster name which serves as a unique identifier to the serverless cache
   244  	//
   245  	// The following arguments are optional:
   246  	Name *string `pulumi:"name"`
   247  	// Represents the information required for client programs to connect to a cache node. See config below for details.
   248  	ReaderEndpoints []ServerlessCacheReaderEndpoint `pulumi:"readerEndpoints"`
   249  	// A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
   250  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   251  	// The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
   252  	SnapshotArnsToRestores []string `pulumi:"snapshotArnsToRestores"`
   253  	// The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
   254  	SnapshotRetentionLimit *int `pulumi:"snapshotRetentionLimit"`
   255  	// The current status of the serverless cache. The allowed values are CREATING, AVAILABLE, DELETING, CREATE-FAILED and MODIFYING.
   256  	Status *string `pulumi:"status"`
   257  	// A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
   258  	SubnetIds []string `pulumi:"subnetIds"`
   259  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   260  	Tags map[string]string `pulumi:"tags"`
   261  	// Deprecated: Please use `tags` instead.
   262  	TagsAll  map[string]string        `pulumi:"tagsAll"`
   263  	Timeouts *ServerlessCacheTimeouts `pulumi:"timeouts"`
   264  	// The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
   265  	UserGroupId *string `pulumi:"userGroupId"`
   266  }
   267  
   268  type ServerlessCacheState struct {
   269  	// The Amazon Resource Name (ARN) of the serverless cache.
   270  	Arn pulumi.StringPtrInput
   271  	// Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See configuration below.
   272  	CacheUsageLimits ServerlessCacheCacheUsageLimitsPtrInput
   273  	// Timestamp of when the serverless cache was created.
   274  	CreateTime pulumi.StringPtrInput
   275  	// The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
   276  	DailySnapshotTime pulumi.StringPtrInput
   277  	// User-provided description for the serverless cache. The default is NULL.
   278  	Description pulumi.StringPtrInput
   279  	// Represents the information required for client programs to connect to a cache node. See config below for details.
   280  	Endpoints ServerlessCacheEndpointArrayInput
   281  	// Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
   282  	Engine pulumi.StringPtrInput
   283  	// The name and version number of the engine the serverless cache is compatible with.
   284  	FullEngineVersion pulumi.StringPtrInput
   285  	// ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
   286  	KmsKeyId pulumi.StringPtrInput
   287  	// The version of the cache engine that will be used to create the serverless cache.
   288  	// See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
   289  	MajorEngineVersion pulumi.StringPtrInput
   290  	// The Cluster name which serves as a unique identifier to the serverless cache
   291  	//
   292  	// The following arguments are optional:
   293  	Name pulumi.StringPtrInput
   294  	// Represents the information required for client programs to connect to a cache node. See config below for details.
   295  	ReaderEndpoints ServerlessCacheReaderEndpointArrayInput
   296  	// A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
   297  	SecurityGroupIds pulumi.StringArrayInput
   298  	// The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
   299  	SnapshotArnsToRestores pulumi.StringArrayInput
   300  	// The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
   301  	SnapshotRetentionLimit pulumi.IntPtrInput
   302  	// The current status of the serverless cache. The allowed values are CREATING, AVAILABLE, DELETING, CREATE-FAILED and MODIFYING.
   303  	Status pulumi.StringPtrInput
   304  	// A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
   305  	SubnetIds pulumi.StringArrayInput
   306  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   307  	Tags pulumi.StringMapInput
   308  	// Deprecated: Please use `tags` instead.
   309  	TagsAll  pulumi.StringMapInput
   310  	Timeouts ServerlessCacheTimeoutsPtrInput
   311  	// The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
   312  	UserGroupId pulumi.StringPtrInput
   313  }
   314  
   315  func (ServerlessCacheState) ElementType() reflect.Type {
   316  	return reflect.TypeOf((*serverlessCacheState)(nil)).Elem()
   317  }
   318  
   319  type serverlessCacheArgs struct {
   320  	// Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See configuration below.
   321  	CacheUsageLimits *ServerlessCacheCacheUsageLimits `pulumi:"cacheUsageLimits"`
   322  	// The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
   323  	DailySnapshotTime *string `pulumi:"dailySnapshotTime"`
   324  	// User-provided description for the serverless cache. The default is NULL.
   325  	Description *string `pulumi:"description"`
   326  	// Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
   327  	Engine string `pulumi:"engine"`
   328  	// ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
   329  	KmsKeyId *string `pulumi:"kmsKeyId"`
   330  	// The version of the cache engine that will be used to create the serverless cache.
   331  	// See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
   332  	MajorEngineVersion *string `pulumi:"majorEngineVersion"`
   333  	// The Cluster name which serves as a unique identifier to the serverless cache
   334  	//
   335  	// The following arguments are optional:
   336  	Name *string `pulumi:"name"`
   337  	// A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
   338  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   339  	// The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
   340  	SnapshotArnsToRestores []string `pulumi:"snapshotArnsToRestores"`
   341  	// The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
   342  	SnapshotRetentionLimit *int `pulumi:"snapshotRetentionLimit"`
   343  	// A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
   344  	SubnetIds []string `pulumi:"subnetIds"`
   345  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   346  	Tags     map[string]string        `pulumi:"tags"`
   347  	Timeouts *ServerlessCacheTimeouts `pulumi:"timeouts"`
   348  	// The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
   349  	UserGroupId *string `pulumi:"userGroupId"`
   350  }
   351  
   352  // The set of arguments for constructing a ServerlessCache resource.
   353  type ServerlessCacheArgs struct {
   354  	// Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See configuration below.
   355  	CacheUsageLimits ServerlessCacheCacheUsageLimitsPtrInput
   356  	// The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
   357  	DailySnapshotTime pulumi.StringPtrInput
   358  	// User-provided description for the serverless cache. The default is NULL.
   359  	Description pulumi.StringPtrInput
   360  	// Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
   361  	Engine pulumi.StringInput
   362  	// ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
   363  	KmsKeyId pulumi.StringPtrInput
   364  	// The version of the cache engine that will be used to create the serverless cache.
   365  	// See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
   366  	MajorEngineVersion pulumi.StringPtrInput
   367  	// The Cluster name which serves as a unique identifier to the serverless cache
   368  	//
   369  	// The following arguments are optional:
   370  	Name pulumi.StringPtrInput
   371  	// A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
   372  	SecurityGroupIds pulumi.StringArrayInput
   373  	// The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
   374  	SnapshotArnsToRestores pulumi.StringArrayInput
   375  	// The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
   376  	SnapshotRetentionLimit pulumi.IntPtrInput
   377  	// A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
   378  	SubnetIds pulumi.StringArrayInput
   379  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   380  	Tags     pulumi.StringMapInput
   381  	Timeouts ServerlessCacheTimeoutsPtrInput
   382  	// The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
   383  	UserGroupId pulumi.StringPtrInput
   384  }
   385  
   386  func (ServerlessCacheArgs) ElementType() reflect.Type {
   387  	return reflect.TypeOf((*serverlessCacheArgs)(nil)).Elem()
   388  }
   389  
   390  type ServerlessCacheInput interface {
   391  	pulumi.Input
   392  
   393  	ToServerlessCacheOutput() ServerlessCacheOutput
   394  	ToServerlessCacheOutputWithContext(ctx context.Context) ServerlessCacheOutput
   395  }
   396  
   397  func (*ServerlessCache) ElementType() reflect.Type {
   398  	return reflect.TypeOf((**ServerlessCache)(nil)).Elem()
   399  }
   400  
   401  func (i *ServerlessCache) ToServerlessCacheOutput() ServerlessCacheOutput {
   402  	return i.ToServerlessCacheOutputWithContext(context.Background())
   403  }
   404  
   405  func (i *ServerlessCache) ToServerlessCacheOutputWithContext(ctx context.Context) ServerlessCacheOutput {
   406  	return pulumi.ToOutputWithContext(ctx, i).(ServerlessCacheOutput)
   407  }
   408  
   409  // ServerlessCacheArrayInput is an input type that accepts ServerlessCacheArray and ServerlessCacheArrayOutput values.
   410  // You can construct a concrete instance of `ServerlessCacheArrayInput` via:
   411  //
   412  //	ServerlessCacheArray{ ServerlessCacheArgs{...} }
   413  type ServerlessCacheArrayInput interface {
   414  	pulumi.Input
   415  
   416  	ToServerlessCacheArrayOutput() ServerlessCacheArrayOutput
   417  	ToServerlessCacheArrayOutputWithContext(context.Context) ServerlessCacheArrayOutput
   418  }
   419  
   420  type ServerlessCacheArray []ServerlessCacheInput
   421  
   422  func (ServerlessCacheArray) ElementType() reflect.Type {
   423  	return reflect.TypeOf((*[]*ServerlessCache)(nil)).Elem()
   424  }
   425  
   426  func (i ServerlessCacheArray) ToServerlessCacheArrayOutput() ServerlessCacheArrayOutput {
   427  	return i.ToServerlessCacheArrayOutputWithContext(context.Background())
   428  }
   429  
   430  func (i ServerlessCacheArray) ToServerlessCacheArrayOutputWithContext(ctx context.Context) ServerlessCacheArrayOutput {
   431  	return pulumi.ToOutputWithContext(ctx, i).(ServerlessCacheArrayOutput)
   432  }
   433  
   434  // ServerlessCacheMapInput is an input type that accepts ServerlessCacheMap and ServerlessCacheMapOutput values.
   435  // You can construct a concrete instance of `ServerlessCacheMapInput` via:
   436  //
   437  //	ServerlessCacheMap{ "key": ServerlessCacheArgs{...} }
   438  type ServerlessCacheMapInput interface {
   439  	pulumi.Input
   440  
   441  	ToServerlessCacheMapOutput() ServerlessCacheMapOutput
   442  	ToServerlessCacheMapOutputWithContext(context.Context) ServerlessCacheMapOutput
   443  }
   444  
   445  type ServerlessCacheMap map[string]ServerlessCacheInput
   446  
   447  func (ServerlessCacheMap) ElementType() reflect.Type {
   448  	return reflect.TypeOf((*map[string]*ServerlessCache)(nil)).Elem()
   449  }
   450  
   451  func (i ServerlessCacheMap) ToServerlessCacheMapOutput() ServerlessCacheMapOutput {
   452  	return i.ToServerlessCacheMapOutputWithContext(context.Background())
   453  }
   454  
   455  func (i ServerlessCacheMap) ToServerlessCacheMapOutputWithContext(ctx context.Context) ServerlessCacheMapOutput {
   456  	return pulumi.ToOutputWithContext(ctx, i).(ServerlessCacheMapOutput)
   457  }
   458  
   459  type ServerlessCacheOutput struct{ *pulumi.OutputState }
   460  
   461  func (ServerlessCacheOutput) ElementType() reflect.Type {
   462  	return reflect.TypeOf((**ServerlessCache)(nil)).Elem()
   463  }
   464  
   465  func (o ServerlessCacheOutput) ToServerlessCacheOutput() ServerlessCacheOutput {
   466  	return o
   467  }
   468  
   469  func (o ServerlessCacheOutput) ToServerlessCacheOutputWithContext(ctx context.Context) ServerlessCacheOutput {
   470  	return o
   471  }
   472  
   473  // The Amazon Resource Name (ARN) of the serverless cache.
   474  func (o ServerlessCacheOutput) Arn() pulumi.StringOutput {
   475  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   476  }
   477  
   478  // Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See configuration below.
   479  func (o ServerlessCacheOutput) CacheUsageLimits() ServerlessCacheCacheUsageLimitsPtrOutput {
   480  	return o.ApplyT(func(v *ServerlessCache) ServerlessCacheCacheUsageLimitsPtrOutput { return v.CacheUsageLimits }).(ServerlessCacheCacheUsageLimitsPtrOutput)
   481  }
   482  
   483  // Timestamp of when the serverless cache was created.
   484  func (o ServerlessCacheOutput) CreateTime() pulumi.StringOutput {
   485  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
   486  }
   487  
   488  // The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
   489  func (o ServerlessCacheOutput) DailySnapshotTime() pulumi.StringOutput {
   490  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringOutput { return v.DailySnapshotTime }).(pulumi.StringOutput)
   491  }
   492  
   493  // User-provided description for the serverless cache. The default is NULL.
   494  func (o ServerlessCacheOutput) Description() pulumi.StringOutput {
   495  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
   496  }
   497  
   498  // Represents the information required for client programs to connect to a cache node. See config below for details.
   499  func (o ServerlessCacheOutput) Endpoints() ServerlessCacheEndpointArrayOutput {
   500  	return o.ApplyT(func(v *ServerlessCache) ServerlessCacheEndpointArrayOutput { return v.Endpoints }).(ServerlessCacheEndpointArrayOutput)
   501  }
   502  
   503  // Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
   504  func (o ServerlessCacheOutput) Engine() pulumi.StringOutput {
   505  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringOutput { return v.Engine }).(pulumi.StringOutput)
   506  }
   507  
   508  // The name and version number of the engine the serverless cache is compatible with.
   509  func (o ServerlessCacheOutput) FullEngineVersion() pulumi.StringOutput {
   510  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringOutput { return v.FullEngineVersion }).(pulumi.StringOutput)
   511  }
   512  
   513  // ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
   514  func (o ServerlessCacheOutput) KmsKeyId() pulumi.StringPtrOutput {
   515  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringPtrOutput { return v.KmsKeyId }).(pulumi.StringPtrOutput)
   516  }
   517  
   518  // The version of the cache engine that will be used to create the serverless cache.
   519  // See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
   520  func (o ServerlessCacheOutput) MajorEngineVersion() pulumi.StringOutput {
   521  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringOutput { return v.MajorEngineVersion }).(pulumi.StringOutput)
   522  }
   523  
   524  // The Cluster name which serves as a unique identifier to the serverless cache
   525  //
   526  // The following arguments are optional:
   527  func (o ServerlessCacheOutput) Name() pulumi.StringOutput {
   528  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   529  }
   530  
   531  // Represents the information required for client programs to connect to a cache node. See config below for details.
   532  func (o ServerlessCacheOutput) ReaderEndpoints() ServerlessCacheReaderEndpointArrayOutput {
   533  	return o.ApplyT(func(v *ServerlessCache) ServerlessCacheReaderEndpointArrayOutput { return v.ReaderEndpoints }).(ServerlessCacheReaderEndpointArrayOutput)
   534  }
   535  
   536  // A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
   537  func (o ServerlessCacheOutput) SecurityGroupIds() pulumi.StringArrayOutput {
   538  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
   539  }
   540  
   541  // The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
   542  func (o ServerlessCacheOutput) SnapshotArnsToRestores() pulumi.StringArrayOutput {
   543  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringArrayOutput { return v.SnapshotArnsToRestores }).(pulumi.StringArrayOutput)
   544  }
   545  
   546  // The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
   547  func (o ServerlessCacheOutput) SnapshotRetentionLimit() pulumi.IntOutput {
   548  	return o.ApplyT(func(v *ServerlessCache) pulumi.IntOutput { return v.SnapshotRetentionLimit }).(pulumi.IntOutput)
   549  }
   550  
   551  // The current status of the serverless cache. The allowed values are CREATING, AVAILABLE, DELETING, CREATE-FAILED and MODIFYING.
   552  func (o ServerlessCacheOutput) Status() pulumi.StringOutput {
   553  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   554  }
   555  
   556  // A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
   557  func (o ServerlessCacheOutput) SubnetIds() pulumi.StringArrayOutput {
   558  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringArrayOutput { return v.SubnetIds }).(pulumi.StringArrayOutput)
   559  }
   560  
   561  // Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   562  func (o ServerlessCacheOutput) Tags() pulumi.StringMapOutput {
   563  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   564  }
   565  
   566  // Deprecated: Please use `tags` instead.
   567  func (o ServerlessCacheOutput) TagsAll() pulumi.StringMapOutput {
   568  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   569  }
   570  
   571  func (o ServerlessCacheOutput) Timeouts() ServerlessCacheTimeoutsPtrOutput {
   572  	return o.ApplyT(func(v *ServerlessCache) ServerlessCacheTimeoutsPtrOutput { return v.Timeouts }).(ServerlessCacheTimeoutsPtrOutput)
   573  }
   574  
   575  // The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
   576  func (o ServerlessCacheOutput) UserGroupId() pulumi.StringPtrOutput {
   577  	return o.ApplyT(func(v *ServerlessCache) pulumi.StringPtrOutput { return v.UserGroupId }).(pulumi.StringPtrOutput)
   578  }
   579  
   580  type ServerlessCacheArrayOutput struct{ *pulumi.OutputState }
   581  
   582  func (ServerlessCacheArrayOutput) ElementType() reflect.Type {
   583  	return reflect.TypeOf((*[]*ServerlessCache)(nil)).Elem()
   584  }
   585  
   586  func (o ServerlessCacheArrayOutput) ToServerlessCacheArrayOutput() ServerlessCacheArrayOutput {
   587  	return o
   588  }
   589  
   590  func (o ServerlessCacheArrayOutput) ToServerlessCacheArrayOutputWithContext(ctx context.Context) ServerlessCacheArrayOutput {
   591  	return o
   592  }
   593  
   594  func (o ServerlessCacheArrayOutput) Index(i pulumi.IntInput) ServerlessCacheOutput {
   595  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerlessCache {
   596  		return vs[0].([]*ServerlessCache)[vs[1].(int)]
   597  	}).(ServerlessCacheOutput)
   598  }
   599  
   600  type ServerlessCacheMapOutput struct{ *pulumi.OutputState }
   601  
   602  func (ServerlessCacheMapOutput) ElementType() reflect.Type {
   603  	return reflect.TypeOf((*map[string]*ServerlessCache)(nil)).Elem()
   604  }
   605  
   606  func (o ServerlessCacheMapOutput) ToServerlessCacheMapOutput() ServerlessCacheMapOutput {
   607  	return o
   608  }
   609  
   610  func (o ServerlessCacheMapOutput) ToServerlessCacheMapOutputWithContext(ctx context.Context) ServerlessCacheMapOutput {
   611  	return o
   612  }
   613  
   614  func (o ServerlessCacheMapOutput) MapIndex(k pulumi.StringInput) ServerlessCacheOutput {
   615  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerlessCache {
   616  		return vs[0].(map[string]*ServerlessCache)[vs[1].(string)]
   617  	}).(ServerlessCacheOutput)
   618  }
   619  
   620  func init() {
   621  	pulumi.RegisterInputType(reflect.TypeOf((*ServerlessCacheInput)(nil)).Elem(), &ServerlessCache{})
   622  	pulumi.RegisterInputType(reflect.TypeOf((*ServerlessCacheArrayInput)(nil)).Elem(), ServerlessCacheArray{})
   623  	pulumi.RegisterInputType(reflect.TypeOf((*ServerlessCacheMapInput)(nil)).Elem(), ServerlessCacheMap{})
   624  	pulumi.RegisterOutputType(ServerlessCacheOutput{})
   625  	pulumi.RegisterOutputType(ServerlessCacheArrayOutput{})
   626  	pulumi.RegisterOutputType(ServerlessCacheMapOutput{})
   627  }