google-cloud-storage 1.35.0 → 1.36.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46a00811174d5f74691bc49b43c14fe9a541f3c964c332eb9bccc4d2e85778cd
4
- data.tar.gz: 0425d311a50177d6321a172958a6b2afef376a2c13f3dd3d5aa5d07ce974b773
3
+ metadata.gz: 70af6e7a7384139db86fc433215199b3a0f6f03fdc36bf2712e3e3e5d5b8b4b5
4
+ data.tar.gz: 34d028c9cc7b0125861db575ca23cc18601bdfb0f72642d491097f97f4f6a41b
5
5
  SHA512:
6
- metadata.gz: dd0fb3dd2b5d31ce65febca446c4826e72384de658bcf9bb66b349a2f8304c8494c86a6a88263dd38add67fd6083f375f436ffcad225413a7d803ee67c4a351c
7
- data.tar.gz: f62d337690f49269a0839d1dfe65f998da7fb1e6a530c151a11eb4a890fc1942321b6c34ef34c9b932b59ab33a0a74ffb6a3b082d1e6688cfd4ddf9a48b478b3
6
+ metadata.gz: cbee86e3123720e8bc8a74daf22cdcf1f5fdfb111279a00d0b4e8f50fd508b92b952651fcdf5efcb3e612be84fc00fec7e897571b62c05917c7ed6a0ccddc40a
7
+ data.tar.gz: d8c4f3820eb06abb5913623b6e04e42a66e51fb961a046ce99eb78b44b1adca85ec1159018c6b14689e0bcd58807d3f476eb6d945fd01bb7cdf6b69d928ecf23
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.36.0 / 2022-01-12
4
+
5
+ #### Features
6
+
7
+ * add support for RPO (turbo replication). ([#14407](https://www.github.com/googleapis/google-cloud-ruby/issues/14407))
8
+
3
9
  ### 1.35.0 / 2021-12-08
4
10
 
5
11
  #### Features
@@ -1035,6 +1035,62 @@ module Google
1035
1035
 
1036
1036
  alias public_access_prevention_unspecified? public_access_prevention_inherited?
1037
1037
 
1038
+ ##
1039
+ # Recovery Point Objective (RPO) is another attribute of a bucket, it measures how long it takes for a set of
1040
+ # updates to be asynchronously copied to the other region.
1041
+ # Currently, `DEFAULT` and `ASYNC_TURBO` are supported. When set to `ASYNC_TURBO`, Turbo Replication is enabled
1042
+ # for a bucket. `DEFAULT` is used to reset rpo on an existing bucket with rpo set to `ASYNC_TURBO`.
1043
+ # This value can be modified by calling {#rpo=}.
1044
+ #
1045
+ # @return [String, nil] Currently, `DEFAULT` and `ASYNC_TURBO` are supported. Returns `nil` if the bucket has
1046
+ # no RPO.
1047
+ #
1048
+ # @example
1049
+ # require "google/cloud/storage"
1050
+ #
1051
+ # storage = Google::Cloud::Storage.new
1052
+ #
1053
+ # bucket = storage.bucket "my-bucket"
1054
+ #
1055
+ # bucket.rpo = :DEFAULT
1056
+ # bucket.rpo #=> "DEFAULT"
1057
+ #
1058
+ def rpo
1059
+ @gapi.rpo
1060
+ end
1061
+
1062
+ ##
1063
+ # Sets the value for Recovery Point Objective (RPO) in the bucket. This value can be queried by calling {#rpo}.
1064
+ #
1065
+ # @param [Symbol, String] new_rpo The bucket's new Recovery Point Objective metadata.
1066
+ # Currently, `DEFAULT` and `ASYNC_TURBO` are supported. When set to `ASYNC_TURBO`, Turbo Replication
1067
+ # is enabled for a bucket.
1068
+ #
1069
+ # @example Set RPO to DEFAULT:
1070
+ # require "google/cloud/storage"
1071
+ #
1072
+ # storage = Google::Cloud::Storage.new
1073
+ #
1074
+ # bucket = storage.bucket "my-bucket"
1075
+ #
1076
+ # bucket.rpo = :DEFAULT
1077
+ # bucket.rpo #=> "DEFAULT"
1078
+ #
1079
+ # @example Set RPO to ASYNC_TURBO:
1080
+ # require "google/cloud/storage"
1081
+ #
1082
+ # storage = Google::Cloud::Storage.new
1083
+ #
1084
+ # bucket = storage.bucket "my-bucket"
1085
+ #
1086
+ # bucket.rpo = :ASYNC_TURBO
1087
+ # bucket.rpo #=> "ASYNC_TURBO"
1088
+ #
1089
+ def rpo= new_rpo
1090
+ @gapi.rpo = new_rpo&.to_s
1091
+ patch_gapi! :rpo
1092
+ end
1093
+
1038
1094
  ##
1039
1095
  # Updates the bucket with changes made in the given block in a single
1040
1096
  # PATCH request. The following attributes may be set: {#cors},
@@ -364,11 +364,18 @@ module Google
364
364
  # b.lifecycle.add_set_storage_class_rule "COLDLINE", age: 10
365
365
  # end
366
366
  #
367
- def create_bucket bucket_name, acl: nil, default_acl: nil,
368
- location: nil, storage_class: nil,
369
- logging_bucket: nil, logging_prefix: nil,
370
- website_main: nil, website_404: nil, versioning: nil,
371
- requester_pays: nil, user_project: nil
367
+ def create_bucket bucket_name,
368
+ acl: nil,
369
+ default_acl: nil,
370
+ location: nil,
371
+ storage_class: nil,
372
+ logging_bucket: nil,
373
+ logging_prefix: nil,
374
+ website_main: nil,
375
+ website_404: nil,
376
+ versioning: nil,
377
+ requester_pays: nil,
378
+ user_project: nil
372
379
  params = {
373
380
  name: bucket_name,
374
381
  location: location
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Storage
19
- VERSION = "1.35.0".freeze
19
+ VERSION = "1.36.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.35.0
4
+ version: 1.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-12-08 00:00:00.000000000 Z
12
+ date: 2022-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -318,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
318
  - !ruby/object:Gem::Version
319
319
  version: '0'
320
320
  requirements: []
321
- rubygems_version: 3.2.17
321
+ rubygems_version: 3.3.4
322
322
  signing_key:
323
323
  specification_version: 4
324
324
  summary: API Client library for Google Cloud Storage