-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathReorderArbitraryCostRules.py
More file actions
31 lines (28 loc) · 1.11 KB
/
ReorderArbitraryCostRules.py
File metadata and controls
31 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
Reorder arbitrary cost rules returns "Successfully reordered rules" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi
from datadog_api_client.v2.model.reorder_rule_resource_array import ReorderRuleResourceArray
from datadog_api_client.v2.model.reorder_rule_resource_data import ReorderRuleResourceData
from datadog_api_client.v2.model.reorder_rule_resource_data_type import ReorderRuleResourceDataType
body = ReorderRuleResourceArray(
data=[
ReorderRuleResourceData(
id="456",
type=ReorderRuleResourceDataType.ARBITRARY_RULE,
),
ReorderRuleResourceData(
id="123",
type=ReorderRuleResourceDataType.ARBITRARY_RULE,
),
ReorderRuleResourceData(
id="789",
type=ReorderRuleResourceDataType.ARBITRARY_RULE,
),
],
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = CloudCostManagementApi(api_client)
api_instance.reorder_arbitrary_cost_rules(body=body)