Skip to content
Open
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
42 changes: 42 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22994,6 +22994,35 @@ components:
$ref: '#/components/schemas/EscalationPolicyIncluded'
type: array
type: object
EscalationPolicyAction:
description: Triggers an escalation policy when the routing rule matches.
properties:
policy_id:
description: The ID of the escalation policy to trigger.
example: fad4eee1-13f5-40d8-886b-4e56d8d5d1c6
type: string
support_hours:
$ref: '#/components/schemas/TimeRestrictions'
description: Defines the support hours during which the escalation policy
will be executed.
nullable: true
type:
$ref: '#/components/schemas/EscalationPolicyActionType'
urgency:
$ref: '#/components/schemas/Urgency'
required:
- type
- policy_id
type: object
EscalationPolicyActionType:
default: escalation_policy
description: Indicates that the action is an escalation policy action.
enum:
- escalation_policy
example: escalation_policy
type: string
x-enum-varnames:
- ESCALATION_POLICY
EscalationPolicyCreateRequest:
description: Represents a request to create a new escalation policy, including
the policy data.
Expand Down Expand Up @@ -52369,6 +52398,7 @@ components:
oneOf:
- $ref: '#/components/schemas/SendSlackMessageAction'
- $ref: '#/components/schemas/SendTeamsMessageAction'
- $ref: '#/components/schemas/EscalationPolicyAction'
RoutingRuleAttributes:
description: Defines the configurable attributes of a routing rule, such as
actions, query, time restriction, and urgency.
Expand Down Expand Up @@ -91487,6 +91517,12 @@ paths:
name: include
schema:
type: string
- description: When set to `true`, escalation policies are returned as actions
within routing rules rather than as a separate `policy_id` field.
in: query
name: use_policy_action
schema:
type: boolean
responses:
'200':
content:
Expand Down Expand Up @@ -91524,6 +91560,12 @@ paths:
name: include
schema:
type: string
- description: When set to `true`, escalation policies are returned as actions
within routing rules rather than as a separate `policy_id` field.
in: query
name: use_policy_action
schema:
type: boolean
requestBody:
content:
application/json:
Expand Down
40 changes: 40 additions & 0 deletions src/main/java/com/datadog/api/client/v2/api/OnCallApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,7 @@ public CompletableFuture<ApiResponse<Schedule>> getOnCallScheduleWithHttpInfoAsy
/** Manage optional parameters to getOnCallTeamRoutingRules. */
public static class GetOnCallTeamRoutingRulesOptionalParameters {
private String include;
private Boolean usePolicyAction;

/**
* Set include.
Expand All @@ -1802,6 +1803,19 @@ public GetOnCallTeamRoutingRulesOptionalParameters include(String include) {
this.include = include;
return this;
}

/**
* Set usePolicyAction.
*
* @param usePolicyAction When set to <code>true</code>, escalation policies are returned as
* actions within routing rules rather than as a separate <code>policy_id</code> field.
* (optional)
* @return GetOnCallTeamRoutingRulesOptionalParameters
*/
public GetOnCallTeamRoutingRulesOptionalParameters usePolicyAction(Boolean usePolicyAction) {
this.usePolicyAction = usePolicyAction;
return this;
}
}

/**
Expand Down Expand Up @@ -1894,6 +1908,7 @@ public ApiResponse<TeamRoutingRules> getOnCallTeamRoutingRulesWithHttpInfo(
400, "Missing the required parameter 'teamId' when calling getOnCallTeamRoutingRules");
}
String include = parameters.include;
Boolean usePolicyAction = parameters.usePolicyAction;
// create path and map variables
String localVarPath =
"/api/v2/on-call/teams/{team_id}/routing-rules"
Expand All @@ -1903,6 +1918,8 @@ public ApiResponse<TeamRoutingRules> getOnCallTeamRoutingRulesWithHttpInfo(
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "use_policy_action", usePolicyAction));

Invocation.Builder builder =
apiClient.createBuilder(
Expand Down Expand Up @@ -1948,6 +1965,7 @@ public ApiResponse<TeamRoutingRules> getOnCallTeamRoutingRulesWithHttpInfo(
return result;
}
String include = parameters.include;
Boolean usePolicyAction = parameters.usePolicyAction;
// create path and map variables
String localVarPath =
"/api/v2/on-call/teams/{team_id}/routing-rules"
Expand All @@ -1957,6 +1975,8 @@ public ApiResponse<TeamRoutingRules> getOnCallTeamRoutingRulesWithHttpInfo(
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "use_policy_action", usePolicyAction));

Invocation.Builder builder;
try {
Expand Down Expand Up @@ -3154,6 +3174,7 @@ public ApiResponse<ListOnCallNotificationRulesResponse> listUserNotificationRule
/** Manage optional parameters to setOnCallTeamRoutingRules. */
public static class SetOnCallTeamRoutingRulesOptionalParameters {
private String include;
private Boolean usePolicyAction;

/**
* Set include.
Expand All @@ -3166,6 +3187,19 @@ public SetOnCallTeamRoutingRulesOptionalParameters include(String include) {
this.include = include;
return this;
}

/**
* Set usePolicyAction.
*
* @param usePolicyAction When set to <code>true</code>, escalation policies are returned as
* actions within routing rules rather than as a separate <code>policy_id</code> field.
* (optional)
* @return SetOnCallTeamRoutingRulesOptionalParameters
*/
public SetOnCallTeamRoutingRulesOptionalParameters usePolicyAction(Boolean usePolicyAction) {
this.usePolicyAction = usePolicyAction;
return this;
}
}

/**
Expand Down Expand Up @@ -3279,6 +3313,7 @@ public ApiResponse<TeamRoutingRules> setOnCallTeamRoutingRulesWithHttpInfo(
400, "Missing the required parameter 'body' when calling setOnCallTeamRoutingRules");
}
String include = parameters.include;
Boolean usePolicyAction = parameters.usePolicyAction;
// create path and map variables
String localVarPath =
"/api/v2/on-call/teams/{team_id}/routing-rules"
Expand All @@ -3288,6 +3323,8 @@ public ApiResponse<TeamRoutingRules> setOnCallTeamRoutingRulesWithHttpInfo(
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "use_policy_action", usePolicyAction));

Invocation.Builder builder =
apiClient.createBuilder(
Expand Down Expand Up @@ -3345,6 +3382,7 @@ public ApiResponse<TeamRoutingRules> setOnCallTeamRoutingRulesWithHttpInfo(
return result;
}
String include = parameters.include;
Boolean usePolicyAction = parameters.usePolicyAction;
// create path and map variables
String localVarPath =
"/api/v2/on-call/teams/{team_id}/routing-rules"
Expand All @@ -3354,6 +3392,8 @@ public ApiResponse<TeamRoutingRules> setOnCallTeamRoutingRulesWithHttpInfo(
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "use_policy_action", usePolicyAction));

Invocation.Builder builder;
try {
Expand Down
Loading
Loading