diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5da2e75e80..1c4147ddb7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -6932,6 +6932,11 @@ components: type: string buffer: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' + connection_string_key: + description: Name of the environment variable or secret that holds the Azure + Storage connection string. + example: AZURE_STORAGE_CONNECTION_STRING + type: string container_name: description: The name of the Azure Blob Storage container to store logs in. @@ -37731,6 +37736,16 @@ components: description: Azure AD client ID used for authentication. example: a1b2c3d4-5678-90ab-cdef-1234567890ab type: string + client_secret_key: + description: Name of the environment variable or secret that holds the Azure + AD client secret. + example: AZURE_CLIENT_SECRET + type: string + dce_uri_key: + description: Name of the environment variable or secret that holds the Data + Collection Endpoint (DCE) URI. + example: DCE_URI + type: string dcr_immutable_id: description: The immutable ID of the Data Collection Rule (DCR). example: dcr-uuid-1234 @@ -39662,6 +39677,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the Firehose + delivery stream address. + example: FIREHOSE_ADDRESS + type: string auth: $ref: '#/components/schemas/ObservabilityPipelineAwsAuth' id: @@ -39874,6 +39894,11 @@ components: $ref: '#/components/schemas/ObservabilityPipelineTls' type: $ref: '#/components/schemas/ObservabilityPipelineAmazonS3SourceType' + url_key: + description: Name of the environment variable or secret that holds the S3 + bucket URL. + example: S3_BUCKET_URL + type: string required: - id - type @@ -40003,6 +40028,11 @@ components: **Supported pipeline types:** logs' properties: + endpoint_url_key: + description: Name of the environment variable or secret that holds the CloudPrem + endpoint URL. + example: CLOUDPREM_ENDPOINT_URL + type: string id: description: The unique identifier for this component. example: cloud-prem-destination @@ -40273,6 +40303,11 @@ components: $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression' encoding: $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding' + endpoint_url_key: + description: Name of the environment variable or secret that holds the CrowdStrike + endpoint URL. + example: CROWDSTRIKE_ENDPOINT_URL + type: string id: description: The unique identifier for this component. example: crowdstrike-ngsiem-destination @@ -40287,6 +40322,11 @@ components: type: array tls: $ref: '#/components/schemas/ObservabilityPipelineTls' + token_key: + description: Name of the environment variable or secret that holds the CrowdStrike + API token. + example: CROWDSTRIKE_TOKEN + type: string type: $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType' required: @@ -40789,6 +40829,8 @@ components: properties: api_version: $ref: '#/components/schemas/ObservabilityPipelineElasticsearchDestinationApiVersion' + auth: + $ref: '#/components/schemas/ObservabilityPipelineElasticsearchDestinationAuth' buffer: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' bulk_index: @@ -40797,6 +40839,11 @@ components: type: string data_stream: $ref: '#/components/schemas/ObservabilityPipelineElasticsearchDestinationDataStream' + endpoint_url_key: + description: Name of the environment variable or secret that holds the Elasticsearch + endpoint URL. + example: ELASTICSEARCH_ENDPOINT_URL + type: string id: description: The unique identifier for this component. example: elasticsearch-destination @@ -40832,6 +40879,27 @@ components: - V6 - V7 - V8 + ObservabilityPipelineElasticsearchDestinationAuth: + description: 'Authentication settings for the Elasticsearch destination. + + When `strategy` is `basic`, use `username_key` and `password_key` to reference + credentials stored in environment variables or secrets.' + properties: + password_key: + description: Name of the environment variable or secret that holds the Elasticsearch + password (used when `strategy` is `basic`). + example: ELASTICSEARCH_PASSWORD + type: string + strategy: + $ref: '#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestinationAuthStrategy' + username_key: + description: Name of the environment variable or secret that holds the Elasticsearch + username (used when `strategy` is `basic`). + example: ELASTICSEARCH_USERNAME + type: string + required: + - strategy + type: object ObservabilityPipelineElasticsearchDestinationDataStream: description: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. @@ -41043,6 +41111,11 @@ components: ObservabilityPipelineEnrichmentTableReferenceTable: description: Uses a Datadog reference table to enrich logs. properties: + app_key_key: + description: Name of the environment variable or secret that holds the Datadog + application key used to access the reference table. + example: DD_APP_KEY + type: string columns: description: List of column names to include from the reference table. If not provided, all columns are included. @@ -41129,6 +41202,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the Fluent Bit receiver. + example: FLUENT_ADDRESS + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` @@ -41160,6 +41238,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the Fluent receiver. + example: FLUENT_ADDRESS + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` @@ -41186,10 +41269,11 @@ components: x-enum-varnames: - FLUENTD ObservabilityPipelineGcpAuth: - description: GCP credentials used to authenticate with Google Cloud Storage. + description: Google Cloud credentials used to authenticate with Google Cloud + Storage. properties: credentials_file: - description: Path to the GCP service account key file. + description: Path to the Google Cloud service account key file. example: /var/secrets/gcp-credentials.json type: string required: @@ -41344,6 +41428,11 @@ components: type: string encoding: $ref: '#/components/schemas/ObservabilityPipelineGoogleChronicleDestinationEncoding' + endpoint_url_key: + description: Name of the environment variable or secret that holds the Google + Chronicle endpoint URL. + example: CHRONICLE_ENDPOINT_URL + type: string id: description: The unique identifier for this component. example: google-chronicle-destination @@ -41393,7 +41482,7 @@ components: description: 'The `google_cloud_storage` destination stores logs in a Google Cloud Storage (GCS) bucket. - It requires a bucket name, GCP authentication, and metadata fields. + It requires a bucket name, Google Cloud authentication, and metadata fields. **Supported pipeline types:** logs' @@ -41496,6 +41585,11 @@ components: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' encoding: $ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestinationEncoding' + endpoint_url_key: + description: Name of the environment variable or secret that holds the Google + Cloud Pub/Sub endpoint URL. + example: GCP_PUBSUB_ENDPOINT_URL + type: string id: description: The unique identifier for this component. example: google-pubsub-destination @@ -41509,7 +41603,7 @@ components: type: string type: array project: - description: The GCP project ID that owns the Pub/Sub topic. + description: The Google Cloud project ID that owns the Pub/Sub topic. example: my-gcp-project type: string tls: @@ -41567,7 +41661,7 @@ components: example: google-pubsub-source type: string project: - description: The GCP project ID that owns the Pub/Sub subscription. + description: The Google Cloud project ID that owns the Pub/Sub subscription. example: my-gcp-project type: string subscription: @@ -41606,6 +41700,11 @@ components: $ref: '#/components/schemas/ObservabilityPipelineHttpClientDestinationAuthStrategy' compression: $ref: '#/components/schemas/ObservabilityPipelineHttpClientDestinationCompression' + custom_key: + description: Name of the environment variable or secret that holds a custom + header value (used with custom auth strategies). + example: HTTP_AUTH_CUSTOM_HEADER + type: string encoding: $ref: '#/components/schemas/ObservabilityPipelineHttpClientDestinationEncoding' id: @@ -41620,10 +41719,30 @@ components: items: type: string type: array + password_key: + description: Name of the environment variable or secret that holds the password + (used when `auth_strategy` is `basic`). + example: HTTP_AUTH_PASSWORD + type: string tls: $ref: '#/components/schemas/ObservabilityPipelineTls' + token_key: + description: Name of the environment variable or secret that holds the bearer + token (used when `auth_strategy` is `bearer`). + example: HTTP_AUTH_TOKEN + type: string type: $ref: '#/components/schemas/ObservabilityPipelineHttpClientDestinationType' + uri_key: + description: Name of the environment variable or secret that holds the HTTP + endpoint URI. + example: HTTP_DESTINATION_URI + type: string + username_key: + description: Name of the environment variable or secret that holds the username + (used when `auth_strategy` is `basic`). + example: HTTP_AUTH_USERNAME + type: string required: - id - type @@ -41687,14 +41806,29 @@ components: properties: auth_strategy: $ref: '#/components/schemas/ObservabilityPipelineHttpClientSourceAuthStrategy' + custom_key: + description: Name of the environment variable or secret that holds a custom + header value (used with custom auth strategies). + example: HTTP_AUTH_CUSTOM_HEADER + type: string decoding: $ref: '#/components/schemas/ObservabilityPipelineDecoding' + endpoint_url_key: + description: Name of the environment variable or secret that holds the HTTP + endpoint URL to scrape. + example: HTTP_ENDPOINT_URL + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). example: http-client-source type: string + password_key: + description: Name of the environment variable or secret that holds the password + (used when `auth_strategy` is `basic`). + example: HTTP_AUTH_PASSWORD + type: string scrape_interval_secs: description: The interval (in seconds) between HTTP scrape requests. example: 60 @@ -41707,8 +41841,18 @@ components: type: integer tls: $ref: '#/components/schemas/ObservabilityPipelineTls' + token_key: + description: Name of the environment variable or secret that holds the bearer + token (used when `auth_strategy` is `bearer`). + example: HTTP_AUTH_TOKEN + type: string type: $ref: '#/components/schemas/ObservabilityPipelineHttpClientSourceType' + username_key: + description: Name of the environment variable or secret that holds the username + (used when `auth_strategy` is `basic`). + example: HTTP_AUTH_USERNAME + type: string required: - id - type @@ -41746,18 +41890,38 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the HTTP server. + example: HTTP_SERVER_ADDRESS + type: string auth_strategy: $ref: '#/components/schemas/ObservabilityPipelineHttpServerSourceAuthStrategy' + custom_key: + description: Name of the environment variable or secret that holds a custom + header value (used with custom auth strategies). + example: HTTP_AUTH_CUSTOM_HEADER + type: string decoding: $ref: '#/components/schemas/ObservabilityPipelineDecoding' id: description: Unique ID for the HTTP server source. example: http-server-source type: string + password_key: + description: Name of the environment variable or secret that holds the password + (used when `auth_strategy` is `plain`). + example: HTTP_AUTH_PASSWORD + type: string tls: $ref: '#/components/schemas/ObservabilityPipelineTls' type: $ref: '#/components/schemas/ObservabilityPipelineHttpServerSourceType' + username_key: + description: Name of the environment variable or secret that holds the username + (used when `auth_strategy` is `plain`). + example: HTTP_AUTH_USERNAME + type: string required: - id - type @@ -41791,6 +41955,11 @@ components: **Supported pipeline types:** logs' properties: + bootstrap_servers_key: + description: Name of the environment variable or secret that holds the Kafka + bootstrap servers list. + example: KAFKA_BOOTSTRAP_SERVERS + type: string compression: $ref: '#/components/schemas/ObservabilityPipelineKafkaDestinationCompression' encoding: @@ -41923,6 +42092,16 @@ components: properties: mechanism: $ref: '#/components/schemas/ObservabilityPipelineKafkaSaslMechanism' + password_key: + description: Name of the environment variable or secret that holds the SASL + password. + example: KAFKA_SASL_PASSWORD + type: string + username_key: + description: Name of the environment variable or secret that holds the SASL + username. + example: KAFKA_SASL_USERNAME + type: string type: object ObservabilityPipelineKafkaSaslMechanism: description: SASL mechanism used for Kafka authentication. @@ -41941,6 +42120,11 @@ components: **Supported pipeline types:** logs' properties: + bootstrap_servers_key: + description: Name of the environment variable or secret that holds the Kafka + bootstrap servers list. + example: KAFKA_BOOTSTRAP_SERVERS + type: string group_id: description: Consumer group ID used by the Kafka client. example: consumer-group-0 @@ -41995,6 +42179,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the Logstash receiver. + example: LOGSTASH_ADDRESS + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` @@ -42172,6 +42361,11 @@ components: **Supported pipeline types:** logs' properties: + account_id_key: + description: Name of the environment variable or secret that holds the New + Relic account ID. + example: NEW_RELIC_ACCOUNT_ID + type: string buffer: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' id: @@ -42186,6 +42380,11 @@ components: items: type: string type: array + license_key_key: + description: Name of the environment variable or secret that holds the New + Relic license key. + example: NEW_RELIC_LICENSE_KEY + type: string region: $ref: '#/components/schemas/ObservabilityPipelineNewRelicDestinationRegion' type: @@ -42431,6 +42630,8 @@ components: **Supported pipeline types:** logs' properties: + auth: + $ref: '#/components/schemas/ObservabilityPipelineElasticsearchDestinationAuth' buffer: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' bulk_index: @@ -42439,6 +42640,11 @@ components: type: string data_stream: $ref: '#/components/schemas/ObservabilityPipelineOpenSearchDestinationDataStream' + endpoint_url_key: + description: Name of the environment variable or secret that holds the OpenSearch + endpoint URL. + example: OPENSEARCH_ENDPOINT_URL + type: string id: description: The unique identifier for this component. example: opensearch-destination @@ -43148,6 +43354,11 @@ components: properties: buffer: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' + endpoint_url_key: + description: Name of the environment variable or secret that holds the syslog + server endpoint URL. + example: SYSLOG_ENDPOINT_URL + type: string id: description: The unique identifier for this component. example: rsyslog-destination @@ -43193,6 +43404,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the syslog receiver. + example: SYSLOG_ADDRESS + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` @@ -43669,6 +43885,11 @@ components: type: array region: $ref: '#/components/schemas/ObservabilityPipelineSentinelOneDestinationRegion' + token_key: + description: Name of the environment variable or secret that holds the SentinelOne + API token. + example: SENTINELONE_TOKEN + type: string type: $ref: '#/components/schemas/ObservabilityPipelineSentinelOneDestinationType' required: @@ -43709,6 +43930,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the socket + address (host:port). + example: SOCKET_ADDRESS + type: string buffer: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' encoding: @@ -43843,6 +44069,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the socket. + example: SOCKET_ADDRESS + type: string framing: $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFraming' id: @@ -44091,6 +44322,11 @@ components: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' encoding: $ref: '#/components/schemas/ObservabilityPipelineSplunkHecDestinationEncoding' + endpoint_url_key: + description: Name of the environment variable or secret that holds the Splunk + HEC endpoint URL. + example: SPLUNK_HEC_ENDPOINT_URL + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` @@ -44113,6 +44349,11 @@ components: description: The Splunk sourcetype to assign to log events. example: custom_sourcetype type: string + token_key: + description: Name of the environment variable or secret that holds the Splunk + HEC token. + example: SPLUNK_HEC_TOKEN + type: string type: $ref: '#/components/schemas/ObservabilityPipelineSplunkHecDestinationType' required: @@ -44148,6 +44389,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the HEC API. + example: SPLUNK_HEC_ADDRESS + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` @@ -44182,6 +44428,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the Splunk TCP receiver. + example: SPLUNK_TCP_ADDRESS + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` @@ -44217,6 +44468,11 @@ components: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' encoding: $ref: '#/components/schemas/ObservabilityPipelineSumoLogicDestinationEncoding' + endpoint_url_key: + description: Name of the environment variable or secret that holds the Sumo + Logic HTTP endpoint URL. + example: SUMO_LOGIC_ENDPOINT_URL + type: string header_custom_fields: description: A list of custom headers to include in the request to Sumo Logic. @@ -44298,6 +44554,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the Sumo Logic receiver. + example: SUMO_LOGIC_ADDRESS + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` @@ -44330,6 +44591,11 @@ components: properties: buffer: $ref: '#/components/schemas/ObservabilityPipelineBufferOptions' + endpoint_url_key: + description: Name of the environment variable or secret that holds the syslog-ng + server endpoint URL. + example: SYSLOG_ENDPOINT_URL + type: string id: description: The unique identifier for this component. example: syslog-ng-destination @@ -44375,6 +44641,11 @@ components: **Supported pipeline types:** logs' properties: + address_key: + description: Name of the environment variable or secret that holds the listen + address for the syslog-ng receiver. + example: SYSLOG_ADDRESS + type: string id: description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` @@ -44492,6 +44763,11 @@ components: description: Path to the private key file associated with the TLS client certificate. Used for mutual TLS authentication. type: string + key_pass_key: + description: Name of the environment variable or secret that holds the passphrase + for the private key file. + example: TLS_KEY_PASSPHRASE + type: string required: - crt_file type: object diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 414b401cd5..705ea1174c 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -17728,6 +17728,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destinatio :members: :show-inheritance: +datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destination\_auth module +---------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_auth + :members: + :show-inheritance: + datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destination\_data\_stream module ------------------------------------------------------------------------------------------------------ diff --git a/examples/v2/observability-pipelines/ValidatePipeline_1330454428.py b/examples/v2/observability-pipelines/ValidatePipeline_1330454428.py new file mode 100644 index 0000000000..43ab22c875 --- /dev/null +++ b/examples/v2/observability-pipelines/ValidatePipeline_1330454428.py @@ -0,0 +1,81 @@ +""" +Validate an observability pipeline with destination secret key returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi +from datadog_api_client.v2.model.observability_pipeline_config import ObservabilityPipelineConfig +from datadog_api_client.v2.model.observability_pipeline_config_processor_group import ( + ObservabilityPipelineConfigProcessorGroup, +) +from datadog_api_client.v2.model.observability_pipeline_data_attributes import ObservabilityPipelineDataAttributes +from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source import ( + ObservabilityPipelineDatadogAgentSource, +) +from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source_type import ( + ObservabilityPipelineDatadogAgentSourceType, +) +from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor +from datadog_api_client.v2.model.observability_pipeline_filter_processor_type import ( + ObservabilityPipelineFilterProcessorType, +) +from datadog_api_client.v2.model.observability_pipeline_spec import ObservabilityPipelineSpec +from datadog_api_client.v2.model.observability_pipeline_spec_data import ObservabilityPipelineSpecData +from datadog_api_client.v2.model.observability_pipeline_sumo_logic_destination import ( + ObservabilityPipelineSumoLogicDestination, +) +from datadog_api_client.v2.model.observability_pipeline_sumo_logic_destination_type import ( + ObservabilityPipelineSumoLogicDestinationType, +) + +body = ObservabilityPipelineSpec( + data=ObservabilityPipelineSpecData( + attributes=ObservabilityPipelineDataAttributes( + config=ObservabilityPipelineConfig( + destinations=[ + ObservabilityPipelineSumoLogicDestination( + id="sumo-logic-destination", + inputs=[ + "my-processor-group", + ], + type=ObservabilityPipelineSumoLogicDestinationType.SUMO_LOGIC, + endpoint_url_key="SUMO_LOGIC_ENDPOINT_URL", + ), + ], + processor_groups=[ + ObservabilityPipelineConfigProcessorGroup( + enabled=True, + id="my-processor-group", + include="service:my-service", + inputs=[ + "datadog-agent-source", + ], + processors=[ + ObservabilityPipelineFilterProcessor( + enabled=True, + id="filter-processor", + include="status:error", + type=ObservabilityPipelineFilterProcessorType.FILTER, + ), + ], + ), + ], + sources=[ + ObservabilityPipelineDatadogAgentSource( + id="datadog-agent-source", + type=ObservabilityPipelineDatadogAgentSourceType.DATADOG_AGENT, + ), + ], + ), + name="Pipeline with Secret Key", + ), + type="pipelines", + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ObservabilityPipelinesApi(api_client) + response = api_instance.validate_pipeline(body=body) + + print(response) diff --git a/examples/v2/observability-pipelines/ValidatePipeline_2899320203.py b/examples/v2/observability-pipelines/ValidatePipeline_2899320203.py new file mode 100644 index 0000000000..e9db8ef59b --- /dev/null +++ b/examples/v2/observability-pipelines/ValidatePipeline_2899320203.py @@ -0,0 +1,87 @@ +""" +Validate an observability pipeline with source secret key returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi +from datadog_api_client.v2.model.observability_pipeline_config import ObservabilityPipelineConfig +from datadog_api_client.v2.model.observability_pipeline_config_processor_group import ( + ObservabilityPipelineConfigProcessorGroup, +) +from datadog_api_client.v2.model.observability_pipeline_data_attributes import ObservabilityPipelineDataAttributes +from datadog_api_client.v2.model.observability_pipeline_datadog_logs_destination import ( + ObservabilityPipelineDatadogLogsDestination, +) +from datadog_api_client.v2.model.observability_pipeline_datadog_logs_destination_type import ( + ObservabilityPipelineDatadogLogsDestinationType, +) +from datadog_api_client.v2.model.observability_pipeline_decoding import ObservabilityPipelineDecoding +from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor +from datadog_api_client.v2.model.observability_pipeline_filter_processor_type import ( + ObservabilityPipelineFilterProcessorType, +) +from datadog_api_client.v2.model.observability_pipeline_http_client_source import ObservabilityPipelineHttpClientSource +from datadog_api_client.v2.model.observability_pipeline_http_client_source_auth_strategy import ( + ObservabilityPipelineHttpClientSourceAuthStrategy, +) +from datadog_api_client.v2.model.observability_pipeline_http_client_source_type import ( + ObservabilityPipelineHttpClientSourceType, +) +from datadog_api_client.v2.model.observability_pipeline_spec import ObservabilityPipelineSpec +from datadog_api_client.v2.model.observability_pipeline_spec_data import ObservabilityPipelineSpecData + +body = ObservabilityPipelineSpec( + data=ObservabilityPipelineSpecData( + attributes=ObservabilityPipelineDataAttributes( + config=ObservabilityPipelineConfig( + destinations=[ + ObservabilityPipelineDatadogLogsDestination( + id="datadog-logs-destination", + inputs=[ + "my-processor-group", + ], + type=ObservabilityPipelineDatadogLogsDestinationType.DATADOG_LOGS, + ), + ], + processor_groups=[ + ObservabilityPipelineConfigProcessorGroup( + enabled=True, + id="my-processor-group", + include="service:my-service", + inputs=[ + "http-client-source", + ], + processors=[ + ObservabilityPipelineFilterProcessor( + enabled=True, + id="filter-processor", + include="status:error", + type=ObservabilityPipelineFilterProcessorType.FILTER, + ), + ], + ), + ], + sources=[ + ObservabilityPipelineHttpClientSource( + id="http-client-source", + type=ObservabilityPipelineHttpClientSourceType.HTTP_CLIENT, + decoding=ObservabilityPipelineDecoding.DECODE_BYTES, + scrape_interval_secs=15, + scrape_timeout_secs=5, + auth_strategy=ObservabilityPipelineHttpClientSourceAuthStrategy.BEARER, + token_key="HTTP_CLIENT_TOKEN", + ), + ], + ), + name="Pipeline with Source Secret", + ), + type="pipelines", + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ObservabilityPipelinesApi(api_client) + response = api_instance.validate_pipeline(body=body) + + print(response) diff --git a/src/datadog_api_client/v2/model/azure_storage_destination.py b/src/datadog_api_client/v2/model/azure_storage_destination.py index 456e704de4..a7985ad72f 100644 --- a/src/datadog_api_client/v2/model/azure_storage_destination.py +++ b/src/datadog_api_client/v2/model/azure_storage_destination.py @@ -36,6 +36,7 @@ def openapi_types(_): return { "blob_prefix": (str,), "buffer": (ObservabilityPipelineBufferOptions,), + "connection_string_key": (str,), "container_name": (str,), "id": (str,), "inputs": ([str],), @@ -45,6 +46,7 @@ def openapi_types(_): attribute_map = { "blob_prefix": "blob_prefix", "buffer": "buffer", + "connection_string_key": "connection_string_key", "container_name": "container_name", "id": "id", "inputs": "inputs", @@ -65,6 +67,7 @@ def __init__( ObservabilityPipelineMemoryBufferSizeOptions, UnsetType, ] = unset, + connection_string_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -78,6 +81,9 @@ def __init__( :param buffer: Configuration for buffer settings on destination components. :type buffer: ObservabilityPipelineBufferOptions, optional + :param connection_string_key: Name of the environment variable or secret that holds the Azure Storage connection string. + :type connection_string_key: str, optional + :param container_name: The name of the Azure Blob Storage container to store logs in. :type container_name: str @@ -94,6 +100,8 @@ def __init__( kwargs["blob_prefix"] = blob_prefix if buffer is not unset: kwargs["buffer"] = buffer + if connection_string_key is not unset: + kwargs["connection_string_key"] = connection_string_key super().__init__(kwargs) self_.container_name = container_name diff --git a/src/datadog_api_client/v2/model/microsoft_sentinel_destination.py b/src/datadog_api_client/v2/model/microsoft_sentinel_destination.py index 6f9117e884..04319b89b2 100644 --- a/src/datadog_api_client/v2/model/microsoft_sentinel_destination.py +++ b/src/datadog_api_client/v2/model/microsoft_sentinel_destination.py @@ -36,6 +36,8 @@ def openapi_types(_): return { "buffer": (ObservabilityPipelineBufferOptions,), "client_id": (str,), + "client_secret_key": (str,), + "dce_uri_key": (str,), "dcr_immutable_id": (str,), "id": (str,), "inputs": ([str],), @@ -47,6 +49,8 @@ def openapi_types(_): attribute_map = { "buffer": "buffer", "client_id": "client_id", + "client_secret_key": "client_secret_key", + "dce_uri_key": "dce_uri_key", "dcr_immutable_id": "dcr_immutable_id", "id": "id", "inputs": "inputs", @@ -71,6 +75,8 @@ def __init__( ObservabilityPipelineMemoryBufferSizeOptions, UnsetType, ] = unset, + client_secret_key: Union[str, UnsetType] = unset, + dce_uri_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -84,6 +90,12 @@ def __init__( :param client_id: Azure AD client ID used for authentication. :type client_id: str + :param client_secret_key: Name of the environment variable or secret that holds the Azure AD client secret. + :type client_secret_key: str, optional + + :param dce_uri_key: Name of the environment variable or secret that holds the Data Collection Endpoint (DCE) URI. + :type dce_uri_key: str, optional + :param dcr_immutable_id: The immutable ID of the Data Collection Rule (DCR). :type dcr_immutable_id: str @@ -104,6 +116,10 @@ def __init__( """ if buffer is not unset: kwargs["buffer"] = buffer + if client_secret_key is not unset: + kwargs["client_secret_key"] = client_secret_key + if dce_uri_key is not unset: + kwargs["dce_uri_key"] = dce_uri_key super().__init__(kwargs) self_.client_id = client_id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_amazon_data_firehose_source.py b/src/datadog_api_client/v2/model/observability_pipeline_amazon_data_firehose_source.py index 8bbddd8850..494a9da8f4 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_amazon_data_firehose_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_amazon_data_firehose_source.py @@ -31,6 +31,7 @@ def openapi_types(_): ) return { + "address_key": (str,), "auth": (ObservabilityPipelineAwsAuth,), "id": (str,), "tls": (ObservabilityPipelineTls,), @@ -38,6 +39,7 @@ def openapi_types(_): } attribute_map = { + "address_key": "address_key", "auth": "auth", "id": "id", "tls": "tls", @@ -48,6 +50,7 @@ def __init__( self_, id: str, type: ObservabilityPipelineAmazonDataFirehoseSourceType, + address_key: Union[str, UnsetType] = unset, auth: Union[ObservabilityPipelineAwsAuth, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, @@ -57,6 +60,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the Firehose delivery stream address. + :type address_key: str, optional + :param auth: AWS authentication credentials used for accessing AWS services such as S3. If omitted, the system’s default credentials are used (for example, the IAM role and environment variables). :type auth: ObservabilityPipelineAwsAuth, optional @@ -70,6 +76,8 @@ def __init__( :param type: The source type. The value should always be ``amazon_data_firehose``. :type type: ObservabilityPipelineAmazonDataFirehoseSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key if auth is not unset: kwargs["auth"] = auth if tls is not unset: diff --git a/src/datadog_api_client/v2/model/observability_pipeline_amazon_s3_source.py b/src/datadog_api_client/v2/model/observability_pipeline_amazon_s3_source.py index 54806147bd..49388ad221 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_amazon_s3_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_amazon_s3_source.py @@ -36,6 +36,7 @@ def openapi_types(_): "region": (str,), "tls": (ObservabilityPipelineTls,), "type": (ObservabilityPipelineAmazonS3SourceType,), + "url_key": (str,), } attribute_map = { @@ -44,6 +45,7 @@ def openapi_types(_): "region": "region", "tls": "tls", "type": "type", + "url_key": "url_key", } def __init__( @@ -53,6 +55,7 @@ def __init__( type: ObservabilityPipelineAmazonS3SourceType, auth: Union[ObservabilityPipelineAwsAuth, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, + url_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -76,11 +79,16 @@ def __init__( :param type: The source type. Always ``amazon_s3``. :type type: ObservabilityPipelineAmazonS3SourceType + + :param url_key: Name of the environment variable or secret that holds the S3 bucket URL. + :type url_key: str, optional """ if auth is not unset: kwargs["auth"] = auth if tls is not unset: kwargs["tls"] = tls + if url_key is not unset: + kwargs["url_key"] = url_key super().__init__(kwargs) self_.id = id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_cloud_prem_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_cloud_prem_destination.py index 90a08c3a2d..b26caa73a5 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_cloud_prem_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_cloud_prem_destination.py @@ -3,11 +3,13 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, cached_property, + unset, + UnsetType, ) @@ -25,23 +27,35 @@ def openapi_types(_): ) return { + "endpoint_url_key": (str,), "id": (str,), "inputs": ([str],), "type": (ObservabilityPipelineCloudPremDestinationType,), } attribute_map = { + "endpoint_url_key": "endpoint_url_key", "id": "id", "inputs": "inputs", "type": "type", } - def __init__(self_, id: str, inputs: List[str], type: ObservabilityPipelineCloudPremDestinationType, **kwargs): + def __init__( + self_, + id: str, + inputs: List[str], + type: ObservabilityPipelineCloudPremDestinationType, + endpoint_url_key: Union[str, UnsetType] = unset, + **kwargs, + ): """ The ``cloud_prem`` destination sends logs to Datadog CloudPrem. **Supported pipeline types:** logs + :param endpoint_url_key: Name of the environment variable or secret that holds the CloudPrem endpoint URL. + :type endpoint_url_key: str, optional + :param id: The unique identifier for this component. :type id: str @@ -51,6 +65,8 @@ def __init__(self_, id: str, inputs: List[str], type: ObservabilityPipelineCloud :param type: The destination type. The value should always be ``cloud_prem``. :type type: ObservabilityPipelineCloudPremDestinationType """ + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key super().__init__(kwargs) self_.id = id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py b/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py index 05e043a8eb..2be1eb069d 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py @@ -21,6 +21,9 @@ def __init__(self, **kwargs): :param compression: Compression configuration for HTTP requests. :type compression: ObservabilityPipelineHttpClientDestinationCompression, optional + :param custom_key: Name of the environment variable or secret that holds a custom header value (used with custom auth strategies). + :type custom_key: str, optional + :param encoding: Encoding format for log events. :type encoding: ObservabilityPipelineHttpClientDestinationEncoding @@ -30,12 +33,24 @@ def __init__(self, **kwargs): :param inputs: A list of component IDs whose output is used as the input for this component. :type inputs: [str] + :param password_key: Name of the environment variable or secret that holds the password (used when `auth_strategy` is `basic`). + :type password_key: str, optional + :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. :type tls: ObservabilityPipelineTls, optional + :param token_key: Name of the environment variable or secret that holds the bearer token (used when `auth_strategy` is `bearer`). + :type token_key: str, optional + :param type: The destination type. The value should always be `http_client`. :type type: ObservabilityPipelineHttpClientDestinationType + :param uri_key: Name of the environment variable or secret that holds the HTTP endpoint URI. + :type uri_key: str, optional + + :param username_key: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `basic`). + :type username_key: str, optional + :param auth: Authentication settings for the Amazon OpenSearch destination. The `strategy` field determines whether basic or AWS-based authentication is used. :type auth: ObservabilityPipelineAmazonOpenSearchDestinationAuth @@ -64,9 +79,15 @@ def __init__(self, **kwargs): :param blob_prefix: Optional prefix for blobs written to the container. :type blob_prefix: str, optional + :param connection_string_key: Name of the environment variable or secret that holds the Azure Storage connection string. + :type connection_string_key: str, optional + :param container_name: The name of the Azure Blob Storage container to store logs in. :type container_name: str + :param endpoint_url_key: Name of the environment variable or secret that holds the CloudPrem endpoint URL. + :type endpoint_url_key: str, optional + :param routes: A list of routing rules that forward matching logs to Datadog using dedicated API keys. :type routes: [ObservabilityPipelineDatadogLogsDestinationRoute], optional @@ -88,12 +109,15 @@ def __init__(self, **kwargs): :param metadata: Custom metadata to attach to each object uploaded to the GCS bucket. :type metadata: [ObservabilityPipelineMetadataEntry], optional - :param project: The GCP project ID that owns the Pub/Sub topic. + :param project: The Google Cloud project ID that owns the Pub/Sub topic. :type project: str :param topic: The Pub/Sub topic name to publish logs to. :type topic: str + :param bootstrap_servers_key: Name of the environment variable or secret that holds the Kafka bootstrap servers list. + :type bootstrap_servers_key: str, optional + :param headers_key: The field name to use for Kafka message headers. :type headers_key: str, optional @@ -121,6 +145,12 @@ def __init__(self, **kwargs): :param client_id: Azure AD client ID used for authentication. :type client_id: str + :param client_secret_key: Name of the environment variable or secret that holds the Azure AD client secret. + :type client_secret_key: str, optional + + :param dce_uri_key: Name of the environment variable or secret that holds the Data Collection Endpoint (DCE) URI. + :type dce_uri_key: str, optional + :param dcr_immutable_id: The immutable ID of the Data Collection Rule (DCR). :type dcr_immutable_id: str @@ -130,9 +160,18 @@ def __init__(self, **kwargs): :param tenant_id: Azure AD tenant ID. :type tenant_id: str + :param account_id_key: Name of the environment variable or secret that holds the New Relic account ID. + :type account_id_key: str, optional + + :param license_key_key: Name of the environment variable or secret that holds the New Relic license key. + :type license_key_key: str, optional + :param keepalive: Optional socket keepalive duration in milliseconds. :type keepalive: int, optional + :param address_key: Name of the environment variable or secret that holds the socket address (host:port). + :type address_key: str, optional + :param framing: Framing method configuration. :type framing: ObservabilityPipelineSocketDestinationFraming diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py b/src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py index 023c63f546..1b57e164c2 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py @@ -24,6 +24,9 @@ def __init__(self, **kwargs): :param type: The source type. The value should always be `datadog_agent`. :type type: ObservabilityPipelineDatadogAgentSourceType + :param address_key: Name of the environment variable or secret that holds the Firehose delivery stream address. + :type address_key: str, optional + :param auth: AWS authentication credentials used for accessing AWS services such as S3. If omitted, the system’s default credentials are used (for example, the IAM role and environment variables). :type auth: ObservabilityPipelineAwsAuth, optional @@ -31,10 +34,13 @@ def __init__(self, **kwargs): :param region: AWS region where the S3 bucket resides. :type region: str + :param url_key: Name of the environment variable or secret that holds the S3 bucket URL. + :type url_key: str, optional + :param decoding: The decoding format used to interpret incoming logs. :type decoding: ObservabilityPipelineDecoding - :param project: The GCP project ID that owns the Pub/Sub subscription. + :param project: The Google Cloud project ID that owns the Pub/Sub subscription. :type project: str :param subscription: The Pub/Sub subscription name from which messages are consumed. @@ -43,12 +49,30 @@ def __init__(self, **kwargs): :param auth_strategy: Optional authentication strategy for HTTP requests. :type auth_strategy: ObservabilityPipelineHttpClientSourceAuthStrategy, optional + :param custom_key: Name of the environment variable or secret that holds a custom header value (used with custom auth strategies). + :type custom_key: str, optional + + :param endpoint_url_key: Name of the environment variable or secret that holds the HTTP endpoint URL to scrape. + :type endpoint_url_key: str, optional + + :param password_key: Name of the environment variable or secret that holds the password (used when `auth_strategy` is `basic`). + :type password_key: str, optional + :param scrape_interval_secs: The interval (in seconds) between HTTP scrape requests. :type scrape_interval_secs: int, optional :param scrape_timeout_secs: The timeout (in seconds) for each scrape request. :type scrape_timeout_secs: int, optional + :param token_key: Name of the environment variable or secret that holds the bearer token (used when `auth_strategy` is `bearer`). + :type token_key: str, optional + + :param username_key: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `basic`). + :type username_key: str, optional + + :param bootstrap_servers_key: Name of the environment variable or secret that holds the Kafka bootstrap servers list. + :type bootstrap_servers_key: str, optional + :param group_id: Consumer group ID used by the Kafka client. :type group_id: str diff --git a/src/datadog_api_client/v2/model/observability_pipeline_crowd_strike_next_gen_siem_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_crowd_strike_next_gen_siem_destination.py index c8bcc574fe..9db3a2edb3 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_crowd_strike_next_gen_siem_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_crowd_strike_next_gen_siem_destination.py @@ -55,9 +55,11 @@ def openapi_types(_): "buffer": (ObservabilityPipelineBufferOptions,), "compression": (ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression,), "encoding": (ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding,), + "endpoint_url_key": (str,), "id": (str,), "inputs": ([str],), "tls": (ObservabilityPipelineTls,), + "token_key": (str,), "type": (ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType,), } @@ -65,9 +67,11 @@ def openapi_types(_): "buffer": "buffer", "compression": "compression", "encoding": "encoding", + "endpoint_url_key": "endpoint_url_key", "id": "id", "inputs": "inputs", "tls": "tls", + "token_key": "token_key", "type": "type", } @@ -85,7 +89,9 @@ def __init__( UnsetType, ] = unset, compression: Union[ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression, UnsetType] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, + token_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -102,6 +108,9 @@ def __init__( :param encoding: Encoding format for log events. :type encoding: ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding + :param endpoint_url_key: Name of the environment variable or secret that holds the CrowdStrike endpoint URL. + :type endpoint_url_key: str, optional + :param id: The unique identifier for this component. :type id: str @@ -111,6 +120,9 @@ def __init__( :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. :type tls: ObservabilityPipelineTls, optional + :param token_key: Name of the environment variable or secret that holds the CrowdStrike API token. + :type token_key: str, optional + :param type: The destination type. The value should always be ``crowdstrike_next_gen_siem``. :type type: ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType """ @@ -118,8 +130,12 @@ def __init__( kwargs["buffer"] = buffer if compression is not unset: kwargs["compression"] = compression + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key if tls is not unset: kwargs["tls"] = tls + if token_key is not unset: + kwargs["token_key"] = token_key super().__init__(kwargs) self_.encoding = encoding diff --git a/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination.py index 7735f0f178..22e14fa8f8 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination.py @@ -17,6 +17,9 @@ from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_api_version import ( ObservabilityPipelineElasticsearchDestinationApiVersion, ) + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_auth import ( + ObservabilityPipelineElasticsearchDestinationAuth, + ) from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream import ( ObservabilityPipelineElasticsearchDestinationDataStream, @@ -41,6 +44,9 @@ def openapi_types(_): from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_api_version import ( ObservabilityPipelineElasticsearchDestinationApiVersion, ) + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_auth import ( + ObservabilityPipelineElasticsearchDestinationAuth, + ) from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream import ( ObservabilityPipelineElasticsearchDestinationDataStream, @@ -51,9 +57,11 @@ def openapi_types(_): return { "api_version": (ObservabilityPipelineElasticsearchDestinationApiVersion,), + "auth": (ObservabilityPipelineElasticsearchDestinationAuth,), "buffer": (ObservabilityPipelineBufferOptions,), "bulk_index": (str,), "data_stream": (ObservabilityPipelineElasticsearchDestinationDataStream,), + "endpoint_url_key": (str,), "id": (str,), "inputs": ([str],), "type": (ObservabilityPipelineElasticsearchDestinationType,), @@ -61,9 +69,11 @@ def openapi_types(_): attribute_map = { "api_version": "api_version", + "auth": "auth", "buffer": "buffer", "bulk_index": "bulk_index", "data_stream": "data_stream", + "endpoint_url_key": "endpoint_url_key", "id": "id", "inputs": "inputs", "type": "type", @@ -75,6 +85,7 @@ def __init__( inputs: List[str], type: ObservabilityPipelineElasticsearchDestinationType, api_version: Union[ObservabilityPipelineElasticsearchDestinationApiVersion, UnsetType] = unset, + auth: Union[ObservabilityPipelineElasticsearchDestinationAuth, UnsetType] = unset, buffer: Union[ ObservabilityPipelineBufferOptions, ObservabilityPipelineDiskBufferOptions, @@ -84,6 +95,7 @@ def __init__( ] = unset, bulk_index: Union[str, UnsetType] = unset, data_stream: Union[ObservabilityPipelineElasticsearchDestinationDataStream, UnsetType] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -94,6 +106,10 @@ def __init__( :param api_version: The Elasticsearch API version to use. Set to ``auto`` to auto-detect. :type api_version: ObservabilityPipelineElasticsearchDestinationApiVersion, optional + :param auth: Authentication settings for the Elasticsearch destination. + When ``strategy`` is ``basic`` , use ``username_key`` and ``password_key`` to reference credentials stored in environment variables or secrets. + :type auth: ObservabilityPipelineElasticsearchDestinationAuth, optional + :param buffer: Configuration for buffer settings on destination components. :type buffer: ObservabilityPipelineBufferOptions, optional @@ -103,6 +119,9 @@ def __init__( :param data_stream: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. :type data_stream: ObservabilityPipelineElasticsearchDestinationDataStream, optional + :param endpoint_url_key: Name of the environment variable or secret that holds the Elasticsearch endpoint URL. + :type endpoint_url_key: str, optional + :param id: The unique identifier for this component. :type id: str @@ -114,12 +133,16 @@ def __init__( """ if api_version is not unset: kwargs["api_version"] = api_version + 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_.id = id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_auth.py b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_auth.py new file mode 100644 index 0000000000..4650795bd7 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_auth.py @@ -0,0 +1,67 @@ +# 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 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_amazon_open_search_destination_auth_strategy import ( + ObservabilityPipelineAmazonOpenSearchDestinationAuthStrategy, + ) + + +class ObservabilityPipelineElasticsearchDestinationAuth(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.observability_pipeline_amazon_open_search_destination_auth_strategy import ( + ObservabilityPipelineAmazonOpenSearchDestinationAuthStrategy, + ) + + return { + "password_key": (str,), + "strategy": (ObservabilityPipelineAmazonOpenSearchDestinationAuthStrategy,), + "username_key": (str,), + } + + attribute_map = { + "password_key": "password_key", + "strategy": "strategy", + "username_key": "username_key", + } + + def __init__( + self_, + strategy: ObservabilityPipelineAmazonOpenSearchDestinationAuthStrategy, + password_key: Union[str, UnsetType] = unset, + username_key: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Authentication settings for the Elasticsearch destination. + When ``strategy`` is ``basic`` , use ``username_key`` and ``password_key`` to reference credentials stored in environment variables or secrets. + + :param password_key: Name of the environment variable or secret that holds the Elasticsearch password (used when ``strategy`` is ``basic`` ). + :type password_key: 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 Elasticsearch username (used when ``strategy`` is ``basic`` ). + :type username_key: str, optional + """ + if password_key is not unset: + kwargs["password_key"] = password_key + if username_key is not unset: + kwargs["username_key"] = username_key + super().__init__(kwargs) + + self_.strategy = strategy diff --git a/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_reference_table.py b/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_reference_table.py index 9788ea4973..47683ba4cd 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_reference_table.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_reference_table.py @@ -17,21 +17,33 @@ class ObservabilityPipelineEnrichmentTableReferenceTable(ModelNormal): @cached_property def openapi_types(_): return { + "app_key_key": (str,), "columns": ([str],), "key_field": (str,), "table_id": (str,), } attribute_map = { + "app_key_key": "app_key_key", "columns": "columns", "key_field": "key_field", "table_id": "table_id", } - def __init__(self_, key_field: str, table_id: str, columns: Union[List[str], UnsetType] = unset, **kwargs): + def __init__( + self_, + key_field: str, + table_id: str, + app_key_key: Union[str, UnsetType] = unset, + columns: Union[List[str], UnsetType] = unset, + **kwargs, + ): """ Uses a Datadog reference table to enrich logs. + :param app_key_key: Name of the environment variable or secret that holds the Datadog application key used to access the reference table. + :type app_key_key: str, optional + :param columns: List of column names to include from the reference table. If not provided, all columns are included. :type columns: [str], optional @@ -41,6 +53,8 @@ def __init__(self_, key_field: str, table_id: str, columns: Union[List[str], Uns :param table_id: The unique identifier of the reference table. :type table_id: str """ + if app_key_key is not unset: + kwargs["app_key_key"] = app_key_key if columns is not unset: kwargs["columns"] = columns super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_fluent_bit_source.py b/src/datadog_api_client/v2/model/observability_pipeline_fluent_bit_source.py index dd1344f898..cbd9b2bcdf 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_fluent_bit_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_fluent_bit_source.py @@ -29,12 +29,14 @@ def openapi_types(_): ) return { + "address_key": (str,), "id": (str,), "tls": (ObservabilityPipelineTls,), "type": (ObservabilityPipelineFluentBitSourceType,), } attribute_map = { + "address_key": "address_key", "id": "id", "tls": "tls", "type": "type", @@ -44,6 +46,7 @@ def __init__( self_, id: str, type: ObservabilityPipelineFluentBitSourceType, + address_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): @@ -52,6 +55,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the Fluent Bit receiver. + :type address_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str @@ -61,6 +67,8 @@ def __init__( :param type: The source type. The value should always be ``fluent_bit``. :type type: ObservabilityPipelineFluentBitSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key if tls is not unset: kwargs["tls"] = tls super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_fluentd_source.py b/src/datadog_api_client/v2/model/observability_pipeline_fluentd_source.py index a3351cbe96..18ea2070c6 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_fluentd_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_fluentd_source.py @@ -29,12 +29,14 @@ def openapi_types(_): ) return { + "address_key": (str,), "id": (str,), "tls": (ObservabilityPipelineTls,), "type": (ObservabilityPipelineFluentdSourceType,), } attribute_map = { + "address_key": "address_key", "id": "id", "tls": "tls", "type": "type", @@ -44,6 +46,7 @@ def __init__( self_, id: str, type: ObservabilityPipelineFluentdSourceType, + address_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): @@ -52,6 +55,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the Fluent receiver. + :type address_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str @@ -61,6 +67,8 @@ def __init__( :param type: The source type. The value should always be `fluentd. :type type: ObservabilityPipelineFluentdSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key if tls is not unset: kwargs["tls"] = tls super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_gcp_auth.py b/src/datadog_api_client/v2/model/observability_pipeline_gcp_auth.py index 2b2fe04481..af612cddfc 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_gcp_auth.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_gcp_auth.py @@ -23,9 +23,9 @@ def openapi_types(_): def __init__(self_, credentials_file: str, **kwargs): """ - GCP credentials used to authenticate with Google Cloud Storage. + Google Cloud credentials used to authenticate with Google Cloud Storage. - :param credentials_file: Path to the GCP service account key file. + :param credentials_file: Path to the Google Cloud service account key file. :type credentials_file: str """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_google_chronicle_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_google_chronicle_destination.py index d2db00a760..fd04e3ed80 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_google_chronicle_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_google_chronicle_destination.py @@ -50,6 +50,7 @@ def openapi_types(_): "buffer": (ObservabilityPipelineBufferOptions,), "customer_id": (str,), "encoding": (ObservabilityPipelineGoogleChronicleDestinationEncoding,), + "endpoint_url_key": (str,), "id": (str,), "inputs": ([str],), "log_type": (str,), @@ -61,6 +62,7 @@ def openapi_types(_): "buffer": "buffer", "customer_id": "customer_id", "encoding": "encoding", + "endpoint_url_key": "endpoint_url_key", "id": "id", "inputs": "inputs", "log_type": "log_type", @@ -82,6 +84,7 @@ def __init__( UnsetType, ] = unset, encoding: Union[ObservabilityPipelineGoogleChronicleDestinationEncoding, UnsetType] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, log_type: Union[str, UnsetType] = unset, **kwargs, ): @@ -90,7 +93,7 @@ def __init__( **Supported pipeline types:** logs - :param auth: GCP credentials used to authenticate with Google Cloud Storage. + :param auth: Google Cloud credentials used to authenticate with Google Cloud Storage. :type auth: ObservabilityPipelineGcpAuth, optional :param buffer: Configuration for buffer settings on destination components. @@ -102,6 +105,9 @@ def __init__( :param encoding: The encoding format for the logs sent to Chronicle. :type encoding: ObservabilityPipelineGoogleChronicleDestinationEncoding, optional + :param endpoint_url_key: Name of the environment variable or secret that holds the Google Chronicle endpoint URL. + :type endpoint_url_key: str, optional + :param id: The unique identifier for this component. :type id: str @@ -120,6 +126,8 @@ def __init__( kwargs["buffer"] = buffer if encoding is not unset: kwargs["encoding"] = encoding + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key if log_type is not unset: kwargs["log_type"] = log_type super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_google_cloud_storage_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_google_cloud_storage_destination.py index 9f618e4e96..7ce2925d9e 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_google_cloud_storage_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_google_cloud_storage_destination.py @@ -101,14 +101,14 @@ def __init__( ): """ The ``google_cloud_storage`` destination stores logs in a Google Cloud Storage (GCS) bucket. - It requires a bucket name, GCP authentication, and metadata fields. + It requires a bucket name, Google Cloud authentication, and metadata fields. **Supported pipeline types:** logs :param acl: Access control list setting for objects written to the bucket. :type acl: ObservabilityPipelineGoogleCloudStorageDestinationAcl, optional - :param auth: GCP credentials used to authenticate with Google Cloud Storage. + :param auth: Google Cloud credentials used to authenticate with Google Cloud Storage. :type auth: ObservabilityPipelineGcpAuth, optional :param bucket: Name of the GCS bucket. diff --git a/src/datadog_api_client/v2/model/observability_pipeline_google_pub_sub_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_google_pub_sub_destination.py index e09fe78969..6ddbd353fb 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_google_pub_sub_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_google_pub_sub_destination.py @@ -51,6 +51,7 @@ def openapi_types(_): "auth": (ObservabilityPipelineGcpAuth,), "buffer": (ObservabilityPipelineBufferOptions,), "encoding": (ObservabilityPipelineGooglePubSubDestinationEncoding,), + "endpoint_url_key": (str,), "id": (str,), "inputs": ([str],), "project": (str,), @@ -63,6 +64,7 @@ def openapi_types(_): "auth": "auth", "buffer": "buffer", "encoding": "encoding", + "endpoint_url_key": "endpoint_url_key", "id": "id", "inputs": "inputs", "project": "project", @@ -87,6 +89,7 @@ def __init__( ObservabilityPipelineMemoryBufferSizeOptions, UnsetType, ] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): @@ -95,7 +98,7 @@ def __init__( **Supported pipeline types:** logs - :param auth: GCP credentials used to authenticate with Google Cloud Storage. + :param auth: Google Cloud credentials used to authenticate with Google Cloud Storage. :type auth: ObservabilityPipelineGcpAuth, optional :param buffer: Configuration for buffer settings on destination components. @@ -104,13 +107,16 @@ def __init__( :param encoding: Encoding format for log events. :type encoding: ObservabilityPipelineGooglePubSubDestinationEncoding + :param endpoint_url_key: Name of the environment variable or secret that holds the Google Cloud Pub/Sub endpoint URL. + :type endpoint_url_key: str, optional + :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 project: The GCP project ID that owns the Pub/Sub topic. + :param project: The Google Cloud project ID that owns the Pub/Sub topic. :type project: str :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. @@ -126,6 +132,8 @@ def __init__( kwargs["auth"] = auth if buffer is not unset: kwargs["buffer"] = buffer + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key if tls is not unset: kwargs["tls"] = tls super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_google_pub_sub_source.py b/src/datadog_api_client/v2/model/observability_pipeline_google_pub_sub_source.py index 859bad4249..b161acad04 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_google_pub_sub_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_google_pub_sub_source.py @@ -68,7 +68,7 @@ def __init__( **Supported pipeline types:** logs - :param auth: GCP credentials used to authenticate with Google Cloud Storage. + :param auth: Google Cloud credentials used to authenticate with Google Cloud Storage. :type auth: ObservabilityPipelineGcpAuth, optional :param decoding: The decoding format used to interpret incoming logs. @@ -77,7 +77,7 @@ def __init__( :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str - :param project: The GCP project ID that owns the Pub/Sub subscription. + :param project: The Google Cloud project ID that owns the Pub/Sub subscription. :type project: str :param subscription: The Pub/Sub subscription name from which messages are consumed. diff --git a/src/datadog_api_client/v2/model/observability_pipeline_http_client_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_http_client_destination.py index c26d7bf7ce..0eba7b7edf 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_http_client_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_http_client_destination.py @@ -49,21 +49,31 @@ def openapi_types(_): return { "auth_strategy": (ObservabilityPipelineHttpClientDestinationAuthStrategy,), "compression": (ObservabilityPipelineHttpClientDestinationCompression,), + "custom_key": (str,), "encoding": (ObservabilityPipelineHttpClientDestinationEncoding,), "id": (str,), "inputs": ([str],), + "password_key": (str,), "tls": (ObservabilityPipelineTls,), + "token_key": (str,), "type": (ObservabilityPipelineHttpClientDestinationType,), + "uri_key": (str,), + "username_key": (str,), } attribute_map = { "auth_strategy": "auth_strategy", "compression": "compression", + "custom_key": "custom_key", "encoding": "encoding", "id": "id", "inputs": "inputs", + "password_key": "password_key", "tls": "tls", + "token_key": "token_key", "type": "type", + "uri_key": "uri_key", + "username_key": "username_key", } def __init__( @@ -74,7 +84,12 @@ def __init__( type: ObservabilityPipelineHttpClientDestinationType, auth_strategy: Union[ObservabilityPipelineHttpClientDestinationAuthStrategy, UnsetType] = unset, compression: Union[ObservabilityPipelineHttpClientDestinationCompression, UnsetType] = unset, + custom_key: Union[str, UnsetType] = unset, + password_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, + token_key: Union[str, UnsetType] = unset, + uri_key: Union[str, UnsetType] = unset, + username_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -88,6 +103,9 @@ def __init__( :param compression: Compression configuration for HTTP requests. :type compression: ObservabilityPipelineHttpClientDestinationCompression, optional + :param custom_key: Name of the environment variable or secret that holds a custom header value (used with custom auth strategies). + :type custom_key: str, optional + :param encoding: Encoding format for log events. :type encoding: ObservabilityPipelineHttpClientDestinationEncoding @@ -97,18 +115,40 @@ def __init__( :param inputs: A list of component IDs whose output is used as the input for this component. :type inputs: [str] + :param password_key: Name of the environment variable or secret that holds the password (used when ``auth_strategy`` is ``basic`` ). + :type password_key: str, optional + :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. :type tls: ObservabilityPipelineTls, optional + :param token_key: Name of the environment variable or secret that holds the bearer token (used when ``auth_strategy`` is ``bearer`` ). + :type token_key: str, optional + :param type: The destination type. The value should always be ``http_client``. :type type: ObservabilityPipelineHttpClientDestinationType + + :param uri_key: Name of the environment variable or secret that holds the HTTP endpoint URI. + :type uri_key: str, optional + + :param username_key: Name of the environment variable or secret that holds the username (used when ``auth_strategy`` is ``basic`` ). + :type username_key: str, optional """ if auth_strategy is not unset: kwargs["auth_strategy"] = auth_strategy if compression is not unset: kwargs["compression"] = compression + if custom_key is not unset: + kwargs["custom_key"] = custom_key + if password_key is not unset: + kwargs["password_key"] = password_key if tls is not unset: kwargs["tls"] = tls + if token_key is not unset: + kwargs["token_key"] = token_key + if uri_key is not unset: + kwargs["uri_key"] = uri_key + if username_key is not unset: + kwargs["username_key"] = username_key super().__init__(kwargs) self_.encoding = encoding diff --git a/src/datadog_api_client/v2/model/observability_pipeline_http_client_source.py b/src/datadog_api_client/v2/model/observability_pipeline_http_client_source.py index 5ee0bc021a..590ecc7a07 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_http_client_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_http_client_source.py @@ -38,22 +38,32 @@ def openapi_types(_): return { "auth_strategy": (ObservabilityPipelineHttpClientSourceAuthStrategy,), + "custom_key": (str,), "decoding": (ObservabilityPipelineDecoding,), + "endpoint_url_key": (str,), "id": (str,), + "password_key": (str,), "scrape_interval_secs": (int,), "scrape_timeout_secs": (int,), "tls": (ObservabilityPipelineTls,), + "token_key": (str,), "type": (ObservabilityPipelineHttpClientSourceType,), + "username_key": (str,), } attribute_map = { "auth_strategy": "auth_strategy", + "custom_key": "custom_key", "decoding": "decoding", + "endpoint_url_key": "endpoint_url_key", "id": "id", + "password_key": "password_key", "scrape_interval_secs": "scrape_interval_secs", "scrape_timeout_secs": "scrape_timeout_secs", "tls": "tls", + "token_key": "token_key", "type": "type", + "username_key": "username_key", } def __init__( @@ -62,9 +72,14 @@ def __init__( id: str, type: ObservabilityPipelineHttpClientSourceType, auth_strategy: Union[ObservabilityPipelineHttpClientSourceAuthStrategy, UnsetType] = unset, + custom_key: Union[str, UnsetType] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, + password_key: Union[str, UnsetType] = unset, scrape_interval_secs: Union[int, UnsetType] = unset, scrape_timeout_secs: Union[int, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, + token_key: Union[str, UnsetType] = unset, + username_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -75,12 +90,21 @@ def __init__( :param auth_strategy: Optional authentication strategy for HTTP requests. :type auth_strategy: ObservabilityPipelineHttpClientSourceAuthStrategy, optional + :param custom_key: Name of the environment variable or secret that holds a custom header value (used with custom auth strategies). + :type custom_key: str, optional + :param decoding: The decoding format used to interpret incoming logs. :type decoding: ObservabilityPipelineDecoding + :param endpoint_url_key: Name of the environment variable or secret that holds the HTTP endpoint URL to scrape. + :type endpoint_url_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str + :param password_key: Name of the environment variable or secret that holds the password (used when ``auth_strategy`` is ``basic`` ). + :type password_key: str, optional + :param scrape_interval_secs: The interval (in seconds) between HTTP scrape requests. :type scrape_interval_secs: int, optional @@ -90,17 +114,33 @@ def __init__( :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. :type tls: ObservabilityPipelineTls, optional + :param token_key: Name of the environment variable or secret that holds the bearer token (used when ``auth_strategy`` is ``bearer`` ). + :type token_key: str, optional + :param type: The source type. The value should always be ``http_client``. :type type: ObservabilityPipelineHttpClientSourceType + + :param username_key: Name of the environment variable or secret that holds the username (used when ``auth_strategy`` is ``basic`` ). + :type username_key: str, optional """ if auth_strategy is not unset: kwargs["auth_strategy"] = auth_strategy + if custom_key is not unset: + kwargs["custom_key"] = custom_key + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key + if password_key is not unset: + kwargs["password_key"] = password_key if scrape_interval_secs is not unset: kwargs["scrape_interval_secs"] = scrape_interval_secs if scrape_timeout_secs is not unset: kwargs["scrape_timeout_secs"] = scrape_timeout_secs if tls is not unset: kwargs["tls"] = tls + if token_key is not unset: + kwargs["token_key"] = token_key + if username_key is not unset: + kwargs["username_key"] = username_key super().__init__(kwargs) self_.decoding = decoding diff --git a/src/datadog_api_client/v2/model/observability_pipeline_http_server_source.py b/src/datadog_api_client/v2/model/observability_pipeline_http_server_source.py index c1cc317bc8..98bd75c057 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_http_server_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_http_server_source.py @@ -37,19 +37,27 @@ def openapi_types(_): ) return { + "address_key": (str,), "auth_strategy": (ObservabilityPipelineHttpServerSourceAuthStrategy,), + "custom_key": (str,), "decoding": (ObservabilityPipelineDecoding,), "id": (str,), + "password_key": (str,), "tls": (ObservabilityPipelineTls,), "type": (ObservabilityPipelineHttpServerSourceType,), + "username_key": (str,), } attribute_map = { + "address_key": "address_key", "auth_strategy": "auth_strategy", + "custom_key": "custom_key", "decoding": "decoding", "id": "id", + "password_key": "password_key", "tls": "tls", "type": "type", + "username_key": "username_key", } def __init__( @@ -58,7 +66,11 @@ def __init__( decoding: ObservabilityPipelineDecoding, id: str, type: ObservabilityPipelineHttpServerSourceType, + address_key: Union[str, UnsetType] = unset, + custom_key: Union[str, UnsetType] = unset, + password_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, + username_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -66,23 +78,43 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the HTTP server. + :type address_key: str, optional + :param auth_strategy: HTTP authentication method. :type auth_strategy: ObservabilityPipelineHttpServerSourceAuthStrategy + :param custom_key: Name of the environment variable or secret that holds a custom header value (used with custom auth strategies). + :type custom_key: str, optional + :param decoding: The decoding format used to interpret incoming logs. :type decoding: ObservabilityPipelineDecoding :param id: Unique ID for the HTTP server source. :type id: str + :param password_key: Name of the environment variable or secret that holds the password (used when ``auth_strategy`` is ``plain`` ). + :type password_key: str, optional + :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. :type tls: ObservabilityPipelineTls, optional :param type: The source type. The value should always be ``http_server``. :type type: ObservabilityPipelineHttpServerSourceType + + :param username_key: Name of the environment variable or secret that holds the username (used when ``auth_strategy`` is ``plain`` ). + :type username_key: str, optional """ + if address_key is not unset: + kwargs["address_key"] = address_key + if custom_key is not unset: + kwargs["custom_key"] = custom_key + if password_key is not unset: + kwargs["password_key"] = password_key if tls is not unset: kwargs["tls"] = tls + if username_key is not unset: + kwargs["username_key"] = username_key super().__init__(kwargs) self_.auth_strategy = auth_strategy diff --git a/src/datadog_api_client/v2/model/observability_pipeline_kafka_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_kafka_destination.py index 2436d1cfde..123a158197 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_kafka_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_kafka_destination.py @@ -65,6 +65,7 @@ def openapi_types(_): ) return { + "bootstrap_servers_key": (str,), "compression": (ObservabilityPipelineKafkaDestinationCompression,), "encoding": (ObservabilityPipelineKafkaDestinationEncoding,), "headers_key": (str,), @@ -83,6 +84,7 @@ def openapi_types(_): } attribute_map = { + "bootstrap_servers_key": "bootstrap_servers_key", "compression": "compression", "encoding": "encoding", "headers_key": "headers_key", @@ -107,6 +109,7 @@ def __init__( inputs: List[str], topic: str, type: ObservabilityPipelineKafkaDestinationType, + bootstrap_servers_key: Union[str, UnsetType] = unset, compression: Union[ObservabilityPipelineKafkaDestinationCompression, UnsetType] = unset, headers_key: Union[str, UnsetType] = unset, key_field: Union[str, UnsetType] = unset, @@ -124,6 +127,9 @@ def __init__( **Supported pipeline types:** logs + :param bootstrap_servers_key: Name of the environment variable or secret that holds the Kafka bootstrap servers list. + :type bootstrap_servers_key: str, optional + :param compression: Compression codec for Kafka messages. :type compression: ObservabilityPipelineKafkaDestinationCompression, optional @@ -169,6 +175,8 @@ def __init__( :param type: The destination type. The value should always be ``kafka``. :type type: ObservabilityPipelineKafkaDestinationType """ + if bootstrap_servers_key is not unset: + kwargs["bootstrap_servers_key"] = bootstrap_servers_key if compression is not unset: kwargs["compression"] = compression if headers_key is not unset: diff --git a/src/datadog_api_client/v2/model/observability_pipeline_kafka_sasl.py b/src/datadog_api_client/v2/model/observability_pipeline_kafka_sasl.py index e6d42bc1c8..eb4d9940ce 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_kafka_sasl.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_kafka_sasl.py @@ -28,19 +28,39 @@ def openapi_types(_): return { "mechanism": (ObservabilityPipelineKafkaSaslMechanism,), + "password_key": (str,), + "username_key": (str,), } attribute_map = { "mechanism": "mechanism", + "password_key": "password_key", + "username_key": "username_key", } - def __init__(self_, mechanism: Union[ObservabilityPipelineKafkaSaslMechanism, UnsetType] = unset, **kwargs): + def __init__( + self_, + mechanism: Union[ObservabilityPipelineKafkaSaslMechanism, UnsetType] = unset, + password_key: Union[str, UnsetType] = unset, + username_key: Union[str, UnsetType] = unset, + **kwargs, + ): """ Specifies the SASL mechanism for authenticating with a Kafka cluster. :param mechanism: SASL mechanism used for Kafka authentication. :type mechanism: ObservabilityPipelineKafkaSaslMechanism, optional + + :param password_key: Name of the environment variable or secret that holds the SASL password. + :type password_key: str, optional + + :param username_key: Name of the environment variable or secret that holds the SASL username. + :type username_key: str, optional """ if mechanism is not unset: kwargs["mechanism"] = mechanism + if password_key is not unset: + kwargs["password_key"] = password_key + if username_key is not unset: + kwargs["username_key"] = username_key super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_kafka_source.py b/src/datadog_api_client/v2/model/observability_pipeline_kafka_source.py index acbc81f60e..4f34ff1ffd 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_kafka_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_kafka_source.py @@ -37,6 +37,7 @@ def openapi_types(_): ) return { + "bootstrap_servers_key": (str,), "group_id": (str,), "id": (str,), "librdkafka_options": ([ObservabilityPipelineKafkaLibrdkafkaOption],), @@ -47,6 +48,7 @@ def openapi_types(_): } attribute_map = { + "bootstrap_servers_key": "bootstrap_servers_key", "group_id": "group_id", "id": "id", "librdkafka_options": "librdkafka_options", @@ -62,6 +64,7 @@ def __init__( id: str, topics: List[str], type: ObservabilityPipelineKafkaSourceType, + bootstrap_servers_key: Union[str, UnsetType] = unset, librdkafka_options: Union[List[ObservabilityPipelineKafkaLibrdkafkaOption], UnsetType] = unset, sasl: Union[ObservabilityPipelineKafkaSasl, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, @@ -72,6 +75,9 @@ def __init__( **Supported pipeline types:** logs + :param bootstrap_servers_key: Name of the environment variable or secret that holds the Kafka bootstrap servers list. + :type bootstrap_servers_key: str, optional + :param group_id: Consumer group ID used by the Kafka client. :type group_id: str @@ -93,6 +99,8 @@ def __init__( :param type: The source type. The value should always be ``kafka``. :type type: ObservabilityPipelineKafkaSourceType """ + if bootstrap_servers_key is not unset: + kwargs["bootstrap_servers_key"] = bootstrap_servers_key if librdkafka_options is not unset: kwargs["librdkafka_options"] = librdkafka_options if sasl is not unset: diff --git a/src/datadog_api_client/v2/model/observability_pipeline_logstash_source.py b/src/datadog_api_client/v2/model/observability_pipeline_logstash_source.py index b0edbf9ba8..22707698ee 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_logstash_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_logstash_source.py @@ -29,12 +29,14 @@ def openapi_types(_): ) return { + "address_key": (str,), "id": (str,), "tls": (ObservabilityPipelineTls,), "type": (ObservabilityPipelineLogstashSourceType,), } attribute_map = { + "address_key": "address_key", "id": "id", "tls": "tls", "type": "type", @@ -44,6 +46,7 @@ def __init__( self_, id: str, type: ObservabilityPipelineLogstashSourceType, + address_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): @@ -52,6 +55,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the Logstash receiver. + :type address_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str @@ -61,6 +67,8 @@ def __init__( :param type: The source type. The value should always be ``logstash``. :type type: ObservabilityPipelineLogstashSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key if tls is not unset: kwargs["tls"] = tls super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_new_relic_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_new_relic_destination.py index 9c2771a511..27c005989a 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_new_relic_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_new_relic_destination.py @@ -44,17 +44,21 @@ def openapi_types(_): ) return { + "account_id_key": (str,), "buffer": (ObservabilityPipelineBufferOptions,), "id": (str,), "inputs": ([str],), + "license_key_key": (str,), "region": (ObservabilityPipelineNewRelicDestinationRegion,), "type": (ObservabilityPipelineNewRelicDestinationType,), } attribute_map = { + "account_id_key": "account_id_key", "buffer": "buffer", "id": "id", "inputs": "inputs", + "license_key_key": "license_key_key", "region": "region", "type": "type", } @@ -65,6 +69,7 @@ def __init__( inputs: List[str], region: ObservabilityPipelineNewRelicDestinationRegion, type: ObservabilityPipelineNewRelicDestinationType, + account_id_key: Union[str, UnsetType] = unset, buffer: Union[ ObservabilityPipelineBufferOptions, ObservabilityPipelineDiskBufferOptions, @@ -72,6 +77,7 @@ def __init__( ObservabilityPipelineMemoryBufferSizeOptions, UnsetType, ] = unset, + license_key_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -79,6 +85,9 @@ def __init__( **Supported pipeline types:** logs + :param account_id_key: Name of the environment variable or secret that holds the New Relic account ID. + :type account_id_key: str, optional + :param buffer: Configuration for buffer settings on destination components. :type buffer: ObservabilityPipelineBufferOptions, optional @@ -88,14 +97,21 @@ def __init__( :param inputs: A list of component IDs whose output is used as the ``input`` for this component. :type inputs: [str] + :param license_key_key: Name of the environment variable or secret that holds the New Relic license key. + :type license_key_key: str, optional + :param region: The New Relic region. :type region: ObservabilityPipelineNewRelicDestinationRegion :param type: The destination type. The value should always be ``new_relic``. :type type: ObservabilityPipelineNewRelicDestinationType """ + if account_id_key is not unset: + kwargs["account_id_key"] = account_id_key if buffer is not unset: kwargs["buffer"] = buffer + if license_key_key is not unset: + kwargs["license_key_key"] = license_key_key super().__init__(kwargs) self_.id = id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_open_search_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_open_search_destination.py index db281d0aea..f2ceb62e43 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_open_search_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_open_search_destination.py @@ -14,6 +14,9 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_auth import ( + ObservabilityPipelineElasticsearchDestinationAuth, + ) 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, @@ -35,6 +38,9 @@ class ObservabilityPipelineOpenSearchDestination(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_auth import ( + ObservabilityPipelineElasticsearchDestinationAuth, + ) 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, @@ -44,18 +50,22 @@ def openapi_types(_): ) return { + "auth": (ObservabilityPipelineElasticsearchDestinationAuth,), "buffer": (ObservabilityPipelineBufferOptions,), "bulk_index": (str,), "data_stream": (ObservabilityPipelineOpenSearchDestinationDataStream,), + "endpoint_url_key": (str,), "id": (str,), "inputs": ([str],), "type": (ObservabilityPipelineOpenSearchDestinationType,), } attribute_map = { + "auth": "auth", "buffer": "buffer", "bulk_index": "bulk_index", "data_stream": "data_stream", + "endpoint_url_key": "endpoint_url_key", "id": "id", "inputs": "inputs", "type": "type", @@ -66,6 +76,7 @@ def __init__( id: str, inputs: List[str], type: ObservabilityPipelineOpenSearchDestinationType, + auth: Union[ObservabilityPipelineElasticsearchDestinationAuth, UnsetType] = unset, buffer: Union[ ObservabilityPipelineBufferOptions, ObservabilityPipelineDiskBufferOptions, @@ -75,6 +86,7 @@ def __init__( ] = unset, bulk_index: Union[str, UnsetType] = unset, data_stream: Union[ObservabilityPipelineOpenSearchDestinationDataStream, UnsetType] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -82,6 +94,10 @@ def __init__( **Supported pipeline types:** logs + :param auth: Authentication settings for the Elasticsearch destination. + When ``strategy`` is ``basic`` , use ``username_key`` and ``password_key`` to reference credentials stored in environment variables or secrets. + :type auth: ObservabilityPipelineElasticsearchDestinationAuth, optional + :param buffer: Configuration for buffer settings on destination components. :type buffer: ObservabilityPipelineBufferOptions, optional @@ -91,6 +107,9 @@ def __init__( :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 OpenSearch endpoint URL. + :type endpoint_url_key: str, optional + :param id: The unique identifier for this component. :type id: str @@ -100,12 +119,16 @@ def __init__( :param type: The destination type. The value should always be ``opensearch``. :type type: ObservabilityPipelineOpenSearchDestinationType """ + 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_.id = id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_rsyslog_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_rsyslog_destination.py index 865250f8ea..089169b726 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_rsyslog_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_rsyslog_destination.py @@ -47,6 +47,7 @@ def openapi_types(_): return { "buffer": (ObservabilityPipelineBufferOptions,), + "endpoint_url_key": (str,), "id": (str,), "inputs": ([str],), "keepalive": (int,), @@ -56,6 +57,7 @@ def openapi_types(_): attribute_map = { "buffer": "buffer", + "endpoint_url_key": "endpoint_url_key", "id": "id", "inputs": "inputs", "keepalive": "keepalive", @@ -75,6 +77,7 @@ def __init__( ObservabilityPipelineMemoryBufferSizeOptions, UnsetType, ] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, keepalive: Union[int, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, @@ -87,6 +90,9 @@ def __init__( :param buffer: Configuration for buffer settings on destination components. :type buffer: ObservabilityPipelineBufferOptions, optional + :param endpoint_url_key: Name of the environment variable or secret that holds the syslog server endpoint URL. + :type endpoint_url_key: str, optional + :param id: The unique identifier for this component. :type id: str @@ -104,6 +110,8 @@ def __init__( """ if buffer is not unset: kwargs["buffer"] = buffer + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key if keepalive is not unset: kwargs["keepalive"] = keepalive if tls is not unset: diff --git a/src/datadog_api_client/v2/model/observability_pipeline_rsyslog_source.py b/src/datadog_api_client/v2/model/observability_pipeline_rsyslog_source.py index 7a490c05ea..85bd6df89d 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_rsyslog_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_rsyslog_source.py @@ -35,6 +35,7 @@ def openapi_types(_): ) return { + "address_key": (str,), "id": (str,), "mode": (ObservabilityPipelineSyslogSourceMode,), "tls": (ObservabilityPipelineTls,), @@ -42,6 +43,7 @@ def openapi_types(_): } attribute_map = { + "address_key": "address_key", "id": "id", "mode": "mode", "tls": "tls", @@ -53,6 +55,7 @@ def __init__( id: str, mode: ObservabilityPipelineSyslogSourceMode, type: ObservabilityPipelineRsyslogSourceType, + address_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): @@ -61,6 +64,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the syslog receiver. + :type address_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str @@ -73,6 +79,8 @@ def __init__( :param type: The source type. The value should always be ``rsyslog``. :type type: ObservabilityPipelineRsyslogSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key if tls is not unset: kwargs["tls"] = tls super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_sentinel_one_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_sentinel_one_destination.py index dcf38467f2..7836cc225a 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_sentinel_one_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_sentinel_one_destination.py @@ -48,6 +48,7 @@ def openapi_types(_): "id": (str,), "inputs": ([str],), "region": (ObservabilityPipelineSentinelOneDestinationRegion,), + "token_key": (str,), "type": (ObservabilityPipelineSentinelOneDestinationType,), } @@ -56,6 +57,7 @@ def openapi_types(_): "id": "id", "inputs": "inputs", "region": "region", + "token_key": "token_key", "type": "type", } @@ -72,6 +74,7 @@ def __init__( ObservabilityPipelineMemoryBufferSizeOptions, UnsetType, ] = unset, + token_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -91,11 +94,16 @@ def __init__( :param region: The SentinelOne region to send logs to. :type region: ObservabilityPipelineSentinelOneDestinationRegion + :param token_key: Name of the environment variable or secret that holds the SentinelOne API token. + :type token_key: str, optional + :param type: The destination type. The value should always be ``sentinel_one``. :type type: ObservabilityPipelineSentinelOneDestinationType """ if buffer is not unset: kwargs["buffer"] = buffer + if token_key is not unset: + kwargs["token_key"] = token_key super().__init__(kwargs) self_.id = id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_socket_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_socket_destination.py index a6436d06d7..419a348a7d 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_socket_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_socket_destination.py @@ -67,6 +67,7 @@ def openapi_types(_): ) return { + "address_key": (str,), "buffer": (ObservabilityPipelineBufferOptions,), "encoding": (ObservabilityPipelineSocketDestinationEncoding,), "framing": (ObservabilityPipelineSocketDestinationFraming,), @@ -78,6 +79,7 @@ def openapi_types(_): } attribute_map = { + "address_key": "address_key", "buffer": "buffer", "encoding": "encoding", "framing": "framing", @@ -101,6 +103,7 @@ def __init__( inputs: List[str], mode: ObservabilityPipelineSocketDestinationMode, type: ObservabilityPipelineSocketDestinationType, + address_key: Union[str, UnsetType] = unset, buffer: Union[ ObservabilityPipelineBufferOptions, ObservabilityPipelineDiskBufferOptions, @@ -116,6 +119,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the socket address (host:port). + :type address_key: str, optional + :param buffer: Configuration for buffer settings on destination components. :type buffer: ObservabilityPipelineBufferOptions, optional @@ -140,6 +146,8 @@ def __init__( :param type: The destination type. The value should always be ``socket``. :type type: ObservabilityPipelineSocketDestinationType """ + if address_key is not unset: + kwargs["address_key"] = address_key if buffer is not unset: kwargs["buffer"] = buffer if tls is not unset: diff --git a/src/datadog_api_client/v2/model/observability_pipeline_socket_source.py b/src/datadog_api_client/v2/model/observability_pipeline_socket_source.py index cc981a064b..d4435abcab 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_socket_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_socket_source.py @@ -56,6 +56,7 @@ def openapi_types(_): ) return { + "address_key": (str,), "framing": (ObservabilityPipelineSocketSourceFraming,), "id": (str,), "mode": (ObservabilityPipelineSocketSourceMode,), @@ -64,6 +65,7 @@ def openapi_types(_): } attribute_map = { + "address_key": "address_key", "framing": "framing", "id": "id", "mode": "mode", @@ -84,6 +86,7 @@ def __init__( id: str, mode: ObservabilityPipelineSocketSourceMode, type: ObservabilityPipelineSocketSourceType, + address_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): @@ -92,6 +95,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the socket. + :type address_key: str, optional + :param framing: Framing method configuration for the socket source. :type framing: ObservabilityPipelineSocketSourceFraming @@ -107,6 +113,8 @@ def __init__( :param type: The source type. The value should always be ``socket``. :type type: ObservabilityPipelineSocketSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key if tls is not unset: kwargs["tls"] = tls super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_destination.py index 6d9a680ded..ab381977ff 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_destination.py @@ -47,10 +47,12 @@ def openapi_types(_): "auto_extract_timestamp": (bool,), "buffer": (ObservabilityPipelineBufferOptions,), "encoding": (ObservabilityPipelineSplunkHecDestinationEncoding,), + "endpoint_url_key": (str,), "id": (str,), "index": (str,), "inputs": ([str],), "sourcetype": (str,), + "token_key": (str,), "type": (ObservabilityPipelineSplunkHecDestinationType,), } @@ -58,10 +60,12 @@ def openapi_types(_): "auto_extract_timestamp": "auto_extract_timestamp", "buffer": "buffer", "encoding": "encoding", + "endpoint_url_key": "endpoint_url_key", "id": "id", "index": "index", "inputs": "inputs", "sourcetype": "sourcetype", + "token_key": "token_key", "type": "type", } @@ -79,8 +83,10 @@ def __init__( UnsetType, ] = unset, encoding: Union[ObservabilityPipelineSplunkHecDestinationEncoding, UnsetType] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, index: Union[str, UnsetType] = unset, sourcetype: Union[str, UnsetType] = unset, + token_key: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -98,6 +104,9 @@ def __init__( :param encoding: Encoding format for log events. :type encoding: ObservabilityPipelineSplunkHecDestinationEncoding, optional + :param endpoint_url_key: Name of the environment variable or secret that holds the Splunk HEC endpoint URL. + :type endpoint_url_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str @@ -110,6 +119,9 @@ def __init__( :param sourcetype: The Splunk sourcetype to assign to log events. :type sourcetype: str, optional + :param token_key: Name of the environment variable or secret that holds the Splunk HEC token. + :type token_key: str, optional + :param type: The destination type. Always ``splunk_hec``. :type type: ObservabilityPipelineSplunkHecDestinationType """ @@ -119,10 +131,14 @@ def __init__( kwargs["buffer"] = buffer if encoding is not unset: kwargs["encoding"] = encoding + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key if index is not unset: kwargs["index"] = index if sourcetype is not unset: kwargs["sourcetype"] = sourcetype + if token_key is not unset: + kwargs["token_key"] = token_key super().__init__(kwargs) self_.id = id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_source.py b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_source.py index b1b36b9993..dfb3bbad61 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_splunk_hec_source.py @@ -29,12 +29,14 @@ def openapi_types(_): ) return { + "address_key": (str,), "id": (str,), "tls": (ObservabilityPipelineTls,), "type": (ObservabilityPipelineSplunkHecSourceType,), } attribute_map = { + "address_key": "address_key", "id": "id", "tls": "tls", "type": "type", @@ -44,6 +46,7 @@ def __init__( self_, id: str, type: ObservabilityPipelineSplunkHecSourceType, + address_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): @@ -52,6 +55,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the HEC API. + :type address_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str @@ -61,6 +67,8 @@ def __init__( :param type: The source type. Always ``splunk_hec``. :type type: ObservabilityPipelineSplunkHecSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key if tls is not unset: kwargs["tls"] = tls super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_splunk_tcp_source.py b/src/datadog_api_client/v2/model/observability_pipeline_splunk_tcp_source.py index af2787cb1b..7df327c089 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_splunk_tcp_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_splunk_tcp_source.py @@ -29,12 +29,14 @@ def openapi_types(_): ) return { + "address_key": (str,), "id": (str,), "tls": (ObservabilityPipelineTls,), "type": (ObservabilityPipelineSplunkTcpSourceType,), } attribute_map = { + "address_key": "address_key", "id": "id", "tls": "tls", "type": "type", @@ -44,6 +46,7 @@ def __init__( self_, id: str, type: ObservabilityPipelineSplunkTcpSourceType, + address_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): @@ -53,6 +56,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the Splunk TCP receiver. + :type address_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str @@ -62,6 +68,8 @@ def __init__( :param type: The source type. Always ``splunk_tcp``. :type type: ObservabilityPipelineSplunkTcpSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key if tls is not unset: kwargs["tls"] = tls super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_sumo_logic_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_sumo_logic_destination.py index 18be3a45fe..46787c469c 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_sumo_logic_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_sumo_logic_destination.py @@ -52,6 +52,7 @@ def openapi_types(_): return { "buffer": (ObservabilityPipelineBufferOptions,), "encoding": (ObservabilityPipelineSumoLogicDestinationEncoding,), + "endpoint_url_key": (str,), "header_custom_fields": ([ObservabilityPipelineSumoLogicDestinationHeaderCustomFieldsItem],), "header_host_name": (str,), "header_source_category": (str,), @@ -64,6 +65,7 @@ def openapi_types(_): attribute_map = { "buffer": "buffer", "encoding": "encoding", + "endpoint_url_key": "endpoint_url_key", "header_custom_fields": "header_custom_fields", "header_host_name": "header_host_name", "header_source_category": "header_source_category", @@ -86,6 +88,7 @@ def __init__( UnsetType, ] = unset, encoding: Union[ObservabilityPipelineSumoLogicDestinationEncoding, UnsetType] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, header_custom_fields: Union[ List[ObservabilityPipelineSumoLogicDestinationHeaderCustomFieldsItem], UnsetType ] = unset, @@ -105,6 +108,9 @@ def __init__( :param encoding: The output encoding format. :type encoding: ObservabilityPipelineSumoLogicDestinationEncoding, optional + :param endpoint_url_key: Name of the environment variable or secret that holds the Sumo Logic HTTP endpoint URL. + :type endpoint_url_key: str, optional + :param header_custom_fields: A list of custom headers to include in the request to Sumo Logic. :type header_custom_fields: [ObservabilityPipelineSumoLogicDestinationHeaderCustomFieldsItem], optional @@ -130,6 +136,8 @@ def __init__( kwargs["buffer"] = buffer if encoding is not unset: kwargs["encoding"] = encoding + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key if header_custom_fields is not unset: kwargs["header_custom_fields"] = header_custom_fields if header_host_name is not unset: diff --git a/src/datadog_api_client/v2/model/observability_pipeline_sumo_logic_source.py b/src/datadog_api_client/v2/model/observability_pipeline_sumo_logic_source.py index 78dee8b563..4e5a0acd18 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_sumo_logic_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_sumo_logic_source.py @@ -3,11 +3,13 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import TYPE_CHECKING +from typing import Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, cached_property, + unset, + UnsetType, ) @@ -25,27 +27,40 @@ def openapi_types(_): ) return { + "address_key": (str,), "id": (str,), "type": (ObservabilityPipelineSumoLogicSourceType,), } attribute_map = { + "address_key": "address_key", "id": "id", "type": "type", } - def __init__(self_, id: str, type: ObservabilityPipelineSumoLogicSourceType, **kwargs): + def __init__( + self_, + id: str, + type: ObservabilityPipelineSumoLogicSourceType, + address_key: Union[str, UnsetType] = unset, + **kwargs, + ): """ The ``sumo_logic`` source receives logs from Sumo Logic collectors. **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the Sumo Logic receiver. + :type address_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str :param type: The source type. The value should always be ``sumo_logic``. :type type: ObservabilityPipelineSumoLogicSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key super().__init__(kwargs) self_.id = id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_syslog_ng_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_syslog_ng_destination.py index 1e73d9bc44..90fef39d6e 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_syslog_ng_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_syslog_ng_destination.py @@ -47,6 +47,7 @@ def openapi_types(_): return { "buffer": (ObservabilityPipelineBufferOptions,), + "endpoint_url_key": (str,), "id": (str,), "inputs": ([str],), "keepalive": (int,), @@ -56,6 +57,7 @@ def openapi_types(_): attribute_map = { "buffer": "buffer", + "endpoint_url_key": "endpoint_url_key", "id": "id", "inputs": "inputs", "keepalive": "keepalive", @@ -75,6 +77,7 @@ def __init__( ObservabilityPipelineMemoryBufferSizeOptions, UnsetType, ] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, keepalive: Union[int, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, @@ -87,6 +90,9 @@ def __init__( :param buffer: Configuration for buffer settings on destination components. :type buffer: ObservabilityPipelineBufferOptions, optional + :param endpoint_url_key: Name of the environment variable or secret that holds the syslog-ng server endpoint URL. + :type endpoint_url_key: str, optional + :param id: The unique identifier for this component. :type id: str @@ -104,6 +110,8 @@ def __init__( """ if buffer is not unset: kwargs["buffer"] = buffer + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key if keepalive is not unset: kwargs["keepalive"] = keepalive if tls is not unset: diff --git a/src/datadog_api_client/v2/model/observability_pipeline_syslog_ng_source.py b/src/datadog_api_client/v2/model/observability_pipeline_syslog_ng_source.py index 607791b358..92cfc7f4bd 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_syslog_ng_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_syslog_ng_source.py @@ -35,6 +35,7 @@ def openapi_types(_): ) return { + "address_key": (str,), "id": (str,), "mode": (ObservabilityPipelineSyslogSourceMode,), "tls": (ObservabilityPipelineTls,), @@ -42,6 +43,7 @@ def openapi_types(_): } attribute_map = { + "address_key": "address_key", "id": "id", "mode": "mode", "tls": "tls", @@ -53,6 +55,7 @@ def __init__( id: str, mode: ObservabilityPipelineSyslogSourceMode, type: ObservabilityPipelineSyslogNgSourceType, + address_key: Union[str, UnsetType] = unset, tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): @@ -61,6 +64,9 @@ def __init__( **Supported pipeline types:** logs + :param address_key: Name of the environment variable or secret that holds the listen address for the syslog-ng receiver. + :type address_key: str, optional + :param id: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the ``input`` to downstream components). :type id: str @@ -73,6 +79,8 @@ def __init__( :param type: The source type. The value should always be ``syslog_ng``. :type type: ObservabilityPipelineSyslogNgSourceType """ + if address_key is not unset: + kwargs["address_key"] = address_key if tls is not unset: kwargs["tls"] = tls super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_tls.py b/src/datadog_api_client/v2/model/observability_pipeline_tls.py index 0560611b9d..081c0fe883 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_tls.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_tls.py @@ -20,16 +20,23 @@ def openapi_types(_): "ca_file": (str,), "crt_file": (str,), "key_file": (str,), + "key_pass_key": (str,), } attribute_map = { "ca_file": "ca_file", "crt_file": "crt_file", "key_file": "key_file", + "key_pass_key": "key_pass_key", } def __init__( - self_, crt_file: str, ca_file: Union[str, UnsetType] = unset, key_file: Union[str, UnsetType] = unset, **kwargs + self_, + crt_file: str, + ca_file: Union[str, UnsetType] = unset, + key_file: Union[str, UnsetType] = unset, + key_pass_key: Union[str, UnsetType] = unset, + **kwargs, ): """ Configuration for enabling TLS encryption between the pipeline component and external services. @@ -42,11 +49,16 @@ def __init__( :param key_file: Path to the private key file associated with the TLS client certificate. Used for mutual TLS authentication. :type key_file: str, optional + + :param key_pass_key: Name of the environment variable or secret that holds the passphrase for the private key file. + :type key_pass_key: str, optional """ if ca_file is not unset: kwargs["ca_file"] = ca_file if key_file is not unset: kwargs["key_file"] = key_file + if key_pass_key is not unset: + kwargs["key_pass_key"] = key_pass_key super().__init__(kwargs) self_.crt_file = crt_file diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index b3c37091fc..14c48b1801 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -3406,6 +3406,9 @@ from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_api_version import ( ObservabilityPipelineElasticsearchDestinationApiVersion, ) +from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_auth import ( + ObservabilityPipelineElasticsearchDestinationAuth, +) from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream import ( ObservabilityPipelineElasticsearchDestinationDataStream, ) @@ -8705,6 +8708,7 @@ "ObservabilityPipelineDiskBufferOptions", "ObservabilityPipelineElasticsearchDestination", "ObservabilityPipelineElasticsearchDestinationApiVersion", + "ObservabilityPipelineElasticsearchDestinationAuth", "ObservabilityPipelineElasticsearchDestinationDataStream", "ObservabilityPipelineElasticsearchDestinationType", "ObservabilityPipelineEnrichmentTableFile", diff --git a/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_destination_secret_key_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_destination_secret_key_returns_ok_response.frozen new file mode 100644 index 0000000000..ef9137f979 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_destination_secret_key_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-02-20T14:42:05.988Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_destination_secret_key_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_destination_secret_key_returns_ok_response.yaml new file mode 100644 index 0000000000..8c18c824e7 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_destination_secret_key_returns_ok_response.yaml @@ -0,0 +1,23 @@ +interactions: +- request: + body: '{"data":{"attributes":{"config":{"destinations":[{"endpoint_url_key":"SUMO_LOGIC_ENDPOINT_URL","id":"sumo-logic-destination","inputs":["my-processor-group"],"type":"sumo_logic"}],"processor_groups":[{"enabled":true,"id":"my-processor-group","include":"service:my-service","inputs":["datadog-agent-source"],"processors":[{"enabled":true,"id":"filter-processor","include":"status:error","type":"filter"}]}],"sources":[{"id":"datadog-agent-source","type":"datadog_agent"}]},"name":"Pipeline + with Secret Key"},"type":"pipelines"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/obs-pipelines/pipelines/validate + response: + body: + string: '{"errors":[]} + + ' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_source_secret_key_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_source_secret_key_returns_ok_response.frozen new file mode 100644 index 0000000000..5e68c128ac --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_source_secret_key_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-02-20T14:42:32.372Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_source_secret_key_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_source_secret_key_returns_ok_response.yaml new file mode 100644 index 0000000000..c37ef30546 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_validate_an_observability_pipeline_with_source_secret_key_returns_ok_response.yaml @@ -0,0 +1,23 @@ +interactions: +- request: + body: '{"data":{"attributes":{"config":{"destinations":[{"id":"datadog-logs-destination","inputs":["my-processor-group"],"type":"datadog_logs"}],"processor_groups":[{"enabled":true,"id":"my-processor-group","include":"service:my-service","inputs":["http-client-source"],"processors":[{"enabled":true,"id":"filter-processor","include":"status:error","type":"filter"}]}],"sources":[{"auth_strategy":"bearer","decoding":"bytes","id":"http-client-source","scrape_interval_secs":15,"scrape_timeout_secs":5,"token_key":"HTTP_CLIENT_TOKEN","type":"http_client"}]},"name":"Pipeline + with Source Secret"},"type":"pipelines"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/obs-pipelines/pipelines/validate + response: + body: + string: '{"errors":[]} + + ' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/features/observability_pipelines.feature b/tests/v2/features/observability_pipelines.feature index b5c6857680..bf90c06c13 100644 --- a/tests/v2/features/observability_pipelines.feature +++ b/tests/v2/features/observability_pipelines.feature @@ -190,3 +190,19 @@ Feature: Observability Pipelines When the request is sent Then the response status is 200 OK And the response "errors" has length 0 + + @team:DataDog/observability-pipelines + Scenario: Validate an observability pipeline with destination secret key returns "OK" response + Given new "ValidatePipeline" request + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "sumo-logic-destination", "inputs": ["my-processor-group"], "type": "sumo_logic", "endpoint_url_key": "SUMO_LOGIC_ENDPOINT_URL"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Pipeline with Secret Key"}, "type": "pipelines"}} + When the request is sent + Then the response status is 200 OK + And the response "errors" has length 0 + + @team:DataDog/observability-pipelines + Scenario: Validate an observability pipeline with source secret key returns "OK" response + Given new "ValidatePipeline" request + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["http-client-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "http-client-source", "type": "http_client", "decoding": "bytes", "scrape_interval_secs": 15, "scrape_timeout_secs": 5, "auth_strategy": "bearer", "token_key": "HTTP_CLIENT_TOKEN"}]}, "name": "Pipeline with Source Secret"}, "type": "pipelines"}} + When the request is sent + Then the response status is 200 OK + And the response "errors" has length 0