-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
265be1e
commit 6de9e44
Showing
2 changed files
with
366 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
datadog/tests/cassettes/TestAccDatadogMonitor_FormulaFunction_Cost.freeze
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2025-01-29T14:03:08.169815+01:00 | ||
2025-01-30T08:50:43.356755-05:00 |
366 changes: 365 additions & 1 deletion
366
datadog/tests/cassettes/TestAccDatadogMonitor_FormulaFunction_Cost.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,367 @@ | ||
--- | ||
version: 2 | ||
interactions: [] | ||
interactions: | ||
- id: 0 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 538 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: | | ||
{"message":"test","name":"tf-TestAccDatadogMonitor_FormulaFunction_Cost-local-1738245043","options":{"include_tags":true,"new_host_delay":300,"no_data_timeframe":10,"notify_no_data":false,"require_full_window":true,"thresholds":{"critical":6},"variables":[{"aggregator":"sum","data_source":"cloud_cost","name":"query1","query":"sum:aws.cost.amortized{servicename: ec2} by {account}"}]},"priority":null,"query":"formula(\"query1\").last(\"30d\").anomaly(direction=\"both\") \u003e 6","restricted_roles":null,"tags":[],"type":"cost alert"} | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor/validate | ||
method: POST | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: [] | ||
trailer: {} | ||
content_length: 3 | ||
uncompressed: false | ||
body: | | ||
{} | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
code: 200 | ||
duration: 123.523375ms | ||
- id: 1 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 538 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: | | ||
{"message":"test","name":"tf-TestAccDatadogMonitor_FormulaFunction_Cost-local-1738245043","options":{"include_tags":true,"new_host_delay":300,"no_data_timeframe":10,"notify_no_data":false,"require_full_window":true,"thresholds":{"critical":6},"variables":[{"aggregator":"sum","data_source":"cloud_cost","name":"query1","query":"sum:aws.cost.amortized{servicename: ec2} by {account}"}]},"priority":null,"query":"formula(\"query1\").last(\"30d\").anomaly(direction=\"both\") \u003e 6","restricted_roles":null,"tags":[],"type":"cost alert"} | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor/validate | ||
method: POST | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: [] | ||
trailer: {} | ||
content_length: 3 | ||
uncompressed: false | ||
body: | | ||
{} | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
code: 200 | ||
duration: 81.448458ms | ||
- id: 2 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 538 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: | | ||
{"message":"test","name":"tf-TestAccDatadogMonitor_FormulaFunction_Cost-local-1738245043","options":{"include_tags":true,"new_host_delay":300,"no_data_timeframe":10,"notify_no_data":false,"require_full_window":true,"thresholds":{"critical":6},"variables":[{"aggregator":"sum","data_source":"cloud_cost","name":"query1","query":"sum:aws.cost.amortized{servicename: ec2} by {account}"}]},"priority":null,"query":"formula(\"query1\").last(\"30d\").anomaly(direction=\"both\") \u003e 6","restricted_roles":null,"tags":[],"type":"cost alert"} | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor/validate | ||
method: POST | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: [] | ||
trailer: {} | ||
content_length: 3 | ||
uncompressed: false | ||
body: | | ||
{} | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
code: 200 | ||
duration: 75.326125ms | ||
- id: 3 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 515 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: | | ||
{"message":"test","name":"tf-TestAccDatadogMonitor_FormulaFunction_Cost-local-1738245043","options":{"include_tags":true,"new_host_delay":300,"notify_no_data":false,"require_full_window":true,"thresholds":{"critical":6},"variables":[{"aggregator":"sum","data_source":"cloud_cost","name":"query1","query":"sum:aws.cost.amortized{servicename: ec2} by {account}"}]},"priority":null,"query":"formula(\"query1\").last(\"30d\").anomaly(direction=\"both\") \u003e 6","restricted_roles":null,"tags":[],"type":"cost alert"} | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor | ||
method: POST | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: | ||
- chunked | ||
trailer: {} | ||
content_length: -1 | ||
uncompressed: true | ||
body: | | ||
{"id":163691240,"org_id":321813,"type":"cost alert","name":"tf-TestAccDatadogMonitor_FormulaFunction_Cost-local-1738245043","message":"test","tags":[],"query":"formula(\"query1\").last(\"30d\").anomaly(direction=\"both\") > 6","options":{"include_tags":true,"new_host_delay":300,"notify_no_data":false,"require_full_window":true,"thresholds":{"critical":6.0},"variables":[{"aggregator":"sum","data_source":"cloud_cost","name":"query1","query":"sum:aws.cost.amortized{servicename: ec2} by {account}"}],"notify_audit":false,"silenced":{}},"multi":false,"created_at":1738245025000,"created":"2025-01-30T13:50:25.991206+00:00","modified":"2025-01-30T13:50:25.991206+00:00","deleted":null,"priority":null,"restricted_roles":null,"restriction_policy":null,"overall_state_modified":null,"overall_state":"No Data","creator":{"name":"frog","handle":"[email protected]","email":"[email protected]","id":1445416}} | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
code: 200 | ||
duration: 155.210334ms | ||
- id: 4 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 538 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: | | ||
{"message":"test","name":"tf-TestAccDatadogMonitor_FormulaFunction_Cost-local-1738245043","options":{"include_tags":true,"new_host_delay":300,"no_data_timeframe":10,"notify_no_data":false,"require_full_window":true,"thresholds":{"critical":6},"variables":[{"aggregator":"sum","data_source":"cloud_cost","name":"query1","query":"sum:aws.cost.amortized{servicename: ec2} by {account}"}]},"priority":null,"query":"formula(\"query1\").last(\"30d\").anomaly(direction=\"both\") \u003e 6","restricted_roles":null,"tags":[],"type":"cost alert"} | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor/163691240/validate | ||
method: POST | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: [] | ||
trailer: {} | ||
content_length: 3 | ||
uncompressed: false | ||
body: | | ||
{} | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
code: 200 | ||
duration: 107.051917ms | ||
- id: 5 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 0 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: "" | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor/163691240 | ||
method: GET | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: | ||
- chunked | ||
trailer: {} | ||
content_length: -1 | ||
uncompressed: true | ||
body: | | ||
{"id":163691240,"org_id":321813,"type":"cost alert","name":"tf-TestAccDatadogMonitor_FormulaFunction_Cost-local-1738245043","message":"test","tags":[],"query":"formula(\"query1\").last(\"30d\").anomaly(direction=\"both\") > 6","options":{"include_tags":true,"new_host_delay":300,"notify_no_data":false,"require_full_window":true,"thresholds":{"critical":6.0},"variables":[{"aggregator":"sum","data_source":"cloud_cost","name":"query1","query":"sum:aws.cost.amortized{servicename: ec2} by {account}"}],"notify_audit":false,"silenced":{}},"multi":false,"created_at":1738245025000,"created":"2025-01-30T13:50:25.991206+00:00","modified":"2025-01-30T13:50:25.991206+00:00","deleted":null,"priority":null,"restricted_roles":null,"overall_state_modified":null,"overall_state":"No Data","creator":{"name":"frog","email":"[email protected]","handle":"[email protected]","id":1445416}} | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
code: 200 | ||
duration: 122.613291ms | ||
- id: 6 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 538 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: | | ||
{"message":"test","name":"tf-TestAccDatadogMonitor_FormulaFunction_Cost-local-1738245043","options":{"include_tags":true,"new_host_delay":300,"no_data_timeframe":10,"notify_no_data":false,"require_full_window":true,"thresholds":{"critical":6},"variables":[{"aggregator":"sum","data_source":"cloud_cost","name":"query1","query":"sum:aws.cost.amortized{servicename: ec2} by {account}"}]},"priority":null,"query":"formula(\"query1\").last(\"30d\").anomaly(direction=\"both\") \u003e 6","restricted_roles":null,"tags":[],"type":"cost alert"} | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor/163691240/validate | ||
method: POST | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: [] | ||
trailer: {} | ||
content_length: 3 | ||
uncompressed: false | ||
body: | | ||
{} | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
code: 200 | ||
duration: 107.504458ms | ||
- id: 7 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 538 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: | | ||
{"message":"test","name":"tf-TestAccDatadogMonitor_FormulaFunction_Cost-local-1738245043","options":{"include_tags":true,"new_host_delay":300,"no_data_timeframe":10,"notify_no_data":false,"require_full_window":true,"thresholds":{"critical":6},"variables":[{"aggregator":"sum","data_source":"cloud_cost","name":"query1","query":"sum:aws.cost.amortized{servicename: ec2} by {account}"}]},"priority":null,"query":"formula(\"query1\").last(\"30d\").anomaly(direction=\"both\") \u003e 6","restricted_roles":null,"tags":[],"type":"cost alert"} | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor/163691240/validate | ||
method: POST | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: [] | ||
trailer: {} | ||
content_length: 3 | ||
uncompressed: false | ||
body: | | ||
{} | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
code: 200 | ||
duration: 120.110625ms | ||
- id: 8 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 0 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: "" | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor/163691240 | ||
method: DELETE | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: | ||
- chunked | ||
trailer: {} | ||
content_length: -1 | ||
uncompressed: true | ||
body: | | ||
{"deleted_monitor_id":163691240} | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
code: 200 | ||
duration: 222.840667ms | ||
- id: 9 | ||
request: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
content_length: 0 | ||
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: "" | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
url: https://api.datadoghq.com/api/v1/monitor/163691240 | ||
method: GET | ||
response: | ||
proto: HTTP/1.1 | ||
proto_major: 1 | ||
proto_minor: 1 | ||
transfer_encoding: | ||
- chunked | ||
trailer: {} | ||
content_length: -1 | ||
uncompressed: true | ||
body: '{"errors":["Monitor not found"]}' | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 404 Not Found | ||
code: 404 | ||
duration: 82.746625ms |