Class: Google::Cloud::NetworkSecurity::V1::FirewallActivation::Client
- Inherits:
-
Object
- Object
- Google::Cloud::NetworkSecurity::V1::FirewallActivation::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/network_security/v1/firewall_activation/client.rb
Overview
Client for the FirewallActivation service.
Service for managing Firewall Endpoints and Associations.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Client
readonly
Get the associated client for mix-in of the IAMPolicy.
-
#location_client ⇒ Google::Cloud::Location::Locations::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallActivation::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the FirewallActivation Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the FirewallActivation Client instance.
-
#create_firewall_endpoint(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a new FirewallEndpoint in a given organization and location.
-
#create_firewall_endpoint_association(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a new FirewallEndpointAssociation in a given project and location.
-
#create_project_firewall_endpoint(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a new FirewallEndpoint in a given project and location.
-
#delete_firewall_endpoint(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes a single org Endpoint.
-
#delete_firewall_endpoint_association(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes a single FirewallEndpointAssociation.
-
#delete_project_firewall_endpoint(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes a single project Endpoint.
-
#get_firewall_endpoint(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint
Gets details of a single org Endpoint.
-
#get_firewall_endpoint_association(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallEndpointAssociation
Gets details of a single FirewallEndpointAssociation.
-
#get_project_firewall_endpoint(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint
Gets details of a single project Endpoint.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new FirewallActivation client object.
-
#list_firewall_endpoint_associations(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::FirewallEndpointAssociation>
Lists Associations in a given project and location.
-
#list_firewall_endpoints(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint>
Lists FirewallEndpoints in a given organization and location.
-
#list_project_firewall_endpoints(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint>
Lists FirewallEndpoints in a given project and location.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_firewall_endpoint(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Update a single org Endpoint.
-
#update_firewall_endpoint_association(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Update a single FirewallEndpointAssociation.
-
#update_project_firewall_endpoint(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Update a single project Endpoint.
Methods included from Paths
#firewall_endpoint_association_path, #firewall_endpoint_path, #location_path, #network_path, #organization_location_path, #tls_inspection_policy_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new FirewallActivation client object.
126 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 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 126 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/firewall_activation_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 @firewall_activation_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::NetworkSecurity::V1::FirewallActivation::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 ) @firewall_activation_stub.stub_logger&.info do |entry| entry.set_system_name entry.set_service entry. = "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 = @firewall_activation_stub.endpoint config.universe_domain = @firewall_activation_stub.universe_domain config.logger = @firewall_activation_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 = @firewall_activation_stub.endpoint config.universe_domain = @firewall_activation_stub.universe_domain config.logger = @firewall_activation_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
219 220 221 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 219 def iam_policy_client @iam_policy_client end |
#location_client ⇒ Google::Cloud::Location::Locations::Client (readonly)
Get the associated client for mix-in of the Locations.
212 213 214 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 212 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallActivation::Operations (readonly)
Get the associated client for long-running operations.
205 206 207 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 205 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the FirewallActivation Client class.
See Configuration for a description of the configuration fields.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 64 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 FirewallActivation 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.
96 97 98 99 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 96 def configure yield @config if block_given? @config end |
#create_firewall_endpoint(request, options = nil) ⇒ ::Gapic::Operation #create_firewall_endpoint(parent: nil, firewall_endpoint_id: nil, firewall_endpoint: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a new FirewallEndpoint in a given organization and location.
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 673 def create_firewall_endpoint request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateFirewallEndpointRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_firewall_endpoint..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 .apply_defaults timeout: @config.rpcs.create_firewall_endpoint.timeout, metadata: , retry_policy: @config.rpcs.create_firewall_endpoint.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :create_firewall_endpoint, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_firewall_endpoint_association(request, options = nil) ⇒ ::Gapic::Operation #create_firewall_endpoint_association(parent: nil, firewall_endpoint_association_id: nil, firewall_endpoint_association: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a new FirewallEndpointAssociation in a given project and location.
1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 1530 def create_firewall_endpoint_association request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateFirewallEndpointAssociationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_firewall_endpoint_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 .apply_defaults timeout: @config.rpcs.create_firewall_endpoint_association.timeout, metadata: , retry_policy: @config.rpcs.create_firewall_endpoint_association.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :create_firewall_endpoint_association, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_project_firewall_endpoint(request, options = nil) ⇒ ::Gapic::Operation #create_project_firewall_endpoint(parent: nil, firewall_endpoint_id: nil, firewall_endpoint: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a new FirewallEndpoint in a given project and location.
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 787 def create_project_firewall_endpoint request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateFirewallEndpointRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_project_firewall_endpoint..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 .apply_defaults timeout: @config.rpcs.create_project_firewall_endpoint.timeout, metadata: , retry_policy: @config.rpcs.create_project_firewall_endpoint.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :create_project_firewall_endpoint, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_firewall_endpoint(request, options = nil) ⇒ ::Gapic::Operation #delete_firewall_endpoint(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a single org Endpoint.
895 896 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/firewall_activation/client.rb', line 895 def delete_firewall_endpoint request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteFirewallEndpointRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_firewall_endpoint..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 .apply_defaults timeout: @config.rpcs.delete_firewall_endpoint.timeout, metadata: , retry_policy: @config.rpcs.delete_firewall_endpoint.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :delete_firewall_endpoint, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_firewall_endpoint_association(request, options = nil) ⇒ ::Gapic::Operation #delete_firewall_endpoint_association(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a single FirewallEndpointAssociation.
1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 1638 def delete_firewall_endpoint_association request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteFirewallEndpointAssociationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_firewall_endpoint_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 .apply_defaults timeout: @config.rpcs.delete_firewall_endpoint_association.timeout, metadata: , retry_policy: @config.rpcs.delete_firewall_endpoint_association.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :delete_firewall_endpoint_association, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_project_firewall_endpoint(request, options = nil) ⇒ ::Gapic::Operation #delete_project_firewall_endpoint(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a single project Endpoint.
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 1043 1044 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 1003 def delete_project_firewall_endpoint request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteFirewallEndpointRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_project_firewall_endpoint..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 .apply_defaults timeout: @config.rpcs.delete_project_firewall_endpoint.timeout, metadata: , retry_policy: @config.rpcs.delete_project_firewall_endpoint.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :delete_project_firewall_endpoint, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_firewall_endpoint(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint #get_firewall_endpoint(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint
Gets details of a single org Endpoint.
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 476 def get_firewall_endpoint request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetFirewallEndpointRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_firewall_endpoint..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 .apply_defaults timeout: @config.rpcs.get_firewall_endpoint.timeout, metadata: , retry_policy: @config.rpcs.get_firewall_endpoint.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :get_firewall_endpoint, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_firewall_endpoint_association(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallEndpointAssociation #get_firewall_endpoint_association(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallEndpointAssociation
Gets details of a single FirewallEndpointAssociation.
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 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 1418 def get_firewall_endpoint_association request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetFirewallEndpointAssociationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_firewall_endpoint_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 .apply_defaults timeout: @config.rpcs.get_firewall_endpoint_association.timeout, metadata: , retry_policy: @config.rpcs.get_firewall_endpoint_association.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :get_firewall_endpoint_association, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_project_firewall_endpoint(request, options = nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint #get_project_firewall_endpoint(name: nil) ⇒ ::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint
Gets details of a single project Endpoint.
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 561 def get_project_firewall_endpoint request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetFirewallEndpointRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_project_firewall_endpoint..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 .apply_defaults timeout: @config.rpcs.get_project_firewall_endpoint.timeout, metadata: , retry_policy: @config.rpcs.get_project_firewall_endpoint.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :get_project_firewall_endpoint, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_firewall_endpoint_associations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::FirewallEndpointAssociation> #list_firewall_endpoint_associations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::FirewallEndpointAssociation>
Lists Associations in a given project and location.
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 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 1331 def list_firewall_endpoint_associations request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListFirewallEndpointAssociationsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_firewall_endpoint_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 .apply_defaults timeout: @config.rpcs.list_firewall_endpoint_associations.timeout, metadata: , retry_policy: @config.rpcs.list_firewall_endpoint_associations.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :list_firewall_endpoint_associations, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @firewall_activation_stub, :list_firewall_endpoint_associations, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_firewall_endpoints(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint> #list_firewall_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint>
Lists FirewallEndpoints in a given organization and location.
289 290 291 292 293 294 295 296 297 298 299 300 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 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 289 def list_firewall_endpoints request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListFirewallEndpointsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_firewall_endpoints..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 .apply_defaults timeout: @config.rpcs.list_firewall_endpoints.timeout, metadata: , retry_policy: @config.rpcs.list_firewall_endpoints.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :list_firewall_endpoints, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @firewall_activation_stub, :list_firewall_endpoints, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_project_firewall_endpoints(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint> #list_project_firewall_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::FirewallEndpoint>
Lists FirewallEndpoints in a given project and location.
389 390 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/firewall_activation/client.rb', line 389 def list_project_firewall_endpoints request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListFirewallEndpointsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_project_firewall_endpoints..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 .apply_defaults timeout: @config.rpcs.list_project_firewall_endpoints.timeout, metadata: , retry_policy: @config.rpcs.list_project_firewall_endpoints.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :list_project_firewall_endpoints, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @firewall_activation_stub, :list_project_firewall_endpoints, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
226 227 228 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 226 def logger @firewall_activation_stub.logger end |
#universe_domain ⇒ String
The effective universe domain
106 107 108 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 106 def universe_domain @firewall_activation_stub.universe_domain end |
#update_firewall_endpoint(request, options = nil) ⇒ ::Gapic::Operation #update_firewall_endpoint(update_mask: nil, firewall_endpoint: nil, request_id: nil) ⇒ ::Gapic::Operation
Update a single org Endpoint.
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 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 1117 def update_firewall_endpoint request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateFirewallEndpointRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_firewall_endpoint..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.firewall_endpoint&.name header_params["firewall_endpoint.name"] = request.firewall_endpoint.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_firewall_endpoint.timeout, metadata: , retry_policy: @config.rpcs.update_firewall_endpoint.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :update_firewall_endpoint, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_firewall_endpoint_association(request, options = nil) ⇒ ::Gapic::Operation #update_firewall_endpoint_association(update_mask: nil, firewall_endpoint_association: nil, request_id: nil) ⇒ ::Gapic::Operation
Update a single FirewallEndpointAssociation.
1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 1752 def update_firewall_endpoint_association request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateFirewallEndpointAssociationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_firewall_endpoint_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.firewall_endpoint_association&.name header_params["firewall_endpoint_association.name"] = request.firewall_endpoint_association.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_firewall_endpoint_association.timeout, metadata: , retry_policy: @config.rpcs.update_firewall_endpoint_association.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :update_firewall_endpoint_association, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_project_firewall_endpoint(request, options = nil) ⇒ ::Gapic::Operation #update_project_firewall_endpoint(update_mask: nil, firewall_endpoint: nil, request_id: nil) ⇒ ::Gapic::Operation
Update a single project Endpoint.
1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 |
# File 'lib/google/cloud/network_security/v1/firewall_activation/client.rb', line 1231 def update_project_firewall_endpoint request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateFirewallEndpointRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_project_firewall_endpoint..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.firewall_endpoint&.name header_params["firewall_endpoint.name"] = request.firewall_endpoint.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_project_firewall_endpoint.timeout, metadata: , retry_policy: @config.rpcs.update_project_firewall_endpoint.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @firewall_activation_stub.call_rpc :update_project_firewall_endpoint, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |