github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/memorydb/getCluster.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  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Provides information about a MemoryDB Cluster.
    15  //
    16  // ## Example Usage
    17  //
    18  // <!--Start PulumiCodeChooser -->
    19  // ```go
    20  // package main
    21  //
    22  // import (
    23  //
    24  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/memorydb"
    25  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    26  //
    27  // )
    28  //
    29  //	func main() {
    30  //		pulumi.Run(func(ctx *pulumi.Context) error {
    31  //			_, err := memorydb.LookupCluster(ctx, &memorydb.LookupClusterArgs{
    32  //				Name: "my-cluster",
    33  //			}, nil)
    34  //			if err != nil {
    35  //				return err
    36  //			}
    37  //			return nil
    38  //		})
    39  //	}
    40  //
    41  // ```
    42  // <!--End PulumiCodeChooser -->
    43  func LookupCluster(ctx *pulumi.Context, args *LookupClusterArgs, opts ...pulumi.InvokeOption) (*LookupClusterResult, error) {
    44  	opts = internal.PkgInvokeDefaultOpts(opts)
    45  	var rv LookupClusterResult
    46  	err := ctx.Invoke("aws:memorydb/getCluster:getCluster", args, &rv, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return &rv, nil
    51  }
    52  
    53  // A collection of arguments for invoking getCluster.
    54  type LookupClusterArgs struct {
    55  	// Name of the cluster.
    56  	Name string `pulumi:"name"`
    57  	// Map of tags assigned to the cluster.
    58  	Tags map[string]string `pulumi:"tags"`
    59  }
    60  
    61  // A collection of values returned by getCluster.
    62  type LookupClusterResult struct {
    63  	// Name of the Access Control List associated with the cluster.
    64  	AclName string `pulumi:"aclName"`
    65  	// ARN of the cluster.
    66  	Arn string `pulumi:"arn"`
    67  	// True when the cluster allows automatic minor version upgrades.
    68  	AutoMinorVersionUpgrade bool                        `pulumi:"autoMinorVersionUpgrade"`
    69  	ClusterEndpoints        []GetClusterClusterEndpoint `pulumi:"clusterEndpoints"`
    70  	// True when data tiering is enabled.
    71  	DataTiering bool `pulumi:"dataTiering"`
    72  	// Description for the cluster.
    73  	Description string `pulumi:"description"`
    74  	// Patch version number of the Redis engine used by the cluster.
    75  	EnginePatchVersion string `pulumi:"enginePatchVersion"`
    76  	// Version number of the Redis engine used by the cluster.
    77  	EngineVersion string `pulumi:"engineVersion"`
    78  	// Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
    79  	FinalSnapshotName string `pulumi:"finalSnapshotName"`
    80  	// The provider-assigned unique ID for this managed resource.
    81  	Id string `pulumi:"id"`
    82  	// ARN of the KMS key used to encrypt the cluster at rest.
    83  	KmsKeyArn string `pulumi:"kmsKeyArn"`
    84  	// 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). Example: `sun:23:00-mon:01:30`.
    85  	MaintenanceWindow string `pulumi:"maintenanceWindow"`
    86  	// Name of this node.
    87  	Name string `pulumi:"name"`
    88  	// Compute and memory capacity of the nodes in the cluster.
    89  	NodeType string `pulumi:"nodeType"`
    90  	// The number of replicas to apply to each shard.
    91  	NumReplicasPerShard int `pulumi:"numReplicasPerShard"`
    92  	// Number of shards in the cluster.
    93  	NumShards int `pulumi:"numShards"`
    94  	// The name of the parameter group associated with the cluster.
    95  	ParameterGroupName string `pulumi:"parameterGroupName"`
    96  	// Port number that this node is listening on.
    97  	Port int `pulumi:"port"`
    98  	// Set of VPC Security Group ID-s associated with this cluster.
    99  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   100  	// Set of shards in this cluster.
   101  	Shards []GetClusterShard `pulumi:"shards"`
   102  	// The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled.
   103  	SnapshotRetentionLimit int `pulumi:"snapshotRetentionLimit"`
   104  	// Daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`.
   105  	SnapshotWindow string `pulumi:"snapshotWindow"`
   106  	// ARN of the SNS topic to which cluster notifications are sent.
   107  	SnsTopicArn string `pulumi:"snsTopicArn"`
   108  	// The name of the subnet group used for the cluster.
   109  	SubnetGroupName string `pulumi:"subnetGroupName"`
   110  	// Map of tags assigned to the cluster.
   111  	Tags map[string]string `pulumi:"tags"`
   112  	// When true, in-transit encryption is enabled for the cluster.
   113  	TlsEnabled bool `pulumi:"tlsEnabled"`
   114  }
   115  
   116  func LookupClusterOutput(ctx *pulumi.Context, args LookupClusterOutputArgs, opts ...pulumi.InvokeOption) LookupClusterResultOutput {
   117  	return pulumi.ToOutputWithContext(context.Background(), args).
   118  		ApplyT(func(v interface{}) (LookupClusterResult, error) {
   119  			args := v.(LookupClusterArgs)
   120  			r, err := LookupCluster(ctx, &args, opts...)
   121  			var s LookupClusterResult
   122  			if r != nil {
   123  				s = *r
   124  			}
   125  			return s, err
   126  		}).(LookupClusterResultOutput)
   127  }
   128  
   129  // A collection of arguments for invoking getCluster.
   130  type LookupClusterOutputArgs struct {
   131  	// Name of the cluster.
   132  	Name pulumi.StringInput `pulumi:"name"`
   133  	// Map of tags assigned to the cluster.
   134  	Tags pulumi.StringMapInput `pulumi:"tags"`
   135  }
   136  
   137  func (LookupClusterOutputArgs) ElementType() reflect.Type {
   138  	return reflect.TypeOf((*LookupClusterArgs)(nil)).Elem()
   139  }
   140  
   141  // A collection of values returned by getCluster.
   142  type LookupClusterResultOutput struct{ *pulumi.OutputState }
   143  
   144  func (LookupClusterResultOutput) ElementType() reflect.Type {
   145  	return reflect.TypeOf((*LookupClusterResult)(nil)).Elem()
   146  }
   147  
   148  func (o LookupClusterResultOutput) ToLookupClusterResultOutput() LookupClusterResultOutput {
   149  	return o
   150  }
   151  
   152  func (o LookupClusterResultOutput) ToLookupClusterResultOutputWithContext(ctx context.Context) LookupClusterResultOutput {
   153  	return o
   154  }
   155  
   156  // Name of the Access Control List associated with the cluster.
   157  func (o LookupClusterResultOutput) AclName() pulumi.StringOutput {
   158  	return o.ApplyT(func(v LookupClusterResult) string { return v.AclName }).(pulumi.StringOutput)
   159  }
   160  
   161  // ARN of the cluster.
   162  func (o LookupClusterResultOutput) Arn() pulumi.StringOutput {
   163  	return o.ApplyT(func(v LookupClusterResult) string { return v.Arn }).(pulumi.StringOutput)
   164  }
   165  
   166  // True when the cluster allows automatic minor version upgrades.
   167  func (o LookupClusterResultOutput) AutoMinorVersionUpgrade() pulumi.BoolOutput {
   168  	return o.ApplyT(func(v LookupClusterResult) bool { return v.AutoMinorVersionUpgrade }).(pulumi.BoolOutput)
   169  }
   170  
   171  func (o LookupClusterResultOutput) ClusterEndpoints() GetClusterClusterEndpointArrayOutput {
   172  	return o.ApplyT(func(v LookupClusterResult) []GetClusterClusterEndpoint { return v.ClusterEndpoints }).(GetClusterClusterEndpointArrayOutput)
   173  }
   174  
   175  // True when data tiering is enabled.
   176  func (o LookupClusterResultOutput) DataTiering() pulumi.BoolOutput {
   177  	return o.ApplyT(func(v LookupClusterResult) bool { return v.DataTiering }).(pulumi.BoolOutput)
   178  }
   179  
   180  // Description for the cluster.
   181  func (o LookupClusterResultOutput) Description() pulumi.StringOutput {
   182  	return o.ApplyT(func(v LookupClusterResult) string { return v.Description }).(pulumi.StringOutput)
   183  }
   184  
   185  // Patch version number of the Redis engine used by the cluster.
   186  func (o LookupClusterResultOutput) EnginePatchVersion() pulumi.StringOutput {
   187  	return o.ApplyT(func(v LookupClusterResult) string { return v.EnginePatchVersion }).(pulumi.StringOutput)
   188  }
   189  
   190  // Version number of the Redis engine used by the cluster.
   191  func (o LookupClusterResultOutput) EngineVersion() pulumi.StringOutput {
   192  	return o.ApplyT(func(v LookupClusterResult) string { return v.EngineVersion }).(pulumi.StringOutput)
   193  }
   194  
   195  // Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
   196  func (o LookupClusterResultOutput) FinalSnapshotName() pulumi.StringOutput {
   197  	return o.ApplyT(func(v LookupClusterResult) string { return v.FinalSnapshotName }).(pulumi.StringOutput)
   198  }
   199  
   200  // The provider-assigned unique ID for this managed resource.
   201  func (o LookupClusterResultOutput) Id() pulumi.StringOutput {
   202  	return o.ApplyT(func(v LookupClusterResult) string { return v.Id }).(pulumi.StringOutput)
   203  }
   204  
   205  // ARN of the KMS key used to encrypt the cluster at rest.
   206  func (o LookupClusterResultOutput) KmsKeyArn() pulumi.StringOutput {
   207  	return o.ApplyT(func(v LookupClusterResult) string { return v.KmsKeyArn }).(pulumi.StringOutput)
   208  }
   209  
   210  // 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). Example: `sun:23:00-mon:01:30`.
   211  func (o LookupClusterResultOutput) MaintenanceWindow() pulumi.StringOutput {
   212  	return o.ApplyT(func(v LookupClusterResult) string { return v.MaintenanceWindow }).(pulumi.StringOutput)
   213  }
   214  
   215  // Name of this node.
   216  func (o LookupClusterResultOutput) Name() pulumi.StringOutput {
   217  	return o.ApplyT(func(v LookupClusterResult) string { return v.Name }).(pulumi.StringOutput)
   218  }
   219  
   220  // Compute and memory capacity of the nodes in the cluster.
   221  func (o LookupClusterResultOutput) NodeType() pulumi.StringOutput {
   222  	return o.ApplyT(func(v LookupClusterResult) string { return v.NodeType }).(pulumi.StringOutput)
   223  }
   224  
   225  // The number of replicas to apply to each shard.
   226  func (o LookupClusterResultOutput) NumReplicasPerShard() pulumi.IntOutput {
   227  	return o.ApplyT(func(v LookupClusterResult) int { return v.NumReplicasPerShard }).(pulumi.IntOutput)
   228  }
   229  
   230  // Number of shards in the cluster.
   231  func (o LookupClusterResultOutput) NumShards() pulumi.IntOutput {
   232  	return o.ApplyT(func(v LookupClusterResult) int { return v.NumShards }).(pulumi.IntOutput)
   233  }
   234  
   235  // The name of the parameter group associated with the cluster.
   236  func (o LookupClusterResultOutput) ParameterGroupName() pulumi.StringOutput {
   237  	return o.ApplyT(func(v LookupClusterResult) string { return v.ParameterGroupName }).(pulumi.StringOutput)
   238  }
   239  
   240  // Port number that this node is listening on.
   241  func (o LookupClusterResultOutput) Port() pulumi.IntOutput {
   242  	return o.ApplyT(func(v LookupClusterResult) int { return v.Port }).(pulumi.IntOutput)
   243  }
   244  
   245  // Set of VPC Security Group ID-s associated with this cluster.
   246  func (o LookupClusterResultOutput) SecurityGroupIds() pulumi.StringArrayOutput {
   247  	return o.ApplyT(func(v LookupClusterResult) []string { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
   248  }
   249  
   250  // Set of shards in this cluster.
   251  func (o LookupClusterResultOutput) Shards() GetClusterShardArrayOutput {
   252  	return o.ApplyT(func(v LookupClusterResult) []GetClusterShard { return v.Shards }).(GetClusterShardArrayOutput)
   253  }
   254  
   255  // The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled.
   256  func (o LookupClusterResultOutput) SnapshotRetentionLimit() pulumi.IntOutput {
   257  	return o.ApplyT(func(v LookupClusterResult) int { return v.SnapshotRetentionLimit }).(pulumi.IntOutput)
   258  }
   259  
   260  // Daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`.
   261  func (o LookupClusterResultOutput) SnapshotWindow() pulumi.StringOutput {
   262  	return o.ApplyT(func(v LookupClusterResult) string { return v.SnapshotWindow }).(pulumi.StringOutput)
   263  }
   264  
   265  // ARN of the SNS topic to which cluster notifications are sent.
   266  func (o LookupClusterResultOutput) SnsTopicArn() pulumi.StringOutput {
   267  	return o.ApplyT(func(v LookupClusterResult) string { return v.SnsTopicArn }).(pulumi.StringOutput)
   268  }
   269  
   270  // The name of the subnet group used for the cluster.
   271  func (o LookupClusterResultOutput) SubnetGroupName() pulumi.StringOutput {
   272  	return o.ApplyT(func(v LookupClusterResult) string { return v.SubnetGroupName }).(pulumi.StringOutput)
   273  }
   274  
   275  // Map of tags assigned to the cluster.
   276  func (o LookupClusterResultOutput) Tags() pulumi.StringMapOutput {
   277  	return o.ApplyT(func(v LookupClusterResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   278  }
   279  
   280  // When true, in-transit encryption is enabled for the cluster.
   281  func (o LookupClusterResultOutput) TlsEnabled() pulumi.BoolOutput {
   282  	return o.ApplyT(func(v LookupClusterResult) bool { return v.TlsEnabled }).(pulumi.BoolOutput)
   283  }
   284  
   285  func init() {
   286  	pulumi.RegisterOutputType(LookupClusterResultOutput{})
   287  }