Skip to content

Commit

Permalink
Regenerate client from commit 3712e5fd of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Apr 5, 2024
1 parent ba84d55 commit 4ecf65d
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 22 deletions.
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": "2024-04-05 17:05:14.224046",
"spec_repo_commit": "9b7c8967"
"regenerated": "2024-04-05 18:59:38.005598",
"spec_repo_commit": "3712e5fd"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-04-05 17:05:14.240804",
"spec_repo_commit": "9b7c8967"
"regenerated": "2024-04-05 18:59:38.021879",
"spec_repo_commit": "3712e5fd"
}
}
}
11 changes: 9 additions & 2 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ components:
description: Regions to exclude.
type: string
type: array
extended_resource_collection_enabled:
default: false
description: Whether Datadog collects a standard set of resources from your
AWS account.
example: true
type: boolean
filter_tags:
description: 'The array of EC2 tags (in the form `key:value`) defines a
filter that Datadog uses when collecting metrics from EC2.
Expand Down Expand Up @@ -128,8 +134,9 @@ components:
type: boolean
resource_collection_enabled:
default: false
description: Whether Datadog collects a standard set of resources from your
AWS account.
deprecated: true
description: Deprecated in favor of 'extended_resource_collection_enabled'.
Whether Datadog collects a standard set of resources from your AWS account.
example: true
type: boolean
role_name:
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/aws-integration/CreateAWSAccount.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"us-east-1",
"us-west-2",
],
extended_resource_collection_enabled=True,
filter_tags=[
"$KEY:$VALUE",
],
host_tags=[
"$KEY:$VALUE",
],
metrics_collection_enabled=False,
resource_collection_enabled=True,
role_name="DatadogAWSIntegrationRole",
)

Expand Down
1 change: 1 addition & 0 deletions examples/v1/aws-integration/CreateNewAWSExternalID.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"us-east-1",
"us-west-2",
],
extended_resource_collection_enabled=True,
filter_tags=[
"$KEY:$VALUE",
],
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/aws-integration/UpdateAWSAccount.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"us-east-1",
"us-west-2",
],
extended_resource_collection_enabled=True,
filter_tags=[
"$KEY:$VALUE",
],
host_tags=[
"$KEY:$VALUE",
],
metrics_collection_enabled=True,
resource_collection_enabled=True,
role_name="DatadogAWSIntegrationRole",
)

Expand Down
10 changes: 9 additions & 1 deletion src/datadog_api_client/v1/model/aws_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def openapi_types(_):
"account_specific_namespace_rules": ({str: (bool,)},),
"cspm_resource_collection_enabled": (bool,),
"excluded_regions": ([str],),
"extended_resource_collection_enabled": (bool,),
"filter_tags": ([str],),
"host_tags": ([str],),
"metrics_collection_enabled": (bool,),
Expand All @@ -36,6 +37,7 @@ def openapi_types(_):
"account_specific_namespace_rules": "account_specific_namespace_rules",
"cspm_resource_collection_enabled": "cspm_resource_collection_enabled",
"excluded_regions": "excluded_regions",
"extended_resource_collection_enabled": "extended_resource_collection_enabled",
"filter_tags": "filter_tags",
"host_tags": "host_tags",
"metrics_collection_enabled": "metrics_collection_enabled",
Expand All @@ -51,6 +53,7 @@ def __init__(
account_specific_namespace_rules: Union[Dict[str, bool], UnsetType] = unset,
cspm_resource_collection_enabled: Union[bool, UnsetType] = unset,
excluded_regions: Union[List[str], UnsetType] = unset,
extended_resource_collection_enabled: Union[bool, UnsetType] = unset,
filter_tags: Union[List[str], UnsetType] = unset,
host_tags: Union[List[str], UnsetType] = unset,
metrics_collection_enabled: Union[bool, UnsetType] = unset,
Expand Down Expand Up @@ -80,6 +83,9 @@ def __init__(
to exclude from metrics collection.
:type excluded_regions: [str], optional
:param extended_resource_collection_enabled: Whether Datadog collects a standard set of resources from your AWS account.
:type extended_resource_collection_enabled: bool, optional
:param filter_tags: The array of EC2 tags (in the form ``key:value`` ) defines a filter that Datadog uses when collecting metrics from EC2.
Wildcards, such as ``?`` (for single characters) and ``*`` (for multiple characters) can also be used.
Only hosts that match one of the defined tags
Expand All @@ -95,7 +101,7 @@ def __init__(
:param metrics_collection_enabled: Whether Datadog collects metrics for this AWS account.
:type metrics_collection_enabled: bool, optional
:param resource_collection_enabled: Whether Datadog collects a standard set of resources from your AWS account.
:param resource_collection_enabled: Deprecated in favor of 'extended_resource_collection_enabled'. Whether Datadog collects a standard set of resources from your AWS account. **Deprecated**.
:type resource_collection_enabled: bool, optional
:param role_name: Your Datadog role delegation name.
Expand All @@ -114,6 +120,8 @@ def __init__(
kwargs["cspm_resource_collection_enabled"] = cspm_resource_collection_enabled
if excluded_regions is not unset:
kwargs["excluded_regions"] = excluded_regions
if extended_resource_collection_enabled is not unset:
kwargs["extended_resource_collection_enabled"] = extended_resource_collection_enabled
if filter_tags is not unset:
kwargs["filter_tags"] = filter_tags
if host_tags is not unset:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"account_id":"169988502100","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":true,"excluded_regions":["us-east-1","us-west-2"],"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":false,"resource_collection_enabled":true,"role_name":"DatadogAWSIntegrationRole"}'
body: '{"account_id":"169988502100","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":true,"excluded_regions":["us-east-1","us-west-2"],"extended_resource_collection_enabled":true,"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":false,"role_name":"DatadogAWSIntegrationRole"}'
headers:
accept:
- application/json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"account_id":"170059471500","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":true,"excluded_regions":["us-east-1","us-west-2"],"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":false,"resource_collection_enabled":true,"role_name":"DatadogAWSIntegrationRole"}'
body: '{"account_id":"170059471500","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":true,"excluded_regions":["us-east-1","us-west-2"],"extended_resource_collection_enabled":true,"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":false,"role_name":"DatadogAWSIntegrationRole"}'
headers:
accept:
- application/json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"account_id":"170076337600","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":true,"excluded_regions":["us-east-1","us-west-2"],"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":false,"resource_collection_enabled":true,"role_name":"DatadogAWSIntegrationRole"}'
body: '{"account_id":"170076337600","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":true,"excluded_regions":["us-east-1","us-west-2"],"extended_resource_collection_enabled":true,"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":false,"role_name":"DatadogAWSIntegrationRole"}'
headers:
accept:
- application/json
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"account_id":"170076337600","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":false,"excluded_regions":["us-east-1","us-west-2"],"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":true,"resource_collection_enabled":true,"role_name":"DatadogAWSIntegrationRole"}'
body: '{"account_id":"170076337600","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":false,"excluded_regions":["us-east-1","us-west-2"],"extended_resource_collection_enabled":true,"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":true,"role_name":"DatadogAWSIntegrationRole"}'
headers:
accept:
- application/json
Expand Down
16 changes: 8 additions & 8 deletions tests/v1/features/aws_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ Feature: AWS Integration
@generated @skip @team:DataDog/cloud-integrations
Scenario: Create an AWS integration returns "Bad Request" response
Given new "CreateAWSAccount" request
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Create an AWS integration returns "Conflict Error" response
Given new "CreateAWSAccount" request
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 409 Conflict Error

@team:DataDog/cloud-integrations
Scenario: Create an AWS integration returns "OK" response
Given new "CreateAWSAccount" request
And body with value {"account_id": "{{ timestamp("now") }}00", "account_specific_namespace_rules": {"auto_scaling": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
And body with value {"account_id": "{{ timestamp("now") }}00", "account_specific_namespace_rules": {"auto_scaling": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 200 OK

Expand Down Expand Up @@ -97,14 +97,14 @@ Feature: AWS Integration
@generated @skip @team:DataDog/cloud-integrations
Scenario: Generate a new external ID returns "Bad Request" response
Given new "CreateNewAWSExternalID" request
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Generate a new external ID returns "OK" response
Given new "CreateNewAWSExternalID" request
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 200 OK

Expand Down Expand Up @@ -169,22 +169,22 @@ Feature: AWS Integration
@generated @skip @team:DataDog/cloud-integrations
Scenario: Update an AWS integration returns "Bad Request" response
Given new "UpdateAWSAccount" request
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Update an AWS integration returns "Conflict Error" response
Given new "UpdateAWSAccount" request
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 409 Conflict Error

@team:DataDog/cloud-integrations
Scenario: Update an AWS integration returns "OK" response
Given there is a valid "aws_account" in the system
And new "UpdateAWSAccount" request
And body with value {"account_id": "{{ timestamp("now") }}00", "account_specific_namespace_rules": {"auto_scaling": false}, "cspm_resource_collection_enabled": false, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": true, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
And body with value {"account_id": "{{ timestamp("now") }}00", "account_specific_namespace_rules": {"auto_scaling": false}, "cspm_resource_collection_enabled": false, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"}
And request contains "account_id" parameter with value "{{ timestamp("now") }}00"
And request contains "role_name" parameter with value "DatadogAWSIntegrationRole"
When the request is sent
Expand Down
2 changes: 1 addition & 1 deletion tests/v1/features/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
{
"name": "body",
"origin": "request",
"value": "{\n \"account_id\": \"{{ timestamp(\"now\") }}00\",\n \"account_specific_namespace_rules\": {\n \"auto_scaling\": false\n },\n \"cspm_resource_collection_enabled\": true,\n \"excluded_regions\": [\n \"us-east-1\",\n \"us-west-2\"\n ],\n \"filter_tags\": [\n \"$KEY:$VALUE\"\n ],\n \"host_tags\": [\n \"$KEY:$VALUE\"\n ],\n \"metrics_collection_enabled\": false,\n \"resource_collection_enabled\": true,\n \"role_name\": \"DatadogAWSIntegrationRole\"\n}"
"value": "{\n \"account_id\": \"{{ timestamp(\"now\") }}00\",\n \"account_specific_namespace_rules\": {\n \"auto_scaling\": false\n },\n \"cspm_resource_collection_enabled\": true,\n \"excluded_regions\": [\n \"us-east-1\",\n \"us-west-2\"\n ],\n \"extended_resource_collection_enabled\": true,\n \"filter_tags\": [\n \"$KEY:$VALUE\"\n ],\n \"host_tags\": [\n \"$KEY:$VALUE\"\n ],\n \"metrics_collection_enabled\": false,\n \"role_name\": \"DatadogAWSIntegrationRole\"\n}"
}
],
"step": "there is a valid \"aws_account\" in the system",
Expand Down

0 comments on commit 4ecf65d

Please sign in to comment.