google-cloud-compute-v1 1.0.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- 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 +1117 -9
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +94 -25
- 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 +1 -1
- 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 +524 -97
- 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_edge_security_services/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services.rb +44 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +60 -15
- data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +778 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies.rb +44 -0
- 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_network_firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +823 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +44 -0
- 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_security_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +276 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_security_policies.rb +44 -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 +149 -17
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +46 -0
- 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 +161 -20
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +50 -0
- 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 +7 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +3236 -422
- metadata +32 -3
@@ -766,6 +766,7 @@ module Google
|
|
766
766
|
query_string_params = {}
|
767
767
|
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
768
768
|
query_string_params["sourceInstanceTemplate"] = request_pb.source_instance_template.to_s if request_pb.has_source_instance_template?
|
769
|
+
query_string_params["sourceMachineImage"] = request_pb.source_machine_image.to_s if request_pb.has_source_machine_image?
|
769
770
|
|
770
771
|
[uri, body, query_string_params]
|
771
772
|
end
|
@@ -959,6 +960,51 @@ module Google
|
|
959
960
|
[uri, body, query_string_params]
|
960
961
|
end
|
961
962
|
|
963
|
+
##
|
964
|
+
# Baseline implementation for the resume REST call
|
965
|
+
#
|
966
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest]
|
967
|
+
# A request object representing the call parameters. Required.
|
968
|
+
# @param options [::Gapic::CallOptions]
|
969
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
970
|
+
#
|
971
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
972
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
973
|
+
# @yieldparam response [::Faraday::Response]
|
974
|
+
#
|
975
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
976
|
+
# A result object deserialized from the server's reply
|
977
|
+
def resume request_pb, options = nil
|
978
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
979
|
+
|
980
|
+
uri, _body, query_string_params = transcode_resume_request request_pb
|
981
|
+
response = @client_stub.make_post_request(
|
982
|
+
uri: uri,
|
983
|
+
params: query_string_params,
|
984
|
+
options: options
|
985
|
+
)
|
986
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
987
|
+
|
988
|
+
yield result, response if block_given?
|
989
|
+
result
|
990
|
+
end
|
991
|
+
|
992
|
+
##
|
993
|
+
# GRPC transcoding helper method for the resume REST call
|
994
|
+
#
|
995
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest]
|
996
|
+
# A request object representing the call parameters. Required.
|
997
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
998
|
+
# Uri, Body, Query string parameters
|
999
|
+
def transcode_resume_request request_pb
|
1000
|
+
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/resume"
|
1001
|
+
body = nil
|
1002
|
+
query_string_params = {}
|
1003
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
1004
|
+
|
1005
|
+
[uri, body, query_string_params]
|
1006
|
+
end
|
1007
|
+
|
962
1008
|
##
|
963
1009
|
# Baseline implementation for the send_diagnostic_interrupt REST call
|
964
1010
|
#
|
@@ -1732,6 +1778,51 @@ module Google
|
|
1732
1778
|
[uri, body, query_string_params]
|
1733
1779
|
end
|
1734
1780
|
|
1781
|
+
##
|
1782
|
+
# Baseline implementation for the suspend REST call
|
1783
|
+
#
|
1784
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest]
|
1785
|
+
# A request object representing the call parameters. Required.
|
1786
|
+
# @param options [::Gapic::CallOptions]
|
1787
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1788
|
+
#
|
1789
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1790
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
1791
|
+
# @yieldparam response [::Faraday::Response]
|
1792
|
+
#
|
1793
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
1794
|
+
# A result object deserialized from the server's reply
|
1795
|
+
def suspend request_pb, options = nil
|
1796
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1797
|
+
|
1798
|
+
uri, _body, query_string_params = transcode_suspend_request request_pb
|
1799
|
+
response = @client_stub.make_post_request(
|
1800
|
+
uri: uri,
|
1801
|
+
params: query_string_params,
|
1802
|
+
options: options
|
1803
|
+
)
|
1804
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
1805
|
+
|
1806
|
+
yield result, response if block_given?
|
1807
|
+
result
|
1808
|
+
end
|
1809
|
+
|
1810
|
+
##
|
1811
|
+
# GRPC transcoding helper method for the suspend REST call
|
1812
|
+
#
|
1813
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest]
|
1814
|
+
# A request object representing the call parameters. Required.
|
1815
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1816
|
+
# Uri, Body, Query string parameters
|
1817
|
+
def transcode_suspend_request request_pb
|
1818
|
+
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/suspend"
|
1819
|
+
body = nil
|
1820
|
+
query_string_params = {}
|
1821
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
1822
|
+
|
1823
|
+
[uri, body, query_string_params]
|
1824
|
+
end
|
1825
|
+
|
1735
1826
|
##
|
1736
1827
|
# Baseline implementation for the test_iam_permissions REST call
|
1737
1828
|
#
|
@@ -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/interconnect_attachments/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -141,9 +142,21 @@ module Google
|
|
141
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
142
143
|
end
|
143
144
|
|
145
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
146
|
+
config.credentials = credentials
|
147
|
+
config.endpoint = @config.endpoint
|
148
|
+
end
|
149
|
+
|
144
150
|
@interconnect_attachments_stub = ::Google::Cloud::Compute::V1::InterconnectAttachments::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
145
151
|
end
|
146
152
|
|
153
|
+
##
|
154
|
+
# Get the associated client for long-running operations via RegionOperations.
|
155
|
+
#
|
156
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
157
|
+
#
|
158
|
+
attr_reader :region_operations
|
159
|
+
|
147
160
|
# Service calls
|
148
161
|
|
149
162
|
##
|
@@ -167,7 +180,7 @@ module Google
|
|
167
180
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
168
181
|
#
|
169
182
|
# @param filter [::String]
|
170
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
183
|
+
# 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) ```
|
171
184
|
# @param include_all_scopes [::Boolean]
|
172
185
|
# Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
|
173
186
|
# @param max_results [::Integer]
|
@@ -249,10 +262,10 @@ module Google
|
|
249
262
|
# @param request_id [::String]
|
250
263
|
# 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).
|
251
264
|
# @yield [result, response] Access the result along with the Faraday response object
|
252
|
-
# @yieldparam result [::Gapic::
|
265
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
253
266
|
# @yieldparam response [::Faraday::Response]
|
254
267
|
#
|
255
|
-
# @return [::Gapic::
|
268
|
+
# @return [::Gapic::GenericLRO::Operation]
|
256
269
|
#
|
257
270
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
258
271
|
def delete request, options = nil
|
@@ -279,7 +292,15 @@ module Google
|
|
279
292
|
metadata: @config.metadata
|
280
293
|
|
281
294
|
@interconnect_attachments_stub.delete request, options do |result, response|
|
282
|
-
result = ::
|
295
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
296
|
+
operation: result,
|
297
|
+
client: region_operations,
|
298
|
+
request_values: {
|
299
|
+
"project" => request.project,
|
300
|
+
"region" => request.region
|
301
|
+
},
|
302
|
+
options: options
|
303
|
+
)
|
283
304
|
yield result, response if block_given?
|
284
305
|
return result
|
285
306
|
end
|
@@ -384,10 +405,10 @@ module Google
|
|
384
405
|
# @param validate_only [::Boolean]
|
385
406
|
# If true, the request will not be committed.
|
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
|
@interconnect_attachments_stub.insert request, options do |result, response|
|
417
|
-
result = ::
|
438
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
439
|
+
operation: result,
|
440
|
+
client: region_operations,
|
441
|
+
request_values: {
|
442
|
+
"project" => request.project,
|
443
|
+
"region" => request.region
|
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 request_id [::String]
|
529
558
|
# 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).
|
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
|
@interconnect_attachments_stub.patch request, options do |result, response|
|
561
|
-
result = ::
|
590
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
591
|
+
operation: result,
|
592
|
+
client: region_operations,
|
593
|
+
request_values: {
|
594
|
+
"project" => request.project,
|
595
|
+
"region" => request.region
|
596
|
+
},
|
597
|
+
options: options
|
598
|
+
)
|
562
599
|
yield result, response if block_given?
|
563
600
|
return result
|
564
601
|
end
|
@@ -219,7 +219,7 @@ module Google
|
|
219
219
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
220
220
|
#
|
221
221
|
# @param filter [::String]
|
222
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
222
|
+
# 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) ```
|
223
223
|
# @param max_results [::Integer]
|
224
224
|
# 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`)
|
225
225
|
# @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/interconnects/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -141,9 +142,21 @@ module Google
|
|
141
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
142
143
|
end
|
143
144
|
|
145
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
146
|
+
config.credentials = credentials
|
147
|
+
config.endpoint = @config.endpoint
|
148
|
+
end
|
149
|
+
|
144
150
|
@interconnects_stub = ::Google::Cloud::Compute::V1::Interconnects::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
145
151
|
end
|
146
152
|
|
153
|
+
##
|
154
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
155
|
+
#
|
156
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
157
|
+
#
|
158
|
+
attr_reader :global_operations
|
159
|
+
|
147
160
|
# Service calls
|
148
161
|
|
149
162
|
##
|
@@ -173,10 +186,10 @@ module Google
|
|
173
186
|
# @param request_id [::String]
|
174
187
|
# 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).
|
175
188
|
# @yield [result, response] Access the result along with the Faraday response object
|
176
|
-
# @yieldparam result [::Gapic::
|
189
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
177
190
|
# @yieldparam response [::Faraday::Response]
|
178
191
|
#
|
179
|
-
# @return [::Gapic::
|
192
|
+
# @return [::Gapic::GenericLRO::Operation]
|
180
193
|
#
|
181
194
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
182
195
|
def delete request, options = nil
|
@@ -203,7 +216,14 @@ module Google
|
|
203
216
|
metadata: @config.metadata
|
204
217
|
|
205
218
|
@interconnects_stub.delete request, options do |result, response|
|
206
|
-
result = ::
|
219
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
220
|
+
operation: result,
|
221
|
+
client: global_operations,
|
222
|
+
request_values: {
|
223
|
+
"project" => request.project
|
224
|
+
},
|
225
|
+
options: options
|
226
|
+
)
|
207
227
|
yield result, response if block_given?
|
208
228
|
return result
|
209
229
|
end
|
@@ -365,10 +385,10 @@ module Google
|
|
365
385
|
# @param request_id [::String]
|
366
386
|
# 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).
|
367
387
|
# @yield [result, response] Access the result along with the Faraday response object
|
368
|
-
# @yieldparam result [::Gapic::
|
388
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
369
389
|
# @yieldparam response [::Faraday::Response]
|
370
390
|
#
|
371
|
-
# @return [::Gapic::
|
391
|
+
# @return [::Gapic::GenericLRO::Operation]
|
372
392
|
#
|
373
393
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
374
394
|
def insert request, options = nil
|
@@ -395,7 +415,14 @@ module Google
|
|
395
415
|
metadata: @config.metadata
|
396
416
|
|
397
417
|
@interconnects_stub.insert request, options do |result, response|
|
398
|
-
result = ::
|
418
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
419
|
+
operation: result,
|
420
|
+
client: global_operations,
|
421
|
+
request_values: {
|
422
|
+
"project" => request.project
|
423
|
+
},
|
424
|
+
options: options
|
425
|
+
)
|
399
426
|
yield result, response if block_given?
|
400
427
|
return result
|
401
428
|
end
|
@@ -425,7 +452,7 @@ module Google
|
|
425
452
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
426
453
|
#
|
427
454
|
# @param filter [::String]
|
428
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
455
|
+
# 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) ```
|
429
456
|
# @param max_results [::Integer]
|
430
457
|
# 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`)
|
431
458
|
# @param order_by [::String]
|
@@ -505,10 +532,10 @@ module Google
|
|
505
532
|
# @param request_id [::String]
|
506
533
|
# 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).
|
507
534
|
# @yield [result, response] Access the result along with the Faraday response object
|
508
|
-
# @yieldparam result [::Gapic::
|
535
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
509
536
|
# @yieldparam response [::Faraday::Response]
|
510
537
|
#
|
511
|
-
# @return [::Gapic::
|
538
|
+
# @return [::Gapic::GenericLRO::Operation]
|
512
539
|
#
|
513
540
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
514
541
|
def patch request, options = nil
|
@@ -535,7 +562,14 @@ module Google
|
|
535
562
|
metadata: @config.metadata
|
536
563
|
|
537
564
|
@interconnects_stub.patch request, options do |result, response|
|
538
|
-
result = ::
|
565
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
566
|
+
operation: result,
|
567
|
+
client: global_operations,
|
568
|
+
request_values: {
|
569
|
+
"project" => request.project
|
570
|
+
},
|
571
|
+
options: options
|
572
|
+
)
|
539
573
|
yield result, response if block_given?
|
540
574
|
return result
|
541
575
|
end
|
@@ -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/licenses/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_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
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
148
|
+
config.credentials = credentials
|
149
|
+
config.endpoint = @config.endpoint
|
150
|
+
end
|
151
|
+
|
146
152
|
@licenses_stub = ::Google::Cloud::Compute::V1::Licenses::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
147
153
|
end
|
148
154
|
|
155
|
+
##
|
156
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
157
|
+
#
|
158
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
159
|
+
#
|
160
|
+
attr_reader :global_operations
|
161
|
+
|
149
162
|
# Service calls
|
150
163
|
|
151
164
|
##
|
@@ -175,10 +188,10 @@ module Google
|
|
175
188
|
# @param request_id [::String]
|
176
189
|
# 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).
|
177
190
|
# @yield [result, response] Access the result along with the Faraday response object
|
178
|
-
# @yieldparam result [::Gapic::
|
191
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
179
192
|
# @yieldparam response [::Faraday::Response]
|
180
193
|
#
|
181
|
-
# @return [::Gapic::
|
194
|
+
# @return [::Gapic::GenericLRO::Operation]
|
182
195
|
#
|
183
196
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
184
197
|
def delete request, options = nil
|
@@ -205,7 +218,14 @@ module Google
|
|
205
218
|
metadata: @config.metadata
|
206
219
|
|
207
220
|
@licenses_stub.delete request, options do |result, response|
|
208
|
-
result = ::
|
221
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
222
|
+
operation: result,
|
223
|
+
client: global_operations,
|
224
|
+
request_values: {
|
225
|
+
"project" => request.project
|
226
|
+
},
|
227
|
+
options: options
|
228
|
+
)
|
209
229
|
yield result, response if block_given?
|
210
230
|
return result
|
211
231
|
end
|
@@ -369,10 +389,10 @@ module Google
|
|
369
389
|
# @param request_id [::String]
|
370
390
|
# 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).
|
371
391
|
# @yield [result, response] Access the result along with the Faraday response object
|
372
|
-
# @yieldparam result [::Gapic::
|
392
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
373
393
|
# @yieldparam response [::Faraday::Response]
|
374
394
|
#
|
375
|
-
# @return [::Gapic::
|
395
|
+
# @return [::Gapic::GenericLRO::Operation]
|
376
396
|
#
|
377
397
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
378
398
|
def insert request, options = nil
|
@@ -399,7 +419,14 @@ module Google
|
|
399
419
|
metadata: @config.metadata
|
400
420
|
|
401
421
|
@licenses_stub.insert request, options do |result, response|
|
402
|
-
result = ::
|
422
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
423
|
+
operation: result,
|
424
|
+
client: global_operations,
|
425
|
+
request_values: {
|
426
|
+
"project" => request.project
|
427
|
+
},
|
428
|
+
options: options
|
429
|
+
)
|
403
430
|
yield result, response if block_given?
|
404
431
|
return result
|
405
432
|
end
|
@@ -429,7 +456,7 @@ module Google
|
|
429
456
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
430
457
|
#
|
431
458
|
# @param filter [::String]
|
432
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
459
|
+
# 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) ```
|
433
460
|
# @param max_results [::Integer]
|
434
461
|
# 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`)
|
435
462
|
# @param order_by [::String]
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Compute
|
24
|
+
module V1
|
25
|
+
module MachineImages
|
26
|
+
# Credentials for the MachineImages API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/compute",
|
30
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
31
|
+
]
|
32
|
+
self.env_vars = [
|
33
|
+
"COMPUTE_CREDENTIALS",
|
34
|
+
"COMPUTE_KEYFILE",
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
36
|
+
"GOOGLE_CLOUD_KEYFILE",
|
37
|
+
"GCLOUD_KEYFILE",
|
38
|
+
"COMPUTE_CREDENTIALS_JSON",
|
39
|
+
"COMPUTE_KEYFILE_JSON",
|
40
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
41
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
42
|
+
"GCLOUD_KEYFILE_JSON"
|
43
|
+
]
|
44
|
+
self.paths = [
|
45
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
46
|
+
]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|