Class: Google::Apis::StoragebatchoperationsV1::RewriteObject
- Inherits:
-
Object
- Object
- Google::Apis::StoragebatchoperationsV1::RewriteObject
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/storagebatchoperations_v1/classes.rb,
lib/google/apis/storagebatchoperations_v1/representations.rb,
lib/google/apis/storagebatchoperations_v1/representations.rb
Overview
Describes options for object rewrite.
Instance Attribute Summary collapse
-
#kms_key ⇒ String
Optional.
-
#storage_class ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RewriteObject
constructor
A new instance of RewriteObject.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RewriteObject
Returns a new instance of RewriteObject.
1334 1335 1336 |
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1334 def initialize(**args) update!(**args) end |
Instance Attribute Details
#kms_key ⇒ String
Optional. Resource name of the Cloud KMS key that is used to encrypt the
object. The Cloud KMS key must be located in same location as the object. For
details, see https://cloud.google.com/storage/docs/encryption/using-customer-
managed-keys#add-object-key Format: projects/project_id/locations/location
/keyRings/keyring/cryptoKeys/key`For example:projects/123456/locations/
us-central1/keyRings/my-keyring/cryptoKeys/my-key. The object will be
rewritten and set with the specified KMS key.
Corresponds to the JSON propertykmsKey`
1324 1325 1326 |
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1324 def kms_key @kms_key end |
#storage_class ⇒ String
Optional. Rewrites the object to the specified storage class. Setting this
field will perform a full byte copy of the object if the storage class is
different from the object's current storage class. If Autoclass is enabled on
the bucket, storage class changes are ignored by Cloud Storage.
Corresponds to the JSON property storageClass
1332 1333 1334 |
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1332 def storage_class @storage_class end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1339 1340 1341 1342 |
# File 'lib/google/apis/storagebatchoperations_v1/classes.rb', line 1339 def update!(**args) @kms_key = args[:kms_key] if args.key?(:kms_key) @storage_class = args[:storage_class] if args.key?(:storage_class) end |