Skip to content

Commit e812e46

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add examples for resources for Cloudflare (#2222)
* Regenerate client from commit a7602fa1 of spec repo * pre-commit fixes --------- Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 0039d51 commit e812e46

File tree

6 files changed

+23
-14
lines changed

6 files changed

+23
-14
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-10-31 14:51:16.444741",
8-
"spec_repo_commit": "e9cc5e6a"
7+
"regenerated": "2024-10-31 15:33:01.115259",
8+
"spec_repo_commit": "a7602fa1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-31 14:51:16.462544",
13-
"spec_repo_commit": "e9cc5e6a"
12+
"regenerated": "2024-10-31 15:33:01.133530",
13+
"spec_repo_commit": "a7602fa1"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4527,10 +4527,13 @@ components:
45274527
example: test-name
45284528
type: string
45294529
resources:
4530-
description: An allowlist of resources to restrict pulling metrics for.
4530+
description: An allowlist of resources to restrict pulling metrics for including
4531+
`'web', 'dns', 'lb' (load balancer), 'worker'`.
45314532
example:
45324533
- web
45334534
- dns
4535+
- lb
4536+
- worker
45344537
items:
45354538
type: string
45364539
type: array
@@ -4575,10 +4578,13 @@ components:
45754578
example: test-name
45764579
type: string
45774580
resources:
4578-
description: An allowlist of resources to restrict pulling metrics for.
4581+
description: An allowlist of resources to restrict pulling metrics for including
4582+
`'web', 'dns', 'lb' (load balancer), 'worker'`.
45794583
example:
45804584
- web
45814585
- dns
4586+
- lb
4587+
- worker
45824588
items:
45834589
type: string
45844590
type: array
@@ -4642,10 +4648,13 @@ components:
46424648
description: The name of the Cloudflare account.
46434649
type: string
46444650
resources:
4645-
description: An allowlist of resources to restrict pulling metrics for.
4651+
description: An allowlist of resources to restrict pulling metrics for including
4652+
`'web', 'dns', 'lb' (load balancer), 'worker'`.
46464653
example:
46474654
- web
46484655
- dns
4656+
- lb
4657+
- worker
46494658
items:
46504659
type: string
46514660
type: array

src/datadog_api_client/v2/model/cloudflare_account_create_request_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
:param name: The name of the Cloudflare account.
5454
:type name: str
5555
56-
:param resources: An allowlist of resources to restrict pulling metrics for.
56+
:param resources: An allowlist of resources to restrict pulling metrics for including ``'web', 'dns', 'lb' (load balancer), 'worker'``.
5757
:type resources: [str], optional
5858
5959
:param zones: An allowlist of zones to restrict pulling metrics for.

src/datadog_api_client/v2/model/cloudflare_account_response_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(
4747
:param name: The name of the Cloudflare account.
4848
:type name: str
4949
50-
:param resources: An allowlist of resources to restrict pulling metrics for.
50+
:param resources: An allowlist of resources to restrict pulling metrics for including ``'web', 'dns', 'lb' (load balancer), 'worker'``.
5151
:type resources: [str], optional
5252
5353
:param zones: An allowlist of zones to restrict pulling metrics for.

src/datadog_api_client/v2/model/cloudflare_account_update_request_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
:param name: The name of the Cloudflare account.
5454
:type name: str, optional
5555
56-
:param resources: An allowlist of resources to restrict pulling metrics for.
56+
:param resources: An allowlist of resources to restrict pulling metrics for including ``'web', 'dns', 'lb' (load balancer), 'worker'``.
5757
:type resources: [str], optional
5858
5959
:param zones: An allowlist of zones to restrict pulling metrics for.

tests/v2/features/cloudflare_integration.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feature: Cloudflare Integration
1313
@generated @skip @team:DataDog/saas-integrations
1414
Scenario: Add Cloudflare account returns "Bad Request" response
1515
Given new "CreateCloudflareAccount" request
16-
And body with value {"data": {"attributes": {"api_key": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "email": "[email protected]", "name": "test-name", "resources": ["web", "dns"], "zones": ["zone_id_1", "zone_id_2"]}, "type": "cloudflare-accounts"}}
16+
And body with value {"data": {"attributes": {"api_key": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "email": "[email protected]", "name": "test-name", "resources": ["web", "dns", "lb", "worker"], "zones": ["zone_id_1", "zone_id_2"]}, "type": "cloudflare-accounts"}}
1717
When the request is sent
1818
Then the response status is 400 Bad Request
1919

@@ -44,7 +44,7 @@ Feature: Cloudflare Integration
4444
@generated @skip @team:DataDog/saas-integrations
4545
Scenario: Add Cloudflare account returns "Not Found" response
4646
Given new "CreateCloudflareAccount" request
47-
And body with value {"data": {"attributes": {"api_key": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "email": "[email protected]", "name": "test-name", "resources": ["web", "dns"], "zones": ["zone_id_1", "zone_id_2"]}, "type": "cloudflare-accounts"}}
47+
And body with value {"data": {"attributes": {"api_key": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "email": "[email protected]", "name": "test-name", "resources": ["web", "dns", "lb", "worker"], "zones": ["zone_id_1", "zone_id_2"]}, "type": "cloudflare-accounts"}}
4848
When the request is sent
4949
Then the response status is 404 Not Found
5050

@@ -118,7 +118,7 @@ Feature: Cloudflare Integration
118118
Scenario: Update Cloudflare account returns "Bad Request" response
119119
Given new "UpdateCloudflareAccount" request
120120
And request contains "account_id" parameter from "REPLACE.ME"
121-
And body with value {"data": {"attributes": {"api_key": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "email": "[email protected]", "resources": ["web", "dns"], "zones": ["zone_id_1", "zone_id_2"]}, "type": "cloudflare-accounts"}}
121+
And body with value {"data": {"attributes": {"api_key": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "email": "[email protected]", "resources": ["web", "dns", "lb", "worker"], "zones": ["zone_id_1", "zone_id_2"]}, "type": "cloudflare-accounts"}}
122122
When the request is sent
123123
Then the response status is 400 Bad Request
124124

@@ -144,7 +144,7 @@ Feature: Cloudflare Integration
144144
Scenario: Update Cloudflare account returns "Not Found" response
145145
Given new "UpdateCloudflareAccount" request
146146
And request contains "account_id" parameter from "REPLACE.ME"
147-
And body with value {"data": {"attributes": {"api_key": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "email": "[email protected]", "resources": ["web", "dns"], "zones": ["zone_id_1", "zone_id_2"]}, "type": "cloudflare-accounts"}}
147+
And body with value {"data": {"attributes": {"api_key": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "email": "[email protected]", "resources": ["web", "dns", "lb", "worker"], "zones": ["zone_id_1", "zone_id_2"]}, "type": "cloudflare-accounts"}}
148148
When the request is sent
149149
Then the response status is 404 Not Found
150150

0 commit comments

Comments
 (0)