Module: Google::Cloud::OracleDatabase::V1::OracleDatabase::Paths

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

Overview

Path helper methods for the OracleDatabase API.

Instance Method Summary collapse

Instance Method Details

#autonomous_database_path(project:, location:, autonomous_database:) ⇒ ::String

Create a fully-qualified AutonomousDatabase resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}

Parameters:

  • project (String)
  • location (String)
  • autonomous_database (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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

#cloud_exadata_infrastructure_path(project:, location:, cloud_exadata_infrastructure:) ⇒ ::String

Create a fully-qualified CloudExadataInfrastructure resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}

Parameters:

  • project (String)
  • location (String)
  • cloud_exadata_infrastructure (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


58
59
60
61
62
63
# File 'lib/google/cloud/oracle_database/v1/oracle_database/paths.rb', line 58

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

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

#cloud_vm_cluster_path(project:, location:, cloud_vm_cluster:) ⇒ ::String

Create a fully-qualified CloudVmCluster resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}

Parameters:

  • project (String)
  • location (String)
  • cloud_vm_cluster (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/cloudVmClusters/#{cloud_vm_cluster}"
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)


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

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)


112
113
114
115
116
# File 'lib/google/cloud/oracle_database/v1/oracle_database/paths.rb', line 112

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

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