google-cloud-storage 1.35.0 → 1.36.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46a00811174d5f74691bc49b43c14fe9a541f3c964c332eb9bccc4d2e85778cd
4
- data.tar.gz: 0425d311a50177d6321a172958a6b2afef376a2c13f3dd3d5aa5d07ce974b773
3
+ metadata.gz: 4c20986682a3f95c8fbea7f0132f5196d35f7978ba2b873530332a9709d3316c
4
+ data.tar.gz: 14de14960774f46eeaf07bbf9d8188228441dfdd8cb7b2c9a3649869f0909258
5
5
  SHA512:
6
- metadata.gz: dd0fb3dd2b5d31ce65febca446c4826e72384de658bcf9bb66b349a2f8304c8494c86a6a88263dd38add67fd6083f375f436ffcad225413a7d803ee67c4a351c
7
- data.tar.gz: f62d337690f49269a0839d1dfe65f998da7fb1e6a530c151a11eb4a890fc1942321b6c34ef34c9b932b59ab33a0a74ffb6a3b082d1e6688cfd4ddf9a48b478b3
6
+ metadata.gz: 95d9b766685011b4421ff24fb2ceaa8aa42a8c89e9ad12aab6ca3e496bf01788ef9bd191554acefa9e9d2be0154292fd56d78953bf731446b65a20c97cc3ee51
7
+ data.tar.gz: b8748e786883a80b98fa77c927342656bb54ba69d8e309b2a11076bde8667671b2f0398abf694b49538761aa4bad08f5b59c4d39a38923f3afd1695f385a8e1c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Release History
2
2
 
3
+ ### 1.36.2 (2022-04-20)
4
+
5
+ #### Documentation
6
+
7
+ * Document support for dual region buckets
8
+
9
+ ### 1.36.1 / 2022-02-08
10
+
11
+ #### Documentation
12
+
13
+ * Update the RPO sample output. ([#17277](https://www.github.com/googleapis/google-cloud-ruby/issues/17277))
14
+
15
+ ### 1.36.0 / 2022-01-12
16
+
17
+ #### Features
18
+
19
+ * add support for RPO (turbo replication). ([#14407](https://www.github.com/googleapis/google-cloud-ruby/issues/14407))
20
+
3
21
  ### 1.35.0 / 2021-12-08
4
22
 
5
23
  #### Features
@@ -279,7 +279,7 @@ module Google
279
279
  #
280
280
  # @return [String]
281
281
  #
282
- # @see https://cloud.google.com/storage/docs/concepts-techniques
282
+ # @see https://cloud.google.com/storage/docs/locations
283
283
  #
284
284
  def location
285
285
  @gapi.location
@@ -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},
@@ -288,12 +288,11 @@ module Google
288
288
  # roles.
289
289
  # * `public`, `public_read`, `publicRead` - File owner gets OWNER
290
290
  # access, and allUsers get READER access.
291
- # @param [String] location The location of the bucket. Object data for
292
- # objects in the bucket resides in physical storage within this
293
- # region. Possible values include `ASIA`, `EU`, and `US`. (See the
294
- # [developer's
295
- # guide](https://cloud.google.com/storage/docs/bucket-locations) for
296
- # the authoritative list. The default value is `US`.
291
+ # @param [String] location The location of the bucket. Optional.
292
+ # If not passed, the default location, 'US', will be used.
293
+ # If specifying a dual-region location, the regions can be specified
294
+ # by joining them with a plus sign, for example 'US-CENTRAL1+US-WEST1'. See:
295
+ # [Storage Locaitons](https://cloud.google.com/storage/docs/locations).
297
296
  # @param [String] logging_bucket The destination bucket for the bucket's
298
297
  # logs. For more information, see [Access
299
298
  # Logs](https://cloud.google.com/storage/docs/access-logs).
@@ -364,11 +363,18 @@ module Google
364
363
  # b.lifecycle.add_set_storage_class_rule "COLDLINE", age: 10
365
364
  # end
366
365
  #
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
366
+ def create_bucket bucket_name,
367
+ acl: nil,
368
+ default_acl: nil,
369
+ location: nil,
370
+ storage_class: nil,
371
+ logging_bucket: nil,
372
+ logging_prefix: nil,
373
+ website_main: nil,
374
+ website_404: nil,
375
+ versioning: nil,
376
+ requester_pays: nil,
377
+ user_project: nil
372
378
  params = {
373
379
  name: bucket_name,
374
380
  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.2".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.2
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-04-20 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.5
322
322
  signing_key:
323
323
  specification_version: 4
324
324
  summary: API Client library for Google Cloud Storage