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.DBSnapshotAlreadyExistsFault,
client.exceptions.DBSnapshotNotFoundFault,
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.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.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.InvalidOptionGroupStateFault,
client.exceptions.InvalidRestoreFault,
client.exceptions.InvalidS3BucketFault,
client.exceptions.InvalidSubnet,
client.exceptions.InvalidVPCNetworkStateFault,
client.exceptions.KMSKeyNotAccessibleFault,
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,
) 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)
...
# add_role_to_db_cluster method usage example with argument unpacking
kwargs: AddRoleToDBClusterMessageRequestTypeDef = { # (1)
"DBClusterIdentifier": ...,
"RoleArn": ...,
}
parent.add_role_to_db_cluster(**kwargs)
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.
boto3 documentation
# add_role_to_db_instance method definition
def add_role_to_db_instance(
self,
*,
DBInstanceIdentifier: str,
RoleArn: str,
FeatureName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# add_role_to_db_instance method usage example with argument unpacking
kwargs: AddRoleToDBInstanceMessageRequestTypeDef = { # (1)
"DBInstanceIdentifier": ...,
"RoleArn": ...,
"FeatureName": ...,
}
parent.add_role_to_db_instance(**kwargs)
add_source_identifier_to_subscription#
Adds a source identifier to an existing RDS event notification subscription.
Type annotations and code completion for boto3.client("rds").add_source_identifier_to_subscription
method.
boto3 documentation
# add_source_identifier_to_subscription method definition
def add_source_identifier_to_subscription(
self,
*,
SubscriptionName: str,
SourceIdentifier: str,
) -> AddSourceIdentifierToSubscriptionResultTypeDef: # (1)
...
# add_source_identifier_to_subscription method usage example with argument unpacking
kwargs: AddSourceIdentifierToSubscriptionMessageRequestTypeDef = { # (1)
"SubscriptionName": ...,
"SourceIdentifier": ...,
}
parent.add_source_identifier_to_subscription(**kwargs)
add_tags_to_resource#
Adds metadata tags to an Amazon RDS resource.
Type annotations and code completion for boto3.client("rds").add_tags_to_resource
method.
boto3 documentation
# add_tags_to_resource method definition
def add_tags_to_resource(
self,
*,
ResourceName: str,
Tags: Sequence[TagTypeDef], # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
# add_tags_to_resource method usage example with argument unpacking
kwargs: AddTagsToResourceMessageRequestTypeDef = { # (1)
"ResourceName": ...,
"Tags": ...,
}
parent.add_tags_to_resource(**kwargs)
apply_pending_maintenance_action#
Applies a pending maintenance action to a resource (for example, to a DB instance).
Type annotations and code completion for boto3.client("rds").apply_pending_maintenance_action
method.
boto3 documentation
# apply_pending_maintenance_action method definition
def apply_pending_maintenance_action(
self,
*,
ResourceIdentifier: str,
ApplyAction: str,
OptInType: str,
) -> ApplyPendingMaintenanceActionResultTypeDef: # (1)
...
# apply_pending_maintenance_action method usage example with argument unpacking
kwargs: ApplyPendingMaintenanceActionMessageRequestTypeDef = { # (1)
"ResourceIdentifier": ...,
"ApplyAction": ...,
"OptInType": ...,
}
parent.apply_pending_maintenance_action(**kwargs)
authorize_db_security_group_ingress#
Enables ingress to a DBSecurityGroup using one of two forms of authorization.
Type annotations and code completion for boto3.client("rds").authorize_db_security_group_ingress
method.
boto3 documentation
# authorize_db_security_group_ingress method definition
def authorize_db_security_group_ingress(
self,
*,
DBSecurityGroupName: str,
CIDRIP: str = ...,
EC2SecurityGroupName: str = ...,
EC2SecurityGroupId: str = ...,
EC2SecurityGroupOwnerId: str = ...,
) -> AuthorizeDBSecurityGroupIngressResultTypeDef: # (1)
...
# authorize_db_security_group_ingress method usage example with argument unpacking
kwargs: AuthorizeDBSecurityGroupIngressMessageRequestTypeDef = { # (1)
"DBSecurityGroupName": ...,
}
parent.authorize_db_security_group_ingress(**kwargs)
backtrack_db_cluster#
Backtracks a DB cluster to a specific time, without creating a new DB cluster.
Type annotations and code completion for boto3.client("rds").backtrack_db_cluster
method.
boto3 documentation
# backtrack_db_cluster method definition
def backtrack_db_cluster(
self,
*,
DBClusterIdentifier: str,
BacktrackTo: Union[datetime, str],
Force: bool = ...,
UseEarliestTimeOnPointInTimeUnavailable: bool = ...,
) -> DBClusterBacktrackResponseTypeDef: # (1)
...
# backtrack_db_cluster method usage example with argument unpacking
kwargs: BacktrackDBClusterMessageRequestTypeDef = { # (1)
"DBClusterIdentifier": ...,
"BacktrackTo": ...,
}
parent.backtrack_db_cluster(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("rds").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
cancel_export_task#
Cancels an export task in progress that is exporting a snapshot or cluster to Amazon S3.
Type annotations and code completion for boto3.client("rds").cancel_export_task
method.
boto3 documentation
# cancel_export_task method definition
def cancel_export_task(
self,
*,
ExportTaskIdentifier: str,
) -> ExportTaskResponseTypeDef: # (1)
...
# cancel_export_task method usage example with argument unpacking
kwargs: CancelExportTaskMessageRequestTypeDef = { # (1)
"ExportTaskIdentifier": ...,
}
parent.cancel_export_task(**kwargs)
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("rds").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
copy_db_cluster_parameter_group#
Copies the specified DB cluster parameter group.
Type annotations and code completion for boto3.client("rds").copy_db_cluster_parameter_group
method.
boto3 documentation
# copy_db_cluster_parameter_group method definition
def copy_db_cluster_parameter_group(
self,
*,
SourceDBClusterParameterGroupIdentifier: str,
TargetDBClusterParameterGroupIdentifier: str,
TargetDBClusterParameterGroupDescription: str,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> CopyDBClusterParameterGroupResultTypeDef: # (2)
...
# copy_db_cluster_parameter_group method usage example with argument unpacking
kwargs: CopyDBClusterParameterGroupMessageRequestTypeDef = { # (1)
"SourceDBClusterParameterGroupIdentifier": ...,
"TargetDBClusterParameterGroupIdentifier": ...,
"TargetDBClusterParameterGroupDescription": ...,
}
parent.copy_db_cluster_parameter_group(**kwargs)
copy_db_cluster_snapshot#
Copies a snapshot of a DB cluster.
Type annotations and code completion for boto3.client("rds").copy_db_cluster_snapshot
method.
boto3 documentation
# copy_db_cluster_snapshot method definition
def copy_db_cluster_snapshot(
self,
*,
SourceDBClusterSnapshotIdentifier: str,
TargetDBClusterSnapshotIdentifier: str,
KmsKeyId: str = ...,
PreSignedUrl: str = ...,
CopyTags: bool = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
SourceRegion: str = ...,
) -> CopyDBClusterSnapshotResultTypeDef: # (2)
...
# copy_db_cluster_snapshot method usage example with argument unpacking
kwargs: CopyDBClusterSnapshotMessageRequestTypeDef = { # (1)
"SourceDBClusterSnapshotIdentifier": ...,
"TargetDBClusterSnapshotIdentifier": ...,
}
parent.copy_db_cluster_snapshot(**kwargs)
copy_db_parameter_group#
Copies the specified DB parameter group.
Type annotations and code completion for boto3.client("rds").copy_db_parameter_group
method.
boto3 documentation
# copy_db_parameter_group method definition
def copy_db_parameter_group(
self,
*,
SourceDBParameterGroupIdentifier: str,
TargetDBParameterGroupIdentifier: str,
TargetDBParameterGroupDescription: str,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> CopyDBParameterGroupResultTypeDef: # (2)
...
# copy_db_parameter_group method usage example with argument unpacking
kwargs: CopyDBParameterGroupMessageRequestTypeDef = { # (1)
"SourceDBParameterGroupIdentifier": ...,
"TargetDBParameterGroupIdentifier": ...,
"TargetDBParameterGroupDescription": ...,
}
parent.copy_db_parameter_group(**kwargs)
copy_db_snapshot#
Copies the specified DB snapshot.
Type annotations and code completion for boto3.client("rds").copy_db_snapshot
method.
boto3 documentation
# copy_db_snapshot method definition
def copy_db_snapshot(
self,
*,
SourceDBSnapshotIdentifier: str,
TargetDBSnapshotIdentifier: str,
KmsKeyId: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
CopyTags: bool = ...,
PreSignedUrl: str = ...,
OptionGroupName: str = ...,
TargetCustomAvailabilityZone: str = ...,
CopyOptionGroup: bool = ...,
SourceRegion: str = ...,
) -> CopyDBSnapshotResultTypeDef: # (2)
...
# copy_db_snapshot method usage example with argument unpacking
kwargs: CopyDBSnapshotMessageRequestTypeDef = { # (1)
"SourceDBSnapshotIdentifier": ...,
"TargetDBSnapshotIdentifier": ...,
}
parent.copy_db_snapshot(**kwargs)
copy_option_group#
Copies the specified option group.
Type annotations and code completion for boto3.client("rds").copy_option_group
method.
boto3 documentation
# copy_option_group method definition
def copy_option_group(
self,
*,
SourceOptionGroupIdentifier: str,
TargetOptionGroupIdentifier: str,
TargetOptionGroupDescription: str,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> CopyOptionGroupResultTypeDef: # (2)
...
# copy_option_group method usage example with argument unpacking
kwargs: CopyOptionGroupMessageRequestTypeDef = { # (1)
"SourceOptionGroupIdentifier": ...,
"TargetOptionGroupIdentifier": ...,
"TargetOptionGroupDescription": ...,
}
parent.copy_option_group(**kwargs)
create_blue_green_deployment#
Creates a blue/green deployment.
Type annotations and code completion for boto3.client("rds").create_blue_green_deployment
method.
boto3 documentation
# create_blue_green_deployment method definition
def create_blue_green_deployment(
self,
*,
BlueGreenDeploymentName: str,
Source: str,
TargetEngineVersion: str = ...,
TargetDBParameterGroupName: str = ...,
TargetDBClusterParameterGroupName: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> CreateBlueGreenDeploymentResponseTypeDef: # (2)
...
# create_blue_green_deployment method usage example with argument unpacking
kwargs: CreateBlueGreenDeploymentRequestRequestTypeDef = { # (1)
"BlueGreenDeploymentName": ...,
"Source": ...,
}
parent.create_blue_green_deployment(**kwargs)
create_custom_db_engine_version#
Creates a custom DB engine version (CEV).
Type annotations and code completion for boto3.client("rds").create_custom_db_engine_version
method.
boto3 documentation
# create_custom_db_engine_version method definition
def create_custom_db_engine_version(
self,
*,
Engine: str,
EngineVersion: str,
DatabaseInstallationFilesS3BucketName: str = ...,
DatabaseInstallationFilesS3Prefix: str = ...,
ImageId: str = ...,
KMSKeyId: str = ...,
Description: str = ...,
Manifest: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
SourceCustomDbEngineVersionIdentifier: str = ...,
UseAwsProvidedLatestImage: bool = ...,
) -> DBEngineVersionResponseTypeDef: # (2)
...
# create_custom_db_engine_version method usage example with argument unpacking
kwargs: CreateCustomDBEngineVersionMessageRequestTypeDef = { # (1)
"Engine": ...,
"EngineVersion": ...,
}
parent.create_custom_db_engine_version(**kwargs)
create_db_cluster#
Creates a new Amazon Aurora DB cluster or Multi-AZ DB cluster.
Type annotations and code completion for boto3.client("rds").create_db_cluster
method.
boto3 documentation
# create_db_cluster method definition
def create_db_cluster(
self,
*,
DBClusterIdentifier: str,
Engine: str,
AvailabilityZones: Sequence[str] = ...,
BackupRetentionPeriod: int = ...,
CharacterSetName: str = ...,
DatabaseName: str = ...,
DBClusterParameterGroupName: str = ...,
VpcSecurityGroupIds: Sequence[str] = ...,
DBSubnetGroupName: str = ...,
EngineVersion: str = ...,
Port: int = ...,
MasterUsername: str = ...,
MasterUserPassword: str = ...,
OptionGroupName: str = ...,
PreferredBackupWindow: str = ...,
PreferredMaintenanceWindow: str = ...,
ReplicationSourceIdentifier: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
StorageEncrypted: bool = ...,
KmsKeyId: str = ...,
PreSignedUrl: str = ...,
EnableIAMDatabaseAuthentication: bool = ...,
BacktrackWindow: int = ...,
EnableCloudwatchLogsExports: Sequence[str] = ...,
EngineMode: str = ...,
ScalingConfiguration: ScalingConfigurationTypeDef = ..., # (2)
DeletionProtection: bool = ...,
GlobalClusterIdentifier: str = ...,
EnableHttpEndpoint: bool = ...,
CopyTagsToSnapshot: bool = ...,
Domain: str = ...,
DomainIAMRoleName: str = ...,
EnableGlobalWriteForwarding: bool = ...,
DBClusterInstanceClass: str = ...,
AllocatedStorage: int = ...,
StorageType: str = ...,
Iops: int = ...,
PubliclyAccessible: bool = ...,
AutoMinorVersionUpgrade: bool = ...,
MonitoringInterval: int = ...,
MonitoringRoleArn: str = ...,
EnablePerformanceInsights: bool = ...,
PerformanceInsightsKMSKeyId: str = ...,
PerformanceInsightsRetentionPeriod: int = ...,
ServerlessV2ScalingConfiguration: ServerlessV2ScalingConfigurationTypeDef = ..., # (3)
NetworkType: str = ...,
DBSystemId: str = ...,
ManageMasterUserPassword: bool = ...,
MasterUserSecretKmsKeyId: str = ...,
EnableLocalWriteForwarding: bool = ...,
SourceRegion: str = ...,
) -> CreateDBClusterResultTypeDef: # (4)
...
- See TagTypeDef
- See ScalingConfigurationTypeDef
- See ServerlessV2ScalingConfigurationTypeDef
- See CreateDBClusterResultTypeDef
# create_db_cluster method usage example with argument unpacking
kwargs: CreateDBClusterMessageRequestTypeDef = { # (1)
"DBClusterIdentifier": ...,
"Engine": ...,
}
parent.create_db_cluster(**kwargs)
create_db_cluster_endpoint#
Creates a new custom endpoint and associates it with an Amazon Aurora DB cluster.
Type annotations and code completion for boto3.client("rds").create_db_cluster_endpoint
method.