Index
Storage
(interface)AppendObjectSpec
(message)BidiReadHandle
(message)BidiReadObjectError
(message)BidiReadObjectRedirectedError
(message)BidiReadObjectRequest
(message)BidiReadObjectResponse
(message)BidiReadObjectSpec
(message)BidiWriteHandle
(message)BidiWriteObjectRedirectedError
(message)BidiWriteObjectRequest
(message)BidiWriteObjectResponse
(message)Bucket
(message)Bucket.Autoclass
(message)Bucket.Billing
(message)Bucket.Cors
(message)Bucket.CustomPlacementConfig
(message)Bucket.Encryption
(message)Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig
(message)Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig
(message)Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig
(message)Bucket.HierarchicalNamespace
(message)Bucket.IamConfig
(message)Bucket.IamConfig.UniformBucketLevelAccess
(message)Bucket.IpFilter
(message)Bucket.IpFilter.PublicNetworkSource
(message)Bucket.IpFilter.VpcNetworkSource
(message)Bucket.Lifecycle
(message)Bucket.Lifecycle.Rule
(message)Bucket.Lifecycle.Rule.Action
(message)Bucket.Lifecycle.Rule.Condition
(message)Bucket.Logging
(message)Bucket.ObjectRetention
(message)Bucket.RetentionPolicy
(message)Bucket.SoftDeletePolicy
(message)Bucket.Versioning
(message)Bucket.Website
(message)BucketAccessControl
(message)CancelResumableWriteRequest
(message)CancelResumableWriteResponse
(message)ChecksummedData
(message)CommonObjectRequestParams
(message)ComposeObjectRequest
(message)ComposeObjectRequest.SourceObject
(message)ComposeObjectRequest.SourceObject.ObjectPreconditions
(message)ContentRange
(message)CreateBucketRequest
(message)CustomerEncryption
(message)DeleteBucketRequest
(message)DeleteObjectRequest
(message)GetBucketRequest
(message)GetObjectRequest
(message)ListBucketsRequest
(message)ListBucketsResponse
(message)ListObjectsRequest
(message)ListObjectsResponse
(message)LockBucketRetentionPolicyRequest
(message)MoveObjectRequest
(message)Object
(message)Object.Retention
(message)Object.Retention.Mode
(enum)ObjectAccessControl
(message)ObjectChecksums
(message)ObjectRangeData
(message)Owner
(message)ProjectTeam
(message)QueryWriteStatusRequest
(message)QueryWriteStatusResponse
(message)ReadObjectRequest
(message)ReadObjectResponse
(message)ReadRange
(message)ReadRangeError
(message)RestoreObjectRequest
(message)RewriteObjectRequest
(message)RewriteResponse
(message)ServiceConstants
(message)ServiceConstants.Values
(enum)StartResumableWriteRequest
(message)StartResumableWriteResponse
(message)UpdateBucketRequest
(message)UpdateObjectRequest
(message)WriteObjectRequest
(message)WriteObjectResponse
(message)WriteObjectSpec
(message)
Storage
API Overview and Naming Syntax
The Cloud Storage gRPC API allows applications to read and write data through the abstractions of buckets and objects. For a description of these abstractions please see Cloud Storage documentation.
Resources are named as follows:
- Projects are referred to as they are defined by the Resource Manager API, using strings like
projects/123456
orprojects/my-string-id
. - Buckets are named using string names of the form:
projects/{project}/buckets/{bucket}
. For globally unique buckets,_
may be substituted for the project. - Objects are uniquely identified by their name along with the name of the bucket they belong to, as separate strings in this API. For example:
ReadObjectRequest {
bucket: 'projects/_/buckets/my-bucket'
object: 'my-object'
}
Note that object names can contain /
characters, which are treated as any other character (no special directory semantics).
BidiReadObject |
---|
Reads an object's data. This bi-directional API reads data from an object, allowing you to request multiple data ranges within a single stream, even across several messages. If an error occurs with any request, the stream closes with a relevant error code. Since you can have multiple outstanding requests, the error response includes a IAM Permissions: Requires
|
BidiWriteObject |
---|
Stores a new object and metadata. This is similar to the The client may specify one or both of the
|
CancelResumableWrite |
---|
Cancels an in-progress resumable upload. Any attempts to write to the resumable upload after cancelling the upload fail. The behavior for any in-progress write operations is not guaranteed; they could either complete before the cancellation or fail if the cancellation completes first.
|
ComposeObject |
---|
Concatenates a list of existing objects into a new object in the same bucket. The existing source objects are unaffected by this operation. For information about object composition, see Composite objects and for information about tool-specific guides to perform a composition, see Compose objects. IAM Permissions: Requires the
|
CreateBucket |
---|
Creates a new bucket. IAM Permissions: Requires
|
DeleteBucket |
---|
Permanently deletes an empty bucket. The request fails if there are any live or noncurrent objects in the bucket, but the request succeeds if the bucket only contains soft-deleted objects or incomplete uploads, such as ongoing XML API multipart uploads. Does not permanently delete soft-deleted objects. When this API is used to delete a bucket containing an object that has a soft delete policy enabled, the object becomes soft deleted, and the Objects and multipart uploads that were in the bucket at the time of deletion are also retained for the specified retention duration. When a soft-deleted bucket reaches the end of its retention duration, it is permanently deleted. The IAM Permissions: Requires
|
DeleteObject |
---|
Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used, or if soft delete is not enabled for the bucket. When this API is used to delete an object from a bucket that has soft delete policy enabled, the object becomes soft deleted, and the You can use the IAM Permissions: Requires
|
GetBucket |
---|
Returns metadata for the specified bucket. IAM Permissions: Requires
|
GetIamPolicy |
---|
Gets the IAM policy for a specified bucket or managed folder. The IAM Permissions: Requires
|
GetObject |
---|
Retrieves object metadata. IAM Permissions: Requires
|
ListBuckets |
---|
Retrieves a list of buckets for a given project, ordered lexicographically by name. IAM Permissions: Requires
|
ListObjects |
---|
Retrieves a list of objects matching the criteria. IAM Permissions: The authenticated user requires
|
LockBucketRetentionPolicy |
---|
Permanently locks the retention policy that is currently applied to the specified bucket. Caution: Locking a bucket is an irreversible action. Once you lock a bucket:
Once locked, you must delete the entire bucket in order to remove the bucket's retention policy. However, before you can delete the bucket, you must delete all the objects in the bucket, which is only possible if all the objects have reached the retention period set by the retention policy. IAM Permissions: Requires
|
MoveObject |
---|
Moves the source object to the destination object in the same bucket. This operation moves a source object to a destination object in the same bucket by renaming the object. The move itself is an atomic transaction, ensuring all steps either complete successfully or no changes are made. IAM Permissions: Requires the following IAM permissions to use this method:
|
QueryWriteStatus |
---|
Determines the If the object does not exist, meaning if it was deleted, or the first This method is useful for clients that buffer data and need to know which data can be safely evicted. The client can call
|
ReadObject |
---|
Retrieves object data. IAM Permissions: Requires
|
RestoreObject |
---|
Restores a soft-deleted object. When a soft-deleted object is restored, a new copy of that object is created in the same bucket and inherits the same metadata as the soft-deleted object. The inherited metadata is the metadata that existed when the original object became soft deleted, with the following exceptions:
If a live object using the same name already exists in the bucket and becomes overwritten, the live object becomes a noncurrent object if Object Versioning is enabled on the bucket. If Object Versioning is not enabled, the live object becomes soft deleted. IAM Permissions: Requires the following IAM permissions to use this method:
|
RewriteObject |
---|
Rewrites a source object to a destination object. Optionally overrides metadata.
|
SetIamPolicy |
---|
Updates an IAM policy for the specified bucket or managed folder. The
|
StartResumableWrite |
---|
Starts a resumable write operation. This method is part of the Resumable upload feature. This allows you to upload large objects in multiple chunks, which is more resilient to network interruptions than a single upload. The validity duration of the write operation, and the consequences of it becoming invalid, are service-dependent. IAM Permissions: Requires
|
TestIamPermissions |
---|
Tests a set of permissions on the given bucket, object, or managed folder to see which, if any, are held by the caller. The
|
UpdateBucket |
---|
Updates a bucket. Changes to the bucket are readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics. IAM Permissions: Requires
|
UpdateObject |
---|
Updates an object's metadata. Equivalent to JSON API's storage.objects.patch.
|
WriteObject |
---|
Stores a new object and metadata. An object can be written either in a single message stream or in a resumable sequence of message streams. To write using a single stream, the client should include in the first message of the stream an For a resumable write, the client should instead call
The service does not view the object as complete until the client has sent a Attempting to resume an already finalized object results in an Alternatively, you can use the IAM Permissions: Requires
|
AppendObjectSpec
Describes an attempt to append to an object, possibly over multiple requests.
Fields | |
---|---|
bucket |
Required. The name of the bucket containing the object to write. |
object |
Required. The name of the object to open for writing. |
generation |
Required. The generation number of the object to open for writing. |
if_metageneration_match |
Makes the operation conditional on whether the object's current metageneration matches the given value. Note that metageneration preconditions are only checked if |
if_metageneration_not_match |
Makes the operation conditional on whether the object's current metageneration does not match the given value. Note that metageneration preconditions are only checked if |
routing_token |
An optional routing token that influences request routing for the stream. Must be provided if a BidiWriteObjectRedirectedError is returned. |
write_handle |
An optional write handle returned from a previous Note that metageneration preconditions are only checked if |
BidiReadHandle
BidiReadHandle
contains a handle from a previous BiDiReadObject
invocation. The client can use this instead of BidiReadObjectSpec
as an optimized way of opening subsequent bidirectional streams to the same object.
Fields | |
---|---|
handle |
Required. Opaque value describing a previous read. |
BidiReadObjectError
Error extension proto containing details for all outstanding reads on the failed stream
Fields | |
---|---|
read_range_errors[] |
The error code for each outstanding read_range |
BidiReadObjectRedirectedError
Error proto containing details for a redirected read. This error may be attached as details for an ABORTED response to BidiReadObject
.
Fields | |
---|---|
read_handle |
The read handle for the redirected read. If set, the client may use this in the BidiReadObjectSpec when retrying the read stream. |
routing_token |
The routing token the client must use when retrying the read stream. This value must be provided in the header |
BidiReadObjectRequest
Request message for BidiReadObject
.
Fields | |
---|---|
read_object_spec |
Optional. The first message of each stream should set this field. If this is not the first message, an error is returned. Describes the object to read. |
read_ranges[] |
Optional. Provides a list of 0 or more (up to 100) ranges to read. If a single range is large enough to require multiple responses, they are guaranteed to be delivered in increasing offset order. There are no ordering guarantees across ranges. When no ranges are provided, the response message will not include ObjectRangeData. For full object downloads, the offset and size can be set to 0. |
BidiReadObjectResponse
Response message for BidiReadObject
.
Fields | |
---|---|
object_data_ranges[] |
A portion of the object's data. The service may leave data empty for any given ReadResponse. This enables the service to inform the client that the request is still live while it is running an operation to generate more data. The service may pipeline multiple responses belonging to different read requests. Each ObjectRangeData entry will have a read_id set to the same value as the corresponding source read request. |
metadata |
Metadata of the object whose media is being returned. Only populated in the first response in the stream and not populated when the stream is opened with a read handle. |
read_handle |
This field is periodically refreshed, however it may not be set in every response. It allows the client to more efficiently open subsequent bidirectional streams to the same object. |
BidiReadObjectSpec
Describes the object to read in a BidiReadObject
request.
Fields | |
---|---|
bucket |
Required. The name of the bucket containing the object to read. |
object |
Required. The name of the object to read. |
generation |
Optional. If present, selects a specific revision of this object (as opposed to the latest version, the default). |
common_object_request_params |
Optional. A set of parameters common to Storage API requests concerning an object. |
if_generation_match |
Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
if_generation_not_match |
Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
if_metageneration_match |
Makes the operation conditional on whether the object's current metageneration matches the given value. |
if_metageneration_not_match |
Makes the operation conditional on whether the object's current metageneration does not match the given value. |
read_mask |
Mask specifying which fields to read. The |
read_handle |
The client can optionally set this field. The read handle is an optimized way of creating new streams. Read handles are generated and periodically refreshed from prior reads. |
routing_token |
The routing token that influences request routing for the stream. Must be provided if a |
BidiWriteHandle
BidiWriteHandle
contains a handle from a previous BidiWriteObject
invocation. The client can use this as an optimized way of opening subsequent bidirectional streams to the same object.
Fields | |
---|---|
handle |
Required. Opaque value describing a previous write. |
BidiWriteObjectRedirectedError
Error proto containing details for a redirected write. This error may be attached as details for an ABORTED
response to BidiWriteObject
.
Fields | |
---|---|
routing_token |
The routing token the client must use when retrying the write stream. This value must be provided in the header |
write_handle |
Opaque value describing a previous write. If set, the client must use this in an AppendObjectSpec first_message when retrying the write stream. If not set, clients may retry the original request. |
generation |
The generation of the object that triggered the redirect. This is set iff write_handle is set. If set, the client must use this in an AppendObjectSpec first_message when retrying the write stream. |
BidiWriteObjectRequest
Request message for BidiWriteObject
.
Fields | |
---|---|
write_offset |
Required. The offset from the beginning of the object at which the data should be written. In the first On subsequent calls, this value must be no larger than the sum of the first An invalid value will cause an error. |
object_checksums |
Optional. Checksums for the complete object. If the checksums computed by the service don't match the specified checksums the call will fail. May only be provided in the first request or the last request (with finish_write set). |
state_lookup |
Optional. For each |
flush |
Optional. Persists data written on the stream, up to and including the current message, to permanent storage. This option should be used sparingly as it may reduce performance. Ongoing writes will periodically be persisted on the server even when |
finish_write |
Optional. If |
common_object_request_params |
Optional. A set of parameters common to Storage API requests concerning an object. |
Union field first_message . The first message of each stream should set one of the following. first_message can be only one of the following: |
|
upload_id |
For resumable uploads. This should be the |
write_object_spec |
For non-resumable uploads. Describes the overall upload, including the destination bucket and object name, preconditions, etc. |
append_object_spec |
For appendable uploads. Describes the object to append to. |
Union field data . A portion of the data for the object. data can be only one of the following: |
|
checksummed_data |
The data to insert. If a crc32c checksum is provided that doesn't match the checksum computed by the service, the request will fail. |
BidiWriteObjectResponse
Response message for BidiWriteObject.
Fields | |
---|---|
Union field write_status . The response will set one of the following. write_status can be only one of the following: |
|
persisted_size |
The total number of bytes that have been processed for the given object from all |
resource |
A resource containing the metadata for the uploaded object. Only set if the upload has finalized. |
write_handle |
An optional write handle that will periodically be present in response messages. Clients should save it for later use in establishing a new stream if a connection is interrupted. |
Bucket
A bucket.
Fields | |
---|---|
name |
Identifier. The name of the bucket. Format: |
bucket_id |
Output only. The ID of the bucket. For buckets, the |
etag |
The etag of the bucket. If included in the metadata of an update bucket request, the operation will only be performed if the etag matches that of the bucket. |
project |
Immutable. The project which owns this bucket, in the format of |
metageneration |
Output only. The metadata generation of this bucket. |
location |
Immutable. The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to |
location_type |
Output only. The location type of the bucket (region, dual-region, multi-region, etc). |
storage_class |
Optional. The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. If this value is not specified when the bucket is created, it will default to |
rpo |
Optional. The recovery point objective for cross-region replication of the bucket. Applicable only for dual- and multi-region buckets. |
acl[] |
Optional. Access controls on the bucket. If |
default_object_acl[] |
Optional. Default access controls to apply to new objects when no ACL is provided. If iam_config.uniform_bucket_level_access is enabled on this bucket, requests to set, read, or modify acl is an error. |
lifecycle |
Optional. The bucket's lifecycle configuration. For more information, see Object Lifecycle Management. |
create_time |
Output only. The creation time of the bucket. |
cors[] |
Optional. The bucket's CORS configuration. |
update_time |
Output only. The modification time of the bucket. |
default_event_based_hold |
Optional. The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects are subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. |
labels |
Optional. User-provided labels, in key/value pairs. |
website |
Optional. The bucket's website config, controlling how the service behaves when accessing bucket contents as a web site. For details, see Static website examples. |
versioning |
Optional. The bucket's versioning config. |
logging |
Optional. The bucket's logging config, which defines the destination bucket and name prefix (if any) for the current bucket's logs. |
owner |
Output only. The owner of the bucket. This is always the project team's owner group. |
encryption |
Optional. Encryption config for a bucket. |
billing |
Optional. The bucket's billing config. |
retention_policy |
Optional. The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a |
iam_config |
Optional. The bucket's IAM config. |
satisfies_pzs |
Optional. Reserved for future use. |
custom_placement_config |
Optional. Configuration that, if present, specifies the data placement for a configurable dual-region. |
autoclass |
Optional. The bucket's Autoclass configuration. If there is no configuration, the Autoclass feature is disabled and has no effect on the bucket. |
hierarchical_namespace |
Optional. The bucket's hierarchical namespace configuration. If there is no configuration, the hierarchical namespace feature is disabled and have no effect on the bucket. |
soft_delete_policy |
Optional. The bucket's soft delete policy. The soft delete policy prevents soft-deleted objects from being permanently deleted. |
object_retention |
Optional. The bucket's object retention configuration. Must be enabled before objects in the bucket may have retention configured. |
ip_filter |
Optional. The bucket's IP filter configuration. |
Autoclass
Configuration for a bucket's Autoclass feature.
Fields | |
---|---|
enabled |
Optional. Enables Autoclass. |
toggle_time |
Output only. Latest instant at which the |
terminal_storage_class |
An object in an Autoclass bucket will eventually cool down to the terminal storage class if there is no access to the object. The only valid values are |
terminal_storage_class_update_time |
Output only. Latest instant at which the autoclass terminal storage class was updated. |
Billing
Billing properties of a bucket.
Fields | |
---|---|
requester_pays |
Optional. When set to true, Requester Pays is enabled for this bucket. |
Cors
Cross-Origin Response sharing (CORS) properties for a bucket. For details, see Cross-origin response. For more details about CORS in general, see Web Origin Concept.
Fields | |
---|---|
origin[] |
Optional. The list of origins eligible to receive CORS response headers. For more information about origins, see RFC 6454. Note: "*" is permitted in the list of origins, and means "any origin". |
method[] |
Optional. The list of HTTP methods on which to include CORS response headers, ( |
response_header[] |
Optional. The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. |
max_age_seconds |
Optional. The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. |
CustomPlacementConfig
Configuration for configurable dual- regions. It should specify precisely two eligible regions within the same multi-region. For details, see locations.
Fields | |
---|---|
data_locations[] |
Optional. List of locations to use for data placement. |
Encryption
Encryption properties of a bucket.
Fields | |
---|---|
default_kms_key |
Optional. The name of the Cloud KMS key that is used to encrypt objects inserted into this bucket, if no encryption method is specified. |
google_managed_encryption_enforcement_config |
Optional. If omitted, then new objects with GMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only. |
customer_managed_encryption_enforcement_config |
Optional. If omitted, then new objects with CMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only. |
customer_supplied_encryption_enforcement_config |
Optional. If omitted, then new objects with CSEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only. |
CustomerManagedEncryptionEnforcementConfig
Customer Managed Encryption (CMEK) enforcement config of a bucket.
Fields | |
---|---|
restricted |
Whether Customer Managed Encryption (CMEK) is restricted for new objects within the bucket. If true, new objects can't be created using CMEK encryption. If false or unset, creation of new objects with CMEK encryption is allowed. |
effective_time |
Time from which the config was effective. This is service-provided. |
CustomerSuppliedEncryptionEnforcementConfig
Customer Supplied Encryption (CSEK) enforcement config of a bucket.
Fields | |
---|---|
restricted |
Whether Customer Supplied Encryption (CSEK) is restricted for new objects within the bucket. If true, new objects can't be created using CSEK encryption. If false or unset, creation of new objects with CSEK encryption is allowed. |
effective_time |
Time from which the config was effective. This is service-provided. |
GoogleManagedEncryptionEnforcementConfig
Google Managed Encryption (GMEK) enforcement config of a bucket.
Fields | |
---|---|
restricted |
Whether Google Managed Encryption (GMEK) is restricted for new objects within the bucket. If true, new objects can't be created using GMEK encryption. If false or unset, creation of new objects with GMEK encryption is allowed. |
effective_time |
Time from which the config was effective. This is service-provided. |
HierarchicalNamespace
Configuration for a bucket's hierarchical namespace feature.
Fields | |
---|---|
enabled |
Optional. Enables the hierarchical namespace feature. |
IamConfig
Bucket restriction options.
Fields | |
---|---|
uniform_bucket_level_access |
Optional. Bucket restriction options currently enforced on the bucket. |
public_access_prevention |
Optional. Whether IAM will enforce public access prevention. Valid values are |
UniformBucketLevelAccess
Settings for Uniform Bucket level access. For more information, see Uniform bucket level access.
Fields | |
---|---|
enabled |
Optional. If set, access checks only use bucket-level IAM policies or above. |
lock_time |
Optional. The deadline time for changing |
IpFilter
The bucket IP filtering configuration. Specifies the network sources that can access the bucket, as well as its underlying objects.
Fields | |
---|---|
vpc_network_sources[] |
Optional. The list of network sources that are allowed to access operations on the bucket or the underlying objects. |
allow_cross_org_vpcs |
Optional. Whether to allow VPC networks that are defined in |
mode |
The state of the IP filter configuration. Valid values are |
public_network_source |
Public IP address ranges that are allowed to operate or access the bucket. |
allow_all_service_agent_access |
Whether or not to allow service agent access to the bucket, regardless of the IP filter configuration. If the value is |
PublicNetworkSource
The public network IP address ranges that can access the bucket and its data.
Fields | |
---|---|
allowed_ip_cidr_ranges[] |
Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to operate or access the bucket and its underlying objects. |
VpcNetworkSource
The list of VPC networks that can access the bucket.
Fields | |
---|---|
allowed_ip_cidr_ranges[] |
Optional. The list of public or private IPv4 and IPv6 CIDR ranges that can access the bucket. In the CIDR IP address block, the specified IP address must be properly truncated, meaning all the host bits must be zero or else the input is considered malformed. For example, |
network |
Name of the network. Format: |
Lifecycle
Lifecycle properties of a bucket. For more information, see Object Lifecycle Management.
Fields | |
---|---|
rule[] |
Optional. A lifecycle management rule, which is made of an action to take and the condition(s) under which the action is taken. |
Rule
A lifecycle rule, combining an action to take on an object and a condition which will trigger that action.
Fields | |
---|---|
action |
Optional. The action to take. |
condition |
Optional. The condition under which the action is taken. |
Action
An action to take on an object.
Fields | |
---|---|
type |
Optional. Type of the action. Currently, only |
storage_class |
Optional. Target storage class. Required iff the type of the action is SetStorageClass. |
Condition
A condition of an object which triggers some action.
Fields | |
---|---|
created_before |
Optional. This condition is satisfied when an object is created before midnight of the specified date in UTC. |
matches_storage_class[] |
Optional. Objects having any of the storage classes specified by this condition are matched. Values include |
custom_time_before |
Optional. An object matches this condition if the custom timestamp set on the object is before the specified date in UTC. |
noncurrent_time_before |
Optional. This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC. |
matches_prefix[] |
Optional. List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true. |
matches_suffix[] |
Optional. List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true. |
age_days |
Age of an object (in days). This condition is satisfied when an object reaches the specified age. A value of 0 indicates that all objects immediately match this condition. |
is_live |
Relevant only for versioned objects. If the value is |
num_newer_versions |
Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. |
days_since_custom_time |
Number of days that have elapsed since the custom timestamp set on an object. The value of the field must be a nonnegative integer. |
days_since_noncurrent_time |
This condition is relevant only for versioned objects. An object version satisfies this condition only if these many days have been passed since it became noncurrent. The value of the field must be a nonnegative integer. If it's zero, the object version becomes eligible for Lifecycle action as soon as it becomes noncurrent. |
Logging
Logging-related properties of a bucket.
Fields | |
---|---|
log_bucket |
Optional. The destination bucket where the current bucket's logs should be placed, using path format such as |
log_object_prefix |
Optional. A prefix for log object names. |
ObjectRetention
Object Retention related properties of a bucket.
Fields | |
---|---|
enabled |
Optional. Output only. If true, object retention is enabled for the bucket. |
RetentionPolicy
Retention policy properties of a bucket.
Fields | |
---|---|
effective_time |
Optional. Server-determined value that indicates the time from which policy was enforced and effective. |
is_locked |
Optional. Once locked, an object retention policy cannot be modified. |
retention_duration |
Optional. The duration that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. Any |
SoftDeletePolicy
Soft delete policy properties of a bucket.
Fields | |
---|---|
retention_duration |
The period of time that soft-deleted objects in the bucket must be retained and cannot be permanently deleted. The duration must be greater than or equal to 7 days and less than 1 year. |
effective_time |
Time from which the policy was effective. This is service-provided. |
Versioning
Properties of a bucket related to versioning. For more information about Cloud Storage versioning, see Object versioning.
Fields | |
---|---|
enabled |
Optional. While set to true, versioning is fully enabled for this bucket. |
Website
Properties of a bucket related to accessing the contents as a static website. For details, see hosting a static website using Cloud Storage.
Fields | |
---|---|
main_page_suffix |
Optional. If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of |
not_found_page |
Optional. If the requested object path is missing, and any |
BucketAccessControl
An access-control entry.
Fields | |
---|---|
role |
Optional. The access permission for the entity. |
id |
Optional. The ID of the access-control entry. |
entity |
Optional. The entity holding the permission, in one of the following forms: * |
entity_alt |
Output only. The alternative entity format, if exists. For project entities, |
entity_id |
Optional. The ID for the entity, if any. |
etag |
Optional. The etag of the BucketAccessControl. If included in the metadata of an update or delete request message, the operation operation will only be performed if the etag matches that of the bucket's BucketAccessControl. |
email |
Optional. The email address associated with the entity, if any. |
domain |
Optional. The domain associated with the entity, if any. |
project_team |
Optional. The project team associated with the entity, if any. |
CancelResumableWriteRequest
Request message for CancelResumableWrite
.
Fields | |
---|---|
upload_id |
Required. The upload_id of the resumable upload to cancel. This should be copied from the |
CancelResumableWriteResponse
This type has no fields.
Empty response message for canceling an in-progress resumable upload, is extended as needed.
ChecksummedData
Message used to convey content being read or written, along with an optional checksum.
Fields | |
---|---|
content |
Optional. The data. |
crc32c |
If set, the CRC32C digest of the content field. |
CommonObjectRequestParams
Parameters that can be passed to any object request.
Fields | |
---|---|
encryption_algorithm |
Optional. Encryption algorithm used with the Customer-Supplied Encryption Keys feature. |
encryption_key_bytes |
Optional. Encryption key used with the Customer-Supplied Encryption Keys feature. In raw bytes format (not base64-encoded). |
encryption_key_sha256_bytes |
Optional. SHA256 hash of encryption key used with the Customer-supplied encryption keys feature. |
ComposeObjectRequest
Request message for ComposeObject
.
Fields | |
---|---|
destination |
Required. Properties of the resulting object. |
source_objects[] |
Optional. The list of source objects that is concatenated into a single object. |
destination_predefined_acl |
Optional. Apply a predefined set of access controls to the destination object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead". |
kms_key |
Optional. Resource name of the Cloud KMS key, of the form |
common_object_request_params |
Optional. A set of parameters common to Storage API requests concerning an object. |
object_checksums |
Optional. The checksums of the complete object. This is validated against the combined checksums of the component objects. |
if_generation_match |
Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
if_metageneration_match |
Makes the operation conditional on whether the object's current metageneration matches the given value. |
SourceObject
Description of a source object for a composition request.
Fields | |
---|---|
name |
Required. The source object's name. All source objects must reside in the same bucket. |
generation |
Optional. The generation of this object to use as the source. |
object_preconditions |
Optional. Conditions that must be met for this operation to execute. |
ObjectPreconditions
Preconditions for a source object of a composition request.
Fields | |
---|---|
if_generation_match |
Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail. |
ContentRange
Specifies a requested range of bytes to download.
Fields | |
---|---|
start |
The starting offset of the object data. This value is inclusive. |
end |
The ending offset of the object data. This value is exclusive. |
complete_length |
The complete length of the object data. |
CreateBucketRequest
Request message for CreateBucket
.
Fields | |
---|---|
parent |
Required. The project to which this bucket belongs. This field must either be empty or |
bucket |
Optional. Properties of the new bucket being inserted. The name of the bucket is specified in the |
bucket_id |
Required. The ID to use for this bucket, which becomes the final component of the bucket's resource name. For example, the value |
predefined_acl |
Optional. Apply a predefined set of access controls to this bucket. Valid values are "authenticatedRead", "private", "projectPrivate", "publicRead", or "publicReadWrite". |
predefined_default_object_acl |
Optional. Apply a predefined set of default object access controls to this bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead". |
enable_object_retention |
Optional. If true, enable object retention on the bucket. |
CustomerEncryption
Describes the Customer-Supplied Encryption Key mechanism used to store an Object's data at rest.
Fields | |
---|---|
encryption_algorithm |
Optional. The encryption algorithm. |
key_sha256_bytes |
Optional. SHA256 hash value of the encryption key. In raw bytes format (not base64-encoded). |
DeleteBucketRequest
Request message for DeleteBucket
.
Fields | |
---|---|
name |
Required. Name of a bucket to delete. |
if_metageneration_match |
If set, only deletes the bucket if its metageneration matches this value. |
if_metageneration_not_match |
If set, only deletes the bucket if its metageneration does not match this value. |
DeleteObjectRequest
Request message for deleting an object.
Fields | |
---|---|
bucket |
Required. Name of the bucket in which the object resides. |
object |
Required. The name of the finalized object to delete. Note: If you want to delete an unfinalized resumable upload please use |
generation |
Optional. If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default). |
common_object_request_params |
Optional. A set of parameters common to Storage API requests concerning an object. |
if_generation_match |
Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
if_generation_not_match |
Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
if_metageneration_match |
Makes the operation conditional on whether the object's current metageneration matches the given value. |
if_metageneration_not_match |
Makes the operation conditional on whether the object's current metageneration does not match the given value. |
GetBucketRequest
Request message for GetBucket
.
Fields | |
---|---|
name |
Required. Name of a bucket. |
if_metageneration_match |
If set, only gets the bucket metadata if its metageneration matches this value. |
if_metageneration_not_match |
If set, only gets the bucket metadata if its metageneration does not match this value. |
read_mask |
|