RedshiftDataAPIServiceClient#
Index > RedshiftDataAPIService > RedshiftDataAPIServiceClient
Auto-generated documentation for RedshiftDataAPIService type annotations stubs module mypy-boto3-redshift-data.
RedshiftDataAPIServiceClient#
Type annotations and code completion for boto3.client("redshift-data")
.
boto3 documentation
# RedshiftDataAPIServiceClient usage example
from boto3.session import Session
from mypy_boto3_redshift_data.client import RedshiftDataAPIServiceClient
def get_redshift-data_client() -> RedshiftDataAPIServiceClient:
return Session().client("redshift-data")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("redshift-data").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("redshift-data")
try:
do_something(client)
except (
client.exceptions.ActiveSessionsExceededException,
client.exceptions.ActiveStatementsExceededException,
client.exceptions.BatchExecuteStatementException,
client.exceptions.ClientError,
client.exceptions.DatabaseConnectionException,
client.exceptions.ExecuteStatementException,
client.exceptions.InternalServerException,
client.exceptions.QueryTimeoutException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ValidationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_redshift_data.client import Exceptions
def handle_error(exc: Exceptions.ActiveSessionsExceededException) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for boto3.client("redshift-data").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("redshift-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:
...
batch_execute_statement#
Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL).
Type annotations and code completion for boto3.client("redshift-data").batch_execute_statement
method.
boto3 documentation
# batch_execute_statement method definition
def batch_execute_statement(
self,
*,
Sqls: Sequence[str],
ClientToken: str = ...,
ClusterIdentifier: str = ...,
Database: str = ...,
DbUser: str = ...,
ResultFormat: ResultFormatStringType = ..., # (1)
SecretArn: str = ...,
SessionId: str = ...,
SessionKeepAliveSeconds: int = ...,
StatementName: str = ...,
WithEvent: bool = ...,
WorkgroupName: str = ...,
) -> BatchExecuteStatementOutputTypeDef: # (2)
...
# batch_execute_statement method usage example with argument unpacking
kwargs: BatchExecuteStatementInputRequestTypeDef = { # (1)
"Sqls": ...,
}
parent.batch_execute_statement(**kwargs)
cancel_statement#
Cancels a running query.
Type annotations and code completion for boto3.client("redshift-data").cancel_statement
method.
boto3 documentation
# cancel_statement method definition
def cancel_statement(
self,
*,
Id: str,
) -> CancelStatementResponseTypeDef: # (1)
...
# cancel_statement method usage example with argument unpacking
kwargs: CancelStatementRequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.cancel_statement(**kwargs)
describe_statement#
Describes the details about a specific instance when a query was run by the Amazon Redshift Data API.
Type annotations and code completion for boto3.client("redshift-data").describe_statement
method.
boto3 documentation
# describe_statement method definition
def describe_statement(
self,
*,
Id: str,
) -> DescribeStatementResponseTypeDef: # (1)
...
# describe_statement method usage example with argument unpacking
kwargs: DescribeStatementRequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.describe_statement(**kwargs)
describe_table#
Describes the detailed information about a table from metadata in the cluster.
Type annotations and code completion for boto3.client("redshift-data").describe_table
method.
boto3 documentation
# describe_table method definition
def describe_table(
self,
*,
Database: str,
ClusterIdentifier: str = ...,
ConnectedDatabase: str = ...,
DbUser: str = ...,
MaxResults: int = ...,
NextToken: str = ...,
Schema: str = ...,
SecretArn: str = ...,
Table: str = ...,
WorkgroupName: str = ...,
) -> DescribeTableResponseTypeDef: # (1)
...
# describe_table method usage example with argument unpacking
kwargs: DescribeTableRequestRequestTypeDef = { # (1)
"Database": ...,
}
parent.describe_table(**kwargs)
execute_statement#
Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL).
Type annotations and code completion for boto3.client("redshift-data").execute_statement
method.
boto3 documentation
# execute_statement method definition
def execute_statement(
self,
*,
Sql: str,
ClientToken: str = ...,
ClusterIdentifier: str = ...,
Database: str = ...,
DbUser: str = ...,
Parameters: Sequence[SqlParameterTypeDef] = ..., # (1)
ResultFormat: ResultFormatStringType = ..., # (2)
SecretArn: str = ...,
SessionId: str = ...,
SessionKeepAliveSeconds: int = ...,
StatementName: str = ...,
WithEvent: bool = ...,
WorkgroupName: str = ...,
) -> ExecuteStatementOutputTypeDef: # (3)
...
# execute_statement method usage example with argument unpacking
kwargs: ExecuteStatementInputRequestTypeDef = { # (1)
"Sql": ...,
}
parent.execute_statement(**kwargs)
get_statement_result#
Fetches the temporarily cached result of an SQL statement in JSON format.
Type annotations and code completion for boto3.client("redshift-data").get_statement_result
method.
boto3 documentation
# get_statement_result method definition
def get_statement_result(
self,
*,
Id: str,
NextToken: str = ...,
) -> GetStatementResultResponseTypeDef: # (1)
...
# get_statement_result method usage example with argument unpacking
kwargs: GetStatementResultRequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.get_statement_result(**kwargs)
get_statement_result_v2#
Fetches the temporarily cached result of an SQL statement in CSV format.
Type annotations and code completion for boto3.client("redshift-data").get_statement_result_v2
method.
boto3 documentation
# get_statement_result_v2 method definition
def get_statement_result_v2(
self,
*,
Id: str,
NextToken: str = ...,
) -> GetStatementResultV2ResponseTypeDef: # (1)
...
# get_statement_result_v2 method usage example with argument unpacking
kwargs: GetStatementResultV2RequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.get_statement_result_v2(**kwargs)
list_databases#
List the databases in a cluster.
Type annotations and code completion for boto3.client("redshift-data").list_databases
method.
boto3 documentation
# list_databases method definition
def list_databases(
self,
*,
Database: str,
ClusterIdentifier: str = ...,
DbUser: str = ...,
MaxResults: int = ...,
NextToken: str = ...,
SecretArn: str = ...,
WorkgroupName: str = ...,
) -> ListDatabasesResponseTypeDef: # (1)
...
# list_databases method usage example with argument unpacking
kwargs: ListDatabasesRequestRequestTypeDef = { # (1)
"Database": ...,
}
parent.list_databases(**kwargs)
list_schemas#
Lists the schemas in a database.
Type annotations and code completion for boto3.client("redshift-data").list_schemas
method.
boto3 documentation
# list_schemas method definition
def list_schemas(
self,
*,
Database: str,
ClusterIdentifier: str = ...,
ConnectedDatabase: str = ...,
DbUser: str = ...,
MaxResults: int = ...,
NextToken: str = ...,
SchemaPattern: str = ...,
SecretArn: str = ...,
WorkgroupName: str = ...,
) -> ListSchemasResponseTypeDef: # (1)
...
# list_schemas method usage example with argument unpacking
kwargs: ListSchemasRequestRequestTypeDef = { # (1)
"Database": ...,
}
parent.list_schemas(**kwargs)
list_statements#
List of SQL statements.
Type annotations and code completion for boto3.client("redshift-data").list_statements
method.
boto3 documentation
# list_statements method definition
def list_statements(
self,
*,
MaxResults: int = ...,
NextToken: str = ...,
RoleLevel: bool = ...,
StatementName: str = ...,
Status: StatusStringType = ..., # (1)
) -> ListStatementsResponseTypeDef: # (2)
...
# list_statements method usage example with argument unpacking
kwargs: ListStatementsRequestRequestTypeDef = { # (1)
"MaxResults": ...,
}
parent.list_statements(**kwargs)
list_tables#
List the tables in a database.
Type annotations and code completion for boto3.client("redshift-data").list_tables
method.
boto3 documentation
# list_tables method definition
def list_tables(
self,
*,
Database: str,
ClusterIdentifier: str = ...,
ConnectedDatabase: str = ...,
DbUser: str = ...,
MaxResults: int = ...,
NextToken: str = ...,
SchemaPattern: str = ...,
SecretArn: str = ...,
TablePattern: str = ...,
WorkgroupName: str = ...,
) -> ListTablesResponseTypeDef: # (1)
...
# list_tables method usage example with argument unpacking
kwargs: ListTablesRequestRequestTypeDef = { # (1)
"Database": ...,
}
parent.list_tables(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("redshift-data").get_paginator
method with overloads.
client.get_paginator("describe_table")
-> DescribeTablePaginatorclient.get_paginator("get_statement_result")
-> GetStatementResultPaginatorclient.get_paginator("get_statement_result_v2")
-> GetStatementResultV2Paginatorclient.get_paginator("list_databases")
-> ListDatabasesPaginatorclient.get_paginator("list_schemas")
-> ListSchemasPaginatorclient.get_paginator("list_statements")
-> ListStatementsPaginatorclient.get_paginator("list_tables")
-> ListTablesPaginator