Module: Google::Cloud::NetworkSecurity::V1::Mirroring::Paths

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

Overview

Path helper methods for the Mirroring 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/mirroring/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

#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)


55
56
57
58
59
# File 'lib/google/cloud/network_security/v1/mirroring/paths.rb', line 55

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

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

#mirroring_deployment_group_path(project:, location:, mirroring_deployment_group:) ⇒ ::String

Create a fully-qualified MirroringDeploymentGroup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group}

Parameters:

  • project (String)
  • location (String)
  • mirroring_deployment_group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


92
93
94
95
96
97
# File 'lib/google/cloud/network_security/v1/mirroring/paths.rb', line 92

def mirroring_deployment_group_path project:, location:, mirroring_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}/mirroringDeploymentGroups/#{mirroring_deployment_group}"
end

#mirroring_deployment_path(project:, location:, mirroring_deployment:) ⇒ ::String

Create a fully-qualified MirroringDeployment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}

Parameters:

  • project (String)
  • location (String)
  • mirroring_deployment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


73
74
75
76
77
78
# File 'lib/google/cloud/network_security/v1/mirroring/paths.rb', line 73

def mirroring_deployment_path project:, location:, mirroring_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}/mirroringDeployments/#{mirroring_deployment}"
end

#mirroring_endpoint_group_association_path(project:, location:, mirroring_endpoint_group_association:) ⇒ ::String

Create a fully-qualified MirroringEndpointGroupAssociation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association}

Parameters:

  • project (String)
  • location (String)
  • mirroring_endpoint_group_association (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def mirroring_endpoint_group_association_path project:, location:, mirroring_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}/mirroringEndpointGroupAssociations/#{mirroring_endpoint_group_association}"
end

#mirroring_endpoint_group_path(project:, location:, mirroring_endpoint_group:) ⇒ ::String

Create a fully-qualified MirroringEndpointGroup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group}

Parameters:

  • project (String)
  • location (String)
  • mirroring_endpoint_group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


111
112
113
114
115
116
# File 'lib/google/cloud/network_security/v1/mirroring/paths.rb', line 111

def mirroring_endpoint_group_path project:, location:, mirroring_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}/mirroringEndpointGroups/#{mirroring_endpoint_group}"
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/mirroring/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