RDS / Client / add_role_to_db_instance

add_role_to_db_instance#

RDS.Client.add_role_to_db_instance(**kwargs)#

Associates an Amazon Web Services Identity and Access Management (IAM) role with a DB instance.

Note

To add a role to a DB instance, the status of the DB instance must be available.

This command doesn’t apply to RDS Custom.

See also: AWS API Documentation

Request Syntax

response = client.add_role_to_db_instance(
    DBInstanceIdentifier='string',
    RoleArn='string',
    FeatureName='string'
)
Parameters:
  • DBInstanceIdentifier (string) –

    [REQUIRED]

    The name of the DB instance to associate the IAM role with.

  • RoleArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the IAM role to associate with the DB instance, for example arn:aws:iam::123456789012:role/AccessRole.

  • FeatureName (string) –

    [REQUIRED]

    The name of the feature for the DB instance that the IAM role is to be associated with. For information about supported feature names, see DBEngineVersion.

Returns:

None

Exceptions

  • RDS.Client.exceptions.DBInstanceNotFoundFault

  • RDS.Client.exceptions.DBInstanceRoleAlreadyExistsFault

  • RDS.Client.exceptions.InvalidDBInstanceStateFault

  • RDS.Client.exceptions.DBInstanceRoleQuotaExceededFault