Update a bucket definition in Dynatrace with the Grail Storage Management API using the bucket name, optimistic locking version, and changed fields.
| PUT | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/storage/management/v1/bucket-definitions/{bucketName} |
You provide the bucketName path parameter and the optimistic-locking-version query parameter, then send the fields to update in the request body. The operation updates the bucket definition and returns the updated result.
To execute this request, you need a platform token or OAuth access token with storage:bucket-definitions:write scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| bucketName | string | Bucket name to update | path | Required |
| optimistic-locking-version | integer | optimistic-locking-version defines the base version that this update applies to. You can get the current version of a bucket definition by checking the version field in the JSON response of GET bucket definitions or GET bucket definition. ATTENTION: this optimistic-locking-version and the version value in the JSON body must match. | query | Required |
| body | Update | Updated Bucket | body | Required |
UpdateBucket object| Element | Type | Description | Required |
|---|---|---|---|
| bucketClass | string | The class of the bucket. Read-only after creation. The element can hold these values
| Optional |
| bucketName | string | The unique identifier of the bucket within the tenant. | Required |
| displayName | string | Descriptive name of the bucket. No restriction regarding unique naming or valid characters. | Optional |
| includedQueryLimitDays | integer | The period in days in which queries from the bucket are included in the pricing model. | Optional |
| includedQueryLimitDaysOrDefault | integer | - | Optional |
| metricInterval | string | Metric interval for metric buckets. Will be ignored for other buckets. The element can hold these values
| Optional |
| retentionDays | integer | The retention period in days of the data in the bucket. Important note: the new retention days will also apply to existing records. Shortening the retention period could result in data deletion! | Optional |
| retentionDaysOrDefault | integer | - | Optional |
| status | string | The current status of the bucket, depending on bucket lifecycle. The element can hold these values
| Required |
| table | string | Name of the table the bucket is assigned to. | Required |
| version | integer | Optimistic locking version. Update requests define with this on which version the data updated is based on. This must match with the version stored, otherwise the update will fail due to concurrent modification. | Optional |
| versionOrDefault | integer | - | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"bucketName": "custom_logs","table": "logs","displayName": "Custom logs bucket (updated)","status": "active","retentionDays": 10,"includedQueryLimitDays": 0,"version": 1}
| Code | Type | Description |
|---|---|---|
| 200 | - | Successfully updated bucket definition |
| 202 | - | Accepted update bucket definition |
| 400 | Error | bad request |
| 401 | Error | unauthorized |
| 403 | Error | Forbidden |
| 404 | Error | Bucket with provided name was not found |
| 409 | Error | Attempt to update an old version or an operation is currently in progress that prevents current modifications (creating, deleting, updating) |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Exceptional | - |
ExceptionalReturn object| Element | Type | Description |
|---|---|---|
| code | integer | - |
| errorDetails | (Custom | - |
| message | string | - |
CustomValidationErrorInfo objectErrorInfo object| Element | Type | Description |
|---|---|---|
| message | string | - |
InvalidAuditEventsErrorInfo objectMediaTypeErrorInfo objectParameterErrorInfo objectProxyErrorInfo objectQueryFrontendRawErrorInfo objectRequestBodyErrorInfo object{"error": {"code": 400,"message": "Missing request header","errorDetails": [{"type": "parameter","parameterDescriptor": "Dt-Tenant","message": "is required"}]}}