Skip to content

Commit 082b479

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fcd4911 of spec repo
1 parent 0701861 commit 082b479

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
@@ -57746,19 +57746,35 @@ components:
5774657746
- client_email
5774757747
type: object
5774857748
LogsArchiveIntegrationS3:
57749-
description: The S3 Archive's integration destination.
57749+
description: >-
57750+
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.
57751+
oneOf:
57752+
- $ref: "#/components/schemas/LogsArchiveIntegrationS3AccessKey"
57753+
- $ref: "#/components/schemas/LogsArchiveIntegrationS3Role"
57754+
LogsArchiveIntegrationS3AccessKey:
57755+
description: The S3 Archive's integration destination using an access key.
57756+
properties:
57757+
access_key_id:
57758+
description: The access key ID for the integration.
57759+
example: AKIAIOSFODNN7EXAMPLE
57760+
type: string
57761+
required:
57762+
- access_key_id
57763+
type: object
57764+
LogsArchiveIntegrationS3Role:
57765+
description: The S3 Archive's integration destination using an IAM role.
5775057766
properties:
5775157767
account_id:
5775257768
description: The account ID for the integration.
5775357769
example: "123456789012"
5775457770
type: string
5775557771
role_name:
57756-
description: The path of the integration.
57772+
description: The name of the role to assume for the integration.
5775757773
example: role-name
5775857774
type: string
5775957775
required:
57760-
- role_name
5776157776
- account_id
57777+
- role_name
5776257778
type: object
5776357779
LogsArchiveOrder:
5776457780
description: A ordered list of archive IDs.
@@ -150956,6 +150972,18 @@ paths:
150956150972
- team:intake
150957150973
- team:app
150958150974
type: archives
150975+
s3_access_key_id:
150976+
value:
150977+
data:
150978+
attributes:
150979+
destination:
150980+
bucket: my-bucket
150981+
integration:
150982+
access_key_id: AKIAIOSFODNN7EXAMPLE
150983+
type: s3
150984+
name: Nginx Archive
150985+
query: source:nginx
150986+
type: archives
150959150987
schema:
150960150988
$ref: "#/components/schemas/LogsArchiveCreateRequest"
150961150989
description: The definition of the new archive.
@@ -150981,6 +151009,21 @@ paths:
150981151009
state: WORKING
150982151010
id: 00000000-0000-0000-0000-000000000002
150983151011
type: archives
151012+
s3_access_key_id:
151013+
value:
151014+
data:
151015+
attributes:
151016+
destination:
151017+
bucket: my-bucket
151018+
integration:
151019+
access_key_id: AKIAIOSFODNN7EXAMPLE
151020+
type: s3
151021+
include_tags: false
151022+
name: Nginx Archive
151023+
query: source:nginx
151024+
state: WORKING
151025+
id: 00000000-0000-0000-0000-000000000002
151026+
type: archives
150984151027
schema:
150985151028
$ref: "#/components/schemas/LogsArchive"
150986151029
description: OK
@@ -151130,6 +151173,18 @@ paths:
151130151173
- team:intake
151131151174
- team:app
151132151175
type: archives
151176+
s3_access_key_id:
151177+
value:
151178+
data:
151179+
attributes:
151180+
destination:
151181+
bucket: my-bucket
151182+
integration:
151183+
access_key_id: AKIAIOSFODNN7EXAMPLE
151184+
type: s3
151185+
name: Nginx Archive
151186+
query: source:nginx
151187+
type: archives
151133151188
schema:
151134151189
$ref: "#/components/schemas/LogsArchiveCreateRequest"
151135151190
description: New definition of the archive.
@@ -151155,6 +151210,21 @@ paths:
151155151210
state: WORKING
151156151211
id: 00000000-0000-0000-0000-000000000004
151157151212
type: archives
151213+
s3_access_key_id:
151214+
value:
151215+
data:
151216+
attributes:
151217+
destination:
151218+
bucket: my-bucket
151219+
integration:
151220+
access_key_id: AKIAIOSFODNN7EXAMPLE
151221+
type: s3
151222+
include_tags: false
151223+
name: Nginx Archive
151224+
query: source:nginx
151225+
state: WORKING
151226+
id: 00000000-0000-0000-0000-000000000004
151227+
type: archives
151158151228
schema:
151159151229
$ref: "#/components/schemas/LogsArchive"
151160151230
description: OK

docs/datadog_api_client.v2.model.rst

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

23625+
datadog\_api\_client.v2.model.logs\_archive\_integration\_s3\_access\_key module
23626+
--------------------------------------------------------------------------------
23627+
23628+
.. automodule:: datadog_api_client.v2.model.logs_archive_integration_s3_access_key
23629+
:members:
23630+
:show-inheritance:
23631+
23632+
datadog\_api\_client.v2.model.logs\_archive\_integration\_s3\_role module
23633+
-------------------------------------------------------------------------
23634+
23635+
.. automodule:: datadog_api_client.v2.model.logs_archive_integration_s3_role
23636+
:members:
23637+
:show-inheritance:
23638+
2362523639
datadog\_api\_client.v2.model.logs\_archive\_order module
2362623640
---------------------------------------------------------
2362723641

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
@@ -4418,6 +4418,8 @@
44184418
from datadog_api_client.v2.model.logs_archive_integration_azure import LogsArchiveIntegrationAzure
44194419
from datadog_api_client.v2.model.logs_archive_integration_gcs import LogsArchiveIntegrationGCS
44204420
from datadog_api_client.v2.model.logs_archive_integration_s3 import LogsArchiveIntegrationS3
4421+
from datadog_api_client.v2.model.logs_archive_integration_s3_access_key import LogsArchiveIntegrationS3AccessKey
4422+
from datadog_api_client.v2.model.logs_archive_integration_s3_role import LogsArchiveIntegrationS3Role
44214423
from datadog_api_client.v2.model.logs_archive_order import LogsArchiveOrder
44224424
from datadog_api_client.v2.model.logs_archive_order_attributes import LogsArchiveOrderAttributes
44234425
from datadog_api_client.v2.model.logs_archive_order_definition import LogsArchiveOrderDefinition
@@ -12897,6 +12899,8 @@
1289712899
"LogsArchiveIntegrationAzure",
1289812900
"LogsArchiveIntegrationGCS",
1289912901
"LogsArchiveIntegrationS3",
12902+
"LogsArchiveIntegrationS3AccessKey",
12903+
"LogsArchiveIntegrationS3Role",
1290012904
"LogsArchiveOrder",
1290112905
"LogsArchiveOrderAttributes",
1290212906
"LogsArchiveOrderDefinition",

0 commit comments

Comments
 (0)