Class: Aws::RedshiftDataAPIService::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::RedshiftDataAPIService::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb
Overview
An API client for RedshiftDataAPIService. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::RedshiftDataAPIService::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#batch_execute_statement(params = {}) ⇒ Types::BatchExecuteStatementOutput
Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL).
-
#cancel_statement(params = {}) ⇒ Types::CancelStatementResponse
Cancels a running query.
-
#describe_statement(params = {}) ⇒ Types::DescribeStatementResponse
Describes the details about a specific instance when a query was run by the Amazon Redshift Data API.
-
#describe_table(params = {}) ⇒ Types::DescribeTableResponse
Describes the detailed information about a table from metadata in the cluster.
-
#execute_statement(params = {}) ⇒ Types::ExecuteStatementOutput
Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL).
-
#get_statement_result(params = {}) ⇒ Types::GetStatementResultResponse
Fetches the temporarily cached result of an SQL statement.
-
#list_databases(params = {}) ⇒ Types::ListDatabasesResponse
List the databases in a cluster.
-
#list_schemas(params = {}) ⇒ Types::ListSchemasResponse
Lists the schemas in a database.
-
#list_statements(params = {}) ⇒ Types::ListStatementsResponse
List of SQL statements.
-
#list_tables(params = {}) ⇒ Types::ListTablesResponse
List the tables in a database.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
451 452 453 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 451 def initialize(*args) super end |
Instance Method Details
#batch_execute_statement(params = {}) ⇒ Types::BatchExecuteStatementOutput
Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the
secret-arn
of a secret stored in Secrets Manager which hasusername
andpassword
. The specified secret contains credentials to connect to thedatabase
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift-serverless:GetCredentials
operation is required.When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift:GetClusterCredentialsWithIAM
operation is required.When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the
redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
598 599 600 601 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 598 def batch_execute_statement(params = {}, = {}) req = build_request(:batch_execute_statement, params) req.send_request() end |
#cancel_statement(params = {}) ⇒ Types::CancelStatementResponse
Cancels a running query. To be canceled, a query must be running.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
637 638 639 640 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 637 def cancel_statement(params = {}, = {}) req = build_request(:cancel_statement, params) req.send_request() end |
#describe_statement(params = {}) ⇒ Types::DescribeStatementResponse
Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
733 734 735 736 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 733 def describe_statement(params = {}, = {}) req = build_request(:describe_statement, params) req.send_request() end |
#describe_table(params = {}) ⇒ Types::DescribeTableResponse
Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the
secret-arn
of a secret stored in Secrets Manager which hasusername
andpassword
. The specified secret contains credentials to connect to thedatabase
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift-serverless:GetCredentials
operation is required.When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift:GetClusterCredentialsWithIAM
operation is required.When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the
redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
877 878 879 880 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 877 def describe_table(params = {}, = {}) req = build_request(:describe_table, params) req.send_request() end |
#execute_statement(params = {}) ⇒ Types::ExecuteStatementOutput
Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This statement must be a single SQL statement. Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the
secret-arn
of a secret stored in Secrets Manager which hasusername
andpassword
. The specified secret contains credentials to connect to thedatabase
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift-serverless:GetCredentials
operation is required.When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift:GetClusterCredentialsWithIAM
operation is required.When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the
redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
1028 1029 1030 1031 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 1028 def execute_statement(params = {}, = {}) req = build_request(:execute_statement, params) req.send_request() end |
#get_statement_result(params = {}) ⇒ Types::GetStatementResultResponse
Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1108 1109 1110 1111 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 1108 def get_statement_result(params = {}, = {}) req = build_request(:get_statement_result, params) req.send_request() end |
#list_databases(params = {}) ⇒ Types::ListDatabasesResponse
List the databases in a cluster. A token is returned to page through the database list. Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the
secret-arn
of a secret stored in Secrets Manager which hasusername
andpassword
. The specified secret contains credentials to connect to thedatabase
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift-serverless:GetCredentials
operation is required.When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift:GetClusterCredentialsWithIAM
operation is required.When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the
redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1220 1221 1222 1223 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 1220 def list_databases(params = {}, = {}) req = build_request(:list_databases, params) req.send_request() end |
#list_schemas(params = {}) ⇒ Types::ListSchemasResponse
Lists the schemas in a database. A token is returned to page through the schema list. Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the
secret-arn
of a secret stored in Secrets Manager which hasusername
andpassword
. The specified secret contains credentials to connect to thedatabase
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift-serverless:GetCredentials
operation is required.When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift:GetClusterCredentialsWithIAM
operation is required.When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the
redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1345 1346 1347 1348 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 1345 def list_schemas(params = {}, = {}) req = build_request(:list_schemas, params) req.send_request() end |
#list_statements(params = {}) ⇒ Types::ListStatementsResponse
List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1448 1449 1450 1451 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 1448 def list_statements(params = {}, = {}) req = build_request(:list_statements, params) req.send_request() end |
#list_tables(params = {}) ⇒ Types::ListTablesResponse
List the tables in a database. If neither SchemaPattern
nor
TablePattern
are specified, then all tables in the database are
returned. A token is returned to page through the table list.
Depending on the authorization method, use one of the following
combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the
secret-arn
of a secret stored in Secrets Manager which hasusername
andpassword
. The specified secret contains credentials to connect to thedatabase
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift-serverless:GetCredentials
operation is required.When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example,
arn:iam::123456789012:user:foo
has the database user nameIAM:foo
. Also, permission to call theredshift:GetClusterCredentialsWithIAM
operation is required.When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the
redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1590 1591 1592 1593 |
# File 'gems/aws-sdk-redshiftdataapiservice/lib/aws-sdk-redshiftdataapiservice/client.rb', line 1590 def list_tables(params = {}, = {}) req = build_request(:list_tables, params) req.send_request() end |