Skip to content

Commit e3b9f28

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4592677 of spec repo
1 parent ee56877 commit e3b9f28

233 files changed

Lines changed: 28053 additions & 850 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 4443 additions & 178 deletions
Large diffs are not rendered by default.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Update custom attribute config returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_custom_attribute_config".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAttributeAPI.new
8+
9+
body = DatadogAPIClient::V2::CustomAttributeConfigUpdateRequest.new({
10+
data: DatadogAPIClient::V2::CustomAttributeConfigUpdate.new({
11+
attributes: DatadogAPIClient::V2::CustomAttributeConfigUpdateAttributes.new({
12+
description: "Updated description.",
13+
display_name: "AWS Region",
14+
type: DatadogAPIClient::V2::CustomAttributeType::NUMBER,
15+
type_data: DatadogAPIClient::V2::CustomAttributeTypeData.new({
16+
options: [
17+
DatadogAPIClient::V2::CustomAttributeSelectOption.new({
18+
value: "us-east-1",
19+
}),
20+
],
21+
}),
22+
}),
23+
type: DatadogAPIClient::V2::CustomAttributeConfigResourceType::CUSTOM_ATTRIBUTE,
24+
}),
25+
})
26+
p api_instance.update_custom_attribute_config("case_type_id", "custom_attribute_id", body)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Update a case type returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_case_type".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementTypeAPI.new
8+
9+
body = DatadogAPIClient::V2::CaseTypeUpdateRequest.new({
10+
data: DatadogAPIClient::V2::CaseTypeUpdate.new({
11+
attributes: DatadogAPIClient::V2::CaseTypeResourceAttributes.new({
12+
description: "Investigations done in case management",
13+
emoji: '🕵🏻\u200d♂️',
14+
name: "Investigation",
15+
}),
16+
type: DatadogAPIClient::V2::CaseTypeResourceType::CASE_TYPE,
17+
}),
18+
})
19+
p api_instance.update_case_type("case_type_id", body)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Add insights to a case returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.add_case_insights".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
9+
body = DatadogAPIClient::V2::CaseInsightsRequest.new({
10+
data: DatadogAPIClient::V2::CaseInsightsData.new({
11+
attributes: DatadogAPIClient::V2::CaseInsightsAttributes.new({
12+
insights: [
13+
DatadogAPIClient::V2::CaseInsight.new({
14+
ref: "/monitors/12345?q=total",
15+
resource_id: "12345",
16+
type: DatadogAPIClient::V2::CaseInsightType::SECURITY_SIGNAL,
17+
}),
18+
],
19+
}),
20+
type: DatadogAPIClient::V2::CaseResourceType::CASE,
21+
}),
22+
})
23+
p api_instance.add_case_insights("case_id", body)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Aggregate cases returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.aggregate_cases".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
9+
body = DatadogAPIClient::V2::CaseAggregateRequest.new({
10+
data: DatadogAPIClient::V2::CaseAggregateRequestData.new({
11+
attributes: DatadogAPIClient::V2::CaseAggregateRequestAttributes.new({
12+
group_by: DatadogAPIClient::V2::CaseAggregateGroupBy.new({
13+
groups: [
14+
"status",
15+
],
16+
limit: 14,
17+
}),
18+
query_filter: "service:case-api",
19+
}),
20+
type: DatadogAPIClient::V2::CaseAggregateResourceType::AGGREGATE,
21+
}),
22+
})
23+
p api_instance.aggregate_cases(body)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Bulk update cases returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.bulk_update_cases".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
9+
body = DatadogAPIClient::V2::CaseBulkUpdateRequest.new({
10+
data: DatadogAPIClient::V2::CaseBulkUpdateRequestData.new({
11+
attributes: DatadogAPIClient::V2::CaseBulkUpdateRequestAttributes.new({
12+
case_ids: [
13+
"case-id-1",
14+
"case-id-2",
15+
],
16+
payload: {
17+
priority: "P1",
18+
},
19+
type: DatadogAPIClient::V2::CaseBulkActionType::PRIORITY,
20+
}),
21+
type: DatadogAPIClient::V2::CaseBulkResourceType::BULK,
22+
}),
23+
})
24+
p api_instance.bulk_update_cases(body)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Count cases returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.count_cases".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
p api_instance.count_cases()
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Create an automation rule returns "Created" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_case_automation_rule".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
9+
body = DatadogAPIClient::V2::AutomationRuleCreateRequest.new({
10+
data: DatadogAPIClient::V2::AutomationRuleCreate.new({
11+
attributes: DatadogAPIClient::V2::AutomationRuleCreateAttributes.new({
12+
action: DatadogAPIClient::V2::AutomationRuleAction.new({
13+
data: DatadogAPIClient::V2::AutomationRuleActionData.new({
14+
handle: "workflow-handle-123",
15+
}),
16+
type: DatadogAPIClient::V2::AutomationRuleActionType::EXECUTE_WORKFLOW,
17+
}),
18+
name: "Auto-assign workflow",
19+
state: DatadogAPIClient::V2::CaseAutomationRuleState::ENABLED,
20+
trigger: DatadogAPIClient::V2::AutomationRuleTrigger.new({
21+
data: DatadogAPIClient::V2::AutomationRuleTriggerData.new({}),
22+
type: DatadogAPIClient::V2::AutomationRuleTriggerType::CASE_CREATED,
23+
}),
24+
}),
25+
type: DatadogAPIClient::V2::CaseAutomationRuleResourceType::RULE,
26+
}),
27+
})
28+
p api_instance.create_case_automation_rule("project_id", body)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Create a case link returns "Created" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_case_link".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
9+
body = DatadogAPIClient::V2::CaseLinkCreateRequest.new({
10+
data: DatadogAPIClient::V2::CaseLinkCreate.new({
11+
attributes: DatadogAPIClient::V2::CaseLinkAttributes.new({
12+
child_entity_id: "4417921d-0866-4a38-822c-6f2a0f65f77d",
13+
child_entity_type: "CASE",
14+
parent_entity_id: "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f",
15+
parent_entity_type: "CASE",
16+
relationship: "BLOCKS",
17+
}),
18+
type: DatadogAPIClient::V2::CaseLinkResourceType::LINK,
19+
}),
20+
})
21+
p api_instance.create_case_link(body)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Create a case view returns "Created" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_case_view".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
9+
body = DatadogAPIClient::V2::CaseViewCreateRequest.new({
10+
data: DatadogAPIClient::V2::CaseViewCreate.new({
11+
attributes: DatadogAPIClient::V2::CaseViewCreateAttributes.new({
12+
name: "Open bugs",
13+
project_id: "e555e290-ed65-49bd-ae18-8acbfcf18db7",
14+
query: "status:open type:bug",
15+
}),
16+
type: DatadogAPIClient::V2::CaseViewResourceType::VIEW,
17+
}),
18+
})
19+
p api_instance.create_case_view(body)

0 commit comments

Comments
 (0)