Object Storage API, REST: Bucket.CreateInventoryConfiguration
Create/Update an inventory configuration with the corresponding ID
HTTP request
POST https://storage.api.yandexcloud.kz/storage/v1/buckets/{bucket}/{id}:createInventoryConfiguration
Path parameters
|
Field |
Description |
|
bucket |
string Required field. Name of the bucket to update the inventory configuration for. |
|
id |
string Required field. ID of the inventory configuration to set. |
Body parameters
{
"configuration": {
"id": "string",
"destination": {
"bucketDestination": {
"bucket": "string",
"format": "string",
"prefix": "string"
}
},
"includedObjectVersions": "string",
"isEnabled": "boolean",
"schedule": {
"frequency": "string"
},
"filter": {
"prefix": "string"
},
"optionalFields": [
"string"
]
}
}
|
Field |
Description |
|
configuration |
Required field. Inventory configuration. |
InventoryConfiguration
|
Field |
Description |
|
id |
string Required field. The ID used to identify the inventory configuration. |
|
destination |
Required field. Contains information about where to publish the inventory results. |
|
includedObjectVersions |
enum (IncludedObjectVersions) Required field. Object versions to include in the inventory list.
|
|
isEnabled |
boolean Specifies whether the inventory is enabled. |
|
schedule |
Required field. Specifies the schedule for generating inventory results. |
|
filter |
Specifies the filter for objects to include in the inventory. |
|
optionalFields[] |
enum (OptionalField) Contains the optional fields that are included in the inventory results.
|
InventoryDestination
|
Field |
Description |
|
bucketDestination |
Required field. Destination bucket settings |
InventoryBucketDestination
|
Field |
Description |
|
bucket |
string Required field. Bucket where inventory results will be published. |
|
format |
enum (Format) Required field. Specifies the output format of the inventory results.
|
|
prefix |
string The prefix that is prepended to all inventory results. |
InventorySchedule
|
Field |
Description |
|
frequency |
enum (Frequency) Required field. Specifies how frequently inventory results are produced.
|
InventoryFilter
|
Field |
Description |
|
prefix |
string Required field. The prefix that an object must have to be included in the inventory results. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": {
"name": "string"
},
// Includes only one of the fields `error`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
CreateBucketInventoryConfigurationMetadata Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
CreateBucketInventoryConfigurationMetadata
|
Field |
Description |
|
name |
string Bucket name for which inventory configuration will be set |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |