Create an external datastore definition in Dynatrace Grail with the External Datastores API; its name is unique and can't be changed after creation.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/v1/external-datastore-definitions |
Create a new external datastore definition.
The name field uniquely identifies the datastore and cannot be changed after creation.
type the type of the external datastore. Currently the only allowed value is s3://.
name unique identifier of the external datastore.
([a-z])([a-z0-9])([a-z0-9_-])+displayName optional human-readable label for the datastore (up to 200 characters).
bucketName the name of the S3 bucket (up to 1000 characters).
region the AWS region the S3 bucket resides in (up to 1000 characters).
connectionId optional reference to the connection settings object (up to 1000 characters).
connectionName optional reference to the connection settings object (up to 1000 characters).
To execute this request, you need a platform token or OAuth access token with storage:external-datastore-definitions:write scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | Create | - | body | Required |
CreateExternalDatastoreS3Dto object| Element | Type | Description | Required |
|---|---|---|---|
| bucketName | string | The S3 bucket name. | Optional |
| connectionId | string | References the connection settings object. | Optional |
| connectionName | string | References the connection settings object. | Optional |
| displayName | string | Descriptive name of the external datastore. | Optional |
| name | string | Unique Name of the external datastore. Cannot be changed after creation. | Optional |
| region | string | The AWS region the S3 bucket resides in. | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"type": "s3://","name": "my-s3-store","displayName": "My S3 Store","bucketName": "my-s3-bucket","region": "us-east-2","connectionId": "my-connection-id","connectionName": "my-connection-name"}
| Code | Type | Description |
|---|---|---|
| 201 | External | Successfully created external datastore definition. |
| 400 | Error | Invalid request. |
| 401 | Error | Unauthorized |
| 403 | Error | Missing permissions |
| 409 | Error | External datastore already exists. |
| 4XX | Error | Client Error |
| 5XX | Error | Server Error. |
ExternalDatastoreS3Dto object| Element | Type | Description |
|---|---|---|
| bucketName | string | The S3 bucket name. |
| connectionId | string | References the connection settings object. |
| connectionName | string | References the connection settings object. |
| displayName | string | Descriptive name of the external datastore. |
| name | string | Unique Name of the external datastore. Cannot be changed after creation. |
| region | string | The AWS region the S3 bucket resides in. |
| type | string | Type of the external datastore. |
| version | integer | Used for optimistic locking. |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | The response for error state |
ErrorResponse objectThe response for error state
| Element | Type | Description |
|---|---|---|
| code | integer | Error code, which normally matches the HTTP error code. |
| details | Error | Detailed information about the error. |
| message | string | A short, clear error message without details |
ErrorResponseDetails objectDetailed information about the error.
| Element | Type | Description |
|---|---|---|
| constraintViolations | Error | Information about an input parameter that violated some validation rule of the service API. |
| errorMessage | string | Complete error message. |
| missingPermissions | string[] | List of missing IAM permissions necessary to successfully execute the request. |
| missingScopes | string[] | List of missing IAM scopes necessary to successfully execute the request. |
ErrorResponseDetailsConstraintViolations objectInformation about an input parameter that violated some validation rule of the service API.
| Element | Type | Description |
|---|---|---|
| message | string | Message describing the error. |
| parameterDescriptor | string | Describes the violating parameter. |
{"type": "s3://","name": "my-s3-store","displayName": "My S3 Store","bucketName": "my-s3-bucket","region": "us-east-2","connectionId": "my-connection-id","connectionName": "my-connection-name","version": 1}
{"error": {"message": "Constraint Violations","details": {"constraintViolations": [{"message": "must not be blank","parameterDescriptor": "name"}]},"code": 400}}