diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 04454bdda2..c4a3a06e29 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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 @@ -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). @@ -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 diff --git a/src/datadog_api_client/v2/model/observability_pipeline_amazon_open_search_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_amazon_open_search_destination.py index 38f2410415..056fa62c3a 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_amazon_open_search_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_amazon_open_search_destination.py @@ -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, ) @@ -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, ) @@ -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,), @@ -56,6 +64,8 @@ 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", @@ -63,10 +73,10 @@ def openapi_types(_): def __init__( self_, - auth: ObservabilityPipelineAmazonOpenSearchDestinationAuth, id: str, inputs: List[str], type: ObservabilityPipelineAmazonOpenSearchDestinationType, + auth: Union[ObservabilityPipelineAmazonOpenSearchDestinationAuth, UnsetType] = unset, buffer: Union[ ObservabilityPipelineBufferOptions, ObservabilityPipelineDiskBufferOptions, @@ -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, ): """ @@ -84,7 +96,8 @@ 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 @@ -92,6 +105,12 @@ def __init__( :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 @@ -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 diff --git a/src/datadog_api_client/v2/model/observability_pipeline_amazon_open_search_destination_auth.py b/src/datadog_api_client/v2/model/observability_pipeline_amazon_open_search_destination_auth.py index 2165d0a596..3a8d812082 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_amazon_open_search_destination_auth.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_amazon_open_search_destination_auth.py @@ -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__( @@ -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 @@ -64,11 +71,17 @@ 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 @@ -76,8 +89,12 @@ def __init__( 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