Module: Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/orchestration/airflow/service/v1/environments/paths.rb

Overview

Path helper methods for the Environments API.

Instance Method Summary collapse

Instance Method Details

#environment_path(project:, location:, environment:) ⇒ ::String

Create a fully-qualified Environment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/environments/{environment}

Parameters:

  • project (String)
  • location (String)
  • environment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


41
42
43
44
45
46
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/paths.rb', line 41

def environment_path project:, location:, environment:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/environments/#{environment}"
end