Module: Google::Cloud::Dataplex::V1::CmekService::Paths

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

Overview

Path helper methods for the CmekService API.

Instance Method Summary collapse

Instance Method Details

#encryption_config_path(organization:, location:, encryption_config:) ⇒ ::String

Create a fully-qualified EncryptionConfig resource string.

The resource will be in the following format:

organizations/{organization}/locations/{location}/encryptionConfigs/{encryption_config}

Parameters:

  • organization (String)
  • location (String)
  • encryption_config (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "organizations/#{organization}/locations/#{location}/encryptionConfigs/#{encryption_config}"
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)


57
58
59
60
61
# File 'lib/google/cloud/dataplex/v1/cmek_service/paths.rb', line 57

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

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