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 RegionDisks API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :region_disks_stub
|
38
41
|
|
@@ -134,6 +137,15 @@ module Google
|
|
134
137
|
@config
|
135
138
|
end
|
136
139
|
|
140
|
+
##
|
141
|
+
# The effective universe domain
|
142
|
+
#
|
143
|
+
# @return [String]
|
144
|
+
#
|
145
|
+
def universe_domain
|
146
|
+
@region_disks_stub.universe_domain
|
147
|
+
end
|
148
|
+
|
137
149
|
##
|
138
150
|
# Create a new RegionDisks REST client object.
|
139
151
|
#
|
@@ -161,8 +173,9 @@ module Google
|
|
161
173
|
credentials = @config.credentials
|
162
174
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
163
175
|
# but only if the default endpoint does not have a region prefix.
|
164
|
-
enable_self_signed_jwt = @config.endpoint
|
165
|
-
|
176
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
177
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
178
|
+
!@config.endpoint.split(".").first.include?("-"))
|
166
179
|
credentials ||= Credentials.default scope: @config.scope,
|
167
180
|
enable_self_signed_jwt: enable_self_signed_jwt
|
168
181
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -176,9 +189,15 @@ module Google
|
|
176
189
|
config.credentials = credentials
|
177
190
|
config.quota_project = @quota_project_id
|
178
191
|
config.endpoint = @config.endpoint
|
192
|
+
config.universe_domain = @config.universe_domain
|
179
193
|
end
|
180
194
|
|
181
|
-
@region_disks_stub = ::Google::Cloud::Compute::V1::RegionDisks::Rest::ServiceStub.new
|
195
|
+
@region_disks_stub = ::Google::Cloud::Compute::V1::RegionDisks::Rest::ServiceStub.new(
|
196
|
+
endpoint: @config.endpoint,
|
197
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
198
|
+
universe_domain: @config.universe_domain,
|
199
|
+
credentials: credentials
|
200
|
+
)
|
182
201
|
end
|
183
202
|
|
184
203
|
##
|
@@ -846,7 +865,7 @@ module Google
|
|
846
865
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
847
866
|
#
|
848
867
|
# @param filter [::String]
|
849
|
-
# 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
|
868
|
+
# 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.
|
850
869
|
# @param max_results [::Integer]
|
851
870
|
# 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`)
|
852
871
|
# @param order_by [::String]
|
@@ -1780,9 +1799,9 @@ module Google
|
|
1780
1799
|
# end
|
1781
1800
|
#
|
1782
1801
|
# @!attribute [rw] endpoint
|
1783
|
-
#
|
1784
|
-
#
|
1785
|
-
# @return [::String]
|
1802
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1803
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1804
|
+
# @return [::String,nil]
|
1786
1805
|
# @!attribute [rw] credentials
|
1787
1806
|
# Credentials to send with calls. You may provide any of the following types:
|
1788
1807
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1819,13 +1838,20 @@ module Google
|
|
1819
1838
|
# @!attribute [rw] quota_project
|
1820
1839
|
# A separate project against which to charge quota.
|
1821
1840
|
# @return [::String]
|
1841
|
+
# @!attribute [rw] universe_domain
|
1842
|
+
# The universe domain within which to make requests. This determines the
|
1843
|
+
# default endpoint URL. The default value of nil uses the environment
|
1844
|
+
# universe (usually the default "googleapis.com" universe).
|
1845
|
+
# @return [::String,nil]
|
1822
1846
|
#
|
1823
1847
|
class Configuration
|
1824
1848
|
extend ::Gapic::Config
|
1825
1849
|
|
1850
|
+
# @private
|
1851
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1826
1852
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
1827
1853
|
|
1828
|
-
config_attr :endpoint,
|
1854
|
+
config_attr :endpoint, nil, ::String, nil
|
1829
1855
|
config_attr :credentials, nil do |value|
|
1830
1856
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1831
1857
|
allowed.any? { |klass| klass === value }
|
@@ -1837,6 +1863,7 @@ module Google
|
|
1837
1863
|
config_attr :metadata, nil, ::Hash, nil
|
1838
1864
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1839
1865
|
config_attr :quota_project, nil, ::String, nil
|
1866
|
+
config_attr :universe_domain, nil, ::String, nil
|
1840
1867
|
|
1841
1868
|
# @private
|
1842
1869
|
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_resource_policies REST call
|
45
57
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# The RegionHealthCheckServices API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :region_health_check_services_stub
|
38
41
|
|
@@ -107,6 +110,15 @@ module Google
|
|
107
110
|
@config
|
108
111
|
end
|
109
112
|
|
113
|
+
##
|
114
|
+
# The effective universe domain
|
115
|
+
#
|
116
|
+
# @return [String]
|
117
|
+
#
|
118
|
+
def universe_domain
|
119
|
+
@region_health_check_services_stub.universe_domain
|
120
|
+
end
|
121
|
+
|
110
122
|
##
|
111
123
|
# Create a new RegionHealthCheckServices REST client object.
|
112
124
|
#
|
@@ -134,8 +146,9 @@ module Google
|
|
134
146
|
credentials = @config.credentials
|
135
147
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
136
148
|
# but only if the default endpoint does not have a region prefix.
|
137
|
-
enable_self_signed_jwt = @config.endpoint
|
138
|
-
|
149
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
150
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
151
|
+
!@config.endpoint.split(".").first.include?("-"))
|
139
152
|
credentials ||= Credentials.default scope: @config.scope,
|
140
153
|
enable_self_signed_jwt: enable_self_signed_jwt
|
141
154
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -149,9 +162,15 @@ module Google
|
|
149
162
|
config.credentials = credentials
|
150
163
|
config.quota_project = @quota_project_id
|
151
164
|
config.endpoint = @config.endpoint
|
165
|
+
config.universe_domain = @config.universe_domain
|
152
166
|
end
|
153
167
|
|
154
|
-
@region_health_check_services_stub = ::Google::Cloud::Compute::V1::RegionHealthCheckServices::Rest::ServiceStub.new
|
168
|
+
@region_health_check_services_stub = ::Google::Cloud::Compute::V1::RegionHealthCheckServices::Rest::ServiceStub.new(
|
169
|
+
endpoint: @config.endpoint,
|
170
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
171
|
+
universe_domain: @config.universe_domain,
|
172
|
+
credentials: credentials
|
173
|
+
)
|
155
174
|
end
|
156
175
|
|
157
176
|
##
|
@@ -450,7 +469,7 @@ module Google
|
|
450
469
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
451
470
|
#
|
452
471
|
# @param filter [::String]
|
453
|
-
# 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
|
472
|
+
# 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.
|
454
473
|
# @param max_results [::Integer]
|
455
474
|
# 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`)
|
456
475
|
# @param order_by [::String]
|
@@ -647,9 +666,9 @@ module Google
|
|
647
666
|
# end
|
648
667
|
#
|
649
668
|
# @!attribute [rw] endpoint
|
650
|
-
#
|
651
|
-
#
|
652
|
-
# @return [::String]
|
669
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
670
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
671
|
+
# @return [::String,nil]
|
653
672
|
# @!attribute [rw] credentials
|
654
673
|
# Credentials to send with calls. You may provide any of the following types:
|
655
674
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -686,13 +705,20 @@ module Google
|
|
686
705
|
# @!attribute [rw] quota_project
|
687
706
|
# A separate project against which to charge quota.
|
688
707
|
# @return [::String]
|
708
|
+
# @!attribute [rw] universe_domain
|
709
|
+
# The universe domain within which to make requests. This determines the
|
710
|
+
# default endpoint URL. The default value of nil uses the environment
|
711
|
+
# universe (usually the default "googleapis.com" universe).
|
712
|
+
# @return [::String,nil]
|
689
713
|
#
|
690
714
|
class Configuration
|
691
715
|
extend ::Gapic::Config
|
692
716
|
|
717
|
+
# @private
|
718
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
693
719
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
694
720
|
|
695
|
-
config_attr :endpoint,
|
721
|
+
config_attr :endpoint, nil, ::String, nil
|
696
722
|
config_attr :credentials, nil do |value|
|
697
723
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
698
724
|
allowed.any? { |klass| klass === value }
|
@@ -704,6 +730,7 @@ module Google
|
|
704
730
|
config_attr :metadata, nil, ::Hash, nil
|
705
731
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
706
732
|
config_attr :quota_project, nil, ::String, nil
|
733
|
+
config_attr :universe_domain, nil, ::String, nil
|
707
734
|
|
708
735
|
# @private
|
709
736
|
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
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# The RegionHealthChecks API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :region_health_checks_stub
|
38
41
|
|
@@ -109,6 +112,15 @@ module Google
|
|
109
112
|
@config
|
110
113
|
end
|
111
114
|
|
115
|
+
##
|
116
|
+
# The effective universe domain
|
117
|
+
#
|
118
|
+
# @return [String]
|
119
|
+
#
|
120
|
+
def universe_domain
|
121
|
+
@region_health_checks_stub.universe_domain
|
122
|
+
end
|
123
|
+
|
112
124
|
##
|
113
125
|
# Create a new RegionHealthChecks REST client object.
|
114
126
|
#
|
@@ -136,8 +148,9 @@ module Google
|
|
136
148
|
credentials = @config.credentials
|
137
149
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
138
150
|
# but only if the default endpoint does not have a region prefix.
|
139
|
-
enable_self_signed_jwt = @config.endpoint
|
140
|
-
|
151
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
152
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
153
|
+
!@config.endpoint.split(".").first.include?("-"))
|
141
154
|
credentials ||= Credentials.default scope: @config.scope,
|
142
155
|
enable_self_signed_jwt: enable_self_signed_jwt
|
143
156
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -151,9 +164,15 @@ module Google
|
|
151
164
|
config.credentials = credentials
|
152
165
|
config.quota_project = @quota_project_id
|
153
166
|
config.endpoint = @config.endpoint
|
167
|
+
config.universe_domain = @config.universe_domain
|
154
168
|
end
|
155
169
|
|
156
|
-
@region_health_checks_stub = ::Google::Cloud::Compute::V1::RegionHealthChecks::Rest::ServiceStub.new
|
170
|
+
@region_health_checks_stub = ::Google::Cloud::Compute::V1::RegionHealthChecks::Rest::ServiceStub.new(
|
171
|
+
endpoint: @config.endpoint,
|
172
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
173
|
+
universe_domain: @config.universe_domain,
|
174
|
+
credentials: credentials
|
175
|
+
)
|
157
176
|
end
|
158
177
|
|
159
178
|
##
|
@@ -452,7 +471,7 @@ module Google
|
|
452
471
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
453
472
|
#
|
454
473
|
# @param filter [::String]
|
455
|
-
# 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
|
474
|
+
# 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.
|
456
475
|
# @param max_results [::Integer]
|
457
476
|
# 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`)
|
458
477
|
# @param order_by [::String]
|
@@ -744,9 +763,9 @@ module Google
|
|
744
763
|
# end
|
745
764
|
#
|
746
765
|
# @!attribute [rw] endpoint
|
747
|
-
#
|
748
|
-
#
|
749
|
-
# @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]
|
750
769
|
# @!attribute [rw] credentials
|
751
770
|
# Credentials to send with calls. You may provide any of the following types:
|
752
771
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -783,13 +802,20 @@ module Google
|
|
783
802
|
# @!attribute [rw] quota_project
|
784
803
|
# A separate project against which to charge quota.
|
785
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]
|
786
810
|
#
|
787
811
|
class Configuration
|
788
812
|
extend ::Gapic::Config
|
789
813
|
|
814
|
+
# @private
|
815
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
790
816
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
791
817
|
|
792
|
-
config_attr :endpoint,
|
818
|
+
config_attr :endpoint, nil, ::String, nil
|
793
819
|
config_attr :credentials, nil do |value|
|
794
820
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
795
821
|
allowed.any? { |klass| klass === value }
|
@@ -801,6 +827,7 @@ module Google
|
|
801
827
|
config_attr :metadata, nil, ::Hash, nil
|
802
828
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
803
829
|
config_attr :quota_project, nil, ::String, nil
|
830
|
+
config_attr :universe_domain, nil, ::String, nil
|
804
831
|
|
805
832
|
# @private
|
806
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 delete REST call
|
45
57
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# The RegionInstanceGroupManagers API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :region_instance_group_managers_stub
|
38
41
|
|
@@ -138,6 +141,15 @@ module Google
|
|
138
141
|
@config
|
139
142
|
end
|
140
143
|
|
144
|
+
##
|
145
|
+
# The effective universe domain
|
146
|
+
#
|
147
|
+
# @return [String]
|
148
|
+
#
|
149
|
+
def universe_domain
|
150
|
+
@region_instance_group_managers_stub.universe_domain
|
151
|
+
end
|
152
|
+
|
141
153
|
##
|
142
154
|
# Create a new RegionInstanceGroupManagers REST client object.
|
143
155
|
#
|
@@ -165,8 +177,9 @@ module Google
|
|
165
177
|
credentials = @config.credentials
|
166
178
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
167
179
|
# but only if the default endpoint does not have a region prefix.
|
168
|
-
enable_self_signed_jwt = @config.endpoint
|
169
|
-
|
180
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
181
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
182
|
+
!@config.endpoint.split(".").first.include?("-"))
|
170
183
|
credentials ||= Credentials.default scope: @config.scope,
|
171
184
|
enable_self_signed_jwt: enable_self_signed_jwt
|
172
185
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -180,9 +193,15 @@ module Google
|
|
180
193
|
config.credentials = credentials
|
181
194
|
config.quota_project = @quota_project_id
|
182
195
|
config.endpoint = @config.endpoint
|
196
|
+
config.universe_domain = @config.universe_domain
|
183
197
|
end
|
184
198
|
|
185
|
-
@region_instance_group_managers_stub = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::ServiceStub.new
|
199
|
+
@region_instance_group_managers_stub = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::ServiceStub.new(
|
200
|
+
endpoint: @config.endpoint,
|
201
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
202
|
+
universe_domain: @config.universe_domain,
|
203
|
+
credentials: credentials
|
204
|
+
)
|
186
205
|
end
|
187
206
|
|
188
207
|
##
|
@@ -952,7 +971,7 @@ module Google
|
|
952
971
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
953
972
|
#
|
954
973
|
# @param filter [::String]
|
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. 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
|
974
|
+
# 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.
|
956
975
|
# @param max_results [::Integer]
|
957
976
|
# 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`)
|
958
977
|
# @param order_by [::String]
|
@@ -1043,7 +1062,7 @@ module Google
|
|
1043
1062
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1044
1063
|
#
|
1045
1064
|
# @param filter [::String]
|
1046
|
-
# 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
|
1065
|
+
# 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.
|
1047
1066
|
# @param instance_group_manager [::String]
|
1048
1067
|
# The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]\\{0,61}[a-z0-9])?)|1-9\\{0,19}.
|
1049
1068
|
# @param max_results [::Integer]
|
@@ -1136,7 +1155,7 @@ module Google
|
|
1136
1155
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1137
1156
|
#
|
1138
1157
|
# @param filter [::String]
|
1139
|
-
# 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
|
1158
|
+
# 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.
|
1140
1159
|
# @param instance_group_manager [::String]
|
1141
1160
|
# The name of the managed instance group.
|
1142
1161
|
# @param max_results [::Integer]
|
@@ -1229,7 +1248,7 @@ module Google
|
|
1229
1248
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1230
1249
|
#
|
1231
1250
|
# @param filter [::String]
|
1232
|
-
# 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
|
1251
|
+
# 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.
|
1233
1252
|
# @param instance_group_manager [::String]
|
1234
1253
|
# The name of the managed instance group. It should conform to RFC1035.
|
1235
1254
|
# @param max_results [::Integer]
|
@@ -1998,9 +2017,9 @@ module Google
|
|
1998
2017
|
# end
|
1999
2018
|
#
|
2000
2019
|
# @!attribute [rw] endpoint
|
2001
|
-
#
|
2002
|
-
#
|
2003
|
-
# @return [::String]
|
2020
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
2021
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
2022
|
+
# @return [::String,nil]
|
2004
2023
|
# @!attribute [rw] credentials
|
2005
2024
|
# Credentials to send with calls. You may provide any of the following types:
|
2006
2025
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -2037,13 +2056,20 @@ module Google
|
|
2037
2056
|
# @!attribute [rw] quota_project
|
2038
2057
|
# A separate project against which to charge quota.
|
2039
2058
|
# @return [::String]
|
2059
|
+
# @!attribute [rw] universe_domain
|
2060
|
+
# The universe domain within which to make requests. This determines the
|
2061
|
+
# default endpoint URL. The default value of nil uses the environment
|
2062
|
+
# universe (usually the default "googleapis.com" universe).
|
2063
|
+
# @return [::String,nil]
|
2040
2064
|
#
|
2041
2065
|
class Configuration
|
2042
2066
|
extend ::Gapic::Config
|
2043
2067
|
|
2068
|
+
# @private
|
2069
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
2044
2070
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
2045
2071
|
|
2046
|
-
config_attr :endpoint,
|
2072
|
+
config_attr :endpoint, nil, ::String, nil
|
2047
2073
|
config_attr :credentials, nil do |value|
|
2048
2074
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2049
2075
|
allowed.any? { |klass| klass === value }
|
@@ -2055,6 +2081,7 @@ module Google
|
|
2055
2081
|
config_attr :metadata, nil, ::Hash, nil
|
2056
2082
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2057
2083
|
config_attr :quota_project, nil, ::String, nil
|
2084
|
+
config_attr :universe_domain, nil, ::String, nil
|
2058
2085
|
|
2059
2086
|
# @private
|
2060
2087
|
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 abandon_instances REST call
|
45
57
|
#
|