Module: Google::Cloud::NetApp::V1::NetApp::Paths

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

Overview

Path helper methods for the NetApp API.

Instance Method Summary collapse

Instance Method Details

#active_directory_path(project:, location:, active_directory:) ⇒ ::String

Create a fully-qualified ActiveDirectory resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/activeDirectories/{active_directory}

Parameters:

  • project (String)
  • location (String)
  • active_directory (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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

#backup_path(project:, location:, backup_vault:, backup:) ⇒ ::String

Create a fully-qualified Backup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}

Parameters:

  • project (String)
  • location (String)
  • backup_vault (String)
  • backup (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/backupVaults/#{backup_vault}/backups/#{backup}"
end

#backup_policy_path(project:, location:, backup_policy:) ⇒ ::String

Create a fully-qualified BackupPolicy resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/backupPolicies/{backup_policy}

Parameters:

  • project (String)
  • location (String)
  • backup_policy (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


79
80
81
82
83
84
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 79

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

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

#backup_vault_path(project:, location:, backup_vault:) ⇒ ::String

Create a fully-qualified BackupVault resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/backupVaults/{backup_vault}

Parameters:

  • project (String)
  • location (String)
  • backup_vault (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


98
99
100
101
102
103
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 98

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

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

#kms_config_path(project:, location:, kms_config:) ⇒ ::String

Create a fully-qualified KmsConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/kmsConfigs/{kms_config}

Parameters:

  • project (String)
  • location (String)
  • kms_config (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


117
118
119
120
121
122
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 117

def kms_config_path project:, location:, kms_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}/kmsConfigs/#{kms_config}"
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)


135
136
137
138
139
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 135

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

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

#network_path(project:, network:) ⇒ ::String

Create a fully-qualified Network resource string.

The resource will be in the following format:

projects/{project}/global/networks/{network}

Parameters:

  • project (String)
  • network (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


152
153
154
155
156
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 152

def network_path project:, network:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/global/networks/#{network}"
end

#quota_rule_path(project:, location:, volume:, quota_rule:) ⇒ ::String

Create a fully-qualified QuotaRule resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/volumes/{volume}/quotaRules/{quota_rule}

Parameters:

  • project (String)
  • location (String)
  • volume (String)
  • quota_rule (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


171
172
173
174
175
176
177
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 171

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

  "projects/#{project}/locations/#{location}/volumes/#{volume}/quotaRules/#{quota_rule}"
end

#replication_path(project:, location:, volume:, replication:) ⇒ ::String

Create a fully-qualified Replication resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}

Parameters:

  • project (String)
  • location (String)
  • volume (String)
  • replication (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


192
193
194
195
196
197
198
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 192

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

  "projects/#{project}/locations/#{location}/volumes/#{volume}/replications/#{replication}"
end

#snapshot_path(project:, location:, volume:, snapshot:) ⇒ ::String

Create a fully-qualified Snapshot resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}

Parameters:

  • project (String)
  • location (String)
  • volume (String)
  • snapshot (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


213
214
215
216
217
218
219
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 213

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

  "projects/#{project}/locations/#{location}/volumes/#{volume}/snapshots/#{snapshot}"
end

#storage_pool_path(project:, location:, storage_pool:) ⇒ ::String

Create a fully-qualified StoragePool resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/storagePools/{storage_pool}

Parameters:

  • project (String)
  • location (String)
  • storage_pool (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


233
234
235
236
237
238
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 233

def storage_pool_path project:, location:, storage_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}/storagePools/#{storage_pool}"
end

#volume_path(project:, location:, volume:) ⇒ ::String

Create a fully-qualified Volume resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/volumes/{volume}

Parameters:

  • project (String)
  • location (String)
  • volume (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


252
253
254
255
256
257
# File 'lib/google/cloud/netapp/v1/netapp/paths.rb', line 252

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

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