Skip to content

Commit 34530ea

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f0a4221 of spec repo
1 parent 9b46343 commit 34530ea

File tree

9 files changed

+216
-20
lines changed

9 files changed

+216
-20
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.4.1.dev11",
7-
"regenerated": "2021-07-13 15:54:40.523054",
8-
"spec_repo_commit": "c2e2dda"
7+
"regenerated": "2021-07-14 09:06:55.275340",
8+
"spec_repo_commit": "f0a4221"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev11",
12-
"regenerated": "2021-07-13 15:55:03.366670",
13-
"spec_repo_commit": "c2e2dda"
12+
"regenerated": "2021-07-14 09:07:22.355067",
13+
"spec_repo_commit": "f0a4221"
1414
}
1515
}
1616
}

docs/v1/AWSAccountDeleteRequest.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# AWSAccountDeleteRequest
2+
3+
List of AWS accounts to delete.
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**access_key_id** | **str** | Your AWS access key ID. Only required if your AWS account is a GovCloud or China account. | [optional]
9+
**account_id** | **str** | Your AWS Account ID without dashes. | [optional]
10+
**role_name** | **str** | Your Datadog role delegation name. | [optional]
11+
12+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
13+
14+

docs/v1/AWSIntegrationApi.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,11 @@ configuration = Configuration()
260260
with ApiClient(configuration) as api_client:
261261
# Create an instance of the API class
262262
api_instance = aws_integration_api.AWSIntegrationApi(api_client)
263-
body = AWSAccount(
263+
body = AWSAccountDeleteRequest(
264264
access_key_id="access_key_id_example",
265265
account_id="1234567",
266-
account_specific_namespace_rules={
267-
"key": True,
268-
},
269-
excluded_regions=["us-east-1","us-west-2"],
270-
filter_tags=["<KEY>:<VALUE>"],
271-
host_tags=["<KEY>:<VALUE>"],
272266
role_name="DatadogAWSIntegrationRole",
273-
secret_access_key="secret_access_key_example",
274-
) # AWSAccount | AWS request object
267+
) # AWSAccountDeleteRequest | AWS request object
275268

276269
# example passing only required values which don't have defaults set
277270
try:
@@ -287,7 +280,7 @@ with ApiClient(configuration) as api_client:
287280

288281
Name | Type | Description | Notes
289282
------------- | ------------- | ------------- | -------------
290-
**body** | [**AWSAccount**](AWSAccount.md)| AWS request object |
283+
**body** | [**AWSAccountDeleteRequest**](AWSAccountDeleteRequest.md)| AWS request object |
291284

292285
### Return type
293286

docs/v1/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ from datadog_api_client.v1.api import aws_integration_api
5454
from datadog_api_client.v1.model.api_error_response import APIErrorResponse
5555
from datadog_api_client.v1.model.aws_account import AWSAccount
5656
from datadog_api_client.v1.model.aws_account_create_response import AWSAccountCreateResponse
57+
from datadog_api_client.v1.model.aws_account_delete_request import AWSAccountDeleteRequest
5758
from datadog_api_client.v1.model.aws_account_list_response import AWSAccountListResponse
5859
from datadog_api_client.v1.model.aws_tag_filter_create_request import AWSTagFilterCreateRequest
5960
from datadog_api_client.v1.model.aws_tag_filter_delete_request import AWSTagFilterDeleteRequest
@@ -292,6 +293,7 @@ Class | Method | HTTP request | Description
292293
- [AWSAccount](AWSAccount.md)
293294
- [AWSAccountAndLambdaRequest](AWSAccountAndLambdaRequest.md)
294295
- [AWSAccountCreateResponse](AWSAccountCreateResponse.md)
296+
- [AWSAccountDeleteRequest](AWSAccountDeleteRequest.md)
295297
- [AWSAccountListResponse](AWSAccountListResponse.md)
296298
- [AWSLogsAsyncError](AWSLogsAsyncError.md)
297299
- [AWSLogsAsyncResponse](AWSLogsAsyncResponse.md)

src/datadog_api_client/v1/api/aws_integration_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from datadog_api_client.v1.model.api_error_response import APIErrorResponse
2020
from datadog_api_client.v1.model.aws_account import AWSAccount
2121
from datadog_api_client.v1.model.aws_account_create_response import AWSAccountCreateResponse
22+
from datadog_api_client.v1.model.aws_account_delete_request import AWSAccountDeleteRequest
2223
from datadog_api_client.v1.model.aws_account_list_response import AWSAccountListResponse
2324
from datadog_api_client.v1.model.aws_tag_filter_create_request import AWSTagFilterCreateRequest
2425
from datadog_api_client.v1.model.aws_tag_filter_delete_request import AWSTagFilterDeleteRequest
@@ -169,7 +170,7 @@ def __init__(self, api_client=None):
169170
"validations": {},
170171
"allowed_values": {},
171172
"openapi_types": {
172-
"body": (AWSAccount,),
173+
"body": (AWSAccountDeleteRequest,),
173174
},
174175
"attribute_map": {},
175176
"location_map": {
@@ -519,7 +520,7 @@ def delete_aws_account(self, body, **kwargs):
519520
>>> result = thread.get()
520521
521522
Args:
522-
body (AWSAccount): AWS request object
523+
body (AWSAccountDeleteRequest): AWS request object
523524
524525
Keyword Args:
525526
_return_http_data_only (bool): response data without head status
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
5+
6+
import re # noqa: F401
7+
import sys # noqa: F401
8+
9+
from datadog_api_client.v1.model_utils import ( # noqa: F401
10+
ApiTypeError,
11+
ModelComposed,
12+
ModelNormal,
13+
ModelSimple,
14+
cached_property,
15+
change_keys_js_to_python,
16+
convert_js_args_to_python_args,
17+
date,
18+
datetime,
19+
file_type,
20+
none_type,
21+
validate_get_composed_info,
22+
)
23+
24+
25+
class AWSAccountDeleteRequest(ModelNormal):
26+
"""NOTE: This class is auto generated by OpenAPI Generator.
27+
Ref: https://openapi-generator.tech
28+
29+
Do not edit the class manually.
30+
31+
Attributes:
32+
allowed_values (dict): The key is the tuple path to the attribute
33+
and the for var_name this is (var_name,). The value is a dict
34+
with a capitalized key describing the allowed value and an allowed
35+
value. These dicts store the allowed enum values.
36+
attribute_map (dict): The key is attribute name
37+
and the value is json key in definition.
38+
discriminator_value_class_map (dict): A dict to go from the discriminator
39+
variable value to the discriminator class name.
40+
validations (dict): The key is the tuple path to the attribute
41+
and the for var_name this is (var_name,). The value is a dict
42+
that stores validations for max_length, min_length, max_items,
43+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
44+
inclusive_minimum, and regex.
45+
additional_properties_type (tuple): A tuple of classes accepted
46+
as additional properties values.
47+
"""
48+
49+
allowed_values = {}
50+
51+
validations = {}
52+
53+
additional_properties_type = None
54+
55+
_nullable = False
56+
57+
@cached_property
58+
def openapi_types():
59+
"""
60+
This must be a method because a model may have properties that are
61+
of type self, this must run after the class is loaded
62+
63+
Returns
64+
openapi_types (dict): The key is attribute name
65+
and the value is attribute type.
66+
"""
67+
return {
68+
"access_key_id": (str,), # noqa: E501
69+
"account_id": (str,), # noqa: E501
70+
"role_name": (str,), # noqa: E501
71+
}
72+
73+
@cached_property
74+
def discriminator():
75+
return None
76+
77+
attribute_map = {
78+
"access_key_id": "access_key_id", # noqa: E501
79+
"account_id": "account_id", # noqa: E501
80+
"role_name": "role_name", # noqa: E501
81+
}
82+
83+
_composed_schemas = {}
84+
85+
required_properties = set(
86+
[
87+
"_data_store",
88+
"_check_type",
89+
"_spec_property_naming",
90+
"_path_to_item",
91+
"_configuration",
92+
"_visited_composed_classes",
93+
]
94+
)
95+
96+
@convert_js_args_to_python_args
97+
def __init__(self, *args, **kwargs): # noqa: E501
98+
"""AWSAccountDeleteRequest - a model defined in OpenAPI
99+
100+
Keyword Args:
101+
_check_type (bool): if True, values for parameters in openapi_types
102+
will be type checked and a TypeError will be
103+
raised if the wrong type is input.
104+
Defaults to True
105+
_path_to_item (tuple/list): This is a list of keys or values to
106+
drill down to the model in received_data
107+
when deserializing a response
108+
_spec_property_naming (bool): True if the variable names in the input data
109+
are serialized names, as specified in the OpenAPI document.
110+
False if the variable names in the input data
111+
are pythonic names, e.g. snake case (default)
112+
_configuration (Configuration): the instance to use when
113+
deserializing a file_type parameter.
114+
If passed, type conversion is attempted
115+
If omitted no type conversion is done.
116+
_visited_composed_classes (tuple): This stores a tuple of
117+
classes that we have traveled through so that
118+
if we see that class again we will not use its
119+
discriminator again.
120+
When traveling through a discriminator, the
121+
composed schema that is
122+
is traveled through is added to this set.
123+
For example if Animal has a discriminator
124+
petType and we pass in "Dog", and the class Dog
125+
allOf includes Animal, we move through Animal
126+
once using the discriminator, and pick Dog.
127+
Then in Dog, we will make an instance of the
128+
Animal class but this time we won't travel
129+
through its discriminator because we passed in
130+
_visited_composed_classes = (Animal,)
131+
access_key_id (str): Your AWS access key ID. Only required if your AWS account is a GovCloud or China account.. [optional] # noqa: E501
132+
account_id (str): Your AWS Account ID without dashes.. [optional] # noqa: E501
133+
role_name (str): Your Datadog role delegation name.. [optional] # noqa: E501
134+
"""
135+
136+
_check_type = kwargs.pop("_check_type", True)
137+
_spec_property_naming = kwargs.pop("_spec_property_naming", False)
138+
_path_to_item = kwargs.pop("_path_to_item", ())
139+
_configuration = kwargs.pop("_configuration", None)
140+
_visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
141+
142+
if args:
143+
raise ApiTypeError(
144+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
145+
% (
146+
args,
147+
self.__class__.__name__,
148+
),
149+
path_to_item=_path_to_item,
150+
valid_classes=(self.__class__,),
151+
)
152+
153+
self._data_store = {}
154+
self._check_type = _check_type
155+
self._spec_property_naming = _spec_property_naming
156+
self._path_to_item = _path_to_item
157+
self._configuration = _configuration
158+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
159+
160+
for var_name, var_value in kwargs.items():
161+
if (
162+
var_name not in self.attribute_map
163+
and self._configuration is not None
164+
and self._configuration.discard_unknown_keys
165+
and self.additional_properties_type is None
166+
):
167+
# discard variable.
168+
continue
169+
setattr(self, var_name, var_value)

src/datadog_api_client/v1/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from datadog_api_client.v1.model.aws_account import AWSAccount
1414
from datadog_api_client.v1.model.aws_account_and_lambda_request import AWSAccountAndLambdaRequest
1515
from datadog_api_client.v1.model.aws_account_create_response import AWSAccountCreateResponse
16+
from datadog_api_client.v1.model.aws_account_delete_request import AWSAccountDeleteRequest
1617
from datadog_api_client.v1.model.aws_account_list_response import AWSAccountListResponse
1718
from datadog_api_client.v1.model.aws_logs_async_error import AWSLogsAsyncError
1819
from datadog_api_client.v1.model.aws_logs_async_response import AWSLogsAsyncResponse

src/datadog_api_client/v1/openapi.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,22 @@ components:
131131
description: AWS external_id.
132132
type: string
133133
type: object
134+
AWSAccountDeleteRequest:
135+
description: List of AWS accounts to delete.
136+
properties:
137+
access_key_id:
138+
description: Your AWS access key ID. Only required if your AWS account is
139+
a GovCloud or China account.
140+
type: string
141+
account_id:
142+
description: Your AWS Account ID without dashes.
143+
example: '1234567'
144+
type: string
145+
role_name:
146+
description: Your Datadog role delegation name.
147+
example: DatadogAWSIntegrationRole
148+
type: string
149+
type: object
134150
AWSAccountListResponse:
135151
description: List of enabled AWS accounts.
136152
properties:
@@ -15153,7 +15169,7 @@ paths:
1515315169
content:
1515415170
application/json:
1515515171
schema:
15156-
$ref: '#/components/schemas/AWSAccount'
15172+
$ref: '#/components/schemas/AWSAccountDeleteRequest'
1515715173
description: AWS request object
1515815174
required: true
1515915175
responses:

tests/v1/features/aws_integration.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ Feature: AWS Integration
4747
@generated @skip
4848
Scenario: Delete an AWS integration returns "Bad Request" response
4949
Given new "DeleteAWSAccount" request
50-
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
50+
And body with value {"access_key_id": null, "account_id": "1234567", "role_name": "DatadogAWSIntegrationRole"}
5151
When the request is sent
5252
Then the response status is 400 Bad Request
5353

5454
@generated @skip
5555
Scenario: Delete an AWS integration returns "Conflict Error" response
5656
Given new "DeleteAWSAccount" request
57-
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
57+
And body with value {"access_key_id": null, "account_id": "1234567", "role_name": "DatadogAWSIntegrationRole"}
5858
When the request is sent
5959
Then the response status is 409 Conflict Error
6060

6161
@generated @skip
6262
Scenario: Delete an AWS integration returns "OK" response
6363
Given new "DeleteAWSAccount" request
64-
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
64+
And body with value {"access_key_id": null, "account_id": "1234567", "role_name": "DatadogAWSIntegrationRole"}
6565
When the request is sent
6666
Then the response status is 200 OK
6767

0 commit comments

Comments
 (0)