Dynatrace platform subscription API v1 - POST environment limit
Creates a new unit-consumption limit for an environment.
The request consumes and produces an application/json
payload.
POST |
|
Authentication
To execute this request, you need the Allow write access for usage and consumption resources (account-uac-write
) permission assigned to your token. To learn how to obtain and use it, see Authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
accountUuid | string | The ID of the required account. You can find the UUID on the Account > Account management API page, during creation of an OAuth client. | path | required |
subscriptionId | number | The ID of the required subscription. You can fetch the list of subscriptions with the GET subscriptions call. | path | required |
environmentUuid | string | The ID of the environment where you want to set the limit. You can fetch the list of environments with the GET environments request. | path | required |
body | ClaBudgetLimitDto | The JSON body of the request. Contains the new limit for the environment. | body | required |
Request body objects
The ClaBudgetLimitDto
object
Element | Type | Description | Required |
---|---|---|---|
limit | number | The limit for the cluster or environment. Consumption will be restricted to this value. | required |
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"limit": 1}
Response
Response codes
Code | Type | Description |
---|---|---|
201 | ClaBudgetLimitRecordsDto | Success. The response contains the description of the limit. |
Response body objects
The ClaBudgetLimitRecordsDto
object
Element | Type | Description |
---|---|---|
clusterUuid | string | The ID of the cluster to which the limit applies. |
environmentUuid | string | The ID of the environment to which the limit applies. |
dimensionName | string | The consumption units to which the limit applies. |
tierType | string | -
|
startDate | string | The date and time when the restriction takes effect in The limit is not enforeced in real-time and might lead to overages. |
endDate | string | The date and time when the restriction ends in The limit is not enforeced in real-time and might lead to overages. |
amount | number | The limit for the cluster or environment. If consumption exceeds the limit, monitoring will stop. |
subscriptionId | number | The ID of the Dynatrace Platform Subscription. |
Response body JSON model
{"clusterUuid": "string","environmentUuid": "string","dimensionName": "string","tierType": "LIMIT","startDate": "string","endDate": "string","amount": 1,"subscriptionId": 1}
Example
In this example, the request creates a total consumption limit of 20000 units for the mySampleEnv environment. The environment is a part of the subscription with the ID of 40655 from the account with the ID of 2b794097-8ad2-4b32-b923-0131da2eeddf.
curl --request POST \--url https://api.dynatrace.com/sub/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/subscriptions/40655/environments/mySampleEnv/limits \--header 'Authorization: Bearer abcdefjhij1234567890' \--header 'Content-Type: application/json' \--data '{"limit": 20000}'
Request URL
https://api.dynatrace.com/sub/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/subscriptions/40655/environments/mySampleEnv/limits
Request body
{"limit": 20000}
Response body
{"clusterUuid": "","environmentUuid": "mySampleEnv","dimensionName": "Total","tierType": "LIMIT","startDate": "2020-07-23T00:00:00Z","endDate": "2022-04-22T23:59:59Z","amount": 20000,"subscriptionId": 40655}