Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 73 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56750,19 +56750,35 @@ components:
- client_email
type: object
LogsArchiveIntegrationS3:
description: The S3 Archive's integration destination.
description: >-
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.
oneOf:
- $ref: "#/components/schemas/LogsArchiveIntegrationS3AccessKey"
- $ref: "#/components/schemas/LogsArchiveIntegrationS3Role"
LogsArchiveIntegrationS3AccessKey:
description: The S3 Archive's integration destination using an access key.
properties:
access_key_id:
description: The access key ID for the integration.
example: AKIAIOSFODNN7EXAMPLE
type: string
required:
- access_key_id
type: object
LogsArchiveIntegrationS3Role:
description: The S3 Archive's integration destination using an IAM role.
properties:
account_id:
description: The account ID for the integration.
example: "123456789012"
type: string
role_name:
description: The path of the integration.
description: The name of the role to assume for the integration.
example: role-name
type: string
required:
- role_name
- account_id
- role_name
type: object
LogsArchiveOrder:
description: A ordered list of archive IDs.
Expand Down Expand Up @@ -148590,6 +148606,18 @@ paths:
- team:intake
- team:app
type: archives
s3_access_key_id:
value:
data:
attributes:
destination:
bucket: my-bucket
integration:
access_key_id: AKIAIOSFODNN7EXAMPLE
type: s3
name: Nginx Archive
query: source:nginx
type: archives
schema:
$ref: "#/components/schemas/LogsArchiveCreateRequest"
description: The definition of the new archive.
Expand All @@ -148615,6 +148643,21 @@ paths:
state: WORKING
id: 00000000-0000-0000-0000-000000000002
type: archives
s3_access_key_id:
value:
data:
attributes:
destination:
bucket: my-bucket
integration:
access_key_id: AKIAIOSFODNN7EXAMPLE
type: s3
include_tags: false
name: Nginx Archive
query: source:nginx
state: WORKING
id: 00000000-0000-0000-0000-000000000002
type: archives
schema:
$ref: "#/components/schemas/LogsArchive"
description: OK
Expand Down Expand Up @@ -148764,6 +148807,18 @@ paths:
- team:intake
- team:app
type: archives
s3_access_key_id:
value:
data:
attributes:
destination:
bucket: my-bucket
integration:
access_key_id: AKIAIOSFODNN7EXAMPLE
type: s3
name: Nginx Archive
query: source:nginx
type: archives
schema:
$ref: "#/components/schemas/LogsArchiveCreateRequest"
description: New definition of the archive.
Expand All @@ -148789,6 +148844,21 @@ paths:
state: WORKING
id: 00000000-0000-0000-0000-000000000004
type: archives
s3_access_key_id:
value:
data:
attributes:
destination:
bucket: my-bucket
integration:
access_key_id: AKIAIOSFODNN7EXAMPLE
type: s3
include_tags: false
name: Nginx Archive
query: source:nginx
state: WORKING
id: 00000000-0000-0000-0000-000000000004
type: archives
schema:
$ref: "#/components/schemas/LogsArchive"
description: OK
Expand Down
14 changes: 14 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23335,6 +23335,20 @@ datadog\_api\_client.v2.model.logs\_archive\_integration\_s3 module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.logs\_archive\_integration\_s3\_access\_key module
--------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.logs_archive_integration_s3_access_key
:members:
:show-inheritance:

datadog\_api\_client.v2.model.logs\_archive\_integration\_s3\_role module
-------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.logs_archive_integration_s3_role
:members:
:show-inheritance:

datadog\_api\_client.v2.model.logs\_archive\_order module
---------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from datadog_api_client.v2.model.logs_archive_integration_s3 import LogsArchiveIntegrationS3
from datadog_api_client.v2.model.logs_archive_storage_class_s3_type import LogsArchiveStorageClassS3Type
from datadog_api_client.v2.model.logs_archive_destination_s3_type import LogsArchiveDestinationS3Type
from datadog_api_client.v2.model.logs_archive_integration_s3_access_key import LogsArchiveIntegrationS3AccessKey
from datadog_api_client.v2.model.logs_archive_integration_s3_role import LogsArchiveIntegrationS3Role


class LogsArchiveDestinationS3(ModelNormal):
Expand Down Expand Up @@ -49,7 +51,7 @@ def openapi_types(_):
def __init__(
self_,
bucket: str,
integration: LogsArchiveIntegrationS3,
integration: Union[LogsArchiveIntegrationS3, LogsArchiveIntegrationS3AccessKey, LogsArchiveIntegrationS3Role],
type: LogsArchiveDestinationS3Type,
encryption: Union[LogsArchiveEncryptionS3, UnsetType] = unset,
path: Union[str, UnsetType] = unset,
Expand All @@ -65,7 +67,7 @@ def __init__(
:param encryption: The S3 encryption settings.
:type encryption: LogsArchiveEncryptionS3, optional

:param integration: The S3 Archive's integration destination.
: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.
:type integration: LogsArchiveIntegrationS3

:param path: The archive path.
Expand Down
45 changes: 26 additions & 19 deletions src/datadog_api_client/v2/model/logs_archive_integration_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,42 @@


from datadog_api_client.model_utils import (
ModelNormal,
ModelComposed,
cached_property,
)


class LogsArchiveIntegrationS3(ModelNormal):
@cached_property
def openapi_types(_):
return {
"account_id": (str,),
"role_name": (str,),
}

attribute_map = {
"account_id": "account_id",
"role_name": "role_name",
}

def __init__(self_, account_id: str, role_name: str, **kwargs):
class LogsArchiveIntegrationS3(ModelComposed):
def __init__(self, **kwargs):
"""
The S3 Archive's integration destination.
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.

:param access_key_id: The access key ID for the integration.
:type access_key_id: str

:param account_id: The account ID for the integration.
:type account_id: str

:param role_name: The path of the integration.
:param role_name: The name of the role to assume for the integration.
:type role_name: str
"""
super().__init__(kwargs)

self_.account_id = account_id
self_.role_name = role_name
@cached_property
def _composed_schemas(_):
# we need this here to make our import statements work
# we must store _composed_schemas in here so the code is only run
# when we invoke this method. If we kept this at the class
# level we would get an error because the class level
# code would be run when this module is imported, and these composed
# classes don't exist yet because their module has not finished
# loading
from datadog_api_client.v2.model.logs_archive_integration_s3_access_key import LogsArchiveIntegrationS3AccessKey
from datadog_api_client.v2.model.logs_archive_integration_s3_role import LogsArchiveIntegrationS3Role

return {
"oneOf": [
LogsArchiveIntegrationS3AccessKey,
LogsArchiveIntegrationS3Role,
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations


from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
)


class LogsArchiveIntegrationS3AccessKey(ModelNormal):
@cached_property
def openapi_types(_):
return {
"access_key_id": (str,),
}

attribute_map = {
"access_key_id": "access_key_id",
}

def __init__(self_, access_key_id: str, **kwargs):
"""
The S3 Archive's integration destination using an access key.

:param access_key_id: The access key ID for the integration.
:type access_key_id: str
"""
super().__init__(kwargs)

self_.access_key_id = access_key_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations


from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
)


class LogsArchiveIntegrationS3Role(ModelNormal):
@cached_property
def openapi_types(_):
return {
"account_id": (str,),
"role_name": (str,),
}

attribute_map = {
"account_id": "account_id",
"role_name": "role_name",
}

def __init__(self_, account_id: str, role_name: str, **kwargs):
"""
The S3 Archive's integration destination using an IAM role.

:param account_id: The account ID for the integration.
:type account_id: str

:param role_name: The name of the role to assume for the integration.
:type role_name: str
"""
super().__init__(kwargs)

self_.account_id = account_id
self_.role_name = role_name
4 changes: 4 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4371,6 +4371,8 @@
from datadog_api_client.v2.model.logs_archive_integration_azure import LogsArchiveIntegrationAzure
from datadog_api_client.v2.model.logs_archive_integration_gcs import LogsArchiveIntegrationGCS
from datadog_api_client.v2.model.logs_archive_integration_s3 import LogsArchiveIntegrationS3
from datadog_api_client.v2.model.logs_archive_integration_s3_access_key import LogsArchiveIntegrationS3AccessKey
from datadog_api_client.v2.model.logs_archive_integration_s3_role import LogsArchiveIntegrationS3Role
from datadog_api_client.v2.model.logs_archive_order import LogsArchiveOrder
from datadog_api_client.v2.model.logs_archive_order_attributes import LogsArchiveOrderAttributes
from datadog_api_client.v2.model.logs_archive_order_definition import LogsArchiveOrderDefinition
Expand Down Expand Up @@ -12725,6 +12727,8 @@
"LogsArchiveIntegrationAzure",
"LogsArchiveIntegrationGCS",
"LogsArchiveIntegrationS3",
"LogsArchiveIntegrationS3AccessKey",
"LogsArchiveIntegrationS3Role",
"LogsArchiveOrder",
"LogsArchiveOrderAttributes",
"LogsArchiveOrderDefinition",
Expand Down
Loading