diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index cfbcb7286ac..4e55e3eb280 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -75465,6 +75465,222 @@ paths: summary: Get all aggregated DNS traffic tags: - Cloud Network Monitoring + /api/v2/obs-pipelines/pipelines: + get: + description: Retrieve a list of pipelines. + operationId: ListPipelines + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListPipelinesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List pipelines + tags: + - Observability Pipelines + x-permission: + operator: OR + permissions: + - observability_pipelines_read + x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) + to request access.' + post: + description: Create a new pipeline. + operationId: CreatePipeline + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ObservabilityPipelineSpec' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ObservabilityPipeline' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a new pipeline + tags: + - Observability Pipelines + x-permission: + operator: OR + permissions: + - observability_pipelines_deploy + x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) + to request access.' + /api/v2/obs-pipelines/pipelines/validate: + post: + description: 'Validates a pipeline configuration without creating or updating + any resources. + + Returns a list of validation errors, if any.' + operationId: ValidatePipeline + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ObservabilityPipelineSpec' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Validate an observability pipeline + tags: + - Observability Pipelines + x-permission: + operator: OR + permissions: + - observability_pipelines_read + x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) + to request access.' + /api/v2/obs-pipelines/pipelines/{pipeline_id}: + delete: + description: Delete a pipeline. + operationId: DeletePipeline + parameters: + - description: The ID of the pipeline to delete. + in: path + name: pipeline_id + required: true + schema: + type: string + responses: + '204': + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete a pipeline + tags: + - Observability Pipelines + x-permission: + operator: OR + permissions: + - observability_pipelines_delete + x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) + to request access.' + get: + description: Get a specific pipeline by its ID. + operationId: GetPipeline + parameters: + - description: The ID of the pipeline to retrieve. + in: path + name: pipeline_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ObservabilityPipeline' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get a specific pipeline + tags: + - Observability Pipelines + x-permission: + operator: OR + permissions: + - observability_pipelines_read + x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) + to request access.' + put: + description: Update a pipeline. + operationId: UpdatePipeline + parameters: + - description: The ID of the pipeline to update. + in: path + name: pipeline_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ObservabilityPipeline' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ObservabilityPipeline' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update a pipeline + tags: + - Observability Pipelines + x-permission: + operator: OR + permissions: + - observability_pipelines_deploy + x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) + to request access.' /api/v2/on-call/escalation-policies: post: description: Create a new On-Call escalation policy @@ -78650,222 +78866,6 @@ paths: tags: - CSM Threats x-codegen-request-body-name: body - /api/v2/remote_config/products/obs_pipelines/pipelines: - get: - description: Retrieve a list of pipelines. - operationId: ListPipelines - parameters: - - $ref: '#/components/parameters/PageSize' - - $ref: '#/components/parameters/PageNumber' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ListPipelinesResponse' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: List pipelines - tags: - - Observability Pipelines - x-permission: - operator: OR - permissions: - - observability_pipelines_read - x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) - to request access.' - post: - description: Create a new pipeline. - operationId: CreatePipeline - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ObservabilityPipelineSpec' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/ObservabilityPipeline' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '409': - $ref: '#/components/responses/ConflictResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a new pipeline - tags: - - Observability Pipelines - x-permission: - operator: OR - permissions: - - observability_pipelines_deploy - x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) - to request access.' - /api/v2/remote_config/products/obs_pipelines/pipelines/validate: - post: - description: 'Validates a pipeline configuration without creating or updating - any resources. - - Returns a list of validation errors, if any.' - operationId: ValidatePipeline - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ObservabilityPipelineSpec' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationResponse' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Validate an observability pipeline - tags: - - Observability Pipelines - x-permission: - operator: OR - permissions: - - observability_pipelines_read - x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) - to request access.' - /api/v2/remote_config/products/obs_pipelines/pipelines/{pipeline_id}: - delete: - description: Delete a pipeline. - operationId: DeletePipeline - parameters: - - description: The ID of the pipeline to delete. - in: path - name: pipeline_id - required: true - schema: - type: string - responses: - '204': - description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Conflict - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a pipeline - tags: - - Observability Pipelines - x-permission: - operator: OR - permissions: - - observability_pipelines_delete - x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) - to request access.' - get: - description: Get a specific pipeline by its ID. - operationId: GetPipeline - parameters: - - description: The ID of the pipeline to retrieve. - in: path - name: pipeline_id - required: true - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ObservabilityPipeline' - description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a specific pipeline - tags: - - Observability Pipelines - x-permission: - operator: OR - permissions: - - observability_pipelines_read - x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) - to request access.' - put: - description: Update a pipeline. - operationId: UpdatePipeline - parameters: - - description: The ID of the pipeline to update. - in: path - name: pipeline_id - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ObservabilityPipeline' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ObservabilityPipeline' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '409': - $ref: '#/components/responses/ConflictResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a pipeline - tags: - - Observability Pipelines - x-permission: - operator: OR - permissions: - - observability_pipelines_deploy - x-unstable: '**Note**: This endpoint is in Preview. Fill out this [form](https://www.datadoghq.com/product-preview/observability-pipelines-api-and-terraform-support/) - to request access.' /api/v2/restriction_policy/{resource_id}: delete: description: Deletes the restriction policy associated with a specified resource. diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 3a27e10133c..efcdf4c0e82 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2614,6 +2614,26 @@ "tags" => "String", "limit" => "Integer", }, + "v2.ListPipelines" => { + "page_size" => "Integer", + "page_number" => "Integer", + }, + "v2.CreatePipeline" => { + "body" => "ObservabilityPipelineSpec", + }, + "v2.ValidatePipeline" => { + "body" => "ObservabilityPipelineSpec", + }, + "v2.DeletePipeline" => { + "pipeline_id" => "String", + }, + "v2.GetPipeline" => { + "pipeline_id" => "String", + }, + "v2.UpdatePipeline" => { + "pipeline_id" => "String", + "body" => "ObservabilityPipeline", + }, "v2.CreateOnCallEscalationPolicy" => { "include" => "String", "body" => "EscalationPolicyCreateRequest", @@ -2932,26 +2952,6 @@ "agent_rule_id" => "String", "body" => "CloudWorkloadSecurityAgentRuleUpdateRequest", }, - "v2.ListPipelines" => { - "page_size" => "Integer", - "page_number" => "Integer", - }, - "v2.CreatePipeline" => { - "body" => "ObservabilityPipelineSpec", - }, - "v2.ValidatePipeline" => { - "body" => "ObservabilityPipelineSpec", - }, - "v2.DeletePipeline" => { - "pipeline_id" => "String", - }, - "v2.GetPipeline" => { - "pipeline_id" => "String", - }, - "v2.UpdatePipeline" => { - "pipeline_id" => "String", - "body" => "ObservabilityPipeline", - }, "v2.DeleteRestrictionPolicy" => { "resource_id" => "String", }, diff --git a/features/v2/given.json b/features/v2/given.json index 5e9aa4d3b5f..822042252fc 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -743,6 +743,18 @@ "tag": "Monitors", "operationId": "CreateMonitorUserTemplate" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\":{\n \"attributes\":{\n \"config\":{\n \"destinations\":[\n {\n \"id\":\"datadog-logs-destination\",\n \"inputs\":[\n \"processor-group-0\"\n ],\n \"type\":\"datadog_logs\"\n }\n ],\n \"processors\":[\n {\n \"id\":\"processor-group-0\",\n \"include\":\"service:my-service\",\n \"display_name\": \"My Processor Group\",\n \"inputs\":[\n \"datadog-agent-source\"\n ],\n \"enabled\": true,\n \"processors\": [\n {\n \"id\": \"filter-processor\",\n \"type\": \"filter\",\n \"include\": \"status:error\",\n \"display_name\": \"My Filter Processor\",\n \"enabled\": true\n }\n ]\n }\n ],\n \"sources\":[\n {\n \"id\":\"datadog-agent-source\",\n \"type\":\"datadog_agent\"\n }\n ]\n },\n \"name\":\"Main Observability Pipeline\"\n },\n \"type\":\"pipelines\"\n }\n}" + } + ], + "step": "there is a valid \"pipeline\" in the system", + "key": "pipeline", + "tag": "Observability Pipelines", + "operationId": "CreatePipeline" + }, { "parameters": [ { @@ -879,18 +891,6 @@ "tag": "CSM Threats", "operationId": "CreateCSMThreatsAgentPolicy" }, - { - "parameters": [ - { - "name": "body", - "value": "{\n \"data\":{\n \"attributes\":{\n \"config\":{\n \"destinations\":[\n {\n \"id\":\"datadog-logs-destination\",\n \"inputs\":[\n \"processor-group-0\"\n ],\n \"type\":\"datadog_logs\"\n }\n ],\n \"processors\":[\n {\n \"id\":\"processor-group-0\",\n \"include\":\"service:my-service\",\n \"display_name\": \"My Processor Group\",\n \"inputs\":[\n \"datadog-agent-source\"\n ],\n \"enabled\": true,\n \"processors\": [\n {\n \"id\": \"filter-processor\",\n \"type\": \"filter\",\n \"include\": \"status:error\",\n \"display_name\": \"My Filter Processor\",\n \"enabled\": true\n }\n ]\n }\n ],\n \"sources\":[\n {\n \"id\":\"datadog-agent-source\",\n \"type\":\"datadog_agent\"\n }\n ]\n },\n \"name\":\"Main Observability Pipeline\"\n },\n \"type\":\"pipelines\"\n }\n}" - } - ], - "step": "there is a valid \"pipeline\" in the system", - "key": "pipeline", - "tag": "Observability Pipelines", - "operationId": "CreatePipeline" - }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index e0f0b98d0c9..fe00d3c36f6 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2815,6 +2815,49 @@ "type": "safe" } }, + "ListPipelines": { + "tag": "Observability Pipelines", + "undo": { + "type": "safe" + } + }, + "CreatePipeline": { + "tag": "Observability Pipelines", + "undo": { + "operationId": "DeletePipeline", + "parameters": [ + { + "name": "pipeline_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "ValidatePipeline": { + "tag": "Observability Pipelines", + "undo": { + "type": "safe" + } + }, + "DeletePipeline": { + "tag": "Observability Pipelines", + "undo": { + "type": "idempotent" + } + }, + "GetPipeline": { + "tag": "Observability Pipelines", + "undo": { + "type": "safe" + } + }, + "UpdatePipeline": { + "tag": "Observability Pipelines", + "undo": { + "type": "idempotent" + } + }, "CreateOnCallEscalationPolicy": { "tag": "On-Call", "undo": { @@ -3390,49 +3433,6 @@ "type": "idempotent" } }, - "ListPipelines": { - "tag": "Observability Pipelines", - "undo": { - "type": "safe" - } - }, - "CreatePipeline": { - "tag": "Observability Pipelines", - "undo": { - "operationId": "DeletePipeline", - "parameters": [ - { - "name": "pipeline_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "ValidatePipeline": { - "tag": "Observability Pipelines", - "undo": { - "type": "safe" - } - }, - "DeletePipeline": { - "tag": "Observability Pipelines", - "undo": { - "type": "idempotent" - } - }, - "GetPipeline": { - "tag": "Observability Pipelines", - "undo": { - "type": "safe" - } - }, - "UpdatePipeline": { - "tag": "Observability Pipelines", - "undo": { - "type": "idempotent" - } - }, "DeleteRestrictionPolicy": { "tag": "Restriction Policies", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 5afe995637c..8759d712cc7 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -299,6 +299,12 @@ def initialize "v2.update_monitor_user_template": false, "v2.validate_existing_monitor_user_template": false, "v2.validate_monitor_user_template": false, + "v2.create_pipeline": false, + "v2.delete_pipeline": false, + "v2.get_pipeline": false, + "v2.list_pipelines": false, + "v2.update_pipeline": false, + "v2.validate_pipeline": false, "v2.list_role_templates": false, "v2.create_connection": false, "v2.delete_connection": false, @@ -310,12 +316,6 @@ def initialize "v2.query_event_filtered_users": false, "v2.query_users": false, "v2.update_connection": false, - "v2.create_pipeline": false, - "v2.delete_pipeline": false, - "v2.get_pipeline": false, - "v2.list_pipelines": false, - "v2.update_pipeline": false, - "v2.validate_pipeline": false, "v2.create_scorecard_outcomes_batch": false, "v2.create_scorecard_rule": false, "v2.delete_scorecard_rule": false, diff --git a/lib/datadog_api_client/v2/api/observability_pipelines_api.rb b/lib/datadog_api_client/v2/api/observability_pipelines_api.rb index 2bc92617629..8f51a63e529 100644 --- a/lib/datadog_api_client/v2/api/observability_pipelines_api.rb +++ b/lib/datadog_api_client/v2/api/observability_pipelines_api.rb @@ -54,7 +54,7 @@ def create_pipeline_with_http_info(body, opts = {}) fail ArgumentError, "Missing the required parameter 'body' when calling ObservabilityPipelinesAPI.create_pipeline" end # resource path - local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines' + local_var_path = '/api/v2/obs-pipelines/pipelines' # query parameters query_params = opts[:query_params] || {} @@ -127,7 +127,7 @@ def delete_pipeline_with_http_info(pipeline_id, opts = {}) fail ArgumentError, "Missing the required parameter 'pipeline_id' when calling ObservabilityPipelinesAPI.delete_pipeline" end # resource path - local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines/{pipeline_id}'.sub('{pipeline_id}', CGI.escape(pipeline_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/obs-pipelines/pipelines/{pipeline_id}'.sub('{pipeline_id}', CGI.escape(pipeline_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -198,7 +198,7 @@ def get_pipeline_with_http_info(pipeline_id, opts = {}) fail ArgumentError, "Missing the required parameter 'pipeline_id' when calling ObservabilityPipelinesAPI.get_pipeline" end # resource path - local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines/{pipeline_id}'.sub('{pipeline_id}', CGI.escape(pipeline_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/obs-pipelines/pipelines/{pipeline_id}'.sub('{pipeline_id}', CGI.escape(pipeline_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -266,7 +266,7 @@ def list_pipelines_with_http_info(opts = {}) @api_client.config.logger.debug 'Calling API: ObservabilityPipelinesAPI.list_pipelines ...' end # resource path - local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines' + local_var_path = '/api/v2/obs-pipelines/pipelines' # query parameters query_params = opts[:query_params] || {} @@ -344,7 +344,7 @@ def update_pipeline_with_http_info(pipeline_id, body, opts = {}) fail ArgumentError, "Missing the required parameter 'body' when calling ObservabilityPipelinesAPI.update_pipeline" end # resource path - local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines/{pipeline_id}'.sub('{pipeline_id}', CGI.escape(pipeline_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/obs-pipelines/pipelines/{pipeline_id}'.sub('{pipeline_id}', CGI.escape(pipeline_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -418,7 +418,7 @@ def validate_pipeline_with_http_info(body, opts = {}) fail ArgumentError, "Missing the required parameter 'body' when calling ObservabilityPipelinesAPI.validate_pipeline" end # resource path - local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines/validate' + local_var_path = '/api/v2/obs-pipelines/pipelines/validate' # query parameters query_params = opts[:query_params] || {}