Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-27 10:37:49.383412",
"spec_repo_commit": "c75940cb"
"regenerated": "2025-05-27 15:21:07.185558",
"spec_repo_commit": "97968943"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-27 10:37:49.403493",
"spec_repo_commit": "c75940cb"
"regenerated": "2025-05-27 15:21:07.201322",
"spec_repo_commit": "97968943"
}
}
}
112 changes: 63 additions & 49 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30384,8 +30384,8 @@ components:
description: Defines an action that is executed when a routing rule matches
certain criteria.
oneOf:
- $ref: '#/components/schemas/SlackAction'
- $ref: '#/components/schemas/TeamsAction'
- $ref: '#/components/schemas/SendSlackMessageAction'
- $ref: '#/components/schemas/SendTeamsMessageAction'
RoutingRuleAttributes:
description: Defines the configurable attributes of a routing rule, such as
actions, query, time restriction, and urgency.
Expand All @@ -30401,6 +30401,7 @@ components:
type: string
time_restriction:
$ref: '#/components/schemas/TimeRestrictions'
nullable: true
urgency:
$ref: '#/components/schemas/Urgency'
type: object
Expand All @@ -30416,8 +30417,7 @@ components:
properties:
data:
$ref: '#/components/schemas/RoutingRuleRelationshipsPolicyData'
required:
- data
nullable: true
type: object
RoutingRuleRelationshipsPolicyData:
description: Represents the policy data reference, containing the policy's ID
Expand Down Expand Up @@ -34489,6 +34489,65 @@ components:
required:
- selfServiceTrigger
type: object
SendSlackMessageAction:
description: Sends a message to a Slack channel.
properties:
channel:
description: The channel ID.
example: CHANNEL
type: string
type:
$ref: '#/components/schemas/SendSlackMessageActionType'
workspace:
description: The workspace ID.
example: WORKSPACE
type: string
required:
- type
- channel
- workspace
type: object
SendSlackMessageActionType:
default: send_slack_message
description: Indicates that the action is a send Slack message action.
enum:
- send_slack_message
example: send_slack_message
type: string
x-enum-varnames:
- SEND_SLACK_MESSAGE
SendTeamsMessageAction:
description: Sends a message to a Microsoft Teams channel.
properties:
channel:
description: The channel ID.
example: CHANNEL
type: string
team:
description: The team ID.
example: TEAM
type: string
tenant:
description: The tenant ID.
example: TENANT
type: string
type:
$ref: '#/components/schemas/SendTeamsMessageActionType'
required:
- type
- channel
- tenant
- team
type: object
SendTeamsMessageActionType:
default: send_teams_message
description: Indicates that the action is a send Microsoft Teams message action.
enum:
- send_teams_message
example: send_teams_message
type: string
x-enum-varnames:
- SEND_TEAMS_MESSAGE
SensitiveDataScannerConfigRequest:
description: Group reorder request.
properties:
Expand Down Expand Up @@ -36396,26 +36455,6 @@ components:
type: string
x-enum-varnames:
- AGGREGATED_CONNECTION
SlackAction:
description: Sends a message to a Slack channel.
properties:
channel:
description: The channel ID.
example: CHANNEL
type: string
type:
description: Must be set to "send_slack_message".
example: send_slack_message
type: string
workspace:
description: The workspace ID.
example: WORKSPACE
type: string
required:
- type
- channel
- workspace
type: object
SlackIntegrationMetadata:
description: Incident integration metadata for the Slack integration.
properties:
Expand Down Expand Up @@ -38330,31 +38369,6 @@ components:
required:
- data
type: object
TeamsAction:
description: Sends a message to a Microsoft Teams channel.
properties:
channel:
description: The channel ID.
example: CHANNEL
type: string
team:
description: The team ID.
example: TEAM
type: string
tenant:
description: The tenant ID.
example: TENANT
type: string
type:
description: Must be set to "send_teams_message".
example: send_teams_message
type: string
required:
- type
- channel
- tenant
- team
type: object
TeamsField:
description: Supported teams field.
enum:
Expand Down
19 changes: 13 additions & 6 deletions examples/v2/on-call/SetOnCallTeamRoutingRules.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.OnCallApi;
import com.datadog.api.client.v2.api.OnCallApi.SetOnCallTeamRoutingRulesOptionalParameters;
import com.datadog.api.client.v2.model.RoutingRuleAction;
import com.datadog.api.client.v2.model.SlackAction;
import com.datadog.api.client.v2.model.SendSlackMessageAction;
import com.datadog.api.client.v2.model.SendSlackMessageActionType;
import com.datadog.api.client.v2.model.TeamRoutingRules;
import com.datadog.api.client.v2.model.TeamRoutingRulesRequest;
import com.datadog.api.client.v2.model.TeamRoutingRulesRequestData;
Expand Down Expand Up @@ -41,9 +43,11 @@ public static void main(String[] args) {
.actions(
Collections.singletonList(
new RoutingRuleAction(
new SlackAction()
new SendSlackMessageAction()
.channel("channel")
.type("send_slack_message")
.type(
SendSlackMessageActionType
.SEND_SLACK_MESSAGE)
.workspace("workspace"))))
.query("tags.service:test")
.timeRestriction(
Expand All @@ -60,8 +64,7 @@ public static void main(String[] args) {
.endDay(Weekday.TUESDAY)
.endTime("17:00:00")
.startDay(Weekday.TUESDAY)
.startTime("09:00:00"))))
.urgency(Urgency.HIGH),
.startTime("09:00:00")))),
new TeamRoutingRulesRequestRule()
.policyId(ESCALATION_POLICY_DATA_ID)
.query("")
Expand All @@ -70,7 +73,11 @@ public static void main(String[] args) {
.type(TeamRoutingRulesRequestDataType.TEAM_ROUTING_RULES));

try {
TeamRoutingRules result = apiInstance.setOnCallTeamRoutingRules(DD_TEAM_DATA_ID, body);
TeamRoutingRules result =
apiInstance.setOnCallTeamRoutingRules(
DD_TEAM_DATA_ID,
body,
new SetOnCallTeamRoutingRulesOptionalParameters().include("rules"));
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OnCallApi#setOnCallTeamRoutingRules");
Expand Down
Loading