Module: Google::Iam::V1beta::WorkloadIdentityPools::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/iam/v1beta/workload_identity_pools/paths.rb

Overview

Path helper methods for the WorkloadIdentityPools API.

Instance Method Summary collapse

Instance Method Details

#project_path(project:) ⇒ ::String

Create a fully-qualified Project resource string.

The resource will be in the following format:

projects/{project}

Parameters:

  • project (String)

Returns:

  • (::String)


36
37
38
# File 'lib/google/iam/v1beta/workload_identity_pools/paths.rb', line 36

def project_path project:
  "projects/#{project}"
end

#workload_identity_pool_path(project:, location:, workload_identity_pool:) ⇒ ::String

Create a fully-qualified WorkloadIdentityPool resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/workloadIdentityPools/{workload_identity_pool}

Parameters:

  • project (String)
  • location (String)
  • workload_identity_pool (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


52
53
54
55
56
57
# File 'lib/google/iam/v1beta/workload_identity_pools/paths.rb', line 52

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

  "projects/#{project}/locations/#{location}/workloadIdentityPools/#{workload_identity_pool}"
end

#workload_identity_pool_provider_path(project:, location:, workload_identity_pool:, workload_identity_pool_provider:) ⇒ ::String

Create a fully-qualified WorkloadIdentityPoolProvider resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/workloadIdentityPools/{workload_identity_pool}/providers/{workload_identity_pool_provider}

Parameters:

  • project (String)
  • location (String)
  • workload_identity_pool (String)
  • workload_identity_pool_provider (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


72
73
74
75
76
77
78
# File 'lib/google/iam/v1beta/workload_identity_pools/paths.rb', line 72

def workload_identity_pool_provider_path project:, location:, workload_identity_pool:, workload_identity_pool_provider:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "workload_identity_pool cannot contain /" if workload_identity_pool.to_s.include? "/"

  "projects/#{project}/locations/#{location}/workloadIdentityPools/#{workload_identity_pool}/providers/#{workload_identity_pool_provider}"
end