google-cloud-compute-v1 2.5.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +37 -10
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +311 -8
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +196 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +230 -10
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +134 -2
- data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +37 -10
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +36 -9
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +37 -10
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +34 -8
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/images/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +41 -13
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +39 -11
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +143 -11
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +76 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +34 -8
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +34 -8
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +128 -9
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +74 -2
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +33 -7
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +37 -10
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +142 -10
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +76 -2
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +37 -9
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +39 -11
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +36 -9
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +39 -11
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +37 -10
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +36 -9
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +236 -11
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +134 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +242 -10
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +136 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +335 -8
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +198 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +34 -8
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +38 -11
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +36 -9
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +348 -11
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +199 -2
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +34 -8
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +451 -12
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +260 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +36 -9
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +34 -8
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +135 -11
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +75 -2
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +45 -13
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +507 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +179 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +39 -11
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +39 -11
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +142 -10
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +76 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +142 -10
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +76 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +34 -8
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +34 -8
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1.rb +1 -0
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
- data/proto_docs/google/protobuf/any.rb +144 -0
- metadata +11 -5
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# The Autoscalers API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :autoscalers_stub
|
38
41
|
|
@@ -114,6 +117,15 @@ module Google
|
|
114
117
|
@config
|
115
118
|
end
|
116
119
|
|
120
|
+
##
|
121
|
+
# The effective universe domain
|
122
|
+
#
|
123
|
+
# @return [String]
|
124
|
+
#
|
125
|
+
def universe_domain
|
126
|
+
@autoscalers_stub.universe_domain
|
127
|
+
end
|
128
|
+
|
117
129
|
##
|
118
130
|
# Create a new Autoscalers REST client object.
|
119
131
|
#
|
@@ -141,8 +153,9 @@ module Google
|
|
141
153
|
credentials = @config.credentials
|
142
154
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
143
155
|
# but only if the default endpoint does not have a region prefix.
|
144
|
-
enable_self_signed_jwt = @config.endpoint
|
145
|
-
|
156
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
157
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
158
|
+
!@config.endpoint.split(".").first.include?("-"))
|
146
159
|
credentials ||= Credentials.default scope: @config.scope,
|
147
160
|
enable_self_signed_jwt: enable_self_signed_jwt
|
148
161
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -156,9 +169,15 @@ module Google
|
|
156
169
|
config.credentials = credentials
|
157
170
|
config.quota_project = @quota_project_id
|
158
171
|
config.endpoint = @config.endpoint
|
172
|
+
config.universe_domain = @config.universe_domain
|
159
173
|
end
|
160
174
|
|
161
|
-
@autoscalers_stub = ::Google::Cloud::Compute::V1::Autoscalers::Rest::ServiceStub.new
|
175
|
+
@autoscalers_stub = ::Google::Cloud::Compute::V1::Autoscalers::Rest::ServiceStub.new(
|
176
|
+
endpoint: @config.endpoint,
|
177
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
178
|
+
universe_domain: @config.universe_domain,
|
179
|
+
credentials: credentials
|
180
|
+
)
|
162
181
|
end
|
163
182
|
|
164
183
|
##
|
@@ -183,13 +202,13 @@ module Google
|
|
183
202
|
# @param options [::Gapic::CallOptions, ::Hash]
|
184
203
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
185
204
|
#
|
186
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
205
|
+
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
|
187
206
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
188
207
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
189
208
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
190
209
|
#
|
191
210
|
# @param filter [::String]
|
192
|
-
# 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
|
211
|
+
# 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
|
193
212
|
# @param include_all_scopes [::Boolean]
|
194
213
|
# Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
|
195
214
|
# @param max_results [::Integer]
|
@@ -202,6 +221,7 @@ module Google
|
|
202
221
|
# Project ID for this request.
|
203
222
|
# @param return_partial_success [::Boolean]
|
204
223
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
224
|
+
# @param service_project_number [::Integer]
|
205
225
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
206
226
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::AutoscalersScopedList>]
|
207
227
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -548,7 +568,7 @@ module Google
|
|
548
568
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
549
569
|
#
|
550
570
|
# @param filter [::String]
|
551
|
-
# 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
|
571
|
+
# 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
|
552
572
|
# @param max_results [::Integer]
|
553
573
|
# 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`)
|
554
574
|
# @param order_by [::String]
|
@@ -840,9 +860,9 @@ module Google
|
|
840
860
|
# end
|
841
861
|
#
|
842
862
|
# @!attribute [rw] endpoint
|
843
|
-
#
|
844
|
-
#
|
845
|
-
# @return [::String]
|
863
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
864
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
865
|
+
# @return [::String,nil]
|
846
866
|
# @!attribute [rw] credentials
|
847
867
|
# Credentials to send with calls. You may provide any of the following types:
|
848
868
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -879,13 +899,20 @@ module Google
|
|
879
899
|
# @!attribute [rw] quota_project
|
880
900
|
# A separate project against which to charge quota.
|
881
901
|
# @return [::String]
|
902
|
+
# @!attribute [rw] universe_domain
|
903
|
+
# The universe domain within which to make requests. This determines the
|
904
|
+
# default endpoint URL. The default value of nil uses the environment
|
905
|
+
# universe (usually the default "googleapis.com" universe).
|
906
|
+
# @return [::String,nil]
|
882
907
|
#
|
883
908
|
class Configuration
|
884
909
|
extend ::Gapic::Config
|
885
910
|
|
911
|
+
# @private
|
912
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
886
913
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
887
914
|
|
888
|
-
config_attr :endpoint,
|
915
|
+
config_attr :endpoint, nil, ::String, nil
|
889
916
|
config_attr :credentials, nil do |value|
|
890
917
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
891
918
|
allowed.any? { |klass| klass === value }
|
@@ -897,6 +924,7 @@ module Google
|
|
897
924
|
config_attr :metadata, nil, ::Hash, nil
|
898
925
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
899
926
|
config_attr :quota_project, nil, ::String, nil
|
927
|
+
config_attr :universe_domain, nil, ::String, nil
|
900
928
|
|
901
929
|
# @private
|
902
930
|
def initialize parent_config = nil
|
@@ -30,16 +30,28 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
def initialize endpoint:, credentials:
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
34
34
|
# These require statements are intentionally placed here to initialize
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
endpoint_template: endpoint_template,
|
40
|
+
universe_domain: universe_domain,
|
41
|
+
credentials: credentials,
|
39
42
|
numeric_enums: false,
|
40
43
|
raise_faraday_errors: false
|
41
44
|
end
|
42
45
|
|
46
|
+
##
|
47
|
+
# The effective universe domain
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
def universe_domain
|
52
|
+
@client_stub.universe_domain
|
53
|
+
end
|
54
|
+
|
43
55
|
##
|
44
56
|
# Baseline implementation for the aggregated_list REST call
|
45
57
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# The BackendBuckets API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :backend_buckets_stub
|
38
41
|
|
@@ -76,6 +79,11 @@ module Google
|
|
76
79
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
77
80
|
}
|
78
81
|
|
82
|
+
default_config.rpcs.get_iam_policy.timeout = 600.0
|
83
|
+
default_config.rpcs.get_iam_policy.retry_policy = {
|
84
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
85
|
+
}
|
86
|
+
|
79
87
|
default_config.rpcs.insert.timeout = 600.0
|
80
88
|
|
81
89
|
default_config.rpcs.list.timeout = 600.0
|
@@ -87,6 +95,10 @@ module Google
|
|
87
95
|
|
88
96
|
default_config.rpcs.set_edge_security_policy.timeout = 600.0
|
89
97
|
|
98
|
+
default_config.rpcs.set_iam_policy.timeout = 600.0
|
99
|
+
|
100
|
+
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
101
|
+
|
90
102
|
default_config.rpcs.update.timeout = 600.0
|
91
103
|
|
92
104
|
default_config
|
@@ -115,6 +127,15 @@ module Google
|
|
115
127
|
@config
|
116
128
|
end
|
117
129
|
|
130
|
+
##
|
131
|
+
# The effective universe domain
|
132
|
+
#
|
133
|
+
# @return [String]
|
134
|
+
#
|
135
|
+
def universe_domain
|
136
|
+
@backend_buckets_stub.universe_domain
|
137
|
+
end
|
138
|
+
|
118
139
|
##
|
119
140
|
# Create a new BackendBuckets REST client object.
|
120
141
|
#
|
@@ -142,8 +163,9 @@ module Google
|
|
142
163
|
credentials = @config.credentials
|
143
164
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
144
165
|
# but only if the default endpoint does not have a region prefix.
|
145
|
-
enable_self_signed_jwt = @config.endpoint
|
146
|
-
|
166
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
167
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
168
|
+
!@config.endpoint.split(".").first.include?("-"))
|
147
169
|
credentials ||= Credentials.default scope: @config.scope,
|
148
170
|
enable_self_signed_jwt: enable_self_signed_jwt
|
149
171
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -157,9 +179,15 @@ module Google
|
|
157
179
|
config.credentials = credentials
|
158
180
|
config.quota_project = @quota_project_id
|
159
181
|
config.endpoint = @config.endpoint
|
182
|
+
config.universe_domain = @config.universe_domain
|
160
183
|
end
|
161
184
|
|
162
|
-
@backend_buckets_stub = ::Google::Cloud::Compute::V1::BackendBuckets::Rest::ServiceStub.new
|
185
|
+
@backend_buckets_stub = ::Google::Cloud::Compute::V1::BackendBuckets::Rest::ServiceStub.new(
|
186
|
+
endpoint: @config.endpoint,
|
187
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
188
|
+
universe_domain: @config.universe_domain,
|
189
|
+
credentials: credentials
|
190
|
+
)
|
163
191
|
end
|
164
192
|
|
165
193
|
##
|
@@ -525,6 +553,88 @@ module Google
|
|
525
553
|
raise ::Google::Cloud::Error.from_error(e)
|
526
554
|
end
|
527
555
|
|
556
|
+
##
|
557
|
+
# Gets the access control policy for a resource. May be empty if no such policy or resource exists.
|
558
|
+
#
|
559
|
+
# @overload get_iam_policy(request, options = nil)
|
560
|
+
# Pass arguments to `get_iam_policy` via a request object, either of type
|
561
|
+
# {::Google::Cloud::Compute::V1::GetIamPolicyBackendBucketRequest} or an equivalent Hash.
|
562
|
+
#
|
563
|
+
# @param request [::Google::Cloud::Compute::V1::GetIamPolicyBackendBucketRequest, ::Hash]
|
564
|
+
# A request object representing the call parameters. Required. To specify no
|
565
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
566
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
567
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
568
|
+
#
|
569
|
+
# @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil)
|
570
|
+
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
571
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
572
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
573
|
+
#
|
574
|
+
# @param options_requested_policy_version [::Integer]
|
575
|
+
# Requested IAM Policy version.
|
576
|
+
# @param project [::String]
|
577
|
+
# Project ID for this request.
|
578
|
+
# @param resource [::String]
|
579
|
+
# Name or id of the resource for this request.
|
580
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
581
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
582
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
583
|
+
#
|
584
|
+
# @return [::Google::Cloud::Compute::V1::Policy]
|
585
|
+
#
|
586
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
587
|
+
#
|
588
|
+
# @example Basic example
|
589
|
+
# require "google/cloud/compute/v1"
|
590
|
+
#
|
591
|
+
# # Create a client object. The client can be reused for multiple calls.
|
592
|
+
# client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
|
593
|
+
#
|
594
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
595
|
+
# request = Google::Cloud::Compute::V1::GetIamPolicyBackendBucketRequest.new
|
596
|
+
#
|
597
|
+
# # Call the get_iam_policy method.
|
598
|
+
# result = client.get_iam_policy request
|
599
|
+
#
|
600
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Policy.
|
601
|
+
# p result
|
602
|
+
#
|
603
|
+
def get_iam_policy request, options = nil
|
604
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
605
|
+
|
606
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyBackendBucketRequest
|
607
|
+
|
608
|
+
# Converts hash and nil to an options object
|
609
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
610
|
+
|
611
|
+
# Customize the options with defaults
|
612
|
+
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
613
|
+
|
614
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
615
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
616
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
617
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
618
|
+
transports_version_send: [:rest]
|
619
|
+
|
620
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
621
|
+
|
622
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
623
|
+
metadata: call_metadata,
|
624
|
+
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
625
|
+
|
626
|
+
options.apply_defaults timeout: @config.timeout,
|
627
|
+
metadata: @config.metadata,
|
628
|
+
retry_policy: @config.retry_policy
|
629
|
+
|
630
|
+
@backend_buckets_stub.get_iam_policy request, options do |result, operation|
|
631
|
+
yield result, operation if block_given?
|
632
|
+
return result
|
633
|
+
end
|
634
|
+
rescue ::Gapic::Rest::Error => e
|
635
|
+
raise ::Google::Cloud::Error.from_error(e)
|
636
|
+
end
|
637
|
+
|
528
638
|
##
|
529
639
|
# Creates a BackendBucket resource in the specified project using the data included in the request.
|
530
640
|
#
|
@@ -634,7 +744,7 @@ module Google
|
|
634
744
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
635
745
|
#
|
636
746
|
# @param filter [::String]
|
637
|
-
# 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
|
747
|
+
# 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
|
638
748
|
# @param max_results [::Integer]
|
639
749
|
# 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`)
|
640
750
|
# @param order_by [::String]
|
@@ -888,6 +998,170 @@ module Google
|
|
888
998
|
raise ::Google::Cloud::Error.from_error(e)
|
889
999
|
end
|
890
1000
|
|
1001
|
+
##
|
1002
|
+
# Sets the access control policy on the specified resource. Replaces any existing policy.
|
1003
|
+
#
|
1004
|
+
# @overload set_iam_policy(request, options = nil)
|
1005
|
+
# Pass arguments to `set_iam_policy` via a request object, either of type
|
1006
|
+
# {::Google::Cloud::Compute::V1::SetIamPolicyBackendBucketRequest} or an equivalent Hash.
|
1007
|
+
#
|
1008
|
+
# @param request [::Google::Cloud::Compute::V1::SetIamPolicyBackendBucketRequest, ::Hash]
|
1009
|
+
# A request object representing the call parameters. Required. To specify no
|
1010
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1011
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1012
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1013
|
+
#
|
1014
|
+
# @overload set_iam_policy(global_set_policy_request_resource: nil, project: nil, resource: nil)
|
1015
|
+
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
1016
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1017
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1018
|
+
#
|
1019
|
+
# @param global_set_policy_request_resource [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest, ::Hash]
|
1020
|
+
# The body resource for this request
|
1021
|
+
# @param project [::String]
|
1022
|
+
# Project ID for this request.
|
1023
|
+
# @param resource [::String]
|
1024
|
+
# Name or id of the resource for this request.
|
1025
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1026
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
1027
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1028
|
+
#
|
1029
|
+
# @return [::Google::Cloud::Compute::V1::Policy]
|
1030
|
+
#
|
1031
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1032
|
+
#
|
1033
|
+
# @example Basic example
|
1034
|
+
# require "google/cloud/compute/v1"
|
1035
|
+
#
|
1036
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1037
|
+
# client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
|
1038
|
+
#
|
1039
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1040
|
+
# request = Google::Cloud::Compute::V1::SetIamPolicyBackendBucketRequest.new
|
1041
|
+
#
|
1042
|
+
# # Call the set_iam_policy method.
|
1043
|
+
# result = client.set_iam_policy request
|
1044
|
+
#
|
1045
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Policy.
|
1046
|
+
# p result
|
1047
|
+
#
|
1048
|
+
def set_iam_policy request, options = nil
|
1049
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1050
|
+
|
1051
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyBackendBucketRequest
|
1052
|
+
|
1053
|
+
# Converts hash and nil to an options object
|
1054
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1055
|
+
|
1056
|
+
# Customize the options with defaults
|
1057
|
+
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
1058
|
+
|
1059
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1060
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1061
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1062
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1063
|
+
transports_version_send: [:rest]
|
1064
|
+
|
1065
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1066
|
+
|
1067
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1068
|
+
metadata: call_metadata,
|
1069
|
+
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1070
|
+
|
1071
|
+
options.apply_defaults timeout: @config.timeout,
|
1072
|
+
metadata: @config.metadata,
|
1073
|
+
retry_policy: @config.retry_policy
|
1074
|
+
|
1075
|
+
@backend_buckets_stub.set_iam_policy request, options do |result, operation|
|
1076
|
+
yield result, operation if block_given?
|
1077
|
+
return result
|
1078
|
+
end
|
1079
|
+
rescue ::Gapic::Rest::Error => e
|
1080
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
##
|
1084
|
+
# Returns permissions that a caller has on the specified resource.
|
1085
|
+
#
|
1086
|
+
# @overload test_iam_permissions(request, options = nil)
|
1087
|
+
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
1088
|
+
# {::Google::Cloud::Compute::V1::TestIamPermissionsBackendBucketRequest} or an equivalent Hash.
|
1089
|
+
#
|
1090
|
+
# @param request [::Google::Cloud::Compute::V1::TestIamPermissionsBackendBucketRequest, ::Hash]
|
1091
|
+
# A request object representing the call parameters. Required. To specify no
|
1092
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1093
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1094
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1095
|
+
#
|
1096
|
+
# @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil)
|
1097
|
+
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
1098
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1099
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1100
|
+
#
|
1101
|
+
# @param project [::String]
|
1102
|
+
# Project ID for this request.
|
1103
|
+
# @param resource [::String]
|
1104
|
+
# Name or id of the resource for this request.
|
1105
|
+
# @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
|
1106
|
+
# The body resource for this request
|
1107
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1108
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
1109
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1110
|
+
#
|
1111
|
+
# @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
1112
|
+
#
|
1113
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1114
|
+
#
|
1115
|
+
# @example Basic example
|
1116
|
+
# require "google/cloud/compute/v1"
|
1117
|
+
#
|
1118
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1119
|
+
# client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
|
1120
|
+
#
|
1121
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1122
|
+
# request = Google::Cloud::Compute::V1::TestIamPermissionsBackendBucketRequest.new
|
1123
|
+
#
|
1124
|
+
# # Call the test_iam_permissions method.
|
1125
|
+
# result = client.test_iam_permissions request
|
1126
|
+
#
|
1127
|
+
# # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
|
1128
|
+
# p result
|
1129
|
+
#
|
1130
|
+
def test_iam_permissions request, options = nil
|
1131
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1132
|
+
|
1133
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsBackendBucketRequest
|
1134
|
+
|
1135
|
+
# Converts hash and nil to an options object
|
1136
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1137
|
+
|
1138
|
+
# Customize the options with defaults
|
1139
|
+
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1140
|
+
|
1141
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1142
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1143
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1144
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1145
|
+
transports_version_send: [:rest]
|
1146
|
+
|
1147
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1148
|
+
|
1149
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1150
|
+
metadata: call_metadata,
|
1151
|
+
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1152
|
+
|
1153
|
+
options.apply_defaults timeout: @config.timeout,
|
1154
|
+
metadata: @config.metadata,
|
1155
|
+
retry_policy: @config.retry_policy
|
1156
|
+
|
1157
|
+
@backend_buckets_stub.test_iam_permissions request, options do |result, operation|
|
1158
|
+
yield result, operation if block_given?
|
1159
|
+
return result
|
1160
|
+
end
|
1161
|
+
rescue ::Gapic::Rest::Error => e
|
1162
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1163
|
+
end
|
1164
|
+
|
891
1165
|
##
|
892
1166
|
# Updates the specified BackendBucket resource with the data included in the request.
|
893
1167
|
#
|
@@ -1010,9 +1284,9 @@ module Google
|
|
1010
1284
|
# end
|
1011
1285
|
#
|
1012
1286
|
# @!attribute [rw] endpoint
|
1013
|
-
#
|
1014
|
-
#
|
1015
|
-
# @return [::String]
|
1287
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1288
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1289
|
+
# @return [::String,nil]
|
1016
1290
|
# @!attribute [rw] credentials
|
1017
1291
|
# Credentials to send with calls. You may provide any of the following types:
|
1018
1292
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1049,13 +1323,20 @@ module Google
|
|
1049
1323
|
# @!attribute [rw] quota_project
|
1050
1324
|
# A separate project against which to charge quota.
|
1051
1325
|
# @return [::String]
|
1326
|
+
# @!attribute [rw] universe_domain
|
1327
|
+
# The universe domain within which to make requests. This determines the
|
1328
|
+
# default endpoint URL. The default value of nil uses the environment
|
1329
|
+
# universe (usually the default "googleapis.com" universe).
|
1330
|
+
# @return [::String,nil]
|
1052
1331
|
#
|
1053
1332
|
class Configuration
|
1054
1333
|
extend ::Gapic::Config
|
1055
1334
|
|
1335
|
+
# @private
|
1336
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1056
1337
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
1057
1338
|
|
1058
|
-
config_attr :endpoint,
|
1339
|
+
config_attr :endpoint, nil, ::String, nil
|
1059
1340
|
config_attr :credentials, nil do |value|
|
1060
1341
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1061
1342
|
allowed.any? { |klass| klass === value }
|
@@ -1067,6 +1348,7 @@ module Google
|
|
1067
1348
|
config_attr :metadata, nil, ::Hash, nil
|
1068
1349
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1069
1350
|
config_attr :quota_project, nil, ::String, nil
|
1351
|
+
config_attr :universe_domain, nil, ::String, nil
|
1070
1352
|
|
1071
1353
|
# @private
|
1072
1354
|
def initialize parent_config = nil
|
@@ -1126,6 +1408,11 @@ module Google
|
|
1126
1408
|
#
|
1127
1409
|
attr_reader :get
|
1128
1410
|
##
|
1411
|
+
# RPC-specific configuration for `get_iam_policy`
|
1412
|
+
# @return [::Gapic::Config::Method]
|
1413
|
+
#
|
1414
|
+
attr_reader :get_iam_policy
|
1415
|
+
##
|
1129
1416
|
# RPC-specific configuration for `insert`
|
1130
1417
|
# @return [::Gapic::Config::Method]
|
1131
1418
|
#
|
@@ -1146,6 +1433,16 @@ module Google
|
|
1146
1433
|
#
|
1147
1434
|
attr_reader :set_edge_security_policy
|
1148
1435
|
##
|
1436
|
+
# RPC-specific configuration for `set_iam_policy`
|
1437
|
+
# @return [::Gapic::Config::Method]
|
1438
|
+
#
|
1439
|
+
attr_reader :set_iam_policy
|
1440
|
+
##
|
1441
|
+
# RPC-specific configuration for `test_iam_permissions`
|
1442
|
+
# @return [::Gapic::Config::Method]
|
1443
|
+
#
|
1444
|
+
attr_reader :test_iam_permissions
|
1445
|
+
##
|
1149
1446
|
# RPC-specific configuration for `update`
|
1150
1447
|
# @return [::Gapic::Config::Method]
|
1151
1448
|
#
|
@@ -1161,6 +1458,8 @@ module Google
|
|
1161
1458
|
@delete_signed_url_key = ::Gapic::Config::Method.new delete_signed_url_key_config
|
1162
1459
|
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1163
1460
|
@get = ::Gapic::Config::Method.new get_config
|
1461
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
1462
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1164
1463
|
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1165
1464
|
@insert = ::Gapic::Config::Method.new insert_config
|
1166
1465
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
@@ -1169,6 +1468,10 @@ module Google
|
|
1169
1468
|
@patch = ::Gapic::Config::Method.new patch_config
|
1170
1469
|
set_edge_security_policy_config = parent_rpcs.set_edge_security_policy if parent_rpcs.respond_to? :set_edge_security_policy
|
1171
1470
|
@set_edge_security_policy = ::Gapic::Config::Method.new set_edge_security_policy_config
|
1471
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
1472
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1473
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1474
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1172
1475
|
update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
|
1173
1476
|
@update = ::Gapic::Config::Method.new update_config
|
1174
1477
|
|