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
41 changes: 41 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58413,6 +58413,47 @@ paths:
description: Returns a list of all monitor notification rules.
operationId: GetMonitorNotificationRules
parameters:
- description: The page to start paginating from. If `page` is not specified,
the argument defaults to the first page.
in: query
name: page
required: false
schema:
format: int32
maximum: 1000000
minimum: 0
type: integer
- description: The number of rules to return per page. If `per_page` is not
specified, the argument defaults to 100.
in: query
name: per_page
required: false
schema:
format: int32
maximum: 1000
minimum: 1
type: integer
- description: 'String for sort order, composed of field and sort order separated
by a colon, for example `name:asc`. Supported sort directions: `asc`, `desc`.
Supported fields: `name`, `created_at`.'
in: query
name: sort
required: false
schema:
type: string
- description: 'JSON-encoded filter object. Supported keys:

* `text`: Free-text query matched against rule name, tags, and recipients.

* `tags`: Array of strings. Return rules that have any of these tags.

* `recipients`: Array of strings. Return rules that have any of these recipients.'
example: '{"text":"error","tags":["env:prod","team:my-team"],"recipients":["slack-monitor-app","email@example.com"]}'
in: query
name: filters
required: false
schema:
type: string
- description: 'Comma-separated list of resource paths for related resources
to include in the response. Supported resource

Expand Down
71 changes: 71 additions & 0 deletions src/main/java/com/datadog/api/client/v2/api/MonitorsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -1252,8 +1252,63 @@ public ApiResponse<MonitorNotificationRuleResponse> getMonitorNotificationRuleWi

/** Manage optional parameters to getMonitorNotificationRules. */
public static class GetMonitorNotificationRulesOptionalParameters {
private Integer page;
private Integer perPage;
private String sort;
private String filters;
private String include;

/**
* Set page.
*
* @param page The page to start paginating from. If <code>page</code> is not specified, the
* argument defaults to the first page. (optional)
* @return GetMonitorNotificationRulesOptionalParameters
*/
public GetMonitorNotificationRulesOptionalParameters page(Integer page) {
this.page = page;
return this;
}

/**
* Set perPage.
*
* @param perPage The number of rules to return per page. If <code>per_page</code> is not
* specified, the argument defaults to 100. (optional)
* @return GetMonitorNotificationRulesOptionalParameters
*/
public GetMonitorNotificationRulesOptionalParameters perPage(Integer perPage) {
this.perPage = perPage;
return this;
}

/**
* Set sort.
*
* @param sort String for sort order, composed of field and sort order separated by a colon, for
* example <code>name:asc</code>. Supported sort directions: <code>asc</code>, <code>desc
* </code>. Supported fields: <code>name</code>, <code>created_at</code>. (optional)
* @return GetMonitorNotificationRulesOptionalParameters
*/
public GetMonitorNotificationRulesOptionalParameters sort(String sort) {
this.sort = sort;
return this;
}

/**
* Set filters.
*
* @param filters JSON-encoded filter object. Supported keys: * <code>text</code>: Free-text
* query matched against rule name, tags, and recipients. * <code>tags</code>: Array of
* strings. Return rules that have any of these tags. * <code>recipients</code>: Array of
* strings. Return rules that have any of these recipients. (optional)
* @return GetMonitorNotificationRulesOptionalParameters
*/
public GetMonitorNotificationRulesOptionalParameters filters(String filters) {
this.filters = filters;
return this;
}

/**
* Set include.
*
Expand Down Expand Up @@ -1346,13 +1401,21 @@ public CompletableFuture<MonitorNotificationRuleListResponse> getMonitorNotifica
public ApiResponse<MonitorNotificationRuleListResponse> getMonitorNotificationRulesWithHttpInfo(
GetMonitorNotificationRulesOptionalParameters parameters) throws ApiException {
Object localVarPostBody = null;
Integer page = parameters.page;
Integer perPage = parameters.perPage;
String sort = parameters.sort;
String filters = parameters.filters;
String include = parameters.include;
// create path and map variables
String localVarPath = "/api/v2/monitor/notification_rule";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "per_page", perPage));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filters", filters));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));

Invocation.Builder builder =
Expand Down Expand Up @@ -1387,13 +1450,21 @@ public ApiResponse<MonitorNotificationRuleListResponse> getMonitorNotificationRu
getMonitorNotificationRulesWithHttpInfoAsync(
GetMonitorNotificationRulesOptionalParameters parameters) {
Object localVarPostBody = null;
Integer page = parameters.page;
Integer perPage = parameters.perPage;
String sort = parameters.sort;
String filters = parameters.filters;
String include = parameters.include;
// create path and map variables
String localVarPath = "/api/v2/monitor/notification_rule";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "per_page", perPage));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filters", filters));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));

Invocation.Builder builder;
Expand Down