Skip to content

Commit b13594b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add support for enable_custom_metrics in Confluent Account (#1562)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 883d7fb commit b13594b

13 files changed

+84
-28
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.5",
7-
"regenerated": "2023-07-06 20:39:52.417261",
8-
"spec_repo_commit": "45b9e51d"
7+
"regenerated": "2023-07-07 15:50:05.076921",
8+
"spec_repo_commit": "6f781b6c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.5",
12-
"regenerated": "2023-07-06 20:39:52.441657",
13-
"spec_repo_commit": "45b9e51d"
12+
"regenerated": "2023-07-07 15:50:05.089843",
13+
"spec_repo_commit": "6f781b6c"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3116,6 +3116,12 @@ components:
31163116
ConfluentAccountResourceAttributes:
31173117
description: Attributes object for updating a Confluent resource.
31183118
properties:
3119+
enable_custom_metrics:
3120+
default: false
3121+
description: Enable the `custom.consumer_lag_offset` metric, which contains
3122+
extra metric tags.
3123+
example: false
3124+
type: boolean
31193125
id:
31203126
description: The ID associated with a Confluent resource.
31213127
example: resource-id-123
@@ -3256,6 +3262,12 @@ components:
32563262
ConfluentResourceRequestAttributes:
32573263
description: Attributes object for updating a Confluent resource.
32583264
properties:
3265+
enable_custom_metrics:
3266+
default: false
3267+
description: Enable the `custom.consumer_lag_offset` metric, which contains
3268+
extra metric tags.
3269+
example: false
3270+
type: boolean
32593271
resource_type:
32603272
description: The resource type of the Resource. Can be `kafka`, `connector`,
32613273
`ksql`, or `schema_registry`.
@@ -3298,6 +3310,12 @@ components:
32983310
ConfluentResourceResponseAttributes:
32993311
description: Model representation of a Confluent Cloud resource.
33003312
properties:
3313+
enable_custom_metrics:
3314+
default: false
3315+
description: Enable the `custom.consumer_lag_offset` metric, which contains
3316+
extra metric tags.
3317+
example: false
3318+
type: boolean
33013319
resource_type:
33023320
description: The resource type of the Resource. Can be `kafka`, `connector`,
33033321
`ksql`, or `schema_registry`.

examples/v2/confluent-cloud/CreateConfluentAccount.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
api_secret="test-api-secret-123",
2020
resources=[
2121
ConfluentAccountResourceAttributes(
22+
enable_custom_metrics=False,
2223
id="resource-id-123",
2324
resource_type="kafka",
2425
tags=[

examples/v2/confluent-cloud/CreateConfluentResource.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"myTag",
2222
"myTag2:myValue",
2323
],
24+
enable_custom_metrics=False,
2425
),
2526
id="exampleconfluentcloud",
2627
type=ConfluentResourceType.CONFLUENT_CLOUD_RESOURCES,

examples/v2/confluent-cloud/UpdateConfluentResource.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
body = ConfluentResourceRequest(
1313
data=ConfluentResourceRequestData(
1414
attributes=ConfluentResourceRequestAttributes(
15+
enable_custom_metrics=False,
1516
resource_type="kafka",
1617
tags=[
1718
"myTag",

src/datadog_api_client/v2/model/confluent_account_resource_attributes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ class ConfluentAccountResourceAttributes(ModelNormal):
1717
@cached_property
1818
def openapi_types(_):
1919
return {
20+
"enable_custom_metrics": (bool,),
2021
"id": (str,),
2122
"resource_type": (str,),
2223
"tags": ([str],),
2324
}
2425

2526
attribute_map = {
27+
"enable_custom_metrics": "enable_custom_metrics",
2628
"id": "id",
2729
"resource_type": "resource_type",
2830
"tags": "tags",
@@ -31,13 +33,17 @@ def openapi_types(_):
3133
def __init__(
3234
self_,
3335
resource_type: str,
36+
enable_custom_metrics: Union[bool, UnsetType] = unset,
3437
id: Union[str, UnsetType] = unset,
3538
tags: Union[List[str], UnsetType] = unset,
3639
**kwargs,
3740
):
3841
"""
3942
Attributes object for updating a Confluent resource.
4043
44+
:param enable_custom_metrics: Enable the ``custom.consumer_lag_offset`` metric, which contains extra metric tags.
45+
:type enable_custom_metrics: bool, optional
46+
4147
:param id: The ID associated with a Confluent resource.
4248
:type id: str, optional
4349
@@ -47,6 +53,8 @@ def __init__(
4753
:param tags: A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.
4854
:type tags: [str], optional
4955
"""
56+
if enable_custom_metrics is not unset:
57+
kwargs["enable_custom_metrics"] = enable_custom_metrics
5058
if id is not unset:
5159
kwargs["id"] = id
5260
if tags is not unset:

src/datadog_api_client/v2/model/confluent_resource_request_attributes.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,38 @@ class ConfluentResourceRequestAttributes(ModelNormal):
1717
@cached_property
1818
def openapi_types(_):
1919
return {
20+
"enable_custom_metrics": (bool,),
2021
"resource_type": (str,),
2122
"tags": ([str],),
2223
}
2324

2425
attribute_map = {
26+
"enable_custom_metrics": "enable_custom_metrics",
2527
"resource_type": "resource_type",
2628
"tags": "tags",
2729
}
2830

29-
def __init__(self_, resource_type: str, tags: Union[List[str], UnsetType] = unset, **kwargs):
31+
def __init__(
32+
self_,
33+
resource_type: str,
34+
enable_custom_metrics: Union[bool, UnsetType] = unset,
35+
tags: Union[List[str], UnsetType] = unset,
36+
**kwargs,
37+
):
3038
"""
3139
Attributes object for updating a Confluent resource.
3240
41+
:param enable_custom_metrics: Enable the ``custom.consumer_lag_offset`` metric, which contains extra metric tags.
42+
:type enable_custom_metrics: bool, optional
43+
3344
:param resource_type: The resource type of the Resource. Can be ``kafka`` , ``connector`` , ``ksql`` , or ``schema_registry``.
3445
:type resource_type: str
3546
3647
:param tags: A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.
3748
:type tags: [str], optional
3849
"""
50+
if enable_custom_metrics is not unset:
51+
kwargs["enable_custom_metrics"] = enable_custom_metrics
3952
if tags is not unset:
4053
kwargs["tags"] = tags
4154
super().__init__(kwargs)

src/datadog_api_client/v2/model/confluent_resource_response_attributes.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,38 @@ class ConfluentResourceResponseAttributes(ModelNormal):
1717
@cached_property
1818
def openapi_types(_):
1919
return {
20+
"enable_custom_metrics": (bool,),
2021
"resource_type": (str,),
2122
"tags": ([str],),
2223
}
2324

2425
attribute_map = {
26+
"enable_custom_metrics": "enable_custom_metrics",
2527
"resource_type": "resource_type",
2628
"tags": "tags",
2729
}
2830

29-
def __init__(self_, resource_type: str, tags: Union[List[str], UnsetType] = unset, **kwargs):
31+
def __init__(
32+
self_,
33+
resource_type: str,
34+
enable_custom_metrics: Union[bool, UnsetType] = unset,
35+
tags: Union[List[str], UnsetType] = unset,
36+
**kwargs,
37+
):
3038
"""
3139
Model representation of a Confluent Cloud resource.
3240
41+
:param enable_custom_metrics: Enable the ``custom.consumer_lag_offset`` metric, which contains extra metric tags.
42+
:type enable_custom_metrics: bool, optional
43+
3344
:param resource_type: The resource type of the Resource. Can be ``kafka`` , ``connector`` , ``ksql`` , or ``schema_registry``.
3445
:type resource_type: str
3546
3647
:param tags: A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.
3748
:type tags: [str], optional
3849
"""
50+
if enable_custom_metrics is not unset:
51+
kwargs["enable_custom_metrics"] = enable_custom_metrics
3952
if tags is not unset:
4053
kwargs["tags"] = tags
4154
super().__init__(kwargs)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-04-06T14:00:35.438Z
1+
2023-07-03T14:38:40.799Z

tests/v2/cassettes/test_scenarios/test_add_resource_to_confluent_account_returns_ok_response.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"api_key":"TestAddresourcetoConfluentaccountreturnsOKresponse1680789635","api_secret":"test-api-secret","resources":[{"id":"test-resource-id","resource_type":"kafka","tags":["tag1","tag2:val2"]}],"tags":["tag1","tag2:val2"]},"type":"confluent-cloud-accounts"}}'
3+
body: '{"data":{"attributes":{"api_key":"TestAddresourcetoConfluentaccountreturnsOKresponse1688395120","api_secret":"test-api-secret","resources":[{"id":"test-resource-id","resource_type":"kafka","tags":["tag1","tag2:val2"]}],"tags":["tag1","tag2:val2"]},"type":"confluent-cloud-accounts"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts
1111
response:
1212
body:
13-
string: '{"data":{"type":"confluent-cloud-accounts","attributes":{"tags":["tag1","tag2:val2"],"api_key":"TestAddresourcetoConfluentaccountreturnsOKresponse1680789635","resources":[{"tags":["tag1","tag2:val2"],"resource_type":"kafka","id":"test-resource-id"}]},"id":"cc6lo3zoip"}}
13+
string: '{"data":{"type":"confluent-cloud-accounts","attributes":{"tags":["tag1","tag2:val2"],"resources":[{"id":"test-resource-id","enable_custom_metrics":false,"resource_type":"kafka","tags":["tag1","tag2:val2"]}],"api_key":"TestAddresourcetoConfluentaccountreturnsOKresponse1688395120"},"id":"ca66091df9181d4c62d17f0484461a0d"}}
1414
1515
'
1616
headers:
@@ -20,17 +20,17 @@ interactions:
2020
code: 201
2121
message: Created
2222
- request:
23-
body: '{"data":{"attributes":{"resource_type":"kafka","tags":["myTag","myTag2:myValue"]},"id":"testaddresourcetoconfluentaccountreturnsokresponse1680789635","type":"confluent-cloud-resources"}}'
23+
body: '{"data":{"attributes":{"enable_custom_metrics":false,"resource_type":"kafka","tags":["myTag","myTag2:myValue"]},"id":"testaddresourcetoconfluentaccountreturnsokresponse1688395120","type":"confluent-cloud-resources"}}'
2424
headers:
2525
accept:
2626
- application/json
2727
content-type:
2828
- application/json
2929
method: POST
30-
uri: https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/cc6lo3zoip/resources
30+
uri: https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/ca66091df9181d4c62d17f0484461a0d/resources
3131
response:
3232
body:
33-
string: '{"data":{"type":"confluent-cloud-resources","attributes":{"tags":["mytag","mytag2:myvalue"],"resource_type":"kafka"},"id":"testaddresourcetoconfluentaccountreturnsokresponse1680789635"}}
33+
string: '{"data":{"type":"confluent-cloud-resources","attributes":{"enable_custom_metrics":false,"tags":["mytag","mytag2:myvalue"],"resource_type":"kafka"},"id":"testaddresourcetoconfluentaccountreturnsokresponse1688395120"}}
3434
3535
'
3636
headers:
@@ -45,7 +45,7 @@ interactions:
4545
accept:
4646
- '*/*'
4747
method: DELETE
48-
uri: https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/cc6lo3zoip
48+
uri: https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/ca66091df9181d4c62d17f0484461a0d
4949
response:
5050
body:
5151
string: ''

0 commit comments

Comments
 (0)