App Engine Admin V1 API - Class Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client (v1.0.0)

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

REST client for the DomainMappings service.

Manages domains serving an application.

Inherits

  • Object

Methods

.configure

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

Configure the DomainMappings 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 DomainMappings clients
::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the DomainMappings 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

#create_domain_mapping

def create_domain_mapping(request, options = nil) -> ::Gapic::Operation
def create_domain_mapping(parent: nil, domain_mapping: nil, override_strategy: nil) -> ::Gapic::Operation

Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.

Overloads
def create_domain_mapping(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_domain_mapping via a request object, either of type CreateDomainMappingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest, ::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_domain_mapping(parent: nil, domain_mapping: nil, override_strategy: nil) -> ::Gapic::Operation
Pass arguments to create_domain_mapping 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
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.
Example

Basic example

require "google/cloud/app_engine/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new

# Call the create_domain_mapping method.
result = client.create_domain_mapping request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#delete_domain_mapping

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

Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.

Overloads
def delete_domain_mapping(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_domain_mapping via a request object, either of type Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest, ::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_domain_mapping(name: nil) -> ::Gapic::Operation
Pass arguments to delete_domain_mapping 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 to delete. Example: apps/myapp/domainMappings/example.com.
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.
Example

Basic example

require "google/cloud/app_engine/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new

# Call the delete_domain_mapping method.
result = client.delete_domain_mapping request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#get_domain_mapping

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

Gets the specified domain mapping.

Overloads
def get_domain_mapping(request, options = nil) -> ::Google::Cloud::AppEngine::V1::DomainMapping
Pass arguments to get_domain_mapping via a request object, either of type GetDomainMappingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AppEngine::V1::GetDomainMappingRequest, ::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_domain_mapping(name: nil) -> ::Google::Cloud::AppEngine::V1::DomainMapping
Pass arguments to get_domain_mapping 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/domainMappings/example.com.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/app_engine/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new

# Call the get_domain_mapping method.
result = client.get_domain_mapping request

# The returned object is of type Google::Cloud::AppEngine::V1::DomainMapping.
p result

#initialize

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

Create a new DomainMappings REST client object.

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

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

#list_domain_mappings

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

Lists the domain mappings on an application.

Overloads
def list_domain_mappings(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>
Pass arguments to list_domain_mappings via a request object, either of type ListDomainMappingsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest, ::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_domain_mappings(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>
Pass arguments to list_domain_mappings 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.
Example

Basic example

require "google/cloud/app_engine/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new

# Call the list_domain_mappings method.
result = client.list_domain_mappings 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::AppEngine::V1::DomainMapping.
  p item
end

#operations_client

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

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_domain_mapping

def update_domain_mapping(request, options = nil) -> ::Gapic::Operation
def update_domain_mapping(name: nil, domain_mapping: nil, update_mask: nil) -> ::Gapic::Operation

Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.

Overloads
def update_domain_mapping(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_domain_mapping via a request object, either of type UpdateDomainMappingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest, ::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_domain_mapping(name: nil, domain_mapping: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_domain_mapping 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/domainMappings/example.com.
  • domain_mapping (::Google::Cloud::AppEngine::V1::DomainMapping, ::Hash) — A domain mapping containing the updated resource. 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.
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.
Example

Basic example

require "google/cloud/app_engine/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new

# Call the update_domain_mapping method.
result = client.update_domain_mapping request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end