github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/memorydb/cluster.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 memorydb
     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 a MemoryDB Cluster.
    16  //
    17  // More information about MemoryDB can be found in the [Developer Guide](https://docs.aws.amazon.com/memorydb/latest/devguide/what-is-memorydb-for-redis.html).
    18  //
    19  // ## Example Usage
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/memorydb"
    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 := memorydb.NewCluster(ctx, "example", &memorydb.ClusterArgs{
    35  //				AclName:   pulumi.String("open-access"),
    36  //				Name:      pulumi.String("my-cluster"),
    37  //				NodeType:  pulumi.String("db.t4g.small"),
    38  //				NumShards: pulumi.Int(2),
    39  //				SecurityGroupIds: pulumi.StringArray{
    40  //					exampleAwsSecurityGroup.Id,
    41  //				},
    42  //				SnapshotRetentionLimit: pulumi.Int(7),
    43  //				SubnetGroupName:        pulumi.Any(exampleAwsMemorydbSubnetGroup.Id),
    44  //			})
    45  //			if err != nil {
    46  //				return err
    47  //			}
    48  //			return nil
    49  //		})
    50  //	}
    51  //
    52  // ```
    53  // <!--End PulumiCodeChooser -->
    54  //
    55  // ## Import
    56  //
    57  // Using `pulumi import`, import a cluster using the `name`. For example:
    58  //
    59  // ```sh
    60  // $ pulumi import aws:memorydb/cluster:Cluster example my-cluster
    61  // ```
    62  type Cluster struct {
    63  	pulumi.CustomResourceState
    64  
    65  	// The name of the Access Control List to associate with the cluster.
    66  	AclName pulumi.StringOutput `pulumi:"aclName"`
    67  	// The ARN of the cluster.
    68  	Arn pulumi.StringOutput `pulumi:"arn"`
    69  	// When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`.
    70  	AutoMinorVersionUpgrade pulumi.BoolPtrOutput              `pulumi:"autoMinorVersionUpgrade"`
    71  	ClusterEndpoints        ClusterClusterEndpointArrayOutput `pulumi:"clusterEndpoints"`
    72  	// Enables data tiering. This option is not supported by all instance types. For more information, see [Data tiering](https://docs.aws.amazon.com/memorydb/latest/devguide/data-tiering.html).
    73  	DataTiering pulumi.BoolPtrOutput `pulumi:"dataTiering"`
    74  	// Description for the cluster.
    75  	Description pulumi.StringPtrOutput `pulumi:"description"`
    76  	// Patch version number of the Redis engine used by the cluster.
    77  	EnginePatchVersion pulumi.StringOutput `pulumi:"enginePatchVersion"`
    78  	// Version number of the Redis engine to be used for the cluster. Downgrades are not supported.
    79  	EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
    80  	// Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
    81  	FinalSnapshotName pulumi.StringPtrOutput `pulumi:"finalSnapshotName"`
    82  	// ARN of the KMS key used to encrypt the cluster at rest.
    83  	KmsKeyArn pulumi.StringPtrOutput `pulumi:"kmsKeyArn"`
    84  	// Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`.
    85  	MaintenanceWindow pulumi.StringOutput `pulumi:"maintenanceWindow"`
    86  	// Name of the cluster. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`.
    87  	Name pulumi.StringOutput `pulumi:"name"`
    88  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
    89  	NamePrefix pulumi.StringOutput `pulumi:"namePrefix"`
    90  	// The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html).
    91  	//
    92  	// The following arguments are optional:
    93  	NodeType pulumi.StringOutput `pulumi:"nodeType"`
    94  	// The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard).
    95  	NumReplicasPerShard pulumi.IntPtrOutput `pulumi:"numReplicasPerShard"`
    96  	// The number of shards in the cluster. Defaults to `1`.
    97  	NumShards pulumi.IntPtrOutput `pulumi:"numShards"`
    98  	// The name of the parameter group associated with the cluster.
    99  	ParameterGroupName pulumi.StringOutput `pulumi:"parameterGroupName"`
   100  	// The port number on which each of the nodes accepts connections. Defaults to `6379`.
   101  	Port pulumi.IntOutput `pulumi:"port"`
   102  	// Set of VPC Security Group ID-s to associate with this cluster.
   103  	SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
   104  	// Set of shards in this cluster.
   105  	Shards ClusterShardArrayOutput `pulumi:"shards"`
   106  	// List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas.
   107  	SnapshotArns pulumi.StringArrayOutput `pulumi:"snapshotArns"`
   108  	// The name of a snapshot from which to restore data into the new cluster.
   109  	SnapshotName pulumi.StringPtrOutput `pulumi:"snapshotName"`
   110  	// The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`.
   111  	SnapshotRetentionLimit pulumi.IntOutput `pulumi:"snapshotRetentionLimit"`
   112  	// The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`.
   113  	SnapshotWindow pulumi.StringOutput `pulumi:"snapshotWindow"`
   114  	// ARN of the SNS topic to which cluster notifications are sent.
   115  	SnsTopicArn pulumi.StringPtrOutput `pulumi:"snsTopicArn"`
   116  	// The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets.
   117  	SubnetGroupName pulumi.StringOutput `pulumi:"subnetGroupName"`
   118  	// A 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.
   119  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   120  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   121  	//
   122  	// Deprecated: Please use `tags` instead.
   123  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   124  	// A flag to enable in-transit encryption on the cluster. When set to `false`, the `aclName` must be `open-access`. Defaults to `true`.
   125  	TlsEnabled pulumi.BoolPtrOutput `pulumi:"tlsEnabled"`
   126  }
   127  
   128  // NewCluster registers a new resource with the given unique name, arguments, and options.
   129  func NewCluster(ctx *pulumi.Context,
   130  	name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, error) {
   131  	if args == nil {
   132  		return nil, errors.New("missing one or more required arguments")
   133  	}
   134  
   135  	if args.AclName == nil {
   136  		return nil, errors.New("invalid value for required argument 'AclName'")
   137  	}
   138  	if args.NodeType == nil {
   139  		return nil, errors.New("invalid value for required argument 'NodeType'")
   140  	}
   141  	opts = internal.PkgResourceDefaultOpts(opts)
   142  	var resource Cluster
   143  	err := ctx.RegisterResource("aws:memorydb/cluster:Cluster", name, args, &resource, opts...)
   144  	if err != nil {
   145  		return nil, err
   146  	}
   147  	return &resource, nil
   148  }
   149  
   150  // GetCluster gets an existing Cluster resource's state with the given name, ID, and optional
   151  // state properties that are used to uniquely qualify the lookup (nil if not required).
   152  func GetCluster(ctx *pulumi.Context,
   153  	name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error) {
   154  	var resource Cluster
   155  	err := ctx.ReadResource("aws:memorydb/cluster:Cluster", name, id, state, &resource, opts...)
   156  	if err != nil {
   157  		return nil, err
   158  	}
   159  	return &resource, nil
   160  }
   161  
   162  // Input properties used for looking up and filtering Cluster resources.
   163  type clusterState struct {
   164  	// The name of the Access Control List to associate with the cluster.
   165  	AclName *string `pulumi:"aclName"`
   166  	// The ARN of the cluster.
   167  	Arn *string `pulumi:"arn"`
   168  	// When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`.
   169  	AutoMinorVersionUpgrade *bool                    `pulumi:"autoMinorVersionUpgrade"`
   170  	ClusterEndpoints        []ClusterClusterEndpoint `pulumi:"clusterEndpoints"`
   171  	// Enables data tiering. This option is not supported by all instance types. For more information, see [Data tiering](https://docs.aws.amazon.com/memorydb/latest/devguide/data-tiering.html).
   172  	DataTiering *bool `pulumi:"dataTiering"`
   173  	// Description for the cluster.
   174  	Description *string `pulumi:"description"`
   175  	// Patch version number of the Redis engine used by the cluster.
   176  	EnginePatchVersion *string `pulumi:"enginePatchVersion"`
   177  	// Version number of the Redis engine to be used for the cluster. Downgrades are not supported.
   178  	EngineVersion *string `pulumi:"engineVersion"`
   179  	// Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
   180  	FinalSnapshotName *string `pulumi:"finalSnapshotName"`
   181  	// ARN of the KMS key used to encrypt the cluster at rest.
   182  	KmsKeyArn *string `pulumi:"kmsKeyArn"`
   183  	// Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`.
   184  	MaintenanceWindow *string `pulumi:"maintenanceWindow"`
   185  	// Name of the cluster. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`.
   186  	Name *string `pulumi:"name"`
   187  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   188  	NamePrefix *string `pulumi:"namePrefix"`
   189  	// The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html).
   190  	//
   191  	// The following arguments are optional:
   192  	NodeType *string `pulumi:"nodeType"`
   193  	// The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard).
   194  	NumReplicasPerShard *int `pulumi:"numReplicasPerShard"`
   195  	// The number of shards in the cluster. Defaults to `1`.
   196  	NumShards *int `pulumi:"numShards"`
   197  	// The name of the parameter group associated with the cluster.
   198  	ParameterGroupName *string `pulumi:"parameterGroupName"`
   199  	// The port number on which each of the nodes accepts connections. Defaults to `6379`.
   200  	Port *int `pulumi:"port"`
   201  	// Set of VPC Security Group ID-s to associate with this cluster.
   202  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   203  	// Set of shards in this cluster.
   204  	Shards []ClusterShard `pulumi:"shards"`
   205  	// List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas.
   206  	SnapshotArns []string `pulumi:"snapshotArns"`
   207  	// The name of a snapshot from which to restore data into the new cluster.
   208  	SnapshotName *string `pulumi:"snapshotName"`
   209  	// The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`.
   210  	SnapshotRetentionLimit *int `pulumi:"snapshotRetentionLimit"`
   211  	// The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`.
   212  	SnapshotWindow *string `pulumi:"snapshotWindow"`
   213  	// ARN of the SNS topic to which cluster notifications are sent.
   214  	SnsTopicArn *string `pulumi:"snsTopicArn"`
   215  	// The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets.
   216  	SubnetGroupName *string `pulumi:"subnetGroupName"`
   217  	// A 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.
   218  	Tags map[string]string `pulumi:"tags"`
   219  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   220  	//
   221  	// Deprecated: Please use `tags` instead.
   222  	TagsAll map[string]string `pulumi:"tagsAll"`
   223  	// A flag to enable in-transit encryption on the cluster. When set to `false`, the `aclName` must be `open-access`. Defaults to `true`.
   224  	TlsEnabled *bool `pulumi:"tlsEnabled"`
   225  }
   226  
   227  type ClusterState struct {
   228  	// The name of the Access Control List to associate with the cluster.
   229  	AclName pulumi.StringPtrInput
   230  	// The ARN of the cluster.
   231  	Arn pulumi.StringPtrInput
   232  	// When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`.
   233  	AutoMinorVersionUpgrade pulumi.BoolPtrInput
   234  	ClusterEndpoints        ClusterClusterEndpointArrayInput
   235  	// Enables data tiering. This option is not supported by all instance types. For more information, see [Data tiering](https://docs.aws.amazon.com/memorydb/latest/devguide/data-tiering.html).
   236  	DataTiering pulumi.BoolPtrInput
   237  	// Description for the cluster.
   238  	Description pulumi.StringPtrInput
   239  	// Patch version number of the Redis engine used by the cluster.
   240  	EnginePatchVersion pulumi.StringPtrInput
   241  	// Version number of the Redis engine to be used for the cluster. Downgrades are not supported.
   242  	EngineVersion pulumi.StringPtrInput
   243  	// Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
   244  	FinalSnapshotName pulumi.StringPtrInput
   245  	// ARN of the KMS key used to encrypt the cluster at rest.
   246  	KmsKeyArn pulumi.StringPtrInput
   247  	// Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`.
   248  	MaintenanceWindow pulumi.StringPtrInput
   249  	// Name of the cluster. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`.
   250  	Name pulumi.StringPtrInput
   251  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   252  	NamePrefix pulumi.StringPtrInput
   253  	// The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html).
   254  	//
   255  	// The following arguments are optional:
   256  	NodeType pulumi.StringPtrInput
   257  	// The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard).
   258  	NumReplicasPerShard pulumi.IntPtrInput
   259  	// The number of shards in the cluster. Defaults to `1`.
   260  	NumShards pulumi.IntPtrInput
   261  	// The name of the parameter group associated with the cluster.
   262  	ParameterGroupName pulumi.StringPtrInput
   263  	// The port number on which each of the nodes accepts connections. Defaults to `6379`.
   264  	Port pulumi.IntPtrInput
   265  	// Set of VPC Security Group ID-s to associate with this cluster.
   266  	SecurityGroupIds pulumi.StringArrayInput
   267  	// Set of shards in this cluster.
   268  	Shards ClusterShardArrayInput
   269  	// List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas.
   270  	SnapshotArns pulumi.StringArrayInput
   271  	// The name of a snapshot from which to restore data into the new cluster.
   272  	SnapshotName pulumi.StringPtrInput
   273  	// The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`.
   274  	SnapshotRetentionLimit pulumi.IntPtrInput
   275  	// The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`.
   276  	SnapshotWindow pulumi.StringPtrInput
   277  	// ARN of the SNS topic to which cluster notifications are sent.
   278  	SnsTopicArn pulumi.StringPtrInput
   279  	// The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets.
   280  	SubnetGroupName pulumi.StringPtrInput
   281  	// A 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.
   282  	Tags pulumi.StringMapInput
   283  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   284  	//
   285  	// Deprecated: Please use `tags` instead.
   286  	TagsAll pulumi.StringMapInput
   287  	// A flag to enable in-transit encryption on the cluster. When set to `false`, the `aclName` must be `open-access`. Defaults to `true`.
   288  	TlsEnabled pulumi.BoolPtrInput
   289  }
   290  
   291  func (ClusterState) ElementType() reflect.Type {
   292  	return reflect.TypeOf((*clusterState)(nil)).Elem()
   293  }
   294  
   295  type clusterArgs struct {
   296  	// The name of the Access Control List to associate with the cluster.
   297  	AclName string `pulumi:"aclName"`
   298  	// When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`.
   299  	AutoMinorVersionUpgrade *bool `pulumi:"autoMinorVersionUpgrade"`
   300  	// Enables data tiering. This option is not supported by all instance types. For more information, see [Data tiering](https://docs.aws.amazon.com/memorydb/latest/devguide/data-tiering.html).
   301  	DataTiering *bool `pulumi:"dataTiering"`
   302  	// Description for the cluster.
   303  	Description *string `pulumi:"description"`
   304  	// Version number of the Redis engine to be used for the cluster. Downgrades are not supported.
   305  	EngineVersion *string `pulumi:"engineVersion"`
   306  	// Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
   307  	FinalSnapshotName *string `pulumi:"finalSnapshotName"`
   308  	// ARN of the KMS key used to encrypt the cluster at rest.
   309  	KmsKeyArn *string `pulumi:"kmsKeyArn"`
   310  	// Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`.
   311  	MaintenanceWindow *string `pulumi:"maintenanceWindow"`
   312  	// Name of the cluster. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`.
   313  	Name *string `pulumi:"name"`
   314  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   315  	NamePrefix *string `pulumi:"namePrefix"`
   316  	// The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html).
   317  	//
   318  	// The following arguments are optional:
   319  	NodeType string `pulumi:"nodeType"`
   320  	// The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard).
   321  	NumReplicasPerShard *int `pulumi:"numReplicasPerShard"`
   322  	// The number of shards in the cluster. Defaults to `1`.
   323  	NumShards *int `pulumi:"numShards"`
   324  	// The name of the parameter group associated with the cluster.
   325  	ParameterGroupName *string `pulumi:"parameterGroupName"`
   326  	// The port number on which each of the nodes accepts connections. Defaults to `6379`.
   327  	Port *int `pulumi:"port"`
   328  	// Set of VPC Security Group ID-s to associate with this cluster.
   329  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   330  	// List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas.
   331  	SnapshotArns []string `pulumi:"snapshotArns"`
   332  	// The name of a snapshot from which to restore data into the new cluster.
   333  	SnapshotName *string `pulumi:"snapshotName"`
   334  	// The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`.
   335  	SnapshotRetentionLimit *int `pulumi:"snapshotRetentionLimit"`
   336  	// The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`.
   337  	SnapshotWindow *string `pulumi:"snapshotWindow"`
   338  	// ARN of the SNS topic to which cluster notifications are sent.
   339  	SnsTopicArn *string `pulumi:"snsTopicArn"`
   340  	// The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets.
   341  	SubnetGroupName *string `pulumi:"subnetGroupName"`
   342  	// A 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.
   343  	Tags map[string]string `pulumi:"tags"`
   344  	// A flag to enable in-transit encryption on the cluster. When set to `false`, the `aclName` must be `open-access`. Defaults to `true`.
   345  	TlsEnabled *bool `pulumi:"tlsEnabled"`
   346  }
   347  
   348  // The set of arguments for constructing a Cluster resource.
   349  type ClusterArgs struct {
   350  	// The name of the Access Control List to associate with the cluster.
   351  	AclName pulumi.StringInput
   352  	// When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`.
   353  	AutoMinorVersionUpgrade pulumi.BoolPtrInput
   354  	// Enables data tiering. This option is not supported by all instance types. For more information, see [Data tiering](https://docs.aws.amazon.com/memorydb/latest/devguide/data-tiering.html).
   355  	DataTiering pulumi.BoolPtrInput
   356  	// Description for the cluster.
   357  	Description pulumi.StringPtrInput
   358  	// Version number of the Redis engine to be used for the cluster. Downgrades are not supported.
   359  	EngineVersion pulumi.StringPtrInput
   360  	// Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
   361  	FinalSnapshotName pulumi.StringPtrInput
   362  	// ARN of the KMS key used to encrypt the cluster at rest.
   363  	KmsKeyArn pulumi.StringPtrInput
   364  	// Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`.
   365  	MaintenanceWindow pulumi.StringPtrInput
   366  	// Name of the cluster. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`.
   367  	Name pulumi.StringPtrInput
   368  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   369  	NamePrefix pulumi.StringPtrInput
   370  	// The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html).
   371  	//
   372  	// The following arguments are optional:
   373  	NodeType pulumi.StringInput
   374  	// The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard).
   375  	NumReplicasPerShard pulumi.IntPtrInput
   376  	// The number of shards in the cluster. Defaults to `1`.
   377  	NumShards pulumi.IntPtrInput
   378  	// The name of the parameter group associated with the cluster.
   379  	ParameterGroupName pulumi.StringPtrInput
   380  	// The port number on which each of the nodes accepts connections. Defaults to `6379`.
   381  	Port pulumi.IntPtrInput
   382  	// Set of VPC Security Group ID-s to associate with this cluster.
   383  	SecurityGroupIds pulumi.StringArrayInput
   384  	// List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas.
   385  	SnapshotArns pulumi.StringArrayInput
   386  	// The name of a snapshot from which to restore data into the new cluster.
   387  	SnapshotName pulumi.StringPtrInput
   388  	// The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`.
   389  	SnapshotRetentionLimit pulumi.IntPtrInput
   390  	// The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`.
   391  	SnapshotWindow pulumi.StringPtrInput
   392  	// ARN of the SNS topic to which cluster notifications are sent.
   393  	SnsTopicArn pulumi.StringPtrInput
   394  	// The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets.
   395  	SubnetGroupName pulumi.StringPtrInput
   396  	// A 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.
   397  	Tags pulumi.StringMapInput
   398  	// A flag to enable in-transit encryption on the cluster. When set to `false`, the `aclName` must be `open-access`. Defaults to `true`.
   399  	TlsEnabled pulumi.BoolPtrInput
   400  }
   401  
   402  func (ClusterArgs) ElementType() reflect.Type {
   403  	return reflect.TypeOf((*clusterArgs)(nil)).Elem()
   404  }
   405  
   406  type ClusterInput interface {
   407  	pulumi.Input
   408  
   409  	ToClusterOutput() ClusterOutput
   410  	ToClusterOutputWithContext(ctx context.Context) ClusterOutput
   411  }
   412  
   413  func (*Cluster) ElementType() reflect.Type {
   414  	return reflect.TypeOf((**Cluster)(nil)).Elem()
   415  }
   416  
   417  func (i *Cluster) ToClusterOutput() ClusterOutput {
   418  	return i.ToClusterOutputWithContext(context.Background())
   419  }
   420  
   421  func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
   422  	return pulumi.ToOutputWithContext(ctx, i).(ClusterOutput)
   423  }
   424  
   425  // ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values.
   426  // You can construct a concrete instance of `ClusterArrayInput` via:
   427  //
   428  //	ClusterArray{ ClusterArgs{...} }
   429  type ClusterArrayInput interface {
   430  	pulumi.Input
   431  
   432  	ToClusterArrayOutput() ClusterArrayOutput
   433  	ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput
   434  }
   435  
   436  type ClusterArray []ClusterInput
   437  
   438  func (ClusterArray) ElementType() reflect.Type {
   439  	return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
   440  }
   441  
   442  func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput {
   443  	return i.ToClusterArrayOutputWithContext(context.Background())
   444  }
   445  
   446  func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
   447  	return pulumi.ToOutputWithContext(ctx, i).(ClusterArrayOutput)
   448  }
   449  
   450  // ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values.
   451  // You can construct a concrete instance of `ClusterMapInput` via:
   452  //
   453  //	ClusterMap{ "key": ClusterArgs{...} }
   454  type ClusterMapInput interface {
   455  	pulumi.Input
   456  
   457  	ToClusterMapOutput() ClusterMapOutput
   458  	ToClusterMapOutputWithContext(context.Context) ClusterMapOutput
   459  }
   460  
   461  type ClusterMap map[string]ClusterInput
   462  
   463  func (ClusterMap) ElementType() reflect.Type {
   464  	return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
   465  }
   466  
   467  func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput {
   468  	return i.ToClusterMapOutputWithContext(context.Background())
   469  }
   470  
   471  func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
   472  	return pulumi.ToOutputWithContext(ctx, i).(ClusterMapOutput)
   473  }
   474  
   475  type ClusterOutput struct{ *pulumi.OutputState }
   476  
   477  func (ClusterOutput) ElementType() reflect.Type {
   478  	return reflect.TypeOf((**Cluster)(nil)).Elem()
   479  }
   480  
   481  func (o ClusterOutput) ToClusterOutput() ClusterOutput {
   482  	return o
   483  }
   484  
   485  func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
   486  	return o
   487  }
   488  
   489  // The name of the Access Control List to associate with the cluster.
   490  func (o ClusterOutput) AclName() pulumi.StringOutput {
   491  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.AclName }).(pulumi.StringOutput)
   492  }
   493  
   494  // The ARN of the cluster.
   495  func (o ClusterOutput) Arn() pulumi.StringOutput {
   496  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   497  }
   498  
   499  // When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`.
   500  func (o ClusterOutput) AutoMinorVersionUpgrade() pulumi.BoolPtrOutput {
   501  	return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.AutoMinorVersionUpgrade }).(pulumi.BoolPtrOutput)
   502  }
   503  
   504  func (o ClusterOutput) ClusterEndpoints() ClusterClusterEndpointArrayOutput {
   505  	return o.ApplyT(func(v *Cluster) ClusterClusterEndpointArrayOutput { return v.ClusterEndpoints }).(ClusterClusterEndpointArrayOutput)
   506  }
   507  
   508  // Enables data tiering. This option is not supported by all instance types. For more information, see [Data tiering](https://docs.aws.amazon.com/memorydb/latest/devguide/data-tiering.html).
   509  func (o ClusterOutput) DataTiering() pulumi.BoolPtrOutput {
   510  	return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.DataTiering }).(pulumi.BoolPtrOutput)
   511  }
   512  
   513  // Description for the cluster.
   514  func (o ClusterOutput) Description() pulumi.StringPtrOutput {
   515  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   516  }
   517  
   518  // Patch version number of the Redis engine used by the cluster.
   519  func (o ClusterOutput) EnginePatchVersion() pulumi.StringOutput {
   520  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.EnginePatchVersion }).(pulumi.StringOutput)
   521  }
   522  
   523  // Version number of the Redis engine to be used for the cluster. Downgrades are not supported.
   524  func (o ClusterOutput) EngineVersion() pulumi.StringOutput {
   525  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput)
   526  }
   527  
   528  // Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
   529  func (o ClusterOutput) FinalSnapshotName() pulumi.StringPtrOutput {
   530  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.FinalSnapshotName }).(pulumi.StringPtrOutput)
   531  }
   532  
   533  // ARN of the KMS key used to encrypt the cluster at rest.
   534  func (o ClusterOutput) KmsKeyArn() pulumi.StringPtrOutput {
   535  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.KmsKeyArn }).(pulumi.StringPtrOutput)
   536  }
   537  
   538  // Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`.
   539  func (o ClusterOutput) MaintenanceWindow() pulumi.StringOutput {
   540  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.MaintenanceWindow }).(pulumi.StringOutput)
   541  }
   542  
   543  // Name of the cluster. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`.
   544  func (o ClusterOutput) Name() pulumi.StringOutput {
   545  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   546  }
   547  
   548  // Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   549  func (o ClusterOutput) NamePrefix() pulumi.StringOutput {
   550  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput)
   551  }
   552  
   553  // The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html).
   554  //
   555  // The following arguments are optional:
   556  func (o ClusterOutput) NodeType() pulumi.StringOutput {
   557  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.NodeType }).(pulumi.StringOutput)
   558  }
   559  
   560  // The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard).
   561  func (o ClusterOutput) NumReplicasPerShard() pulumi.IntPtrOutput {
   562  	return o.ApplyT(func(v *Cluster) pulumi.IntPtrOutput { return v.NumReplicasPerShard }).(pulumi.IntPtrOutput)
   563  }
   564  
   565  // The number of shards in the cluster. Defaults to `1`.
   566  func (o ClusterOutput) NumShards() pulumi.IntPtrOutput {
   567  	return o.ApplyT(func(v *Cluster) pulumi.IntPtrOutput { return v.NumShards }).(pulumi.IntPtrOutput)
   568  }
   569  
   570  // The name of the parameter group associated with the cluster.
   571  func (o ClusterOutput) ParameterGroupName() pulumi.StringOutput {
   572  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ParameterGroupName }).(pulumi.StringOutput)
   573  }
   574  
   575  // The port number on which each of the nodes accepts connections. Defaults to `6379`.
   576  func (o ClusterOutput) Port() pulumi.IntOutput {
   577  	return o.ApplyT(func(v *Cluster) pulumi.IntOutput { return v.Port }).(pulumi.IntOutput)
   578  }
   579  
   580  // Set of VPC Security Group ID-s to associate with this cluster.
   581  func (o ClusterOutput) SecurityGroupIds() pulumi.StringArrayOutput {
   582  	return o.ApplyT(func(v *Cluster) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
   583  }
   584  
   585  // Set of shards in this cluster.
   586  func (o ClusterOutput) Shards() ClusterShardArrayOutput {
   587  	return o.ApplyT(func(v *Cluster) ClusterShardArrayOutput { return v.Shards }).(ClusterShardArrayOutput)
   588  }
   589  
   590  // List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas.
   591  func (o ClusterOutput) SnapshotArns() pulumi.StringArrayOutput {
   592  	return o.ApplyT(func(v *Cluster) pulumi.StringArrayOutput { return v.SnapshotArns }).(pulumi.StringArrayOutput)
   593  }
   594  
   595  // The name of a snapshot from which to restore data into the new cluster.
   596  func (o ClusterOutput) SnapshotName() pulumi.StringPtrOutput {
   597  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.SnapshotName }).(pulumi.StringPtrOutput)
   598  }
   599  
   600  // The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`.
   601  func (o ClusterOutput) SnapshotRetentionLimit() pulumi.IntOutput {
   602  	return o.ApplyT(func(v *Cluster) pulumi.IntOutput { return v.SnapshotRetentionLimit }).(pulumi.IntOutput)
   603  }
   604  
   605  // The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`.
   606  func (o ClusterOutput) SnapshotWindow() pulumi.StringOutput {
   607  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.SnapshotWindow }).(pulumi.StringOutput)
   608  }
   609  
   610  // ARN of the SNS topic to which cluster notifications are sent.
   611  func (o ClusterOutput) SnsTopicArn() pulumi.StringPtrOutput {
   612  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.SnsTopicArn }).(pulumi.StringPtrOutput)
   613  }
   614  
   615  // The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets.
   616  func (o ClusterOutput) SubnetGroupName() pulumi.StringOutput {
   617  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.SubnetGroupName }).(pulumi.StringOutput)
   618  }
   619  
   620  // A 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.
   621  func (o ClusterOutput) Tags() pulumi.StringMapOutput {
   622  	return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   623  }
   624  
   625  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   626  //
   627  // Deprecated: Please use `tags` instead.
   628  func (o ClusterOutput) TagsAll() pulumi.StringMapOutput {
   629  	return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   630  }
   631  
   632  // A flag to enable in-transit encryption on the cluster. When set to `false`, the `aclName` must be `open-access`. Defaults to `true`.
   633  func (o ClusterOutput) TlsEnabled() pulumi.BoolPtrOutput {
   634  	return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.TlsEnabled }).(pulumi.BoolPtrOutput)
   635  }
   636  
   637  type ClusterArrayOutput struct{ *pulumi.OutputState }
   638  
   639  func (ClusterArrayOutput) ElementType() reflect.Type {
   640  	return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
   641  }
   642  
   643  func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput {
   644  	return o
   645  }
   646  
   647  func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
   648  	return o
   649  }
   650  
   651  func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput {
   652  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cluster {
   653  		return vs[0].([]*Cluster)[vs[1].(int)]
   654  	}).(ClusterOutput)
   655  }
   656  
   657  type ClusterMapOutput struct{ *pulumi.OutputState }
   658  
   659  func (ClusterMapOutput) ElementType() reflect.Type {
   660  	return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
   661  }
   662  
   663  func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput {
   664  	return o
   665  }
   666  
   667  func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
   668  	return o
   669  }
   670  
   671  func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput {
   672  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cluster {
   673  		return vs[0].(map[string]*Cluster)[vs[1].(string)]
   674  	}).(ClusterOutput)
   675  }
   676  
   677  func init() {
   678  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterInput)(nil)).Elem(), &Cluster{})
   679  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterArrayInput)(nil)).Elem(), ClusterArray{})
   680  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterMapInput)(nil)).Elem(), ClusterMap{})
   681  	pulumi.RegisterOutputType(ClusterOutput{})
   682  	pulumi.RegisterOutputType(ClusterArrayOutput{})
   683  	pulumi.RegisterOutputType(ClusterMapOutput{})
   684  }