Class: Aws::RDSDataService::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::RDSDataService::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-rdsdataservice/client.rb
Overview
An API client for RDSDataService. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::RDSDataService::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#batch_execute_statement(params = {}) ⇒ Types::BatchExecuteStatementResponse
Runs a batch SQL statement over an array of data.
-
#begin_transaction(params = {}) ⇒ Types::BeginTransactionResponse
Starts a SQL transaction.
-
#commit_transaction(params = {}) ⇒ Types::CommitTransactionResponse
Ends a SQL transaction started with the ‘BeginTransaction` operation and commits the changes.
-
#execute_sql(params = {}) ⇒ Types::ExecuteSqlResponse
Runs one or more SQL statements.
-
#execute_statement(params = {}) ⇒ Types::ExecuteStatementResponse
Runs a SQL statement against a database.
-
#rollback_transaction(params = {}) ⇒ Types::RollbackTransactionResponse
Performs a rollback of a transaction.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
467 468 469 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 467 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1076 1077 1078 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 1076 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1079 1080 1081 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 1079 def errors_module Errors end |
Instance Method Details
#batch_execute_statement(params = {}) ⇒ Types::BatchExecuteStatementResponse
Runs a batch SQL statement over an array of data.
You can run bulk update and insert operations for multiple records using a DML statement with different parameter sets. Bulk operations can provide a significant performance improvement over individual insert and update operations.
<note markdown=“1”> If a call isn’t part of a transaction because it doesn’t include the ‘transactionID` parameter, changes that result from the call are committed automatically.
There isn't a fixed upper limit on the number of parameter sets.
However, the maximum size of the HTTP request submitted through the Data API is 4 MiB. If the request exceeds this limit, the Data API returns an error and doesn’t process the request. This 4-MiB limit includes the size of the HTTP headers and the JSON notation in the request. Thus, the number of parameter sets that you can include depends on a combination of factors, such as the size of the SQL statement and the size of each parameter set.
The response size limit is 1 MiB. If the call returns more than 1 MiB
of response data, the call is terminated.
</note>
617 618 619 620 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 617 def batch_execute_statement(params = {}, = {}) req = build_request(:batch_execute_statement, params) req.send_request() end |
#begin_transaction(params = {}) ⇒ Types::BeginTransactionResponse
Starts a SQL transaction.
<note markdown=“1”> A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.
A transaction times out if no calls use its transaction ID in three
minutes. If a transaction times out before it’s committed, it’s rolled back automatically.
For Aurora MySQL, DDL statements inside a transaction cause an
implicit commit. We recommend that you run each MySQL DDL statement in a separate ‘ExecuteStatement` call with `continueAfterTimeout` enabled.
</note>
671 672 673 674 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 671 def begin_transaction(params = {}, = {}) req = build_request(:begin_transaction, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 1049 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::RDSDataService') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-rdsdataservice' context[:gem_version] = '1.70.0' Seahorse::Client::Request.new(handlers, context) end |
#commit_transaction(params = {}) ⇒ Types::CommitTransactionResponse
Ends a SQL transaction started with the ‘BeginTransaction` operation and commits the changes.
708 709 710 711 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 708 def commit_transaction(params = {}, = {}) req = build_request(:commit_transaction, params) req.send_request() end |
#execute_sql(params = {}) ⇒ Types::ExecuteSqlResponse
Runs one or more SQL statements.
<note markdown=“1”> This operation isn’t supported for Aurora Serverless v2 and provisioned DB clusters. For Aurora Serverless v1 DB clusters, the operation is deprecated. Use the ‘BatchExecuteStatement` or `ExecuteStatement` operation.
</note>
803 804 805 806 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 803 def execute_sql(params = {}, = {}) req = build_request(:execute_sql, params) req.send_request() end |
#execute_statement(params = {}) ⇒ Types::ExecuteStatementResponse
Runs a SQL statement against a database.
<note markdown=“1”> If a call isn’t part of a transaction because it doesn’t include the ‘transactionID` parameter, changes that result from the call are committed automatically.
If the binary response data from the database is more than 1 MB, the
call is terminated.
</note>
1003 1004 1005 1006 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 1003 def execute_statement(params = {}, = {}) req = build_request(:execute_statement, params) req.send_request() end |
#rollback_transaction(params = {}) ⇒ Types::RollbackTransactionResponse
Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
1040 1041 1042 1043 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 1040 def rollback_transaction(params = {}, = {}) req = build_request(:rollback_transaction, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1069 1070 1071 |
# File 'lib/aws-sdk-rdsdataservice/client.rb', line 1069 def waiter_names [] end |