Skip to content

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

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.

Usage example
client = boto3.client("rds-data")

try:
    do_something(client)
except (
    client.AccessDeniedException,
    client.BadRequestException,
    client.ClientError,
    client.ForbiddenException,
    client.InternalServerErrorException,
    client.NotFoundException,
    client.ServiceUnavailableError,
    client.StatementTimeoutException,
) as e:
    print(e)
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

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)
    ...
  1. See SqlParameterTypeDef
  2. See BatchExecuteStatementResponseTypeDef
Usage example with kwargs
kwargs: BatchExecuteStatementRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "secretArn": ...,
    "sql": ...,
}

parent.batch_execute_statement(**kwargs)
  1. See BatchExecuteStatementRequestRequestTypeDef

begin_transaction

Starts a SQL transaction.

Type annotations and code completion for boto3.client("rds-data").begin_transaction method. boto3 documentation

Method definition
def begin_transaction(
    self,
    *,
    resourceArn: str,
    secretArn: str,
    database: str = ...,
    schema: str = ...,
) -> BeginTransactionResponseTypeDef:  # (1)
    ...
  1. See BeginTransactionResponseTypeDef
Usage example with kwargs
kwargs: BeginTransactionRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "secretArn": ...,
}

parent.begin_transaction(**kwargs)
  1. See BeginTransactionRequestRequestTypeDef

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("rds-data").can_paginate method. boto3 documentation

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

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

Method definition
def commit_transaction(
    self,
    *,
    resourceArn: str,
    secretArn: str,
    transactionId: str,
) -> CommitTransactionResponseTypeDef:  # (1)
    ...
  1. See CommitTransactionResponseTypeDef
Usage example with kwargs
kwargs: CommitTransactionRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "secretArn": ...,
    "transactionId": ...,
}

parent.commit_transaction(**kwargs)
  1. See CommitTransactionRequestRequestTypeDef

execute_sql

Runs one or more SQL statements.

Type annotations and code completion for boto3.client("rds-data").execute_sql method. boto3 documentation

Method definition
def execute_sql(
    self,
    *,
    dbClusterOrInstanceArn: str,
    awsSecretStoreArn: str,
    sqlStatements: str,
    database: str = ...,
    schema: str = ...,
) -> ExecuteSqlResponseTypeDef:  # (1)
    ...
  1. See ExecuteSqlResponseTypeDef
Usage example with kwargs
kwargs: ExecuteSqlRequestRequestTypeDef = {  # (1)
    "dbClusterOrInstanceArn": ...,
    "awsSecretStoreArn": ...,
    "sqlStatements": ...,
}

parent.execute_sql(**kwargs)
  1. See ExecuteSqlRequestRequestTypeDef

execute_statement

Runs a SQL statement against a database.

Type annotations and code completion for boto3.client("rds-data").execute_statement method. boto3 documentation

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)
    ...
  1. See SqlParameterTypeDef
  2. See ResultSetOptionsTypeDef
  3. See RecordsFormatTypeType
  4. See ExecuteStatementResponseTypeDef
Usage example with kwargs
kwargs: ExecuteStatementRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "secretArn": ...,
    "sql": ...,
}

parent.execute_statement(**kwargs)
  1. See ExecuteStatementRequestRequestTypeDef

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

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

Method definition
def rollback_transaction(
    self,
    *,
    resourceArn: str,
    secretArn: str,
    transactionId: str,
) -> RollbackTransactionResponseTypeDef:  # (1)
    ...
  1. See RollbackTransactionResponseTypeDef
Usage example with kwargs
kwargs: RollbackTransactionRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "secretArn": ...,
    "transactionId": ...,
}

parent.rollback_transaction(**kwargs)
  1. See RollbackTransactionRequestRequestTypeDef