google-cloud-compute-v1 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +12 -12
- data/README.md +4 -30
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/addresses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +210 -128
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +373 -0
- data/lib/google/cloud/compute/v1/autoscalers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +228 -143
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +413 -0
- data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +294 -187
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +553 -0
- data/lib/google/cloud/compute/v1/backend_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/compute_pb.rb +816 -135
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/disk_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +334 -213
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +644 -0
- data/lib/google/cloud/compute/v1/disks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +180 -107
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +317 -0
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +463 -280
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +869 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/firewalls/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +292 -127
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +417 -0
- data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +259 -112
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +207 -128
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +370 -0
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +159 -88
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +274 -0
- data/lib/google/cloud/compute/v1/global_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +116 -64
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +186 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +170 -97
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +210 -128
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +371 -0
- data/lib/google/cloud/compute/v1/health_checks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/images/rest/client.rb +284 -174
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +542 -0
- data/lib/google/cloud/compute/v1/images/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +497 -328
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +974 -0
- data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +255 -161
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +467 -0
- data/lib/google/cloud/compute/v1/instance_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +198 -117
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +362 -0
- data/lib/google/cloud/compute/v1/instance_templates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +1079 -609
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1975 -0
- data/lib/google/cloud/compute/v1/instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +188 -112
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +326 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +184 -108
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +318 -0
- data/lib/google/cloud/compute/v1/interconnects/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +91 -48
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +133 -0
- data/lib/google/cloud/compute/v1/license_codes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +198 -117
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +362 -0
- data/lib/google/cloud/compute/v1/licenses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/machine_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +251 -157
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +465 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +349 -173
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +553 -0
- data/lib/google/cloud/compute/v1/networks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +333 -211
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +646 -0
- data/lib/google/cloud/compute/v1/node_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +223 -132
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/node_templates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/node_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +206 -124
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +369 -0
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +338 -219
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +643 -0
- data/lib/google/cloud/compute/v1/projects/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +170 -97
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +196 -112
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +325 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +323 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +203 -125
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +145 -82
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +234 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +309 -198
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +593 -0
- data/lib/google/cloud/compute/v1/region_disks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +163 -97
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +472 -313
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +924 -0
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +143 -84
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +234 -0
- data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +75 -40
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +92 -0
- data/lib/google/cloud/compute/v1/region_instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +134 -73
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +224 -0
- data/lib/google/cloud/compute/v1/region_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +163 -97
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +203 -125
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/regions/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +245 -148
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +458 -0
- data/lib/google/cloud/compute/v1/reservations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +223 -132
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +274 -166
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +507 -0
- data/lib/google/cloud/compute/v1/routers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/routes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +270 -166
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +504 -0
- data/lib/google/cloud/compute/v1/security_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +197 -115
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +360 -0
- data/lib/google/cloud/compute/v1/snapshots/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +185 -110
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +324 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +314 -195
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +600 -0
- data/lib/google/cloud/compute/v1/subnetworks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +163 -97
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +210 -128
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +371 -0
- data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +334 -159
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +509 -0
- data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/target_instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +294 -188
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +554 -0
- data/lib/google/cloud/compute/v1/target_pools/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +229 -145
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +413 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +250 -156
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +461 -0
- data/lib/google/cloud/compute/v1/url_maps/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +227 -135
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +134 -73
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +224 -0
- data/lib/google/cloud/compute/v1/zone_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/zones/rest.rb +0 -2
- data/lib/google/cloud/compute/v1.rb +5 -0
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/cloud/compute/v1/compute.rb +2526 -640
- metadata +84 -8
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
|
+
require "google/cloud/compute/v1/resource_policies/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The ResourcePolicies API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :resource_policies_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::ResourcePolicies::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all ResourcePolicies clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all ResourcePolicies clients
|
47
|
+
# ::Google::Cloud::Compute::V1::ResourcePolicies::Rest::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
52
50
|
#
|
53
51
|
# @yield [config] Configure the Client client.
|
54
52
|
# @yieldparam config [Client::Configuration]
|
@@ -66,6 +64,34 @@ module Google
|
|
66
64
|
end
|
67
65
|
default_config = Client::Configuration.new parent_config
|
68
66
|
|
67
|
+
default_config.rpcs.aggregated_list.timeout = 600.0
|
68
|
+
default_config.rpcs.aggregated_list.retry_policy = {
|
69
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
70
|
+
}
|
71
|
+
|
72
|
+
default_config.rpcs.delete.timeout = 600.0
|
73
|
+
|
74
|
+
default_config.rpcs.get.timeout = 600.0
|
75
|
+
default_config.rpcs.get.retry_policy = {
|
76
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
77
|
+
}
|
78
|
+
|
79
|
+
default_config.rpcs.get_iam_policy.timeout = 600.0
|
80
|
+
default_config.rpcs.get_iam_policy.retry_policy = {
|
81
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
82
|
+
}
|
83
|
+
|
84
|
+
default_config.rpcs.insert.timeout = 600.0
|
85
|
+
|
86
|
+
default_config.rpcs.list.timeout = 600.0
|
87
|
+
default_config.rpcs.list.retry_policy = {
|
88
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
89
|
+
}
|
90
|
+
|
91
|
+
default_config.rpcs.set_iam_policy.timeout = 600.0
|
92
|
+
|
93
|
+
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
94
|
+
|
69
95
|
default_config
|
70
96
|
end
|
71
97
|
yield @configure if block_given?
|
@@ -95,28 +121,20 @@ module Google
|
|
95
121
|
##
|
96
122
|
# Create a new ResourcePolicies REST client object.
|
97
123
|
#
|
98
|
-
#
|
124
|
+
# @example
|
99
125
|
#
|
100
|
-
#
|
101
|
-
#
|
126
|
+
# # Create a client using the default configuration
|
127
|
+
# client = ::Google::Cloud::Compute::V1::ResourcePolicies::Rest::Client.new
|
102
128
|
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
# client = ::Google::Cloud::Compute::V1::ResourcePolicies::Rest::Client.new do |config|
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
129
|
+
# # Create a client using a custom configuration
|
130
|
+
# client = ::Google::Cloud::Compute::V1::ResourcePolicies::Rest::Client.new do |config|
|
131
|
+
# config.timeout = 10.0
|
132
|
+
# end
|
111
133
|
#
|
112
134
|
# @yield [config] Configure the ResourcePolicies client.
|
113
135
|
# @yieldparam config [Client::Configuration]
|
114
136
|
#
|
115
137
|
def initialize
|
116
|
-
# These require statements are intentionally placed here to initialize
|
117
|
-
# the REST modules only when it's required.
|
118
|
-
require "gapic/rest"
|
119
|
-
|
120
138
|
# Create the configuration object
|
121
139
|
@config = Configuration.new Client.configure
|
122
140
|
|
@@ -126,11 +144,11 @@ module Google
|
|
126
144
|
# Create credentials
|
127
145
|
credentials = @config.credentials
|
128
146
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
147
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
148
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
149
|
end
|
132
150
|
|
133
|
-
@
|
151
|
+
@resource_policies_stub = ::Google::Cloud::Compute::V1::ResourcePolicies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
152
|
end
|
135
153
|
|
136
154
|
# Service calls
|
@@ -178,12 +196,12 @@ module Google
|
|
178
196
|
# @param project [::String]
|
179
197
|
# Project ID for this request.
|
180
198
|
# @param return_partial_success [::Boolean]
|
181
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
182
|
-
# @yield [result,
|
183
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
199
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
200
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
201
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::ResourcePoliciesScopedList>]
|
184
202
|
# @yieldparam response [::Faraday::Response]
|
185
203
|
#
|
186
|
-
# @return [::Google::Cloud::Compute::V1::
|
204
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::ResourcePoliciesScopedList>]
|
187
205
|
#
|
188
206
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
189
207
|
def aggregated_list request, options = nil
|
@@ -195,7 +213,7 @@ module Google
|
|
195
213
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
196
214
|
|
197
215
|
# Customize the options with defaults
|
198
|
-
call_metadata =
|
216
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
199
217
|
|
200
218
|
# Set x-goog-api-client header
|
201
219
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -203,19 +221,17 @@ module Google
|
|
203
221
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
204
222
|
transports_version_send: [:rest]
|
205
223
|
|
206
|
-
options.apply_defaults timeout: @config.timeout,
|
224
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
207
225
|
metadata: call_metadata
|
208
226
|
|
209
|
-
|
210
|
-
|
211
|
-
uri: uri,
|
212
|
-
params: query_string_params,
|
213
|
-
options: options
|
214
|
-
)
|
215
|
-
result = ::Google::Cloud::Compute::V1::ResourcePolicyAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
227
|
+
options.apply_defaults timeout: @config.timeout,
|
228
|
+
metadata: @config.metadata
|
216
229
|
|
217
|
-
|
218
|
-
|
230
|
+
@resource_policies_stub.aggregated_list request, options do |result, response|
|
231
|
+
result = ::Gapic::Rest::PagedEnumerable.new @resource_policies_stub, :aggregated_list, "items", request, result, options
|
232
|
+
yield result, response if block_given?
|
233
|
+
return result
|
234
|
+
end
|
219
235
|
rescue ::Faraday::Error => e
|
220
236
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
221
237
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -253,11 +269,11 @@ module Google
|
|
253
269
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
254
270
|
# @param resource_policy [::String]
|
255
271
|
# Name of the resource policy to delete.
|
256
|
-
# @yield [result,
|
257
|
-
# @yieldparam result [::
|
272
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
273
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
258
274
|
# @yieldparam response [::Faraday::Response]
|
259
275
|
#
|
260
|
-
# @return [::
|
276
|
+
# @return [::Gapic::Rest::BaseOperation]
|
261
277
|
#
|
262
278
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
263
279
|
def delete request, options = nil
|
@@ -269,7 +285,7 @@ module Google
|
|
269
285
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
270
286
|
|
271
287
|
# Customize the options with defaults
|
272
|
-
call_metadata =
|
288
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
273
289
|
|
274
290
|
# Set x-goog-api-client header
|
275
291
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -277,19 +293,17 @@ module Google
|
|
277
293
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
278
294
|
transports_version_send: [:rest]
|
279
295
|
|
280
|
-
options.apply_defaults timeout: @config.timeout,
|
296
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
281
297
|
metadata: call_metadata
|
282
298
|
|
283
|
-
|
284
|
-
|
285
|
-
uri: uri,
|
286
|
-
params: query_string_params,
|
287
|
-
options: options
|
288
|
-
)
|
289
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
299
|
+
options.apply_defaults timeout: @config.timeout,
|
300
|
+
metadata: @config.metadata
|
290
301
|
|
291
|
-
|
292
|
-
|
302
|
+
@resource_policies_stub.delete request, options do |result, response|
|
303
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
304
|
+
yield result, response if block_given?
|
305
|
+
return result
|
306
|
+
end
|
293
307
|
rescue ::Faraday::Error => e
|
294
308
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
295
309
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -321,7 +335,7 @@ module Google
|
|
321
335
|
# Name of the region for this request.
|
322
336
|
# @param resource_policy [::String]
|
323
337
|
# Name of the resource policy to retrieve.
|
324
|
-
# @yield [result,
|
338
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
325
339
|
# @yieldparam result [::Google::Cloud::Compute::V1::ResourcePolicy]
|
326
340
|
# @yieldparam response [::Faraday::Response]
|
327
341
|
#
|
@@ -337,7 +351,7 @@ module Google
|
|
337
351
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
338
352
|
|
339
353
|
# Customize the options with defaults
|
340
|
-
call_metadata =
|
354
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
341
355
|
|
342
356
|
# Set x-goog-api-client header
|
343
357
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -345,18 +359,16 @@ module Google
|
|
345
359
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
346
360
|
transports_version_send: [:rest]
|
347
361
|
|
348
|
-
options.apply_defaults timeout: @config.timeout,
|
362
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
349
363
|
metadata: call_metadata
|
350
364
|
|
351
|
-
|
352
|
-
|
353
|
-
uri: uri,
|
354
|
-
options: options
|
355
|
-
)
|
356
|
-
result = ::Google::Cloud::Compute::V1::ResourcePolicy.decode_json response.body, ignore_unknown_fields: true
|
365
|
+
options.apply_defaults timeout: @config.timeout,
|
366
|
+
metadata: @config.metadata
|
357
367
|
|
358
|
-
|
359
|
-
|
368
|
+
@resource_policies_stub.get request, options do |result, response|
|
369
|
+
yield result, response if block_given?
|
370
|
+
return result
|
371
|
+
end
|
360
372
|
rescue ::Faraday::Error => e
|
361
373
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
362
374
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -390,7 +402,7 @@ module Google
|
|
390
402
|
# The name of the region for this request.
|
391
403
|
# @param resource [::String]
|
392
404
|
# Name or id of the resource for this request.
|
393
|
-
# @yield [result,
|
405
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
394
406
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
395
407
|
# @yieldparam response [::Faraday::Response]
|
396
408
|
#
|
@@ -406,7 +418,7 @@ module Google
|
|
406
418
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
407
419
|
|
408
420
|
# Customize the options with defaults
|
409
|
-
call_metadata =
|
421
|
+
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
410
422
|
|
411
423
|
# Set x-goog-api-client header
|
412
424
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -414,19 +426,16 @@ module Google
|
|
414
426
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
415
427
|
transports_version_send: [:rest]
|
416
428
|
|
417
|
-
options.apply_defaults timeout: @config.timeout,
|
429
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
418
430
|
metadata: call_metadata
|
419
431
|
|
420
|
-
|
421
|
-
|
422
|
-
uri: uri,
|
423
|
-
params: query_string_params,
|
424
|
-
options: options
|
425
|
-
)
|
426
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
432
|
+
options.apply_defaults timeout: @config.timeout,
|
433
|
+
metadata: @config.metadata
|
427
434
|
|
428
|
-
|
429
|
-
|
435
|
+
@resource_policies_stub.get_iam_policy request, options do |result, response|
|
436
|
+
yield result, response if block_given?
|
437
|
+
return result
|
438
|
+
end
|
430
439
|
rescue ::Faraday::Error => e
|
431
440
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
432
441
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -464,11 +473,11 @@ module Google
|
|
464
473
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
465
474
|
# @param resource_policy_resource [::Google::Cloud::Compute::V1::ResourcePolicy, ::Hash]
|
466
475
|
# The body resource for this request
|
467
|
-
# @yield [result,
|
468
|
-
# @yieldparam result [::
|
476
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
477
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
469
478
|
# @yieldparam response [::Faraday::Response]
|
470
479
|
#
|
471
|
-
# @return [::
|
480
|
+
# @return [::Gapic::Rest::BaseOperation]
|
472
481
|
#
|
473
482
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
474
483
|
def insert request, options = nil
|
@@ -480,7 +489,7 @@ module Google
|
|
480
489
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
481
490
|
|
482
491
|
# Customize the options with defaults
|
483
|
-
call_metadata =
|
492
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
484
493
|
|
485
494
|
# Set x-goog-api-client header
|
486
495
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -488,20 +497,17 @@ module Google
|
|
488
497
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
489
498
|
transports_version_send: [:rest]
|
490
499
|
|
491
|
-
options.apply_defaults timeout: @config.timeout,
|
500
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
492
501
|
metadata: call_metadata
|
493
502
|
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
yield result, response if block_given?
|
504
|
-
result
|
503
|
+
options.apply_defaults timeout: @config.timeout,
|
504
|
+
metadata: @config.metadata
|
505
|
+
|
506
|
+
@resource_policies_stub.insert request, options do |result, response|
|
507
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
508
|
+
yield result, response if block_given?
|
509
|
+
return result
|
510
|
+
end
|
505
511
|
rescue ::Faraday::Error => e
|
506
512
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
507
513
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -550,12 +556,12 @@ module Google
|
|
550
556
|
# @param region [::String]
|
551
557
|
# Name of the region for this request.
|
552
558
|
# @param return_partial_success [::Boolean]
|
553
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
554
|
-
# @yield [result,
|
555
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
559
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
560
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
561
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ResourcePolicy>]
|
556
562
|
# @yieldparam response [::Faraday::Response]
|
557
563
|
#
|
558
|
-
# @return [::Google::Cloud::Compute::V1::
|
564
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ResourcePolicy>]
|
559
565
|
#
|
560
566
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
561
567
|
def list request, options = nil
|
@@ -567,7 +573,7 @@ module Google
|
|
567
573
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
568
574
|
|
569
575
|
# Customize the options with defaults
|
570
|
-
call_metadata =
|
576
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
571
577
|
|
572
578
|
# Set x-goog-api-client header
|
573
579
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -575,19 +581,17 @@ module Google
|
|
575
581
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
576
582
|
transports_version_send: [:rest]
|
577
583
|
|
578
|
-
options.apply_defaults timeout: @config.timeout,
|
584
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
579
585
|
metadata: call_metadata
|
580
586
|
|
581
|
-
|
582
|
-
|
583
|
-
uri: uri,
|
584
|
-
params: query_string_params,
|
585
|
-
options: options
|
586
|
-
)
|
587
|
-
result = ::Google::Cloud::Compute::V1::ResourcePolicyList.decode_json response.body, ignore_unknown_fields: true
|
587
|
+
options.apply_defaults timeout: @config.timeout,
|
588
|
+
metadata: @config.metadata
|
588
589
|
|
589
|
-
|
590
|
-
|
590
|
+
@resource_policies_stub.list request, options do |result, response|
|
591
|
+
result = ::Gapic::Rest::PagedEnumerable.new @resource_policies_stub, :list, "items", request, result, options
|
592
|
+
yield result, response if block_given?
|
593
|
+
return result
|
594
|
+
end
|
591
595
|
rescue ::Faraday::Error => e
|
592
596
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
593
597
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -621,7 +625,7 @@ module Google
|
|
621
625
|
# The body resource for this request
|
622
626
|
# @param resource [::String]
|
623
627
|
# Name or id of the resource for this request.
|
624
|
-
# @yield [result,
|
628
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
625
629
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
626
630
|
# @yieldparam response [::Faraday::Response]
|
627
631
|
#
|
@@ -637,7 +641,7 @@ module Google
|
|
637
641
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
638
642
|
|
639
643
|
# Customize the options with defaults
|
640
|
-
call_metadata =
|
644
|
+
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
641
645
|
|
642
646
|
# Set x-goog-api-client header
|
643
647
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -645,19 +649,16 @@ module Google
|
|
645
649
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
646
650
|
transports_version_send: [:rest]
|
647
651
|
|
648
|
-
options.apply_defaults timeout: @config.timeout,
|
652
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
649
653
|
metadata: call_metadata
|
650
654
|
|
651
|
-
|
652
|
-
|
653
|
-
uri: uri,
|
654
|
-
body: body,
|
655
|
-
options: options
|
656
|
-
)
|
657
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
655
|
+
options.apply_defaults timeout: @config.timeout,
|
656
|
+
metadata: @config.metadata
|
658
657
|
|
659
|
-
|
660
|
-
|
658
|
+
@resource_policies_stub.set_iam_policy request, options do |result, response|
|
659
|
+
yield result, response if block_given?
|
660
|
+
return result
|
661
|
+
end
|
661
662
|
rescue ::Faraday::Error => e
|
662
663
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
663
664
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -691,7 +692,7 @@ module Google
|
|
691
692
|
# Name or id of the resource for this request.
|
692
693
|
# @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
|
693
694
|
# The body resource for this request
|
694
|
-
# @yield [result,
|
695
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
695
696
|
# @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
696
697
|
# @yieldparam response [::Faraday::Response]
|
697
698
|
#
|
@@ -707,7 +708,7 @@ module Google
|
|
707
708
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
708
709
|
|
709
710
|
# Customize the options with defaults
|
710
|
-
call_metadata =
|
711
|
+
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
711
712
|
|
712
713
|
# Set x-goog-api-client header
|
713
714
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -715,19 +716,16 @@ module Google
|
|
715
716
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
716
717
|
transports_version_send: [:rest]
|
717
718
|
|
718
|
-
options.apply_defaults timeout: @config.timeout,
|
719
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
719
720
|
metadata: call_metadata
|
720
721
|
|
721
|
-
|
722
|
-
|
723
|
-
uri: uri,
|
724
|
-
body: body,
|
725
|
-
options: options
|
726
|
-
)
|
727
|
-
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
722
|
+
options.apply_defaults timeout: @config.timeout,
|
723
|
+
metadata: @config.metadata
|
728
724
|
|
729
|
-
|
730
|
-
|
725
|
+
@resource_policies_stub.test_iam_permissions request, options do |result, response|
|
726
|
+
yield result, response if block_given?
|
727
|
+
return result
|
728
|
+
end
|
731
729
|
rescue ::Faraday::Error => e
|
732
730
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
733
731
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -782,6 +780,9 @@ module Google
|
|
782
780
|
# @!attribute [rw] timeout
|
783
781
|
# The call timeout in seconds.
|
784
782
|
# @return [::Numeric]
|
783
|
+
# @!attribute [rw] metadata
|
784
|
+
# Additional REST headers to be sent with the call.
|
785
|
+
# @return [::Hash{::Symbol=>::String}]
|
785
786
|
#
|
786
787
|
class Configuration
|
787
788
|
extend ::Gapic::Config
|
@@ -795,6 +796,7 @@ module Google
|
|
795
796
|
config_attr :lib_name, nil, ::String, nil
|
796
797
|
config_attr :lib_version, nil, ::String, nil
|
797
798
|
config_attr :timeout, nil, ::Numeric, nil
|
799
|
+
config_attr :metadata, nil, ::Hash, nil
|
798
800
|
|
799
801
|
# @private
|
800
802
|
def initialize parent_config = nil
|
@@ -802,6 +804,95 @@ module Google
|
|
802
804
|
|
803
805
|
yield self if block_given?
|
804
806
|
end
|
807
|
+
|
808
|
+
##
|
809
|
+
# Configurations for individual RPCs
|
810
|
+
# @return [Rpcs]
|
811
|
+
#
|
812
|
+
def rpcs
|
813
|
+
@rpcs ||= begin
|
814
|
+
parent_rpcs = nil
|
815
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
816
|
+
Rpcs.new parent_rpcs
|
817
|
+
end
|
818
|
+
end
|
819
|
+
|
820
|
+
##
|
821
|
+
# Configuration RPC class for the ResourcePolicies API.
|
822
|
+
#
|
823
|
+
# Includes fields providing the configuration for each RPC in this service.
|
824
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
825
|
+
# the following configuration fields:
|
826
|
+
#
|
827
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
828
|
+
#
|
829
|
+
# there is one other field (`retry_policy`) that can be set
|
830
|
+
# but is currently not supported for REST Gapic libraries.
|
831
|
+
#
|
832
|
+
class Rpcs
|
833
|
+
##
|
834
|
+
# RPC-specific configuration for `aggregated_list`
|
835
|
+
# @return [::Gapic::Config::Method]
|
836
|
+
#
|
837
|
+
attr_reader :aggregated_list
|
838
|
+
##
|
839
|
+
# RPC-specific configuration for `delete`
|
840
|
+
# @return [::Gapic::Config::Method]
|
841
|
+
#
|
842
|
+
attr_reader :delete
|
843
|
+
##
|
844
|
+
# RPC-specific configuration for `get`
|
845
|
+
# @return [::Gapic::Config::Method]
|
846
|
+
#
|
847
|
+
attr_reader :get
|
848
|
+
##
|
849
|
+
# RPC-specific configuration for `get_iam_policy`
|
850
|
+
# @return [::Gapic::Config::Method]
|
851
|
+
#
|
852
|
+
attr_reader :get_iam_policy
|
853
|
+
##
|
854
|
+
# RPC-specific configuration for `insert`
|
855
|
+
# @return [::Gapic::Config::Method]
|
856
|
+
#
|
857
|
+
attr_reader :insert
|
858
|
+
##
|
859
|
+
# RPC-specific configuration for `list`
|
860
|
+
# @return [::Gapic::Config::Method]
|
861
|
+
#
|
862
|
+
attr_reader :list
|
863
|
+
##
|
864
|
+
# RPC-specific configuration for `set_iam_policy`
|
865
|
+
# @return [::Gapic::Config::Method]
|
866
|
+
#
|
867
|
+
attr_reader :set_iam_policy
|
868
|
+
##
|
869
|
+
# RPC-specific configuration for `test_iam_permissions`
|
870
|
+
# @return [::Gapic::Config::Method]
|
871
|
+
#
|
872
|
+
attr_reader :test_iam_permissions
|
873
|
+
|
874
|
+
# @private
|
875
|
+
def initialize parent_rpcs = nil
|
876
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
877
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
878
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
879
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
880
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
881
|
+
@get = ::Gapic::Config::Method.new get_config
|
882
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
883
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
884
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
885
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
886
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
887
|
+
@list = ::Gapic::Config::Method.new list_config
|
888
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
889
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
890
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
891
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
892
|
+
|
893
|
+
yield self if block_given?
|
894
|
+
end
|
895
|
+
end
|
805
896
|
end
|
806
897
|
end
|
807
898
|
end
|