App Engine Admin V1 API - Class Google::Cloud::AppEngine::V1::Services::Rest::Client (v0.6.1)

Reference documentation and code samples for the App Engine Admin V1 API class Google::Cloud::AppEngine::V1::Services::Rest::Client.

REST client for the Services service.

Manages services of an application.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the Services Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all Services clients
::Google::Cloud::AppEngine::V1::Services::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the Services 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#delete_service

def delete_service(request, options = nil) -> ::Gapic::Operation
def delete_service(name: nil) -> ::Gapic::Operation

Deletes the specified service and all enclosed versions.

Overloads
def delete_service(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_service via a request object, either of type DeleteServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AppEngine::V1::DeleteServiceRequest, ::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_service(name: nil) -> ::Gapic::Operation
Pass arguments to delete_service 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).
Parameter
  • name (::String) — Name of the resource requested. Example: apps/myapp/services/default.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_service

def get_service(request, options = nil) -> ::Google::Cloud::AppEngine::V1::Service
def get_service(name: nil) -> ::Google::Cloud::AppEngine::V1::Service

Gets the current configuration of the specified service.

Overloads
def get_service(request, options = nil) -> ::Google::Cloud::AppEngine::V1::Service
Pass arguments to get_service via a request object, either of type GetServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AppEngine::V1::GetServiceRequest, ::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_service(name: nil) -> ::Google::Cloud::AppEngine::V1::Service
Pass arguments to get_service 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).
Parameter
  • name (::String) — Name of the resource requested. Example: apps/myapp/services/default.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

def initialize() { |config| ... } -> Client

Create a new Services REST client object.

Yields
  • (config) — Configure the Services client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_services

def list_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>
def list_services(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>

Lists all the services in the application.

Overloads
def list_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>
Pass arguments to list_services via a request object, either of type ListServicesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AppEngine::V1::ListServicesRequest, ::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_services(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>
Pass arguments to list_services 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).
Parameters
  • parent (::String) — Name of the parent Application resource. Example: apps/myapp.
  • page_size (::Integer) — Maximum results to return per page.
  • page_token (::String) — Continuation token for fetching the next page of results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#operations_client

def operations_client() -> ::Google::Cloud::AppEngine::V1::Services::Rest::Operations

Get the associated client for long-running operations.

#update_service

def update_service(request, options = nil) -> ::Gapic::Operation
def update_service(name: nil, service: nil, update_mask: nil, migrate_traffic: nil) -> ::Gapic::Operation

Updates the configuration of the specified service.

Overloads
def update_service(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_service via a request object, either of type UpdateServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AppEngine::V1::UpdateServiceRequest, ::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 update_service(name: nil, service: nil, update_mask: nil, migrate_traffic: nil) -> ::Gapic::Operation
Pass arguments to update_service 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).
Parameters
  • name (::String) — Name of the resource to update. Example: apps/myapp/services/default.
  • service (::Google::Cloud::AppEngine::V1::Service, ::Hash) — A Service resource containing the updated service. Only fields set in the field mask will be updated.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Standard field mask for the set of fields to be updated.
  • migrate_traffic (::Boolean) — Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests and automatic scaling. You must specify the shardBy field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.