1. Packages
  2. AWS Classic
  3. API Docs
  4. rds
  5. ClusterRoleAssociation

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.rds.ClusterRoleAssociation

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Manages a RDS DB Cluster association with an IAM Role. Example use cases:

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.rds.ClusterRoleAssociation("example", {
        dbClusterIdentifier: exampleAwsRdsCluster.id,
        featureName: "S3_INTEGRATION",
        roleArn: exampleAwsIamRole.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.rds.ClusterRoleAssociation("example",
        db_cluster_identifier=example_aws_rds_cluster["id"],
        feature_name="S3_INTEGRATION",
        role_arn=example_aws_iam_role["arn"])
    
    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.NewClusterRoleAssociation(ctx, "example", &rds.ClusterRoleAssociationArgs{
    			DbClusterIdentifier: pulumi.Any(exampleAwsRdsCluster.Id),
    			FeatureName:         pulumi.String("S3_INTEGRATION"),
    			RoleArn:             pulumi.Any(exampleAwsIamRole.Arn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Rds.ClusterRoleAssociation("example", new()
        {
            DbClusterIdentifier = exampleAwsRdsCluster.Id,
            FeatureName = "S3_INTEGRATION",
            RoleArn = exampleAwsIamRole.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.rds.ClusterRoleAssociation;
    import com.pulumi.aws.rds.ClusterRoleAssociationArgs;
    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) {
            var example = new ClusterRoleAssociation("example", ClusterRoleAssociationArgs.builder()        
                .dbClusterIdentifier(exampleAwsRdsCluster.id())
                .featureName("S3_INTEGRATION")
                .roleArn(exampleAwsIamRole.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:rds:ClusterRoleAssociation
        properties:
          dbClusterIdentifier: ${exampleAwsRdsCluster.id}
          featureName: S3_INTEGRATION
          roleArn: ${exampleAwsIamRole.arn}
    

    Create ClusterRoleAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ClusterRoleAssociation(name: string, args: ClusterRoleAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def ClusterRoleAssociation(resource_name: str,
                               args: ClusterRoleAssociationArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClusterRoleAssociation(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               db_cluster_identifier: Optional[str] = None,
                               feature_name: Optional[str] = None,
                               role_arn: Optional[str] = None)
    func NewClusterRoleAssociation(ctx *Context, name string, args ClusterRoleAssociationArgs, opts ...ResourceOption) (*ClusterRoleAssociation, error)
    public ClusterRoleAssociation(string name, ClusterRoleAssociationArgs args, CustomResourceOptions? opts = null)
    public ClusterRoleAssociation(String name, ClusterRoleAssociationArgs args)
    public ClusterRoleAssociation(String name, ClusterRoleAssociationArgs args, CustomResourceOptions options)
    
    type: aws:rds:ClusterRoleAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ClusterRoleAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ClusterRoleAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ClusterRoleAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClusterRoleAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClusterRoleAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var clusterRoleAssociationResource = new Aws.Rds.ClusterRoleAssociation("clusterRoleAssociationResource", new()
    {
        DbClusterIdentifier = "string",
        FeatureName = "string",
        RoleArn = "string",
    });
    
    example, err := rds.NewClusterRoleAssociation(ctx, "clusterRoleAssociationResource", &rds.ClusterRoleAssociationArgs{
    	DbClusterIdentifier: pulumi.String("string"),
    	FeatureName:         pulumi.String("string"),
    	RoleArn:             pulumi.String("string"),
    })
    
    var clusterRoleAssociationResource = new ClusterRoleAssociation("clusterRoleAssociationResource", ClusterRoleAssociationArgs.builder()        
        .dbClusterIdentifier("string")
        .featureName("string")
        .roleArn("string")
        .build());
    
    cluster_role_association_resource = aws.rds.ClusterRoleAssociation("clusterRoleAssociationResource",
        db_cluster_identifier="string",
        feature_name="string",
        role_arn="string")
    
    const clusterRoleAssociationResource = new aws.rds.ClusterRoleAssociation("clusterRoleAssociationResource", {
        dbClusterIdentifier: "string",
        featureName: "string",
        roleArn: "string",
    });
    
    type: aws:rds:ClusterRoleAssociation
    properties:
        dbClusterIdentifier: string
        featureName: string
        roleArn: string
    

    ClusterRoleAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ClusterRoleAssociation resource accepts the following input properties:

    DbClusterIdentifier string
    DB Cluster Identifier to associate with the IAM Role.
    FeatureName string
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    RoleArn string
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    DbClusterIdentifier string
    DB Cluster Identifier to associate with the IAM Role.
    FeatureName string
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    RoleArn string
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    dbClusterIdentifier String
    DB Cluster Identifier to associate with the IAM Role.
    featureName String
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    roleArn String
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    dbClusterIdentifier string
    DB Cluster Identifier to associate with the IAM Role.
    featureName string
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    roleArn string
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    db_cluster_identifier str
    DB Cluster Identifier to associate with the IAM Role.
    feature_name str
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    role_arn str
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    dbClusterIdentifier String
    DB Cluster Identifier to associate with the IAM Role.
    featureName String
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    roleArn String
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClusterRoleAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ClusterRoleAssociation Resource

    Get an existing ClusterRoleAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ClusterRoleAssociationState, opts?: CustomResourceOptions): ClusterRoleAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_cluster_identifier: Optional[str] = None,
            feature_name: Optional[str] = None,
            role_arn: Optional[str] = None) -> ClusterRoleAssociation
    func GetClusterRoleAssociation(ctx *Context, name string, id IDInput, state *ClusterRoleAssociationState, opts ...ResourceOption) (*ClusterRoleAssociation, error)
    public static ClusterRoleAssociation Get(string name, Input<string> id, ClusterRoleAssociationState? state, CustomResourceOptions? opts = null)
    public static ClusterRoleAssociation get(String name, Output<String> id, ClusterRoleAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DbClusterIdentifier string
    DB Cluster Identifier to associate with the IAM Role.
    FeatureName string
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    RoleArn string
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    DbClusterIdentifier string
    DB Cluster Identifier to associate with the IAM Role.
    FeatureName string
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    RoleArn string
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    dbClusterIdentifier String
    DB Cluster Identifier to associate with the IAM Role.
    featureName String
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    roleArn String
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    dbClusterIdentifier string
    DB Cluster Identifier to associate with the IAM Role.
    featureName string
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    roleArn string
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    db_cluster_identifier str
    DB Cluster Identifier to associate with the IAM Role.
    feature_name str
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    role_arn str
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.
    dbClusterIdentifier String
    DB Cluster Identifier to associate with the IAM Role.
    featureName String
    Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames list returned by AWS CLI rds describe-db-engine-versions.
    roleArn String
    Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.

    Import

    Using pulumi import, import aws_rds_cluster_role_association using the DB Cluster Identifier and IAM Role ARN separated by a comma (,). For example:

    $ pulumi import aws:rds/clusterRoleAssociation:ClusterRoleAssociation example my-db-cluster,arn:aws:iam::123456789012:role/my-role
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi