Module: Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb
Overview
Path helper methods for the OrganizationVpcFlowLogsService API.
Instance Method Summary collapse
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#organization_location_path(organization:, location:) ⇒ ::String
Create a fully-qualified OrganizationLocation resource string.
-
#vpc_flow_logs_config_path(**args) ⇒ ::String
Create a fully-qualified VpcFlowLogsConfig resource string.
Instance Method Details
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
38 39 40 41 42 |
# File 'lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb', line 38 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#organization_location_path(organization:, location:) ⇒ ::String
Create a fully-qualified OrganizationLocation resource string.
The resource will be in the following format:
organizations/{organization}/locations/{location}
55 56 57 58 59 |
# File 'lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb', line 55 def organization_location_path organization:, location: raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/locations/#{location}" end |
#vpc_flow_logs_config_path(project:, location:, vpc_flow_logs_config:) ⇒ ::String #vpc_flow_logs_config_path(organization:, location:, vpc_flow_logs_config:) ⇒ ::String
Create a fully-qualified VpcFlowLogsConfig resource string.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb', line 83 def vpc_flow_logs_config_path **args resources = { "location:project:vpc_flow_logs_config" => (proc do |project:, location:, vpc_flow_logs_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}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" end), "location:organization:vpc_flow_logs_config" => (proc do |organization:, location:, vpc_flow_logs_config:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |