1. Packages
  2. AWS
  3. API Docs
  4. rds
  5. getCluster
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

aws.rds.getCluster

Explore with Pulumi AI

AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

Provides information about an RDS cluster.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const clusterName = aws.rds.getCluster({
    clusterIdentifier: "clusterName",
});
Copy
import pulumi
import pulumi_aws as aws

cluster_name = aws.rds.get_cluster(cluster_identifier="clusterName")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rds.LookupCluster(ctx, &rds.LookupClusterArgs{
			ClusterIdentifier: "clusterName",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var clusterName = Aws.Rds.GetCluster.Invoke(new()
    {
        ClusterIdentifier = "clusterName",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.RdsFunctions;
import com.pulumi.aws.rds.inputs.GetClusterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var clusterName = RdsFunctions.getCluster(GetClusterArgs.builder()
            .clusterIdentifier("clusterName")
            .build());

    }
}
Copy
variables:
  clusterName:
    fn::invoke:
      function: aws:rds:getCluster
      arguments:
        clusterIdentifier: clusterName
Copy

Using getCluster

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
function getClusterOutput(args: GetClusterOutputArgs, opts?: InvokeOptions): Output<GetClusterResult>
Copy
def get_cluster(cluster_identifier: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None,
                opts: Optional[InvokeOptions] = None) -> GetClusterResult
def get_cluster_output(cluster_identifier: Optional[pulumi.Input[str]] = None,
                tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetClusterResult]
Copy
func LookupCluster(ctx *Context, args *LookupClusterArgs, opts ...InvokeOption) (*LookupClusterResult, error)
func LookupClusterOutput(ctx *Context, args *LookupClusterOutputArgs, opts ...InvokeOption) LookupClusterResultOutput
Copy

> Note: This function is named LookupCluster in the Go SDK.

public static class GetCluster 
{
    public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
    public static Output<GetClusterResult> Invoke(GetClusterInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
public static Output<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:rds/getCluster:getCluster
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterIdentifier This property is required. string
Cluster identifier of the RDS cluster.
Tags Dictionary<string, string>
A map of tags assigned to the resource.
ClusterIdentifier This property is required. string
Cluster identifier of the RDS cluster.
Tags map[string]string
A map of tags assigned to the resource.
clusterIdentifier This property is required. String
Cluster identifier of the RDS cluster.
tags Map<String,String>
A map of tags assigned to the resource.
clusterIdentifier This property is required. string
Cluster identifier of the RDS cluster.
tags {[key: string]: string}
A map of tags assigned to the resource.
cluster_identifier This property is required. str
Cluster identifier of the RDS cluster.
tags Mapping[str, str]
A map of tags assigned to the resource.
clusterIdentifier This property is required. String
Cluster identifier of the RDS cluster.
tags Map<String>
A map of tags assigned to the resource.

getCluster Result

The following output properties are available:

Arn string
AvailabilityZones List<string>
BacktrackWindow int
BackupRetentionPeriod int
ClusterIdentifier string
ClusterMembers List<string>
ClusterResourceId string
ClusterScalabilityType string
DatabaseInsightsMode string
DatabaseName string
DbClusterParameterGroupName string
DbSubnetGroupName string
DbSystemId string
EnabledCloudwatchLogsExports List<string>
Endpoint string
Engine string
EngineMode string
EngineVersion string
FinalSnapshotIdentifier string
HostedZoneId string
IamDatabaseAuthenticationEnabled bool
IamRoles List<string>
Id string
The provider-assigned unique ID for this managed resource.
KmsKeyId string
MasterUserSecrets List<GetClusterMasterUserSecret>
MasterUsername string
MonitoringInterval int
MonitoringRoleArn string
NetworkType string
Port int
PreferredBackupWindow string
PreferredMaintenanceWindow string
ReaderEndpoint string
ReplicationSourceIdentifier string
StorageEncrypted bool
Tags Dictionary<string, string>
A map of tags assigned to the resource.
VpcSecurityGroupIds List<string>
Arn string
AvailabilityZones []string
BacktrackWindow int
BackupRetentionPeriod int
ClusterIdentifier string
ClusterMembers []string
ClusterResourceId string
ClusterScalabilityType string
DatabaseInsightsMode string
DatabaseName string
DbClusterParameterGroupName string
DbSubnetGroupName string
DbSystemId string
EnabledCloudwatchLogsExports []string
Endpoint string
Engine string
EngineMode string
EngineVersion string
FinalSnapshotIdentifier string
HostedZoneId string
IamDatabaseAuthenticationEnabled bool
IamRoles []string
Id string
The provider-assigned unique ID for this managed resource.
KmsKeyId string
MasterUserSecrets []GetClusterMasterUserSecret
MasterUsername string
MonitoringInterval int
MonitoringRoleArn string
NetworkType string
Port int
PreferredBackupWindow string
PreferredMaintenanceWindow string
ReaderEndpoint string
ReplicationSourceIdentifier string
StorageEncrypted bool
Tags map[string]string
A map of tags assigned to the resource.
VpcSecurityGroupIds []string
arn String
availabilityZones List<String>
backtrackWindow Integer
backupRetentionPeriod Integer
clusterIdentifier String
clusterMembers List<String>
clusterResourceId String
clusterScalabilityType String
databaseInsightsMode String
databaseName String
dbClusterParameterGroupName String
dbSubnetGroupName String
dbSystemId String
enabledCloudwatchLogsExports List<String>
endpoint String
engine String
engineMode String
engineVersion String
finalSnapshotIdentifier String
hostedZoneId String
iamDatabaseAuthenticationEnabled Boolean
iamRoles List<String>
id String
The provider-assigned unique ID for this managed resource.
kmsKeyId String
masterUserSecrets List<GetClusterMasterUserSecret>
masterUsername String
monitoringInterval Integer
monitoringRoleArn String
networkType String
port Integer
preferredBackupWindow String
preferredMaintenanceWindow String
readerEndpoint String
replicationSourceIdentifier String
storageEncrypted Boolean
tags Map<String,String>
A map of tags assigned to the resource.
vpcSecurityGroupIds List<String>
arn str
availability_zones Sequence[str]
backtrack_window int
backup_retention_period int
cluster_identifier str
cluster_members Sequence[str]
cluster_resource_id str
cluster_scalability_type str
database_insights_mode str
database_name str
db_cluster_parameter_group_name str
db_subnet_group_name str
db_system_id str
enabled_cloudwatch_logs_exports Sequence[str]
endpoint str
engine str
engine_mode str
engine_version str
final_snapshot_identifier str
hosted_zone_id str
iam_database_authentication_enabled bool
iam_roles Sequence[str]
id str
The provider-assigned unique ID for this managed resource.
kms_key_id str
master_user_secrets Sequence[GetClusterMasterUserSecret]
master_username str
monitoring_interval int
monitoring_role_arn str
network_type str
port int
preferred_backup_window str
preferred_maintenance_window str
reader_endpoint str
replication_source_identifier str
storage_encrypted bool
tags Mapping[str, str]
A map of tags assigned to the resource.
vpc_security_group_ids Sequence[str]
arn String
availabilityZones List<String>
backtrackWindow Number
backupRetentionPeriod Number
clusterIdentifier String
clusterMembers List<String>
clusterResourceId String
clusterScalabilityType String
databaseInsightsMode String
databaseName String
dbClusterParameterGroupName String
dbSubnetGroupName String
dbSystemId String
enabledCloudwatchLogsExports List<String>
endpoint String
engine String
engineMode String
engineVersion String
finalSnapshotIdentifier String
hostedZoneId String
iamDatabaseAuthenticationEnabled Boolean
iamRoles List<String>
id String
The provider-assigned unique ID for this managed resource.
kmsKeyId String
masterUserSecrets List<Property Map>
masterUsername String
monitoringInterval Number
monitoringRoleArn String
networkType String
port Number
preferredBackupWindow String
preferredMaintenanceWindow String
readerEndpoint String
replicationSourceIdentifier String
storageEncrypted Boolean
tags Map<String>
A map of tags assigned to the resource.
vpcSecurityGroupIds List<String>

Supporting Types

GetClusterMasterUserSecret

KmsKeyId This property is required. string
SecretArn This property is required. string
SecretStatus This property is required. string
KmsKeyId This property is required. string
SecretArn This property is required. string
SecretStatus This property is required. string
kmsKeyId This property is required. String
secretArn This property is required. String
secretStatus This property is required. String
kmsKeyId This property is required. string
secretArn This property is required. string
secretStatus This property is required. string
kms_key_id This property is required. str
secret_arn This property is required. str
secret_status This property is required. str
kmsKeyId This property is required. String
secretArn This property is required. String
secretStatus This property is required. String

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi