Object Storage API, gRPC: BucketService
- Calls BucketService
- List
- Get
- Create
- CreateBucketRequest
- AnonymousAccessFlags
- ACL
- Grant
- Tag
- Operation
- CreateBucketMetadata
- Bucket
- CorsRule
- WebsiteSettings
- Scheme
- Condition
- Redirect
- RoutingRule
- LifecycleRule
- AfterDays
- NoncurrentDeleteMarkers
- NoncurrentExpiration
- NoncurrentTransition
- Transition
- Expiration
- RuleFilter
- And
- ObjectLock
- DefaultRetention
- Encryption
- EncryptionRule
- Update
- UpdateBucketRequest
- AnonymousAccessFlags
- CorsRule
- WebsiteSettings
- Scheme
- Condition
- Redirect
- RoutingRule
- LifecycleRule
- AfterDays
- NoncurrentDeleteMarkers
- NoncurrentExpiration
- NoncurrentTransition
- Transition
- Expiration
- RuleFilter
- And
- ACL
- Grant
- Tag
- ObjectLock
- DefaultRetention
- Encryption
- EncryptionRule
- Operation
- UpdateBucketMetadata
- Bucket
- Delete
- GetStats
- GetHTTPSConfig
- SetHTTPSConfig
- DeleteHTTPSConfig
A set of methods for managing buckets.
Call | Description |
---|---|
List | Retrieves the list of buckets in the specified folder. |
Get | Returns the specified bucket. |
Create | Creates a bucket in the specified folder. |
Update | Updates the specified bucket. |
Delete | Deletes the specified bucket. |
GetStats | Returns the statistics for the specified bucket. |
GetHTTPSConfig | Returns the HTTPS configuration for the specified bucket. |
SetHTTPSConfig | Updates the HTTPS configuration for the specified bucket. |
DeleteHTTPSConfig | Deletes the HTTPS configuration for the specified bucket. |
Calls BucketService
List
Retrieves the list of buckets in the specified folder.
The following fields will not be returned for buckets in the list: Bucket.policy, Bucket.acl, Bucket.cors, Bucket.website_settings, Bucket.lifecycle_rules, Bucket.tags.
rpc List (ListBucketsRequest) returns (ListBucketsResponse)
ListBucketsRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to list buckets in. To get the folder ID, make a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50. |
ListBucketsResponse
Field | Description |
---|---|
buckets[] | Bucket List of buckets in the specified folder. |
Bucket
Field | Description |
---|---|
id | string ID of the bucket. Always equal to name , which has priority. |
name | string Name of the bucket. The name is unique within the platform. For naming limitations and rules, see documentation. |
folder_id | string ID of the folder that the bucket belongs to. |
anonymous_access_flags | AnonymousAccessFlags Flags for configuring public (anonymous) access to the bucket's content and settings. For details, see documentation. |
default_storage_class | string Default storage class for objects in the bucket. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ICE and GLACIER are synonyms). For details, see documentation. |
versioning | enum Versioning Bucket versioning status. For details, see documentation.
|
max_size | int64 Maximum size of the bucket, in bytes. For details, see documentation. |
policy | google.protobuf.Struct Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects. For details, see documentation. |
acl | ACL Access control list (ACL) of the bucket. For details, see documentation. |
created_at | google.protobuf.Timestamp Creation timestamp. |
cors[] | CorsRule List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS). For details, see documentation. |
website_settings | WebsiteSettings Configuration for hosting a static website in the bucket. For details, see documentation. |
lifecycle_rules[] | LifecycleRule List of object lifecycle rules for the bucket. For details, see documentation. |
tags[] | Tag List of tags for the bucket. For details, see documentation. |
object_lock | ObjectLock Configuration for object lock on the bucket. For details about the concept, see documentation. |
encryption | Encryption Configuration for bucket's encryption For detauls, see documentation |
AnonymousAccessFlags
Field | Description |
---|---|
read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read objects in the bucket is enabled. |
list | google.protobuf.BoolValue Specifies whether public (anonymous) access to the list of objects in the bucket is enabled. |
config_read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read CORS, static website hosting, and object lifecycles settings of the bucket is enabled. |
ACL
Field | Description |
---|---|
grants[] | Grant List of permissions granted and the grantees. |
Grant
Field | Description |
---|---|
permission | enum Permission Required. Permission granted by the grant.
|
grant_type | enum GrantType Required. The grantee type for the grant.
|
grantee_id | string ID of the account who is a grantee. Required when the grant_type is GRANT_TYPE_ACCOUNT . |
CorsRule
Field | Description |
---|---|
id | string ID of the CORS rule. |
allowed_methods[] | enum Method List of HTTP methods allowed by the CORS rule. When a client sends a CORS-preflight options request with the Access-Control-Request-Method header (see S3-compatible API reference), the specified method is checked against the list of the allowed methods. If there is a match, all the allowed methods are listed in the Access-Control-Allow-Methods header of the response. The number of elements must be greater than 0.
|
allowed_headers[] | string List of HTTP headers allowed by the CORS rule. When a client sends a CORS-preflight options request with the Access-Control-Request-Headers header (see S3-compatible API reference), the specified headers are checked against the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the Access-Control-Allow-Headers header of the response. Each string in the list can contain at most one * wildcard character that matches 0 or more characters. For example, x-amz-* value will allow all Amazon S3-compatible headers. |
allowed_origins[] | string List of request origins allowed by the CORS rule. Each string in the list can contain at most one * wildcard character that matches 0 or more characters. For example, http://*.example.com value will allow requests originating from all subdomains of example.com . The number of elements must be greater than 0. |
expose_headers[] | string List of headers contained in responses to CORS requests that can be accessed by applications. |
max_age_seconds | google.protobuf.Int64Value Time in seconds that a client can cache the response to a CORS-preflight request as identified by the object requested, the HTTP method, and the origin. |
WebsiteSettings
Field | Description |
---|---|
index | string Key of the index page object that is returned when a response is made to the root of the website. Either index or redirect_all_requests must be specified in order for the bucket to host a static website. If specified, the index page object must be located in the root of the bucket. |
error | string Key of the error page object that is returned when an error occurs. |
redirect_all_requests | Scheme Configuration for redirecting all requests sent to the website. Either redirect_all_requests or index must be specified in order for the bucket to host a static website. If redirect_all_requests is specified, it must be the only field in Bucket.website_settings. |
routing_rules[] | RoutingRule List of redirect rules. |
Scheme
Field | Description |
---|---|
protocol | enum Protocol Scheme of the redirect URI.
|
hostname | string Hostname of the redirect URI. |
Condition
Field | Description |
---|---|
http_error_code_returned_equals | string HTTP status code (number only) that must match for the redirect to apply. |
key_prefix_equals | string Prefix of the object key from which requests are redirected. |
Redirect
Field | Description |
---|---|
hostname | string Hostname of the redirect URI. |
http_redirect_code | string HTTP status code of the redirect response. Default value: "301" . Value must match the regular expression 3(0[1-9]|[1-9][0-9]) . |
protocol | enum Protocol Scheme of the redirect URI.
|
replace_key_prefix_with | string Substitution for the prefix of the object key specified in Condition.key_prefix_equals. At most one of replace_key_prefix_with and replace_key_with can be specified. |
replace_key_with | string New object key. At most one of replace_key_with and replace_key_prefix_with can be specified. |
RoutingRule
Field | Description |
---|---|
condition | Condition Redirect condition. |
redirect | Redirect Redirect instructions. |
LifecycleRule
Field | Description |
---|---|
id | google.protobuf.StringValue ID of the rule. Provided by the client or generated at creation time. |
enabled | bool Indicates whether the rule is in effect. |
filter | RuleFilter Filter that identifies the objects to which the rule applies. If not specified, the rule applies to all objects in the bucket. |
expiration | Expiration Expiration rule. The expiration of an object is described as follows. For the unversioned bucket (Bucket.versioning is VERSIONING_DISABLED ), the object is deleted and cannot be recovered. For the bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ), the current version of the object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes the current version of the object. For the bucket with versioning suspended (Bucket.versioning is VERSIONING_SUSPENDED ), the current version of the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a delete marker becomes the current version of the object. |
transitions[] | Transition List of transition rules. The transition of an object is described as follows. For the unversioned bucket (Bucket.versioning is VERSIONING_DISABLED ), the object is transitioned to the specified storage class. For the bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ), the current version of the object is transitioned to the specified storage class. |
abort_incomplete_multipart_upload | AfterDays Configuration for aborting incomplete multipart uploads. |
noncurrent_expiration | NoncurrentExpiration Expiration rule for non-current versions of objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). At expiration, the non-current version of the object is deleted and cannot be recovered. |
noncurrent_transitions[] | NoncurrentTransition List of transition rules for non-current versions of objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). At transition, the non-current version of the object is transitioned to the specified storage class. |
noncurrent_delete_markers | NoncurrentDeleteMarkers Expiration rule for non-current delete markers of an objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). Works in the same way as noncurrent_expiration rule, but only for delete markers. At expiration, the non-current delete marker of the object is deleted and cannot be recovered. |
AfterDays
Field | Description |
---|---|
days_after_expiration | google.protobuf.Int64Value Time period, in number of days from the start of the multipart upload, after which the incomplete upload is aborted. |
NoncurrentDeleteMarkers
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of a delete marker was classified as non-current, after which the delete marker expires. |
NoncurrentExpiration
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of an object was classified as non-current, after which the version expires. |
NoncurrentTransition
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of an object was classified as non-current, after which the version is transitioned. |
storage_class | string Required. Storage class to which a non-current version of an object is transitioned from standard storage. The only supported class is cold storage ( COLD , STANDARD_IA , NEARLINE all synonyms). Transitions from cold to standard storage and transitions to or from ice storage are not allowed. |
Transition
Field | Description |
---|---|
date | google.protobuf.Timestamp Specific date of object transition. The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are transitioned immediately. At most one of date and days fields can be specified. |
days | google.protobuf.Int64Value Time period, in number of days from the creation or modification of the object, after which an object is transitioned. At most one of days and date fields can be specified. |
storage_class | string Required. Storage class to which an object is transitioned from standard storage. The only supported class is cold storage ( COLD , STANDARD_IA , NEARLINE all synonyms). Transitions from cold to standard storage and transitions to or from ice storage are not allowed. |
Expiration
Field | Description |
---|---|
date | google.protobuf.Timestamp Specific date of object expiration. The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire immediately. Exactly one of date , days , and expired_object_delete_marker fields can be specified. |
days | google.protobuf.Int64Value Time period, in number of days from the creation or modification of the object, after which an object expires. Exactly one of days , date , and expired_object_delete_marker fields can be specified. |
expired_object_delete_marker | google.protobuf.BoolValue Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object delete marker) is removed at the object's expiration. Exactly one of expired_object_delete_marker , date , and days fields can be specified. |
RuleFilter
Field | Description |
---|---|
prefix | string Key prefix that the object must have in order for the rule to apply. |
object_size_greater_than | google.protobuf.Int64Value Size that the object must be greater. |
object_size_less_than | google.protobuf.Int64Value Size that the object must be less t. |
tag | Tag Tags that the object's tag set must have for the rule to apply. |
and_operator | And Apply a logical AND to all of the predicates configured inside the And operator. |
And
Field | Description |
---|---|
prefix | string |
object_size_greater_than | google.protobuf.Int64Value |
object_size_less_than | google.protobuf.Int64Value |
tag[] | Tag |
Tag
Field | Description |
---|---|
key | string Key of the bucket tag. |
value | string Value of the bucket tag. |
ObjectLock
Field | Description |
---|---|
status | enum ObjectLockStatus Default lock configuration for added objects |
default_retention | DefaultRetention |
DefaultRetention
Field | Description |
---|---|
mode | enum Mode Lock type |
period | oneof: days or years |
days | int64 Number of days for locking |
years | int64 Number of years for locking |
Encryption
Field | Description |
---|---|
rules[] | EncryptionRule |
EncryptionRule
Field | Description |
---|---|
kms_master_key_id | string |
sse_algorithm | string |
Get
Returns the specified bucket.
To get the list of all available buckets, make a List request.
rpc Get (GetBucketRequest) returns (Bucket)
GetBucketRequest
Field | Description |
---|---|
name | string Required. Name of the bucket to return. To get the bucket name, make a BucketService.List request. |
view | enum View Scope of information about the bucket to return. Access to scopes is managed via Identity and Access Management roles, bucket ACL and policies.
|
Bucket
Field | Description |
---|---|
id | string ID of the bucket. Always equal to name , which has priority. |
name | string Name of the bucket. The name is unique within the platform. For naming limitations and rules, see documentation. |
folder_id | string ID of the folder that the bucket belongs to. |
anonymous_access_flags | AnonymousAccessFlags Flags for configuring public (anonymous) access to the bucket's content and settings. For details, see documentation. |
default_storage_class | string Default storage class for objects in the bucket. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ICE and GLACIER are synonyms). For details, see documentation. |
versioning | enum Versioning Bucket versioning status. For details, see documentation.
|
max_size | int64 Maximum size of the bucket, in bytes. For details, see documentation. |
policy | google.protobuf.Struct Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects. For details, see documentation. |
acl | ACL Access control list (ACL) of the bucket. For details, see documentation. |
created_at | google.protobuf.Timestamp Creation timestamp. |
cors[] | CorsRule List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS). For details, see documentation. |
website_settings | WebsiteSettings Configuration for hosting a static website in the bucket. For details, see documentation. |
lifecycle_rules[] | LifecycleRule List of object lifecycle rules for the bucket. For details, see documentation. |
tags[] | Tag List of tags for the bucket. For details, see documentation. |
object_lock | ObjectLock Configuration for object lock on the bucket. For details about the concept, see documentation. |
encryption | Encryption Configuration for bucket's encryption For detauls, see documentation |
AnonymousAccessFlags
Field | Description |
---|---|
read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read objects in the bucket is enabled. |
list | google.protobuf.BoolValue Specifies whether public (anonymous) access to the list of objects in the bucket is enabled. |
config_read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read CORS, static website hosting, and object lifecycles settings of the bucket is enabled. |
ACL
Field | Description |
---|---|
grants[] | Grant List of permissions granted and the grantees. |
Grant
Field | Description |
---|---|
permission | enum Permission Required. Permission granted by the grant.
|
grant_type | enum GrantType Required. The grantee type for the grant.
|
grantee_id | string ID of the account who is a grantee. Required when the grant_type is GRANT_TYPE_ACCOUNT . |
CorsRule
Field | Description |
---|---|
id | string ID of the CORS rule. |
allowed_methods[] | enum Method List of HTTP methods allowed by the CORS rule. When a client sends a CORS-preflight options request with the Access-Control-Request-Method header (see S3-compatible API reference), the specified method is checked against the list of the allowed methods. If there is a match, all the allowed methods are listed in the Access-Control-Allow-Methods header of the response. The number of elements must be greater than 0.
|
allowed_headers[] | string List of HTTP headers allowed by the CORS rule. When a client sends a CORS-preflight options request with the Access-Control-Request-Headers header (see S3-compatible API reference), the specified headers are checked against the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the Access-Control-Allow-Headers header of the response. Each string in the list can contain at most one * wildcard character that matches 0 or more characters. For example, x-amz-* value will allow all Amazon S3-compatible headers. |
allowed_origins[] | string List of request origins allowed by the CORS rule. Each string in the list can contain at most one * wildcard character that matches 0 or more characters. For example, http://*.example.com value will allow requests originating from all subdomains of example.com . The number of elements must be greater than 0. |
expose_headers[] | string List of headers contained in responses to CORS requests that can be accessed by applications. |
max_age_seconds | google.protobuf.Int64Value Time in seconds that a client can cache the response to a CORS-preflight request as identified by the object requested, the HTTP method, and the origin. |
WebsiteSettings
Field | Description |
---|---|
index | string Key of the index page object that is returned when a response is made to the root of the website. Either index or redirect_all_requests must be specified in order for the bucket to host a static website. If specified, the index page object must be located in the root of the bucket. |
error | string Key of the error page object that is returned when an error occurs. |
redirect_all_requests | Scheme Configuration for redirecting all requests sent to the website. Either redirect_all_requests or index must be specified in order for the bucket to host a static website. If redirect_all_requests is specified, it must be the only field in Bucket.website_settings. |
routing_rules[] | RoutingRule List of redirect rules. |
Scheme
Field | Description |
---|---|
protocol | enum Protocol Scheme of the redirect URI.
|
hostname | string Hostname of the redirect URI. |
Condition
Field | Description |
---|---|
http_error_code_returned_equals | string HTTP status code (number only) that must match for the redirect to apply. |
key_prefix_equals | string Prefix of the object key from which requests are redirected. |
Redirect
Field | Description |
---|---|
hostname | string Hostname of the redirect URI. |
http_redirect_code | string HTTP status code of the redirect response. Default value: "301" . Value must match the regular expression 3(0[1-9]|[1-9][0-9]) . |
protocol | enum Protocol Scheme of the redirect URI.
|
replace_key_prefix_with | string Substitution for the prefix of the object key specified in Condition.key_prefix_equals. At most one of replace_key_prefix_with and replace_key_with can be specified. |
replace_key_with | string New object key. At most one of replace_key_with and replace_key_prefix_with can be specified. |
RoutingRule
Field | Description |
---|---|
condition | Condition Redirect condition. |
redirect | Redirect Redirect instructions. |
LifecycleRule
Field | Description |
---|---|
id | google.protobuf.StringValue ID of the rule. Provided by the client or generated at creation time. |
enabled | bool Indicates whether the rule is in effect. |
filter | RuleFilter Filter that identifies the objects to which the rule applies. If not specified, the rule applies to all objects in the bucket. |
expiration | Expiration Expiration rule. The expiration of an object is described as follows. For the unversioned bucket (Bucket.versioning is VERSIONING_DISABLED ), the object is deleted and cannot be recovered. For the bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ), the current version of the object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes the current version of the object. For the bucket with versioning suspended (Bucket.versioning is VERSIONING_SUSPENDED ), the current version of the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a delete marker becomes the current version of the object. |
transitions[] | Transition List of transition rules. The transition of an object is described as follows. For the unversioned bucket (Bucket.versioning is VERSIONING_DISABLED ), the object is transitioned to the specified storage class. For the bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ), the current version of the object is transitioned to the specified storage class. |
abort_incomplete_multipart_upload | AfterDays Configuration for aborting incomplete multipart uploads. |
noncurrent_expiration | NoncurrentExpiration Expiration rule for non-current versions of objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). At expiration, the non-current version of the object is deleted and cannot be recovered. |
noncurrent_transitions[] | NoncurrentTransition List of transition rules for non-current versions of objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). At transition, the non-current version of the object is transitioned to the specified storage class. |
noncurrent_delete_markers | NoncurrentDeleteMarkers Expiration rule for non-current delete markers of an objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). Works in the same way as noncurrent_expiration rule, but only for delete markers. At expiration, the non-current delete marker of the object is deleted and cannot be recovered. |
AfterDays
Field | Description |
---|---|
days_after_expiration | google.protobuf.Int64Value Time period, in number of days from the start of the multipart upload, after which the incomplete upload is aborted. |
NoncurrentDeleteMarkers
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of a delete marker was classified as non-current, after which the delete marker expires. |
NoncurrentExpiration
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of an object was classified as non-current, after which the version expires. |
NoncurrentTransition
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of an object was classified as non-current, after which the version is transitioned. |
storage_class | string Required. Storage class to which a non-current version of an object is transitioned from standard storage. The only supported class is cold storage ( COLD , STANDARD_IA , NEARLINE all synonyms). Transitions from cold to standard storage and transitions to or from ice storage are not allowed. |
Transition
Field | Description |
---|---|
date | google.protobuf.Timestamp Specific date of object transition. The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are transitioned immediately. At most one of date and days fields can be specified. |
days | google.protobuf.Int64Value Time period, in number of days from the creation or modification of the object, after which an object is transitioned. At most one of days and date fields can be specified. |
storage_class | string Required. Storage class to which an object is transitioned from standard storage. The only supported class is cold storage ( COLD , STANDARD_IA , NEARLINE all synonyms). Transitions from cold to standard storage and transitions to or from ice storage are not allowed. |
Expiration
Field | Description |
---|---|
date | google.protobuf.Timestamp Specific date of object expiration. The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire immediately. Exactly one of date , days , and expired_object_delete_marker fields can be specified. |
days | google.protobuf.Int64Value Time period, in number of days from the creation or modification of the object, after which an object expires. Exactly one of days , date , and expired_object_delete_marker fields can be specified. |
expired_object_delete_marker | google.protobuf.BoolValue Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object delete marker) is removed at the object's expiration. Exactly one of expired_object_delete_marker , date , and days fields can be specified. |
RuleFilter
Field | Description |
---|---|
prefix | string Key prefix that the object must have in order for the rule to apply. |
object_size_greater_than | google.protobuf.Int64Value Size that the object must be greater. |
object_size_less_than | google.protobuf.Int64Value Size that the object must be less t. |
tag | Tag Tags that the object's tag set must have for the rule to apply. |
and_operator | And Apply a logical AND to all of the predicates configured inside the And operator. |
And
Field | Description |
---|---|
prefix | string |
object_size_greater_than | google.protobuf.Int64Value |
object_size_less_than | google.protobuf.Int64Value |
tag[] | Tag |
Tag
Field | Description |
---|---|
key | string Key of the bucket tag. |
value | string Value of the bucket tag. |
ObjectLock
Field | Description |
---|---|
status | enum ObjectLockStatus Default lock configuration for added objects |
default_retention | DefaultRetention |
DefaultRetention
Field | Description |
---|---|
mode | enum Mode Lock type |
period | oneof: days or years |
days | int64 Number of days for locking |
years | int64 Number of years for locking |
Encryption
Field | Description |
---|---|
rules[] | EncryptionRule |
EncryptionRule
Field | Description |
---|---|
kms_master_key_id | string |
sse_algorithm | string |
Create
Creates a bucket in the specified folder.
rpc Create (CreateBucketRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateBucketMetadata
Operation.response:Bucket
CreateBucketRequest
Field | Description |
---|---|
name | string Required. Name of the bucket. The name must be unique within the platform. For naming limitations and rules, see documentation. |
folder_id | string Required. ID of the folder to create a bucket in. To get the folder ID, make a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50. |
default_storage_class | string Default storage class for objects in the bucket. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ICE and GLACIER are synonyms). For details, see documentation. |
max_size | int64 Maximum size of the bucket. For details, see documentation. |
anonymous_access_flags | AnonymousAccessFlags Flags for configuring public (anonymous) access to the bucket's content and settings. For details, see documentation. |
acl | ACL Access control list (ACL) of the bucket. For details, see documentation. |
tags[] | Tag List of tags for the bucket. For details, see documentation. |
AnonymousAccessFlags
Field | Description |
---|---|
read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read objects in the bucket is enabled. |
list | google.protobuf.BoolValue Specifies whether public (anonymous) access to the list of objects in the bucket is enabled. |
config_read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read CORS, static website hosting, and object lifecycles settings of the bucket is enabled. |
ACL
Field | Description |
---|---|
grants[] | Grant List of permissions granted and the grantees. |
Grant
Field | Description |
---|---|
permission | enum Permission Required. Permission granted by the grant.
|
grant_type | enum GrantType Required. The grantee type for the grant.
|
grantee_id | string ID of the account who is a grantee. Required when the grant_type is GRANT_TYPE_ACCOUNT . |
Tag
Field | Description |
---|---|
key | string Key of the bucket tag. |
value | string Value of the bucket tag. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CreateBucketMetadata
Field | Description |
---|---|
name | string Name of the bucket that is being created. |
Bucket
Field | Description |
---|---|
id | string ID of the bucket. Always equal to name , which has priority. |
name | string Name of the bucket. The name is unique within the platform. For naming limitations and rules, see documentation. |
folder_id | string ID of the folder that the bucket belongs to. |
anonymous_access_flags | AnonymousAccessFlags Flags for configuring public (anonymous) access to the bucket's content and settings. For details, see documentation. |
default_storage_class | string Default storage class for objects in the bucket. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ICE and GLACIER are synonyms). For details, see documentation. |
versioning | enum Versioning Bucket versioning status. For details, see documentation.
|
max_size | int64 Maximum size of the bucket, in bytes. For details, see documentation. |
policy | google.protobuf.Struct Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects. For details, see documentation. |
acl | ACL Access control list (ACL) of the bucket. For details, see documentation. |
created_at | google.protobuf.Timestamp Creation timestamp. |
cors[] | CorsRule List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS). For details, see documentation. |
website_settings | WebsiteSettings Configuration for hosting a static website in the bucket. For details, see documentation. |
lifecycle_rules[] | LifecycleRule List of object lifecycle rules for the bucket. For details, see documentation. |
tags[] | Tag List of tags for the bucket. For details, see documentation. |
object_lock | ObjectLock Configuration for object lock on the bucket. For details about the concept, see documentation. |
encryption | Encryption Configuration for bucket's encryption For detauls, see documentation |
CorsRule
Field | Description |
---|---|
id | string ID of the CORS rule. |
allowed_methods[] | enum Method List of HTTP methods allowed by the CORS rule. When a client sends a CORS-preflight options request with the Access-Control-Request-Method header (see S3-compatible API reference), the specified method is checked against the list of the allowed methods. If there is a match, all the allowed methods are listed in the Access-Control-Allow-Methods header of the response. The number of elements must be greater than 0.
|
allowed_headers[] | string List of HTTP headers allowed by the CORS rule. When a client sends a CORS-preflight options request with the Access-Control-Request-Headers header (see S3-compatible API reference), the specified headers are checked against the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the Access-Control-Allow-Headers header of the response. Each string in the list can contain at most one * wildcard character that matches 0 or more characters. For example, x-amz-* value will allow all Amazon S3-compatible headers. |
allowed_origins[] | string List of request origins allowed by the CORS rule. Each string in the list can contain at most one * wildcard character that matches 0 or more characters. For example, http://*.example.com value will allow requests originating from all subdomains of example.com . The number of elements must be greater than 0. |
expose_headers[] | string List of headers contained in responses to CORS requests that can be accessed by applications. |
max_age_seconds | google.protobuf.Int64Value Time in seconds that a client can cache the response to a CORS-preflight request as identified by the object requested, the HTTP method, and the origin. |
WebsiteSettings
Field | Description |
---|---|
index | string Key of the index page object that is returned when a response is made to the root of the website. Either index or redirect_all_requests must be specified in order for the bucket to host a static website. If specified, the index page object must be located in the root of the bucket. |
error | string Key of the error page object that is returned when an error occurs. |
redirect_all_requests | Scheme Configuration for redirecting all requests sent to the website. Either redirect_all_requests or index must be specified in order for the bucket to host a static website. If redirect_all_requests is specified, it must be the only field in Bucket.website_settings. |
routing_rules[] | RoutingRule List of redirect rules. |
Scheme
Field | Description |
---|---|
protocol | enum Protocol Scheme of the redirect URI.
|
hostname | string Hostname of the redirect URI. |
Condition
Field | Description |
---|---|
http_error_code_returned_equals | string HTTP status code (number only) that must match for the redirect to apply. |
key_prefix_equals | string Prefix of the object key from which requests are redirected. |
Redirect
Field | Description |
---|---|
hostname | string Hostname of the redirect URI. |
http_redirect_code | string HTTP status code of the redirect response. Default value: "301" . Value must match the regular expression 3(0[1-9]|[1-9][0-9]) . |
protocol | enum Protocol Scheme of the redirect URI.
|
replace_key_prefix_with | string Substitution for the prefix of the object key specified in Condition.key_prefix_equals. At most one of replace_key_prefix_with and replace_key_with can be specified. |
replace_key_with | string New object key. At most one of replace_key_with and replace_key_prefix_with can be specified. |
RoutingRule
Field | Description |
---|---|
condition | Condition Redirect condition. |
redirect | Redirect Redirect instructions. |
LifecycleRule
Field | Description |
---|---|
id | google.protobuf.StringValue ID of the rule. Provided by the client or generated at creation time. |
enabled | bool Indicates whether the rule is in effect. |
filter | RuleFilter Filter that identifies the objects to which the rule applies. If not specified, the rule applies to all objects in the bucket. |
expiration | Expiration Expiration rule. The expiration of an object is described as follows. For the unversioned bucket (Bucket.versioning is VERSIONING_DISABLED ), the object is deleted and cannot be recovered. For the bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ), the current version of the object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes the current version of the object. For the bucket with versioning suspended (Bucket.versioning is VERSIONING_SUSPENDED ), the current version of the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a delete marker becomes the current version of the object. |
transitions[] | Transition List of transition rules. The transition of an object is described as follows. For the unversioned bucket (Bucket.versioning is VERSIONING_DISABLED ), the object is transitioned to the specified storage class. For the bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ), the current version of the object is transitioned to the specified storage class. |
abort_incomplete_multipart_upload | AfterDays Configuration for aborting incomplete multipart uploads. |
noncurrent_expiration | NoncurrentExpiration Expiration rule for non-current versions of objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). At expiration, the non-current version of the object is deleted and cannot be recovered. |
noncurrent_transitions[] | NoncurrentTransition List of transition rules for non-current versions of objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). At transition, the non-current version of the object is transitioned to the specified storage class. |
noncurrent_delete_markers | NoncurrentDeleteMarkers Expiration rule for non-current delete markers of an objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). Works in the same way as noncurrent_expiration rule, but only for delete markers. At expiration, the non-current delete marker of the object is deleted and cannot be recovered. |
AfterDays
Field | Description |
---|---|
days_after_expiration | google.protobuf.Int64Value Time period, in number of days from the start of the multipart upload, after which the incomplete upload is aborted. |
NoncurrentDeleteMarkers
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of a delete marker was classified as non-current, after which the delete marker expires. |
NoncurrentExpiration
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of an object was classified as non-current, after which the version expires. |
NoncurrentTransition
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of an object was classified as non-current, after which the version is transitioned. |
storage_class | string Required. Storage class to which a non-current version of an object is transitioned from standard storage. The only supported class is cold storage ( COLD , STANDARD_IA , NEARLINE all synonyms). Transitions from cold to standard storage and transitions to or from ice storage are not allowed. |
Transition
Field | Description |
---|---|
date | google.protobuf.Timestamp Specific date of object transition. The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are transitioned immediately. At most one of date and days fields can be specified. |
days | google.protobuf.Int64Value Time period, in number of days from the creation or modification of the object, after which an object is transitioned. At most one of days and date fields can be specified. |
storage_class | string Required. Storage class to which an object is transitioned from standard storage. The only supported class is cold storage ( COLD , STANDARD_IA , NEARLINE all synonyms). Transitions from cold to standard storage and transitions to or from ice storage are not allowed. |
Expiration
Field | Description |
---|---|
date | google.protobuf.Timestamp Specific date of object expiration. The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire immediately. Exactly one of date , days , and expired_object_delete_marker fields can be specified. |
days | google.protobuf.Int64Value Time period, in number of days from the creation or modification of the object, after which an object expires. Exactly one of days , date , and expired_object_delete_marker fields can be specified. |
expired_object_delete_marker | google.protobuf.BoolValue Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object delete marker) is removed at the object's expiration. Exactly one of expired_object_delete_marker , date , and days fields can be specified. |
RuleFilter
Field | Description |
---|---|
prefix | string Key prefix that the object must have in order for the rule to apply. |
object_size_greater_than | google.protobuf.Int64Value Size that the object must be greater. |
object_size_less_than | google.protobuf.Int64Value Size that the object must be less t. |
tag | Tag Tags that the object's tag set must have for the rule to apply. |
and_operator | And Apply a logical AND to all of the predicates configured inside the And operator. |
And
Field | Description |
---|---|
prefix | string |
object_size_greater_than | google.protobuf.Int64Value |
object_size_less_than | google.protobuf.Int64Value |
tag[] | Tag |
ObjectLock
Field | Description |
---|---|
status | enum ObjectLockStatus Default lock configuration for added objects |
default_retention | DefaultRetention |
DefaultRetention
Field | Description |
---|---|
mode | enum Mode Lock type |
period | oneof: days or years |
days | int64 Number of days for locking |
years | int64 Number of years for locking |
Encryption
Field | Description |
---|---|
rules[] | EncryptionRule |
EncryptionRule
Field | Description |
---|---|
kms_master_key_id | string |
sse_algorithm | string |
Update
Updates the specified bucket.
In most cases, storage.editor
role (see documentation) should be enough to update a bucket, subject to its policy.
rpc Update (UpdateBucketRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateBucketMetadata
Operation.response:Bucket
UpdateBucketRequest
Field | Description |
---|---|
name | string Required. Name of the bucket to update. The name cannot be updated. To get the bucket name, make a BucketService.List request. |
update_mask | google.protobuf.FieldMask Required. Update mask that specifies which attributes of the bucket should be updated. Use * for full update. |
anonymous_access_flags | AnonymousAccessFlags Flags for configuring public (anonymous) access to the bucket's content and settings. For details, see documentation. |
default_storage_class | string Default storage class for objects in the bucket. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ICE and GLACIER are synonyms). For details, see documentation. |
max_size | int64 Maximum size of the bucket, in bytes. For details, see documentation. |
cors[] | CorsRule List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS). For details, see documentation. |
website_settings | WebsiteSettings Configuration for hosting a static website in the bucket. For details, see documentation. |
versioning | enum Versioning Bucket versioning status. For details, see documentation.
|
lifecycle_rules[] | LifecycleRule List of object lifecycle rules for the bucket. For details, see documentation. |
policy | google.protobuf.Struct Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects. For details, see documentation. |
acl | ACL Access control list (ACL) of the bucket. For details, see documentation. |
tags[] | Tag List of tags for the bucket. For details, see documentation. |
object_lock | ObjectLock Configuration for object lock on the bucket. For details about the concept, see documentation. |
encryption | Encryption Configuration for bucket's encryption For detauls, see documentation |
AnonymousAccessFlags
Field | Description |
---|---|
read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read objects in the bucket is enabled. |
list | google.protobuf.BoolValue Specifies whether public (anonymous) access to the list of objects in the bucket is enabled. |
config_read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read CORS, static website hosting, and object lifecycles settings of the bucket is enabled. |
CorsRule
Field | Description |
---|---|
id | string ID of the CORS rule. |
allowed_methods[] | enum Method List of HTTP methods allowed by the CORS rule. When a client sends a CORS-preflight options request with the Access-Control-Request-Method header (see S3-compatible API reference), the specified method is checked against the list of the allowed methods. If there is a match, all the allowed methods are listed in the Access-Control-Allow-Methods header of the response. The number of elements must be greater than 0.
|
allowed_headers[] | string List of HTTP headers allowed by the CORS rule. When a client sends a CORS-preflight options request with the Access-Control-Request-Headers header (see S3-compatible API reference), the specified headers are checked against the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the Access-Control-Allow-Headers header of the response. Each string in the list can contain at most one * wildcard character that matches 0 or more characters. For example, x-amz-* value will allow all Amazon S3-compatible headers. |
allowed_origins[] | string List of request origins allowed by the CORS rule. Each string in the list can contain at most one * wildcard character that matches 0 or more characters. For example, http://*.example.com value will allow requests originating from all subdomains of example.com . The number of elements must be greater than 0. |
expose_headers[] | string List of headers contained in responses to CORS requests that can be accessed by applications. |
max_age_seconds | google.protobuf.Int64Value Time in seconds that a client can cache the response to a CORS-preflight request as identified by the object requested, the HTTP method, and the origin. |
WebsiteSettings
Field | Description |
---|---|
index | string Key of the index page object that is returned when a response is made to the root of the website. Either index or redirect_all_requests must be specified in order for the bucket to host a static website. If specified, the index page object must be located in the root of the bucket. |
error | string Key of the error page object that is returned when an error occurs. |
redirect_all_requests | Scheme Configuration for redirecting all requests sent to the website. Either redirect_all_requests or index must be specified in order for the bucket to host a static website. If redirect_all_requests is specified, it must be the only field in Bucket.website_settings. |
routing_rules[] | RoutingRule List of redirect rules. |
Scheme
Field | Description |
---|---|
protocol | enum Protocol Scheme of the redirect URI.
|
hostname | string Hostname of the redirect URI. |
Condition
Field | Description |
---|---|
http_error_code_returned_equals | string HTTP status code (number only) that must match for the redirect to apply. |
key_prefix_equals | string Prefix of the object key from which requests are redirected. |
Redirect
Field | Description |
---|---|
hostname | string Hostname of the redirect URI. |
http_redirect_code | string HTTP status code of the redirect response. Default value: "301" . Value must match the regular expression 3(0[1-9]|[1-9][0-9]) . |
protocol | enum Protocol Scheme of the redirect URI.
|
replace_key_prefix_with | string Substitution for the prefix of the object key specified in Condition.key_prefix_equals. At most one of replace_key_prefix_with and replace_key_with can be specified. |
replace_key_with | string New object key. At most one of replace_key_with and replace_key_prefix_with can be specified. |
RoutingRule
Field | Description |
---|---|
condition | Condition Redirect condition. |
redirect | Redirect Redirect instructions. |
LifecycleRule
Field | Description |
---|---|
id | google.protobuf.StringValue ID of the rule. Provided by the client or generated at creation time. |
enabled | bool Indicates whether the rule is in effect. |
filter | RuleFilter Filter that identifies the objects to which the rule applies. If not specified, the rule applies to all objects in the bucket. |
expiration | Expiration Expiration rule. The expiration of an object is described as follows. For the unversioned bucket (Bucket.versioning is VERSIONING_DISABLED ), the object is deleted and cannot be recovered. For the bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ), the current version of the object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes the current version of the object. For the bucket with versioning suspended (Bucket.versioning is VERSIONING_SUSPENDED ), the current version of the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a delete marker becomes the current version of the object. |
transitions[] | Transition List of transition rules. The transition of an object is described as follows. For the unversioned bucket (Bucket.versioning is VERSIONING_DISABLED ), the object is transitioned to the specified storage class. For the bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ), the current version of the object is transitioned to the specified storage class. |
abort_incomplete_multipart_upload | AfterDays Configuration for aborting incomplete multipart uploads. |
noncurrent_expiration | NoncurrentExpiration Expiration rule for non-current versions of objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). At expiration, the non-current version of the object is deleted and cannot be recovered. |
noncurrent_transitions[] | NoncurrentTransition List of transition rules for non-current versions of objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). At transition, the non-current version of the object is transitioned to the specified storage class. |
noncurrent_delete_markers | NoncurrentDeleteMarkers Expiration rule for non-current delete markers of an objects in a bucket with versioning enabled (Bucket.versioning is VERSIONING_ENABLED ) or suspended (VERSIONING_SUSPENDED ). Works in the same way as noncurrent_expiration rule, but only for delete markers. At expiration, the non-current delete marker of the object is deleted and cannot be recovered. |
AfterDays
Field | Description |
---|---|
days_after_expiration | google.protobuf.Int64Value Time period, in number of days from the start of the multipart upload, after which the incomplete upload is aborted. |
NoncurrentDeleteMarkers
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of a delete marker was classified as non-current, after which the delete marker expires. |
NoncurrentExpiration
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of an object was classified as non-current, after which the version expires. |
NoncurrentTransition
Field | Description |
---|---|
noncurrent_days | google.protobuf.Int64Value Time period, in number of days since the version of an object was classified as non-current, after which the version is transitioned. |
storage_class | string Required. Storage class to which a non-current version of an object is transitioned from standard storage. The only supported class is cold storage ( COLD , STANDARD_IA , NEARLINE all synonyms). Transitions from cold to standard storage and transitions to or from ice storage are not allowed. |
Transition
Field | Description |
---|---|
date | google.protobuf.Timestamp Specific date of object transition. The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are transitioned immediately. At most one of date and days fields can be specified. |
days | google.protobuf.Int64Value Time period, in number of days from the creation or modification of the object, after which an object is transitioned. At most one of days and date fields can be specified. |
storage_class | string Required. Storage class to which an object is transitioned from standard storage. The only supported class is cold storage ( COLD , STANDARD_IA , NEARLINE all synonyms). Transitions from cold to standard storage and transitions to or from ice storage are not allowed. |
Expiration
Field | Description |
---|---|
date | google.protobuf.Timestamp Specific date of object expiration. The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire immediately. Exactly one of date , days , and expired_object_delete_marker fields can be specified. |
days | google.protobuf.Int64Value Time period, in number of days from the creation or modification of the object, after which an object expires. Exactly one of days , date , and expired_object_delete_marker fields can be specified. |
expired_object_delete_marker | google.protobuf.BoolValue Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object delete marker) is removed at the object's expiration. Exactly one of expired_object_delete_marker , date , and days fields can be specified. |
RuleFilter
Field | Description |
---|---|
prefix | string Key prefix that the object must have in order for the rule to apply. |
object_size_greater_than | google.protobuf.Int64Value Size that the object must be greater. |
object_size_less_than | google.protobuf.Int64Value Size that the object must be less t. |
tag | Tag Tags that the object's tag set must have for the rule to apply. |
and_operator | And Apply a logical AND to all of the predicates configured inside the And operator. |
And
Field | Description |
---|---|
prefix | string |
object_size_greater_than | google.protobuf.Int64Value |
object_size_less_than | google.protobuf.Int64Value |
tag[] | Tag |
ACL
Field | Description |
---|---|
grants[] | Grant List of permissions granted and the grantees. |
Grant
Field | Description |
---|---|
permission | enum Permission Required. Permission granted by the grant.
|
grant_type | enum GrantType Required. The grantee type for the grant.
|
grantee_id | string ID of the account who is a grantee. Required when the grant_type is GRANT_TYPE_ACCOUNT . |
Tag
Field | Description |
---|---|
key | string Key of the bucket tag. |
value | string Value of the bucket tag. |
ObjectLock
Field | Description |
---|---|
status | enum ObjectLockStatus Default lock configuration for added objects |
default_retention | DefaultRetention |
DefaultRetention
Field | Description |
---|---|
mode | enum Mode Lock type |
period | oneof: days or years |
days | int64 Number of days for locking |
years | int64 Number of years for locking |
Encryption
Field | Description |
---|---|
rules[] | EncryptionRule |
EncryptionRule
Field | Description |
---|---|
kms_master_key_id | string |
sse_algorithm | string |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateBucketMetadata
Field | Description |
---|---|
name | string Name of the bucket that is being updated. |
Bucket
Field | Description |
---|---|
id | string ID of the bucket. Always equal to name , which has priority. |
name | string Name of the bucket. The name is unique within the platform. For naming limitations and rules, see documentation. |
folder_id | string ID of the folder that the bucket belongs to. |
anonymous_access_flags | AnonymousAccessFlags Flags for configuring public (anonymous) access to the bucket's content and settings. For details, see documentation. |
default_storage_class | string Default storage class for objects in the bucket. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ICE and GLACIER are synonyms). For details, see documentation. |
versioning | enum Versioning Bucket versioning status. For details, see documentation.
|
max_size | int64 Maximum size of the bucket, in bytes. For details, see documentation. |
policy | google.protobuf.Struct Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects. For details, see documentation. |
acl | ACL Access control list (ACL) of the bucket. For details, see documentation. |
created_at | google.protobuf.Timestamp Creation timestamp. |
cors[] | CorsRule List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS). For details, see documentation. |
website_settings | WebsiteSettings Configuration for hosting a static website in the bucket. For details, see documentation. |
lifecycle_rules[] | LifecycleRule List of object lifecycle rules for the bucket. For details, see documentation. |
tags[] | Tag List of tags for the bucket. For details, see documentation. |
object_lock | ObjectLock Configuration for object lock on the bucket. For details about the concept, see documentation. |
encryption | Encryption Configuration for bucket's encryption For detauls, see documentation |
Delete
Deletes the specified bucket.
rpc Delete (DeleteBucketRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteBucketMetadata
Operation.response:google.protobuf.Empty
DeleteBucketRequest
Field | Description |
---|---|
name | string Required. Name of the bucket to update. To get the bucket name, make a BucketService.List request. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteBucketMetadata
Field | Description |
---|---|
name | string Name of the bucket that is being deleted. |
GetStats
Returns the statistics for the specified bucket.
rpc GetStats (GetBucketStatsRequest) returns (BucketStats)
GetBucketStatsRequest
Field | Description |
---|---|
name | string Required. Name of the bucket to return the statistics for. |
BucketStats
Field | Description |
---|---|
name | string Name of the bucket. |
max_size | google.protobuf.Int64Value Maximum size of the bucket, in bytes. |
used_size | int64 Size of used space in the bucket, in bytes. |
storage_class_max_sizes[] | OptionalSizeByClass Size of available space in the bucket by storage class, in bytes. |
storage_class_used_sizes[] | SizeByClass Size of used space in the bucket by storage class, in bytes. |
storage_class_counters[] | CountersByClass Object-related statistics by storage class and type of upload (simple vs. multipart), in bytes. |
default_storage_class | google.protobuf.StringValue Default storage class for objects in the bucket. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ICE and GLACIER are synonyms). For details, see documentation. |
anonymous_access_flags | AnonymousAccessFlags Flags for configuring public (anonymous) access to the bucket's content and settings. For details, see documentation. |
created_at | google.protobuf.Timestamp Bucket creation timestamp. |
updated_at | google.protobuf.Timestamp Bucket latest update timestamp. |
OptionalSizeByClass
Field | Description |
---|---|
storage_class | string Storage class. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ICE and GLACIER are synonyms). For details, see documentation. |
class_size | google.protobuf.Int64Value Size of available space in the bucket for the storage class. |
SizeByClass
Field | Description |
---|---|
storage_class | string Storage class. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ICE and GLACIER are synonyms). For details, see documentation. |
class_size | int64 Size of used space in the bucket for the storage class. |
CountersByClass
Field | Description |
---|---|
storage_class | string Storage class. Supported classes are standard storage ( STANDARD ), cold storage (COLD , STANDARD_IA , NEARLINE all synonyms), and ice storage (ice and GLACIER are synonyms). For details, see documentation. |
counters | Counters Object-related statistics for the storage class by type of upload. |
Counters
Field | Description |
---|---|
simple_object_size | int64 Total size of objects uploaded in single operation, in bytes. |
simple_object_count | int64 Number of objects uploaded in single operation. |
objects_parts_size | int64 Total size of uploaded parts in incomplete multipart uploads, in bytes. |
objects_parts_count | int64 Number of uploaded parts in incomplete multipart uploads. |
multipart_objects_size | int64 Total size of objects uploaded in multiple parts, in bytes. |
multipart_objects_count | int64 Number of objects uploaded in multiple parts. |
active_multipart_count | int64 Number of incomplete multipart uploads. |
AnonymousAccessFlags
Field | Description |
---|---|
read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read objects in the bucket is enabled. |
list | google.protobuf.BoolValue Specifies whether public (anonymous) access to the list of objects in the bucket is enabled. |
config_read | google.protobuf.BoolValue Specifies whether public (anonymous) access to read CORS, static website hosting, and object lifecycles settings of the bucket is enabled. |
GetHTTPSConfig
Returns the HTTPS configuration for the specified bucket.
rpc GetHTTPSConfig (GetBucketHTTPSConfigRequest) returns (HTTPSConfig)
GetBucketHTTPSConfigRequest
Field | Description |
---|---|
name | string Required. Name of the bucket to return the HTTPS configuration for. |
HTTPSConfig
Field | Description |
---|---|
name | string Name of the bucket. |
source_type | enum SourceType Type of TLS certificate source.
|
issuer | google.protobuf.StringValue Issuer of the TLS certificate. |
subject | google.protobuf.StringValue Subject of the TLS certificate. |
dns_names[] | string List of DNS names of the TLS certificate (Subject Alternative Name field). |
not_before | google.protobuf.Timestamp Start of the TLS certificate validity period (Not Before field). |
not_after | google.protobuf.Timestamp End of the TLS certificate validity period (Not After field) |
certificate_id | string ID of the TLS certificate in Certificate Manager. To get information about the certificate from Certificate Manager, make a yandex.cloud.certificatemanager.v1.CertificateService.Get request. |
SetHTTPSConfig
Updates the HTTPS configuration for the specified bucket.
The updated configuration could take up to 30 minutes to apply to the bucket.
rpc SetHTTPSConfig (SetBucketHTTPSConfigRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:SetBucketHTTPSConfigMetadata
Operation.response:HTTPSConfig
SetBucketHTTPSConfigRequest
Field | Description |
---|---|
name | string Required. Name of the bucket to update the HTTPS configuration for. |
params | oneof: self_managed or certificate_manager HTTPS configuration parameters. |
self_managed | SelfManagedHTTPSConfigParams Your TLS certificate, uploaded directly. Object Storage only supports PEM |
certificate_manager | CertificateManagerHTTPSConfigParams TLS certificate from Certificate Manager. To create a certificate in Certificate Manager, make a yandex.cloud.certificatemanager.v1.CertificateService.Create request. |
SelfManagedHTTPSConfigParams
Field | Description |
---|---|
certificate_pem | string PEM |
private_key_pem | string PEM |
CertificateManagerHTTPSConfigParams
Field | Description |
---|---|
certificate_id | string ID of the certificate. To get the list of all available certificates, make a yandex.cloud.certificatemanager.v1.CertificateService.List request. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
SetBucketHTTPSConfigMetadata
Field | Description |
---|---|
name | string Name of the bucket the HTTPS configuration is being updated for. |
HTTPSConfig
Field | Description |
---|---|
name | string Name of the bucket. |
source_type | enum SourceType Type of TLS certificate source.
|
issuer | google.protobuf.StringValue Issuer of the TLS certificate. |
subject | google.protobuf.StringValue Subject of the TLS certificate. |
dns_names[] | string List of DNS names of the TLS certificate (Subject Alternative Name field). |
not_before | google.protobuf.Timestamp Start of the TLS certificate validity period (Not Before field). |
not_after | google.protobuf.Timestamp End of the TLS certificate validity period (Not After field) |
certificate_id | string ID of the TLS certificate in Certificate Manager. To get information about the certificate from Certificate Manager, make a yandex.cloud.certificatemanager.v1.CertificateService.Get request. |
DeleteHTTPSConfig
Deletes the HTTPS configuration for the specified bucket.
rpc DeleteHTTPSConfig (DeleteBucketHTTPSConfigRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteBucketHTTPSConfigMetadata
Operation.response:google.protobuf.Empty
DeleteBucketHTTPSConfigRequest
Field | Description |
---|---|
name | string Required. Name of the bucket to delete the HTTPS configuration for. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteBucketHTTPSConfigMetadata
Field | Description |
---|---|
name | string Name of the bucket the HTTPS configuration is being deleted for. |