Skip to content

Commit f2a9d49

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e81eb5b of spec repo
1 parent 8c603c8 commit f2a9d49

22 files changed

Lines changed: 3378 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3555,6 +3555,196 @@ components:
35553555
type: string
35563556
x-enum-varnames:
35573557
- LOGS_SERVICES
3558+
AWSMetricNameFilterPreviewDDName:
3559+
description: A Datadog metric name and whether it is filtered.
3560+
properties:
3561+
filtered:
3562+
description: Whether this Datadog metric name is filtered out.
3563+
example: true
3564+
type: boolean
3565+
name:
3566+
description: The Datadog metric name.
3567+
example: "aws.ec2.network_in"
3568+
type: string
3569+
required:
3570+
- name
3571+
- filtered
3572+
type: object
3573+
AWSMetricNameFilterPreviewFilterMatch:
3574+
description: A metric name filter pattern and how many metrics it matched.
3575+
properties:
3576+
match_count:
3577+
description: The number of Datadog metric names matched by this pattern.
3578+
example: 1
3579+
format: int64
3580+
type: integer
3581+
pattern:
3582+
description: The metric name filter pattern.
3583+
example: "aws.ec2.network_in"
3584+
type: string
3585+
required:
3586+
- pattern
3587+
- match_count
3588+
type: object
3589+
AWSMetricNameFilterPreviewMetric:
3590+
description: A CloudWatch metric and the Datadog metric names it produces.
3591+
properties:
3592+
cw_name:
3593+
description: The CloudWatch metric name.
3594+
example: "NetworkIn"
3595+
type: string
3596+
dd_names:
3597+
description: The Datadog metric names produced from this CloudWatch metric.
3598+
items:
3599+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewDDName"
3600+
type: array
3601+
required:
3602+
- cw_name
3603+
- dd_names
3604+
type: object
3605+
AWSMetricNameFilterPreviewNamespace:
3606+
description: The metric name filter preview for a single namespace.
3607+
properties:
3608+
filters:
3609+
description: The metric name filter patterns evaluated for this namespace and how many metrics they matched.
3610+
items:
3611+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewFilterMatch"
3612+
type: array
3613+
metrics:
3614+
description: |-
3615+
The CloudWatch metrics collected for this namespace and whether each resulting
3616+
Datadog metric is filtered.
3617+
items:
3618+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewMetric"
3619+
type: array
3620+
namespace:
3621+
description: The AWS CloudWatch namespace.
3622+
example: "AWS/EC2"
3623+
type: string
3624+
required:
3625+
- namespace
3626+
- filters
3627+
- metrics
3628+
type: object
3629+
AWSMetricNameFilterPreviewRequest:
3630+
description: AWS metric name filter preview request body.
3631+
properties:
3632+
data:
3633+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewRequestData"
3634+
required:
3635+
- data
3636+
type: object
3637+
AWSMetricNameFilterPreviewRequestAttributes:
3638+
description: AWS metric name filter preview request attributes.
3639+
properties:
3640+
metric_name_filters:
3641+
description: The metric name filters to preview.
3642+
items:
3643+
$ref: "#/components/schemas/AWSMetricNameFilters"
3644+
type: array
3645+
required:
3646+
- metric_name_filters
3647+
type: object
3648+
AWSMetricNameFilterPreviewRequestData:
3649+
description: AWS metric name filter preview request data.
3650+
properties:
3651+
attributes:
3652+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewRequestAttributes"
3653+
type:
3654+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewType"
3655+
required:
3656+
- type
3657+
- attributes
3658+
type: object
3659+
AWSMetricNameFilterPreviewResponse:
3660+
description: AWS metric name filter preview response body.
3661+
properties:
3662+
data:
3663+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewResponseData"
3664+
required:
3665+
- data
3666+
type: object
3667+
AWSMetricNameFilterPreviewResponseAttributes:
3668+
description: AWS metric name filter preview response attributes.
3669+
properties:
3670+
namespaces:
3671+
description: The list of namespaces affected by the previewed metric name filters.
3672+
items:
3673+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewNamespace"
3674+
type: array
3675+
required:
3676+
- namespaces
3677+
type: object
3678+
AWSMetricNameFilterPreviewResponseData:
3679+
description: AWS metric name filter preview response data.
3680+
properties:
3681+
attributes:
3682+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewResponseAttributes"
3683+
id:
3684+
$ref: "#/components/schemas/AWSAccountConfigID"
3685+
type:
3686+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewType"
3687+
required:
3688+
- id
3689+
- type
3690+
- attributes
3691+
type: object
3692+
AWSMetricNameFilterPreviewType:
3693+
default: "metric_name_filter_preview"
3694+
description: The `AWSMetricNameFilterPreviewResponseData` `type`.
3695+
enum:
3696+
- metric_name_filter_preview
3697+
example: "metric_name_filter_preview"
3698+
type: string
3699+
x-enum-varnames:
3700+
- METRIC_NAME_FILTER_PREVIEW
3701+
AWSMetricNameFilters:
3702+
description: |-
3703+
AWS CloudWatch metric name filter for a single namespace.
3704+
Exactly one of `include_only` or `exclude_only` must be set.
3705+
oneOf:
3706+
- $ref: "#/components/schemas/AWSMetricNameFiltersIncludeOnly"
3707+
- $ref: "#/components/schemas/AWSMetricNameFiltersExcludeOnly"
3708+
AWSMetricNameFiltersExcludeOnly:
3709+
description: Exclude metric names matching one of these patterns for a single namespace.
3710+
properties:
3711+
exclude_only:
3712+
description: Exclude metric names matching one of these patterns.
3713+
example:
3714+
- "aws.ec2.network_in"
3715+
items:
3716+
description: A metric name pattern to exclude.
3717+
example: "aws.ec2.network_in"
3718+
type: string
3719+
type: array
3720+
namespace:
3721+
description: The AWS CloudWatch namespace to which this metric name filter applies.
3722+
example: "AWS/EC2"
3723+
type: string
3724+
required:
3725+
- namespace
3726+
- exclude_only
3727+
type: object
3728+
AWSMetricNameFiltersIncludeOnly:
3729+
description: Include only metric names matching one of these patterns for a single namespace.
3730+
properties:
3731+
include_only:
3732+
description: Include only metric names matching one of these patterns.
3733+
example:
3734+
- "aws.ec2.network_in"
3735+
items:
3736+
description: A metric name pattern to include.
3737+
example: "aws.ec2.network_in"
3738+
type: string
3739+
type: array
3740+
namespace:
3741+
description: The AWS CloudWatch namespace to which this metric name filter applies.
3742+
example: "AWS/EC2"
3743+
type: string
3744+
required:
3745+
- namespace
3746+
- include_only
3747+
type: object
35583748
AWSMetricsConfig:
35593749
description: AWS Metrics Collection config.
35603750
properties:
@@ -3574,6 +3764,13 @@ components:
35743764
description: Enable AWS metrics collection. Defaults to `true`.
35753765
example: true
35763766
type: boolean
3767+
metric_name_filters:
3768+
description: |-
3769+
AWS CloudWatch metric name filters. Each filter applies to a single namespace.
3770+
Exactly one of `include_only` or `exclude_only` must be set on each filter.
3771+
items:
3772+
$ref: "#/components/schemas/AWSMetricNameFilters"
3773+
type: array
35773774
namespace_filters:
35783775
$ref: "#/components/schemas/AWSNamespaceFilters"
35793776
tag_filters:
@@ -141429,6 +141626,10 @@ paths:
141429141626
collect_cloudwatch_alarms: false
141430141627
collect_custom_metrics: false
141431141628
enabled: true
141629+
metric_name_filters:
141630+
- include_only:
141631+
- aws.ec2.network_in
141632+
namespace: AWS/EC2
141432141633
tag_filters:
141433141634
- namespace: AWS/EC2
141434141635
resources_config:
@@ -141567,6 +141768,10 @@ paths:
141567141768
collect_cloudwatch_alarms: false
141568141769
collect_custom_metrics: false
141569141770
enabled: true
141771+
metric_name_filters:
141772+
- include_only:
141773+
- aws.ec2.network_in
141774+
namespace: AWS/EC2
141570141775
tag_filters:
141571141776
- namespace: AWS/EC2
141572141777
resources_config:
@@ -141811,6 +142016,124 @@ paths:
141811142016
x-unstable: |-
141812142017
**Note**: This endpoint is in preview and may be subject to change.
141813142018
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
142019+
/api/v2/integration/aws/accounts/{aws_account_config_id}/metric_name_filter_preview:
142020+
get:
142021+
description: |-
142022+
Preview which collected CloudWatch metrics would be filtered by the account's saved metric name filters.
142023+
operationId: GetAWSMetricNameFilterPreview
142024+
parameters:
142025+
- $ref: "#/components/parameters/AWSAccountConfigIDPathParameter"
142026+
responses:
142027+
"200":
142028+
content:
142029+
application/json:
142030+
examples:
142031+
default:
142032+
value:
142033+
data:
142034+
attributes:
142035+
namespaces:
142036+
- filters:
142037+
- match_count: 1
142038+
pattern: "aws.ec2.network_in"
142039+
metrics:
142040+
- cw_name: "NetworkIn"
142041+
dd_names:
142042+
- filtered: true
142043+
name: "aws.ec2.network_in"
142044+
namespace: "AWS/EC2"
142045+
id: "00000000-0000-0000-0000-000000000001"
142046+
type: metric_name_filter_preview
142047+
schema:
142048+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewResponse"
142049+
description: AWS metric name filter preview result
142050+
"403":
142051+
$ref: "#/components/responses/ForbiddenResponse"
142052+
"404":
142053+
$ref: "#/components/responses/NotFoundResponse"
142054+
"429":
142055+
$ref: "#/components/responses/TooManyRequestsResponse"
142056+
summary: Get AWS metric name filter preview
142057+
tags:
142058+
- AWS Integration
142059+
"x-permission":
142060+
operator: OR
142061+
permissions:
142062+
- aws_configuration_read
142063+
x-unstable: |-
142064+
**Note**: This endpoint is in preview and is subject to change.
142065+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
142066+
post:
142067+
description: |-
142068+
Preview which collected CloudWatch metrics would be filtered by the supplied metric name filters.
142069+
The filters are not persisted.
142070+
operationId: PreviewAWSMetricNameFilter
142071+
parameters:
142072+
- $ref: "#/components/parameters/AWSAccountConfigIDPathParameter"
142073+
requestBody:
142074+
content:
142075+
application/json:
142076+
examples:
142077+
default:
142078+
value:
142079+
data:
142080+
attributes:
142081+
metric_name_filters:
142082+
- exclude_only:
142083+
- "aws.ec2.network_in"
142084+
namespace: "AWS/EC2"
142085+
type: metric_name_filter_preview
142086+
schema:
142087+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewRequest"
142088+
description: The metric name filters to preview.
142089+
required: true
142090+
responses:
142091+
"200":
142092+
content:
142093+
application/json:
142094+
examples:
142095+
default:
142096+
value:
142097+
data:
142098+
attributes:
142099+
namespaces:
142100+
- filters:
142101+
- match_count: 1
142102+
pattern: "aws.ec2.network_in"
142103+
metrics:
142104+
- cw_name: "NetworkIn"
142105+
dd_names:
142106+
- filtered: true
142107+
name: "aws.ec2.network_in"
142108+
namespace: "AWS/EC2"
142109+
id: "00000000-0000-0000-0000-000000000001"
142110+
type: metric_name_filter_preview
142111+
schema:
142112+
$ref: "#/components/schemas/AWSMetricNameFilterPreviewResponse"
142113+
description: AWS metric name filter preview result
142114+
"400":
142115+
content:
142116+
application/json:
142117+
schema:
142118+
$ref: "#/components/schemas/JSONAPIErrorResponse"
142119+
description: Bad Request
142120+
"403":
142121+
$ref: "#/components/responses/ForbiddenResponse"
142122+
"404":
142123+
$ref: "#/components/responses/NotFoundResponse"
142124+
"429":
142125+
$ref: "#/components/responses/TooManyRequestsResponse"
142126+
summary: Preview AWS metric name filter
142127+
tags:
142128+
- AWS Integration
142129+
x-codegen-request-body-name: body
142130+
"x-permission":
142131+
operator: OR
142132+
permissions:
142133+
- aws_configuration_read
142134+
x-unstable: |-
142135+
**Note**: This endpoint is in preview and is subject to change.
142136+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
141814142137
/api/v2/integration/aws/available_namespaces:
141815142138
get:
141816142139
description: Get a list of available AWS CloudWatch namespaces that can send metrics to Datadog.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Get AWS metric name filter preview returns "AWS metric name filter preview result" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.AwsIntegrationApi;
6+
import com.datadog.api.client.v2.model.AWSMetricNameFilterPreviewResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getAWSMetricNameFilterPreview", true);
12+
AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
13+
14+
try {
15+
AWSMetricNameFilterPreviewResponse result =
16+
apiInstance.getAWSMetricNameFilterPreview("aws_account_config_id");
17+
System.out.println(result);
18+
} catch (ApiException e) {
19+
System.err.println("Exception when calling AwsIntegrationApi#getAWSMetricNameFilterPreview");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)