Skip to content

Commit e080df2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7040bb9 of spec repo
1 parent 11dce76 commit e080df2

7 files changed

Lines changed: 193 additions & 24 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 73 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56750,19 +56750,35 @@ components:
5675056750
- client_email
5675156751
type: object
5675256752
LogsArchiveIntegrationS3:
56753-
description: The S3 Archive's integration destination.
56753+
description: >-
56754+
The S3 Archive's integration destination. You must provide one of the following: `access_key_id` alone, or both `account_id` and `role_name` together.
56755+
oneOf:
56756+
- $ref: "#/components/schemas/LogsArchiveIntegrationS3AccessKey"
56757+
- $ref: "#/components/schemas/LogsArchiveIntegrationS3Role"
56758+
LogsArchiveIntegrationS3AccessKey:
56759+
description: The S3 Archive's integration destination using an access key.
56760+
properties:
56761+
access_key_id:
56762+
description: The access key ID for the integration.
56763+
example: AKIAIOSFODNN7EXAMPLE
56764+
type: string
56765+
required:
56766+
- access_key_id
56767+
type: object
56768+
LogsArchiveIntegrationS3Role:
56769+
description: The S3 Archive's integration destination using an IAM role.
5675456770
properties:
5675556771
account_id:
5675656772
description: The account ID for the integration.
5675756773
example: "123456789012"
5675856774
type: string
5675956775
role_name:
56760-
description: The path of the integration.
56776+
description: The name of the role to assume for the integration.
5676156777
example: role-name
5676256778
type: string
5676356779
required:
56764-
- role_name
5676556780
- account_id
56781+
- role_name
5676656782
type: object
5676756783
LogsArchiveOrder:
5676856784
description: A ordered list of archive IDs.
@@ -148590,6 +148606,18 @@ paths:
148590148606
- team:intake
148591148607
- team:app
148592148608
type: archives
148609+
s3_access_key_id:
148610+
value:
148611+
data:
148612+
attributes:
148613+
destination:
148614+
bucket: my-bucket
148615+
integration:
148616+
access_key_id: AKIAIOSFODNN7EXAMPLE
148617+
type: s3
148618+
name: Nginx Archive
148619+
query: source:nginx
148620+
type: archives
148593148621
schema:
148594148622
$ref: "#/components/schemas/LogsArchiveCreateRequest"
148595148623
description: The definition of the new archive.
@@ -148615,6 +148643,21 @@ paths:
148615148643
state: WORKING
148616148644
id: 00000000-0000-0000-0000-000000000002
148617148645
type: archives
148646+
s3_access_key_id:
148647+
value:
148648+
data:
148649+
attributes:
148650+
destination:
148651+
bucket: my-bucket
148652+
integration:
148653+
access_key_id: AKIAIOSFODNN7EXAMPLE
148654+
type: s3
148655+
include_tags: false
148656+
name: Nginx Archive
148657+
query: source:nginx
148658+
state: WORKING
148659+
id: 00000000-0000-0000-0000-000000000002
148660+
type: archives
148618148661
schema:
148619148662
$ref: "#/components/schemas/LogsArchive"
148620148663
description: OK
@@ -148764,6 +148807,18 @@ paths:
148764148807
- team:intake
148765148808
- team:app
148766148809
type: archives
148810+
s3_access_key_id:
148811+
value:
148812+
data:
148813+
attributes:
148814+
destination:
148815+
bucket: my-bucket
148816+
integration:
148817+
access_key_id: AKIAIOSFODNN7EXAMPLE
148818+
type: s3
148819+
name: Nginx Archive
148820+
query: source:nginx
148821+
type: archives
148767148822
schema:
148768148823
$ref: "#/components/schemas/LogsArchiveCreateRequest"
148769148824
description: New definition of the archive.
@@ -148789,6 +148844,21 @@ paths:
148789148844
state: WORKING
148790148845
id: 00000000-0000-0000-0000-000000000004
148791148846
type: archives
148847+
s3_access_key_id:
148848+
value:
148849+
data:
148850+
attributes:
148851+
destination:
148852+
bucket: my-bucket
148853+
integration:
148854+
access_key_id: AKIAIOSFODNN7EXAMPLE
148855+
type: s3
148856+
include_tags: false
148857+
name: Nginx Archive
148858+
query: source:nginx
148859+
state: WORKING
148860+
id: 00000000-0000-0000-0000-000000000004
148861+
type: archives
148792148862
schema:
148793148863
$ref: "#/components/schemas/LogsArchive"
148794148864
description: OK

docs/datadog_api_client.v2.model.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23335,6 +23335,20 @@ datadog\_api\_client.v2.model.logs\_archive\_integration\_s3 module
2333523335
:members:
2333623336
:show-inheritance:
2333723337

23338+
datadog\_api\_client.v2.model.logs\_archive\_integration\_s3\_access\_key module
23339+
--------------------------------------------------------------------------------
23340+
23341+
.. automodule:: datadog_api_client.v2.model.logs_archive_integration_s3_access_key
23342+
:members:
23343+
:show-inheritance:
23344+
23345+
datadog\_api\_client.v2.model.logs\_archive\_integration\_s3\_role module
23346+
-------------------------------------------------------------------------
23347+
23348+
.. automodule:: datadog_api_client.v2.model.logs_archive_integration_s3_role
23349+
:members:
23350+
:show-inheritance:
23351+
2333823352
datadog\_api\_client.v2.model.logs\_archive\_order module
2333923353
---------------------------------------------------------
2334023354

src/datadog_api_client/v2/model/logs_archive_destination_s3.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
from datadog_api_client.v2.model.logs_archive_integration_s3 import LogsArchiveIntegrationS3
1919
from datadog_api_client.v2.model.logs_archive_storage_class_s3_type import LogsArchiveStorageClassS3Type
2020
from datadog_api_client.v2.model.logs_archive_destination_s3_type import LogsArchiveDestinationS3Type
21+
from datadog_api_client.v2.model.logs_archive_integration_s3_access_key import LogsArchiveIntegrationS3AccessKey
22+
from datadog_api_client.v2.model.logs_archive_integration_s3_role import LogsArchiveIntegrationS3Role
2123

2224

2325
class LogsArchiveDestinationS3(ModelNormal):
@@ -49,7 +51,7 @@ def openapi_types(_):
4951
def __init__(
5052
self_,
5153
bucket: str,
52-
integration: LogsArchiveIntegrationS3,
54+
integration: Union[LogsArchiveIntegrationS3, LogsArchiveIntegrationS3AccessKey, LogsArchiveIntegrationS3Role],
5355
type: LogsArchiveDestinationS3Type,
5456
encryption: Union[LogsArchiveEncryptionS3, UnsetType] = unset,
5557
path: Union[str, UnsetType] = unset,
@@ -65,7 +67,7 @@ def __init__(
6567
:param encryption: The S3 encryption settings.
6668
:type encryption: LogsArchiveEncryptionS3, optional
6769
68-
:param integration: The S3 Archive's integration destination.
70+
:param integration: The S3 Archive's integration destination. You must provide one of the following: ``access_key_id`` alone, or both ``account_id`` and ``role_name`` together.
6971
:type integration: LogsArchiveIntegrationS3
7072
7173
:param path: The archive path.

src/datadog_api_client/v2/model/logs_archive_integration_s3.py

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,42 @@
55

66

77
from datadog_api_client.model_utils import (
8-
ModelNormal,
8+
ModelComposed,
99
cached_property,
1010
)
1111

1212

13-
class LogsArchiveIntegrationS3(ModelNormal):
14-
@cached_property
15-
def openapi_types(_):
16-
return {
17-
"account_id": (str,),
18-
"role_name": (str,),
19-
}
20-
21-
attribute_map = {
22-
"account_id": "account_id",
23-
"role_name": "role_name",
24-
}
25-
26-
def __init__(self_, account_id: str, role_name: str, **kwargs):
13+
class LogsArchiveIntegrationS3(ModelComposed):
14+
def __init__(self, **kwargs):
2715
"""
28-
The S3 Archive's integration destination.
16+
The S3 Archive's integration destination. You must provide one of the following: ``access_key_id`` alone, or both ``account_id`` and ``role_name`` together.
17+
18+
:param access_key_id: The access key ID for the integration.
19+
:type access_key_id: str
2920
3021
:param account_id: The account ID for the integration.
3122
:type account_id: str
3223
33-
:param role_name: The path of the integration.
24+
:param role_name: The name of the role to assume for the integration.
3425
:type role_name: str
3526
"""
3627
super().__init__(kwargs)
3728

38-
self_.account_id = account_id
39-
self_.role_name = role_name
29+
@cached_property
30+
def _composed_schemas(_):
31+
# we need this here to make our import statements work
32+
# we must store _composed_schemas in here so the code is only run
33+
# when we invoke this method. If we kept this at the class
34+
# level we would get an error because the class level
35+
# code would be run when this module is imported, and these composed
36+
# classes don't exist yet because their module has not finished
37+
# loading
38+
from datadog_api_client.v2.model.logs_archive_integration_s3_access_key import LogsArchiveIntegrationS3AccessKey
39+
from datadog_api_client.v2.model.logs_archive_integration_s3_role import LogsArchiveIntegrationS3Role
40+
41+
return {
42+
"oneOf": [
43+
LogsArchiveIntegrationS3AccessKey,
44+
LogsArchiveIntegrationS3Role,
45+
],
46+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelNormal,
9+
cached_property,
10+
)
11+
12+
13+
class LogsArchiveIntegrationS3AccessKey(ModelNormal):
14+
@cached_property
15+
def openapi_types(_):
16+
return {
17+
"access_key_id": (str,),
18+
}
19+
20+
attribute_map = {
21+
"access_key_id": "access_key_id",
22+
}
23+
24+
def __init__(self_, access_key_id: str, **kwargs):
25+
"""
26+
The S3 Archive's integration destination using an access key.
27+
28+
:param access_key_id: The access key ID for the integration.
29+
:type access_key_id: str
30+
"""
31+
super().__init__(kwargs)
32+
33+
self_.access_key_id = access_key_id
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelNormal,
9+
cached_property,
10+
)
11+
12+
13+
class LogsArchiveIntegrationS3Role(ModelNormal):
14+
@cached_property
15+
def openapi_types(_):
16+
return {
17+
"account_id": (str,),
18+
"role_name": (str,),
19+
}
20+
21+
attribute_map = {
22+
"account_id": "account_id",
23+
"role_name": "role_name",
24+
}
25+
26+
def __init__(self_, account_id: str, role_name: str, **kwargs):
27+
"""
28+
The S3 Archive's integration destination using an IAM role.
29+
30+
:param account_id: The account ID for the integration.
31+
:type account_id: str
32+
33+
:param role_name: The name of the role to assume for the integration.
34+
:type role_name: str
35+
"""
36+
super().__init__(kwargs)
37+
38+
self_.account_id = account_id
39+
self_.role_name = role_name

src/datadog_api_client/v2/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4371,6 +4371,8 @@
43714371
from datadog_api_client.v2.model.logs_archive_integration_azure import LogsArchiveIntegrationAzure
43724372
from datadog_api_client.v2.model.logs_archive_integration_gcs import LogsArchiveIntegrationGCS
43734373
from datadog_api_client.v2.model.logs_archive_integration_s3 import LogsArchiveIntegrationS3
4374+
from datadog_api_client.v2.model.logs_archive_integration_s3_access_key import LogsArchiveIntegrationS3AccessKey
4375+
from datadog_api_client.v2.model.logs_archive_integration_s3_role import LogsArchiveIntegrationS3Role
43744376
from datadog_api_client.v2.model.logs_archive_order import LogsArchiveOrder
43754377
from datadog_api_client.v2.model.logs_archive_order_attributes import LogsArchiveOrderAttributes
43764378
from datadog_api_client.v2.model.logs_archive_order_definition import LogsArchiveOrderDefinition
@@ -12725,6 +12727,8 @@
1272512727
"LogsArchiveIntegrationAzure",
1272612728
"LogsArchiveIntegrationGCS",
1272712729
"LogsArchiveIntegrationS3",
12730+
"LogsArchiveIntegrationS3AccessKey",
12731+
"LogsArchiveIntegrationS3Role",
1272812732
"LogsArchiveOrder",
1272912733
"LogsArchiveOrderAttributes",
1273012734
"LogsArchiveOrderDefinition",

0 commit comments

Comments
 (0)