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 NodeGroups API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :node_groups_stub
|
38
41
|
|
@@ -131,6 +134,15 @@ module Google
|
|
131
134
|
@config
|
132
135
|
end
|
133
136
|
|
137
|
+
##
|
138
|
+
# The effective universe domain
|
139
|
+
#
|
140
|
+
# @return [String]
|
141
|
+
#
|
142
|
+
def universe_domain
|
143
|
+
@node_groups_stub.universe_domain
|
144
|
+
end
|
145
|
+
|
134
146
|
##
|
135
147
|
# Create a new NodeGroups REST client object.
|
136
148
|
#
|
@@ -158,8 +170,9 @@ module Google
|
|
158
170
|
credentials = @config.credentials
|
159
171
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
160
172
|
# but only if the default endpoint does not have a region prefix.
|
161
|
-
enable_self_signed_jwt = @config.endpoint
|
162
|
-
|
173
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
174
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
175
|
+
!@config.endpoint.split(".").first.include?("-"))
|
163
176
|
credentials ||= Credentials.default scope: @config.scope,
|
164
177
|
enable_self_signed_jwt: enable_self_signed_jwt
|
165
178
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -173,9 +186,15 @@ module Google
|
|
173
186
|
config.credentials = credentials
|
174
187
|
config.quota_project = @quota_project_id
|
175
188
|
config.endpoint = @config.endpoint
|
189
|
+
config.universe_domain = @config.universe_domain
|
176
190
|
end
|
177
191
|
|
178
|
-
@node_groups_stub = ::Google::Cloud::Compute::V1::NodeGroups::Rest::ServiceStub.new
|
192
|
+
@node_groups_stub = ::Google::Cloud::Compute::V1::NodeGroups::Rest::ServiceStub.new(
|
193
|
+
endpoint: @config.endpoint,
|
194
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
195
|
+
universe_domain: @config.universe_domain,
|
196
|
+
credentials: credentials
|
197
|
+
)
|
179
198
|
end
|
180
199
|
|
181
200
|
##
|
@@ -295,13 +314,13 @@ module Google
|
|
295
314
|
# @param options [::Gapic::CallOptions, ::Hash]
|
296
315
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
297
316
|
#
|
298
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
317
|
+
# @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)
|
299
318
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
300
319
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
301
320
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
302
321
|
#
|
303
322
|
# @param filter [::String]
|
304
|
-
# 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
|
323
|
+
# 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.
|
305
324
|
# @param include_all_scopes [::Boolean]
|
306
325
|
# 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.
|
307
326
|
# @param max_results [::Integer]
|
@@ -314,6 +333,7 @@ module Google
|
|
314
333
|
# Project ID for this request.
|
315
334
|
# @param return_partial_success [::Boolean]
|
316
335
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
336
|
+
# @param service_project_number [::Integer]
|
317
337
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
318
338
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NodeGroupsScopedList>]
|
319
339
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -841,7 +861,7 @@ module Google
|
|
841
861
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
842
862
|
#
|
843
863
|
# @param filter [::String]
|
844
|
-
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The
|
864
|
+
# 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.
|
845
865
|
# @param max_results [::Integer]
|
846
866
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
847
867
|
# @param order_by [::String]
|
@@ -932,7 +952,7 @@ module Google
|
|
932
952
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
933
953
|
#
|
934
954
|
# @param filter [::String]
|
935
|
-
# 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
|
955
|
+
# 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.
|
936
956
|
# @param max_results [::Integer]
|
937
957
|
# 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`)
|
938
958
|
# @param node_group [::String]
|
@@ -1489,9 +1509,9 @@ module Google
|
|
1489
1509
|
# end
|
1490
1510
|
#
|
1491
1511
|
# @!attribute [rw] endpoint
|
1492
|
-
#
|
1493
|
-
#
|
1494
|
-
# @return [::String]
|
1512
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1513
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1514
|
+
# @return [::String,nil]
|
1495
1515
|
# @!attribute [rw] credentials
|
1496
1516
|
# Credentials to send with calls. You may provide any of the following types:
|
1497
1517
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1528,13 +1548,20 @@ module Google
|
|
1528
1548
|
# @!attribute [rw] quota_project
|
1529
1549
|
# A separate project against which to charge quota.
|
1530
1550
|
# @return [::String]
|
1551
|
+
# @!attribute [rw] universe_domain
|
1552
|
+
# The universe domain within which to make requests. This determines the
|
1553
|
+
# default endpoint URL. The default value of nil uses the environment
|
1554
|
+
# universe (usually the default "googleapis.com" universe).
|
1555
|
+
# @return [::String,nil]
|
1531
1556
|
#
|
1532
1557
|
class Configuration
|
1533
1558
|
extend ::Gapic::Config
|
1534
1559
|
|
1560
|
+
# @private
|
1561
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1535
1562
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
1536
1563
|
|
1537
|
-
config_attr :endpoint,
|
1564
|
+
config_attr :endpoint, nil, ::String, nil
|
1538
1565
|
config_attr :credentials, nil do |value|
|
1539
1566
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1540
1567
|
allowed.any? { |klass| klass === value }
|
@@ -1546,6 +1573,7 @@ module Google
|
|
1546
1573
|
config_attr :metadata, nil, ::Hash, nil
|
1547
1574
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1548
1575
|
config_attr :quota_project, nil, ::String, nil
|
1576
|
+
config_attr :universe_domain, nil, ::String, nil
|
1549
1577
|
|
1550
1578
|
# @private
|
1551
1579
|
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 add_nodes REST call
|
45
57
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# The NodeTemplates API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :node_templates_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
|
+
@node_templates_stub.universe_domain
|
132
|
+
end
|
133
|
+
|
122
134
|
##
|
123
135
|
# Create a new NodeTemplates 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
|
-
@node_templates_stub = ::Google::Cloud::Compute::V1::NodeTemplates::Rest::ServiceStub.new
|
180
|
+
@node_templates_stub = ::Google::Cloud::Compute::V1::NodeTemplates::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::NodeTemplatesScopedList>]
|
212
232
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -637,7 +657,7 @@ module Google
|
|
637
657
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
638
658
|
#
|
639
659
|
# @param filter [::String]
|
640
|
-
# 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
|
660
|
+
# 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.
|
641
661
|
# @param max_results [::Integer]
|
642
662
|
# 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`)
|
643
663
|
# @param order_by [::String]
|
@@ -907,9 +927,9 @@ module Google
|
|
907
927
|
# end
|
908
928
|
#
|
909
929
|
# @!attribute [rw] endpoint
|
910
|
-
#
|
911
|
-
#
|
912
|
-
# @return [::String]
|
930
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
931
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
932
|
+
# @return [::String,nil]
|
913
933
|
# @!attribute [rw] credentials
|
914
934
|
# Credentials to send with calls. You may provide any of the following types:
|
915
935
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -946,13 +966,20 @@ module Google
|
|
946
966
|
# @!attribute [rw] quota_project
|
947
967
|
# A separate project against which to charge quota.
|
948
968
|
# @return [::String]
|
969
|
+
# @!attribute [rw] universe_domain
|
970
|
+
# The universe domain within which to make requests. This determines the
|
971
|
+
# default endpoint URL. The default value of nil uses the environment
|
972
|
+
# universe (usually the default "googleapis.com" universe).
|
973
|
+
# @return [::String,nil]
|
949
974
|
#
|
950
975
|
class Configuration
|
951
976
|
extend ::Gapic::Config
|
952
977
|
|
978
|
+
# @private
|
979
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
953
980
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
954
981
|
|
955
|
-
config_attr :endpoint,
|
982
|
+
config_attr :endpoint, nil, ::String, nil
|
956
983
|
config_attr :credentials, nil do |value|
|
957
984
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
958
985
|
allowed.any? { |klass| klass === value }
|
@@ -964,6 +991,7 @@ module Google
|
|
964
991
|
config_attr :metadata, nil, ::Hash, nil
|
965
992
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
966
993
|
config_attr :quota_project, nil, ::String, nil
|
994
|
+
config_attr :universe_domain, nil, ::String, nil
|
967
995
|
|
968
996
|
# @private
|
969
997
|
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 NodeTypes API.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
37
|
+
|
35
38
|
# @private
|
36
39
|
attr_reader :node_types_stub
|
37
40
|
|
@@ -105,6 +108,15 @@ module Google
|
|
105
108
|
@config
|
106
109
|
end
|
107
110
|
|
111
|
+
##
|
112
|
+
# The effective universe domain
|
113
|
+
#
|
114
|
+
# @return [String]
|
115
|
+
#
|
116
|
+
def universe_domain
|
117
|
+
@node_types_stub.universe_domain
|
118
|
+
end
|
119
|
+
|
108
120
|
##
|
109
121
|
# Create a new NodeTypes REST client object.
|
110
122
|
#
|
@@ -132,8 +144,9 @@ module Google
|
|
132
144
|
credentials = @config.credentials
|
133
145
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
134
146
|
# but only if the default endpoint does not have a region prefix.
|
135
|
-
enable_self_signed_jwt = @config.endpoint
|
136
|
-
|
147
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
148
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
149
|
+
!@config.endpoint.split(".").first.include?("-"))
|
137
150
|
credentials ||= Credentials.default scope: @config.scope,
|
138
151
|
enable_self_signed_jwt: enable_self_signed_jwt
|
139
152
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -143,7 +156,12 @@ module Google
|
|
143
156
|
@quota_project_id = @config.quota_project
|
144
157
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
145
158
|
|
146
|
-
@node_types_stub = ::Google::Cloud::Compute::V1::NodeTypes::Rest::ServiceStub.new
|
159
|
+
@node_types_stub = ::Google::Cloud::Compute::V1::NodeTypes::Rest::ServiceStub.new(
|
160
|
+
endpoint: @config.endpoint,
|
161
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
162
|
+
universe_domain: @config.universe_domain,
|
163
|
+
credentials: credentials
|
164
|
+
)
|
147
165
|
end
|
148
166
|
|
149
167
|
# Service calls
|
@@ -161,13 +179,13 @@ module Google
|
|
161
179
|
# @param options [::Gapic::CallOptions, ::Hash]
|
162
180
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
163
181
|
#
|
164
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
182
|
+
# @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)
|
165
183
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
166
184
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
167
185
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
168
186
|
#
|
169
187
|
# @param filter [::String]
|
170
|
-
# 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
|
188
|
+
# 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.
|
171
189
|
# @param include_all_scopes [::Boolean]
|
172
190
|
# 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.
|
173
191
|
# @param max_results [::Integer]
|
@@ -180,6 +198,7 @@ module Google
|
|
180
198
|
# Project ID for this request.
|
181
199
|
# @param return_partial_success [::Boolean]
|
182
200
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
201
|
+
# @param service_project_number [::Integer]
|
183
202
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
184
203
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NodeTypesScopedList>]
|
185
204
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -340,7 +359,7 @@ module Google
|
|
340
359
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
341
360
|
#
|
342
361
|
# @param filter [::String]
|
343
|
-
# 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
|
362
|
+
# 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.
|
344
363
|
# @param max_results [::Integer]
|
345
364
|
# 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`)
|
346
365
|
# @param order_by [::String]
|
@@ -442,9 +461,9 @@ module Google
|
|
442
461
|
# end
|
443
462
|
#
|
444
463
|
# @!attribute [rw] endpoint
|
445
|
-
#
|
446
|
-
#
|
447
|
-
# @return [::String]
|
464
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
465
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
466
|
+
# @return [::String,nil]
|
448
467
|
# @!attribute [rw] credentials
|
449
468
|
# Credentials to send with calls. You may provide any of the following types:
|
450
469
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -481,13 +500,20 @@ module Google
|
|
481
500
|
# @!attribute [rw] quota_project
|
482
501
|
# A separate project against which to charge quota.
|
483
502
|
# @return [::String]
|
503
|
+
# @!attribute [rw] universe_domain
|
504
|
+
# The universe domain within which to make requests. This determines the
|
505
|
+
# default endpoint URL. The default value of nil uses the environment
|
506
|
+
# universe (usually the default "googleapis.com" universe).
|
507
|
+
# @return [::String,nil]
|
484
508
|
#
|
485
509
|
class Configuration
|
486
510
|
extend ::Gapic::Config
|
487
511
|
|
512
|
+
# @private
|
513
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
488
514
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
489
515
|
|
490
|
-
config_attr :endpoint,
|
516
|
+
config_attr :endpoint, nil, ::String, nil
|
491
517
|
config_attr :credentials, nil do |value|
|
492
518
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
493
519
|
allowed.any? { |klass| klass === value }
|
@@ -499,6 +525,7 @@ module Google
|
|
499
525
|
config_attr :metadata, nil, ::Hash, nil
|
500
526
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
501
527
|
config_attr :quota_project, nil, ::String, nil
|
528
|
+
config_attr :universe_domain, nil, ::String, nil
|
502
529
|
|
503
530
|
# @private
|
504
531
|
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
|
#
|