Module: Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb

Overview

Path helper methods for the CloudControlsPartnerCore API.

Instance Method Summary collapse

Instance Method Details

#customer_path(organization:, location:, customer:) ⇒ ::String

Create a fully-qualified Customer resource string.

The resource will be in the following format:

organizations/{organization}/locations/{location}/customers/{customer}

Parameters:

  • organization (String)
  • location (String)
  • customer (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb', line 39

def customer_path organization:, location:, customer:
  raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "organizations/#{organization}/locations/#{location}/customers/#{customer}"
end

#ekm_connections_path(organization:, location:, customer:, workload:) ⇒ ::String

Create a fully-qualified EkmConnections resource string.

The resource will be in the following format:

organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections

Parameters:

  • organization (String)
  • location (String)
  • customer (String)
  • workload (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


59
60
61
62
63
64
65
# File 'lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb', line 59

def ekm_connections_path organization:, location:, customer:, workload:
  raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/"

  "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/ekmConnections"
end

#organization_location_path(organization:, location:) ⇒ ::String

Create a fully-qualified OrganizationLocation resource string.

The resource will be in the following format:

organizations/{organization}/locations/{location}

Parameters:

  • organization (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


78
79
80
81
82
# File 'lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb', line 78

def organization_location_path organization:, location:
  raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"

  "organizations/#{organization}/locations/#{location}"
end

#partner_path(organization:, location:) ⇒ ::String

Create a fully-qualified Partner resource string.

The resource will be in the following format:

organizations/{organization}/locations/{location}/partner

Parameters:

  • organization (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


95
96
97
98
99
# File 'lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb', line 95

def partner_path organization:, location:
  raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"

  "organizations/#{organization}/locations/#{location}/partner"
end

#partner_permissions_path(organization:, location:, customer:, workload:) ⇒ ::String

Create a fully-qualified PartnerPermissions resource string.

The resource will be in the following format:

organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions

Parameters:

  • organization (String)
  • location (String)
  • customer (String)
  • workload (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


114
115
116
117
118
119
120
# File 'lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb', line 114

def partner_permissions_path organization:, location:, customer:, workload:
  raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/"

  "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/partnerPermissions"
end

#workload_path(organization:, location:, customer:, workload:) ⇒ ::String

Create a fully-qualified Workload resource string.

The resource will be in the following format:

organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}

Parameters:

  • organization (String)
  • location (String)
  • customer (String)
  • workload (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


135
136
137
138
139
140
141
# File 'lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb', line 135

def workload_path organization:, location:, customer:, workload:
  raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/"

  "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}"
end