Skip to content

RDSClient#

Index > RDS > RDSClient

Auto-generated documentation for RDS type annotations stubs module mypy-boto3-rds.

RDSClient#

Type annotations and code completion for boto3.client("rds"). boto3 documentation

# RDSClient usage example

from boto3.session import Session
from mypy_boto3_rds.client import RDSClient

def get_rds_client() -> RDSClient:
    return Session().client("rds")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("rds").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("rds")

try:
    do_something(client)
except (
    client.exceptions.AuthorizationAlreadyExistsFault,
    client.exceptions.AuthorizationNotFoundFault,
    client.exceptions.AuthorizationQuotaExceededFault,
    client.exceptions.BackupPolicyNotFoundFault,
    client.exceptions.BlueGreenDeploymentAlreadyExistsFault,
    client.exceptions.BlueGreenDeploymentNotFoundFault,
    client.exceptions.CertificateNotFoundFault,
    client.exceptions.ClientError,
    client.exceptions.CreateCustomDBEngineVersionFault,
    client.exceptions.CustomAvailabilityZoneNotFoundFault,
    client.exceptions.CustomDBEngineVersionAlreadyExistsFault,
    client.exceptions.CustomDBEngineVersionNotFoundFault,
    client.exceptions.CustomDBEngineVersionQuotaExceededFault,
    client.exceptions.DBClusterAlreadyExistsFault,
    client.exceptions.DBClusterAutomatedBackupNotFoundFault,
    client.exceptions.DBClusterAutomatedBackupQuotaExceededFault,
    client.exceptions.DBClusterBacktrackNotFoundFault,
    client.exceptions.DBClusterEndpointAlreadyExistsFault,
    client.exceptions.DBClusterEndpointNotFoundFault,
    client.exceptions.DBClusterEndpointQuotaExceededFault,
    client.exceptions.DBClusterNotFoundFault,
    client.exceptions.DBClusterParameterGroupNotFoundFault,
    client.exceptions.DBClusterQuotaExceededFault,
    client.exceptions.DBClusterRoleAlreadyExistsFault,
    client.exceptions.DBClusterRoleNotFoundFault,
    client.exceptions.DBClusterRoleQuotaExceededFault,
    client.exceptions.DBClusterSnapshotAlreadyExistsFault,
    client.exceptions.DBClusterSnapshotNotFoundFault,
    client.exceptions.DBInstanceAlreadyExistsFault,
    client.exceptions.DBInstanceAutomatedBackupNotFoundFault,
    client.exceptions.DBInstanceAutomatedBackupQuotaExceededFault,
    client.exceptions.DBInstanceNotFoundFault,
    client.exceptions.DBInstanceRoleAlreadyExistsFault,
    client.exceptions.DBInstanceRoleNotFoundFault,
    client.exceptions.DBInstanceRoleQuotaExceededFault,
    client.exceptions.DBLogFileNotFoundFault,
    client.exceptions.DBParameterGroupAlreadyExistsFault,
    client.exceptions.DBParameterGroupNotFoundFault,
    client.exceptions.DBParameterGroupQuotaExceededFault,
    client.exceptions.DBProxyAlreadyExistsFault,
    client.exceptions.DBProxyEndpointAlreadyExistsFault,
    client.exceptions.DBProxyEndpointNotFoundFault,
    client.exceptions.DBProxyEndpointQuotaExceededFault,
    client.exceptions.DBProxyNotFoundFault,
    client.exceptions.DBProxyQuotaExceededFault,
    client.exceptions.DBProxyTargetAlreadyRegisteredFault,
    client.exceptions.DBProxyTargetGroupNotFoundFault,
    client.exceptions.DBProxyTargetNotFoundFault,
    client.exceptions.DBSecurityGroupAlreadyExistsFault,
    client.exceptions.DBSecurityGroupNotFoundFault,
    client.exceptions.DBSecurityGroupNotSupportedFault,
    client.exceptions.DBSecurityGroupQuotaExceededFault,
    client.exceptions.DBShardGroupAlreadyExistsFault,
    client.exceptions.DBShardGroupNotFoundFault,
    client.exceptions.DBSnapshotAlreadyExistsFault,
    client.exceptions.DBSnapshotNotFoundFault,
    client.exceptions.DBSnapshotTenantDatabaseNotFoundFault,
    client.exceptions.DBSubnetGroupAlreadyExistsFault,
    client.exceptions.DBSubnetGroupDoesNotCoverEnoughAZs,
    client.exceptions.DBSubnetGroupNotAllowedFault,
    client.exceptions.DBSubnetGroupNotFoundFault,
    client.exceptions.DBSubnetGroupQuotaExceededFault,
    client.exceptions.DBSubnetQuotaExceededFault,
    client.exceptions.DBUpgradeDependencyFailureFault,
    client.exceptions.DomainNotFoundFault,
    client.exceptions.Ec2ImagePropertiesNotSupportedFault,
    client.exceptions.EventSubscriptionQuotaExceededFault,
    client.exceptions.ExportTaskAlreadyExistsFault,
    client.exceptions.ExportTaskNotFoundFault,
    client.exceptions.GlobalClusterAlreadyExistsFault,
    client.exceptions.GlobalClusterNotFoundFault,
    client.exceptions.GlobalClusterQuotaExceededFault,
    client.exceptions.IamRoleMissingPermissionsFault,
    client.exceptions.IamRoleNotFoundFault,
    client.exceptions.InstanceQuotaExceededFault,
    client.exceptions.InsufficientAvailableIPsInSubnetFault,
    client.exceptions.InsufficientDBClusterCapacityFault,
    client.exceptions.InsufficientDBInstanceCapacityFault,
    client.exceptions.InsufficientStorageClusterCapacityFault,
    client.exceptions.IntegrationAlreadyExistsFault,
    client.exceptions.IntegrationConflictOperationFault,
    client.exceptions.IntegrationNotFoundFault,
    client.exceptions.IntegrationQuotaExceededFault,
    client.exceptions.InvalidBlueGreenDeploymentStateFault,
    client.exceptions.InvalidCustomDBEngineVersionStateFault,
    client.exceptions.InvalidDBClusterAutomatedBackupStateFault,
    client.exceptions.InvalidDBClusterCapacityFault,
    client.exceptions.InvalidDBClusterEndpointStateFault,
    client.exceptions.InvalidDBClusterSnapshotStateFault,
    client.exceptions.InvalidDBClusterStateFault,
    client.exceptions.InvalidDBInstanceAutomatedBackupStateFault,
    client.exceptions.InvalidDBInstanceStateFault,
    client.exceptions.InvalidDBParameterGroupStateFault,
    client.exceptions.InvalidDBProxyEndpointStateFault,
    client.exceptions.InvalidDBProxyStateFault,
    client.exceptions.InvalidDBSecurityGroupStateFault,
    client.exceptions.InvalidDBShardGroupStateFault,
    client.exceptions.InvalidDBSnapshotStateFault,
    client.exceptions.InvalidDBSubnetGroupFault,
    client.exceptions.InvalidDBSubnetGroupStateFault,
    client.exceptions.InvalidDBSubnetStateFault,
    client.exceptions.InvalidEventSubscriptionStateFault,
    client.exceptions.InvalidExportOnlyFault,
    client.exceptions.InvalidExportSourceStateFault,
    client.exceptions.InvalidExportTaskStateFault,
    client.exceptions.InvalidGlobalClusterStateFault,
    client.exceptions.InvalidIntegrationStateFault,
    client.exceptions.InvalidMaxAcuFault,
    client.exceptions.InvalidOptionGroupStateFault,
    client.exceptions.InvalidResourceStateFault,
    client.exceptions.InvalidRestoreFault,
    client.exceptions.InvalidS3BucketFault,
    client.exceptions.InvalidSubnet,
    client.exceptions.InvalidVPCNetworkStateFault,
    client.exceptions.KMSKeyNotAccessibleFault,
    client.exceptions.MaxDBShardGroupLimitReached,
    client.exceptions.NetworkTypeNotSupported,
    client.exceptions.OptionGroupAlreadyExistsFault,
    client.exceptions.OptionGroupNotFoundFault,
    client.exceptions.OptionGroupQuotaExceededFault,
    client.exceptions.PointInTimeRestoreNotEnabledFault,
    client.exceptions.ProvisionedIopsNotAvailableInAZFault,
    client.exceptions.ReservedDBInstanceAlreadyExistsFault,
    client.exceptions.ReservedDBInstanceNotFoundFault,
    client.exceptions.ReservedDBInstanceQuotaExceededFault,
    client.exceptions.ReservedDBInstancesOfferingNotFoundFault,
    client.exceptions.ResourceNotFoundFault,
    client.exceptions.SNSInvalidTopicFault,
    client.exceptions.SNSNoAuthorizationFault,
    client.exceptions.SNSTopicArnNotFoundFault,
    client.exceptions.SharedSnapshotQuotaExceededFault,
    client.exceptions.SnapshotQuotaExceededFault,
    client.exceptions.SourceClusterNotSupportedFault,
    client.exceptions.SourceDatabaseNotSupportedFault,
    client.exceptions.SourceNotFoundFault,
    client.exceptions.StorageQuotaExceededFault,
    client.exceptions.StorageTypeNotAvailableFault,
    client.exceptions.StorageTypeNotSupportedFault,
    client.exceptions.SubnetAlreadyInUse,
    client.exceptions.SubscriptionAlreadyExistFault,
    client.exceptions.SubscriptionCategoryNotFoundFault,
    client.exceptions.SubscriptionNotFoundFault,
    client.exceptions.TenantDatabaseAlreadyExistsFault,
    client.exceptions.TenantDatabaseNotFoundFault,
    client.exceptions.TenantDatabaseQuotaExceededFault,
    client.exceptions.UnsupportedDBEngineVersionFault,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_rds.client import Exceptions

def handle_error(exc: Exceptions.AuthorizationAlreadyExistsFault) -> None:
    ...

Methods#

add_role_to_db_cluster#

Associates an Identity and Access Management (IAM) role with a DB cluster.

Type annotations and code completion for boto3.client("rds").add_role_to_db_cluster method. boto3 documentation

# add_role_to_db_cluster method definition

def add_role_to_db_cluster(
    self,
    *,
    DBClusterIdentifier: str,
    RoleArn: str,
    FeatureName: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# add_role_to_db_cluster method usage example with argument unpacking

kwargs: AddRoleToDBClusterMessageRequestTypeDef = {  # (1)
    "DBClusterIdentifier": ...,
    "RoleArn": ...,
}

parent.add_role_to_db_cluster(**kwargs)
  1. See AddRoleToDBClusterMessageRequestTypeDef

add_role_to_db_instance#

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

Type annotations and code completion for boto3.client("rds").add_role_to_db_instance method.