google-cloud-compute-v1 1.2.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -5
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +90 -52
- data/lib/google/cloud/compute/v1/accelerator_types.rb +5 -0
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +156 -89
- data/lib/google/cloud/compute/v1/addresses.rb +3 -0
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +222 -129
- data/lib/google/cloud/compute/v1/autoscalers.rb +3 -0
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +285 -161
- data/lib/google/cloud/compute/v1/backend_buckets.rb +3 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +383 -221
- data/lib/google/cloud/compute/v1/backend_services.rb +3 -0
- data/lib/google/cloud/compute/v1/compute_pb.rb +671 -3
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +90 -52
- data/lib/google/cloud/compute/v1/disk_types.rb +3 -0
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +3 -3
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +429 -240
- data/lib/google/cloud/compute/v1/disks.rb +3 -0
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +189 -102
- data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +3 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +555 -330
- data/lib/google/cloud/compute/v1/firewall_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +187 -104
- data/lib/google/cloud/compute/v1/firewalls.rb +3 -0
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +258 -146
- data/lib/google/cloud/compute/v1/forwarding_rules.rb +3 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +121 -66
- data/lib/google/cloud/compute/v1/global_addresses.rb +3 -0
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +221 -122
- data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +3 -0
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +219 -126
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +154 -86
- data/lib/google/cloud/compute/v1/global_operations.rb +3 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +84 -49
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +3 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +154 -85
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +3 -0
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +218 -127
- data/lib/google/cloud/compute/v1/health_checks.rb +3 -0
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +27 -7
- data/lib/google/cloud/compute/v1/image_family_views.rb +3 -0
- data/lib/google/cloud/compute/v1/images/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +354 -194
- data/lib/google/cloud/compute/v1/images.rb +3 -0
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +10 -10
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +664 -381
- data/lib/google/cloud/compute/v1/instance_group_managers.rb +3 -0
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +4 -4
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +292 -169
- data/lib/google/cloud/compute/v1/instance_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +221 -120
- data/lib/google/cloud/compute/v1/instance_templates.rb +3 -0
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1503 -845
- data/lib/google/cloud/compute/v1/instances.rb +3 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +190 -109
- data/lib/google/cloud/compute/v1/interconnect_attachments.rb +3 -0
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +57 -29
- data/lib/google/cloud/compute/v1/interconnect_locations.rb +3 -0
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +187 -102
- data/lib/google/cloud/compute/v1/interconnects.rb +3 -0
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +60 -25
- data/lib/google/cloud/compute/v1/license_codes.rb +3 -0
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +221 -120
- data/lib/google/cloud/compute/v1/licenses.rb +3 -0
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +221 -121
- data/lib/google/cloud/compute/v1/machine_images.rb +3 -0
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +90 -52
- data/lib/google/cloud/compute/v1/machine_types.rb +3 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +348 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services.rb +47 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +3 -3
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +293 -168
- data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +998 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +350 -202
- data/lib/google/cloud/compute/v1/networks.rb +3 -0
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +3 -3
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +428 -242
- data/lib/google/cloud/compute/v1/node_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +259 -143
- data/lib/google/cloud/compute/v1/node_templates.rb +3 -0
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +90 -52
- data/lib/google/cloud/compute/v1/node_types.rb +3 -0
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +225 -126
- data/lib/google/cloud/compute/v1/packet_mirrorings.rb +3 -0
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +406 -238
- data/lib/google/cloud/compute/v1/projects.rb +3 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +154 -85
- data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +3 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +190 -108
- data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +3 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +191 -106
- data/lib/google/cloud/compute/v1/region_autoscalers.rb +3 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +228 -122
- data/lib/google/cloud/compute/v1/region_backend_services.rb +3 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +157 -92
- data/lib/google/cloud/compute/v1/region_commitments.rb +3 -0
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +59 -29
- data/lib/google/cloud/compute/v1/region_disk_types.rb +3 -0
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +398 -216
- data/lib/google/cloud/compute/v1/region_disks.rb +3 -0
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +159 -85
- data/lib/google/cloud/compute/v1/region_health_check_services.rb +3 -0
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +193 -104
- data/lib/google/cloud/compute/v1/region_health_checks.rb +3 -0
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +9 -9
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +633 -358
- data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +3 -0
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +127 -71
- data/lib/google/cloud/compute/v1/region_instance_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +26 -9
- data/lib/google/cloud/compute/v1/region_instances.rb +3 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +125 -66
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +1073 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -66
- data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +3 -0
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +127 -63
- data/lib/google/cloud/compute/v1/region_operations.rb +3 -0
- data/lib/google/cloud/compute/v1/region_security_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +349 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_security_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +125 -66
- data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +3 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +159 -85
- data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +88 -1
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +249 -99
- data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +228 -122
- data/lib/google/cloud/compute/v1/region_url_maps.rb +3 -0
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +57 -29
- data/lib/google/cloud/compute/v1/regions.rb +3 -0
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +327 -183
- data/lib/google/cloud/compute/v1/reservations.rb +3 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +259 -143
- data/lib/google/cloud/compute/v1/resource_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +3 -3
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +326 -184
- data/lib/google/cloud/compute/v1/routers.rb +3 -0
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +121 -66
- data/lib/google/cloud/compute/v1/routes.rb +3 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +97 -5
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +368 -174
- data/lib/google/cloud/compute/v1/security_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +293 -162
- data/lib/google/cloud/compute/v1/service_attachments.rb +3 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +255 -138
- data/lib/google/cloud/compute/v1/snapshots.rb +3 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +152 -89
- data/lib/google/cloud/compute/v1/ssl_certificates.rb +3 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +185 -107
- data/lib/google/cloud/compute/v1/ssl_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +3 -3
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +392 -223
- data/lib/google/cloud/compute/v1/subnetworks.rb +3 -0
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +154 -85
- data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +218 -127
- data/lib/google/cloud/compute/v1/target_http_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +86 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +371 -178
- data/lib/google/cloud/compute/v1/target_https_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +156 -89
- data/lib/google/cloud/compute/v1/target_instances.rb +3 -0
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +361 -203
- data/lib/google/cloud/compute/v1/target_pools.rb +3 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +85 -1
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +307 -136
- data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +187 -104
- data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +156 -89
- data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +3 -0
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +285 -164
- data/lib/google/cloud/compute/v1/url_maps.rb +3 -0
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +259 -143
- data/lib/google/cloud/compute/v1/vpn_gateways.rb +3 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +156 -89
- data/lib/google/cloud/compute/v1/vpn_tunnels.rb +3 -0
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +127 -63
- data/lib/google/cloud/compute/v1/zone_operations.rb +3 -0
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +57 -29
- data/lib/google/cloud/compute/v1/zones.rb +3 -0
- data/lib/google/cloud/compute/v1.rb +4 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1946 -229
- metadata +32 -12
@@ -0,0 +1,1552 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/compute/v1/compute_pb"
|
21
|
+
require "google/cloud/compute/v1/network_firewall_policies/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module Compute
|
27
|
+
module V1
|
28
|
+
module NetworkFirewallPolicies
|
29
|
+
module Rest
|
30
|
+
##
|
31
|
+
# REST client for the NetworkFirewallPolicies service.
|
32
|
+
#
|
33
|
+
# The NetworkFirewallPolicies API.
|
34
|
+
#
|
35
|
+
class Client
|
36
|
+
# @private
|
37
|
+
attr_reader :network_firewall_policies_stub
|
38
|
+
|
39
|
+
##
|
40
|
+
# Configure the NetworkFirewallPolicies Client class.
|
41
|
+
#
|
42
|
+
# See {::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client::Configuration}
|
43
|
+
# for a description of the configuration fields.
|
44
|
+
#
|
45
|
+
# @example
|
46
|
+
#
|
47
|
+
# # Modify the configuration for all NetworkFirewallPolicies clients
|
48
|
+
# ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# @yield [config] Configure the Client client.
|
53
|
+
# @yieldparam config [Client::Configuration]
|
54
|
+
#
|
55
|
+
# @return [Client::Configuration]
|
56
|
+
#
|
57
|
+
def self.configure
|
58
|
+
@configure ||= begin
|
59
|
+
namespace = ["Google", "Cloud", "Compute", "V1"]
|
60
|
+
parent_config = while namespace.any?
|
61
|
+
parent_name = namespace.join "::"
|
62
|
+
parent_const = const_get parent_name
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
|
+
namespace.pop
|
65
|
+
end
|
66
|
+
default_config = Client::Configuration.new parent_config
|
67
|
+
|
68
|
+
default_config.rpcs.add_association.timeout = 600.0
|
69
|
+
|
70
|
+
default_config.rpcs.add_rule.timeout = 600.0
|
71
|
+
|
72
|
+
default_config.rpcs.clone_rules.timeout = 600.0
|
73
|
+
|
74
|
+
default_config.rpcs.delete.timeout = 600.0
|
75
|
+
|
76
|
+
default_config.rpcs.get.timeout = 600.0
|
77
|
+
default_config.rpcs.get.retry_policy = {
|
78
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
79
|
+
}
|
80
|
+
|
81
|
+
default_config.rpcs.get_association.timeout = 600.0
|
82
|
+
default_config.rpcs.get_association.retry_policy = {
|
83
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
84
|
+
}
|
85
|
+
|
86
|
+
default_config.rpcs.get_iam_policy.timeout = 600.0
|
87
|
+
default_config.rpcs.get_iam_policy.retry_policy = {
|
88
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
89
|
+
}
|
90
|
+
|
91
|
+
default_config.rpcs.get_rule.timeout = 600.0
|
92
|
+
default_config.rpcs.get_rule.retry_policy = {
|
93
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.insert.timeout = 600.0
|
97
|
+
|
98
|
+
default_config.rpcs.list.timeout = 600.0
|
99
|
+
default_config.rpcs.list.retry_policy = {
|
100
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
101
|
+
}
|
102
|
+
|
103
|
+
default_config.rpcs.patch.timeout = 600.0
|
104
|
+
|
105
|
+
default_config.rpcs.patch_rule.timeout = 600.0
|
106
|
+
|
107
|
+
default_config.rpcs.remove_association.timeout = 600.0
|
108
|
+
|
109
|
+
default_config.rpcs.remove_rule.timeout = 600.0
|
110
|
+
|
111
|
+
default_config.rpcs.set_iam_policy.timeout = 600.0
|
112
|
+
|
113
|
+
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
114
|
+
|
115
|
+
default_config
|
116
|
+
end
|
117
|
+
yield @configure if block_given?
|
118
|
+
@configure
|
119
|
+
end
|
120
|
+
|
121
|
+
##
|
122
|
+
# Configure the NetworkFirewallPolicies Client instance.
|
123
|
+
#
|
124
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
125
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
126
|
+
# should be made on {Client.configure}.
|
127
|
+
#
|
128
|
+
# See {::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client::Configuration}
|
129
|
+
# for a description of the configuration fields.
|
130
|
+
#
|
131
|
+
# @yield [config] Configure the Client client.
|
132
|
+
# @yieldparam config [Client::Configuration]
|
133
|
+
#
|
134
|
+
# @return [Client::Configuration]
|
135
|
+
#
|
136
|
+
def configure
|
137
|
+
yield @config if block_given?
|
138
|
+
@config
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Create a new NetworkFirewallPolicies REST client object.
|
143
|
+
#
|
144
|
+
# @example
|
145
|
+
#
|
146
|
+
# # Create a client using the default configuration
|
147
|
+
# client = ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client.new
|
148
|
+
#
|
149
|
+
# # Create a client using a custom configuration
|
150
|
+
# client = ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client.new do |config|
|
151
|
+
# config.timeout = 10.0
|
152
|
+
# end
|
153
|
+
#
|
154
|
+
# @yield [config] Configure the NetworkFirewallPolicies client.
|
155
|
+
# @yieldparam config [Client::Configuration]
|
156
|
+
#
|
157
|
+
def initialize
|
158
|
+
# Create the configuration object
|
159
|
+
@config = Configuration.new Client.configure
|
160
|
+
|
161
|
+
# Yield the configuration if needed
|
162
|
+
yield @config if block_given?
|
163
|
+
|
164
|
+
# Create credentials
|
165
|
+
credentials = @config.credentials
|
166
|
+
credentials ||= Credentials.default scope: @config.scope
|
167
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
168
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
169
|
+
end
|
170
|
+
|
171
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
172
|
+
config.credentials = credentials
|
173
|
+
config.endpoint = @config.endpoint
|
174
|
+
end
|
175
|
+
|
176
|
+
@network_firewall_policies_stub = ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
181
|
+
#
|
182
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
183
|
+
#
|
184
|
+
attr_reader :global_operations
|
185
|
+
|
186
|
+
# Service calls
|
187
|
+
|
188
|
+
##
|
189
|
+
# Inserts an association for the specified firewall policy.
|
190
|
+
#
|
191
|
+
# @overload add_association(request, options = nil)
|
192
|
+
# Pass arguments to `add_association` via a request object, either of type
|
193
|
+
# {::Google::Cloud::Compute::V1::AddAssociationNetworkFirewallPolicyRequest} or an equivalent Hash.
|
194
|
+
#
|
195
|
+
# @param request [::Google::Cloud::Compute::V1::AddAssociationNetworkFirewallPolicyRequest, ::Hash]
|
196
|
+
# A request object representing the call parameters. Required. To specify no
|
197
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
198
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
199
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
200
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
201
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
202
|
+
#
|
203
|
+
# @overload add_association(firewall_policy: nil, firewall_policy_association_resource: nil, project: nil, replace_existing_association: nil, request_id: nil)
|
204
|
+
# Pass arguments to `add_association` via keyword arguments. Note that at
|
205
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
206
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
207
|
+
#
|
208
|
+
# @param firewall_policy [::String]
|
209
|
+
# Name of the firewall policy to update.
|
210
|
+
# @param firewall_policy_association_resource [::Google::Cloud::Compute::V1::FirewallPolicyAssociation, ::Hash]
|
211
|
+
# The body resource for this request
|
212
|
+
# @param project [::String]
|
213
|
+
# Project ID for this request.
|
214
|
+
# @param replace_existing_association [::Boolean]
|
215
|
+
# Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists.
|
216
|
+
# @param request_id [::String]
|
217
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
218
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
219
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
220
|
+
# @yieldparam response [::Faraday::Response]
|
221
|
+
#
|
222
|
+
# @return [::Gapic::GenericLRO::Operation]
|
223
|
+
#
|
224
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
225
|
+
def add_association request, options = nil
|
226
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
227
|
+
|
228
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AddAssociationNetworkFirewallPolicyRequest
|
229
|
+
|
230
|
+
# Converts hash and nil to an options object
|
231
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
232
|
+
|
233
|
+
# Customize the options with defaults
|
234
|
+
call_metadata = @config.rpcs.add_association.metadata.to_h
|
235
|
+
|
236
|
+
# Set x-goog-api-client header
|
237
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
238
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
239
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
240
|
+
transports_version_send: [:rest]
|
241
|
+
|
242
|
+
options.apply_defaults timeout: @config.rpcs.add_association.timeout,
|
243
|
+
metadata: call_metadata
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata
|
247
|
+
|
248
|
+
@network_firewall_policies_stub.add_association request, options do |result, response|
|
249
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
250
|
+
operation: result,
|
251
|
+
client: global_operations,
|
252
|
+
request_values: {
|
253
|
+
"project" => request.project
|
254
|
+
},
|
255
|
+
options: options
|
256
|
+
)
|
257
|
+
yield result, response if block_given?
|
258
|
+
return result
|
259
|
+
end
|
260
|
+
rescue ::Faraday::Error => e
|
261
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
262
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
263
|
+
end
|
264
|
+
|
265
|
+
##
|
266
|
+
# Inserts a rule into a firewall policy.
|
267
|
+
#
|
268
|
+
# @overload add_rule(request, options = nil)
|
269
|
+
# Pass arguments to `add_rule` via a request object, either of type
|
270
|
+
# {::Google::Cloud::Compute::V1::AddRuleNetworkFirewallPolicyRequest} or an equivalent Hash.
|
271
|
+
#
|
272
|
+
# @param request [::Google::Cloud::Compute::V1::AddRuleNetworkFirewallPolicyRequest, ::Hash]
|
273
|
+
# A request object representing the call parameters. Required. To specify no
|
274
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
275
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
276
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
277
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
278
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
279
|
+
#
|
280
|
+
# @overload add_rule(firewall_policy: nil, firewall_policy_rule_resource: nil, max_priority: nil, min_priority: nil, project: nil, request_id: nil)
|
281
|
+
# Pass arguments to `add_rule` via keyword arguments. Note that at
|
282
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
283
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
284
|
+
#
|
285
|
+
# @param firewall_policy [::String]
|
286
|
+
# Name of the firewall policy to update.
|
287
|
+
# @param firewall_policy_rule_resource [::Google::Cloud::Compute::V1::FirewallPolicyRule, ::Hash]
|
288
|
+
# The body resource for this request
|
289
|
+
# @param max_priority [::Integer]
|
290
|
+
# When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority.
|
291
|
+
# @param min_priority [::Integer]
|
292
|
+
# When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority.
|
293
|
+
# @param project [::String]
|
294
|
+
# Project ID for this request.
|
295
|
+
# @param request_id [::String]
|
296
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
297
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
298
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
299
|
+
# @yieldparam response [::Faraday::Response]
|
300
|
+
#
|
301
|
+
# @return [::Gapic::GenericLRO::Operation]
|
302
|
+
#
|
303
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
304
|
+
def add_rule request, options = nil
|
305
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
306
|
+
|
307
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AddRuleNetworkFirewallPolicyRequest
|
308
|
+
|
309
|
+
# Converts hash and nil to an options object
|
310
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
311
|
+
|
312
|
+
# Customize the options with defaults
|
313
|
+
call_metadata = @config.rpcs.add_rule.metadata.to_h
|
314
|
+
|
315
|
+
# Set x-goog-api-client header
|
316
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
317
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
318
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
319
|
+
transports_version_send: [:rest]
|
320
|
+
|
321
|
+
options.apply_defaults timeout: @config.rpcs.add_rule.timeout,
|
322
|
+
metadata: call_metadata
|
323
|
+
|
324
|
+
options.apply_defaults timeout: @config.timeout,
|
325
|
+
metadata: @config.metadata
|
326
|
+
|
327
|
+
@network_firewall_policies_stub.add_rule request, options do |result, response|
|
328
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
329
|
+
operation: result,
|
330
|
+
client: global_operations,
|
331
|
+
request_values: {
|
332
|
+
"project" => request.project
|
333
|
+
},
|
334
|
+
options: options
|
335
|
+
)
|
336
|
+
yield result, response if block_given?
|
337
|
+
return result
|
338
|
+
end
|
339
|
+
rescue ::Faraday::Error => e
|
340
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
341
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
342
|
+
end
|
343
|
+
|
344
|
+
##
|
345
|
+
# Copies rules to the specified firewall policy.
|
346
|
+
#
|
347
|
+
# @overload clone_rules(request, options = nil)
|
348
|
+
# Pass arguments to `clone_rules` via a request object, either of type
|
349
|
+
# {::Google::Cloud::Compute::V1::CloneRulesNetworkFirewallPolicyRequest} or an equivalent Hash.
|
350
|
+
#
|
351
|
+
# @param request [::Google::Cloud::Compute::V1::CloneRulesNetworkFirewallPolicyRequest, ::Hash]
|
352
|
+
# A request object representing the call parameters. Required. To specify no
|
353
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
354
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
355
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
356
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
357
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
358
|
+
#
|
359
|
+
# @overload clone_rules(firewall_policy: nil, project: nil, request_id: nil, source_firewall_policy: nil)
|
360
|
+
# Pass arguments to `clone_rules` via keyword arguments. Note that at
|
361
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
362
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
363
|
+
#
|
364
|
+
# @param firewall_policy [::String]
|
365
|
+
# Name of the firewall policy to update.
|
366
|
+
# @param project [::String]
|
367
|
+
# Project ID for this request.
|
368
|
+
# @param request_id [::String]
|
369
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
370
|
+
# @param source_firewall_policy [::String]
|
371
|
+
# The firewall policy from which to copy rules.
|
372
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
373
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
374
|
+
# @yieldparam response [::Faraday::Response]
|
375
|
+
#
|
376
|
+
# @return [::Gapic::GenericLRO::Operation]
|
377
|
+
#
|
378
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
379
|
+
def clone_rules request, options = nil
|
380
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
381
|
+
|
382
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::CloneRulesNetworkFirewallPolicyRequest
|
383
|
+
|
384
|
+
# Converts hash and nil to an options object
|
385
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
386
|
+
|
387
|
+
# Customize the options with defaults
|
388
|
+
call_metadata = @config.rpcs.clone_rules.metadata.to_h
|
389
|
+
|
390
|
+
# Set x-goog-api-client header
|
391
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
392
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
393
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
394
|
+
transports_version_send: [:rest]
|
395
|
+
|
396
|
+
options.apply_defaults timeout: @config.rpcs.clone_rules.timeout,
|
397
|
+
metadata: call_metadata
|
398
|
+
|
399
|
+
options.apply_defaults timeout: @config.timeout,
|
400
|
+
metadata: @config.metadata
|
401
|
+
|
402
|
+
@network_firewall_policies_stub.clone_rules request, options do |result, response|
|
403
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
404
|
+
operation: result,
|
405
|
+
client: global_operations,
|
406
|
+
request_values: {
|
407
|
+
"project" => request.project
|
408
|
+
},
|
409
|
+
options: options
|
410
|
+
)
|
411
|
+
yield result, response if block_given?
|
412
|
+
return result
|
413
|
+
end
|
414
|
+
rescue ::Faraday::Error => e
|
415
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
416
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
417
|
+
end
|
418
|
+
|
419
|
+
##
|
420
|
+
# Deletes the specified policy.
|
421
|
+
#
|
422
|
+
# @overload delete(request, options = nil)
|
423
|
+
# Pass arguments to `delete` via a request object, either of type
|
424
|
+
# {::Google::Cloud::Compute::V1::DeleteNetworkFirewallPolicyRequest} or an equivalent Hash.
|
425
|
+
#
|
426
|
+
# @param request [::Google::Cloud::Compute::V1::DeleteNetworkFirewallPolicyRequest, ::Hash]
|
427
|
+
# A request object representing the call parameters. Required. To specify no
|
428
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
429
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
430
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
431
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
432
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
433
|
+
#
|
434
|
+
# @overload delete(firewall_policy: nil, project: nil, request_id: nil)
|
435
|
+
# Pass arguments to `delete` via keyword arguments. Note that at
|
436
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
437
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
438
|
+
#
|
439
|
+
# @param firewall_policy [::String]
|
440
|
+
# Name of the firewall policy to delete.
|
441
|
+
# @param project [::String]
|
442
|
+
# Project ID for this request.
|
443
|
+
# @param request_id [::String]
|
444
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
445
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
446
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
447
|
+
# @yieldparam response [::Faraday::Response]
|
448
|
+
#
|
449
|
+
# @return [::Gapic::GenericLRO::Operation]
|
450
|
+
#
|
451
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
452
|
+
def delete request, options = nil
|
453
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
454
|
+
|
455
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteNetworkFirewallPolicyRequest
|
456
|
+
|
457
|
+
# Converts hash and nil to an options object
|
458
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
459
|
+
|
460
|
+
# Customize the options with defaults
|
461
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
462
|
+
|
463
|
+
# Set x-goog-api-client header
|
464
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
465
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
466
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
467
|
+
transports_version_send: [:rest]
|
468
|
+
|
469
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
470
|
+
metadata: call_metadata
|
471
|
+
|
472
|
+
options.apply_defaults timeout: @config.timeout,
|
473
|
+
metadata: @config.metadata
|
474
|
+
|
475
|
+
@network_firewall_policies_stub.delete request, options do |result, response|
|
476
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
477
|
+
operation: result,
|
478
|
+
client: global_operations,
|
479
|
+
request_values: {
|
480
|
+
"project" => request.project
|
481
|
+
},
|
482
|
+
options: options
|
483
|
+
)
|
484
|
+
yield result, response if block_given?
|
485
|
+
return result
|
486
|
+
end
|
487
|
+
rescue ::Faraday::Error => e
|
488
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
489
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
490
|
+
end
|
491
|
+
|
492
|
+
##
|
493
|
+
# Returns the specified network firewall policy.
|
494
|
+
#
|
495
|
+
# @overload get(request, options = nil)
|
496
|
+
# Pass arguments to `get` via a request object, either of type
|
497
|
+
# {::Google::Cloud::Compute::V1::GetNetworkFirewallPolicyRequest} or an equivalent Hash.
|
498
|
+
#
|
499
|
+
# @param request [::Google::Cloud::Compute::V1::GetNetworkFirewallPolicyRequest, ::Hash]
|
500
|
+
# A request object representing the call parameters. Required. To specify no
|
501
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
502
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
503
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
504
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
505
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
506
|
+
#
|
507
|
+
# @overload get(firewall_policy: nil, project: nil)
|
508
|
+
# Pass arguments to `get` via keyword arguments. Note that at
|
509
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
510
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
511
|
+
#
|
512
|
+
# @param firewall_policy [::String]
|
513
|
+
# Name of the firewall policy to get.
|
514
|
+
# @param project [::String]
|
515
|
+
# Project ID for this request.
|
516
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
517
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::FirewallPolicy]
|
518
|
+
# @yieldparam response [::Faraday::Response]
|
519
|
+
#
|
520
|
+
# @return [::Google::Cloud::Compute::V1::FirewallPolicy]
|
521
|
+
#
|
522
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
523
|
+
def get request, options = nil
|
524
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
525
|
+
|
526
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetNetworkFirewallPolicyRequest
|
527
|
+
|
528
|
+
# Converts hash and nil to an options object
|
529
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
530
|
+
|
531
|
+
# Customize the options with defaults
|
532
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
533
|
+
|
534
|
+
# Set x-goog-api-client header
|
535
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
536
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
537
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
538
|
+
transports_version_send: [:rest]
|
539
|
+
|
540
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
541
|
+
metadata: call_metadata
|
542
|
+
|
543
|
+
options.apply_defaults timeout: @config.timeout,
|
544
|
+
metadata: @config.metadata
|
545
|
+
|
546
|
+
@network_firewall_policies_stub.get request, options do |result, response|
|
547
|
+
yield result, response if block_given?
|
548
|
+
return result
|
549
|
+
end
|
550
|
+
rescue ::Faraday::Error => e
|
551
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
552
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
553
|
+
end
|
554
|
+
|
555
|
+
##
|
556
|
+
# Gets an association with the specified name.
|
557
|
+
#
|
558
|
+
# @overload get_association(request, options = nil)
|
559
|
+
# Pass arguments to `get_association` via a request object, either of type
|
560
|
+
# {::Google::Cloud::Compute::V1::GetAssociationNetworkFirewallPolicyRequest} or an equivalent Hash.
|
561
|
+
#
|
562
|
+
# @param request [::Google::Cloud::Compute::V1::GetAssociationNetworkFirewallPolicyRequest, ::Hash]
|
563
|
+
# A request object representing the call parameters. Required. To specify no
|
564
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
565
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
566
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
567
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
568
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
569
|
+
#
|
570
|
+
# @overload get_association(firewall_policy: nil, name: nil, project: nil)
|
571
|
+
# Pass arguments to `get_association` via keyword arguments. Note that at
|
572
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
573
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
574
|
+
#
|
575
|
+
# @param firewall_policy [::String]
|
576
|
+
# Name of the firewall policy to which the queried association belongs.
|
577
|
+
# @param name [::String]
|
578
|
+
# The name of the association to get from the firewall policy.
|
579
|
+
# @param project [::String]
|
580
|
+
# Project ID for this request.
|
581
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
582
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::FirewallPolicyAssociation]
|
583
|
+
# @yieldparam response [::Faraday::Response]
|
584
|
+
#
|
585
|
+
# @return [::Google::Cloud::Compute::V1::FirewallPolicyAssociation]
|
586
|
+
#
|
587
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
588
|
+
def get_association request, options = nil
|
589
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
590
|
+
|
591
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetAssociationNetworkFirewallPolicyRequest
|
592
|
+
|
593
|
+
# Converts hash and nil to an options object
|
594
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
595
|
+
|
596
|
+
# Customize the options with defaults
|
597
|
+
call_metadata = @config.rpcs.get_association.metadata.to_h
|
598
|
+
|
599
|
+
# Set x-goog-api-client header
|
600
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
601
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
602
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
603
|
+
transports_version_send: [:rest]
|
604
|
+
|
605
|
+
options.apply_defaults timeout: @config.rpcs.get_association.timeout,
|
606
|
+
metadata: call_metadata
|
607
|
+
|
608
|
+
options.apply_defaults timeout: @config.timeout,
|
609
|
+
metadata: @config.metadata
|
610
|
+
|
611
|
+
@network_firewall_policies_stub.get_association request, options do |result, response|
|
612
|
+
yield result, response if block_given?
|
613
|
+
return result
|
614
|
+
end
|
615
|
+
rescue ::Faraday::Error => e
|
616
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
617
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
618
|
+
end
|
619
|
+
|
620
|
+
##
|
621
|
+
# Gets the access control policy for a resource. May be empty if no such policy or resource exists.
|
622
|
+
#
|
623
|
+
# @overload get_iam_policy(request, options = nil)
|
624
|
+
# Pass arguments to `get_iam_policy` via a request object, either of type
|
625
|
+
# {::Google::Cloud::Compute::V1::GetIamPolicyNetworkFirewallPolicyRequest} or an equivalent Hash.
|
626
|
+
#
|
627
|
+
# @param request [::Google::Cloud::Compute::V1::GetIamPolicyNetworkFirewallPolicyRequest, ::Hash]
|
628
|
+
# A request object representing the call parameters. Required. To specify no
|
629
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
630
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
631
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
632
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
633
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
634
|
+
#
|
635
|
+
# @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil)
|
636
|
+
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
637
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
638
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
639
|
+
#
|
640
|
+
# @param options_requested_policy_version [::Integer]
|
641
|
+
# Requested IAM Policy version.
|
642
|
+
# @param project [::String]
|
643
|
+
# Project ID for this request.
|
644
|
+
# @param resource [::String]
|
645
|
+
# Name or id of the resource for this request.
|
646
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
647
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
648
|
+
# @yieldparam response [::Faraday::Response]
|
649
|
+
#
|
650
|
+
# @return [::Google::Cloud::Compute::V1::Policy]
|
651
|
+
#
|
652
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
653
|
+
def get_iam_policy request, options = nil
|
654
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
655
|
+
|
656
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyNetworkFirewallPolicyRequest
|
657
|
+
|
658
|
+
# Converts hash and nil to an options object
|
659
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
660
|
+
|
661
|
+
# Customize the options with defaults
|
662
|
+
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
663
|
+
|
664
|
+
# Set x-goog-api-client header
|
665
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
666
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
667
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
668
|
+
transports_version_send: [:rest]
|
669
|
+
|
670
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
671
|
+
metadata: call_metadata
|
672
|
+
|
673
|
+
options.apply_defaults timeout: @config.timeout,
|
674
|
+
metadata: @config.metadata
|
675
|
+
|
676
|
+
@network_firewall_policies_stub.get_iam_policy request, options do |result, response|
|
677
|
+
yield result, response if block_given?
|
678
|
+
return result
|
679
|
+
end
|
680
|
+
rescue ::Faraday::Error => e
|
681
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
682
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
683
|
+
end
|
684
|
+
|
685
|
+
##
|
686
|
+
# Gets a rule of the specified priority.
|
687
|
+
#
|
688
|
+
# @overload get_rule(request, options = nil)
|
689
|
+
# Pass arguments to `get_rule` via a request object, either of type
|
690
|
+
# {::Google::Cloud::Compute::V1::GetRuleNetworkFirewallPolicyRequest} or an equivalent Hash.
|
691
|
+
#
|
692
|
+
# @param request [::Google::Cloud::Compute::V1::GetRuleNetworkFirewallPolicyRequest, ::Hash]
|
693
|
+
# A request object representing the call parameters. Required. To specify no
|
694
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
695
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
696
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
697
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
698
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
699
|
+
#
|
700
|
+
# @overload get_rule(firewall_policy: nil, priority: nil, project: nil)
|
701
|
+
# Pass arguments to `get_rule` via keyword arguments. Note that at
|
702
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
703
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
704
|
+
#
|
705
|
+
# @param firewall_policy [::String]
|
706
|
+
# Name of the firewall policy to which the queried rule belongs.
|
707
|
+
# @param priority [::Integer]
|
708
|
+
# The priority of the rule to get from the firewall policy.
|
709
|
+
# @param project [::String]
|
710
|
+
# Project ID for this request.
|
711
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
712
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::FirewallPolicyRule]
|
713
|
+
# @yieldparam response [::Faraday::Response]
|
714
|
+
#
|
715
|
+
# @return [::Google::Cloud::Compute::V1::FirewallPolicyRule]
|
716
|
+
#
|
717
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
718
|
+
def get_rule request, options = nil
|
719
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
720
|
+
|
721
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetRuleNetworkFirewallPolicyRequest
|
722
|
+
|
723
|
+
# Converts hash and nil to an options object
|
724
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
725
|
+
|
726
|
+
# Customize the options with defaults
|
727
|
+
call_metadata = @config.rpcs.get_rule.metadata.to_h
|
728
|
+
|
729
|
+
# Set x-goog-api-client header
|
730
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
731
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
732
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
733
|
+
transports_version_send: [:rest]
|
734
|
+
|
735
|
+
options.apply_defaults timeout: @config.rpcs.get_rule.timeout,
|
736
|
+
metadata: call_metadata
|
737
|
+
|
738
|
+
options.apply_defaults timeout: @config.timeout,
|
739
|
+
metadata: @config.metadata
|
740
|
+
|
741
|
+
@network_firewall_policies_stub.get_rule request, options do |result, response|
|
742
|
+
yield result, response if block_given?
|
743
|
+
return result
|
744
|
+
end
|
745
|
+
rescue ::Faraday::Error => e
|
746
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
747
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
748
|
+
end
|
749
|
+
|
750
|
+
##
|
751
|
+
# Creates a new policy in the specified project using the data included in the request.
|
752
|
+
#
|
753
|
+
# @overload insert(request, options = nil)
|
754
|
+
# Pass arguments to `insert` via a request object, either of type
|
755
|
+
# {::Google::Cloud::Compute::V1::InsertNetworkFirewallPolicyRequest} or an equivalent Hash.
|
756
|
+
#
|
757
|
+
# @param request [::Google::Cloud::Compute::V1::InsertNetworkFirewallPolicyRequest, ::Hash]
|
758
|
+
# A request object representing the call parameters. Required. To specify no
|
759
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
760
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
761
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
762
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
763
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
764
|
+
#
|
765
|
+
# @overload insert(firewall_policy_resource: nil, project: nil, request_id: nil)
|
766
|
+
# Pass arguments to `insert` via keyword arguments. Note that at
|
767
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
768
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
769
|
+
#
|
770
|
+
# @param firewall_policy_resource [::Google::Cloud::Compute::V1::FirewallPolicy, ::Hash]
|
771
|
+
# The body resource for this request
|
772
|
+
# @param project [::String]
|
773
|
+
# Project ID for this request.
|
774
|
+
# @param request_id [::String]
|
775
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
776
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
777
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
778
|
+
# @yieldparam response [::Faraday::Response]
|
779
|
+
#
|
780
|
+
# @return [::Gapic::GenericLRO::Operation]
|
781
|
+
#
|
782
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
783
|
+
def insert request, options = nil
|
784
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
785
|
+
|
786
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertNetworkFirewallPolicyRequest
|
787
|
+
|
788
|
+
# Converts hash and nil to an options object
|
789
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
790
|
+
|
791
|
+
# Customize the options with defaults
|
792
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
793
|
+
|
794
|
+
# Set x-goog-api-client header
|
795
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
796
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
797
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
798
|
+
transports_version_send: [:rest]
|
799
|
+
|
800
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
801
|
+
metadata: call_metadata
|
802
|
+
|
803
|
+
options.apply_defaults timeout: @config.timeout,
|
804
|
+
metadata: @config.metadata
|
805
|
+
|
806
|
+
@network_firewall_policies_stub.insert request, options do |result, response|
|
807
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
808
|
+
operation: result,
|
809
|
+
client: global_operations,
|
810
|
+
request_values: {
|
811
|
+
"project" => request.project
|
812
|
+
},
|
813
|
+
options: options
|
814
|
+
)
|
815
|
+
yield result, response if block_given?
|
816
|
+
return result
|
817
|
+
end
|
818
|
+
rescue ::Faraday::Error => e
|
819
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
820
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
821
|
+
end
|
822
|
+
|
823
|
+
##
|
824
|
+
# Lists all the policies that have been configured for the specified project.
|
825
|
+
#
|
826
|
+
# @overload list(request, options = nil)
|
827
|
+
# Pass arguments to `list` via a request object, either of type
|
828
|
+
# {::Google::Cloud::Compute::V1::ListNetworkFirewallPoliciesRequest} or an equivalent Hash.
|
829
|
+
#
|
830
|
+
# @param request [::Google::Cloud::Compute::V1::ListNetworkFirewallPoliciesRequest, ::Hash]
|
831
|
+
# A request object representing the call parameters. Required. To specify no
|
832
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
833
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
834
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
835
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
836
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
837
|
+
#
|
838
|
+
# @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
839
|
+
# Pass arguments to `list` via keyword arguments. Note that at
|
840
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
841
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
842
|
+
#
|
843
|
+
# @param filter [::String]
|
844
|
+
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
|
845
|
+
# @param max_results [::Integer]
|
846
|
+
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
847
|
+
# @param order_by [::String]
|
848
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
849
|
+
# @param page_token [::String]
|
850
|
+
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
851
|
+
# @param project [::String]
|
852
|
+
# Project ID for this request.
|
853
|
+
# @param return_partial_success [::Boolean]
|
854
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
855
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
856
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::FirewallPolicy>]
|
857
|
+
# @yieldparam response [::Faraday::Response]
|
858
|
+
#
|
859
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::FirewallPolicy>]
|
860
|
+
#
|
861
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
862
|
+
def list request, options = nil
|
863
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
864
|
+
|
865
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListNetworkFirewallPoliciesRequest
|
866
|
+
|
867
|
+
# Converts hash and nil to an options object
|
868
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
869
|
+
|
870
|
+
# Customize the options with defaults
|
871
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
872
|
+
|
873
|
+
# Set x-goog-api-client header
|
874
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
875
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
876
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
877
|
+
transports_version_send: [:rest]
|
878
|
+
|
879
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
880
|
+
metadata: call_metadata
|
881
|
+
|
882
|
+
options.apply_defaults timeout: @config.timeout,
|
883
|
+
metadata: @config.metadata
|
884
|
+
|
885
|
+
@network_firewall_policies_stub.list request, options do |result, response|
|
886
|
+
result = ::Gapic::Rest::PagedEnumerable.new @network_firewall_policies_stub, :list, "items", request, result, options
|
887
|
+
yield result, response if block_given?
|
888
|
+
return result
|
889
|
+
end
|
890
|
+
rescue ::Faraday::Error => e
|
891
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
892
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
893
|
+
end
|
894
|
+
|
895
|
+
##
|
896
|
+
# Patches the specified policy with the data included in the request.
|
897
|
+
#
|
898
|
+
# @overload patch(request, options = nil)
|
899
|
+
# Pass arguments to `patch` via a request object, either of type
|
900
|
+
# {::Google::Cloud::Compute::V1::PatchNetworkFirewallPolicyRequest} or an equivalent Hash.
|
901
|
+
#
|
902
|
+
# @param request [::Google::Cloud::Compute::V1::PatchNetworkFirewallPolicyRequest, ::Hash]
|
903
|
+
# A request object representing the call parameters. Required. To specify no
|
904
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
905
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
906
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
907
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
908
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
909
|
+
#
|
910
|
+
# @overload patch(firewall_policy: nil, firewall_policy_resource: nil, project: nil, request_id: nil)
|
911
|
+
# Pass arguments to `patch` via keyword arguments. Note that at
|
912
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
913
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
914
|
+
#
|
915
|
+
# @param firewall_policy [::String]
|
916
|
+
# Name of the firewall policy to update.
|
917
|
+
# @param firewall_policy_resource [::Google::Cloud::Compute::V1::FirewallPolicy, ::Hash]
|
918
|
+
# The body resource for this request
|
919
|
+
# @param project [::String]
|
920
|
+
# Project ID for this request.
|
921
|
+
# @param request_id [::String]
|
922
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
923
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
924
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
925
|
+
# @yieldparam response [::Faraday::Response]
|
926
|
+
#
|
927
|
+
# @return [::Gapic::GenericLRO::Operation]
|
928
|
+
#
|
929
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
930
|
+
def patch request, options = nil
|
931
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
932
|
+
|
933
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchNetworkFirewallPolicyRequest
|
934
|
+
|
935
|
+
# Converts hash and nil to an options object
|
936
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
937
|
+
|
938
|
+
# Customize the options with defaults
|
939
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
940
|
+
|
941
|
+
# Set x-goog-api-client header
|
942
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
943
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
944
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
945
|
+
transports_version_send: [:rest]
|
946
|
+
|
947
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
948
|
+
metadata: call_metadata
|
949
|
+
|
950
|
+
options.apply_defaults timeout: @config.timeout,
|
951
|
+
metadata: @config.metadata
|
952
|
+
|
953
|
+
@network_firewall_policies_stub.patch request, options do |result, response|
|
954
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
955
|
+
operation: result,
|
956
|
+
client: global_operations,
|
957
|
+
request_values: {
|
958
|
+
"project" => request.project
|
959
|
+
},
|
960
|
+
options: options
|
961
|
+
)
|
962
|
+
yield result, response if block_given?
|
963
|
+
return result
|
964
|
+
end
|
965
|
+
rescue ::Faraday::Error => e
|
966
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
967
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
968
|
+
end
|
969
|
+
|
970
|
+
##
|
971
|
+
# Patches a rule of the specified priority.
|
972
|
+
#
|
973
|
+
# @overload patch_rule(request, options = nil)
|
974
|
+
# Pass arguments to `patch_rule` via a request object, either of type
|
975
|
+
# {::Google::Cloud::Compute::V1::PatchRuleNetworkFirewallPolicyRequest} or an equivalent Hash.
|
976
|
+
#
|
977
|
+
# @param request [::Google::Cloud::Compute::V1::PatchRuleNetworkFirewallPolicyRequest, ::Hash]
|
978
|
+
# A request object representing the call parameters. Required. To specify no
|
979
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
980
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
981
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
982
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
983
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
984
|
+
#
|
985
|
+
# @overload patch_rule(firewall_policy: nil, firewall_policy_rule_resource: nil, priority: nil, project: nil, request_id: nil)
|
986
|
+
# Pass arguments to `patch_rule` via keyword arguments. Note that at
|
987
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
988
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
989
|
+
#
|
990
|
+
# @param firewall_policy [::String]
|
991
|
+
# Name of the firewall policy to update.
|
992
|
+
# @param firewall_policy_rule_resource [::Google::Cloud::Compute::V1::FirewallPolicyRule, ::Hash]
|
993
|
+
# The body resource for this request
|
994
|
+
# @param priority [::Integer]
|
995
|
+
# The priority of the rule to patch.
|
996
|
+
# @param project [::String]
|
997
|
+
# Project ID for this request.
|
998
|
+
# @param request_id [::String]
|
999
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1000
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1001
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1002
|
+
# @yieldparam response [::Faraday::Response]
|
1003
|
+
#
|
1004
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1005
|
+
#
|
1006
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1007
|
+
def patch_rule request, options = nil
|
1008
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1009
|
+
|
1010
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchRuleNetworkFirewallPolicyRequest
|
1011
|
+
|
1012
|
+
# Converts hash and nil to an options object
|
1013
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1014
|
+
|
1015
|
+
# Customize the options with defaults
|
1016
|
+
call_metadata = @config.rpcs.patch_rule.metadata.to_h
|
1017
|
+
|
1018
|
+
# Set x-goog-api-client header
|
1019
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1020
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1021
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1022
|
+
transports_version_send: [:rest]
|
1023
|
+
|
1024
|
+
options.apply_defaults timeout: @config.rpcs.patch_rule.timeout,
|
1025
|
+
metadata: call_metadata
|
1026
|
+
|
1027
|
+
options.apply_defaults timeout: @config.timeout,
|
1028
|
+
metadata: @config.metadata
|
1029
|
+
|
1030
|
+
@network_firewall_policies_stub.patch_rule request, options do |result, response|
|
1031
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
1032
|
+
operation: result,
|
1033
|
+
client: global_operations,
|
1034
|
+
request_values: {
|
1035
|
+
"project" => request.project
|
1036
|
+
},
|
1037
|
+
options: options
|
1038
|
+
)
|
1039
|
+
yield result, response if block_given?
|
1040
|
+
return result
|
1041
|
+
end
|
1042
|
+
rescue ::Faraday::Error => e
|
1043
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1044
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
1045
|
+
end
|
1046
|
+
|
1047
|
+
##
|
1048
|
+
# Removes an association for the specified firewall policy.
|
1049
|
+
#
|
1050
|
+
# @overload remove_association(request, options = nil)
|
1051
|
+
# Pass arguments to `remove_association` via a request object, either of type
|
1052
|
+
# {::Google::Cloud::Compute::V1::RemoveAssociationNetworkFirewallPolicyRequest} or an equivalent Hash.
|
1053
|
+
#
|
1054
|
+
# @param request [::Google::Cloud::Compute::V1::RemoveAssociationNetworkFirewallPolicyRequest, ::Hash]
|
1055
|
+
# A request object representing the call parameters. Required. To specify no
|
1056
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1057
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1058
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1059
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
1060
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
1061
|
+
#
|
1062
|
+
# @overload remove_association(firewall_policy: nil, name: nil, project: nil, request_id: nil)
|
1063
|
+
# Pass arguments to `remove_association` via keyword arguments. Note that at
|
1064
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1065
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1066
|
+
#
|
1067
|
+
# @param firewall_policy [::String]
|
1068
|
+
# Name of the firewall policy to update.
|
1069
|
+
# @param name [::String]
|
1070
|
+
# Name for the attachment that will be removed.
|
1071
|
+
# @param project [::String]
|
1072
|
+
# Project ID for this request.
|
1073
|
+
# @param request_id [::String]
|
1074
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1075
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1076
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1077
|
+
# @yieldparam response [::Faraday::Response]
|
1078
|
+
#
|
1079
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1080
|
+
#
|
1081
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1082
|
+
def remove_association request, options = nil
|
1083
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1084
|
+
|
1085
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RemoveAssociationNetworkFirewallPolicyRequest
|
1086
|
+
|
1087
|
+
# Converts hash and nil to an options object
|
1088
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1089
|
+
|
1090
|
+
# Customize the options with defaults
|
1091
|
+
call_metadata = @config.rpcs.remove_association.metadata.to_h
|
1092
|
+
|
1093
|
+
# Set x-goog-api-client header
|
1094
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1095
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1096
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1097
|
+
transports_version_send: [:rest]
|
1098
|
+
|
1099
|
+
options.apply_defaults timeout: @config.rpcs.remove_association.timeout,
|
1100
|
+
metadata: call_metadata
|
1101
|
+
|
1102
|
+
options.apply_defaults timeout: @config.timeout,
|
1103
|
+
metadata: @config.metadata
|
1104
|
+
|
1105
|
+
@network_firewall_policies_stub.remove_association request, options do |result, response|
|
1106
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
1107
|
+
operation: result,
|
1108
|
+
client: global_operations,
|
1109
|
+
request_values: {
|
1110
|
+
"project" => request.project
|
1111
|
+
},
|
1112
|
+
options: options
|
1113
|
+
)
|
1114
|
+
yield result, response if block_given?
|
1115
|
+
return result
|
1116
|
+
end
|
1117
|
+
rescue ::Faraday::Error => e
|
1118
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1119
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
1120
|
+
end
|
1121
|
+
|
1122
|
+
##
|
1123
|
+
# Deletes a rule of the specified priority.
|
1124
|
+
#
|
1125
|
+
# @overload remove_rule(request, options = nil)
|
1126
|
+
# Pass arguments to `remove_rule` via a request object, either of type
|
1127
|
+
# {::Google::Cloud::Compute::V1::RemoveRuleNetworkFirewallPolicyRequest} or an equivalent Hash.
|
1128
|
+
#
|
1129
|
+
# @param request [::Google::Cloud::Compute::V1::RemoveRuleNetworkFirewallPolicyRequest, ::Hash]
|
1130
|
+
# A request object representing the call parameters. Required. To specify no
|
1131
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1132
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1133
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1134
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
1135
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
1136
|
+
#
|
1137
|
+
# @overload remove_rule(firewall_policy: nil, priority: nil, project: nil, request_id: nil)
|
1138
|
+
# Pass arguments to `remove_rule` via keyword arguments. Note that at
|
1139
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1140
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1141
|
+
#
|
1142
|
+
# @param firewall_policy [::String]
|
1143
|
+
# Name of the firewall policy to update.
|
1144
|
+
# @param priority [::Integer]
|
1145
|
+
# The priority of the rule to remove from the firewall policy.
|
1146
|
+
# @param project [::String]
|
1147
|
+
# Project ID for this request.
|
1148
|
+
# @param request_id [::String]
|
1149
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1150
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1151
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1152
|
+
# @yieldparam response [::Faraday::Response]
|
1153
|
+
#
|
1154
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1155
|
+
#
|
1156
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1157
|
+
def remove_rule request, options = nil
|
1158
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1159
|
+
|
1160
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RemoveRuleNetworkFirewallPolicyRequest
|
1161
|
+
|
1162
|
+
# Converts hash and nil to an options object
|
1163
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1164
|
+
|
1165
|
+
# Customize the options with defaults
|
1166
|
+
call_metadata = @config.rpcs.remove_rule.metadata.to_h
|
1167
|
+
|
1168
|
+
# Set x-goog-api-client header
|
1169
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1170
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1171
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1172
|
+
transports_version_send: [:rest]
|
1173
|
+
|
1174
|
+
options.apply_defaults timeout: @config.rpcs.remove_rule.timeout,
|
1175
|
+
metadata: call_metadata
|
1176
|
+
|
1177
|
+
options.apply_defaults timeout: @config.timeout,
|
1178
|
+
metadata: @config.metadata
|
1179
|
+
|
1180
|
+
@network_firewall_policies_stub.remove_rule request, options do |result, response|
|
1181
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
1182
|
+
operation: result,
|
1183
|
+
client: global_operations,
|
1184
|
+
request_values: {
|
1185
|
+
"project" => request.project
|
1186
|
+
},
|
1187
|
+
options: options
|
1188
|
+
)
|
1189
|
+
yield result, response if block_given?
|
1190
|
+
return result
|
1191
|
+
end
|
1192
|
+
rescue ::Faraday::Error => e
|
1193
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1194
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
##
|
1198
|
+
# Sets the access control policy on the specified resource. Replaces any existing policy.
|
1199
|
+
#
|
1200
|
+
# @overload set_iam_policy(request, options = nil)
|
1201
|
+
# Pass arguments to `set_iam_policy` via a request object, either of type
|
1202
|
+
# {::Google::Cloud::Compute::V1::SetIamPolicyNetworkFirewallPolicyRequest} or an equivalent Hash.
|
1203
|
+
#
|
1204
|
+
# @param request [::Google::Cloud::Compute::V1::SetIamPolicyNetworkFirewallPolicyRequest, ::Hash]
|
1205
|
+
# A request object representing the call parameters. Required. To specify no
|
1206
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1207
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1208
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1209
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
1210
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
1211
|
+
#
|
1212
|
+
# @overload set_iam_policy(global_set_policy_request_resource: nil, project: nil, resource: nil)
|
1213
|
+
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
1214
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1215
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1216
|
+
#
|
1217
|
+
# @param global_set_policy_request_resource [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest, ::Hash]
|
1218
|
+
# The body resource for this request
|
1219
|
+
# @param project [::String]
|
1220
|
+
# Project ID for this request.
|
1221
|
+
# @param resource [::String]
|
1222
|
+
# Name or id of the resource for this request.
|
1223
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1224
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
1225
|
+
# @yieldparam response [::Faraday::Response]
|
1226
|
+
#
|
1227
|
+
# @return [::Google::Cloud::Compute::V1::Policy]
|
1228
|
+
#
|
1229
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1230
|
+
def set_iam_policy request, options = nil
|
1231
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1232
|
+
|
1233
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyNetworkFirewallPolicyRequest
|
1234
|
+
|
1235
|
+
# Converts hash and nil to an options object
|
1236
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1237
|
+
|
1238
|
+
# Customize the options with defaults
|
1239
|
+
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
1240
|
+
|
1241
|
+
# Set x-goog-api-client header
|
1242
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1243
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1244
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1245
|
+
transports_version_send: [:rest]
|
1246
|
+
|
1247
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1248
|
+
metadata: call_metadata
|
1249
|
+
|
1250
|
+
options.apply_defaults timeout: @config.timeout,
|
1251
|
+
metadata: @config.metadata
|
1252
|
+
|
1253
|
+
@network_firewall_policies_stub.set_iam_policy request, options do |result, response|
|
1254
|
+
yield result, response if block_given?
|
1255
|
+
return result
|
1256
|
+
end
|
1257
|
+
rescue ::Faraday::Error => e
|
1258
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1259
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
1260
|
+
end
|
1261
|
+
|
1262
|
+
##
|
1263
|
+
# Returns permissions that a caller has on the specified resource.
|
1264
|
+
#
|
1265
|
+
# @overload test_iam_permissions(request, options = nil)
|
1266
|
+
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
1267
|
+
# {::Google::Cloud::Compute::V1::TestIamPermissionsNetworkFirewallPolicyRequest} or an equivalent Hash.
|
1268
|
+
#
|
1269
|
+
# @param request [::Google::Cloud::Compute::V1::TestIamPermissionsNetworkFirewallPolicyRequest, ::Hash]
|
1270
|
+
# A request object representing the call parameters. Required. To specify no
|
1271
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1272
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1273
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1274
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
1275
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
1276
|
+
#
|
1277
|
+
# @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil)
|
1278
|
+
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
1279
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1280
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1281
|
+
#
|
1282
|
+
# @param project [::String]
|
1283
|
+
# Project ID for this request.
|
1284
|
+
# @param resource [::String]
|
1285
|
+
# Name or id of the resource for this request.
|
1286
|
+
# @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
|
1287
|
+
# The body resource for this request
|
1288
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1289
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
1290
|
+
# @yieldparam response [::Faraday::Response]
|
1291
|
+
#
|
1292
|
+
# @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
1293
|
+
#
|
1294
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1295
|
+
def test_iam_permissions request, options = nil
|
1296
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1297
|
+
|
1298
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsNetworkFirewallPolicyRequest
|
1299
|
+
|
1300
|
+
# Converts hash and nil to an options object
|
1301
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1302
|
+
|
1303
|
+
# Customize the options with defaults
|
1304
|
+
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1305
|
+
|
1306
|
+
# Set x-goog-api-client header
|
1307
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1308
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1309
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1310
|
+
transports_version_send: [:rest]
|
1311
|
+
|
1312
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1313
|
+
metadata: call_metadata
|
1314
|
+
|
1315
|
+
options.apply_defaults timeout: @config.timeout,
|
1316
|
+
metadata: @config.metadata
|
1317
|
+
|
1318
|
+
@network_firewall_policies_stub.test_iam_permissions request, options do |result, response|
|
1319
|
+
yield result, response if block_given?
|
1320
|
+
return result
|
1321
|
+
end
|
1322
|
+
rescue ::Faraday::Error => e
|
1323
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1324
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
1325
|
+
end
|
1326
|
+
|
1327
|
+
##
|
1328
|
+
# Configuration class for the NetworkFirewallPolicies REST API.
|
1329
|
+
#
|
1330
|
+
# This class represents the configuration for NetworkFirewallPolicies REST,
|
1331
|
+
# providing control over credentials, timeouts, retry behavior, logging.
|
1332
|
+
#
|
1333
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1334
|
+
# on construction.
|
1335
|
+
#
|
1336
|
+
# # Examples
|
1337
|
+
#
|
1338
|
+
# To modify the global config, setting the timeout for all calls to 10 seconds:
|
1339
|
+
#
|
1340
|
+
# ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Client.configure do |config|
|
1341
|
+
# config.timeout = 10.0
|
1342
|
+
# end
|
1343
|
+
#
|
1344
|
+
# To apply the above configuration only to a new client:
|
1345
|
+
#
|
1346
|
+
# client = ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Client.new do |config|
|
1347
|
+
# config.timeout = 10.0
|
1348
|
+
# end
|
1349
|
+
#
|
1350
|
+
# @!attribute [rw] endpoint
|
1351
|
+
# The hostname or hostname:port of the service endpoint.
|
1352
|
+
# Defaults to `"compute.googleapis.com"`.
|
1353
|
+
# @return [::String]
|
1354
|
+
# @!attribute [rw] credentials
|
1355
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1356
|
+
# * (`String`) The path to a service account key file in JSON format
|
1357
|
+
# * (`Hash`) A service account key as a Hash
|
1358
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1359
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1360
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1361
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1362
|
+
# * (`nil`) indicating no credentials
|
1363
|
+
# @return [::Object]
|
1364
|
+
# @!attribute [rw] scope
|
1365
|
+
# The OAuth scopes
|
1366
|
+
# @return [::Array<::String>]
|
1367
|
+
# @!attribute [rw] lib_name
|
1368
|
+
# The library name as recorded in instrumentation and logging
|
1369
|
+
# @return [::String]
|
1370
|
+
# @!attribute [rw] lib_version
|
1371
|
+
# The library version as recorded in instrumentation and logging
|
1372
|
+
# @return [::String]
|
1373
|
+
# @!attribute [rw] timeout
|
1374
|
+
# The call timeout in seconds.
|
1375
|
+
# @return [::Numeric]
|
1376
|
+
# @!attribute [rw] metadata
|
1377
|
+
# Additional REST headers to be sent with the call.
|
1378
|
+
# @return [::Hash{::Symbol=>::String}]
|
1379
|
+
#
|
1380
|
+
class Configuration
|
1381
|
+
extend ::Gapic::Config
|
1382
|
+
|
1383
|
+
config_attr :endpoint, "compute.googleapis.com", ::String
|
1384
|
+
config_attr :credentials, nil do |value|
|
1385
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1386
|
+
allowed.any? { |klass| klass === value }
|
1387
|
+
end
|
1388
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1389
|
+
config_attr :lib_name, nil, ::String, nil
|
1390
|
+
config_attr :lib_version, nil, ::String, nil
|
1391
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1392
|
+
config_attr :metadata, nil, ::Hash, nil
|
1393
|
+
|
1394
|
+
# @private
|
1395
|
+
def initialize parent_config = nil
|
1396
|
+
@parent_config = parent_config unless parent_config.nil?
|
1397
|
+
|
1398
|
+
yield self if block_given?
|
1399
|
+
end
|
1400
|
+
|
1401
|
+
##
|
1402
|
+
# Configurations for individual RPCs
|
1403
|
+
# @return [Rpcs]
|
1404
|
+
#
|
1405
|
+
def rpcs
|
1406
|
+
@rpcs ||= begin
|
1407
|
+
parent_rpcs = nil
|
1408
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1409
|
+
Rpcs.new parent_rpcs
|
1410
|
+
end
|
1411
|
+
end
|
1412
|
+
|
1413
|
+
##
|
1414
|
+
# Configuration RPC class for the NetworkFirewallPolicies API.
|
1415
|
+
#
|
1416
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1417
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1418
|
+
# the following configuration fields:
|
1419
|
+
#
|
1420
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1421
|
+
#
|
1422
|
+
# there is one other field (`retry_policy`) that can be set
|
1423
|
+
# but is currently not supported for REST Gapic libraries.
|
1424
|
+
#
|
1425
|
+
class Rpcs
|
1426
|
+
##
|
1427
|
+
# RPC-specific configuration for `add_association`
|
1428
|
+
# @return [::Gapic::Config::Method]
|
1429
|
+
#
|
1430
|
+
attr_reader :add_association
|
1431
|
+
##
|
1432
|
+
# RPC-specific configuration for `add_rule`
|
1433
|
+
# @return [::Gapic::Config::Method]
|
1434
|
+
#
|
1435
|
+
attr_reader :add_rule
|
1436
|
+
##
|
1437
|
+
# RPC-specific configuration for `clone_rules`
|
1438
|
+
# @return [::Gapic::Config::Method]
|
1439
|
+
#
|
1440
|
+
attr_reader :clone_rules
|
1441
|
+
##
|
1442
|
+
# RPC-specific configuration for `delete`
|
1443
|
+
# @return [::Gapic::Config::Method]
|
1444
|
+
#
|
1445
|
+
attr_reader :delete
|
1446
|
+
##
|
1447
|
+
# RPC-specific configuration for `get`
|
1448
|
+
# @return [::Gapic::Config::Method]
|
1449
|
+
#
|
1450
|
+
attr_reader :get
|
1451
|
+
##
|
1452
|
+
# RPC-specific configuration for `get_association`
|
1453
|
+
# @return [::Gapic::Config::Method]
|
1454
|
+
#
|
1455
|
+
attr_reader :get_association
|
1456
|
+
##
|
1457
|
+
# RPC-specific configuration for `get_iam_policy`
|
1458
|
+
# @return [::Gapic::Config::Method]
|
1459
|
+
#
|
1460
|
+
attr_reader :get_iam_policy
|
1461
|
+
##
|
1462
|
+
# RPC-specific configuration for `get_rule`
|
1463
|
+
# @return [::Gapic::Config::Method]
|
1464
|
+
#
|
1465
|
+
attr_reader :get_rule
|
1466
|
+
##
|
1467
|
+
# RPC-specific configuration for `insert`
|
1468
|
+
# @return [::Gapic::Config::Method]
|
1469
|
+
#
|
1470
|
+
attr_reader :insert
|
1471
|
+
##
|
1472
|
+
# RPC-specific configuration for `list`
|
1473
|
+
# @return [::Gapic::Config::Method]
|
1474
|
+
#
|
1475
|
+
attr_reader :list
|
1476
|
+
##
|
1477
|
+
# RPC-specific configuration for `patch`
|
1478
|
+
# @return [::Gapic::Config::Method]
|
1479
|
+
#
|
1480
|
+
attr_reader :patch
|
1481
|
+
##
|
1482
|
+
# RPC-specific configuration for `patch_rule`
|
1483
|
+
# @return [::Gapic::Config::Method]
|
1484
|
+
#
|
1485
|
+
attr_reader :patch_rule
|
1486
|
+
##
|
1487
|
+
# RPC-specific configuration for `remove_association`
|
1488
|
+
# @return [::Gapic::Config::Method]
|
1489
|
+
#
|
1490
|
+
attr_reader :remove_association
|
1491
|
+
##
|
1492
|
+
# RPC-specific configuration for `remove_rule`
|
1493
|
+
# @return [::Gapic::Config::Method]
|
1494
|
+
#
|
1495
|
+
attr_reader :remove_rule
|
1496
|
+
##
|
1497
|
+
# RPC-specific configuration for `set_iam_policy`
|
1498
|
+
# @return [::Gapic::Config::Method]
|
1499
|
+
#
|
1500
|
+
attr_reader :set_iam_policy
|
1501
|
+
##
|
1502
|
+
# RPC-specific configuration for `test_iam_permissions`
|
1503
|
+
# @return [::Gapic::Config::Method]
|
1504
|
+
#
|
1505
|
+
attr_reader :test_iam_permissions
|
1506
|
+
|
1507
|
+
# @private
|
1508
|
+
def initialize parent_rpcs = nil
|
1509
|
+
add_association_config = parent_rpcs.add_association if parent_rpcs.respond_to? :add_association
|
1510
|
+
@add_association = ::Gapic::Config::Method.new add_association_config
|
1511
|
+
add_rule_config = parent_rpcs.add_rule if parent_rpcs.respond_to? :add_rule
|
1512
|
+
@add_rule = ::Gapic::Config::Method.new add_rule_config
|
1513
|
+
clone_rules_config = parent_rpcs.clone_rules if parent_rpcs.respond_to? :clone_rules
|
1514
|
+
@clone_rules = ::Gapic::Config::Method.new clone_rules_config
|
1515
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1516
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1517
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1518
|
+
@get = ::Gapic::Config::Method.new get_config
|
1519
|
+
get_association_config = parent_rpcs.get_association if parent_rpcs.respond_to? :get_association
|
1520
|
+
@get_association = ::Gapic::Config::Method.new get_association_config
|
1521
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
1522
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1523
|
+
get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule
|
1524
|
+
@get_rule = ::Gapic::Config::Method.new get_rule_config
|
1525
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1526
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1527
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1528
|
+
@list = ::Gapic::Config::Method.new list_config
|
1529
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1530
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
1531
|
+
patch_rule_config = parent_rpcs.patch_rule if parent_rpcs.respond_to? :patch_rule
|
1532
|
+
@patch_rule = ::Gapic::Config::Method.new patch_rule_config
|
1533
|
+
remove_association_config = parent_rpcs.remove_association if parent_rpcs.respond_to? :remove_association
|
1534
|
+
@remove_association = ::Gapic::Config::Method.new remove_association_config
|
1535
|
+
remove_rule_config = parent_rpcs.remove_rule if parent_rpcs.respond_to? :remove_rule
|
1536
|
+
@remove_rule = ::Gapic::Config::Method.new remove_rule_config
|
1537
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
1538
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1539
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1540
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1541
|
+
|
1542
|
+
yield self if block_given?
|
1543
|
+
end
|
1544
|
+
end
|
1545
|
+
end
|
1546
|
+
end
|
1547
|
+
end
|
1548
|
+
end
|
1549
|
+
end
|
1550
|
+
end
|
1551
|
+
end
|
1552
|
+
end
|