Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@dynatrace-sdk/client-bucket-management
Advanced tools
Provides a public bucket management API for Grail.
Here you can find the
npm install @dynatrace-sdk/client-bucket-management
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Full API reference for the latest version of the SDK is also available at the Dynatrace Developer.
import { bucketDefinitionsClient } from '@dynatrace-sdk/client-bucket-management';
Create a new bucket
Create a new bucket. Bucket creation can take up to 1 minute.
Required scope: storage:bucket-definitions:write
Name | Type |
---|---|
config.body*required | NewBucket |
Return type | Status code | Description |
---|---|---|
Bucket | 201 | Successfully created bucket definition |
Error Type | Error Message |
---|---|
ErrorEnvelopeError | bad request | unauthorized | missing permissions | Bucket already exists |
import { bucketDefinitionsClient } from "@dynatrace-sdk/client-bucket-management";
const data = await bucketDefinitionsClient.createBucket({
body: {
bucketName: "custom_logs",
table: "logs",
displayName: "Custom logs bucket",
retentionDays: 35,
},
});
Delete a bucket
Starts deleting a bucket.
Deletes the bucket and all data stored in the bucket. This operation can not be undone.
Required scope: storage:bucket-definitions:delete
Name | Type |
---|---|
config.bucketName*required | string |
Return type | Status code | Description |
---|---|---|
Bucket | 202 | accepted delete bucket |
Error Type | Error Message |
---|---|
ErrorEnvelopeError | bad request | unauthorized | Forbidden | bucket not found | another operation is still in progress that prevents deletion. |
import { bucketDefinitionsClient } from "@dynatrace-sdk/client-bucket-management";
const data = await bucketDefinitionsClient.deleteBucket({
bucketName: "...",
});
Get bucket definition by name
Get bucket definition by name.
Newly created buckets are not shown immediately, this can take up to a minute.
Required scope: storage:bucket-definitions:read
Name | Type | Description |
---|---|---|
config.addFields | Array<string> | Define additional fields added to the response. Depending on the field this may result in longer response times. |
config.bucketName*required | string |
Return type | Status code | Description |
---|---|---|
Bucket | 200 | Successfully retrieved bucket definition. |
Error Type | Error Message |
---|---|
ErrorEnvelopeError | bad request | unauthorized | missing permissions | Bucket with provided name was not found. |
import { bucketDefinitionsClient } from "@dynatrace-sdk/client-bucket-management";
const data = await bucketDefinitionsClient.getDefinition({
bucketName: "...",
});
Get all bucket definitions
Get all bucket definitions.
Newly created buckets are not shown immediately, this can take up to a minute.
Required scope: storage:bucket-definitions:read
Name | Type | Description |
---|---|---|
config.addFields | Array<string> | Define additional fields added to the response. Depending on the field this may result in longer response times. |
Return type | Status code | Description |
---|---|---|
Buckets | 200 | Successfully retrieved all bucket definitions |
Error Type | Error Message |
---|---|
ErrorEnvelopeError | bad request | unauthorized | missing permissions |
import { bucketDefinitionsClient } from "@dynatrace-sdk/client-bucket-management";
const data = await bucketDefinitionsClient.getDefinitions();
Truncate a bucket
Truncate a specific bucket. Removes the content of the given bucket. Operation can be executed with all types of buckets.
Required scope: storage:bucket-definitions:truncate
Name | Type |
---|---|
config.bucketName*required | string |
Return type | Status code | Description |
---|---|---|
void | 202 | Accepted truncate bucket |
Error Type | Error Message |
---|---|
ErrorEnvelopeError | bad request | unauthorized | Forbidden | Bucket not found | Server not ready |
import { bucketDefinitionsClient } from "@dynatrace-sdk/client-bucket-management";
const data = await bucketDefinitionsClient.truncateBucket({
bucketName: "...",
});
Update a bucket
Update a bucket. Update one of the following fields or both:
Define the full bucket definition with updated field(s) in the request body.
Required scope: storage:bucket-definitions:write
.
Name | Type | Description |
---|---|---|
config.body*required | UpdateBucket | |
config.bucketName*required | string | |
config.optimisticLockingVersion*required | number | Define on which version the updated data is based on. |
Return type | Status code | Description |
---|---|---|
void | 200 | Successfully updated bucket definition |
void | 202 | Accepted update bucket definition |
Error Type | Error Message |
---|---|
ErrorEnvelopeError | bad request | unauthorized | Forbidden | Bucket with provided name was not found | Attempt to update an old version or an operation is currently in progress that prevents current modifications (creating, deleting, updating) |
import { bucketDefinitionsClient } from "@dynatrace-sdk/client-bucket-management";
const data = await bucketDefinitionsClient.updateBucket({
bucketName: "...",
optimisticLockingVersion: 10,
body: {
bucketName: "custom_logs",
table: "logs",
displayName: "Custom logs bucket (updated)",
status: "active",
retentionDays: 10,
version: 1,
},
});
Update a bucket partially
Update a bucket. Update one of the following fields or both:
Add the field(s) to be updated to the request body.
Required scope: storage:bucket-definitions:write
Name | Type | Description |
---|---|---|
config.body*required | PartialUpdateBucket | |
config.bucketName*required | string | |
config.optimisticLockingVersion*required | number | Define on which version the updated data is based on. |
Return type | Status code | Description |
---|---|---|
void | 200 | Successfully updated bucket definition |
void | 202 | Accepted update bucket definition |
Error Type | Error Message |
---|---|
ErrorEnvelopeError | bad request | unauthorized | Forbidden | Bucket with provided name was not found | Attempt to update an old version or an operation is currently in progress that prevents current modifications (creating, deleting, updating) |
import { bucketDefinitionsClient } from "@dynatrace-sdk/client-bucket-management";
const data =
await bucketDefinitionsClient.updateBucketPartially({
bucketName: "...",
optimisticLockingVersion: 10,
body: {
displayName: "Custom logs bucket (updated)",
retentionDays: 10,
},
});
Name | Type | Description |
---|---|---|
bucketName*required | string | The unique identifier of the bucket within the tenant. |
displayName | string | Descriptive name of the bucket. No restriction regarding unique naming or valid characters. |
estimatedUncompressedBytes | number | Estimated uncompressed size of the bucket in bytes. |
metricInterval | "PT1S" | "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT15M" | "PT1H" | Interval of aggregated metric data. Only applies to metric buckets. |
records | number | Amount of records in the bucket. |
retentionDays*required | number | The retention period in days of the data in the bucket. |
status*required | "creating" | "active" | "updating" | "deleting" | The current status of the bucket, depending on bucket lifecycle. |
table*required | string | Name of the table the bucket is assigned to. |
updatable*required | boolean | A flag indicating whether a bucket can be updated or not. |
version*required | number | 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. |
Name | Type |
---|---|
buckets*required | Array<Bucket> |
Name | Type |
---|---|
message | string |
Name | Type |
---|---|
error | ExceptionalReturn |
Name | Type |
---|---|
message | string |
Name | Type |
---|---|
code | number |
errorDetails | Array<CustomValidationErrorInfo | InvalidAuditEventsErrorInfo | MediaTypeErrorInfo | ParameterErrorInfo | ProxyErrorInfo | QueryFrontendRawErrorInfo | RequestBodyErrorInfo> |
message | string |
Name | Type |
---|---|
invalidAuditEventIndices | Array<number> |
invalidEventIndices | Array<number> |
message | string |
Name | Type |
---|---|
message | string |
supportedMediaTypes | Array<string> |
Name | Type | Description |
---|---|---|
bucketName*required | string | The unique identifier of the bucket within the tenant. |
displayName | string | Descriptive name of the bucket. No restriction regarding unique naming or valid characters. |
metricInterval | "PT1M" | "PT5M" | "PT15M" | "PT1H" | Interval of aggregated metric data. Only applies to metric buckets. |
retentionDays*required | number | The retention period in days of the data in the bucket. |
table*required | string | Name of the table the bucket is assigned to. One of [logs, events, bizevents] |
Name | Type |
---|---|
message | string |
parameterDescriptor | string |
Name | Type | Description |
---|---|---|
displayName | string | Descriptive name of the bucket. No restriction regarding unique naming or valid characters. |
retentionDays | number | 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! |
Name | Type |
---|---|
message | string |
Name | Type |
---|---|
message | string |
rawQueryFrontendResponse | string |
Name | Type |
---|---|
bodyDescriptor | string |
message | string |
Name | Type | Description |
---|---|---|
bucketName*required | string | The unique identifier of the bucket within the tenant. |
displayName | string | Descriptive name of the bucket. No restriction regarding unique naming or valid characters. |
metricInterval | "PT1M" | "PT5M" | "PT15M" | "PT1H" | Metric interval for metric buckets. Will be ignored for other buckets. |
retentionDays*required | number | 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! |
status*required | "creating" | "active" | "updating" | "deleting" | The current status of the bucket, depending on bucket lifecycle. |
table*required | "logs" | "events" | "bizevents" | Name of the table the bucket is assigned to. |
version*required | number | 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. |
Interval of aggregated metric data. Only applies to metric buckets.
Pt10S
| Pt15M
| Pt1H
| Pt1M
| Pt1S
| Pt5M
| Pt5S
The current status of the bucket, depending on bucket lifecycle.
Active
| Creating
| Deleting
| Updating
Interval of aggregated metric data. Only applies to metric buckets.
Pt15M
| Pt1H
| Pt1M
| Pt5M
Metric interval for metric buckets. Will be ignored for other buckets.
Pt15M
| Pt1H
| Pt1M
| Pt5M
The current status of the bucket, depending on bucket lifecycle.
Active
| Creating
| Deleting
| Updating
Name of the table the bucket is assigned to.
Bizevents
| Events
| Logs
FAQs
Provides a public bucket management API for Grail.
We found that @dynatrace-sdk/client-bucket-management demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.