# App Hub V1 API - Class Google::Cloud::AppHub::V1::AppHub::Rest::Client (v1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.1 1.0.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the App Hub V1 API class Google::Cloud::AppHub::V1::AppHub::Rest::Client.

REST client for the AppHub service.


<br />

The App Hub API allows you to manage App Hub resources.

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the AppHub Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-AppHub-Rest-Client-Configuration "Google::Cloud::AppHub::V1::AppHub::Rest::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-app_hub-v1/latest/Google-Cloud-AppHub-V1-AppHub-Rest-Client-Configuration))
**Returns**

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

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

### #configure

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

Configure the AppHub 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-app_hub-v1/latest/Google-Cloud-AppHub-V1-AppHub-Rest-Client#Google__Cloud__AppHub__V1__AppHub__Rest__Client_configure_class_ "Google::Cloud::AppHub::V1::AppHub::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-AppHub-Rest-Client-Configuration "Google::Cloud::AppHub::V1::AppHub::Rest::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-app_hub-v1/latest/Google-Cloud-AppHub-V1-AppHub-Rest-Client-Configuration))
**Returns**

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

### #create_application

    def create_application(request, options = nil) -> ::Gapic::Operation
    def create_application(parent: nil, application_id: nil, application: nil, request_id: nil) -> ::Gapic::Operation

Creates an Application in a host project and location.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::CreateApplicationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-CreateApplicationRequest), ::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_application(parent: nil, application_id: nil, application: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_application` 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. Project and location to create Application in. Expected format: `projects/{project}/locations/{location}`.
- **application_id** (::String) --- Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.
- **application** ([::Google::Cloud::AppHub::V1::Application](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Application), ::Hash) --- Required. The resource being created
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

### #create_service

    def create_service(request, options = nil) -> ::Gapic::Operation
    def create_service(parent: nil, service_id: nil, service: nil, request_id: nil) -> ::Gapic::Operation

Creates a Service in an Application.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::CreateServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-CreateServiceRequest), ::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_service(parent: nil, service_id: nil, service: nil, request_id: nil) -> ::Gapic::Operation

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

- **parent** (::String) --- Required. Fully qualified name of the parent Application to create the Service in. Expected format: `projects/{project}/locations/{location}/applications/{application}`.
- **service_id** (::String) --- Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.
- **service** ([::Google::Cloud::AppHub::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Service), ::Hash) --- Required. The resource being created.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

### #create_service_project_attachment

    def create_service_project_attachment(request, options = nil) -> ::Gapic::Operation
    def create_service_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) -> ::Gapic::Operation

Attaches a service project to the host project.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-CreateServiceProjectAttachmentRequest), ::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_service_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_service_project_attachment` 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. Host project ID and location to which service project is being attached. Only global location is supported. Expected format: `projects/{project}/locations/{location}`.
- **service_project_attachment_id** (::String) --- Required. The service project attachment identifier must contain the project id of the service project specified in the service_project_attachment.service_project field.
- **service_project_attachment** ([::Google::Cloud::AppHub::V1::ServiceProjectAttachment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ServiceProjectAttachment), ::Hash) --- Required. The resource being created.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

### #create_workload

    def create_workload(request, options = nil) -> ::Gapic::Operation
    def create_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) -> ::Gapic::Operation

Creates a Workload in an Application.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::CreateWorkloadRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-CreateWorkloadRequest), ::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_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_workload` 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. Fully qualified name of the Application to create Workload in. Expected format: `projects/{project}/locations/{location}/applications/{application}`.
- **workload_id** (::String) --- Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.
- **workload** ([::Google::Cloud::AppHub::V1::Workload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Workload), ::Hash) --- Required. The resource being created.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

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

Deletes an Application in a host project and location.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::DeleteApplicationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DeleteApplicationRequest), ::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_application(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_application` 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. Fully qualified name of the Application to delete. Expected format: `projects/{project}/locations/{location}/applications/{application}`.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

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

Deletes a Service from an Application.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::DeleteServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-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, request_id: 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). **Parameters**

- **name** (::String) --- Required. Fully qualified name of the Service to delete from an Application. Expected format: `projects/{project}/locations/{location}/applications/{application}/services/{service}`.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

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

Deletes a service project attachment.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DeleteServiceProjectAttachmentRequest), ::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_project_attachment(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_service_project_attachment` 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. Fully qualified name of the service project attachment to delete. Expected format: `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

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

Deletes a Workload from an Application.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::DeleteWorkloadRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DeleteWorkloadRequest), ::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_workload(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_workload` 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. Fully qualified name of the Workload to delete from an Application. Expected format: `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

    def detach_service_project_attachment(request, options = nil) -> ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse
    def detach_service_project_attachment(name: nil) -> ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse

Detaches a service project from a host project.
You can call this API from any service project without needing access to
the host project that it is attached to.
**Overloads**

    def detach_service_project_attachment(request, options = nil) -> ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse

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

- **request** ([::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DetachServiceProjectAttachmentRequest), ::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_service_project_attachment(name: nil) -> ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse

Pass arguments to `detach_service_project_attachment` 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. Service project id and location to detach from a host project. Only global location is supported. Expected format: `projects/{project}/locations/{location}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DetachServiceProjectAttachmentResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DetachServiceProjectAttachmentResponse))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.
p result
```

### #get_application

    def get_application(request, options = nil) -> ::Google::Cloud::AppHub::V1::Application
    def get_application(name: nil) -> ::Google::Cloud::AppHub::V1::Application

Gets an Application in a host project and location.
**Overloads**

    def get_application(request, options = nil) -> ::Google::Cloud::AppHub::V1::Application

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

- **request** ([::Google::Cloud::AppHub::V1::GetApplicationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-GetApplicationRequest), ::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_application(name: nil) -> ::Google::Cloud::AppHub::V1::Application

Pass arguments to `get_application` 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. Fully qualified name of the Application to fetch. Expected format: `projects/{project}/locations/{location}/applications/{application}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::Application](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Application))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::Application](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Application))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::Application.
p result
```

### #get_discovered_service

    def get_discovered_service(request, options = nil) -> ::Google::Cloud::AppHub::V1::DiscoveredService
    def get_discovered_service(name: nil) -> ::Google::Cloud::AppHub::V1::DiscoveredService

Gets a Discovered Service in a host project and location.
**Overloads**

    def get_discovered_service(request, options = nil) -> ::Google::Cloud::AppHub::V1::DiscoveredService

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

- **request** ([::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-GetDiscoveredServiceRequest), ::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_discovered_service(name: nil) -> ::Google::Cloud::AppHub::V1::DiscoveredService

Pass arguments to `get_discovered_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) --- Required. Fully qualified name of the Discovered Service to fetch. Expected format: `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::DiscoveredService](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DiscoveredService))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::DiscoveredService](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DiscoveredService))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService.
p result
```

### #get_discovered_workload

    def get_discovered_workload(request, options = nil) -> ::Google::Cloud::AppHub::V1::DiscoveredWorkload
    def get_discovered_workload(name: nil) -> ::Google::Cloud::AppHub::V1::DiscoveredWorkload

Gets a Discovered Workload in a host project and location.
**Overloads**

    def get_discovered_workload(request, options = nil) -> ::Google::Cloud::AppHub::V1::DiscoveredWorkload

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

- **request** ([::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-GetDiscoveredWorkloadRequest), ::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_discovered_workload(name: nil) -> ::Google::Cloud::AppHub::V1::DiscoveredWorkload

Pass arguments to `get_discovered_workload` 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. Fully qualified name of the Discovered Workload to fetch. Expected format: `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::DiscoveredWorkload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DiscoveredWorkload))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::DiscoveredWorkload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DiscoveredWorkload))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload.
p result
```

### #get_service

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

Gets a Service in an Application.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::GetServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-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::AppHub::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) --- Required. Fully qualified name of the Service to fetch. Expected format: `projects/{project}/locations/{location}/applications/{application}/services/{service}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Service))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Service))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::Service.
p result
```

### #get_service_project_attachment

    def get_service_project_attachment(request, options = nil) -> ::Google::Cloud::AppHub::V1::ServiceProjectAttachment
    def get_service_project_attachment(name: nil) -> ::Google::Cloud::AppHub::V1::ServiceProjectAttachment

Gets a service project attachment.
**Overloads**

    def get_service_project_attachment(request, options = nil) -> ::Google::Cloud::AppHub::V1::ServiceProjectAttachment

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

- **request** ([::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-GetServiceProjectAttachmentRequest), ::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_project_attachment(name: nil) -> ::Google::Cloud::AppHub::V1::ServiceProjectAttachment

Pass arguments to `get_service_project_attachment` 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. Fully qualified name of the service project attachment to retrieve. Expected format: `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::ServiceProjectAttachment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ServiceProjectAttachment))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::ServiceProjectAttachment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ServiceProjectAttachment))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment.
p result
```

### #get_workload

    def get_workload(request, options = nil) -> ::Google::Cloud::AppHub::V1::Workload
    def get_workload(name: nil) -> ::Google::Cloud::AppHub::V1::Workload

Gets a Workload in an Application.
**Overloads**

    def get_workload(request, options = nil) -> ::Google::Cloud::AppHub::V1::Workload

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

- **request** ([::Google::Cloud::AppHub::V1::GetWorkloadRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-GetWorkloadRequest), ::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_workload(name: nil) -> ::Google::Cloud::AppHub::V1::Workload

Pass arguments to `get_workload` 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. Fully qualified name of the Workload to fetch. Expected format: `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::Workload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Workload))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::Workload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Workload))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::Workload.
p result
```

### #iam_policy_client

    def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client

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

- (Google::Iam::V1::IAMPolicy::Rest::Client)

### #initialize

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

Create a new AppHub REST client object.
**Yields**

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

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

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

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

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

### #list_applications

    def list_applications(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>
    def list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>

Lists Applications in a host project and location.
**Overloads**

    def list_applications(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>

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

- **request** ([::Google::Cloud::AppHub::V1::ListApplicationsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ListApplicationsRequest), ::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_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>

Pass arguments to `list_applications` 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. Project and location to list Applications on. Expected format: `projects/{project}/locations/{location}`.
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results.
- **order_by** (::String) --- Optional. Hint for how to order the results.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::Application](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Application)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::Application](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Application)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

# Call the list_applications method.
result = client.list_applications 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::AppHub::V1::Application.
  p item
end
```

### #list_discovered_services

    def list_discovered_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>
    def list_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>

Lists Discovered Services that can be added to an Application in a host
project and location.
**Overloads**

    def list_discovered_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>

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

- **request** ([::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ListDiscoveredServicesRequest), ::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_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>

Pass arguments to `list_discovered_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) --- Required. Project and location to list Discovered Services on. Expected format: `projects/{project}/locations/{location}`.
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results.
- **order_by** (::String) --- Optional. Hint for how to order the results.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::DiscoveredService](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DiscoveredService)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::DiscoveredService](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DiscoveredService)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

# Call the list_discovered_services method.
result = client.list_discovered_services 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::AppHub::V1::DiscoveredService.
  p item
end
```

### #list_discovered_workloads

    def list_discovered_workloads(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>
    def list_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>

Lists Discovered Workloads that can be added to an Application in a host
project and location.
**Overloads**

    def list_discovered_workloads(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>

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

- **request** ([::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ListDiscoveredWorkloadsRequest), ::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_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>

Pass arguments to `list_discovered_workloads` 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. Project and location to list Discovered Workloads on. Expected format: `projects/{project}/locations/{location}`.
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results.
- **order_by** (::String) --- Optional. Hint for how to order the results.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::DiscoveredWorkload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DiscoveredWorkload)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::DiscoveredWorkload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-DiscoveredWorkload)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

# Call the list_discovered_workloads method.
result = client.list_discovered_workloads 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::AppHub::V1::DiscoveredWorkload.
  p item
end
```

### #list_service_project_attachments

    def list_service_project_attachments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>
    def list_service_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>

Lists service projects attached to the host project.
**Overloads**

    def list_service_project_attachments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>

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

- **request** ([::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ListServiceProjectAttachmentsRequest), ::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_service_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>

Pass arguments to `list_service_project_attachments` 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. Host project ID and location to list service project attachments. Only global location is supported. Expected format: `projects/{project}/locations/{location}`.
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results.
- **order_by** (::String) --- Optional. Hint for how to order the results.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::ServiceProjectAttachment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ServiceProjectAttachment)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::ServiceProjectAttachment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ServiceProjectAttachment)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

# Call the list_service_project_attachments method.
result = client.list_service_project_attachments 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::AppHub::V1::ServiceProjectAttachment.
  p item
end
```

### #list_services

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

Lists Services in an Application.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::ListServicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-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, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::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) --- Required. Fully qualified name of the parent Application to list Services for. Expected format: `projects/{project}/locations/{location}/applications/{application}`.
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results
- **order_by** (::String) --- Optional. Hint for how to order the results
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Service)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Service)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

# Call the list_services method.
result = client.list_services 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::AppHub::V1::Service.
  p item
end
```

### #list_workloads

    def list_workloads(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>
    def list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>

Lists Workloads in an Application.
**Overloads**

    def list_workloads(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>

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

- **request** ([::Google::Cloud::AppHub::V1::ListWorkloadsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ListWorkloadsRequest), ::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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>

Pass arguments to `list_workloads` 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. Fully qualified name of the parent Application to list Workloads for. Expected format: `projects/{project}/locations/{location}/applications/{application}`.
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results.
- **order_by** (::String) --- Optional. Hint for how to order the results.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::Workload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Workload)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AppHub::V1::Workload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Workload)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

# Call the list_workloads method.
result = client.list_workloads 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::AppHub::V1::Workload.
  p item
end
```

### #location_client

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

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

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

### #logger

    def logger() -> Logger

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

- (Logger)

### #lookup_discovered_service

    def lookup_discovered_service(request, options = nil) -> ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse
    def lookup_discovered_service(parent: nil, uri: nil) -> ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse

Lists a Discovered Service in a host project and location, with a
given resource URI.
**Overloads**

    def lookup_discovered_service(request, options = nil) -> ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse

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

- **request** ([::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-LookupDiscoveredServiceRequest), ::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 lookup_discovered_service(parent: nil, uri: nil) -> ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse

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

- **parent** (::String) --- Required. Host project ID and location to lookup Discovered Service in. Expected format: `projects/{project}/locations/{location}`.
- **uri** (::String) --- Required. Resource URI to find DiscoveredService for. Accepts both project number and project ID and does translation when needed.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-LookupDiscoveredServiceResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-LookupDiscoveredServiceResponse))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.
p result
```

### #lookup_discovered_workload

    def lookup_discovered_workload(request, options = nil) -> ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse
    def lookup_discovered_workload(parent: nil, uri: nil) -> ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse

Lists a Discovered Workload in a host project and location, with a
given resource URI.
**Overloads**

    def lookup_discovered_workload(request, options = nil) -> ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse

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

- **request** ([::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-LookupDiscoveredWorkloadRequest), ::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 lookup_discovered_workload(parent: nil, uri: nil) -> ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse

Pass arguments to `lookup_discovered_workload` 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. Host project ID and location to lookup Discovered Workload in. Expected format: `projects/{project}/locations/{location}`.
- **uri** (::String) --- Required. Resource URI to find Discovered Workload for. Accepts both project number and project ID and does translation when needed.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-LookupDiscoveredWorkloadResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-LookupDiscoveredWorkloadResponse))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.
p result
```

### #lookup_service_project_attachment

    def lookup_service_project_attachment(request, options = nil) -> ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse
    def lookup_service_project_attachment(name: nil) -> ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse

Lists a service project attachment for a given service project. You can
call this API from any project to find if it is attached to a host project.
**Overloads**

    def lookup_service_project_attachment(request, options = nil) -> ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse

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

- **request** ([::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-LookupServiceProjectAttachmentRequest), ::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 lookup_service_project_attachment(name: nil) -> ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse

Pass arguments to `lookup_service_project_attachment` 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. Service project ID and location to lookup service project attachment for. Only global location is supported. Expected format: `projects/{project}/locations/{location}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-LookupServiceProjectAttachmentResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-LookupServiceProjectAttachmentResponse))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.
p result
```

### #operations_client

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

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

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

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_application

    def update_application(request, options = nil) -> ::Gapic::Operation
    def update_application(update_mask: nil, application: nil, request_id: nil) -> ::Gapic::Operation

Updates an Application in a host project and location.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::UpdateApplicationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-UpdateApplicationRequest), ::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_application(update_mask: nil, application: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `update_application` 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. Field mask is used to specify the fields to be overwritten in the Application resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.
- **application** ([::Google::Cloud::AppHub::V1::Application](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Application), ::Hash) --- Required. The resource being updated.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

### #update_service

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

Updates a Service in an Application.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::UpdateServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-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(update_mask: nil, service: nil, request_id: 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**

- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. Field mask is used to specify the fields to be overwritten in the Service resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.
- **service** ([::Google::Cloud::AppHub::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Service), ::Hash) --- Required. The resource being updated.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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

### #update_workload

    def update_workload(request, options = nil) -> ::Gapic::Operation
    def update_workload(update_mask: nil, workload: nil, request_id: nil) -> ::Gapic::Operation

Updates a Workload in an Application.
**Overloads**

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

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

- **request** ([::Google::Cloud::AppHub::V1::UpdateWorkloadRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-UpdateWorkloadRequest), ::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_workload(update_mask: nil, workload: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `update_workload` 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. Field mask is used to specify the fields to be overwritten in the Workload resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.
- **workload** ([::Google::Cloud::AppHub::V1::Workload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-Workload), ::Hash) --- Required. The resource being updated.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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

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

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

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

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