Reference documentation and code samples for the Network Security V1beta1 API class Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.
Client for the NetworkSecurity service.
Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the NetworkSecurity Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all NetworkSecurity clients ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the NetworkSecurity 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 Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_authorization_policy
def create_authorization_policy(request, options = nil) -> ::Gapic::Operation
def create_authorization_policy(parent: nil, authorization_policy_id: nil, authorization_policy: nil) -> ::Gapic::Operation
Creates a new AuthorizationPolicy in a given project and location.
def create_authorization_policy(request, options = nil) -> ::Gapic::Operation
create_authorization_policy
via a request object, either of type
CreateAuthorizationPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::CreateAuthorizationPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_authorization_policy(parent: nil, authorization_policy_id: nil, authorization_policy: nil) -> ::Gapic::Operation
create_authorization_policy
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).
-
parent (::String) — Required. The parent resource of the AuthorizationPolicy. Must be in the
format
projects/{project}/locations/{location}
. - authorization_policy_id (::String) — Required. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy".
- authorization_policy (::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy, ::Hash) — Required. AuthorizationPolicy resource to be created.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::CreateAuthorizationPolicyRequest.new # Call the create_authorization_policy method. result = client.create_authorization_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_client_tls_policy
def create_client_tls_policy(request, options = nil) -> ::Gapic::Operation
def create_client_tls_policy(parent: nil, client_tls_policy_id: nil, client_tls_policy: nil) -> ::Gapic::Operation
Creates a new ClientTlsPolicy in a given project and location.
def create_client_tls_policy(request, options = nil) -> ::Gapic::Operation
create_client_tls_policy
via a request object, either of type
CreateClientTlsPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::CreateClientTlsPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_client_tls_policy(parent: nil, client_tls_policy_id: nil, client_tls_policy: nil) -> ::Gapic::Operation
create_client_tls_policy
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).
-
parent (::String) — Required. The parent resource of the ClientTlsPolicy. Must be in
the format
projects/*/locations/{location}
. - client_tls_policy_id (::String) — Required. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "client_mtls_policy".
- client_tls_policy (::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy, ::Hash) — Required. ClientTlsPolicy resource to be created.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::CreateClientTlsPolicyRequest.new # Call the create_client_tls_policy method. result = client.create_client_tls_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_server_tls_policy
def create_server_tls_policy(request, options = nil) -> ::Gapic::Operation
def create_server_tls_policy(parent: nil, server_tls_policy_id: nil, server_tls_policy: nil) -> ::Gapic::Operation
Creates a new ServerTlsPolicy in a given project and location.
def create_server_tls_policy(request, options = nil) -> ::Gapic::Operation
create_server_tls_policy
via a request object, either of type
CreateServerTlsPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::CreateServerTlsPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_server_tls_policy(parent: nil, server_tls_policy_id: nil, server_tls_policy: nil) -> ::Gapic::Operation
create_server_tls_policy
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).
-
parent (::String) — Required. The parent resource of the ServerTlsPolicy. Must be in
the format
projects/*/locations/{location}
. - server_tls_policy_id (::String) — Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "server_mtls_policy".
- server_tls_policy (::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy, ::Hash) — Required. ServerTlsPolicy resource to be created.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::CreateServerTlsPolicyRequest.new # Call the create_server_tls_policy method. result = client.create_server_tls_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_authorization_policy
def delete_authorization_policy(request, options = nil) -> ::Gapic::Operation
def delete_authorization_policy(name: nil) -> ::Gapic::Operation
Deletes a single AuthorizationPolicy.
def delete_authorization_policy(request, options = nil) -> ::Gapic::Operation
delete_authorization_policy
via a request object, either of type
DeleteAuthorizationPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::DeleteAuthorizationPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_authorization_policy(name: nil) -> ::Gapic::Operation
delete_authorization_policy
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).
-
name (::String) — Required. A name of the AuthorizationPolicy to delete. Must be in the
format
projects/{project}/locations/{location}/authorizationPolicies/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::DeleteAuthorizationPolicyRequest.new # Call the delete_authorization_policy method. result = client.delete_authorization_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_client_tls_policy
def delete_client_tls_policy(request, options = nil) -> ::Gapic::Operation
def delete_client_tls_policy(name: nil) -> ::Gapic::Operation
Deletes a single ClientTlsPolicy.
def delete_client_tls_policy(request, options = nil) -> ::Gapic::Operation
delete_client_tls_policy
via a request object, either of type
DeleteClientTlsPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::DeleteClientTlsPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_client_tls_policy(name: nil) -> ::Gapic::Operation
delete_client_tls_policy
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).
-
name (::String) — Required. A name of the ClientTlsPolicy to delete. Must be in
the format
projects/*/locations/{location}/clientTlsPolicies/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::DeleteClientTlsPolicyRequest.new # Call the delete_client_tls_policy method. result = client.delete_client_tls_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_server_tls_policy
def delete_server_tls_policy(request, options = nil) -> ::Gapic::Operation
def delete_server_tls_policy(name: nil) -> ::Gapic::Operation
Deletes a single ServerTlsPolicy.
def delete_server_tls_policy(request, options = nil) -> ::Gapic::Operation
delete_server_tls_policy
via a request object, either of type
DeleteServerTlsPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::DeleteServerTlsPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_server_tls_policy(name: nil) -> ::Gapic::Operation
delete_server_tls_policy
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).
-
name (::String) — Required. A name of the ServerTlsPolicy to delete. Must be in
the format
projects/*/locations/{location}/serverTlsPolicies/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::DeleteServerTlsPolicyRequest.new # Call the delete_server_tls_policy method. result = client.delete_server_tls_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#get_authorization_policy
def get_authorization_policy(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy
def get_authorization_policy(name: nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy
Gets details of a single AuthorizationPolicy.
def get_authorization_policy(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy
get_authorization_policy
via a request object, either of type
GetAuthorizationPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::GetAuthorizationPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_authorization_policy(name: nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy
get_authorization_policy
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).
-
name (::String) — Required. A name of the AuthorizationPolicy to get. Must be in the format
projects/{project}/locations/{location}/authorizationPolicies/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::GetAuthorizationPolicyRequest.new # Call the get_authorization_policy method. result = client.get_authorization_policy request # The returned object is of type Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy. p result
#get_client_tls_policy
def get_client_tls_policy(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy
def get_client_tls_policy(name: nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy
Gets details of a single ClientTlsPolicy.
def get_client_tls_policy(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy
get_client_tls_policy
via a request object, either of type
GetClientTlsPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::GetClientTlsPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_client_tls_policy(name: nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy
get_client_tls_policy
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).
-
name (::String) — Required. A name of the ClientTlsPolicy to get. Must be in the format
projects/*/locations/{location}/clientTlsPolicies/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::GetClientTlsPolicyRequest.new # Call the get_client_tls_policy method. result = client.get_client_tls_policy request # The returned object is of type Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy. p result
#get_server_tls_policy
def get_server_tls_policy(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy
def get_server_tls_policy(name: nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy
Gets details of a single ServerTlsPolicy.
def get_server_tls_policy(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy
get_server_tls_policy
via a request object, either of type
GetServerTlsPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::GetServerTlsPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_server_tls_policy(name: nil) -> ::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy
get_server_tls_policy
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).
-
name (::String) — Required. A name of the ServerTlsPolicy to get. Must be in the format
projects/*/locations/{location}/serverTlsPolicies/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::GetServerTlsPolicyRequest.new # Call the get_server_tls_policy method. result = client.get_server_tls_policy request # The returned object is of type Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new NetworkSecurity client object.
- (config) — Configure the NetworkSecurity client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a client using a custom configuration client = ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new do |config| config.timeout = 10.0 end
#list_authorization_policies
def list_authorization_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy>
def list_authorization_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy>
Lists AuthorizationPolicies in a given project and location.
def list_authorization_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy>
list_authorization_policies
via a request object, either of type
ListAuthorizationPoliciesRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::ListAuthorizationPoliciesRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_authorization_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy>
list_authorization_policies
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).
-
parent (::String) — Required. The project and location from which the AuthorizationPolicies
should be listed, specified in the format
projects/{project}/locations/{location}
. - page_size (::Integer) — Maximum number of AuthorizationPolicies to return per call.
-
page_token (::String) — The value returned by the last
ListAuthorizationPoliciesResponse
Indicates that this is a continuation of a priorListAuthorizationPolicies
call, and that the system should return the next page of data.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::ListAuthorizationPoliciesRequest.new # Call the list_authorization_policies method. result = client.list_authorization_policies request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy. p response end
#list_client_tls_policies
def list_client_tls_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy>
def list_client_tls_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy>
Lists ClientTlsPolicies in a given project and location.
def list_client_tls_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy>
list_client_tls_policies
via a request object, either of type
ListClientTlsPoliciesRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::ListClientTlsPoliciesRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_client_tls_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy>
list_client_tls_policies
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).
-
parent (::String) — Required. The project and location from which the ClientTlsPolicies should
be listed, specified in the format
projects/*/locations/{location}
. - page_size (::Integer) — Maximum number of ClientTlsPolicies to return per call.
-
page_token (::String) — The value returned by the last
ListClientTlsPoliciesResponse
Indicates that this is a continuation of a priorListClientTlsPolicies
call, and that the system should return the next page of data.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::ListClientTlsPoliciesRequest.new # Call the list_client_tls_policies method. result = client.list_client_tls_policies request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy. p response end
#list_server_tls_policies
def list_server_tls_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy>
def list_server_tls_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy>
Lists ServerTlsPolicies in a given project and location.
def list_server_tls_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy>
list_server_tls_policies
via a request object, either of type
ListServerTlsPoliciesRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::ListServerTlsPoliciesRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_server_tls_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy>
list_server_tls_policies
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).
-
parent (::String) — Required. The project and location from which the ServerTlsPolicies should
be listed, specified in the format
projects/*/locations/{location}
. - page_size (::Integer) — Maximum number of ServerTlsPolicies to return per call.
-
page_token (::String) — The value returned by the last
ListServerTlsPoliciesResponse
Indicates that this is a continuation of a priorListServerTlsPolicies
call, and that the system should return the next page of data.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::ListServerTlsPoliciesRequest.new # Call the list_server_tls_policies method. result = client.list_server_tls_policies request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy. p response end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#operations_client
def operations_client() -> ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Operations
Get the associated client for long-running operations.
#update_authorization_policy
def update_authorization_policy(request, options = nil) -> ::Gapic::Operation
def update_authorization_policy(update_mask: nil, authorization_policy: nil) -> ::Gapic::Operation
Updates the parameters of a single AuthorizationPolicy.
def update_authorization_policy(request, options = nil) -> ::Gapic::Operation
update_authorization_policy
via a request object, either of type
UpdateAuthorizationPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::UpdateAuthorizationPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_authorization_policy(update_mask: nil, authorization_policy: nil) -> ::Gapic::Operation
update_authorization_policy
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the AuthorizationPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- authorization_policy (::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy, ::Hash) — Required. Updated AuthorizationPolicy resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::UpdateAuthorizationPolicyRequest.new # Call the update_authorization_policy method. result = client.update_authorization_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#update_client_tls_policy
def update_client_tls_policy(request, options = nil) -> ::Gapic::Operation
def update_client_tls_policy(update_mask: nil, client_tls_policy: nil) -> ::Gapic::Operation
Updates the parameters of a single ClientTlsPolicy.
def update_client_tls_policy(request, options = nil) -> ::Gapic::Operation
update_client_tls_policy
via a request object, either of type
UpdateClientTlsPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::UpdateClientTlsPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_client_tls_policy(update_mask: nil, client_tls_policy: nil) -> ::Gapic::Operation
update_client_tls_policy
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the ClientTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- client_tls_policy (::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy, ::Hash) — Required. Updated ClientTlsPolicy resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::UpdateClientTlsPolicyRequest.new # Call the update_client_tls_policy method. result = client.update_client_tls_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#update_server_tls_policy
def update_server_tls_policy(request, options = nil) -> ::Gapic::Operation
def update_server_tls_policy(update_mask: nil, server_tls_policy: nil) -> ::Gapic::Operation
Updates the parameters of a single ServerTlsPolicy.
def update_server_tls_policy(request, options = nil) -> ::Gapic::Operation
update_server_tls_policy
via a request object, either of type
UpdateServerTlsPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1beta1::UpdateServerTlsPolicyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_server_tls_policy(update_mask: nil, server_tls_policy: nil) -> ::Gapic::Operation
update_server_tls_policy
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- server_tls_policy (::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy, ::Hash) — Required. Updated ServerTlsPolicy resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1beta1::UpdateServerTlsPolicyRequest.new # Call the update_server_tls_policy method. result = client.update_server_tls_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end