Skip to content

RedshiftDataAPIServiceClient

Index > RedshiftDataAPIService > RedshiftDataAPIServiceClient

Auto-generated documentation for RedshiftDataAPIService type annotations stubs module types-aiobotocore-redshift-data.

RedshiftDataAPIServiceClient

Type annotations and code completion for session.client("redshift-data") boto3 documentation

Usage example
from aioboto3.session import Session
from types_aiobotocore_redshift_data.client import RedshiftDataAPIServiceClient

session = Session()
async with session.client("redshift-data") as client:
    client: RedshiftDataAPIServiceClient

Exceptions

aioboto3 client exceptions are generated in runtime. This class provides code completion for session.client("redshift-data").exceptions structure.

Usage example
async with session.client("redshift-data") as client:
    try:
        do_something(client)
    except (
            client.ActiveStatementsExceededException,
        client.BatchExecuteStatementException,
        client.ClientError,
        client.DatabaseConnectionException,
        client.ExecuteStatementException,
        client.InternalServerException,
        client.ResourceNotFoundException,
        client.ValidationException,
    ) as e:
        print(e)
Type checking example
from types_aiobotocore_redshift_data.client import Exceptions

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

Methods

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 session.client("redshift-data").batch_execute_statement method. boto3 documentation

Method definition
await def batch_execute_statement(
    self,
    *,
    Database: str,
    Sqls: Sequence[str],
    ClusterIdentifier: str = ...,
    DbUser: str = ...,
    SecretArn: str = ...,
    StatementName: str = ...,
    WithEvent: bool = ...,
    WorkgroupName: str = ...,
) -> BatchExecuteStatementOutputTypeDef:  # (1)
    ...
  1. See BatchExecuteStatementOutputTypeDef
Usage example with kwargs
kwargs: BatchExecuteStatementInputRequestTypeDef = {  # (1)
    "Database": ...,
    "Sqls": ...,
}

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

can_paginate

Check if an operation can be paginated.

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

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

cancel_statement

Cancels a running query.

Type annotations and code completion for session.client("redshift-data").cancel_statement method. boto3 documentation

Method definition
await def cancel_statement(
    self,
    *,
    Id: str,
) -> CancelStatementResponseTypeDef:  # (1)
    ...
  1. See CancelStatementResponseTypeDef
Usage example with kwargs
kwargs: CancelStatementRequestRequestTypeDef = {  # (1)
    "Id": ...,
}

parent.cancel_statement(**kwargs)
  1. See CancelStatementRequestRequestTypeDef

close

Closes underlying endpoint connections.

Type annotations and code completion for session.client("redshift-data").close method. boto3 documentation

Method definition
await def close(
    self,
) -> None:
    ...

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 session.client("redshift-data").describe_statement method. boto3 documentation

Method definition
await def describe_statement(
    self,
    *,
    Id: str,
) -> DescribeStatementResponseTypeDef:  # (1)
    ...
  1. See DescribeStatementResponseTypeDef
Usage example with kwargs
kwargs: DescribeStatementRequestRequestTypeDef = {  # (1)
    "Id": ...,
}

parent.describe_statement(**kwargs)
  1. See DescribeStatementRequestRequestTypeDef

describe_table

Describes the detailed information about a table from metadata in the cluster.

Type annotations and code completion for session.client("redshift-data").describe_table method. boto3 documentation

Method definition
await 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)
    ...
  1. See DescribeTableResponseTypeDef
Usage example with kwargs
kwargs: DescribeTableRequestRequestTypeDef = {  # (1)
    "Database": ...,
}

parent.describe_table(**kwargs)
  1. See DescribeTableRequestRequestTypeDef

execute_statement

Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL).

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

Method definition
await def execute_statement(
    self,
    *,
    Database: str,
    Sql: str,
    ClusterIdentifier: str = ...,
    DbUser: str = ...,
    Parameters: Sequence[SqlParameterTypeDef] = ...,  # (1)
    SecretArn: str = ...,
    StatementName: str = ...,
    WithEvent: bool = ...,
    WorkgroupName: str = ...,
) -> ExecuteStatementOutputTypeDef:  # (2)
    ...
  1. See SqlParameterTypeDef
  2. See ExecuteStatementOutputTypeDef
Usage example with kwargs
kwargs: ExecuteStatementInputRequestTypeDef = {  # (1)
    "Database": ...,
    "Sql": ...,
}

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

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.client("redshift-data").generate_presigned_url method. boto3 documentation

Method definition
await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_statement_result

Fetches the temporarily cached result of an SQL statement.

Type annotations and code completion for session.client("redshift-data").get_statement_result method. boto3 documentation

Method definition
await def get_statement_result(
    self,
    *,
    Id: str,
    NextToken: str = ...,
) -> GetStatementResultResponseTypeDef:  # (1)
    ...
  1. See GetStatementResultResponseTypeDef
Usage example with kwargs
kwargs: GetStatementResultRequestRequestTypeDef = {  # (1)
    "Id": ...,
}

parent.get_statement_result(**kwargs)
  1. See GetStatementResultRequestRequestTypeDef

list_databases

List the databases in a cluster.

Type annotations and code completion for session.client("redshift-data").list_databases method. boto3 documentation

Method definition
await def list_databases(
    self,
    *,
    Database: str,
    ClusterIdentifier: str = ...,
    DbUser: str = ...,
    MaxResults: int = ...,
    NextToken: str = ...,
    SecretArn: str = ...,
    WorkgroupName: str = ...,
) -> ListDatabasesResponseTypeDef:  # (1)
    ...
  1. See ListDatabasesResponseTypeDef
Usage example with kwargs
kwargs: ListDatabasesRequestRequestTypeDef = {  # (1)
    "Database": ...,
}

parent.list_databases(**kwargs)
  1. See ListDatabasesRequestRequestTypeDef

list_schemas

Lists the schemas in a database.

Type annotations and code completion for session.client("redshift-data").list_schemas method. boto3 documentation

Method definition
await def list_schemas(
    self,
    *,
    Database: str,
    ClusterIdentifier: str = ...,
    ConnectedDatabase: str = ...,
    DbUser: str = ...,
    MaxResults: int = ...,
    NextToken: str = ...,
    SchemaPattern: str = ...,
    SecretArn: str = ...,
    WorkgroupName: str = ...,
) -> ListSchemasResponseTypeDef:  # (1)
    ...
  1. See ListSchemasResponseTypeDef
Usage example with kwargs
kwargs: ListSchemasRequestRequestTypeDef = {  # (1)
    "Database": ...,
}

parent.list_schemas(**kwargs)
  1. See ListSchemasRequestRequestTypeDef

list_statements

List of SQL statements.

Type annotations and code completion for session.client("redshift-data").list_statements method. boto3 documentation

Method definition
await def list_statements(
    self,
    *,
    MaxResults: int = ...,
    NextToken: str = ...,
    RoleLevel: bool = ...,
    StatementName: str = ...,
    Status: StatusStringType = ...,  # (1)
) -> ListStatementsResponseTypeDef:  # (2)
    ...
  1. See StatusStringType
  2. See ListStatementsResponseTypeDef
Usage example with kwargs
kwargs: ListStatementsRequestRequestTypeDef = {  # (1)
    "MaxResults": ...,
}

parent.list_statements(**kwargs)
  1. See ListStatementsRequestRequestTypeDef

list_tables

List the tables in a database.

Type annotations and code completion for session.client("redshift-data").list_tables method. boto3 documentation

Method definition
await 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)
    ...
  1. See ListTablesResponseTypeDef
Usage example with kwargs
kwargs: ListTablesRequestRequestTypeDef = {  # (1)
    "Database": ...,
}

parent.list_tables(**kwargs)
  1. See ListTablesRequestRequestTypeDef

__aenter__

Type annotations and code completion for session.client("redshift-data").__aenter__ method. boto3 documentation

Method definition
await def __aenter__(
    self,
) -> RedshiftDataAPIServiceClient:
    ...

__aexit__

Type annotations and code completion for session.client("redshift-data").__aexit__ method. boto3 documentation

Method definition
await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator

Type annotations and code completion for session.client("redshift-data").get_paginator method with overloads.