Object Storage API, gRPC: BucketService.CreateInventoryConfiguration
Create/Update an inventory configuration with the corresponding ID
gRPC request
rpc CreateInventoryConfiguration (CreateBucketInventoryConfigurationRequest) returns (operation.Operation)
CreateBucketInventoryConfigurationRequest
{
"bucket": "string",
"id": "string",
"configuration": {
"id": "string",
"destination": {
"bucket_destination": {
"bucket": "string",
"format": "Format",
"prefix": "google.protobuf.StringValue"
}
},
"included_object_versions": "IncludedObjectVersions",
"is_enabled": "bool",
"schedule": {
"frequency": "Frequency"
},
"filter": {
"prefix": "string"
},
"optional_fields": [
"OptionalField"
]
}
}
|
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. |
|
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. |
|
included_object_versions |
enum IncludedObjectVersions Required field. Object versions to include in the inventory list.
|
|
is_enabled |
bool 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. |
|
optional_fields[] |
enum OptionalField Contains the optional fields that are included in the inventory results.
|
InventoryDestination
|
Field |
Description |
|
bucket_destination |
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 |
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. |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"name": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": "google.protobuf.Empty"
// 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. |
|
created_at |
Creation timestamp. |
|
created_by |
string ID of the user or service account who initiated the operation. |
|
modified_at |
The time when the Operation resource was last modified. |
|
done |
bool 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. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
CreateBucketInventoryConfigurationMetadata
|
Field |
Description |
|
name |
string Bucket name for which inventory configuration will be set |