Skip to content
Merged
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
16 changes: 15 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83530,6 +83530,12 @@ components:
description: The index to write logs to.
example: logs-index
type: string
data_stream:
$ref: "#/components/schemas/ObservabilityPipelineOpenSearchDestinationDataStream"
endpoint_url_key:
description: Name of the environment variable or secret that holds the Amazon OpenSearch endpoint URL.
example: AMAZON_OPENSEARCH_ENDPOINT_URL
type: string
id:
description: The unique identifier for this component.
example: elasticsearch-destination
Expand All @@ -83547,13 +83553,13 @@ components:
- id
- type
- inputs
- auth
type: object
x-pipeline-types: [logs]
ObservabilityPipelineAmazonOpenSearchDestinationAuth:
description: |-
Authentication settings for the Amazon OpenSearch destination.
The `strategy` field determines whether basic or AWS-based authentication is used.
When `strategy` is `basic`, use `username_key` and `password_key` to reference credentials stored in environment variables or secrets.
properties:
assume_role:
description: The ARN of the role to assume (used with `aws` strategy).
Expand All @@ -83564,11 +83570,19 @@ components:
external_id:
description: External ID for the assumed role (used with `aws` strategy).
type: string
password_key:
description: Name of the environment variable or secret that holds the Amazon OpenSearch password (used when `strategy` is `basic`).
example: AMAZON_OPENSEARCH_PASSWORD
type: string
session_name:
description: Session name for the assumed role (used with `aws` strategy).
type: string
strategy:
$ref: "#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestinationAuthStrategy"
username_key:
description: Name of the environment variable or secret that holds the Amazon OpenSearch username (used when `strategy` is `basic`).
example: AMAZON_OPENSEARCH_USERNAME
type: string
required:
- strategy
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
ObservabilityPipelineAmazonOpenSearchDestinationAuth,
)
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream import (
ObservabilityPipelineOpenSearchDestinationDataStream,
)
from datadog_api_client.v2.model.observability_pipeline_amazon_open_search_destination_type import (
ObservabilityPipelineAmazonOpenSearchDestinationType,
)
Expand All @@ -39,6 +42,9 @@ def openapi_types(_):
ObservabilityPipelineAmazonOpenSearchDestinationAuth,
)
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream import (
ObservabilityPipelineOpenSearchDestinationDataStream,
)
from datadog_api_client.v2.model.observability_pipeline_amazon_open_search_destination_type import (
ObservabilityPipelineAmazonOpenSearchDestinationType,
)
Expand All @@ -47,6 +53,8 @@ def openapi_types(_):
"auth": (ObservabilityPipelineAmazonOpenSearchDestinationAuth,),
"buffer": (ObservabilityPipelineBufferOptions,),
"bulk_index": (str,),
"data_stream": (ObservabilityPipelineOpenSearchDestinationDataStream,),
"endpoint_url_key": (str,),
"id": (str,),
"inputs": ([str],),
"type": (ObservabilityPipelineAmazonOpenSearchDestinationType,),
Expand All @@ -56,17 +64,19 @@ def openapi_types(_):
"auth": "auth",
"buffer": "buffer",
"bulk_index": "bulk_index",
"data_stream": "data_stream",
"endpoint_url_key": "endpoint_url_key",
"id": "id",
"inputs": "inputs",
"type": "type",
}

def __init__(
self_,
auth: ObservabilityPipelineAmazonOpenSearchDestinationAuth,
id: str,
inputs: List[str],
type: ObservabilityPipelineAmazonOpenSearchDestinationType,
auth: Union[ObservabilityPipelineAmazonOpenSearchDestinationAuth, UnsetType] = unset,
buffer: Union[
ObservabilityPipelineBufferOptions,
ObservabilityPipelineDiskBufferOptions,
Expand All @@ -75,6 +85,8 @@ def __init__(
UnsetType,
] = unset,
bulk_index: Union[str, UnsetType] = unset,
data_stream: Union[ObservabilityPipelineOpenSearchDestinationDataStream, UnsetType] = unset,
endpoint_url_key: Union[str, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -84,14 +96,21 @@ def __init__(

:param auth: Authentication settings for the Amazon OpenSearch destination.
The ``strategy`` field determines whether basic or AWS-based authentication is used.
:type auth: ObservabilityPipelineAmazonOpenSearchDestinationAuth
When ``strategy`` is ``basic`` , use ``username_key`` and ``password_key`` to reference credentials stored in environment variables or secrets.
:type auth: ObservabilityPipelineAmazonOpenSearchDestinationAuth, optional

:param buffer: Configuration for buffer settings on destination components.
:type buffer: ObservabilityPipelineBufferOptions, optional

:param bulk_index: The index to write logs to.
:type bulk_index: str, optional

:param data_stream: Configuration options for writing to OpenSearch Data Streams instead of a fixed index.
:type data_stream: ObservabilityPipelineOpenSearchDestinationDataStream, optional

:param endpoint_url_key: Name of the environment variable or secret that holds the Amazon OpenSearch endpoint URL.
:type endpoint_url_key: str, optional

:param id: The unique identifier for this component.
:type id: str

Expand All @@ -101,13 +120,18 @@ def __init__(
:param type: The destination type. The value should always be ``amazon_opensearch``.
:type type: ObservabilityPipelineAmazonOpenSearchDestinationType
"""
if auth is not unset:
kwargs["auth"] = auth
if buffer is not unset:
kwargs["buffer"] = buffer
if bulk_index is not unset:
kwargs["bulk_index"] = bulk_index
if data_stream is not unset:
kwargs["data_stream"] = data_stream
if endpoint_url_key is not unset:
kwargs["endpoint_url_key"] = endpoint_url_key
super().__init__(kwargs)

self_.auth = auth
self_.id = id
self_.inputs = inputs
self_.type = type
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@ def openapi_types(_):
"assume_role": (str,),
"aws_region": (str,),
"external_id": (str,),
"password_key": (str,),
"session_name": (str,),
"strategy": (ObservabilityPipelineAmazonOpenSearchDestinationAuthStrategy,),
"username_key": (str,),
}

attribute_map = {
"assume_role": "assume_role",
"aws_region": "aws_region",
"external_id": "external_id",
"password_key": "password_key",
"session_name": "session_name",
"strategy": "strategy",
"username_key": "username_key",
}

def __init__(
Expand All @@ -48,12 +52,15 @@ def __init__(
assume_role: Union[str, UnsetType] = unset,
aws_region: Union[str, UnsetType] = unset,
external_id: Union[str, UnsetType] = unset,
password_key: Union[str, UnsetType] = unset,
session_name: Union[str, UnsetType] = unset,
username_key: Union[str, UnsetType] = unset,
**kwargs,
):
"""
Authentication settings for the Amazon OpenSearch destination.
The ``strategy`` field determines whether basic or AWS-based authentication is used.
When ``strategy`` is ``basic`` , use ``username_key`` and ``password_key`` to reference credentials stored in environment variables or secrets.

:param assume_role: The ARN of the role to assume (used with ``aws`` strategy).
:type assume_role: str, optional
Expand All @@ -64,20 +71,30 @@ def __init__(
:param external_id: External ID for the assumed role (used with ``aws`` strategy).
:type external_id: str, optional

:param password_key: Name of the environment variable or secret that holds the Amazon OpenSearch password (used when ``strategy`` is ``basic`` ).
:type password_key: str, optional

:param session_name: Session name for the assumed role (used with ``aws`` strategy).
:type session_name: str, optional

:param strategy: The authentication strategy to use.
:type strategy: ObservabilityPipelineAmazonOpenSearchDestinationAuthStrategy

:param username_key: Name of the environment variable or secret that holds the Amazon OpenSearch username (used when ``strategy`` is ``basic`` ).
:type username_key: str, optional
"""
if assume_role is not unset:
kwargs["assume_role"] = assume_role
if aws_region is not unset:
kwargs["aws_region"] = aws_region
if external_id is not unset:
kwargs["external_id"] = external_id
if password_key is not unset:
kwargs["password_key"] = password_key
if session_name is not unset:
kwargs["session_name"] = session_name
if username_key is not unset:
kwargs["username_key"] = username_key
super().__init__(kwargs)

self_.strategy = strategy
Loading