Module: Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb

Overview

Path helper methods for the CertificateAuthorityService API.

Instance Method Summary collapse

Instance Method Details

#certificate_authority_path(project:, location:, certificate_authority:) ⇒ ::String

Create a fully-qualified CertificateAuthority resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}

Parameters:

  • project (String)
  • location (String)
  • certificate_authority (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


61
62
63
64
65
66
# File 'lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb', line 61

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

  "projects/#{project}/locations/#{location}/certificateAuthorities/#{certificate_authority}"
end

#certificate_path(project:, location:, certificate_authority:, certificate:) ⇒ ::String

Create a fully-qualified Certificate resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}

Parameters:

  • project (String)
  • location (String)
  • certificate_authority (String)
  • certificate (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


41
42
43
44
45
46
47
# File 'lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb', line 41

def certificate_path project:, location:, certificate_authority:, certificate:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "certificate_authority cannot contain /" if certificate_authority.to_s.include? "/"

  "projects/#{project}/locations/#{location}/certificateAuthorities/#{certificate_authority}/certificates/#{certificate}"
end

#certificate_revocation_list_path(project:, location:, certificate_authority:, certificate_revocation_list:) ⇒ ::String

Create a fully-qualified CertificateRevocationList resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}

Parameters:

  • project (String)
  • location (String)
  • certificate_authority (String)
  • certificate_revocation_list (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


81
82
83
84
85
86
87
# File 'lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb', line 81

def certificate_revocation_list_path project:, location:, certificate_authority:, certificate_revocation_list:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "certificate_authority cannot contain /" if certificate_authority.to_s.include? "/"

  "projects/#{project}/locations/#{location}/certificateAuthorities/#{certificate_authority}/certificateRevocationLists/#{certificate_revocation_list}"
end

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


100
101
102
103
104
# File 'lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb', line 100

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

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

#reusable_config_path(project:, location:, reusable_config:) ⇒ ::String

Create a fully-qualified ReusableConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/reusableConfigs/{reusable_config}

Parameters:

  • project (String)
  • location (String)
  • reusable_config (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


118
119
120
121
122
123
# File 'lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb', line 118

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

  "projects/#{project}/locations/#{location}/reusableConfigs/#{reusable_config}"
end