Module: Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb

Overview

Path helper methods for the OsConfigZonalService API.

Instance Method Summary collapse

Instance Method Details

#instance_os_policies_compliance_path(project:, location:, instance:) ⇒ ::String

Create a fully-qualified InstanceOSPoliciesCompliance resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}

Parameters:

  • project (String)
  • location (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


58
59
60
61
62
63
# File 'lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb', line 58

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

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

#instance_os_policy_assignment_path(project:, location:, instance:, assignment:) ⇒ ::String

Create a fully-qualified InstanceOSPolicyAssignment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}

Parameters:

  • project (String)
  • location (String)
  • instance (String)
  • assignment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


78
79
80
81
82
83
84
# File 'lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb', line 78

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

  "projects/#{project}/locations/#{location}/instances/#{instance}/osPolicyAssignments/#{assignment}"
end

#instance_path(project:, location:, instance:) ⇒ ::String

Create a fully-qualified Instance resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}

Parameters:

  • project (String)
  • location (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb', line 39

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

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

#inventory_path(project:, location:, instance:) ⇒ ::String

Create a fully-qualified Inventory resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}/inventory

Parameters:

  • project (String)
  • location (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


98
99
100
101
102
103
# File 'lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb', line 98

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

  "projects/#{project}/locations/#{location}/instances/#{instance}/inventory"
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)


116
117
118
119
120
# File 'lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb', line 116

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

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

#os_policy_assignment_path(project:, location:, os_policy_assignment:) ⇒ ::String

Create a fully-qualified OSPolicyAssignment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}

Parameters:

  • project (String)
  • location (String)
  • os_policy_assignment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


134
135
136
137
138
139
# File 'lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb', line 134

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

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

#os_policy_assignment_report_path(project:, location:, instance:, assignment:) ⇒ ::String

Create a fully-qualified OSPolicyAssignmentReport resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report

Parameters:

  • project (String)
  • location (String)
  • instance (String)
  • assignment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


154
155
156
157
158
159
160
# File 'lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb', line 154

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

  "projects/#{project}/locations/#{location}/instances/#{instance}/osPolicyAssignments/#{assignment}/report"
end

#vulnerability_report_path(project:, location:, instance:) ⇒ ::String

Create a fully-qualified VulnerabilityReport resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport

Parameters:

  • project (String)
  • location (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


174
175
176
177
178
179
# File 'lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb', line 174

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

  "projects/#{project}/locations/#{location}/instances/#{instance}/vulnerabilityReport"
end