Cloud Composer V1 API - Class Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersions::Client (v0.2.0)

Reference documentation and code samples for the Cloud Composer V1 API class Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersions::Client.

Client for the ImageVersions service.

Readonly service to query available ImageVersions.

Inherits

  • Object

Methods

.configure

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

Configure the ImageVersions Client class.

See Configuration for a description of the configuration fields.

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

#configure

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

Configure the ImageVersions Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

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

#initialize

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

Create a new ImageVersions client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersions::Client.new do |config|
  config.timeout = 10.0
end

#list_image_versions

def list_image_versions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersion>
def list_image_versions(parent: nil, page_size: nil, page_token: nil, include_past_releases: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersion>

List ImageVersions for provided location.

Overloads
def list_image_versions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersion>
Pass arguments to list_image_versions via a request object, either of type ListImageVersionsRequest or an equivalent Hash.
Parameters
def list_image_versions(parent: nil, page_size: nil, page_token: nil, include_past_releases: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersion>
Pass arguments to list_image_versions 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) — List ImageVersions in the given project and location, in the form: "projects/{projectId}/locations/{locationId}"
  • page_size (::Integer) — The maximum number of image_versions to return.
  • page_token (::String) — The next_page_token value returned from a previous List request, if any.
  • include_past_releases (::Boolean) — Whether or not image versions from old releases should be included.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/orchestration/airflow/service/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Orchestration::Airflow::Service::V1::ListImageVersionsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersion.
  p response
end