Module: Google::Cloud::NetworkSecurity::V1::FirewallActivation::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/network_security/v1/firewall_activation/paths.rb
Overview
Path helper methods for the FirewallActivation API.
Instance Method Summary collapse
-
#firewall_endpoint_association_path(project:, location:, firewall_endpoint_association:) ⇒ ::String
Create a fully-qualified FirewallEndpointAssociation resource string.
-
#firewall_endpoint_path(**args) ⇒ ::String
Create a fully-qualified FirewallEndpoint resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#network_path(project:, network:) ⇒ ::String
Create a fully-qualified Network resource string.
-
#organization_location_path(organization:, location:) ⇒ ::String
Create a fully-qualified OrganizationLocation resource string.
-
#tls_inspection_policy_path(project:, location:, tls_inspection_policy:) ⇒ ::String
Create a fully-qualified TlsInspectionPolicy resource string.
Instance Method Details
#firewall_endpoint_association_path(project:, location:, firewall_endpoint_association:) ⇒ ::String
Create a fully-qualified FirewallEndpointAssociation resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/firewallEndpointAssociations/{firewall_endpoint_association}
82 83 84 85 86 87 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/paths.rb', line 82 def firewall_endpoint_association_path project:, location:, firewall_endpoint_association: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/firewallEndpointAssociations/#{firewall_endpoint_association}" end |
#firewall_endpoint_path(organization:, location:, firewall_endpoint:) ⇒ ::String #firewall_endpoint_path(project:, location:, firewall_endpoint:) ⇒ ::String
Create a fully-qualified FirewallEndpoint resource string.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/paths.rb', line 49 def firewall_endpoint_path **args resources = { "firewall_endpoint:location:organization" => (proc do |organization:, location:, firewall_endpoint:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/firewallEndpoints/#{firewall_endpoint}" end), "firewall_endpoint:location:project" => (proc do |project:, location:, firewall_endpoint:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/firewallEndpoints/#{firewall_endpoint}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) 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}
100 101 102 103 104 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/paths.rb', line 100 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}
117 118 119 120 121 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/paths.rb', line 117 def network_path project:, network: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/global/networks/#{network}" 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}
134 135 136 137 138 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/paths.rb', line 134 def organization_location_path organization:, location: raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/locations/#{location}" end |
#tls_inspection_policy_path(project:, location:, tls_inspection_policy:) ⇒ ::String
Create a fully-qualified TlsInspectionPolicy resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}
152 153 154 155 156 157 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/paths.rb', line 152 def tls_inspection_policy_path project:, location:, tls_inspection_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}/tlsInspectionPolicies/#{tls_inspection_policy}" end |