Class: Google::Cloud::NetworkSecurity::V1::Intercept::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/network_security/v1/intercept/client.rb

Overview

Client for the Intercept service.

Service for Third-Party Packet Intercept (TPPI). TPPI is the "in-band" flavor of the Network Security Integrations product.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#forwarding_rule_path, #intercept_deployment_group_path, #intercept_deployment_path, #intercept_endpoint_group_association_path, #intercept_endpoint_group_path, #location_path, #network_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new Intercept client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::NetworkSecurity::V1::Intercept::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Intercept client.

Yield Parameters:



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 127

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/networksecurity/v1/intercept_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @intercept_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::NetworkSecurity::V1::Intercept::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool,
    logger: @config.logger
  )

  @intercept_stub.stub_logger&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @intercept_stub.endpoint
    config.universe_domain = @intercept_stub.universe_domain
    config.logger = @intercept_stub.logger if config.respond_to? :logger=
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @intercept_stub.endpoint
    config.universe_domain = @intercept_stub.universe_domain
    config.logger = @intercept_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Client (readonly)

Get the associated client for mix-in of the IAMPolicy.

Returns:

  • (Google::Iam::V1::IAMPolicy::Client)


220
221
222
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 220

def iam_policy_client
  @iam_policy_client
end

#location_clientGoogle::Cloud::Location::Locations::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Client)


213
214
215
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 213

def location_client
  @location_client
end

#operations_client::Google::Cloud::NetworkSecurity::V1::Intercept::Operations (readonly)

Get the associated client for long-running operations.



206
207
208
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 206

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the Intercept Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all Intercept clients
::Google::Cloud::NetworkSecurity::V1::Intercept::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 65

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "NetworkSecurity", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#configure {|config| ... } ⇒ Client::Configuration

Configure the Intercept Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



97
98
99
100
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 97

def configure
  yield @config if block_given?
  @config
end

#create_intercept_deployment(request, options = nil) ⇒ ::Gapic::Operation #create_intercept_deployment(parent: nil, intercept_deployment_id: nil, intercept_deployment: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a deployment in a given project and location. See https://google.aip.dev/133.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::CreateInterceptDeploymentRequest.new

# Call the create_intercept_deployment method.
result = client.create_intercept_deployment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_intercept_deployment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_intercept_deployment via a request object, either of type CreateInterceptDeploymentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::CreateInterceptDeploymentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_intercept_deployment(parent: nil, intercept_deployment_id: nil, intercept_deployment: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_intercept_deployment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource where this deployment will be created. Format: projects/{project}/locations/{location}

    • intercept_deployment_id (::String) (defaults to: nil)

      Required. The ID to use for the new deployment, which will become the final component of the deployment's resource name.

    • intercept_deployment (::Google::Cloud::NetworkSecurity::V1::InterceptDeployment, ::Hash) (defaults to: nil)

      Required. The deployment to create.

    • request_id (::String) (defaults to: nil)

      Optional. A unique identifier for this request. Must be a UUID4. This request is only idempotent if a request_id is provided. See https://google.aip.dev/155 for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 2015

def create_intercept_deployment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateInterceptDeploymentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_intercept_deployment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_intercept_deployment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_intercept_deployment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :create_intercept_deployment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_intercept_deployment_group(request, options = nil) ⇒ ::Gapic::Operation #create_intercept_deployment_group(parent: nil, intercept_deployment_group_id: nil, intercept_deployment_group: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a deployment group in a given project and location. See https://google.aip.dev/133.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::CreateInterceptDeploymentGroupRequest.new

# Call the create_intercept_deployment_group method.
result = client.create_intercept_deployment_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_intercept_deployment_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_intercept_deployment_group via a request object, either of type CreateInterceptDeploymentGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::CreateInterceptDeploymentGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_intercept_deployment_group(parent: nil, intercept_deployment_group_id: nil, intercept_deployment_group: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_intercept_deployment_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource where this deployment group will be created. Format: projects/{project}/locations/{location}

    • intercept_deployment_group_id (::String) (defaults to: nil)

      Required. The ID to use for the new deployment group, which will become the final component of the deployment group's resource name.

    • intercept_deployment_group (::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup, ::Hash) (defaults to: nil)

      Required. The deployment group to create.

    • request_id (::String) (defaults to: nil)

      Optional. A unique identifier for this request. Must be a UUID4. This request is only idempotent if a request_id is provided. See https://google.aip.dev/155 for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1508

def create_intercept_deployment_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateInterceptDeploymentGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_intercept_deployment_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_intercept_deployment_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_intercept_deployment_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :create_intercept_deployment_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_intercept_endpoint_group(request, options = nil) ⇒ ::Gapic::Operation #create_intercept_endpoint_group(parent: nil, intercept_endpoint_group_id: nil, intercept_endpoint_group: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates an endpoint group in a given project and location. See https://google.aip.dev/133.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::CreateInterceptEndpointGroupRequest.new

# Call the create_intercept_endpoint_group method.
result = client.create_intercept_endpoint_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_intercept_endpoint_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_intercept_endpoint_group via a request object, either of type CreateInterceptEndpointGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::CreateInterceptEndpointGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_intercept_endpoint_group(parent: nil, intercept_endpoint_group_id: nil, intercept_endpoint_group: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_intercept_endpoint_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource where this endpoint group will be created. Format: projects/{project}/locations/{location}

    • intercept_endpoint_group_id (::String) (defaults to: nil)

      Required. The ID to use for the endpoint group, which will become the final component of the endpoint group's resource name.

    • intercept_endpoint_group (::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup, ::Hash) (defaults to: nil)

      Required. The endpoint group to create.

    • request_id (::String) (defaults to: nil)

      Optional. A unique identifier for this request. Must be a UUID4. This request is only idempotent if a request_id is provided. See https://google.aip.dev/155 for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 494

def create_intercept_endpoint_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateInterceptEndpointGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_intercept_endpoint_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_intercept_endpoint_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_intercept_endpoint_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :create_intercept_endpoint_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_intercept_endpoint_group_association(request, options = nil) ⇒ ::Gapic::Operation #create_intercept_endpoint_group_association(parent: nil, intercept_endpoint_group_association_id: nil, intercept_endpoint_group_association: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates an association in a given project and location. See https://google.aip.dev/133.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::CreateInterceptEndpointGroupAssociationRequest.new

# Call the create_intercept_endpoint_group_association method.
result = client.create_intercept_endpoint_group_association request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_intercept_endpoint_group_association(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_intercept_endpoint_group_association via a request object, either of type CreateInterceptEndpointGroupAssociationRequest or an equivalent Hash.

    Parameters:

  • #create_intercept_endpoint_group_association(parent: nil, intercept_endpoint_group_association_id: nil, intercept_endpoint_group_association: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_intercept_endpoint_group_association via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource where this association will be created. Format: projects/{project}/locations/{location}

    • intercept_endpoint_group_association_id (::String) (defaults to: nil)

      Optional. The ID to use for the new association, which will become the final component of the endpoint group's resource name. If not provided, the server will generate a unique ID.

    • intercept_endpoint_group_association (::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation, ::Hash) (defaults to: nil)

      Required. The association to create.

    • request_id (::String) (defaults to: nil)

      Optional. A unique identifier for this request. Must be a UUID4. This request is only idempotent if a request_id is provided. See https://google.aip.dev/155 for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1001

def create_intercept_endpoint_group_association request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateInterceptEndpointGroupAssociationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_intercept_endpoint_group_association..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_intercept_endpoint_group_association.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_intercept_endpoint_group_association.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :create_intercept_endpoint_group_association, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_intercept_deployment(request, options = nil) ⇒ ::Gapic::Operation #delete_intercept_deployment(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a deployment. See https://google.aip.dev/135.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::DeleteInterceptDeploymentRequest.new

# Call the delete_intercept_deployment method.
result = client.delete_intercept_deployment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_intercept_deployment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_intercept_deployment via a request object, either of type DeleteInterceptDeploymentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::DeleteInterceptDeploymentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_intercept_deployment(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_intercept_deployment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource

    • request_id (::String) (defaults to: nil)

      Optional. A unique identifier for this request. Must be a UUID4. This request is only idempotent if a request_id is provided. See https://google.aip.dev/155 for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 2218

def delete_intercept_deployment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteInterceptDeploymentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_intercept_deployment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_intercept_deployment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_intercept_deployment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :delete_intercept_deployment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_intercept_deployment_group(request, options = nil) ⇒ ::Gapic::Operation #delete_intercept_deployment_group(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a deployment group. See https://google.aip.dev/135.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::DeleteInterceptDeploymentGroupRequest.new

# Call the delete_intercept_deployment_group method.
result = client.delete_intercept_deployment_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_intercept_deployment_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_intercept_deployment_group via a request object, either of type DeleteInterceptDeploymentGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::DeleteInterceptDeploymentGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_intercept_deployment_group(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_intercept_deployment_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The deployment group to delete.

    • request_id (::String) (defaults to: nil)

      Optional. A unique identifier for this request. Must be a UUID4. This request is only idempotent if a request_id is provided. See https://google.aip.dev/155 for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1712

def delete_intercept_deployment_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteInterceptDeploymentGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_intercept_deployment_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_intercept_deployment_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_intercept_deployment_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :delete_intercept_deployment_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_intercept_endpoint_group(request, options = nil) ⇒ ::Gapic::Operation #delete_intercept_endpoint_group(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes an endpoint group. See https://google.aip.dev/135.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::DeleteInterceptEndpointGroupRequest.new

# Call the delete_intercept_endpoint_group method.
result = client.delete_intercept_endpoint_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_intercept_endpoint_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_intercept_endpoint_group via a request object, either of type DeleteInterceptEndpointGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::DeleteInterceptEndpointGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_intercept_endpoint_group(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_intercept_endpoint_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The endpoint group to delete.

    • request_id (::String) (defaults to: nil)

      Optional. A unique identifier for this request. Must be a UUID4. This request is only idempotent if a request_id is provided. See https://google.aip.dev/155 for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 697

def delete_intercept_endpoint_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteInterceptEndpointGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_intercept_endpoint_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_intercept_endpoint_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_intercept_endpoint_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :delete_intercept_endpoint_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_intercept_endpoint_group_association(request, options = nil) ⇒ ::Gapic::Operation #delete_intercept_endpoint_group_association(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes an association. See https://google.aip.dev/135.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::DeleteInterceptEndpointGroupAssociationRequest.new

# Call the delete_intercept_endpoint_group_association method.
result = client.delete_intercept_endpoint_group_association request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_intercept_endpoint_group_association(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_intercept_endpoint_group_association via a request object, either of type DeleteInterceptEndpointGroupAssociationRequest or an equivalent Hash.

    Parameters:

  • #delete_intercept_endpoint_group_association(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_intercept_endpoint_group_association via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The association to delete.

    • request_id (::String) (defaults to: nil)

      Optional. A unique identifier for this request. Must be a UUID4. This request is only idempotent if a request_id is provided. See https://google.aip.dev/155 for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1205

def delete_intercept_endpoint_group_association request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteInterceptEndpointGroupAssociationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_intercept_endpoint_group_association..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_intercept_endpoint_group_association.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_intercept_endpoint_group_association.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :delete_intercept_endpoint_group_association, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_intercept_deployment(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptDeployment #get_intercept_deployment(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptDeployment

Gets a specific deployment. See https://google.aip.dev/131.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::GetInterceptDeploymentRequest.new

# Call the get_intercept_deployment method.
result = client.get_intercept_deployment request

# The returned object is of type Google::Cloud::NetworkSecurity::V1::InterceptDeployment.
p result

Overloads:

  • #get_intercept_deployment(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptDeployment

    Pass arguments to get_intercept_deployment via a request object, either of type GetInterceptDeploymentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::GetInterceptDeploymentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_intercept_deployment(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptDeployment

    Pass arguments to get_intercept_deployment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the deployment to retrieve. Format: projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1912

def get_intercept_deployment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetInterceptDeploymentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_intercept_deployment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_intercept_deployment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_intercept_deployment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :get_intercept_deployment, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_intercept_deployment_group(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup #get_intercept_deployment_group(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup

Gets a specific deployment group. See https://google.aip.dev/131.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::GetInterceptDeploymentGroupRequest.new

# Call the get_intercept_deployment_group method.
result = client.get_intercept_deployment_group request

# The returned object is of type Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup.
p result

Overloads:

  • #get_intercept_deployment_group(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup

    Pass arguments to get_intercept_deployment_group via a request object, either of type GetInterceptDeploymentGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::GetInterceptDeploymentGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_intercept_deployment_group(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup

    Pass arguments to get_intercept_deployment_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the deployment group to retrieve. Format: projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1405

def get_intercept_deployment_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetInterceptDeploymentGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_intercept_deployment_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_intercept_deployment_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_intercept_deployment_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :get_intercept_deployment_group, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_intercept_endpoint_group(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup #get_intercept_endpoint_group(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup

Gets a specific endpoint group. See https://google.aip.dev/131.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::GetInterceptEndpointGroupRequest.new

# Call the get_intercept_endpoint_group method.
result = client.get_intercept_endpoint_group request

# The returned object is of type Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup.
p result

Overloads:

  • #get_intercept_endpoint_group(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup

    Pass arguments to get_intercept_endpoint_group via a request object, either of type GetInterceptEndpointGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::GetInterceptEndpointGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_intercept_endpoint_group(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup

    Pass arguments to get_intercept_endpoint_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the endpoint group to retrieve. Format: projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 391

def get_intercept_endpoint_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetInterceptEndpointGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_intercept_endpoint_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_intercept_endpoint_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_intercept_endpoint_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :get_intercept_endpoint_group, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_intercept_endpoint_group_association(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation #get_intercept_endpoint_group_association(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation

Gets a specific association. See https://google.aip.dev/131.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::GetInterceptEndpointGroupAssociationRequest.new

# Call the get_intercept_endpoint_group_association method.
result = client.get_intercept_endpoint_group_association request

# The returned object is of type Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation.
p result

Overloads:

  • #get_intercept_endpoint_group_association(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation

    Pass arguments to get_intercept_endpoint_group_association via a request object, either of type GetInterceptEndpointGroupAssociationRequest or an equivalent Hash.

    Parameters:

  • #get_intercept_endpoint_group_association(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation

    Pass arguments to get_intercept_endpoint_group_association via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the association to retrieve. Format: projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 897

def get_intercept_endpoint_group_association request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetInterceptEndpointGroupAssociationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_intercept_endpoint_group_association..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_intercept_endpoint_group_association.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_intercept_endpoint_group_association.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :get_intercept_endpoint_group_association, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_intercept_deployment_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup> #list_intercept_deployment_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup>

Lists deployment groups in a given project and location. See https://google.aip.dev/132.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::ListInterceptDeploymentGroupsRequest.new

# Call the list_intercept_deployment_groups method.
result = client.list_intercept_deployment_groups request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup.
  p item
end

Overloads:

  • #list_intercept_deployment_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup>

    Pass arguments to list_intercept_deployment_groups via a request object, either of type ListInterceptDeploymentGroupsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::ListInterceptDeploymentGroupsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_intercept_deployment_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptDeploymentGroup>

    Pass arguments to list_intercept_deployment_groups via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent, which owns this collection of deployment groups. Example: projects/123456789/locations/global. See https://google.aip.dev/132 for more details.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. See https://google.aip.dev/158 for more details.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListInterceptDeploymentGroups call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListInterceptDeploymentGroups must match the call that provided the page token. See https://google.aip.dev/158 for more details.

    • filter (::String) (defaults to: nil)

      Optional. Filter expression. See https://google.aip.dev/160#filtering for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Sort expression. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1315

def list_intercept_deployment_groups request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListInterceptDeploymentGroupsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_intercept_deployment_groups..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_intercept_deployment_groups.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_intercept_deployment_groups.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :list_intercept_deployment_groups, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @intercept_stub, :list_intercept_deployment_groups, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_intercept_deployments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptDeployment> #list_intercept_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptDeployment>

Lists deployments in a given project and location. See https://google.aip.dev/132.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::ListInterceptDeploymentsRequest.new

# Call the list_intercept_deployments method.
result = client.list_intercept_deployments request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetworkSecurity::V1::InterceptDeployment.
  p item
end

Overloads:

  • #list_intercept_deployments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptDeployment>

    Pass arguments to list_intercept_deployments via a request object, either of type ListInterceptDeploymentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::ListInterceptDeploymentsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_intercept_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptDeployment>

    Pass arguments to list_intercept_deployments via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent, which owns this collection of deployments. Example: projects/123456789/locations/us-central1-a. See https://google.aip.dev/132 for more details.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. See https://google.aip.dev/158 for more details.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListInterceptDeployments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListInterceptDeployments must match the call that provided the page token. See https://google.aip.dev/158 for more details.

    • filter (::String) (defaults to: nil)

      Optional. Filter expression. See https://google.aip.dev/160#filtering for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Sort expression. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1822

def list_intercept_deployments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListInterceptDeploymentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_intercept_deployments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_intercept_deployments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_intercept_deployments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :list_intercept_deployments, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @intercept_stub, :list_intercept_deployments, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_intercept_endpoint_group_associations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation> #list_intercept_endpoint_group_associations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation>

Lists associations in a given project and location. See https://google.aip.dev/132.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::ListInterceptEndpointGroupAssociationsRequest.new

# Call the list_intercept_endpoint_group_associations method.
result = client.list_intercept_endpoint_group_associations request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation.
  p item
end

Overloads:

  • #list_intercept_endpoint_group_associations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation>

    Pass arguments to list_intercept_endpoint_group_associations via a request object, either of type ListInterceptEndpointGroupAssociationsRequest or an equivalent Hash.

    Parameters:

  • #list_intercept_endpoint_group_associations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroupAssociation>

    Pass arguments to list_intercept_endpoint_group_associations via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent, which owns this collection of associations. Example: projects/123456789/locations/global. See https://google.aip.dev/132 for more details.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. See https://google.aip.dev/158 for more details.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListInterceptEndpointGroups call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListInterceptEndpointGroups must match the call that provided the page token. See https://google.aip.dev/158 for more details.

    • filter (::String) (defaults to: nil)

      Optional. Filter expression. See https://google.aip.dev/160#filtering for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Sort expression. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 807

def list_intercept_endpoint_group_associations request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListInterceptEndpointGroupAssociationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_intercept_endpoint_group_associations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_intercept_endpoint_group_associations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_intercept_endpoint_group_associations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :list_intercept_endpoint_group_associations, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @intercept_stub, :list_intercept_endpoint_group_associations, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_intercept_endpoint_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup> #list_intercept_endpoint_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup>

Lists endpoint groups in a given project and location. See https://google.aip.dev/132.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::ListInterceptEndpointGroupsRequest.new

# Call the list_intercept_endpoint_groups method.
result = client.list_intercept_endpoint_groups request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup.
  p item
end

Overloads:

  • #list_intercept_endpoint_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup>

    Pass arguments to list_intercept_endpoint_groups via a request object, either of type ListInterceptEndpointGroupsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::ListInterceptEndpointGroupsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_intercept_endpoint_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::InterceptEndpointGroup>

    Pass arguments to list_intercept_endpoint_groups via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent, which owns this collection of endpoint groups. Example: projects/123456789/locations/global. See https://google.aip.dev/132 for more details.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. See https://google.aip.dev/158 for more details.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListInterceptEndpointGroups call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListInterceptEndpointGroups must match the call that provided the page token. See https://google.aip.dev/158 for more details.

    • filter (::String) (defaults to: nil)

      Optional. Filter expression. See https://google.aip.dev/160#filtering for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Sort expression. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 301

def list_intercept_endpoint_groups request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListInterceptEndpointGroupsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_intercept_endpoint_groups..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_intercept_endpoint_groups.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_intercept_endpoint_groups.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :list_intercept_endpoint_groups, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @intercept_stub, :list_intercept_endpoint_groups, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


227
228
229
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 227

def logger
  @intercept_stub.logger
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


107
108
109
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 107

def universe_domain
  @intercept_stub.universe_domain
end

#update_intercept_deployment(request, options = nil) ⇒ ::Gapic::Operation #update_intercept_deployment(update_mask: nil, intercept_deployment: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates a deployment. See https://google.aip.dev/134.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::UpdateInterceptDeploymentRequest.new

# Call the update_intercept_deployment method.
result = client.update_intercept_deployment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_intercept_deployment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_intercept_deployment via a request object, either of type UpdateInterceptDeploymentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::UpdateInterceptDeploymentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_intercept_deployment(update_mask: nil, intercept_deployment: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_intercept_deployment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 2119

def update_intercept_deployment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateInterceptDeploymentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_intercept_deployment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.intercept_deployment&.name
    header_params["intercept_deployment.name"] = request.intercept_deployment.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_intercept_deployment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_intercept_deployment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :update_intercept_deployment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_intercept_deployment_group(request, options = nil) ⇒ ::Gapic::Operation #update_intercept_deployment_group(update_mask: nil, intercept_deployment_group: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates a deployment group. See https://google.aip.dev/134.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::UpdateInterceptDeploymentGroupRequest.new

# Call the update_intercept_deployment_group method.
result = client.update_intercept_deployment_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_intercept_deployment_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_intercept_deployment_group via a request object, either of type UpdateInterceptDeploymentGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::UpdateInterceptDeploymentGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_intercept_deployment_group(update_mask: nil, intercept_deployment_group: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_intercept_deployment_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1613

def update_intercept_deployment_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateInterceptDeploymentGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_intercept_deployment_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.intercept_deployment_group&.name
    header_params["intercept_deployment_group.name"] = request.intercept_deployment_group.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_intercept_deployment_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_intercept_deployment_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :update_intercept_deployment_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_intercept_endpoint_group(request, options = nil) ⇒ ::Gapic::Operation #update_intercept_endpoint_group(update_mask: nil, intercept_endpoint_group: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates an endpoint group. See https://google.aip.dev/134.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::UpdateInterceptEndpointGroupRequest.new

# Call the update_intercept_endpoint_group method.
result = client.update_intercept_endpoint_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_intercept_endpoint_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_intercept_endpoint_group via a request object, either of type UpdateInterceptEndpointGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetworkSecurity::V1::UpdateInterceptEndpointGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_intercept_endpoint_group(update_mask: nil, intercept_endpoint_group: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_intercept_endpoint_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 598

def update_intercept_endpoint_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateInterceptEndpointGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_intercept_endpoint_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.intercept_endpoint_group&.name
    header_params["intercept_endpoint_group.name"] = request.intercept_endpoint_group.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_intercept_endpoint_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_intercept_endpoint_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :update_intercept_endpoint_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_intercept_endpoint_group_association(request, options = nil) ⇒ ::Gapic::Operation #update_intercept_endpoint_group_association(update_mask: nil, intercept_endpoint_group_association: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates an association. See https://google.aip.dev/134.

Examples:

Basic example

require "google/cloud/network_security/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetworkSecurity::V1::Intercept::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::UpdateInterceptEndpointGroupAssociationRequest.new

# Call the update_intercept_endpoint_group_association method.
result = client.update_intercept_endpoint_group_association request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_intercept_endpoint_group_association(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_intercept_endpoint_group_association via a request object, either of type UpdateInterceptEndpointGroupAssociationRequest or an equivalent Hash.

    Parameters:

  • #update_intercept_endpoint_group_association(update_mask: nil, intercept_endpoint_group_association: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_intercept_endpoint_group_association via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
# File 'lib/google/cloud/network_security/v1/intercept/client.rb', line 1106

def update_intercept_endpoint_group_association request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateInterceptEndpointGroupAssociationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_intercept_endpoint_group_association..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.intercept_endpoint_group_association&.name
    header_params["intercept_endpoint_group_association.name"] = request.intercept_endpoint_group_association.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_intercept_endpoint_group_association.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_intercept_endpoint_group_association.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @intercept_stub.call_rpc :update_intercept_endpoint_group_association, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end