Module: Google::Cloud::Monitoring::MetricsScope::V1::MetricsScopes::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/monitoring/metrics_scope/v1/metrics_scopes/paths.rb
Overview
Path helper methods for the MetricsScopes API.
Instance Method Summary collapse
-
#metrics_scope_path(metrics_scope:) ⇒ ::String
Create a fully-qualified MetricsScope resource string.
-
#monitored_project_path(metrics_scope:, project:) ⇒ ::String
Create a fully-qualified MonitoredProject resource string.
Instance Method Details
#metrics_scope_path(metrics_scope:) ⇒ ::String
Create a fully-qualified MetricsScope resource string.
The resource will be in the following format:
locations/global/metricsScope/{metrics_scope}
38 39 40 |
# File 'lib/google/cloud/monitoring/metrics_scope/v1/metrics_scopes/paths.rb', line 38 def metrics_scope_path metrics_scope: "locations/global/metricsScope/#{metrics_scope}" end |
#monitored_project_path(metrics_scope:, project:) ⇒ ::String
Create a fully-qualified MonitoredProject resource string.
The resource will be in the following format:
locations/global/metricsScopes/{metrics_scope}/projects/{project}
53 54 55 56 57 |
# File 'lib/google/cloud/monitoring/metrics_scope/v1/metrics_scopes/paths.rb', line 53 def monitored_project_path metrics_scope:, project: raise ::ArgumentError, "metrics_scope cannot contain /" if metrics_scope.to_s.include? "/" "locations/global/metricsScopes/#{metrics_scope}/projects/#{project}" end |