Reference documentation and code samples for the Cloud SQL Admin V1BETA4 API class Google::Cloud::Sql::V1beta4::BlueGreenDeploymentsService::Rest::Client.
REST client for the BlueGreenDeploymentsService service.
Service for managing blue-green deployments.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the BlueGreenDeploymentsService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all BlueGreenDeploymentsService clients ::Google::Cloud::Sql::V1beta4::BlueGreenDeploymentsService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the BlueGreenDeploymentsService 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)
#create_blue_green_deployment
def create_blue_green_deployment(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operation
def create_blue_green_deployment(parent: nil, blue_green_deployment_id: nil, blue_green_deployment: nil) -> ::Google::Cloud::Sql::V1beta4::OperationCreates a blue-green deployment under a given project and location. This deployment provisions a synchronized green environment (target instance) from a blue production environment (source instance), facilitating updates like major version upgrades on the green instance without impacting the blue instance.
def create_blue_green_deployment(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operationcreate_blue_green_deployment via a request object, either of type
CreateBlueGreenDeploymentRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::CreateBlueGreenDeploymentRequest, ::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 create_blue_green_deployment(parent: nil, blue_green_deployment_id: nil, blue_green_deployment: nil) -> ::Google::Cloud::Sql::V1beta4::Operationcreate_blue_green_deployment 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).
- parent (::String) — Required. The parent resource where this blue-green deployment will be created. Format: projects/{project}/locations/{location}
- blue_green_deployment_id (::String) — Required. The ID to use for the blue-green deployment, which will become the final component of the deployment's resource name.
-
blue_green_deployment (::Google::Cloud::Sql::V1beta4::BlueGreenDeployment, ::Hash) — Required. The
BlueGreenDeploymentresource to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Sql::V1beta4::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::BlueGreenDeploymentsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::CreateBlueGreenDeploymentRequest.new # Call the create_blue_green_deployment method. result = client.create_blue_green_deployment request # The returned object is of type Google::Cloud::Sql::V1beta4::Operation. p result
#delete_blue_green_deployment
def delete_blue_green_deployment(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operation
def delete_blue_green_deployment(name: nil, delete_old_source: nil) -> ::Google::Cloud::Sql::V1beta4::OperationDeletes a blue-green deployment, including metadata and underlying
resources based on the deployment state. If issued before switchover,
this deletes the green instance. If issued after switchover, this deletes
the old blue instance (source instance) if the delete_old_source field
in the request is set to true.
All blue-green deployment metadata is permanently deleted.
Resources deleted as a result of this operation are no longer accessible
and can't be restored.
def delete_blue_green_deployment(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operationdelete_blue_green_deployment via a request object, either of type
DeleteBlueGreenDeploymentRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::DeleteBlueGreenDeploymentRequest, ::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 delete_blue_green_deployment(name: nil, delete_old_source: nil) -> ::Google::Cloud::Sql::V1beta4::Operationdelete_blue_green_deployment 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).
- name (::String) — Required. The name of the blue-green deployment to delete. Format: projects/{project}/locations/{location}/blueGreenDeployments/{blue_green_deployment}
- delete_old_source (::Boolean) — Optional. If set to true, and the switchover is complete, this deletes the old source instance along with the deployment.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Sql::V1beta4::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::BlueGreenDeploymentsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::DeleteBlueGreenDeploymentRequest.new # Call the delete_blue_green_deployment method. result = client.delete_blue_green_deployment request # The returned object is of type Google::Cloud::Sql::V1beta4::Operation. p result
#get_blue_green_deployment
def get_blue_green_deployment(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::BlueGreenDeployment
def get_blue_green_deployment(name: nil, view: nil) -> ::Google::Cloud::Sql::V1beta4::BlueGreenDeploymentRetrieves a blue-green deployment resource under a given project and location.
def get_blue_green_deployment(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::BlueGreenDeploymentget_blue_green_deployment via a request object, either of type
GetBlueGreenDeploymentRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::GetBlueGreenDeploymentRequest, ::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 get_blue_green_deployment(name: nil, view: nil) -> ::Google::Cloud::Sql::V1beta4::BlueGreenDeploymentget_blue_green_deployment 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).
- name (::String) — Required. The name of the blue-green deployment to retrieve. Format: projects/{project}/locations/{location}/blueGreenDeployments/{blue_green_deployment}
- view (::Google::Cloud::Sql::V1beta4::GetBlueGreenDeploymentRequest::BlueGreenDeploymentView) — Optional. Specifies whether to return the basic or detailed view of the resource in the response.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Sql::V1beta4::BlueGreenDeployment)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::BlueGreenDeploymentsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::GetBlueGreenDeploymentRequest.new # Call the get_blue_green_deployment method. result = client.get_blue_green_deployment request # The returned object is of type Google::Cloud::Sql::V1beta4::BlueGreenDeployment. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new BlueGreenDeploymentsService REST client object.
- (config) — Configure the BlueGreenDeploymentsService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Sql::V1beta4::BlueGreenDeploymentsService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Sql::V1beta4::BlueGreenDeploymentsService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_blue_green_deployments
def list_blue_green_deployments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Sql::V1beta4::BlueGreenDeployment>
def list_blue_green_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Sql::V1beta4::BlueGreenDeployment>Lists blue-green deployments under a given project.
def list_blue_green_deployments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Sql::V1beta4::BlueGreenDeployment>list_blue_green_deployments via a request object, either of type
ListBlueGreenDeploymentsRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::ListBlueGreenDeploymentsRequest, ::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_blue_green_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Sql::V1beta4::BlueGreenDeployment>list_blue_green_deployments 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).
- parent (::String) — Required. The parent resource whose blue-green deployments are to be listed. Format: projects/{project}/locations/{location}
- page_size (::Integer) — Optional. The maximum number of deployments to return.
-
page_token (::String) — Optional. A page token, received from a previous
ListBlueGreenDeploymentscall. Provide this to retrieve the subsequent page. - filter (::String) — Optional. A filter expression that filters the results.
- order_by (::String) — Optional. A comma-separated list of fields to order the results by.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Sql::V1beta4::BlueGreenDeployment>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Sql::V1beta4::BlueGreenDeployment>)
- (::Google::Cloud::Error) — if the REST call 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::BlueGreenDeploymentsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::ListBlueGreenDeploymentsRequest.new # Call the list_blue_green_deployments method. result = client.list_blue_green_deployments request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Sql::V1beta4::BlueGreenDeployment. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#switchover_blue_green_deployment
def switchover_blue_green_deployment(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operation
def switchover_blue_green_deployment(name: nil) -> ::Google::Cloud::Sql::V1beta4::OperationSwitches over to green instance for a blue-green deployment.
def switchover_blue_green_deployment(request, options = nil) -> ::Google::Cloud::Sql::V1beta4::Operationswitchover_blue_green_deployment via a request object, either of type
SwitchoverBlueGreenDeploymentRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1beta4::SwitchoverBlueGreenDeploymentRequest, ::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 switchover_blue_green_deployment(name: nil) -> ::Google::Cloud::Sql::V1beta4::Operationswitchover_blue_green_deployment 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).
- name (::String) — Required. The name of the blue-green deployment to switch over. Format: projects/{project}/locations/{location}/blueGreenDeployments/{blue_green_deployment}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Sql::V1beta4::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::BlueGreenDeploymentsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1beta4::SwitchoverBlueGreenDeploymentRequest.new # Call the switchover_blue_green_deployment method. result = client.switchover_blue_green_deployment request # The returned object is of type Google::Cloud::Sql::V1beta4::Operation. p result
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)