Module: Google::Cloud::NetworkSecurity::V1::Intercept::Paths

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

Overview

Path helper methods for the Intercept API.

Instance Method Summary collapse

Instance Method Details

#forwarding_rule_path(project:, forwarding_rule:) ⇒ ::String

Create a fully-qualified ForwardingRule resource string.

The resource will be in the following format:

projects/{project}/global/forwardingRules/{forwarding_rule}

Parameters:

  • project (String)
  • forwarding_rule (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


38
39
40
41
42
# File 'lib/google/cloud/network_security/v1/intercept/paths.rb', line 38

def forwarding_rule_path project:, forwarding_rule:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/global/forwardingRules/#{forwarding_rule}"
end

#intercept_deployment_group_path(project:, location:, intercept_deployment_group:) ⇒ ::String

Create a fully-qualified InterceptDeploymentGroup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group}

Parameters:

  • project (String)
  • location (String)
  • intercept_deployment_group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


75
76
77
78
79
80
# File 'lib/google/cloud/network_security/v1/intercept/paths.rb', line 75

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

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

#intercept_deployment_path(project:, location:, intercept_deployment:) ⇒ ::String

Create a fully-qualified InterceptDeployment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}

Parameters:

  • project (String)
  • location (String)
  • intercept_deployment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


56
57
58
59
60
61
# File 'lib/google/cloud/network_security/v1/intercept/paths.rb', line 56

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

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

#intercept_endpoint_group_association_path(project:, location:, intercept_endpoint_group_association:) ⇒ ::String

Create a fully-qualified InterceptEndpointGroupAssociation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association}

Parameters:

  • project (String)
  • location (String)
  • intercept_endpoint_group_association (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


113
114
115
116
117
118
# File 'lib/google/cloud/network_security/v1/intercept/paths.rb', line 113

def intercept_endpoint_group_association_path project:, location:, intercept_endpoint_group_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}/interceptEndpointGroupAssociations/#{intercept_endpoint_group_association}"
end

#intercept_endpoint_group_path(project:, location:, intercept_endpoint_group:) ⇒ ::String

Create a fully-qualified InterceptEndpointGroup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}

Parameters:

  • project (String)
  • location (String)
  • intercept_endpoint_group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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


131
132
133
134
135
# File 'lib/google/cloud/network_security/v1/intercept/paths.rb', line 131

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)


148
149
150
151
152
# File 'lib/google/cloud/network_security/v1/intercept/paths.rb', line 148

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

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