RDSDataServiceClient#
Index > RDSDataService > RDSDataServiceClient
Auto-generated documentation for RDSDataService type annotations stubs module mypy-boto3-rds-data.
RDSDataServiceClient#
Type annotations and code completion for boto3.client("rds-data")
.
boto3 documentation
# RDSDataServiceClient usage example
from boto3.session import Session
from mypy_boto3_rds_data.client import RDSDataServiceClient
def get_rds-data_client() -> RDSDataServiceClient:
return Session().client("rds-data")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("rds-data").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("rds-data")
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.BadRequestException,
client.exceptions.ClientError,
client.exceptions.DatabaseErrorException,
client.exceptions.DatabaseNotFoundException,
client.exceptions.DatabaseResumingException,
client.exceptions.DatabaseUnavailableException,
client.exceptions.ForbiddenException,
client.exceptions.HttpEndpointNotEnabledException,
client.exceptions.InternalServerErrorException,
client.exceptions.InvalidSecretException,
client.exceptions.NotFoundException,
client.exceptions.SecretsErrorException,
client.exceptions.ServiceUnavailableError,
client.exceptions.StatementTimeoutException,
client.exceptions.TransactionNotFoundException,
client.exceptions.UnsupportedResultException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_rds_data.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
batch_execute_statement#
Runs a batch SQL statement over an array of data.
Type annotations and code completion for boto3.client("rds-data").batch_execute_statement
method.
boto3 documentation
# batch_execute_statement method definition
def batch_execute_statement(
self,
*,
resourceArn: str,
secretArn: str,
sql: str,
database: str = ...,
schema: str = ...,
parameterSets: Sequence[Sequence[SqlParameterTypeDef]] = ..., # (1)
transactionId: str = ...,
) -> BatchExecuteStatementResponseTypeDef: # (2)
...
# batch_execute_statement method usage example with argument unpacking
kwargs: BatchExecuteStatementRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"secretArn": ...,
"sql": ...,
}
parent.batch_execute_statement(**kwargs)
begin_transaction#
Starts a SQL transaction.
Type annotations and code completion for boto3.client("rds-data").begin_transaction
method.
boto3 documentation
# begin_transaction method definition
def begin_transaction(
self,
*,
resourceArn: str,
secretArn: str,
database: str = ...,
schema: str = ...,
) -> BeginTransactionResponseTypeDef: # (1)
...
# begin_transaction method usage example with argument unpacking
kwargs: BeginTransactionRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"secretArn": ...,
}
parent.begin_transaction(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("rds-data").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("rds-data").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
commit_transaction#
Ends a SQL transaction started with the BeginTransaction
operation and
commits the changes.
Type annotations and code completion for boto3.client("rds-data").commit_transaction
method.
boto3 documentation
# commit_transaction method definition
def commit_transaction(
self,
*,
resourceArn: str,
secretArn: str,
transactionId: str,
) -> CommitTransactionResponseTypeDef: # (1)
...
# commit_transaction method usage example with argument unpacking
kwargs: CommitTransactionRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"secretArn": ...,
"transactionId": ...,
}
parent.commit_transaction(**kwargs)
execute_sql#
Runs one or more SQL statements.
Type annotations and code completion for boto3.client("rds-data").execute_sql
method.
boto3 documentation
# execute_sql method definition
def execute_sql(
self,
*,
dbClusterOrInstanceArn: str,
awsSecretStoreArn: str,
sqlStatements: str,
database: str = ...,
schema: str = ...,
) -> ExecuteSqlResponseTypeDef: # (1)
...
# execute_sql method usage example with argument unpacking
kwargs: ExecuteSqlRequestRequestTypeDef = { # (1)
"dbClusterOrInstanceArn": ...,
"awsSecretStoreArn": ...,
"sqlStatements": ...,
}
parent.execute_sql(**kwargs)
execute_statement#
Runs a SQL statement against a database.
Type annotations and code completion for boto3.client("rds-data").execute_statement
method.
boto3 documentation
# execute_statement method definition
def execute_statement(
self,
*,
resourceArn: str,
secretArn: str,
sql: str,
database: str = ...,
schema: str = ...,
parameters: Sequence[SqlParameterTypeDef] = ..., # (1)
transactionId: str = ...,
includeResultMetadata: bool = ...,
continueAfterTimeout: bool = ...,
resultSetOptions: ResultSetOptionsTypeDef = ..., # (2)
formatRecordsAs: RecordsFormatTypeType = ..., # (3)
) -> ExecuteStatementResponseTypeDef: # (4)
...
- See SqlParameterTypeDef
- See ResultSetOptionsTypeDef
- See RecordsFormatTypeType
- See ExecuteStatementResponseTypeDef
# execute_statement method usage example with argument unpacking
kwargs: ExecuteStatementRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"secretArn": ...,
"sql": ...,
}
parent.execute_statement(**kwargs)
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("rds-data").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
rollback_transaction#
Performs a rollback of a transaction.
Type annotations and code completion for boto3.client("rds-data").rollback_transaction
method.
boto3 documentation
# rollback_transaction method definition
def rollback_transaction(
self,
*,
resourceArn: str,
secretArn: str,
transactionId: str,
) -> RollbackTransactionResponseTypeDef: # (1)
...
# rollback_transaction method usage example with argument unpacking
kwargs: RollbackTransactionRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"secretArn": ...,
"transactionId": ...,
}
parent.rollback_transaction(**kwargs)