google-cloud-memorystore-v1beta 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -4
- data/lib/google/cloud/memorystore/v1beta/bindings_override.rb +1 -1
- data/lib/google/cloud/memorystore/v1beta/memorystore/client.rb +943 -166
- data/lib/google/cloud/memorystore/v1beta/memorystore/credentials.rb +1 -1
- data/lib/google/cloud/memorystore/v1beta/memorystore/paths.rb +41 -1
- data/lib/google/cloud/memorystore/v1beta/memorystore/rest/client.rb +732 -4
- data/lib/google/cloud/memorystore/v1beta/memorystore/rest/operations.rb +1 -1
- data/lib/google/cloud/memorystore/v1beta/memorystore/rest/service_stub.rb +430 -1
- data/lib/google/cloud/memorystore/v1beta/memorystore/rest.rb +1 -1
- data/lib/google/cloud/memorystore/v1beta/memorystore.rb +1 -1
- data/lib/google/cloud/memorystore/v1beta/memorystore_pb.rb +18 -1
- data/lib/google/cloud/memorystore/v1beta/memorystore_services_pb.rb +36 -1
- data/lib/google/cloud/memorystore/v1beta/rest.rb +1 -1
- data/lib/google/cloud/memorystore/v1beta/version.rb +1 -1
- data/lib/google/cloud/memorystore/v1beta.rb +1 -1
- data/lib/google-cloud-memorystore-v1beta.rb +1 -1
- data/proto_docs/google/api/client.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +1 -1
- data/proto_docs/google/api/field_info.rb +1 -1
- data/proto_docs/google/api/launch_stage.rb +1 -1
- data/proto_docs/google/api/resource.rb +1 -1
- data/proto_docs/google/cloud/memorystore/v1beta/memorystore.rb +333 -1
- data/proto_docs/google/longrunning/operations.rb +1 -1
- data/proto_docs/google/protobuf/any.rb +1 -1
- data/proto_docs/google/protobuf/duration.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +8 -7
- data/proto_docs/google/rpc/status.rb +1 -1
- metadata +10 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -73,20 +73,46 @@ module Google
|
|
|
73
73
|
end
|
|
74
74
|
default_config = Client::Configuration.new parent_config
|
|
75
75
|
|
|
76
|
+
default_config.rpcs.list_acl_policies.timeout = 60.0
|
|
77
|
+
default_config.rpcs.list_acl_policies.retry_policy = {
|
|
78
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
79
|
+
}
|
|
80
|
+
|
|
76
81
|
default_config.rpcs.list_instances.timeout = 60.0
|
|
77
82
|
default_config.rpcs.list_instances.retry_policy = {
|
|
78
83
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
79
84
|
}
|
|
80
85
|
|
|
86
|
+
default_config.rpcs.get_acl_policy.timeout = 60.0
|
|
87
|
+
default_config.rpcs.get_acl_policy.retry_policy = {
|
|
88
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
89
|
+
}
|
|
90
|
+
|
|
81
91
|
default_config.rpcs.get_instance.timeout = 60.0
|
|
82
92
|
default_config.rpcs.get_instance.retry_policy = {
|
|
83
93
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
84
94
|
}
|
|
85
95
|
|
|
96
|
+
default_config.rpcs.create_acl_policy.timeout = 600.0
|
|
97
|
+
|
|
86
98
|
default_config.rpcs.create_instance.timeout = 600.0
|
|
87
99
|
|
|
100
|
+
default_config.rpcs.update_acl_policy.timeout = 600.0
|
|
101
|
+
|
|
88
102
|
default_config.rpcs.update_instance.timeout = 600.0
|
|
89
103
|
|
|
104
|
+
default_config.rpcs.delete_acl_policy.timeout = 600.0
|
|
105
|
+
|
|
106
|
+
default_config.rpcs.get_acl_policy_revision.timeout = 60.0
|
|
107
|
+
default_config.rpcs.get_acl_policy_revision.retry_policy = {
|
|
108
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
default_config.rpcs.list_acl_policy_revisions.timeout = 60.0
|
|
112
|
+
default_config.rpcs.list_acl_policy_revisions.retry_policy = {
|
|
113
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
114
|
+
}
|
|
115
|
+
|
|
90
116
|
default_config.rpcs.delete_instance.timeout = 600.0
|
|
91
117
|
|
|
92
118
|
default_config.rpcs.get_certificate_authority.timeout = 60.0
|
|
@@ -228,6 +254,113 @@ module Google
|
|
|
228
254
|
|
|
229
255
|
# Service calls
|
|
230
256
|
|
|
257
|
+
##
|
|
258
|
+
# Lists all ACL policies owned by a project in either the specified
|
|
259
|
+
# location (region) or all locations.
|
|
260
|
+
#
|
|
261
|
+
# The location should have the following format:
|
|
262
|
+
#
|
|
263
|
+
# * `projects/{project_id}/locations/{location_id}`
|
|
264
|
+
#
|
|
265
|
+
# If `location_id` is specified as `-` (wildcard), then all regions
|
|
266
|
+
# available to the project are queried, and the results are aggregated.
|
|
267
|
+
#
|
|
268
|
+
# @overload list_acl_policies(request, options = nil)
|
|
269
|
+
# Pass arguments to `list_acl_policies` via a request object, either of type
|
|
270
|
+
# {::Google::Cloud::Memorystore::V1beta::ListAclPoliciesRequest} or an equivalent Hash.
|
|
271
|
+
#
|
|
272
|
+
# @param request [::Google::Cloud::Memorystore::V1beta::ListAclPoliciesRequest, ::Hash]
|
|
273
|
+
# A request object representing the call parameters. Required. To specify no
|
|
274
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
275
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
276
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
277
|
+
#
|
|
278
|
+
# @overload list_acl_policies(parent: nil, page_size: nil, page_token: nil)
|
|
279
|
+
# Pass arguments to `list_acl_policies` via keyword arguments. Note that at
|
|
280
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
281
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
282
|
+
#
|
|
283
|
+
# @param parent [::String]
|
|
284
|
+
# Required. The resource name of the ACL policy location using the form:
|
|
285
|
+
# `projects/{project}/locations/{location}`
|
|
286
|
+
# where `location` refers to a Google Cloud region.
|
|
287
|
+
# @param page_size [::Integer]
|
|
288
|
+
# Optional. The maximum number of items to return.
|
|
289
|
+
#
|
|
290
|
+
# If not specified, a default value of 1000 will be used by the service.
|
|
291
|
+
# Regardless of the page_size value, the response may include a partial list
|
|
292
|
+
# and a caller should only rely on response's
|
|
293
|
+
# `next_page_token`
|
|
294
|
+
# to determine if there are more ACL policies left to be queried.
|
|
295
|
+
#
|
|
296
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
297
|
+
# @param page_token [::String]
|
|
298
|
+
# Optional. The `next_page_token` value returned from a previous
|
|
299
|
+
# `ListAclPolicies` request, if any.
|
|
300
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
301
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::AclPolicy>]
|
|
302
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
303
|
+
#
|
|
304
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::AclPolicy>]
|
|
305
|
+
#
|
|
306
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
307
|
+
#
|
|
308
|
+
# @example Basic example
|
|
309
|
+
# require "google/cloud/memorystore/v1beta"
|
|
310
|
+
#
|
|
311
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
312
|
+
# client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
|
|
313
|
+
#
|
|
314
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
315
|
+
# request = Google::Cloud::Memorystore::V1beta::ListAclPoliciesRequest.new
|
|
316
|
+
#
|
|
317
|
+
# # Call the list_acl_policies method.
|
|
318
|
+
# result = client.list_acl_policies request
|
|
319
|
+
#
|
|
320
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
321
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
322
|
+
# result.each do |item|
|
|
323
|
+
# # Each element is of type ::Google::Cloud::Memorystore::V1beta::AclPolicy.
|
|
324
|
+
# p item
|
|
325
|
+
# end
|
|
326
|
+
#
|
|
327
|
+
def list_acl_policies request, options = nil
|
|
328
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
329
|
+
|
|
330
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListAclPoliciesRequest
|
|
331
|
+
|
|
332
|
+
# Converts hash and nil to an options object
|
|
333
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
334
|
+
|
|
335
|
+
# Customize the options with defaults
|
|
336
|
+
call_metadata = @config.rpcs.list_acl_policies.metadata.to_h
|
|
337
|
+
|
|
338
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
339
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
340
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
341
|
+
gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
|
|
342
|
+
transports_version_send: [:rest]
|
|
343
|
+
|
|
344
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
345
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
346
|
+
|
|
347
|
+
options.apply_defaults timeout: @config.rpcs.list_acl_policies.timeout,
|
|
348
|
+
metadata: call_metadata,
|
|
349
|
+
retry_policy: @config.rpcs.list_acl_policies.retry_policy
|
|
350
|
+
|
|
351
|
+
options.apply_defaults timeout: @config.timeout,
|
|
352
|
+
metadata: @config.metadata,
|
|
353
|
+
retry_policy: @config.retry_policy
|
|
354
|
+
|
|
355
|
+
@memorystore_stub.list_acl_policies request, options do |result, operation|
|
|
356
|
+
result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_acl_policies, "acl_policies", request, result, options
|
|
357
|
+
yield result, operation if block_given?
|
|
358
|
+
throw :response, result
|
|
359
|
+
end
|
|
360
|
+
rescue ::Gapic::Rest::Error => e
|
|
361
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
362
|
+
end
|
|
363
|
+
|
|
231
364
|
##
|
|
232
365
|
# Lists Instances in a given project and location.
|
|
233
366
|
#
|
|
@@ -323,6 +456,86 @@ module Google
|
|
|
323
456
|
raise ::Google::Cloud::Error.from_error(e)
|
|
324
457
|
end
|
|
325
458
|
|
|
459
|
+
##
|
|
460
|
+
# Gets the details of a specific Memorystore ACL policy.
|
|
461
|
+
#
|
|
462
|
+
# @overload get_acl_policy(request, options = nil)
|
|
463
|
+
# Pass arguments to `get_acl_policy` via a request object, either of type
|
|
464
|
+
# {::Google::Cloud::Memorystore::V1beta::GetAclPolicyRequest} or an equivalent Hash.
|
|
465
|
+
#
|
|
466
|
+
# @param request [::Google::Cloud::Memorystore::V1beta::GetAclPolicyRequest, ::Hash]
|
|
467
|
+
# A request object representing the call parameters. Required. To specify no
|
|
468
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
469
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
470
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
471
|
+
#
|
|
472
|
+
# @overload get_acl_policy(name: nil)
|
|
473
|
+
# Pass arguments to `get_acl_policy` via keyword arguments. Note that at
|
|
474
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
475
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
476
|
+
#
|
|
477
|
+
# @param name [::String]
|
|
478
|
+
# Required. Memorystore ACL policy resource name using the form:
|
|
479
|
+
# `projects/{project}/locations/{location}/aclPolicies/{acl_policy}`
|
|
480
|
+
# where `location` refers to a Google Cloud region.
|
|
481
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
482
|
+
# @yieldparam result [::Google::Cloud::Memorystore::V1beta::AclPolicy]
|
|
483
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
484
|
+
#
|
|
485
|
+
# @return [::Google::Cloud::Memorystore::V1beta::AclPolicy]
|
|
486
|
+
#
|
|
487
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
488
|
+
#
|
|
489
|
+
# @example Basic example
|
|
490
|
+
# require "google/cloud/memorystore/v1beta"
|
|
491
|
+
#
|
|
492
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
493
|
+
# client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
|
|
494
|
+
#
|
|
495
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
496
|
+
# request = Google::Cloud::Memorystore::V1beta::GetAclPolicyRequest.new
|
|
497
|
+
#
|
|
498
|
+
# # Call the get_acl_policy method.
|
|
499
|
+
# result = client.get_acl_policy request
|
|
500
|
+
#
|
|
501
|
+
# # The returned object is of type Google::Cloud::Memorystore::V1beta::AclPolicy.
|
|
502
|
+
# p result
|
|
503
|
+
#
|
|
504
|
+
def get_acl_policy request, options = nil
|
|
505
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
506
|
+
|
|
507
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetAclPolicyRequest
|
|
508
|
+
|
|
509
|
+
# Converts hash and nil to an options object
|
|
510
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
511
|
+
|
|
512
|
+
# Customize the options with defaults
|
|
513
|
+
call_metadata = @config.rpcs.get_acl_policy.metadata.to_h
|
|
514
|
+
|
|
515
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
516
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
517
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
518
|
+
gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
|
|
519
|
+
transports_version_send: [:rest]
|
|
520
|
+
|
|
521
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
522
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
523
|
+
|
|
524
|
+
options.apply_defaults timeout: @config.rpcs.get_acl_policy.timeout,
|
|
525
|
+
metadata: call_metadata,
|
|
526
|
+
retry_policy: @config.rpcs.get_acl_policy.retry_policy
|
|
527
|
+
|
|
528
|
+
options.apply_defaults timeout: @config.timeout,
|
|
529
|
+
metadata: @config.metadata,
|
|
530
|
+
retry_policy: @config.retry_policy
|
|
531
|
+
|
|
532
|
+
@memorystore_stub.get_acl_policy request, options do |result, operation|
|
|
533
|
+
yield result, operation if block_given?
|
|
534
|
+
end
|
|
535
|
+
rescue ::Gapic::Rest::Error => e
|
|
536
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
537
|
+
end
|
|
538
|
+
|
|
326
539
|
##
|
|
327
540
|
# Gets details of a single Instance.
|
|
328
541
|
#
|
|
@@ -402,6 +615,102 @@ module Google
|
|
|
402
615
|
raise ::Google::Cloud::Error.from_error(e)
|
|
403
616
|
end
|
|
404
617
|
|
|
618
|
+
##
|
|
619
|
+
# Creates an ACL policy.
|
|
620
|
+
# The creation is executed synchronously and the policy is available for use
|
|
621
|
+
# immediately after the RPC returns.
|
|
622
|
+
#
|
|
623
|
+
# @overload create_acl_policy(request, options = nil)
|
|
624
|
+
# Pass arguments to `create_acl_policy` via a request object, either of type
|
|
625
|
+
# {::Google::Cloud::Memorystore::V1beta::CreateAclPolicyRequest} or an equivalent Hash.
|
|
626
|
+
#
|
|
627
|
+
# @param request [::Google::Cloud::Memorystore::V1beta::CreateAclPolicyRequest, ::Hash]
|
|
628
|
+
# A request object representing the call parameters. Required. To specify no
|
|
629
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
630
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
631
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
632
|
+
#
|
|
633
|
+
# @overload create_acl_policy(parent: nil, acl_policy_id: nil, acl_policy: nil, request_id: nil)
|
|
634
|
+
# Pass arguments to `create_acl_policy` via keyword arguments. Note that at
|
|
635
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
636
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
637
|
+
#
|
|
638
|
+
# @param parent [::String]
|
|
639
|
+
# Required. The resource name of the ACL policy location using the form:
|
|
640
|
+
# `projects/{project}/locations/{location}`
|
|
641
|
+
# where `location` refers to a Google Cloud region.
|
|
642
|
+
# @param acl_policy_id [::String]
|
|
643
|
+
# Required. The logical name of the ACL policy in the customer project
|
|
644
|
+
# with the following restrictions:
|
|
645
|
+
#
|
|
646
|
+
# * Must contain only lowercase letters, numbers, and hyphens.
|
|
647
|
+
# * Must start with a letter.
|
|
648
|
+
# * Must be between 1-63 characters.
|
|
649
|
+
# * Must end with a number or a letter.
|
|
650
|
+
# * Must be unique within the customer project / location
|
|
651
|
+
# @param acl_policy [::Google::Cloud::Memorystore::V1beta::AclPolicy, ::Hash]
|
|
652
|
+
# Required. The ACL policy that is to be created.
|
|
653
|
+
# @param request_id [::String]
|
|
654
|
+
# Optional. Idempotent request UUID.
|
|
655
|
+
# .
|
|
656
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
657
|
+
# @yieldparam result [::Google::Cloud::Memorystore::V1beta::AclPolicy]
|
|
658
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
659
|
+
#
|
|
660
|
+
# @return [::Google::Cloud::Memorystore::V1beta::AclPolicy]
|
|
661
|
+
#
|
|
662
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
663
|
+
#
|
|
664
|
+
# @example Basic example
|
|
665
|
+
# require "google/cloud/memorystore/v1beta"
|
|
666
|
+
#
|
|
667
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
668
|
+
# client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
|
|
669
|
+
#
|
|
670
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
671
|
+
# request = Google::Cloud::Memorystore::V1beta::CreateAclPolicyRequest.new
|
|
672
|
+
#
|
|
673
|
+
# # Call the create_acl_policy method.
|
|
674
|
+
# result = client.create_acl_policy request
|
|
675
|
+
#
|
|
676
|
+
# # The returned object is of type Google::Cloud::Memorystore::V1beta::AclPolicy.
|
|
677
|
+
# p result
|
|
678
|
+
#
|
|
679
|
+
def create_acl_policy request, options = nil
|
|
680
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
681
|
+
|
|
682
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::CreateAclPolicyRequest
|
|
683
|
+
|
|
684
|
+
# Converts hash and nil to an options object
|
|
685
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
686
|
+
|
|
687
|
+
# Customize the options with defaults
|
|
688
|
+
call_metadata = @config.rpcs.create_acl_policy.metadata.to_h
|
|
689
|
+
|
|
690
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
691
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
692
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
693
|
+
gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
|
|
694
|
+
transports_version_send: [:rest]
|
|
695
|
+
|
|
696
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
697
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
698
|
+
|
|
699
|
+
options.apply_defaults timeout: @config.rpcs.create_acl_policy.timeout,
|
|
700
|
+
metadata: call_metadata,
|
|
701
|
+
retry_policy: @config.rpcs.create_acl_policy.retry_policy
|
|
702
|
+
|
|
703
|
+
options.apply_defaults timeout: @config.timeout,
|
|
704
|
+
metadata: @config.metadata,
|
|
705
|
+
retry_policy: @config.retry_policy
|
|
706
|
+
|
|
707
|
+
@memorystore_stub.create_acl_policy request, options do |result, operation|
|
|
708
|
+
yield result, operation if block_given?
|
|
709
|
+
end
|
|
710
|
+
rescue ::Gapic::Rest::Error => e
|
|
711
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
712
|
+
end
|
|
713
|
+
|
|
405
714
|
##
|
|
406
715
|
# Creates a new Instance in a given project and location.
|
|
407
716
|
#
|
|
@@ -517,6 +826,110 @@ module Google
|
|
|
517
826
|
raise ::Google::Cloud::Error.from_error(e)
|
|
518
827
|
end
|
|
519
828
|
|
|
829
|
+
##
|
|
830
|
+
# Updates the ACL policy.
|
|
831
|
+
#
|
|
832
|
+
# The operation will apply the updated ACL policy to all the linked
|
|
833
|
+
# instances. The operation will return success if it successfully applied the
|
|
834
|
+
# policy to all the instances. If the operation completed with a failure, the
|
|
835
|
+
# service will continue to apply the policy via reconciliation for the failed
|
|
836
|
+
# instances even after operation completion to ensure eventual consistency.
|
|
837
|
+
#
|
|
838
|
+
# Completed longrunning.Operation will contain the new ACL policy object
|
|
839
|
+
# in the response field.
|
|
840
|
+
#
|
|
841
|
+
# @overload update_acl_policy(request, options = nil)
|
|
842
|
+
# Pass arguments to `update_acl_policy` via a request object, either of type
|
|
843
|
+
# {::Google::Cloud::Memorystore::V1beta::UpdateAclPolicyRequest} or an equivalent Hash.
|
|
844
|
+
#
|
|
845
|
+
# @param request [::Google::Cloud::Memorystore::V1beta::UpdateAclPolicyRequest, ::Hash]
|
|
846
|
+
# A request object representing the call parameters. Required. To specify no
|
|
847
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
848
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
849
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
850
|
+
#
|
|
851
|
+
# @overload update_acl_policy(acl_policy: nil, update_mask: nil, request_id: nil)
|
|
852
|
+
# Pass arguments to `update_acl_policy` via keyword arguments. Note that at
|
|
853
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
854
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
855
|
+
#
|
|
856
|
+
# @param acl_policy [::Google::Cloud::Memorystore::V1beta::AclPolicy, ::Hash]
|
|
857
|
+
# Required. The ACL policy to be updated.
|
|
858
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
859
|
+
# Optional. Mask of fields to be updated. At least one path must be supplied
|
|
860
|
+
# in this field. The elements of the repeated paths field may only include
|
|
861
|
+
# these fields from `AclPolicy`:
|
|
862
|
+
#
|
|
863
|
+
# * `rules`
|
|
864
|
+
# @param request_id [::String]
|
|
865
|
+
# Optional. Idempotent request UUID.
|
|
866
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
867
|
+
# @yieldparam result [::Gapic::Operation]
|
|
868
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
869
|
+
#
|
|
870
|
+
# @return [::Gapic::Operation]
|
|
871
|
+
#
|
|
872
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
873
|
+
#
|
|
874
|
+
# @example Basic example
|
|
875
|
+
# require "google/cloud/memorystore/v1beta"
|
|
876
|
+
#
|
|
877
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
878
|
+
# client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
|
|
879
|
+
#
|
|
880
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
881
|
+
# request = Google::Cloud::Memorystore::V1beta::UpdateAclPolicyRequest.new
|
|
882
|
+
#
|
|
883
|
+
# # Call the update_acl_policy method.
|
|
884
|
+
# result = client.update_acl_policy request
|
|
885
|
+
#
|
|
886
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
887
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
888
|
+
# # Here is how to wait for a response.
|
|
889
|
+
# result.wait_until_done! timeout: 60
|
|
890
|
+
# if result.response?
|
|
891
|
+
# p result.response
|
|
892
|
+
# else
|
|
893
|
+
# puts "No response received."
|
|
894
|
+
# end
|
|
895
|
+
#
|
|
896
|
+
def update_acl_policy request, options = nil
|
|
897
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
898
|
+
|
|
899
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::UpdateAclPolicyRequest
|
|
900
|
+
|
|
901
|
+
# Converts hash and nil to an options object
|
|
902
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
903
|
+
|
|
904
|
+
# Customize the options with defaults
|
|
905
|
+
call_metadata = @config.rpcs.update_acl_policy.metadata.to_h
|
|
906
|
+
|
|
907
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
908
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
909
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
910
|
+
gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
|
|
911
|
+
transports_version_send: [:rest]
|
|
912
|
+
|
|
913
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
914
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
915
|
+
|
|
916
|
+
options.apply_defaults timeout: @config.rpcs.update_acl_policy.timeout,
|
|
917
|
+
metadata: call_metadata,
|
|
918
|
+
retry_policy: @config.rpcs.update_acl_policy.retry_policy
|
|
919
|
+
|
|
920
|
+
options.apply_defaults timeout: @config.timeout,
|
|
921
|
+
metadata: @config.metadata,
|
|
922
|
+
retry_policy: @config.retry_policy
|
|
923
|
+
|
|
924
|
+
@memorystore_stub.update_acl_policy request, options do |result, operation|
|
|
925
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
926
|
+
yield result, operation if block_given?
|
|
927
|
+
throw :response, result
|
|
928
|
+
end
|
|
929
|
+
rescue ::Gapic::Rest::Error => e
|
|
930
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
931
|
+
end
|
|
932
|
+
|
|
520
933
|
##
|
|
521
934
|
# Updates the parameters of a single Instance.
|
|
522
935
|
#
|
|
@@ -621,6 +1034,272 @@ module Google
|
|
|
621
1034
|
raise ::Google::Cloud::Error.from_error(e)
|
|
622
1035
|
end
|
|
623
1036
|
|
|
1037
|
+
##
|
|
1038
|
+
# Deletes a specific ACL policy. This action will delete the ACL policy and
|
|
1039
|
+
# all the rules associated with it. An ACL policy cannot be deleted if it is
|
|
1040
|
+
# attached to an instance.
|
|
1041
|
+
#
|
|
1042
|
+
# @overload delete_acl_policy(request, options = nil)
|
|
1043
|
+
# Pass arguments to `delete_acl_policy` via a request object, either of type
|
|
1044
|
+
# {::Google::Cloud::Memorystore::V1beta::DeleteAclPolicyRequest} or an equivalent Hash.
|
|
1045
|
+
#
|
|
1046
|
+
# @param request [::Google::Cloud::Memorystore::V1beta::DeleteAclPolicyRequest, ::Hash]
|
|
1047
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1048
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1049
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1050
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1051
|
+
#
|
|
1052
|
+
# @overload delete_acl_policy(name: nil, request_id: nil, etag: nil)
|
|
1053
|
+
# Pass arguments to `delete_acl_policy` via keyword arguments. Note that at
|
|
1054
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1055
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1056
|
+
#
|
|
1057
|
+
# @param name [::String]
|
|
1058
|
+
# Required. Memorystore ACL policy resource name using the form:
|
|
1059
|
+
# `projects/{project}/locations/{location}/aclPolicies/{acl_policy_id}`
|
|
1060
|
+
# where `location` refers to a Google Cloud region.
|
|
1061
|
+
# @param request_id [::String]
|
|
1062
|
+
# Optional. Idempotent request UUID.
|
|
1063
|
+
# @param etag [::String]
|
|
1064
|
+
# Optional. Etag of the ACL policy. If this is different from the server's
|
|
1065
|
+
# etag, the request will fail with an ABORTED error.
|
|
1066
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1067
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1068
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1069
|
+
#
|
|
1070
|
+
# @return [::Gapic::Operation]
|
|
1071
|
+
#
|
|
1072
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1073
|
+
#
|
|
1074
|
+
# @example Basic example
|
|
1075
|
+
# require "google/cloud/memorystore/v1beta"
|
|
1076
|
+
#
|
|
1077
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1078
|
+
# client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
|
|
1079
|
+
#
|
|
1080
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1081
|
+
# request = Google::Cloud::Memorystore::V1beta::DeleteAclPolicyRequest.new
|
|
1082
|
+
#
|
|
1083
|
+
# # Call the delete_acl_policy method.
|
|
1084
|
+
# result = client.delete_acl_policy request
|
|
1085
|
+
#
|
|
1086
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1087
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1088
|
+
# # Here is how to wait for a response.
|
|
1089
|
+
# result.wait_until_done! timeout: 60
|
|
1090
|
+
# if result.response?
|
|
1091
|
+
# p result.response
|
|
1092
|
+
# else
|
|
1093
|
+
# puts "No response received."
|
|
1094
|
+
# end
|
|
1095
|
+
#
|
|
1096
|
+
def delete_acl_policy request, options = nil
|
|
1097
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1098
|
+
|
|
1099
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::DeleteAclPolicyRequest
|
|
1100
|
+
|
|
1101
|
+
# Converts hash and nil to an options object
|
|
1102
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1103
|
+
|
|
1104
|
+
# Customize the options with defaults
|
|
1105
|
+
call_metadata = @config.rpcs.delete_acl_policy.metadata.to_h
|
|
1106
|
+
|
|
1107
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1108
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1109
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1110
|
+
gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
|
|
1111
|
+
transports_version_send: [:rest]
|
|
1112
|
+
|
|
1113
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1114
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1115
|
+
|
|
1116
|
+
options.apply_defaults timeout: @config.rpcs.delete_acl_policy.timeout,
|
|
1117
|
+
metadata: call_metadata,
|
|
1118
|
+
retry_policy: @config.rpcs.delete_acl_policy.retry_policy
|
|
1119
|
+
|
|
1120
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1121
|
+
metadata: @config.metadata,
|
|
1122
|
+
retry_policy: @config.retry_policy
|
|
1123
|
+
|
|
1124
|
+
@memorystore_stub.delete_acl_policy request, options do |result, operation|
|
|
1125
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1126
|
+
yield result, operation if block_given?
|
|
1127
|
+
throw :response, result
|
|
1128
|
+
end
|
|
1129
|
+
rescue ::Gapic::Rest::Error => e
|
|
1130
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1131
|
+
end
|
|
1132
|
+
|
|
1133
|
+
##
|
|
1134
|
+
# Gets details of a specific ACL policy revision.
|
|
1135
|
+
#
|
|
1136
|
+
# @overload get_acl_policy_revision(request, options = nil)
|
|
1137
|
+
# Pass arguments to `get_acl_policy_revision` via a request object, either of type
|
|
1138
|
+
# {::Google::Cloud::Memorystore::V1beta::GetAclPolicyRevisionRequest} or an equivalent Hash.
|
|
1139
|
+
#
|
|
1140
|
+
# @param request [::Google::Cloud::Memorystore::V1beta::GetAclPolicyRevisionRequest, ::Hash]
|
|
1141
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1142
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1143
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1144
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1145
|
+
#
|
|
1146
|
+
# @overload get_acl_policy_revision(name: nil)
|
|
1147
|
+
# Pass arguments to `get_acl_policy_revision` via keyword arguments. Note that at
|
|
1148
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1149
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1150
|
+
#
|
|
1151
|
+
# @param name [::String]
|
|
1152
|
+
# Required. Memorystore ACL policy revision resource name using the form:
|
|
1153
|
+
# `projects/{project}/locations/{location}/aclPolicies/{acl_policy}/revisions/{revision}`
|
|
1154
|
+
# where `location` refers to a Google Cloud region.
|
|
1155
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1156
|
+
# @yieldparam result [::Google::Cloud::Memorystore::V1beta::AclPolicyRevision]
|
|
1157
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1158
|
+
#
|
|
1159
|
+
# @return [::Google::Cloud::Memorystore::V1beta::AclPolicyRevision]
|
|
1160
|
+
#
|
|
1161
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1162
|
+
#
|
|
1163
|
+
# @example Basic example
|
|
1164
|
+
# require "google/cloud/memorystore/v1beta"
|
|
1165
|
+
#
|
|
1166
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1167
|
+
# client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
|
|
1168
|
+
#
|
|
1169
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1170
|
+
# request = Google::Cloud::Memorystore::V1beta::GetAclPolicyRevisionRequest.new
|
|
1171
|
+
#
|
|
1172
|
+
# # Call the get_acl_policy_revision method.
|
|
1173
|
+
# result = client.get_acl_policy_revision request
|
|
1174
|
+
#
|
|
1175
|
+
# # The returned object is of type Google::Cloud::Memorystore::V1beta::AclPolicyRevision.
|
|
1176
|
+
# p result
|
|
1177
|
+
#
|
|
1178
|
+
def get_acl_policy_revision request, options = nil
|
|
1179
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1180
|
+
|
|
1181
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetAclPolicyRevisionRequest
|
|
1182
|
+
|
|
1183
|
+
# Converts hash and nil to an options object
|
|
1184
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1185
|
+
|
|
1186
|
+
# Customize the options with defaults
|
|
1187
|
+
call_metadata = @config.rpcs.get_acl_policy_revision.metadata.to_h
|
|
1188
|
+
|
|
1189
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1190
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1191
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1192
|
+
gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
|
|
1193
|
+
transports_version_send: [:rest]
|
|
1194
|
+
|
|
1195
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1196
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1197
|
+
|
|
1198
|
+
options.apply_defaults timeout: @config.rpcs.get_acl_policy_revision.timeout,
|
|
1199
|
+
metadata: call_metadata,
|
|
1200
|
+
retry_policy: @config.rpcs.get_acl_policy_revision.retry_policy
|
|
1201
|
+
|
|
1202
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1203
|
+
metadata: @config.metadata,
|
|
1204
|
+
retry_policy: @config.retry_policy
|
|
1205
|
+
|
|
1206
|
+
@memorystore_stub.get_acl_policy_revision request, options do |result, operation|
|
|
1207
|
+
yield result, operation if block_given?
|
|
1208
|
+
end
|
|
1209
|
+
rescue ::Gapic::Rest::Error => e
|
|
1210
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1211
|
+
end
|
|
1212
|
+
|
|
1213
|
+
##
|
|
1214
|
+
# Lists all ACL policy revisions in a given ACL policy.
|
|
1215
|
+
#
|
|
1216
|
+
# @overload list_acl_policy_revisions(request, options = nil)
|
|
1217
|
+
# Pass arguments to `list_acl_policy_revisions` via a request object, either of type
|
|
1218
|
+
# {::Google::Cloud::Memorystore::V1beta::ListAclPolicyRevisionsRequest} or an equivalent Hash.
|
|
1219
|
+
#
|
|
1220
|
+
# @param request [::Google::Cloud::Memorystore::V1beta::ListAclPolicyRevisionsRequest, ::Hash]
|
|
1221
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1222
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1223
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1224
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1225
|
+
#
|
|
1226
|
+
# @overload list_acl_policy_revisions(parent: nil, page_size: nil, page_token: nil)
|
|
1227
|
+
# Pass arguments to `list_acl_policy_revisions` via keyword arguments. Note that at
|
|
1228
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1229
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1230
|
+
#
|
|
1231
|
+
# @param parent [::String]
|
|
1232
|
+
# Required. The resource name of the ACL policy to list revisions for.
|
|
1233
|
+
# Format: "projects/\\{project}/locations/\\{location}/aclPolicies/\\{acl_policy}"
|
|
1234
|
+
# @param page_size [::Integer]
|
|
1235
|
+
# Optional. The maximum number of items to return.
|
|
1236
|
+
# @param page_token [::String]
|
|
1237
|
+
# Optional. The `next_page_token` value returned from a previous
|
|
1238
|
+
# `ListAclPolicyRevisions` request, if any.
|
|
1239
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1240
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::AclPolicyRevision>]
|
|
1241
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1242
|
+
#
|
|
1243
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::AclPolicyRevision>]
|
|
1244
|
+
#
|
|
1245
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1246
|
+
#
|
|
1247
|
+
# @example Basic example
|
|
1248
|
+
# require "google/cloud/memorystore/v1beta"
|
|
1249
|
+
#
|
|
1250
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1251
|
+
# client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
|
|
1252
|
+
#
|
|
1253
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1254
|
+
# request = Google::Cloud::Memorystore::V1beta::ListAclPolicyRevisionsRequest.new
|
|
1255
|
+
#
|
|
1256
|
+
# # Call the list_acl_policy_revisions method.
|
|
1257
|
+
# result = client.list_acl_policy_revisions request
|
|
1258
|
+
#
|
|
1259
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1260
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1261
|
+
# result.each do |item|
|
|
1262
|
+
# # Each element is of type ::Google::Cloud::Memorystore::V1beta::AclPolicyRevision.
|
|
1263
|
+
# p item
|
|
1264
|
+
# end
|
|
1265
|
+
#
|
|
1266
|
+
def list_acl_policy_revisions request, options = nil
|
|
1267
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1268
|
+
|
|
1269
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListAclPolicyRevisionsRequest
|
|
1270
|
+
|
|
1271
|
+
# Converts hash and nil to an options object
|
|
1272
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1273
|
+
|
|
1274
|
+
# Customize the options with defaults
|
|
1275
|
+
call_metadata = @config.rpcs.list_acl_policy_revisions.metadata.to_h
|
|
1276
|
+
|
|
1277
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1278
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1279
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1280
|
+
gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
|
|
1281
|
+
transports_version_send: [:rest]
|
|
1282
|
+
|
|
1283
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1284
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1285
|
+
|
|
1286
|
+
options.apply_defaults timeout: @config.rpcs.list_acl_policy_revisions.timeout,
|
|
1287
|
+
metadata: call_metadata,
|
|
1288
|
+
retry_policy: @config.rpcs.list_acl_policy_revisions.retry_policy
|
|
1289
|
+
|
|
1290
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1291
|
+
metadata: @config.metadata,
|
|
1292
|
+
retry_policy: @config.retry_policy
|
|
1293
|
+
|
|
1294
|
+
@memorystore_stub.list_acl_policy_revisions request, options do |result, operation|
|
|
1295
|
+
result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_acl_policy_revisions, "acl_policy_revisions", request, result, options
|
|
1296
|
+
yield result, operation if block_given?
|
|
1297
|
+
throw :response, result
|
|
1298
|
+
end
|
|
1299
|
+
rescue ::Gapic::Rest::Error => e
|
|
1300
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1301
|
+
end
|
|
1302
|
+
|
|
624
1303
|
##
|
|
625
1304
|
# Deletes a single Instance.
|
|
626
1305
|
#
|
|
@@ -2569,17 +3248,17 @@ module Google
|
|
|
2569
3248
|
# @example
|
|
2570
3249
|
#
|
|
2571
3250
|
# # Modify the global config, setting the timeout for
|
|
2572
|
-
# #
|
|
3251
|
+
# # list_acl_policies to 20 seconds,
|
|
2573
3252
|
# # and all remaining timeouts to 10 seconds.
|
|
2574
3253
|
# ::Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.configure do |config|
|
|
2575
3254
|
# config.timeout = 10.0
|
|
2576
|
-
# config.rpcs.
|
|
3255
|
+
# config.rpcs.list_acl_policies.timeout = 20.0
|
|
2577
3256
|
# end
|
|
2578
3257
|
#
|
|
2579
3258
|
# # Apply the above configuration only to a new client.
|
|
2580
3259
|
# client = ::Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new do |config|
|
|
2581
3260
|
# config.timeout = 10.0
|
|
2582
|
-
# config.rpcs.
|
|
3261
|
+
# config.rpcs.list_acl_policies.timeout = 20.0
|
|
2583
3262
|
# end
|
|
2584
3263
|
#
|
|
2585
3264
|
# @!attribute [rw] endpoint
|
|
@@ -2708,27 +3387,62 @@ module Google
|
|
|
2708
3387
|
# trigger a retry.
|
|
2709
3388
|
#
|
|
2710
3389
|
class Rpcs
|
|
3390
|
+
##
|
|
3391
|
+
# RPC-specific configuration for `list_acl_policies`
|
|
3392
|
+
# @return [::Gapic::Config::Method]
|
|
3393
|
+
#
|
|
3394
|
+
attr_reader :list_acl_policies
|
|
2711
3395
|
##
|
|
2712
3396
|
# RPC-specific configuration for `list_instances`
|
|
2713
3397
|
# @return [::Gapic::Config::Method]
|
|
2714
3398
|
#
|
|
2715
3399
|
attr_reader :list_instances
|
|
2716
3400
|
##
|
|
3401
|
+
# RPC-specific configuration for `get_acl_policy`
|
|
3402
|
+
# @return [::Gapic::Config::Method]
|
|
3403
|
+
#
|
|
3404
|
+
attr_reader :get_acl_policy
|
|
3405
|
+
##
|
|
2717
3406
|
# RPC-specific configuration for `get_instance`
|
|
2718
3407
|
# @return [::Gapic::Config::Method]
|
|
2719
3408
|
#
|
|
2720
3409
|
attr_reader :get_instance
|
|
2721
3410
|
##
|
|
3411
|
+
# RPC-specific configuration for `create_acl_policy`
|
|
3412
|
+
# @return [::Gapic::Config::Method]
|
|
3413
|
+
#
|
|
3414
|
+
attr_reader :create_acl_policy
|
|
3415
|
+
##
|
|
2722
3416
|
# RPC-specific configuration for `create_instance`
|
|
2723
3417
|
# @return [::Gapic::Config::Method]
|
|
2724
3418
|
#
|
|
2725
3419
|
attr_reader :create_instance
|
|
2726
3420
|
##
|
|
3421
|
+
# RPC-specific configuration for `update_acl_policy`
|
|
3422
|
+
# @return [::Gapic::Config::Method]
|
|
3423
|
+
#
|
|
3424
|
+
attr_reader :update_acl_policy
|
|
3425
|
+
##
|
|
2727
3426
|
# RPC-specific configuration for `update_instance`
|
|
2728
3427
|
# @return [::Gapic::Config::Method]
|
|
2729
3428
|
#
|
|
2730
3429
|
attr_reader :update_instance
|
|
2731
3430
|
##
|
|
3431
|
+
# RPC-specific configuration for `delete_acl_policy`
|
|
3432
|
+
# @return [::Gapic::Config::Method]
|
|
3433
|
+
#
|
|
3434
|
+
attr_reader :delete_acl_policy
|
|
3435
|
+
##
|
|
3436
|
+
# RPC-specific configuration for `get_acl_policy_revision`
|
|
3437
|
+
# @return [::Gapic::Config::Method]
|
|
3438
|
+
#
|
|
3439
|
+
attr_reader :get_acl_policy_revision
|
|
3440
|
+
##
|
|
3441
|
+
# RPC-specific configuration for `list_acl_policy_revisions`
|
|
3442
|
+
# @return [::Gapic::Config::Method]
|
|
3443
|
+
#
|
|
3444
|
+
attr_reader :list_acl_policy_revisions
|
|
3445
|
+
##
|
|
2732
3446
|
# RPC-specific configuration for `delete_instance`
|
|
2733
3447
|
# @return [::Gapic::Config::Method]
|
|
2734
3448
|
#
|
|
@@ -2836,14 +3550,28 @@ module Google
|
|
|
2836
3550
|
|
|
2837
3551
|
# @private
|
|
2838
3552
|
def initialize parent_rpcs = nil
|
|
3553
|
+
list_acl_policies_config = parent_rpcs.list_acl_policies if parent_rpcs.respond_to? :list_acl_policies
|
|
3554
|
+
@list_acl_policies = ::Gapic::Config::Method.new list_acl_policies_config
|
|
2839
3555
|
list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
|
|
2840
3556
|
@list_instances = ::Gapic::Config::Method.new list_instances_config
|
|
3557
|
+
get_acl_policy_config = parent_rpcs.get_acl_policy if parent_rpcs.respond_to? :get_acl_policy
|
|
3558
|
+
@get_acl_policy = ::Gapic::Config::Method.new get_acl_policy_config
|
|
2841
3559
|
get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
|
|
2842
3560
|
@get_instance = ::Gapic::Config::Method.new get_instance_config
|
|
3561
|
+
create_acl_policy_config = parent_rpcs.create_acl_policy if parent_rpcs.respond_to? :create_acl_policy
|
|
3562
|
+
@create_acl_policy = ::Gapic::Config::Method.new create_acl_policy_config
|
|
2843
3563
|
create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
|
|
2844
3564
|
@create_instance = ::Gapic::Config::Method.new create_instance_config
|
|
3565
|
+
update_acl_policy_config = parent_rpcs.update_acl_policy if parent_rpcs.respond_to? :update_acl_policy
|
|
3566
|
+
@update_acl_policy = ::Gapic::Config::Method.new update_acl_policy_config
|
|
2845
3567
|
update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
|
|
2846
3568
|
@update_instance = ::Gapic::Config::Method.new update_instance_config
|
|
3569
|
+
delete_acl_policy_config = parent_rpcs.delete_acl_policy if parent_rpcs.respond_to? :delete_acl_policy
|
|
3570
|
+
@delete_acl_policy = ::Gapic::Config::Method.new delete_acl_policy_config
|
|
3571
|
+
get_acl_policy_revision_config = parent_rpcs.get_acl_policy_revision if parent_rpcs.respond_to? :get_acl_policy_revision
|
|
3572
|
+
@get_acl_policy_revision = ::Gapic::Config::Method.new get_acl_policy_revision_config
|
|
3573
|
+
list_acl_policy_revisions_config = parent_rpcs.list_acl_policy_revisions if parent_rpcs.respond_to? :list_acl_policy_revisions
|
|
3574
|
+
@list_acl_policy_revisions = ::Gapic::Config::Method.new list_acl_policy_revisions_config
|
|
2847
3575
|
delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
|
|
2848
3576
|
@delete_instance = ::Gapic::Config::Method.new delete_instance_config
|
|
2849
3577
|
get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority
|