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 VpnGateways API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :vpn_gateways_stub
|
38
41
|
|
@@ -119,6 +122,15 @@ module Google
|
|
119
122
|
@config
|
120
123
|
end
|
121
124
|
|
125
|
+
##
|
126
|
+
# The effective universe domain
|
127
|
+
#
|
128
|
+
# @return [String]
|
129
|
+
#
|
130
|
+
def universe_domain
|
131
|
+
@vpn_gateways_stub.universe_domain
|
132
|
+
end
|
133
|
+
|
122
134
|
##
|
123
135
|
# Create a new VpnGateways REST client object.
|
124
136
|
#
|
@@ -146,8 +158,9 @@ module Google
|
|
146
158
|
credentials = @config.credentials
|
147
159
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
148
160
|
# but only if the default endpoint does not have a region prefix.
|
149
|
-
enable_self_signed_jwt = @config.endpoint
|
150
|
-
|
161
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
162
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
163
|
+
!@config.endpoint.split(".").first.include?("-"))
|
151
164
|
credentials ||= Credentials.default scope: @config.scope,
|
152
165
|
enable_self_signed_jwt: enable_self_signed_jwt
|
153
166
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -161,9 +174,15 @@ module Google
|
|
161
174
|
config.credentials = credentials
|
162
175
|
config.quota_project = @quota_project_id
|
163
176
|
config.endpoint = @config.endpoint
|
177
|
+
config.universe_domain = @config.universe_domain
|
164
178
|
end
|
165
179
|
|
166
|
-
@vpn_gateways_stub = ::Google::Cloud::Compute::V1::VpnGateways::Rest::ServiceStub.new
|
180
|
+
@vpn_gateways_stub = ::Google::Cloud::Compute::V1::VpnGateways::Rest::ServiceStub.new(
|
181
|
+
endpoint: @config.endpoint,
|
182
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
183
|
+
universe_domain: @config.universe_domain,
|
184
|
+
credentials: credentials
|
185
|
+
)
|
167
186
|
end
|
168
187
|
|
169
188
|
##
|
@@ -188,13 +207,13 @@ module Google
|
|
188
207
|
# @param options [::Gapic::CallOptions, ::Hash]
|
189
208
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
190
209
|
#
|
191
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
210
|
+
# @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)
|
192
211
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
193
212
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
194
213
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
195
214
|
#
|
196
215
|
# @param filter [::String]
|
197
|
-
# 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
|
216
|
+
# 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.
|
198
217
|
# @param include_all_scopes [::Boolean]
|
199
218
|
# 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.
|
200
219
|
# @param max_results [::Integer]
|
@@ -207,6 +226,7 @@ module Google
|
|
207
226
|
# Project ID for this request.
|
208
227
|
# @param return_partial_success [::Boolean]
|
209
228
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
229
|
+
# @param service_project_number [::Integer]
|
210
230
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
211
231
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::VpnGatewaysScopedList>]
|
212
232
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -635,7 +655,7 @@ module Google
|
|
635
655
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
636
656
|
#
|
637
657
|
# @param filter [::String]
|
638
|
-
# 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
|
658
|
+
# 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.
|
639
659
|
# @param max_results [::Integer]
|
640
660
|
# 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`)
|
641
661
|
# @param order_by [::String]
|
@@ -916,9 +936,9 @@ module Google
|
|
916
936
|
# end
|
917
937
|
#
|
918
938
|
# @!attribute [rw] endpoint
|
919
|
-
#
|
920
|
-
#
|
921
|
-
# @return [::String]
|
939
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
940
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
941
|
+
# @return [::String,nil]
|
922
942
|
# @!attribute [rw] credentials
|
923
943
|
# Credentials to send with calls. You may provide any of the following types:
|
924
944
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -955,13 +975,20 @@ module Google
|
|
955
975
|
# @!attribute [rw] quota_project
|
956
976
|
# A separate project against which to charge quota.
|
957
977
|
# @return [::String]
|
978
|
+
# @!attribute [rw] universe_domain
|
979
|
+
# The universe domain within which to make requests. This determines the
|
980
|
+
# default endpoint URL. The default value of nil uses the environment
|
981
|
+
# universe (usually the default "googleapis.com" universe).
|
982
|
+
# @return [::String,nil]
|
958
983
|
#
|
959
984
|
class Configuration
|
960
985
|
extend ::Gapic::Config
|
961
986
|
|
987
|
+
# @private
|
988
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
962
989
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
963
990
|
|
964
|
-
config_attr :endpoint,
|
991
|
+
config_attr :endpoint, nil, ::String, nil
|
965
992
|
config_attr :credentials, nil do |value|
|
966
993
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
967
994
|
allowed.any? { |klass| klass === value }
|
@@ -973,6 +1000,7 @@ module Google
|
|
973
1000
|
config_attr :metadata, nil, ::Hash, nil
|
974
1001
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
975
1002
|
config_attr :quota_project, nil, ::String, nil
|
1003
|
+
config_attr :universe_domain, nil, ::String, nil
|
976
1004
|
|
977
1005
|
# @private
|
978
1006
|
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 VpnTunnels API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :vpn_tunnels_stub
|
38
41
|
|
@@ -112,6 +115,15 @@ module Google
|
|
112
115
|
@config
|
113
116
|
end
|
114
117
|
|
118
|
+
##
|
119
|
+
# The effective universe domain
|
120
|
+
#
|
121
|
+
# @return [String]
|
122
|
+
#
|
123
|
+
def universe_domain
|
124
|
+
@vpn_tunnels_stub.universe_domain
|
125
|
+
end
|
126
|
+
|
115
127
|
##
|
116
128
|
# Create a new VpnTunnels REST client object.
|
117
129
|
#
|
@@ -139,8 +151,9 @@ module Google
|
|
139
151
|
credentials = @config.credentials
|
140
152
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
141
153
|
# but only if the default endpoint does not have a region prefix.
|
142
|
-
enable_self_signed_jwt = @config.endpoint
|
143
|
-
|
154
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
155
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
156
|
+
!@config.endpoint.split(".").first.include?("-"))
|
144
157
|
credentials ||= Credentials.default scope: @config.scope,
|
145
158
|
enable_self_signed_jwt: enable_self_signed_jwt
|
146
159
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -154,9 +167,15 @@ module Google
|
|
154
167
|
config.credentials = credentials
|
155
168
|
config.quota_project = @quota_project_id
|
156
169
|
config.endpoint = @config.endpoint
|
170
|
+
config.universe_domain = @config.universe_domain
|
157
171
|
end
|
158
172
|
|
159
|
-
@vpn_tunnels_stub = ::Google::Cloud::Compute::V1::VpnTunnels::Rest::ServiceStub.new
|
173
|
+
@vpn_tunnels_stub = ::Google::Cloud::Compute::V1::VpnTunnels::Rest::ServiceStub.new(
|
174
|
+
endpoint: @config.endpoint,
|
175
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
176
|
+
universe_domain: @config.universe_domain,
|
177
|
+
credentials: credentials
|
178
|
+
)
|
160
179
|
end
|
161
180
|
|
162
181
|
##
|
@@ -181,13 +200,13 @@ module Google
|
|
181
200
|
# @param options [::Gapic::CallOptions, ::Hash]
|
182
201
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
183
202
|
#
|
184
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
203
|
+
# @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)
|
185
204
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
186
205
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
187
206
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
188
207
|
#
|
189
208
|
# @param filter [::String]
|
190
|
-
# 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
|
209
|
+
# 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.
|
191
210
|
# @param include_all_scopes [::Boolean]
|
192
211
|
# 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.
|
193
212
|
# @param max_results [::Integer]
|
@@ -200,6 +219,7 @@ module Google
|
|
200
219
|
# Project ID for this request.
|
201
220
|
# @param return_partial_success [::Boolean]
|
202
221
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
222
|
+
# @param service_project_number [::Integer]
|
203
223
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
204
224
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::VpnTunnelsScopedList>]
|
205
225
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -546,7 +566,7 @@ module Google
|
|
546
566
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
547
567
|
#
|
548
568
|
# @param filter [::String]
|
549
|
-
# 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
|
569
|
+
# 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.
|
550
570
|
# @param max_results [::Integer]
|
551
571
|
# 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`)
|
552
572
|
# @param order_by [::String]
|
@@ -743,9 +763,9 @@ module Google
|
|
743
763
|
# end
|
744
764
|
#
|
745
765
|
# @!attribute [rw] endpoint
|
746
|
-
#
|
747
|
-
#
|
748
|
-
# @return [::String]
|
766
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
767
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
768
|
+
# @return [::String,nil]
|
749
769
|
# @!attribute [rw] credentials
|
750
770
|
# Credentials to send with calls. You may provide any of the following types:
|
751
771
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -782,13 +802,20 @@ module Google
|
|
782
802
|
# @!attribute [rw] quota_project
|
783
803
|
# A separate project against which to charge quota.
|
784
804
|
# @return [::String]
|
805
|
+
# @!attribute [rw] universe_domain
|
806
|
+
# The universe domain within which to make requests. This determines the
|
807
|
+
# default endpoint URL. The default value of nil uses the environment
|
808
|
+
# universe (usually the default "googleapis.com" universe).
|
809
|
+
# @return [::String,nil]
|
785
810
|
#
|
786
811
|
class Configuration
|
787
812
|
extend ::Gapic::Config
|
788
813
|
|
814
|
+
# @private
|
815
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
789
816
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
790
817
|
|
791
|
-
config_attr :endpoint,
|
818
|
+
config_attr :endpoint, nil, ::String, nil
|
792
819
|
config_attr :credentials, nil do |value|
|
793
820
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
794
821
|
allowed.any? { |klass| klass === value }
|
@@ -800,6 +827,7 @@ module Google
|
|
800
827
|
config_attr :metadata, nil, ::Hash, nil
|
801
828
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
802
829
|
config_attr :quota_project, nil, ::String, nil
|
830
|
+
config_attr :universe_domain, nil, ::String, nil
|
803
831
|
|
804
832
|
# @private
|
805
833
|
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
|
#
|
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# The ZoneOperations API.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
37
|
+
|
35
38
|
# @private
|
36
39
|
attr_reader :zone_operations_stub
|
37
40
|
|
@@ -104,6 +107,15 @@ module Google
|
|
104
107
|
@config
|
105
108
|
end
|
106
109
|
|
110
|
+
##
|
111
|
+
# The effective universe domain
|
112
|
+
#
|
113
|
+
# @return [String]
|
114
|
+
#
|
115
|
+
def universe_domain
|
116
|
+
@zone_operations_stub.universe_domain
|
117
|
+
end
|
118
|
+
|
107
119
|
##
|
108
120
|
# Create a new ZoneOperations REST client object.
|
109
121
|
#
|
@@ -131,8 +143,9 @@ module Google
|
|
131
143
|
credentials = @config.credentials
|
132
144
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
133
145
|
# but only if the default endpoint does not have a region prefix.
|
134
|
-
enable_self_signed_jwt = @config.endpoint
|
135
|
-
|
146
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
147
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
148
|
+
!@config.endpoint.split(".").first.include?("-"))
|
136
149
|
credentials ||= Credentials.default scope: @config.scope,
|
137
150
|
enable_self_signed_jwt: enable_self_signed_jwt
|
138
151
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -142,7 +155,12 @@ module Google
|
|
142
155
|
@quota_project_id = @config.quota_project
|
143
156
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
144
157
|
|
145
|
-
@zone_operations_stub = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::ServiceStub.new
|
158
|
+
@zone_operations_stub = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::ServiceStub.new(
|
159
|
+
endpoint: @config.endpoint,
|
160
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
161
|
+
universe_domain: @config.universe_domain,
|
162
|
+
credentials: credentials
|
163
|
+
)
|
146
164
|
end
|
147
165
|
|
148
166
|
# Service calls
|
@@ -330,7 +348,7 @@ module Google
|
|
330
348
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
331
349
|
#
|
332
350
|
# @param filter [::String]
|
333
|
-
# 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
|
351
|
+
# 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.
|
334
352
|
# @param max_results [::Integer]
|
335
353
|
# 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`)
|
336
354
|
# @param order_by [::String]
|
@@ -514,9 +532,9 @@ module Google
|
|
514
532
|
# end
|
515
533
|
#
|
516
534
|
# @!attribute [rw] endpoint
|
517
|
-
#
|
518
|
-
#
|
519
|
-
# @return [::String]
|
535
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
536
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
537
|
+
# @return [::String,nil]
|
520
538
|
# @!attribute [rw] credentials
|
521
539
|
# Credentials to send with calls. You may provide any of the following types:
|
522
540
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -553,13 +571,20 @@ module Google
|
|
553
571
|
# @!attribute [rw] quota_project
|
554
572
|
# A separate project against which to charge quota.
|
555
573
|
# @return [::String]
|
574
|
+
# @!attribute [rw] universe_domain
|
575
|
+
# The universe domain within which to make requests. This determines the
|
576
|
+
# default endpoint URL. The default value of nil uses the environment
|
577
|
+
# universe (usually the default "googleapis.com" universe).
|
578
|
+
# @return [::String,nil]
|
556
579
|
#
|
557
580
|
class Configuration
|
558
581
|
extend ::Gapic::Config
|
559
582
|
|
583
|
+
# @private
|
584
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
560
585
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
561
586
|
|
562
|
-
config_attr :endpoint,
|
587
|
+
config_attr :endpoint, nil, ::String, nil
|
563
588
|
config_attr :credentials, nil do |value|
|
564
589
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
565
590
|
allowed.any? { |klass| klass === value }
|
@@ -571,6 +596,7 @@ module Google
|
|
571
596
|
config_attr :metadata, nil, ::Hash, nil
|
572
597
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
573
598
|
config_attr :quota_project, nil, ::String, nil
|
599
|
+
config_attr :universe_domain, nil, ::String, nil
|
574
600
|
|
575
601
|
# @private
|
576
602
|
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 delete REST call
|
45
57
|
#
|
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# The Zones API.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
37
|
+
|
35
38
|
# @private
|
36
39
|
attr_reader :zones_stub
|
37
40
|
|
@@ -100,6 +103,15 @@ module Google
|
|
100
103
|
@config
|
101
104
|
end
|
102
105
|
|
106
|
+
##
|
107
|
+
# The effective universe domain
|
108
|
+
#
|
109
|
+
# @return [String]
|
110
|
+
#
|
111
|
+
def universe_domain
|
112
|
+
@zones_stub.universe_domain
|
113
|
+
end
|
114
|
+
|
103
115
|
##
|
104
116
|
# Create a new Zones REST client object.
|
105
117
|
#
|
@@ -127,8 +139,9 @@ module Google
|
|
127
139
|
credentials = @config.credentials
|
128
140
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
129
141
|
# but only if the default endpoint does not have a region prefix.
|
130
|
-
enable_self_signed_jwt = @config.endpoint
|
131
|
-
|
142
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
143
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
144
|
+
!@config.endpoint.split(".").first.include?("-"))
|
132
145
|
credentials ||= Credentials.default scope: @config.scope,
|
133
146
|
enable_self_signed_jwt: enable_self_signed_jwt
|
134
147
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -138,7 +151,12 @@ module Google
|
|
138
151
|
@quota_project_id = @config.quota_project
|
139
152
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
140
153
|
|
141
|
-
@zones_stub = ::Google::Cloud::Compute::V1::Zones::Rest::ServiceStub.new
|
154
|
+
@zones_stub = ::Google::Cloud::Compute::V1::Zones::Rest::ServiceStub.new(
|
155
|
+
endpoint: @config.endpoint,
|
156
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
157
|
+
universe_domain: @config.universe_domain,
|
158
|
+
credentials: credentials
|
159
|
+
)
|
142
160
|
end
|
143
161
|
|
144
162
|
# Service calls
|
@@ -242,7 +260,7 @@ module Google
|
|
242
260
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
243
261
|
#
|
244
262
|
# @param filter [::String]
|
245
|
-
# 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
|
263
|
+
# 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.
|
246
264
|
# @param max_results [::Integer]
|
247
265
|
# 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`)
|
248
266
|
# @param order_by [::String]
|
@@ -342,9 +360,9 @@ module Google
|
|
342
360
|
# end
|
343
361
|
#
|
344
362
|
# @!attribute [rw] endpoint
|
345
|
-
#
|
346
|
-
#
|
347
|
-
# @return [::String]
|
363
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
364
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
365
|
+
# @return [::String,nil]
|
348
366
|
# @!attribute [rw] credentials
|
349
367
|
# Credentials to send with calls. You may provide any of the following types:
|
350
368
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -381,13 +399,20 @@ module Google
|
|
381
399
|
# @!attribute [rw] quota_project
|
382
400
|
# A separate project against which to charge quota.
|
383
401
|
# @return [::String]
|
402
|
+
# @!attribute [rw] universe_domain
|
403
|
+
# The universe domain within which to make requests. This determines the
|
404
|
+
# default endpoint URL. The default value of nil uses the environment
|
405
|
+
# universe (usually the default "googleapis.com" universe).
|
406
|
+
# @return [::String,nil]
|
384
407
|
#
|
385
408
|
class Configuration
|
386
409
|
extend ::Gapic::Config
|
387
410
|
|
411
|
+
# @private
|
412
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
388
413
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
389
414
|
|
390
|
-
config_attr :endpoint,
|
415
|
+
config_attr :endpoint, nil, ::String, nil
|
391
416
|
config_attr :credentials, nil do |value|
|
392
417
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
393
418
|
allowed.any? { |klass| klass === value }
|
@@ -399,6 +424,7 @@ module Google
|
|
399
424
|
config_attr :metadata, nil, ::Hash, nil
|
400
425
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
401
426
|
config_attr :quota_project, nil, ::String, nil
|
427
|
+
config_attr :universe_domain, nil, ::String, nil
|
402
428
|
|
403
429
|
# @private
|
404
430
|
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 get REST call
|
45
57
|
#
|