google-cloud-compute-v1 1.2.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/lib/google/cloud/compute/v1/compute_pb.rb +577 -1
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +3 -1
- 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_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/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_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_target_https_proxies/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +86 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +50 -0
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1.rb +4 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1562 -65
- metadata +22 -2
@@ -0,0 +1,276 @@
|
|
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 "google/cloud/compute/v1/compute_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Compute
|
24
|
+
module V1
|
25
|
+
module RegionSecurityPolicies
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the RegionSecurityPolicies service.
|
29
|
+
# service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call and deserialing the response
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Baseline implementation for the delete REST call
|
43
|
+
#
|
44
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionSecurityPolicyRequest]
|
45
|
+
# A request object representing the call parameters. Required.
|
46
|
+
# @param options [::Gapic::CallOptions]
|
47
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
48
|
+
#
|
49
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
50
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
51
|
+
# @yieldparam response [::Faraday::Response]
|
52
|
+
#
|
53
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
54
|
+
# A result object deserialized from the server's reply
|
55
|
+
def delete request_pb, options = nil
|
56
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
|
+
|
58
|
+
uri, _body, query_string_params = transcode_delete_request request_pb
|
59
|
+
response = @client_stub.make_delete_request(
|
60
|
+
uri: uri,
|
61
|
+
params: query_string_params,
|
62
|
+
options: options
|
63
|
+
)
|
64
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
65
|
+
|
66
|
+
yield result, response if block_given?
|
67
|
+
result
|
68
|
+
end
|
69
|
+
|
70
|
+
##
|
71
|
+
# GRPC transcoding helper method for the delete REST call
|
72
|
+
#
|
73
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionSecurityPolicyRequest]
|
74
|
+
# A request object representing the call parameters. Required.
|
75
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
76
|
+
# Uri, Body, Query string parameters
|
77
|
+
def transcode_delete_request request_pb
|
78
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/securityPolicies/#{request_pb.security_policy}"
|
79
|
+
body = nil
|
80
|
+
query_string_params = {}
|
81
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
82
|
+
|
83
|
+
[uri, body, query_string_params]
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Baseline implementation for the get REST call
|
88
|
+
#
|
89
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetRegionSecurityPolicyRequest]
|
90
|
+
# A request object representing the call parameters. Required.
|
91
|
+
# @param options [::Gapic::CallOptions]
|
92
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
93
|
+
#
|
94
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
95
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::SecurityPolicy]
|
96
|
+
# @yieldparam response [::Faraday::Response]
|
97
|
+
#
|
98
|
+
# @return [::Google::Cloud::Compute::V1::SecurityPolicy]
|
99
|
+
# A result object deserialized from the server's reply
|
100
|
+
def get request_pb, options = nil
|
101
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
102
|
+
|
103
|
+
uri, _body, _query_string_params = transcode_get_request request_pb
|
104
|
+
response = @client_stub.make_get_request(
|
105
|
+
uri: uri,
|
106
|
+
options: options
|
107
|
+
)
|
108
|
+
result = ::Google::Cloud::Compute::V1::SecurityPolicy.decode_json response.body, ignore_unknown_fields: true
|
109
|
+
|
110
|
+
yield result, response if block_given?
|
111
|
+
result
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# GRPC transcoding helper method for the get REST call
|
116
|
+
#
|
117
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetRegionSecurityPolicyRequest]
|
118
|
+
# A request object representing the call parameters. Required.
|
119
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
120
|
+
# Uri, Body, Query string parameters
|
121
|
+
def transcode_get_request request_pb
|
122
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/securityPolicies/#{request_pb.security_policy}"
|
123
|
+
body = nil
|
124
|
+
query_string_params = {}
|
125
|
+
|
126
|
+
[uri, body, query_string_params]
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# Baseline implementation for the insert REST call
|
131
|
+
#
|
132
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertRegionSecurityPolicyRequest]
|
133
|
+
# A request object representing the call parameters. Required.
|
134
|
+
# @param options [::Gapic::CallOptions]
|
135
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
136
|
+
#
|
137
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
138
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
139
|
+
# @yieldparam response [::Faraday::Response]
|
140
|
+
#
|
141
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
142
|
+
# A result object deserialized from the server's reply
|
143
|
+
def insert request_pb, options = nil
|
144
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
145
|
+
|
146
|
+
uri, body, query_string_params = transcode_insert_request request_pb
|
147
|
+
response = @client_stub.make_post_request(
|
148
|
+
uri: uri,
|
149
|
+
body: body,
|
150
|
+
params: query_string_params,
|
151
|
+
options: options
|
152
|
+
)
|
153
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
154
|
+
|
155
|
+
yield result, response if block_given?
|
156
|
+
result
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# GRPC transcoding helper method for the insert REST call
|
161
|
+
#
|
162
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertRegionSecurityPolicyRequest]
|
163
|
+
# A request object representing the call parameters. Required.
|
164
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
165
|
+
# Uri, Body, Query string parameters
|
166
|
+
def transcode_insert_request request_pb
|
167
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/securityPolicies"
|
168
|
+
body = request_pb.security_policy_resource.to_json
|
169
|
+
query_string_params = {}
|
170
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
171
|
+
query_string_params["validateOnly"] = request_pb.validate_only.to_s if request_pb.has_validate_only?
|
172
|
+
|
173
|
+
[uri, body, query_string_params]
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# Baseline implementation for the list REST call
|
178
|
+
#
|
179
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListRegionSecurityPoliciesRequest]
|
180
|
+
# A request object representing the call parameters. Required.
|
181
|
+
# @param options [::Gapic::CallOptions]
|
182
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
183
|
+
#
|
184
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
185
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::SecurityPolicyList]
|
186
|
+
# @yieldparam response [::Faraday::Response]
|
187
|
+
#
|
188
|
+
# @return [::Google::Cloud::Compute::V1::SecurityPolicyList]
|
189
|
+
# A result object deserialized from the server's reply
|
190
|
+
def list request_pb, options = nil
|
191
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
192
|
+
|
193
|
+
uri, _body, query_string_params = transcode_list_request request_pb
|
194
|
+
response = @client_stub.make_get_request(
|
195
|
+
uri: uri,
|
196
|
+
params: query_string_params,
|
197
|
+
options: options
|
198
|
+
)
|
199
|
+
result = ::Google::Cloud::Compute::V1::SecurityPolicyList.decode_json response.body, ignore_unknown_fields: true
|
200
|
+
|
201
|
+
yield result, response if block_given?
|
202
|
+
result
|
203
|
+
end
|
204
|
+
|
205
|
+
##
|
206
|
+
# GRPC transcoding helper method for the list REST call
|
207
|
+
#
|
208
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListRegionSecurityPoliciesRequest]
|
209
|
+
# A request object representing the call parameters. Required.
|
210
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
211
|
+
# Uri, Body, Query string parameters
|
212
|
+
def transcode_list_request request_pb
|
213
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/securityPolicies"
|
214
|
+
body = nil
|
215
|
+
query_string_params = {}
|
216
|
+
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
217
|
+
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
218
|
+
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
219
|
+
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
220
|
+
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
221
|
+
|
222
|
+
[uri, body, query_string_params]
|
223
|
+
end
|
224
|
+
|
225
|
+
##
|
226
|
+
# Baseline implementation for the patch REST call
|
227
|
+
#
|
228
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchRegionSecurityPolicyRequest]
|
229
|
+
# A request object representing the call parameters. Required.
|
230
|
+
# @param options [::Gapic::CallOptions]
|
231
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
232
|
+
#
|
233
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
234
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
235
|
+
# @yieldparam response [::Faraday::Response]
|
236
|
+
#
|
237
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
238
|
+
# A result object deserialized from the server's reply
|
239
|
+
def patch request_pb, options = nil
|
240
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
241
|
+
|
242
|
+
uri, body, query_string_params = transcode_patch_request request_pb
|
243
|
+
response = @client_stub.make_patch_request(
|
244
|
+
uri: uri,
|
245
|
+
body: body,
|
246
|
+
params: query_string_params,
|
247
|
+
options: options
|
248
|
+
)
|
249
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
250
|
+
|
251
|
+
yield result, response if block_given?
|
252
|
+
result
|
253
|
+
end
|
254
|
+
|
255
|
+
##
|
256
|
+
# GRPC transcoding helper method for the patch REST call
|
257
|
+
#
|
258
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchRegionSecurityPolicyRequest]
|
259
|
+
# A request object representing the call parameters. Required.
|
260
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
261
|
+
# Uri, Body, Query string parameters
|
262
|
+
def transcode_patch_request request_pb
|
263
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/securityPolicies/#{request_pb.security_policy}"
|
264
|
+
body = request_pb.security_policy_resource.to_json
|
265
|
+
query_string_params = {}
|
266
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
267
|
+
|
268
|
+
[uri, body, query_string_params]
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
@@ -0,0 +1,33 @@
|
|
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 "google/cloud/compute/v1/region_security_policies/rest/client"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Compute
|
24
|
+
module V1
|
25
|
+
module RegionSecurityPolicies
|
26
|
+
# Client for the REST transport
|
27
|
+
module Rest
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,44 @@
|
|
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 "gapic/config"
|
20
|
+
require "gapic/config/method"
|
21
|
+
|
22
|
+
require "google/cloud/compute/v1/version"
|
23
|
+
|
24
|
+
require "google/cloud/compute/v1/region_security_policies/credentials"
|
25
|
+
require "google/cloud/compute/v1/region_security_policies/rest"
|
26
|
+
|
27
|
+
module Google
|
28
|
+
module Cloud
|
29
|
+
module Compute
|
30
|
+
module V1
|
31
|
+
# To load this service and instantiate a REST client:
|
32
|
+
#
|
33
|
+
# require "google/cloud/compute/v1/region_security_policies"
|
34
|
+
# client = ::Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client.new
|
35
|
+
#
|
36
|
+
module RegionSecurityPolicies
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
helper_path = ::File.join __dir__, "region_security_policies", "helpers.rb"
|
44
|
+
require "google/cloud/compute/v1/region_security_policies/helpers" if ::File.file? helper_path
|
@@ -79,6 +79,8 @@ module Google
|
|
79
79
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
80
80
|
}
|
81
81
|
|
82
|
+
default_config.rpcs.patch.timeout = 600.0
|
83
|
+
|
82
84
|
default_config.rpcs.set_ssl_certificates.timeout = 600.0
|
83
85
|
|
84
86
|
default_config.rpcs.set_url_map.timeout = 600.0
|
@@ -447,6 +449,84 @@ module Google
|
|
447
449
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
448
450
|
end
|
449
451
|
|
452
|
+
##
|
453
|
+
# Patches the specified regional TargetHttpsProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
|
454
|
+
#
|
455
|
+
# @overload patch(request, options = nil)
|
456
|
+
# Pass arguments to `patch` via a request object, either of type
|
457
|
+
# {::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest} or an equivalent Hash.
|
458
|
+
#
|
459
|
+
# @param request [::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest, ::Hash]
|
460
|
+
# A request object representing the call parameters. Required. To specify no
|
461
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
462
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
463
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
464
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
465
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
466
|
+
#
|
467
|
+
# @overload patch(project: nil, region: nil, request_id: nil, target_https_proxy: nil, target_https_proxy_resource: nil)
|
468
|
+
# Pass arguments to `patch` via keyword arguments. Note that at
|
469
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
470
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
471
|
+
#
|
472
|
+
# @param project [::String]
|
473
|
+
# Project ID for this request.
|
474
|
+
# @param region [::String]
|
475
|
+
# Name of the region for this request.
|
476
|
+
# @param request_id [::String]
|
477
|
+
# 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).
|
478
|
+
# @param target_https_proxy [::String]
|
479
|
+
# Name of the TargetHttpsProxy resource to patch.
|
480
|
+
# @param target_https_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpsProxy, ::Hash]
|
481
|
+
# The body resource for this request
|
482
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
483
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
484
|
+
# @yieldparam response [::Faraday::Response]
|
485
|
+
#
|
486
|
+
# @return [::Gapic::GenericLRO::Operation]
|
487
|
+
#
|
488
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
489
|
+
def patch request, options = nil
|
490
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
491
|
+
|
492
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest
|
493
|
+
|
494
|
+
# Converts hash and nil to an options object
|
495
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
496
|
+
|
497
|
+
# Customize the options with defaults
|
498
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
499
|
+
|
500
|
+
# Set x-goog-api-client header
|
501
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
502
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
503
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
504
|
+
transports_version_send: [:rest]
|
505
|
+
|
506
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
507
|
+
metadata: call_metadata
|
508
|
+
|
509
|
+
options.apply_defaults timeout: @config.timeout,
|
510
|
+
metadata: @config.metadata
|
511
|
+
|
512
|
+
@region_target_https_proxies_stub.patch request, options do |result, response|
|
513
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
514
|
+
operation: result,
|
515
|
+
client: region_operations,
|
516
|
+
request_values: {
|
517
|
+
"project" => request.project,
|
518
|
+
"region" => request.region
|
519
|
+
},
|
520
|
+
options: options
|
521
|
+
)
|
522
|
+
yield result, response if block_given?
|
523
|
+
return result
|
524
|
+
end
|
525
|
+
rescue ::Faraday::Error => e
|
526
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
527
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
528
|
+
end
|
529
|
+
|
450
530
|
##
|
451
531
|
# Replaces SslCertificates for TargetHttpsProxy.
|
452
532
|
#
|
@@ -723,6 +803,11 @@ module Google
|
|
723
803
|
#
|
724
804
|
attr_reader :list
|
725
805
|
##
|
806
|
+
# RPC-specific configuration for `patch`
|
807
|
+
# @return [::Gapic::Config::Method]
|
808
|
+
#
|
809
|
+
attr_reader :patch
|
810
|
+
##
|
726
811
|
# RPC-specific configuration for `set_ssl_certificates`
|
727
812
|
# @return [::Gapic::Config::Method]
|
728
813
|
#
|
@@ -743,6 +828,8 @@ module Google
|
|
743
828
|
@insert = ::Gapic::Config::Method.new insert_config
|
744
829
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
745
830
|
@list = ::Gapic::Config::Method.new list_config
|
831
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
832
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
746
833
|
set_ssl_certificates_config = parent_rpcs.set_ssl_certificates if parent_rpcs.respond_to? :set_ssl_certificates
|
747
834
|
@set_ssl_certificates = ::Gapic::Config::Method.new set_ssl_certificates_config
|
748
835
|
set_url_map_config = parent_rpcs.set_url_map if parent_rpcs.respond_to? :set_url_map
|
@@ -221,6 +221,52 @@ module Google
|
|
221
221
|
[uri, body, query_string_params]
|
222
222
|
end
|
223
223
|
|
224
|
+
##
|
225
|
+
# Baseline implementation for the patch REST call
|
226
|
+
#
|
227
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest]
|
228
|
+
# A request object representing the call parameters. Required.
|
229
|
+
# @param options [::Gapic::CallOptions]
|
230
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
231
|
+
#
|
232
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
233
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
234
|
+
# @yieldparam response [::Faraday::Response]
|
235
|
+
#
|
236
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
237
|
+
# A result object deserialized from the server's reply
|
238
|
+
def patch request_pb, options = nil
|
239
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
240
|
+
|
241
|
+
uri, body, query_string_params = transcode_patch_request request_pb
|
242
|
+
response = @client_stub.make_patch_request(
|
243
|
+
uri: uri,
|
244
|
+
body: body,
|
245
|
+
params: query_string_params,
|
246
|
+
options: options
|
247
|
+
)
|
248
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
249
|
+
|
250
|
+
yield result, response if block_given?
|
251
|
+
result
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# GRPC transcoding helper method for the patch REST call
|
256
|
+
#
|
257
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest]
|
258
|
+
# A request object representing the call parameters. Required.
|
259
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
260
|
+
# Uri, Body, Query string parameters
|
261
|
+
def transcode_patch_request request_pb
|
262
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/targetHttpsProxies/#{request_pb.target_https_proxy}"
|
263
|
+
body = request_pb.target_https_proxy_resource.to_json
|
264
|
+
query_string_params = {}
|
265
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
266
|
+
|
267
|
+
[uri, body, query_string_params]
|
268
|
+
end
|
269
|
+
|
224
270
|
##
|
225
271
|
# Baseline implementation for the set_ssl_certificates REST call
|
226
272
|
#
|
@@ -67,6 +67,11 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.rpcs.add_rule.timeout = 600.0
|
69
69
|
|
70
|
+
default_config.rpcs.aggregated_list.timeout = 600.0
|
71
|
+
default_config.rpcs.aggregated_list.retry_policy = {
|
72
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
73
|
+
}
|
74
|
+
|
70
75
|
default_config.rpcs.delete.timeout = 600.0
|
71
76
|
|
72
77
|
default_config.rpcs.get.timeout = 600.0
|
@@ -243,6 +248,80 @@ module Google
|
|
243
248
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
244
249
|
end
|
245
250
|
|
251
|
+
##
|
252
|
+
# Retrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.
|
253
|
+
#
|
254
|
+
# @overload aggregated_list(request, options = nil)
|
255
|
+
# Pass arguments to `aggregated_list` via a request object, either of type
|
256
|
+
# {::Google::Cloud::Compute::V1::AggregatedListSecurityPoliciesRequest} or an equivalent Hash.
|
257
|
+
#
|
258
|
+
# @param request [::Google::Cloud::Compute::V1::AggregatedListSecurityPoliciesRequest, ::Hash]
|
259
|
+
# A request object representing the call parameters. Required. To specify no
|
260
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
261
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
262
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
263
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
264
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
265
|
+
#
|
266
|
+
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
267
|
+
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
268
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
269
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
270
|
+
#
|
271
|
+
# @param filter [::String]
|
272
|
+
# 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) ```
|
273
|
+
# @param include_all_scopes [::Boolean]
|
274
|
+
# 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.
|
275
|
+
# @param max_results [::Integer]
|
276
|
+
# 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`)
|
277
|
+
# @param order_by [::String]
|
278
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
279
|
+
# @param page_token [::String]
|
280
|
+
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
281
|
+
# @param project [::String]
|
282
|
+
# Name of the project scoping this request.
|
283
|
+
# @param return_partial_success [::Boolean]
|
284
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
285
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
286
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SecurityPoliciesScopedList>]
|
287
|
+
# @yieldparam response [::Faraday::Response]
|
288
|
+
#
|
289
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SecurityPoliciesScopedList>]
|
290
|
+
#
|
291
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
292
|
+
def aggregated_list request, options = nil
|
293
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
294
|
+
|
295
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListSecurityPoliciesRequest
|
296
|
+
|
297
|
+
# Converts hash and nil to an options object
|
298
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
299
|
+
|
300
|
+
# Customize the options with defaults
|
301
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
302
|
+
|
303
|
+
# Set x-goog-api-client header
|
304
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
305
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
306
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
307
|
+
transports_version_send: [:rest]
|
308
|
+
|
309
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
310
|
+
metadata: call_metadata
|
311
|
+
|
312
|
+
options.apply_defaults timeout: @config.timeout,
|
313
|
+
metadata: @config.metadata
|
314
|
+
|
315
|
+
@security_policies_stub.aggregated_list request, options do |result, response|
|
316
|
+
result = ::Gapic::Rest::PagedEnumerable.new @security_policies_stub, :aggregated_list, "items", request, result, options
|
317
|
+
yield result, response if block_given?
|
318
|
+
return result
|
319
|
+
end
|
320
|
+
rescue ::Faraday::Error => e
|
321
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
322
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
323
|
+
end
|
324
|
+
|
246
325
|
##
|
247
326
|
# Deletes the specified policy.
|
248
327
|
#
|
@@ -988,6 +1067,11 @@ module Google
|
|
988
1067
|
#
|
989
1068
|
attr_reader :add_rule
|
990
1069
|
##
|
1070
|
+
# RPC-specific configuration for `aggregated_list`
|
1071
|
+
# @return [::Gapic::Config::Method]
|
1072
|
+
#
|
1073
|
+
attr_reader :aggregated_list
|
1074
|
+
##
|
991
1075
|
# RPC-specific configuration for `delete`
|
992
1076
|
# @return [::Gapic::Config::Method]
|
993
1077
|
#
|
@@ -1037,6 +1121,8 @@ module Google
|
|
1037
1121
|
def initialize parent_rpcs = nil
|
1038
1122
|
add_rule_config = parent_rpcs.add_rule if parent_rpcs.respond_to? :add_rule
|
1039
1123
|
@add_rule = ::Gapic::Config::Method.new add_rule_config
|
1124
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
1125
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
1040
1126
|
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1041
1127
|
@delete = ::Gapic::Config::Method.new delete_config
|
1042
1128
|
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|