-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathazure_storage_destination.py
More file actions
100 lines (84 loc) · 3.52 KB
/
azure_storage_destination.py
File metadata and controls
100 lines (84 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# 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 typing import List, Union, TYPE_CHECKING
from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)
if TYPE_CHECKING:
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
from datadog_api_client.v2.model.azure_storage_destination_type import AzureStorageDestinationType
from datadog_api_client.v2.model.observability_pipeline_disk_buffer_options import (
ObservabilityPipelineDiskBufferOptions,
)
from datadog_api_client.v2.model.observability_pipeline_memory_buffer_options import (
ObservabilityPipelineMemoryBufferOptions,
)
from datadog_api_client.v2.model.observability_pipeline_memory_buffer_size_options import (
ObservabilityPipelineMemoryBufferSizeOptions,
)
class AzureStorageDestination(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
from datadog_api_client.v2.model.azure_storage_destination_type import AzureStorageDestinationType
return {
"blob_prefix": (str,),
"buffer": (ObservabilityPipelineBufferOptions,),
"container_name": (str,),
"id": (str,),
"inputs": ([str],),
"type": (AzureStorageDestinationType,),
}
attribute_map = {
"blob_prefix": "blob_prefix",
"buffer": "buffer",
"container_name": "container_name",
"id": "id",
"inputs": "inputs",
"type": "type",
}
def __init__(
self_,
container_name: str,
id: str,
inputs: List[str],
type: AzureStorageDestinationType,
blob_prefix: Union[str, UnsetType] = unset,
buffer: Union[
ObservabilityPipelineBufferOptions,
ObservabilityPipelineDiskBufferOptions,
ObservabilityPipelineMemoryBufferOptions,
ObservabilityPipelineMemoryBufferSizeOptions,
UnsetType,
] = unset,
**kwargs,
):
"""
The ``azure_storage`` destination forwards logs to an Azure Blob Storage container.
:param blob_prefix: Optional prefix for blobs written to the container.
:type blob_prefix: str, optional
:param buffer: Configuration for buffer settings on destination components.
:type buffer: ObservabilityPipelineBufferOptions, optional
:param container_name: The name of the Azure Blob Storage container to store logs in.
:type container_name: str
:param id: The unique identifier for this component.
:type id: str
:param inputs: A list of component IDs whose output is used as the ``input`` for this component.
:type inputs: [str]
:param type: The destination type. The value should always be ``azure_storage``.
:type type: AzureStorageDestinationType
"""
if blob_prefix is not unset:
kwargs["blob_prefix"] = blob_prefix
if buffer is not unset:
kwargs["buffer"] = buffer
super().__init__(kwargs)
self_.container_name = container_name
self_.id = id
self_.inputs = inputs
self_.type = type