0.2.0 (latest) 0.1.0 Reference documentation and code samples for the Workload Identity V1 API class Google::Cloud::WorkloadIdentity::V1::WorkloadIdentity::Client.

Client for the WorkloadIdentity service.


<br />

Service describing handlers for resources

## Inherits

- Object

## Includes

- [Google::Cloud::WorkloadIdentity::V1::WorkloadIdentity::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Paths)

## Methods

### .configure

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

Configure the WorkloadIdentity Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Client-Configuration "Google::Cloud::WorkloadIdentity::V1::WorkloadIdentity::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all WorkloadIdentity clients
::Google::Cloud::WorkloadIdentity::V1::WorkloadIdentity::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

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

Configure the WorkloadIdentity 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Client#Google__Cloud__WorkloadIdentity__V1__WorkloadIdentity__Client_configure_class_ "Google::Cloud::WorkloadIdentity::V1::WorkloadIdentity::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Client-Configuration "Google::Cloud::WorkloadIdentity::V1::WorkloadIdentity::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Client-Configuration))

### #generate_service_agents

    def generate_service_agents(request, options = nil) -> ::Gapic::Operation
    def generate_service_agents(parent: nil) -> ::Gapic::Operation

Creates all service agents for a given resource, location and service
producer.
**Overloads**

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

Pass arguments to `generate_service_agents` via a request object, either of type [GenerateServiceAgentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-GenerateServiceAgentsRequest "Google::Cloud::WorkloadIdentity::V1::GenerateServiceAgentsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::WorkloadIdentity::V1::GenerateServiceAgentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-GenerateServiceAgentsRequest), ::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 generate_service_agents(parent: nil) -> ::Gapic::Operation

Pass arguments to `generate_service_agents` 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**

- **parent** (::String) ---

  Required. The parent resource. The `location` for the parent resource must
  be `global`.

  Examples:
  - projects/1234/locations/global/serviceProducers/bigquery.googleapis.com
  - folders/2344/locations/global/serviceProducers/vertexai.googleapis.com
  - organizations/3344/locations/global/serviceProducers/iam.googleapis.com
**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

```ruby
require "google/cloud/workload_identity/v1"

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

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

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

### #initialize

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

Create a new WorkloadIdentity client object.
**Yields**

- (config) --- Configure the WorkloadIdentity client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::WorkloadIdentity::V1::WorkloadIdentity::Client.new

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

### #location_client

    def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.
**Returns**

- (Google::Cloud::Location::Locations::Client)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #operations_client

    def operations_client() -> ::Google::Cloud::WorkloadIdentity::V1::WorkloadIdentity::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::WorkloadIdentity::V1::WorkloadIdentity::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workload_identity-v1/latest/Google-Cloud-WorkloadIdentity-V1-WorkloadIdentity-Operations))

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)