Reference documentation and code samples for the Cloud SQL Admin V1BETA4 API class Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesService::Client.
Client for the SqlWorkloadCapturesService service.
Cloud SQL Workload Captures service.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the SqlWorkloadCapturesService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all SqlWorkloadCapturesService clients ::Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the SqlWorkloadCapturesService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#initialize
def initialize() { |config| ... } -> ClientCreate a new SqlWorkloadCapturesService client object.
- (config) — Configure the SqlWorkloadCapturesService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesService::Client.new do |config| config.timeout = 10.0 end
#list
def list(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::WorkloadCapturesListResponse
def list(project: nil, instance: nil) -> ::Google::Cloud::Sql::V1beta4::WorkloadCapturesListResponseLists all captured workloads associated with the instance.
def list(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::WorkloadCapturesListResponselist via a request object, either of type
Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesListRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesListRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list(project: nil, instance: nil) -> ::Google::Cloud::Sql::V1beta4::WorkloadCapturesListResponselist via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project (::String) — Required. Project ID of the project that contains the instance.
- instance (::String) — Required. Cloud SQL instance ID. This does not include the project ID.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Sql::V1beta4::WorkloadCapturesListResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/sql/v1beta4" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesListRequest.new # Call the list method. result = client.list request # The returned object is of type Google::Cloud::Sql::V1beta4::WorkloadCapturesListResponse. p result
#location_client
def location_client() -> Google::Cloud::Location::Locations::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#start
def start(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operation
def start(project: nil, instance: nil, start_workload_capture_context: nil) -> ::Google::Cloud::Sql::V1beta4::OperationStarts capturing the SQL queries, transactions, and other operations executed on the primary instance. This traffic is securely stored and forms a "captured workload". This workload can be replayed later on a different instance to safely test performance impacts, database upgrades, configuration changes etc. before applying them to production.
def start(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operationstart via a request object, either of type
Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStartRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStartRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def start(project: nil, instance: nil, start_workload_capture_context: nil) -> ::Google::Cloud::Sql::V1beta4::Operationstart via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project (::String) — Required. Project ID of the project that contains the instance.
- instance (::String) — Required. Cloud SQL instance ID. This does not include the project ID.
- start_workload_capture_context (::Google::Cloud::Sql::V1beta4::StartWorkloadCaptureContext, ::Hash) — Optional. Contains details about the start workload capture operation.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Sql::V1beta4::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/sql/v1beta4" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStartRequest.new # Call the start method. result = client.start request # The returned object is of type Google::Cloud::Sql::V1beta4::Operation. p result
#start_replay
def start_replay(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operation
def start_replay(project: nil, instance: nil, start_workload_replay_context: nil, workload_id: nil) -> ::Google::Cloud::Sql::V1beta4::OperationStarts executing a captured workload on a separate Cloud SQL instance provisioned for workload replay. This target instance simulates the production environment without affecting the primary instance.
def start_replay(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operationstart_replay via a request object, either of type
Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStartReplayRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStartReplayRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def start_replay(project: nil, instance: nil, start_workload_replay_context: nil, workload_id: nil) -> ::Google::Cloud::Sql::V1beta4::Operationstart_replay via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project (::String) — Required. Project ID of the project that contains the instance.
- instance (::String) — Required. Cloud SQL instance ID. This does not include the project ID.
- start_workload_replay_context (::Google::Cloud::Sql::V1beta4::StartWorkloadReplayContext, ::Hash) — Required. Contains details about the start workload replay operation.
- workload_id (::String) — Required. The ID of the workload to replay.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Sql::V1beta4::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/sql/v1beta4" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStartReplayRequest.new # Call the start_replay method. result = client.start_replay request # The returned object is of type Google::Cloud::Sql::V1beta4::Operation. p result
#stop
def stop(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operation
def stop(project: nil, instance: nil, stop_workload_capture_context: nil) -> ::Google::Cloud::Sql::V1beta4::OperationStops capturing the query traffic and related operations executed on the primary instance.
def stop(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operationstop via a request object, either of type
Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStopRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStopRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def stop(project: nil, instance: nil, stop_workload_capture_context: nil) -> ::Google::Cloud::Sql::V1beta4::Operationstop via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project (::String) — Required. Project ID of the project that contains the instance.
- instance (::String) — Required. Cloud SQL instance ID. This does not include the project ID.
- stop_workload_capture_context (::Google::Cloud::Sql::V1beta4::StopWorkloadCaptureContext, ::Hash) — Optional. Contains details about the stop workload capture operation.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Sql::V1beta4::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/sql/v1beta4" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStopRequest.new # Call the stop method. result = client.stop request # The returned object is of type Google::Cloud::Sql::V1beta4::Operation. p result
#stop_replay
def stop_replay(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operation
def stop_replay(project: nil, instance: nil, stop_workload_replay_context: nil) -> ::Google::Cloud::Sql::V1beta4::OperationStops an active workload replay on the target Cloud SQL replay instance.
def stop_replay(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operationstop_replay via a request object, either of type
Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStopReplayRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStopReplayRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def stop_replay(project: nil, instance: nil, stop_workload_replay_context: nil) -> ::Google::Cloud::Sql::V1beta4::Operationstop_replay via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project (::String) — Required. Project ID of the project that contains the target replay instance.
- instance (::String) — Required. Cloud SQL instance ID of the target replay instance. This does not include the project ID.
- stop_workload_replay_context (::Google::Cloud::Sql::V1beta4::StopWorkloadReplayContext, ::Hash) — Optional. Contains details about the stop workload replay operation.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Sql::V1beta4::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/sql/v1beta4" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::SqlWorkloadCapturesStopReplayRequest.new # Call the stop_replay method. result = client.stop_replay request # The returned object is of type Google::Cloud::Sql::V1beta4::Operation. p result
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)