google-cloud-compute-v1 0.5.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +4 -4
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +59 -14
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +158 -19
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +169 -23
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/compute_pb.rb +534 -2
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +93 -24
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +98 -31
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +54 -13
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +70 -17
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +64 -16
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +47 -13
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/images/rest/client.rb +64 -16
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +172 -47
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +71 -18
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +521 -96
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +91 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/machine_images/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +804 -0
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +363 -0
- data/lib/google/cloud/compute/v1/machine_images/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/machine_images.rb +44 -0
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +60 -15
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +85 -23
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +82 -21
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +107 -31
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +47 -13
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +51 -14
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +116 -5
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +48 -0
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +92 -23
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +47 -10
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +171 -46
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +26 -5
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +36 -7
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +38 -9
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +38 -9
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +47 -10
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +62 -17
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +3 -3
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +138 -11
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +48 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +60 -15
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +75 -20
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +51 -14
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +116 -7
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +37 -10
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +45 -11
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +71 -18
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +47 -13
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +56 -15
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +86 -24
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +92 -23
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +74 -19
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +54 -13
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +65 -17
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1.rb +3 -0
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/compute/v1/compute.rb +1647 -330
- metadata +14 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ab8a933db4ec8c992ffa26d79d0f025033d1b1538dff1fabdc79942aa11cb5f
|
4
|
+
data.tar.gz: 6c2a400cd0a754f11deaff892e978f53b4f0528e54689bb1e719c222b7ae2486
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1d98c0d6c79d6aa9535f2219b0e3ac8ade4e948d82f0018c6e25597fbe243cd4bda5a4c412b1d1059a5f0a5f9be1c661a6f882e891ea180b475ebe7eab2b491
|
7
|
+
data.tar.gz: e7870de19a01f09f8b8b51d46e6e354b2c94d1e797ce75fb2b11238f4eba21dc1ce3dc398b4b8c6f9d94f1b2b51bf17445f1a18146cf4238f1e9dac922409d53
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# Ruby Client for the Google Cloud Compute V1
|
1
|
+
# Ruby Client for the Google Cloud Compute V1 API
|
2
2
|
|
3
|
-
API Client library for the Google Cloud Compute V1
|
3
|
+
API Client library for the Google Cloud Compute V1 API
|
4
4
|
|
5
|
-
google-cloud-compute-v1 is the official client library for the Google Cloud Compute V1 API.
|
5
|
+
google-cloud-compute-v1 is the official client library for the Google Cloud Compute V1 API.
|
6
6
|
|
7
7
|
https://github.com/googleapis/google-cloud-ruby
|
8
8
|
|
@@ -31,7 +31,7 @@ request = ::Google::Cloud::Compute::V1::AggregatedListAcceleratorTypesRequest.ne
|
|
31
31
|
response = client.aggregated_list request
|
32
32
|
```
|
33
33
|
|
34
|
-
View the [Client Library Documentation](https://
|
34
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest)
|
35
35
|
for class and method documentation.
|
36
36
|
|
37
37
|
See also the [Product Documentation](https://cloud.google.com/compute/)
|
@@ -163,7 +163,7 @@ module Google
|
|
163
163
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
164
164
|
#
|
165
165
|
# @param filter [::String]
|
166
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
166
|
+
# A filter expression that filters resources listed in the response. The 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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) ```
|
167
167
|
# @param include_all_scopes [::Boolean]
|
168
168
|
# 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.
|
169
169
|
# @param max_results [::Integer]
|
@@ -302,7 +302,7 @@ module Google
|
|
302
302
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
303
303
|
#
|
304
304
|
# @param filter [::String]
|
305
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
305
|
+
# A filter expression that filters resources listed in the response. The 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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) ```
|
306
306
|
# @param max_results [::Integer]
|
307
307
|
# 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`)
|
308
308
|
# @param order_by [::String]
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/addresses/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -139,9 +140,21 @@ module Google
|
|
139
140
|
credentials = Credentials.new credentials, scope: @config.scope
|
140
141
|
end
|
141
142
|
|
143
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
144
|
+
config.credentials = credentials
|
145
|
+
config.endpoint = @config.endpoint
|
146
|
+
end
|
147
|
+
|
142
148
|
@addresses_stub = ::Google::Cloud::Compute::V1::Addresses::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
143
149
|
end
|
144
150
|
|
151
|
+
##
|
152
|
+
# Get the associated client for long-running operations via RegionOperations.
|
153
|
+
#
|
154
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
155
|
+
#
|
156
|
+
attr_reader :region_operations
|
157
|
+
|
145
158
|
# Service calls
|
146
159
|
|
147
160
|
##
|
@@ -165,7 +178,7 @@ module Google
|
|
165
178
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
166
179
|
#
|
167
180
|
# @param filter [::String]
|
168
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
181
|
+
# A filter expression that filters resources listed in the response. The 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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) ```
|
169
182
|
# @param include_all_scopes [::Boolean]
|
170
183
|
# 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.
|
171
184
|
# @param max_results [::Integer]
|
@@ -247,10 +260,10 @@ module Google
|
|
247
260
|
# @param request_id [::String]
|
248
261
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
249
262
|
# @yield [result, response] Access the result along with the Faraday response object
|
250
|
-
# @yieldparam result [::Gapic::
|
263
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
251
264
|
# @yieldparam response [::Faraday::Response]
|
252
265
|
#
|
253
|
-
# @return [::Gapic::
|
266
|
+
# @return [::Gapic::GenericLRO::Operation]
|
254
267
|
#
|
255
268
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
256
269
|
def delete request, options = nil
|
@@ -277,7 +290,15 @@ module Google
|
|
277
290
|
metadata: @config.metadata
|
278
291
|
|
279
292
|
@addresses_stub.delete request, options do |result, response|
|
280
|
-
result = ::
|
293
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
294
|
+
operation: result,
|
295
|
+
client: region_operations,
|
296
|
+
request_values: {
|
297
|
+
"project" => request.project,
|
298
|
+
"region" => request.region
|
299
|
+
},
|
300
|
+
options: options
|
301
|
+
)
|
281
302
|
yield result, response if block_given?
|
282
303
|
return result
|
283
304
|
end
|
@@ -380,10 +401,10 @@ module Google
|
|
380
401
|
# @param request_id [::String]
|
381
402
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
382
403
|
# @yield [result, response] Access the result along with the Faraday response object
|
383
|
-
# @yieldparam result [::Gapic::
|
404
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
384
405
|
# @yieldparam response [::Faraday::Response]
|
385
406
|
#
|
386
|
-
# @return [::Gapic::
|
407
|
+
# @return [::Gapic::GenericLRO::Operation]
|
387
408
|
#
|
388
409
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
389
410
|
def insert request, options = nil
|
@@ -410,7 +431,15 @@ module Google
|
|
410
431
|
metadata: @config.metadata
|
411
432
|
|
412
433
|
@addresses_stub.insert request, options do |result, response|
|
413
|
-
result = ::
|
434
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
435
|
+
operation: result,
|
436
|
+
client: region_operations,
|
437
|
+
request_values: {
|
438
|
+
"project" => request.project,
|
439
|
+
"region" => request.region
|
440
|
+
},
|
441
|
+
options: options
|
442
|
+
)
|
414
443
|
yield result, response if block_given?
|
415
444
|
return result
|
416
445
|
end
|
@@ -440,7 +469,7 @@ module Google
|
|
440
469
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
441
470
|
#
|
442
471
|
# @param filter [::String]
|
443
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
472
|
+
# A filter expression that filters resources listed in the response. The 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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) ```
|
444
473
|
# @param max_results [::Integer]
|
445
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`)
|
446
475
|
# @param order_by [::String]
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/autoscalers/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/zone_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -143,9 +144,21 @@ module Google
|
|
143
144
|
credentials = Credentials.new credentials, scope: @config.scope
|
144
145
|
end
|
145
146
|
|
147
|
+
@zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
|
148
|
+
config.credentials = credentials
|
149
|
+
config.endpoint = @config.endpoint
|
150
|
+
end
|
151
|
+
|
146
152
|
@autoscalers_stub = ::Google::Cloud::Compute::V1::Autoscalers::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
147
153
|
end
|
148
154
|
|
155
|
+
##
|
156
|
+
# Get the associated client for long-running operations via ZoneOperations.
|
157
|
+
#
|
158
|
+
# @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
|
159
|
+
#
|
160
|
+
attr_reader :zone_operations
|
161
|
+
|
149
162
|
# Service calls
|
150
163
|
|
151
164
|
##
|
@@ -169,7 +182,7 @@ module Google
|
|
169
182
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
170
183
|
#
|
171
184
|
# @param filter [::String]
|
172
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
185
|
+
# A filter expression that filters resources listed in the response. The 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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) ```
|
173
186
|
# @param include_all_scopes [::Boolean]
|
174
187
|
# 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.
|
175
188
|
# @param max_results [::Integer]
|
@@ -251,10 +264,10 @@ module Google
|
|
251
264
|
# @param zone [::String]
|
252
265
|
# Name of the zone for this request.
|
253
266
|
# @yield [result, response] Access the result along with the Faraday response object
|
254
|
-
# @yieldparam result [::Gapic::
|
267
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
255
268
|
# @yieldparam response [::Faraday::Response]
|
256
269
|
#
|
257
|
-
# @return [::Gapic::
|
270
|
+
# @return [::Gapic::GenericLRO::Operation]
|
258
271
|
#
|
259
272
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
260
273
|
def delete request, options = nil
|
@@ -281,7 +294,15 @@ module Google
|
|
281
294
|
metadata: @config.metadata
|
282
295
|
|
283
296
|
@autoscalers_stub.delete request, options do |result, response|
|
284
|
-
result = ::
|
297
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
298
|
+
operation: result,
|
299
|
+
client: zone_operations,
|
300
|
+
request_values: {
|
301
|
+
"project" => request.project,
|
302
|
+
"zone" => request.zone
|
303
|
+
},
|
304
|
+
options: options
|
305
|
+
)
|
285
306
|
yield result, response if block_given?
|
286
307
|
return result
|
287
308
|
end
|
@@ -384,10 +405,10 @@ module Google
|
|
384
405
|
# @param zone [::String]
|
385
406
|
# Name of the zone for this request.
|
386
407
|
# @yield [result, response] Access the result along with the Faraday response object
|
387
|
-
# @yieldparam result [::Gapic::
|
408
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
388
409
|
# @yieldparam response [::Faraday::Response]
|
389
410
|
#
|
390
|
-
# @return [::Gapic::
|
411
|
+
# @return [::Gapic::GenericLRO::Operation]
|
391
412
|
#
|
392
413
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
393
414
|
def insert request, options = nil
|
@@ -414,7 +435,15 @@ module Google
|
|
414
435
|
metadata: @config.metadata
|
415
436
|
|
416
437
|
@autoscalers_stub.insert request, options do |result, response|
|
417
|
-
result = ::
|
438
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
439
|
+
operation: result,
|
440
|
+
client: zone_operations,
|
441
|
+
request_values: {
|
442
|
+
"project" => request.project,
|
443
|
+
"zone" => request.zone
|
444
|
+
},
|
445
|
+
options: options
|
446
|
+
)
|
418
447
|
yield result, response if block_given?
|
419
448
|
return result
|
420
449
|
end
|
@@ -444,7 +473,7 @@ module Google
|
|
444
473
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
445
474
|
#
|
446
475
|
# @param filter [::String]
|
447
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
476
|
+
# A filter expression that filters resources listed in the response. The 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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) ```
|
448
477
|
# @param max_results [::Integer]
|
449
478
|
# 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`)
|
450
479
|
# @param order_by [::String]
|
@@ -528,10 +557,10 @@ module Google
|
|
528
557
|
# @param zone [::String]
|
529
558
|
# Name of the zone for this request.
|
530
559
|
# @yield [result, response] Access the result along with the Faraday response object
|
531
|
-
# @yieldparam result [::Gapic::
|
560
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
532
561
|
# @yieldparam response [::Faraday::Response]
|
533
562
|
#
|
534
|
-
# @return [::Gapic::
|
563
|
+
# @return [::Gapic::GenericLRO::Operation]
|
535
564
|
#
|
536
565
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
537
566
|
def patch request, options = nil
|
@@ -558,7 +587,15 @@ module Google
|
|
558
587
|
metadata: @config.metadata
|
559
588
|
|
560
589
|
@autoscalers_stub.patch request, options do |result, response|
|
561
|
-
result = ::
|
590
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
591
|
+
operation: result,
|
592
|
+
client: zone_operations,
|
593
|
+
request_values: {
|
594
|
+
"project" => request.project,
|
595
|
+
"zone" => request.zone
|
596
|
+
},
|
597
|
+
options: options
|
598
|
+
)
|
562
599
|
yield result, response if block_given?
|
563
600
|
return result
|
564
601
|
end
|
@@ -598,10 +635,10 @@ module Google
|
|
598
635
|
# @param zone [::String]
|
599
636
|
# Name of the zone for this request.
|
600
637
|
# @yield [result, response] Access the result along with the Faraday response object
|
601
|
-
# @yieldparam result [::Gapic::
|
638
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
602
639
|
# @yieldparam response [::Faraday::Response]
|
603
640
|
#
|
604
|
-
# @return [::Gapic::
|
641
|
+
# @return [::Gapic::GenericLRO::Operation]
|
605
642
|
#
|
606
643
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
607
644
|
def update request, options = nil
|
@@ -628,7 +665,15 @@ module Google
|
|
628
665
|
metadata: @config.metadata
|
629
666
|
|
630
667
|
@autoscalers_stub.update request, options do |result, response|
|
631
|
-
result = ::
|
668
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
669
|
+
operation: result,
|
670
|
+
client: zone_operations,
|
671
|
+
request_values: {
|
672
|
+
"project" => request.project,
|
673
|
+
"zone" => request.zone
|
674
|
+
},
|
675
|
+
options: options
|
676
|
+
)
|
632
677
|
yield result, response if block_given?
|
633
678
|
return result
|
634
679
|
end
|