Managed Service for Microsoft Active Directory API V1 API - Class Google::Cloud::ManagedIdentities::V1::ManagedIdentitiesService::Client (v1.0.0)

Reference documentation and code samples for the Managed Service for Microsoft Active Directory API V1 API class Google::Cloud::ManagedIdentities::V1::ManagedIdentitiesService::Client.

Client for the ManagedIdentitiesService service.

API Overview

The managedidentites.googleapis.com service implements the Google Cloud Managed Identites API for identity services (e.g. Microsoft Active Directory).

The Managed Identities service provides methods to manage (create/read/update/delete) domains, reset managed identities admin password, add/remove domain controllers in GCP regions and add/remove VPC peering.

Data Model

The Managed Identities service exposes the following resources:

  • Locations as global, named as follows: projects/{project_id}/locations/global.

  • Domains, named as follows: /projects/{project_id}/locations/global/domain/{domain_name}.

The {domain_name} refers to fully qualified domain name in the customer project e.g. mydomain.myorganization.com, with the following restrictions:

  • Must contain only lowercase letters, numbers, periods and hyphens.
  • Must start with a letter.
  • Must contain between 2-64 characters.
  • Must end with a number or a letter.
  • Must not start with period.
  • First segement length (mydomain form example above) shouldn't exceed 15 chars.
  • The last segment cannot be fully numeric.
  • Must be unique within the customer project.

Inherits

  • Object

Methods

.configure

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

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

#attach_trust

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

Adds an AD trust to a domain.

Overloads
def attach_trust(request, options = nil) -> ::Gapic::Operation
Pass arguments to attach_trust via a request object, either of type AttachTrustRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::AttachTrustRequest, ::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 attach_trust(name: nil, trust: nil) -> ::Gapic::Operation
Pass arguments to attach_trust 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) — Required. The resource domain name, project name and location using the form: projects/{project_id}/locations/global/domains/{domain_name}
  • trust (::Google::Cloud::ManagedIdentities::V1::Trust, ::Hash) — Required. The domain trust resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

# Call the attach_trust method.
result = client.attach_trust 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

#configure

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

Configure the ManagedIdentitiesService 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_microsoft_ad_domain

def create_microsoft_ad_domain(request, options = nil) -> ::Gapic::Operation
def create_microsoft_ad_domain(parent: nil, domain_name: nil, domain: nil) -> ::Gapic::Operation

Creates a Microsoft AD domain.

Overloads
def create_microsoft_ad_domain(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_microsoft_ad_domain via a request object, either of type CreateMicrosoftAdDomainRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::CreateMicrosoftAdDomainRequest, ::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_microsoft_ad_domain(parent: nil, domain_name: nil, domain: nil) -> ::Gapic::Operation
Pass arguments to create_microsoft_ad_domain 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) — Required. The resource project name and location using the form: projects/{project_id}/locations/global
  • domain_name (::String) —

    Required. The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions:

    • Must contain only lowercase letters, numbers, periods and hyphens.
    • Must start with a letter.
    • Must contain between 2-64 characters.
    • Must end with a number or a letter.
    • Must not start with period.
    • First segement length (mydomain form example above) shouldn't exceed 15 chars.
    • The last segment cannot be fully numeric.
    • Must be unique within the customer project.
  • domain (::Google::Cloud::ManagedIdentities::V1::Domain, ::Hash) — Required. A Managed Identity domain resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

# Call the create_microsoft_ad_domain method.
result = client.create_microsoft_ad_domain 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

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

Deletes a domain.

Overloads
def delete_domain(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_domain via a request object, either of type DeleteDomainRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::DeleteDomainRequest, ::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(name: nil) -> ::Gapic::Operation
Pass arguments to delete_domain 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) — Required. The domain resource name using the form: projects/{project_id}/locations/global/domains/{domain_name}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

# Call the delete_domain method.
result = client.delete_domain 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

#detach_trust

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

Removes an AD trust.

Overloads
def detach_trust(request, options = nil) -> ::Gapic::Operation
Pass arguments to detach_trust via a request object, either of type DetachTrustRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::DetachTrustRequest, ::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 detach_trust(name: nil, trust: nil) -> ::Gapic::Operation
Pass arguments to detach_trust 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) — Required. The resource domain name, project name, and location using the form: projects/{project_id}/locations/global/domains/{domain_name}
  • trust (::Google::Cloud::ManagedIdentities::V1::Trust, ::Hash) — Required. The domain trust resource to removed.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

# Call the detach_trust method.
result = client.detach_trust 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

def get_domain(request, options = nil) -> ::Google::Cloud::ManagedIdentities::V1::Domain
def get_domain(name: nil) -> ::Google::Cloud::ManagedIdentities::V1::Domain

Gets information about a domain.

Overloads
def get_domain(request, options = nil) -> ::Google::Cloud::ManagedIdentities::V1::Domain
Pass arguments to get_domain via a request object, either of type GetDomainRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::GetDomainRequest, ::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(name: nil) -> ::Google::Cloud::ManagedIdentities::V1::Domain
Pass arguments to get_domain 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) — Required. The domain resource name using the form: projects/{project_id}/locations/global/domains/{domain_name}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

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

# The returned object is of type Google::Cloud::ManagedIdentities::V1::Domain.
p result

#initialize

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

Create a new ManagedIdentitiesService client object.

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

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

#list_domains

def list_domains(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedIdentities::V1::Domain>
def list_domains(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedIdentities::V1::Domain>

Lists domains in a project.

Overloads
def list_domains(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedIdentities::V1::Domain>
Pass arguments to list_domains via a request object, either of type ListDomainsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::ListDomainsRequest, ::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_domains(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedIdentities::V1::Domain>
Pass arguments to list_domains 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) — Required. The resource name of the domain location using the form: projects/{project_id}/locations/global
  • page_size (::Integer) — Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used. Regardless of the page_size value, the response may include a partial list. Callers should rely on a response's next_page_token to determine if there are additional results to list.
  • page_token (::String) — Optional. The next_page_token value returned from a previous ListDomainsRequest request, if any.
  • filter (::String) — Optional. A filter specifying constraints of a list operation. For example, Domain.fqdn="mydomain.myorginization".
  • order_by (::String) — Optional. Specifies the ordering of results. See Sorting order for more information.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

# Call the list_domains method.
result = client.list_domains 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::ManagedIdentities::V1::Domain.
  p item
end

#operations_client

def operations_client() -> ::Google::Cloud::ManagedIdentities::V1::ManagedIdentitiesService::Operations

Get the associated client for long-running operations.

#reconfigure_trust

def reconfigure_trust(request, options = nil) -> ::Gapic::Operation
def reconfigure_trust(name: nil, target_domain_name: nil, target_dns_ip_addresses: nil) -> ::Gapic::Operation

Updates the DNS conditional forwarder.

Overloads
def reconfigure_trust(request, options = nil) -> ::Gapic::Operation
Pass arguments to reconfigure_trust via a request object, either of type ReconfigureTrustRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::ReconfigureTrustRequest, ::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 reconfigure_trust(name: nil, target_domain_name: nil, target_dns_ip_addresses: nil) -> ::Gapic::Operation
Pass arguments to reconfigure_trust 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) — Required. The resource domain name, project name and location using the form: projects/{project_id}/locations/global/domains/{domain_name}
  • target_domain_name (::String) — Required. The fully-qualified target domain name which will be in trust with current domain.
  • target_dns_ip_addresses (::Array<::String>) — Required. The target DNS server IP addresses to resolve the remote domain involved in the trust.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

# Call the reconfigure_trust method.
result = client.reconfigure_trust 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

#reset_admin_password

def reset_admin_password(request, options = nil) -> ::Google::Cloud::ManagedIdentities::V1::ResetAdminPasswordResponse
def reset_admin_password(name: nil) -> ::Google::Cloud::ManagedIdentities::V1::ResetAdminPasswordResponse

Resets a domain's administrator password.

Overloads
def reset_admin_password(request, options = nil) -> ::Google::Cloud::ManagedIdentities::V1::ResetAdminPasswordResponse
Pass arguments to reset_admin_password via a request object, either of type ResetAdminPasswordRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::ResetAdminPasswordRequest, ::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 reset_admin_password(name: nil) -> ::Google::Cloud::ManagedIdentities::V1::ResetAdminPasswordResponse
Pass arguments to reset_admin_password 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) — Required. The domain resource name using the form: projects/{project_id}/locations/global/domains/{domain_name}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

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

# The returned object is of type Google::Cloud::ManagedIdentities::V1::ResetAdminPasswordResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_domain

def update_domain(request, options = nil) -> ::Gapic::Operation
def update_domain(update_mask: nil, domain: nil) -> ::Gapic::Operation

Updates the metadata and configuration of a domain.

Overloads
def update_domain(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_domain via a request object, either of type UpdateDomainRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::UpdateDomainRequest, ::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(update_mask: nil, domain: nil) -> ::Gapic::Operation
Pass arguments to update_domain 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
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) —

    Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include fields from Domain:

    • labels
    • locations
    • authorized_networks
  • domain (::Google::Cloud::ManagedIdentities::V1::Domain, ::Hash) — Required. Domain message with updated fields. Only supported fields specified in update_mask are updated.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

# Call the update_domain method.
result = client.update_domain 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

#validate_trust

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

Validates a trust state, that the target domain is reachable, and that the target domain is able to accept incoming trust requests.

Overloads
def validate_trust(request, options = nil) -> ::Gapic::Operation
Pass arguments to validate_trust via a request object, either of type ValidateTrustRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedIdentities::V1::ValidateTrustRequest, ::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 validate_trust(name: nil, trust: nil) -> ::Gapic::Operation
Pass arguments to validate_trust 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) — Required. The resource domain name, project name, and location using the form: projects/{project_id}/locations/global/domains/{domain_name}
  • trust (::Google::Cloud::ManagedIdentities::V1::Trust, ::Hash) — Required. The domain trust to validate trust state for.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_identities/v1"

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

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

# Call the validate_trust method.
result = client.validate_trust 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