diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 99b25f0ac8..e653f2574e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -76954,6 +76954,543 @@ components: - new_advisories - avoided_advisories type: object + RemediationCodeSession: + description: A linked code session (for example, a pull request) for the investigation. + properties: + id: + description: Code session ID. + type: string + pull_request_status: + $ref: "#/components/schemas/RemediationPullRequestStatus" + title: RemediationCodeSession + type: object + RemediationConfidence: + description: The agent's self-rated confidence in a plan. + enum: + - low + - medium + - high + title: RemediationConfidence + type: string + x-enum-varnames: + - LOW + - MEDIUM + - HIGH + RemediationDeploymentRolloutState: + description: ECS deployment state, populated only for deployment failures. + enum: + - IN_PROGRESS + - COMPLETED + - FAILED + title: RemediationDeploymentRolloutState + type: string + x-enum-varnames: + - IN_PROGRESS + - COMPLETED + - FAILED + RemediationEcsMetadata: + description: ECS-specific context for the investigation. + properties: + account_id: + description: AWS account ID. + type: string + capacity_providers: + description: Associated capacity providers. + items: + type: string + type: array + cluster_arn: + description: ECS cluster ARN. + type: string + cluster_name: + description: ECS cluster name. + type: string + impact_score: + description: Computed impact score for ranking (64-bit integer encoded as a string). + example: "100" + type: string + issue_start_time: + description: When the issue was first detected, epoch milliseconds (64-bit integer encoded as a string). + example: "1718000000000" + type: string + launch_type: + $ref: "#/components/schemas/RemediationLaunchType" + region: + description: AWS region. + type: string + task_arns: + description: All affected task ARNs, for filtering. + items: + type: string + type: array + task_definition_family: + description: Task definition family name. + type: string + task_definition_revision: + description: Current task definition revision. + format: int64 + type: integer + tasks: + description: Individual tasks exhibiting issues. Capped at 50 most recent. + items: + $ref: "#/components/schemas/RemediationProblemTask" + type: array + total_cpu_units: + description: Sum of CPU units across affected tasks (64-bit integer encoded as a string). + example: "1024" + type: string + total_memory_mib: + description: Sum of memory (MiB) across affected tasks (64-bit integer encoded as a string). + example: "2048" + type: string + update_timestamp: + description: When this metadata was last updated, epoch milliseconds (64-bit integer encoded as a string). + example: "1718000100000" + type: string + workload_summary: + $ref: "#/components/schemas/RemediationWorkloadSummary" + workload_type: + $ref: "#/components/schemas/RemediationWorkloadType" + title: RemediationEcsMetadata + type: object + RemediationExecuteRequest: + description: Request payload for executing a remediation. + properties: + connection_id: + description: >- + The Action Platform AWS connection ID to execute through. Must carry the integration_aws connection prefix. + example: "connection:integration_aws:00000000-0000-0000-0000-000000000000" + type: string + investigation_id: + description: The ID of the investigation to remediate. + example: "inv-00000000-0000-0000-0000-000000000000" + type: string + required: + - investigation_id + - connection_id + title: RemediationExecuteRequest + type: object + RemediationExecuteResponse: + description: Response payload for executing a remediation. + properties: + investigation_id: + description: Echoes the investigation ID that the remediation runs against. + example: "inv-00000000-0000-0000-0000-000000000000" + type: string + required: + - investigation_id + title: RemediationExecuteResponse + type: object + RemediationGetInvestigationResponse: + description: Response payload for getting a single investigation. + properties: + investigation: + $ref: "#/components/schemas/RemediationInvestigation" + required: + - investigation + title: RemediationGetInvestigationResponse + type: object + RemediationGuardrailDecision: + description: The guardrail decision applied to a plan or investigation. + properties: + decision: + $ref: "#/components/schemas/RemediationGuardrailVerdict" + guardrail_id: + description: >- + ID of the matching guardrail. Set when the decision is not denied; may be empty when denied because no rule matched. + type: string + title: RemediationGuardrailDecision + type: object + RemediationGuardrailVerdict: + description: The verdict a guardrail applied to a plan or investigation. + enum: + - allowed + - approval_required + - denied + title: RemediationGuardrailVerdict + type: string + x-enum-varnames: + - ALLOWED + - APPROVAL_REQUIRED + - DENIED + RemediationHistoryEvent: + description: A single event in the investigation history. + properties: + event_type: + description: The type of event. + type: string + id: + description: History event ID. + type: string + payload: + description: >- + Opaque JSON event body, base64-encoded. Decode and parse according to event_type. + type: string + timestamp_ms: + description: Event time in epoch milliseconds (64-bit integer encoded as a string). + example: "1718000075000" + type: string + title: RemediationHistoryEvent + type: object + RemediationInvestigation: + description: >- + A single ECS remediation investigation: a detected issue together with its proposed plan, history, and ECS workload metadata. + properties: + code_session: + $ref: "#/components/schemas/RemediationCodeSession" + created_at_ms: + description: Creation time in epoch milliseconds (64-bit integer encoded as a string). + example: "1718000000000" + type: string + guardrail_decision: + $ref: "#/components/schemas/RemediationGuardrailDecision" + history: + description: Ordered list of history events for the investigation. + items: + $ref: "#/components/schemas/RemediationHistoryEvent" + type: array + id: + description: Unique investigation ID. + type: string + issue_type: + description: The detected issue type. + type: string + last_action_at_ms: + description: Time of the last action in epoch milliseconds (64-bit integer encoded as a string). + example: "1718000050000" + type: string + metadata: + $ref: "#/components/schemas/RemediationEcsMetadata" + org_id: + description: Datadog organization ID that owns the investigation (64-bit integer encoded as a string). + example: "2" + type: string + plan: + $ref: "#/components/schemas/RemediationPlan" + resource_arn: + description: ARN of the ECS resource the investigation is about. + type: string + status: + $ref: "#/components/schemas/RemediationInvestigationStatus" + updated_at_ms: + description: Last update time in epoch milliseconds (64-bit integer encoded as a string). + example: "1718000100000" + type: string + title: RemediationInvestigation + type: object + RemediationInvestigationStatus: + description: Investigation status. + enum: + - open + - approval_required + - executing + - succeeded + - failed + title: RemediationInvestigationStatus + type: string + x-enum-varnames: + - OPEN + - APPROVAL_REQUIRED + - EXECUTING + - SUCCEEDED + - FAILED + RemediationLaunchType: + description: ECS launch type. + enum: + - EC2 + - FARGATE + title: RemediationLaunchType + type: string + x-enum-varnames: + - EC2 + - FARGATE + RemediationListInvestigationsResponse: + description: Response payload for listing investigations. + properties: + investigations: + description: The matching investigations. + items: + $ref: "#/components/schemas/RemediationInvestigation" + type: array + next_page_token: + description: >- + Token to pass as page_token on the next call. Empty when there are no further pages. + type: string + title: RemediationListInvestigationsResponse + type: object + RemediationPlan: + description: The remediation plan proposed by the ECS remediation agent. + properties: + confidence: + $ref: "#/components/schemas/RemediationConfidence" + evidence: + description: >- + Evidence supporting the diagnosis. Treat as user-provided content and escape before display. + type: string + explanation: + description: >- + Human-readable summary of why the plan was proposed. Treat as user-provided content and escape before display. + type: string + guardrail_decision: + $ref: "#/components/schemas/RemediationGuardrailDecision" + plan_source: + $ref: "#/components/schemas/RemediationPlanSource" + proposed_fix: + description: >- + Recommendation-oriented view of the candidate remediations, distinct from the execution-oriented steps. + items: + $ref: "#/components/schemas/RemediationProposedFix" + type: array + status: + $ref: "#/components/schemas/RemediationPlanStatus" + steps: + description: Execution-oriented steps that make up the plan. + items: + $ref: "#/components/schemas/RemediationStep" + type: array + title: RemediationPlan + type: object + RemediationPlanSource: + description: How the plan was produced. + enum: + - deterministic + - ai + title: RemediationPlanSource + type: string + x-enum-varnames: + - DETERMINISTIC + - AI + RemediationPlanStatus: + description: Plan status. + enum: + - pending + - in_progress + - completed + - failed + title: RemediationPlanStatus + type: string + x-enum-varnames: + - PENDING + - IN_PROGRESS + - COMPLETED + - FAILED + RemediationProblemContainer: + description: A container within a problematic task that is exhibiting issues. + properties: + cpu_limit: + description: CPU limit. + format: int64 + type: integer + exit_code: + description: Exit code if the container stopped. + format: int32 + maximum: 255 + type: integer + health_status: + description: Container health status. + type: string + image: + description: Docker image URI. + type: string + last_status: + description: Container status. + type: string + memory_limit_mib: + description: Memory limit in MiB. + format: int64 + type: integer + name: + description: Container name from the task definition. + type: string + reason: + description: Stop reason. + type: string + title: RemediationProblemContainer + type: object + RemediationProblemTask: + description: An individual ECS task in a problematic state. + properties: + availability_zone: + description: Availability zone where the task is running. + type: string + container_instance_arn: + description: Container instance ARN (EC2 launch type only). + type: string + containers: + description: Problematic containers within the task. + items: + $ref: "#/components/schemas/RemediationProblemContainer" + type: array + cpu_units: + description: CPU units allocated to the task (64-bit integer encoded as a string). + example: "256" + type: string + desired_status: + description: Desired task status. + type: string + execution_role_arn: + description: IAM role used by ECS to pull images and fetch secrets. + type: string + health_status: + description: Task-level health status. + type: string + issue_start_time: + description: When this task's issue started, epoch milliseconds (64-bit integer encoded as a string). + example: "1718000000000" + type: string + issue_type: + description: Issue type for this specific task. + type: string + last_status: + description: Current task status. + type: string + launch_type: + $ref: "#/components/schemas/RemediationLaunchType" + memory_mib: + description: Memory in MiB allocated to the task (64-bit integer encoded as a string). + example: "512" + type: string + stop_code: + description: Stop code if the task was stopped. + type: string + stopped_reason: + description: Stop reason if the task was stopped. + type: string + tags: + description: Task-level tags. + items: + type: string + type: array + task_arn: + description: Full task ARN. + type: string + task_definition_arn: + description: Task definition ARN with revision. + type: string + task_role_arn: + description: IAM role used by the task at runtime. + type: string + title: RemediationProblemTask + type: object + RemediationProposedFix: + description: A recommendation-oriented summary of a candidate remediation. + properties: + description: + description: >- + Explanation of the proposed change and why it resolves the root cause. Treat as user-provided content and escape before display. + type: string + reversible: + description: Whether the proposed fix can be reversed after execution. + type: boolean + risk: + $ref: "#/components/schemas/RemediationRiskLevel" + title: + description: Short title for the proposed fix. + type: string + title: RemediationProposedFix + type: object + RemediationPullRequestStatus: + description: Pull request status for a linked code session. + enum: + - open + - closed + - merged + title: RemediationPullRequestStatus + type: string + x-enum-varnames: + - OPEN + - CLOSED + - MERGED + RemediationRiskLevel: + description: Estimated risk of a remediation step or proposed fix. + enum: + - low + - medium + - high + title: RemediationRiskLevel + type: string + x-enum-varnames: + - LOW + - MEDIUM + - HIGH + RemediationStep: + description: A single execution-oriented step in a remediation plan. + properties: + action_fqn: + description: Fully qualified action type, for example ecs.update_service_memory. + type: string + approval_state: + $ref: "#/components/schemas/RemediationStepApprovalState" + description: + description: Human-readable description of the step. + type: string + reversible: + description: Whether the step can be reversed after execution. + type: boolean + risk: + $ref: "#/components/schemas/RemediationRiskLevel" + step_id: + description: Unique ID for the step within the plan. + type: string + title: RemediationStep + type: object + RemediationStepApprovalState: + description: Approval state for a remediation step. + enum: + - pending_approval + - approved + - rejected + title: RemediationStepApprovalState + type: string + x-enum-varnames: + - PENDING_APPROVAL + - APPROVED + - REJECTED + RemediationWorkloadSummary: + description: Aggregated health across all tasks in a workload (service or daemon). + properties: + deployment_rollout_state: + $ref: "#/components/schemas/RemediationDeploymentRolloutState" + desired_count: + description: Expected task count (64-bit integer encoded as a string). + example: "3" + type: string + failed_count: + description: Tasks in a problematic state (64-bit integer encoded as a string). + example: "2" + type: string + failed_percent: + description: Percentage of desired count that is failed (64-bit integer encoded as a string). + example: "66" + type: string + pending_count: + description: Tasks currently pending (64-bit integer encoded as a string). + example: "0" + type: string + previous_task_definition: + description: >- + Previous deployment's task definition, as family:revision or a full task definition ARN. Empty when no rollback target is visible. + type: string + running_count: + description: Tasks currently running (64-bit integer encoded as a string). + example: "1" + type: string + title: RemediationWorkloadSummary + type: object + RemediationWorkloadType: + description: The kind of ECS workload that owns the problematic tasks. + enum: + - WORKLOAD_TYPE_UNSPECIFIED + - SERVICE + - STANDALONE_TASK + - DAEMON + title: RemediationWorkloadType + type: string + x-enum-varnames: + - WORKLOAD_TYPE_UNSPECIFIED + - SERVICE + - STANDALONE_TASK + - DAEMON ReorderRetentionFiltersRequest: description: A list of retention filters to reorder. properties: @@ -108909,6 +109446,181 @@ info: version: "1.0" openapi: 3.0.0 paths: + /api/ui/orchestration/ecs_remediation/execute: + post: + description: >- + Trigger execution of the proposed remediation for an investigation through the configured AWS connection. The investigation must belong to the caller's organization. + operationId: ExecuteRemediation + requestBody: + content: + application/json: + examples: + default: + value: + connection_id: "connection:integration_aws:00000000-0000-0000-0000-000000000000" + investigation_id: "inv-00000000-0000-0000-0000-000000000000" + schema: + $ref: "#/components/schemas/RemediationExecuteRequest" + description: The investigation to remediate and the AWS connection to use. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + investigation_id: "inv-00000000-0000-0000-0000-000000000000" + schema: + $ref: "#/components/schemas/RemediationExecuteResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Execute an ECS remediation + tags: + - ECS Remediation + x-codegen-request-body-name: body + /api/ui/orchestration/ecs_remediation/investigation: + get: + description: >- + Get a single ECS remediation investigation by ID, including its proposed plan, history, and ECS workload metadata. + operationId: GetEcsRemediationInvestigation + parameters: + - description: The investigation ID. + in: query + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + investigation: + created_at_ms: "1718000000000" + id: "inv-00000000-0000-0000-0000-000000000000" + issue_type: "OOM_KILLED" + last_action_at_ms: "1718000050000" + org_id: "2" + resource_arn: "arn:aws:ecs:us-east-1:123456789012:service/prod-cluster/web" + status: "approval_required" + updated_at_ms: "1718000100000" + schema: + $ref: "#/components/schemas/RemediationGetInvestigationResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an ECS remediation investigation + tags: + - ECS Remediation + /api/ui/orchestration/ecs_remediation/investigations: + get: + description: >- + List ECS remediation investigations for the caller's organization. All filters are optional and applied together. Results are returned in pages. + operationId: ListEcsRemediationInvestigations + parameters: + - description: Filter by ECS cluster ARN. + in: query + name: cluster_arn + required: false + schema: + type: string + - description: Filter by ECS cluster name. + in: query + name: cluster_name + required: false + schema: + type: string + - description: Filter by ECS service ARN. + in: query + name: service_arn + required: false + schema: + type: string + - description: Filter by ECS task ARN. + in: query + name: task_arn + required: false + schema: + type: string + - description: >- + Filter by resource ARN. Matches services, daemons, and standalone tasks. + in: query + name: resource_arn + required: false + schema: + type: string + - description: >- + Filter by investigation status. Repeatable. Accepted values: open, approval_required, executing, succeeded, failed. Unknown values are ignored. + in: query + name: status + required: false + schema: + items: + type: string + type: array + - description: Filter by issue type. + in: query + name: issue_type + required: false + schema: + type: string + - description: Start of the created-at time range, in epoch milliseconds. + example: 1718000000000 + in: query + name: since_ms + required: false + schema: + format: int64 + type: integer + - description: End of the created-at time range, in epoch milliseconds. + example: 1718600000000 + in: query + name: until_ms + required: false + schema: + format: int64 + type: integer + - description: Maximum number of investigations to return. Clamped to 200. + example: 50 + in: query + name: page_size + required: false + schema: + format: int32 + maximum: 200 + type: integer + - description: Pagination token returned by a previous call. + in: query + name: page_token + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + investigations: + - id: "inv-00000000-0000-0000-0000-000000000000" + issue_type: "OOM_KILLED" + org_id: "2" + resource_arn: "arn:aws:ecs:us-east-1:123456789012:service/prod-cluster/web" + status: "approval_required" + next_page_token: "" + schema: + $ref: "#/components/schemas/RemediationListInvestigationsResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List ECS remediation investigations + tags: + - ECS Remediation /api/unstable/fleet/agent_versions: get: description: |- @@ -193574,6 +194286,8 @@ tags: scopes from alerting. Downtime settings, which can be scheduled with start and end times, prevent all alerting related to specified Datadog tags. name: Downtimes + - description: Manage ECS remediation investigations and execute proposed remediation plans. + name: ECS Remediation - description: Manage per-integration configurations for the Internal Developer Portal (IDP). These configurations control which external resources (for example, GitHub repositories, Jira projects, or PagerDuty services) are synced as entities into the Software Catalog. name: Entity Integration Configs - description: Retrieves security risk scores for entities in your organization. diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 972863d62b..4e1881e9de 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -333,6 +333,13 @@ datadog\_api\_client.v2.api.downtimes\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.ecs\_remediation\_api module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.ecs_remediation_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.entity\_integration\_configs\_api module -------------------------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 14023429c7..642e944ce9 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -32365,6 +32365,188 @@ datadog\_api\_client.v2.model.remediation module :members: :show-inheritance: +datadog\_api\_client.v2.model.remediation\_code\_session module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_code_session + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_confidence module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.remediation_confidence + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_deployment\_rollout\_state module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_deployment_rollout_state + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_ecs\_metadata module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_ecs_metadata + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_execute\_request module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.remediation_execute_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_execute\_response module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_execute_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_get\_investigation\_response module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.remediation_get_investigation_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_guardrail\_decision module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_guardrail_decision + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_guardrail\_verdict module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_guardrail_verdict + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_history\_event module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_history_event + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_investigation module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_investigation + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_investigation\_status module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_investigation_status + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_launch\_type module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_launch_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_list\_investigations\_response module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_list_investigations_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_plan module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.remediation_plan + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_plan\_source module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_plan_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_plan\_status module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_plan_status + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_problem\_container module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_problem_container + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_problem\_task module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_problem_task + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_proposed\_fix module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_proposed_fix + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_pull\_request\_status module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_pull_request_status + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_risk\_level module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_risk_level + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_step module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.remediation_step + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_step\_approval\_state module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_step_approval_state + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_workload\_summary module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_workload_summary + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.remediation\_workload\_type module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.remediation_workload_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.reorder\_retention\_filters\_request module ------------------------------------------------------------------------- diff --git a/src/datadog_api_client/v2/api/ecs_remediation_api.py b/src/datadog_api_client/v2/api/ecs_remediation_api.py new file mode 100644 index 0000000000..4e12b05f07 --- /dev/null +++ b/src/datadog_api_client/v2/api/ecs_remediation_api.py @@ -0,0 +1,260 @@ +# 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 Any, Dict, List, Union + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, +) +from datadog_api_client.v2.model.remediation_execute_response import RemediationExecuteResponse +from datadog_api_client.v2.model.remediation_execute_request import RemediationExecuteRequest +from datadog_api_client.v2.model.remediation_get_investigation_response import RemediationGetInvestigationResponse +from datadog_api_client.v2.model.remediation_list_investigations_response import RemediationListInvestigationsResponse + + +class ECSRemediationApi: + """ + Manage ECS remediation investigations and execute proposed remediation plans. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._execute_remediation_endpoint = _Endpoint( + settings={ + "response_type": (RemediationExecuteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/ui/orchestration/ecs_remediation/execute", + "operation_id": "execute_remediation", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (RemediationExecuteRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._get_ecs_remediation_investigation_endpoint = _Endpoint( + settings={ + "response_type": (RemediationGetInvestigationResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/ui/orchestration/ecs_remediation/investigation", + "operation_id": "get_ecs_remediation_investigation", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "id": { + "required": True, + "openapi_types": (str,), + "attribute": "id", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_ecs_remediation_investigations_endpoint = _Endpoint( + settings={ + "response_type": (RemediationListInvestigationsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/ui/orchestration/ecs_remediation/investigations", + "operation_id": "list_ecs_remediation_investigations", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "cluster_arn": { + "openapi_types": (str,), + "attribute": "cluster_arn", + "location": "query", + }, + "cluster_name": { + "openapi_types": (str,), + "attribute": "cluster_name", + "location": "query", + }, + "service_arn": { + "openapi_types": (str,), + "attribute": "service_arn", + "location": "query", + }, + "task_arn": { + "openapi_types": (str,), + "attribute": "task_arn", + "location": "query", + }, + "resource_arn": { + "openapi_types": (str,), + "attribute": "resource_arn", + "location": "query", + }, + "status": { + "openapi_types": ([str],), + "attribute": "status", + "location": "query", + "collection_format": "multi", + }, + "issue_type": { + "openapi_types": (str,), + "attribute": "issue_type", + "location": "query", + }, + "since_ms": { + "openapi_types": (int,), + "attribute": "since_ms", + "location": "query", + }, + "until_ms": { + "openapi_types": (int,), + "attribute": "until_ms", + "location": "query", + }, + "page_size": { + "validation": { + "inclusive_maximum": 200, + }, + "openapi_types": (int,), + "attribute": "page_size", + "location": "query", + }, + "page_token": { + "openapi_types": (str,), + "attribute": "page_token", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + def execute_remediation( + self, + body: RemediationExecuteRequest, + ) -> RemediationExecuteResponse: + """Execute an ECS remediation. + + Trigger execution of the proposed remediation for an investigation through the configured AWS connection. The investigation must belong to the caller's organization. + + :param body: The investigation to remediate and the AWS connection to use. + :type body: RemediationExecuteRequest + :rtype: RemediationExecuteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._execute_remediation_endpoint.call_with_http_info(**kwargs) + + def get_ecs_remediation_investigation( + self, + id: str, + ) -> RemediationGetInvestigationResponse: + """Get an ECS remediation investigation. + + Get a single ECS remediation investigation by ID, including its proposed plan, history, and ECS workload metadata. + + :param id: The investigation ID. + :type id: str + :rtype: RemediationGetInvestigationResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["id"] = id + + return self._get_ecs_remediation_investigation_endpoint.call_with_http_info(**kwargs) + + def list_ecs_remediation_investigations( + self, + *, + cluster_arn: Union[str, UnsetType] = unset, + cluster_name: Union[str, UnsetType] = unset, + service_arn: Union[str, UnsetType] = unset, + task_arn: Union[str, UnsetType] = unset, + resource_arn: Union[str, UnsetType] = unset, + status: Union[List[str], UnsetType] = unset, + issue_type: Union[str, UnsetType] = unset, + since_ms: Union[int, UnsetType] = unset, + until_ms: Union[int, UnsetType] = unset, + page_size: Union[int, UnsetType] = unset, + page_token: Union[str, UnsetType] = unset, + ) -> RemediationListInvestigationsResponse: + """List ECS remediation investigations. + + List ECS remediation investigations for the caller's organization. All filters are optional and applied together. Results are returned in pages. + + :param cluster_arn: Filter by ECS cluster ARN. + :type cluster_arn: str, optional + :param cluster_name: Filter by ECS cluster name. + :type cluster_name: str, optional + :param service_arn: Filter by ECS service ARN. + :type service_arn: str, optional + :param task_arn: Filter by ECS task ARN. + :type task_arn: str, optional + :param resource_arn: Filter by resource ARN. Matches services, daemons, and standalone tasks. + :type resource_arn: str, optional + :param status: Filter by investigation status. Repeatable. Accepted values: open, approval_required, executing, succeeded, failed. Unknown values are ignored. + :type status: [str], optional + :param issue_type: Filter by issue type. + :type issue_type: str, optional + :param since_ms: Start of the created-at time range, in epoch milliseconds. + :type since_ms: int, optional + :param until_ms: End of the created-at time range, in epoch milliseconds. + :type until_ms: int, optional + :param page_size: Maximum number of investigations to return. Clamped to 200. + :type page_size: int, optional + :param page_token: Pagination token returned by a previous call. + :type page_token: str, optional + :rtype: RemediationListInvestigationsResponse + """ + kwargs: Dict[str, Any] = {} + if cluster_arn is not unset: + kwargs["cluster_arn"] = cluster_arn + + if cluster_name is not unset: + kwargs["cluster_name"] = cluster_name + + if service_arn is not unset: + kwargs["service_arn"] = service_arn + + if task_arn is not unset: + kwargs["task_arn"] = task_arn + + if resource_arn is not unset: + kwargs["resource_arn"] = resource_arn + + if status is not unset: + kwargs["status"] = status + + if issue_type is not unset: + kwargs["issue_type"] = issue_type + + if since_ms is not unset: + kwargs["since_ms"] = since_ms + + if until_ms is not unset: + kwargs["until_ms"] = until_ms + + if page_size is not unset: + kwargs["page_size"] = page_size + + if page_token is not unset: + kwargs["page_token"] = page_token + + return self._list_ecs_remediation_investigations_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index f37e2eebe2..abed69a6e4 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -45,6 +45,7 @@ from datadog_api_client.v2.api.deployment_gates_api import DeploymentGatesApi from datadog_api_client.v2.api.domain_allowlist_api import DomainAllowlistApi from datadog_api_client.v2.api.downtimes_api import DowntimesApi +from datadog_api_client.v2.api.ecs_remediation_api import ECSRemediationApi from datadog_api_client.v2.api.entity_integration_configs_api import EntityIntegrationConfigsApi from datadog_api_client.v2.api.entity_risk_scores_api import EntityRiskScoresApi from datadog_api_client.v2.api.error_tracking_api import ErrorTrackingApi @@ -181,6 +182,7 @@ "DeploymentGatesApi", "DomainAllowlistApi", "DowntimesApi", + "ECSRemediationApi", "EntityIntegrationConfigsApi", "EntityRiskScoresApi", "ErrorTrackingApi", diff --git a/src/datadog_api_client/v2/model/remediation_code_session.py b/src/datadog_api_client/v2/model/remediation_code_session.py new file mode 100644 index 0000000000..b94ab0d835 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_code_session.py @@ -0,0 +1,54 @@ +# 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.remediation_pull_request_status import RemediationPullRequestStatus + + +class RemediationCodeSession(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_pull_request_status import RemediationPullRequestStatus + + return { + "id": (str,), + "pull_request_status": (RemediationPullRequestStatus,), + } + + attribute_map = { + "id": "id", + "pull_request_status": "pull_request_status", + } + + def __init__( + self_, + id: Union[str, UnsetType] = unset, + pull_request_status: Union[RemediationPullRequestStatus, UnsetType] = unset, + **kwargs, + ): + """ + A linked code session (for example, a pull request) for the investigation. + + :param id: Code session ID. + :type id: str, optional + + :param pull_request_status: Pull request status for a linked code session. + :type pull_request_status: RemediationPullRequestStatus, optional + """ + if id is not unset: + kwargs["id"] = id + if pull_request_status is not unset: + kwargs["pull_request_status"] = pull_request_status + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_confidence.py b/src/datadog_api_client/v2/model/remediation_confidence.py new file mode 100644 index 0000000000..74f8147509 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_confidence.py @@ -0,0 +1,41 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationConfidence(ModelSimple): + """ + The agent's self-rated confidence in a plan. + + :param value: Must be one of ["low", "medium", "high"]. + :type value: str + """ + + allowed_values = { + "low", + "medium", + "high", + } + LOW: ClassVar["RemediationConfidence"] + MEDIUM: ClassVar["RemediationConfidence"] + HIGH: ClassVar["RemediationConfidence"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationConfidence.LOW = RemediationConfidence("low") +RemediationConfidence.MEDIUM = RemediationConfidence("medium") +RemediationConfidence.HIGH = RemediationConfidence("high") diff --git a/src/datadog_api_client/v2/model/remediation_deployment_rollout_state.py b/src/datadog_api_client/v2/model/remediation_deployment_rollout_state.py new file mode 100644 index 0000000000..00f439b5a0 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_deployment_rollout_state.py @@ -0,0 +1,41 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationDeploymentRolloutState(ModelSimple): + """ + ECS deployment state, populated only for deployment failures. + + :param value: Must be one of ["IN_PROGRESS", "COMPLETED", "FAILED"]. + :type value: str + """ + + allowed_values = { + "IN_PROGRESS", + "COMPLETED", + "FAILED", + } + IN_PROGRESS: ClassVar["RemediationDeploymentRolloutState"] + COMPLETED: ClassVar["RemediationDeploymentRolloutState"] + FAILED: ClassVar["RemediationDeploymentRolloutState"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationDeploymentRolloutState.IN_PROGRESS = RemediationDeploymentRolloutState("IN_PROGRESS") +RemediationDeploymentRolloutState.COMPLETED = RemediationDeploymentRolloutState("COMPLETED") +RemediationDeploymentRolloutState.FAILED = RemediationDeploymentRolloutState("FAILED") diff --git a/src/datadog_api_client/v2/model/remediation_ecs_metadata.py b/src/datadog_api_client/v2/model/remediation_ecs_metadata.py new file mode 100644 index 0000000000..1b9a751d27 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_ecs_metadata.py @@ -0,0 +1,180 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.remediation_launch_type import RemediationLaunchType + from datadog_api_client.v2.model.remediation_problem_task import RemediationProblemTask + from datadog_api_client.v2.model.remediation_workload_summary import RemediationWorkloadSummary + from datadog_api_client.v2.model.remediation_workload_type import RemediationWorkloadType + + +class RemediationEcsMetadata(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_launch_type import RemediationLaunchType + from datadog_api_client.v2.model.remediation_problem_task import RemediationProblemTask + from datadog_api_client.v2.model.remediation_workload_summary import RemediationWorkloadSummary + from datadog_api_client.v2.model.remediation_workload_type import RemediationWorkloadType + + return { + "account_id": (str,), + "capacity_providers": ([str],), + "cluster_arn": (str,), + "cluster_name": (str,), + "impact_score": (str,), + "issue_start_time": (str,), + "launch_type": (RemediationLaunchType,), + "region": (str,), + "task_arns": ([str],), + "task_definition_family": (str,), + "task_definition_revision": (int,), + "tasks": ([RemediationProblemTask],), + "total_cpu_units": (str,), + "total_memory_mib": (str,), + "update_timestamp": (str,), + "workload_summary": (RemediationWorkloadSummary,), + "workload_type": (RemediationWorkloadType,), + } + + attribute_map = { + "account_id": "account_id", + "capacity_providers": "capacity_providers", + "cluster_arn": "cluster_arn", + "cluster_name": "cluster_name", + "impact_score": "impact_score", + "issue_start_time": "issue_start_time", + "launch_type": "launch_type", + "region": "region", + "task_arns": "task_arns", + "task_definition_family": "task_definition_family", + "task_definition_revision": "task_definition_revision", + "tasks": "tasks", + "total_cpu_units": "total_cpu_units", + "total_memory_mib": "total_memory_mib", + "update_timestamp": "update_timestamp", + "workload_summary": "workload_summary", + "workload_type": "workload_type", + } + + def __init__( + self_, + account_id: Union[str, UnsetType] = unset, + capacity_providers: Union[List[str], UnsetType] = unset, + cluster_arn: Union[str, UnsetType] = unset, + cluster_name: Union[str, UnsetType] = unset, + impact_score: Union[str, UnsetType] = unset, + issue_start_time: Union[str, UnsetType] = unset, + launch_type: Union[RemediationLaunchType, UnsetType] = unset, + region: Union[str, UnsetType] = unset, + task_arns: Union[List[str], UnsetType] = unset, + task_definition_family: Union[str, UnsetType] = unset, + task_definition_revision: Union[int, UnsetType] = unset, + tasks: Union[List[RemediationProblemTask], UnsetType] = unset, + total_cpu_units: Union[str, UnsetType] = unset, + total_memory_mib: Union[str, UnsetType] = unset, + update_timestamp: Union[str, UnsetType] = unset, + workload_summary: Union[RemediationWorkloadSummary, UnsetType] = unset, + workload_type: Union[RemediationWorkloadType, UnsetType] = unset, + **kwargs, + ): + """ + ECS-specific context for the investigation. + + :param account_id: AWS account ID. + :type account_id: str, optional + + :param capacity_providers: Associated capacity providers. + :type capacity_providers: [str], optional + + :param cluster_arn: ECS cluster ARN. + :type cluster_arn: str, optional + + :param cluster_name: ECS cluster name. + :type cluster_name: str, optional + + :param impact_score: Computed impact score for ranking (64-bit integer encoded as a string). + :type impact_score: str, optional + + :param issue_start_time: When the issue was first detected, epoch milliseconds (64-bit integer encoded as a string). + :type issue_start_time: str, optional + + :param launch_type: ECS launch type. + :type launch_type: RemediationLaunchType, optional + + :param region: AWS region. + :type region: str, optional + + :param task_arns: All affected task ARNs, for filtering. + :type task_arns: [str], optional + + :param task_definition_family: Task definition family name. + :type task_definition_family: str, optional + + :param task_definition_revision: Current task definition revision. + :type task_definition_revision: int, optional + + :param tasks: Individual tasks exhibiting issues. Capped at 50 most recent. + :type tasks: [RemediationProblemTask], optional + + :param total_cpu_units: Sum of CPU units across affected tasks (64-bit integer encoded as a string). + :type total_cpu_units: str, optional + + :param total_memory_mib: Sum of memory (MiB) across affected tasks (64-bit integer encoded as a string). + :type total_memory_mib: str, optional + + :param update_timestamp: When this metadata was last updated, epoch milliseconds (64-bit integer encoded as a string). + :type update_timestamp: str, optional + + :param workload_summary: Aggregated health across all tasks in a workload (service or daemon). + :type workload_summary: RemediationWorkloadSummary, optional + + :param workload_type: The kind of ECS workload that owns the problematic tasks. + :type workload_type: RemediationWorkloadType, optional + """ + if account_id is not unset: + kwargs["account_id"] = account_id + if capacity_providers is not unset: + kwargs["capacity_providers"] = capacity_providers + if cluster_arn is not unset: + kwargs["cluster_arn"] = cluster_arn + if cluster_name is not unset: + kwargs["cluster_name"] = cluster_name + if impact_score is not unset: + kwargs["impact_score"] = impact_score + if issue_start_time is not unset: + kwargs["issue_start_time"] = issue_start_time + if launch_type is not unset: + kwargs["launch_type"] = launch_type + if region is not unset: + kwargs["region"] = region + if task_arns is not unset: + kwargs["task_arns"] = task_arns + if task_definition_family is not unset: + kwargs["task_definition_family"] = task_definition_family + if task_definition_revision is not unset: + kwargs["task_definition_revision"] = task_definition_revision + if tasks is not unset: + kwargs["tasks"] = tasks + if total_cpu_units is not unset: + kwargs["total_cpu_units"] = total_cpu_units + if total_memory_mib is not unset: + kwargs["total_memory_mib"] = total_memory_mib + if update_timestamp is not unset: + kwargs["update_timestamp"] = update_timestamp + if workload_summary is not unset: + kwargs["workload_summary"] = workload_summary + if workload_type is not unset: + kwargs["workload_type"] = workload_type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_execute_request.py b/src/datadog_api_client/v2/model/remediation_execute_request.py new file mode 100644 index 0000000000..da7b2466cf --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_execute_request.py @@ -0,0 +1,39 @@ +# 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 datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class RemediationExecuteRequest(ModelNormal): + @cached_property + def openapi_types(_): + return { + "connection_id": (str,), + "investigation_id": (str,), + } + + attribute_map = { + "connection_id": "connection_id", + "investigation_id": "investigation_id", + } + + def __init__(self_, connection_id: str, investigation_id: str, **kwargs): + """ + Request payload for executing a remediation. + + :param connection_id: The Action Platform AWS connection ID to execute through. Must carry the integration_aws connection prefix. + :type connection_id: str + + :param investigation_id: The ID of the investigation to remediate. + :type investigation_id: str + """ + super().__init__(kwargs) + + self_.connection_id = connection_id + self_.investigation_id = investigation_id diff --git a/src/datadog_api_client/v2/model/remediation_execute_response.py b/src/datadog_api_client/v2/model/remediation_execute_response.py new file mode 100644 index 0000000000..6c15c66ac5 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_execute_response.py @@ -0,0 +1,33 @@ +# 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 datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class RemediationExecuteResponse(ModelNormal): + @cached_property + def openapi_types(_): + return { + "investigation_id": (str,), + } + + attribute_map = { + "investigation_id": "investigation_id", + } + + def __init__(self_, investigation_id: str, **kwargs): + """ + Response payload for executing a remediation. + + :param investigation_id: Echoes the investigation ID that the remediation runs against. + :type investigation_id: str + """ + super().__init__(kwargs) + + self_.investigation_id = investigation_id diff --git a/src/datadog_api_client/v2/model/remediation_get_investigation_response.py b/src/datadog_api_client/v2/model/remediation_get_investigation_response.py new file mode 100644 index 0000000000..0d0ca3ed6b --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_get_investigation_response.py @@ -0,0 +1,40 @@ +# 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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.remediation_investigation import RemediationInvestigation + + +class RemediationGetInvestigationResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_investigation import RemediationInvestigation + + return { + "investigation": (RemediationInvestigation,), + } + + attribute_map = { + "investigation": "investigation", + } + + def __init__(self_, investigation: RemediationInvestigation, **kwargs): + """ + Response payload for getting a single investigation. + + :param investigation: A single ECS remediation investigation: a detected issue together with its proposed plan, history, and ECS workload metadata. + :type investigation: RemediationInvestigation + """ + super().__init__(kwargs) + + self_.investigation = investigation diff --git a/src/datadog_api_client/v2/model/remediation_guardrail_decision.py b/src/datadog_api_client/v2/model/remediation_guardrail_decision.py new file mode 100644 index 0000000000..2bba382233 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_guardrail_decision.py @@ -0,0 +1,54 @@ +# 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.remediation_guardrail_verdict import RemediationGuardrailVerdict + + +class RemediationGuardrailDecision(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_guardrail_verdict import RemediationGuardrailVerdict + + return { + "decision": (RemediationGuardrailVerdict,), + "guardrail_id": (str,), + } + + attribute_map = { + "decision": "decision", + "guardrail_id": "guardrail_id", + } + + def __init__( + self_, + decision: Union[RemediationGuardrailVerdict, UnsetType] = unset, + guardrail_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The guardrail decision applied to a plan or investigation. + + :param decision: The verdict a guardrail applied to a plan or investigation. + :type decision: RemediationGuardrailVerdict, optional + + :param guardrail_id: ID of the matching guardrail. Set when the decision is not denied; may be empty when denied because no rule matched. + :type guardrail_id: str, optional + """ + if decision is not unset: + kwargs["decision"] = decision + if guardrail_id is not unset: + kwargs["guardrail_id"] = guardrail_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_guardrail_verdict.py b/src/datadog_api_client/v2/model/remediation_guardrail_verdict.py new file mode 100644 index 0000000000..93f7c50118 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_guardrail_verdict.py @@ -0,0 +1,41 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationGuardrailVerdict(ModelSimple): + """ + The verdict a guardrail applied to a plan or investigation. + + :param value: Must be one of ["allowed", "approval_required", "denied"]. + :type value: str + """ + + allowed_values = { + "allowed", + "approval_required", + "denied", + } + ALLOWED: ClassVar["RemediationGuardrailVerdict"] + APPROVAL_REQUIRED: ClassVar["RemediationGuardrailVerdict"] + DENIED: ClassVar["RemediationGuardrailVerdict"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationGuardrailVerdict.ALLOWED = RemediationGuardrailVerdict("allowed") +RemediationGuardrailVerdict.APPROVAL_REQUIRED = RemediationGuardrailVerdict("approval_required") +RemediationGuardrailVerdict.DENIED = RemediationGuardrailVerdict("denied") diff --git a/src/datadog_api_client/v2/model/remediation_history_event.py b/src/datadog_api_client/v2/model/remediation_history_event.py new file mode 100644 index 0000000000..363d68ee91 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_history_event.py @@ -0,0 +1,64 @@ +# 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 + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RemediationHistoryEvent(ModelNormal): + @cached_property + def openapi_types(_): + return { + "event_type": (str,), + "id": (str,), + "payload": (str,), + "timestamp_ms": (str,), + } + + attribute_map = { + "event_type": "event_type", + "id": "id", + "payload": "payload", + "timestamp_ms": "timestamp_ms", + } + + def __init__( + self_, + event_type: Union[str, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + payload: Union[str, UnsetType] = unset, + timestamp_ms: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A single event in the investigation history. + + :param event_type: The type of event. + :type event_type: str, optional + + :param id: History event ID. + :type id: str, optional + + :param payload: Opaque JSON event body, base64-encoded. Decode and parse according to event_type. + :type payload: str, optional + + :param timestamp_ms: Event time in epoch milliseconds (64-bit integer encoded as a string). + :type timestamp_ms: str, optional + """ + if event_type is not unset: + kwargs["event_type"] = event_type + if id is not unset: + kwargs["id"] = id + if payload is not unset: + kwargs["payload"] = payload + if timestamp_ms is not unset: + kwargs["timestamp_ms"] = timestamp_ms + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_investigation.py b/src/datadog_api_client/v2/model/remediation_investigation.py new file mode 100644 index 0000000000..3690b7fc15 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_investigation.py @@ -0,0 +1,152 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.remediation_code_session import RemediationCodeSession + from datadog_api_client.v2.model.remediation_guardrail_decision import RemediationGuardrailDecision + from datadog_api_client.v2.model.remediation_history_event import RemediationHistoryEvent + from datadog_api_client.v2.model.remediation_ecs_metadata import RemediationEcsMetadata + from datadog_api_client.v2.model.remediation_plan import RemediationPlan + from datadog_api_client.v2.model.remediation_investigation_status import RemediationInvestigationStatus + + +class RemediationInvestigation(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_code_session import RemediationCodeSession + from datadog_api_client.v2.model.remediation_guardrail_decision import RemediationGuardrailDecision + from datadog_api_client.v2.model.remediation_history_event import RemediationHistoryEvent + from datadog_api_client.v2.model.remediation_ecs_metadata import RemediationEcsMetadata + from datadog_api_client.v2.model.remediation_plan import RemediationPlan + from datadog_api_client.v2.model.remediation_investigation_status import RemediationInvestigationStatus + + return { + "code_session": (RemediationCodeSession,), + "created_at_ms": (str,), + "guardrail_decision": (RemediationGuardrailDecision,), + "history": ([RemediationHistoryEvent],), + "id": (str,), + "issue_type": (str,), + "last_action_at_ms": (str,), + "metadata": (RemediationEcsMetadata,), + "org_id": (str,), + "plan": (RemediationPlan,), + "resource_arn": (str,), + "status": (RemediationInvestigationStatus,), + "updated_at_ms": (str,), + } + + attribute_map = { + "code_session": "code_session", + "created_at_ms": "created_at_ms", + "guardrail_decision": "guardrail_decision", + "history": "history", + "id": "id", + "issue_type": "issue_type", + "last_action_at_ms": "last_action_at_ms", + "metadata": "metadata", + "org_id": "org_id", + "plan": "plan", + "resource_arn": "resource_arn", + "status": "status", + "updated_at_ms": "updated_at_ms", + } + + def __init__( + self_, + code_session: Union[RemediationCodeSession, UnsetType] = unset, + created_at_ms: Union[str, UnsetType] = unset, + guardrail_decision: Union[RemediationGuardrailDecision, UnsetType] = unset, + history: Union[List[RemediationHistoryEvent], UnsetType] = unset, + id: Union[str, UnsetType] = unset, + issue_type: Union[str, UnsetType] = unset, + last_action_at_ms: Union[str, UnsetType] = unset, + metadata: Union[RemediationEcsMetadata, UnsetType] = unset, + org_id: Union[str, UnsetType] = unset, + plan: Union[RemediationPlan, UnsetType] = unset, + resource_arn: Union[str, UnsetType] = unset, + status: Union[RemediationInvestigationStatus, UnsetType] = unset, + updated_at_ms: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A single ECS remediation investigation: a detected issue together with its proposed plan, history, and ECS workload metadata. + + :param code_session: A linked code session (for example, a pull request) for the investigation. + :type code_session: RemediationCodeSession, optional + + :param created_at_ms: Creation time in epoch milliseconds (64-bit integer encoded as a string). + :type created_at_ms: str, optional + + :param guardrail_decision: The guardrail decision applied to a plan or investigation. + :type guardrail_decision: RemediationGuardrailDecision, optional + + :param history: Ordered list of history events for the investigation. + :type history: [RemediationHistoryEvent], optional + + :param id: Unique investigation ID. + :type id: str, optional + + :param issue_type: The detected issue type. + :type issue_type: str, optional + + :param last_action_at_ms: Time of the last action in epoch milliseconds (64-bit integer encoded as a string). + :type last_action_at_ms: str, optional + + :param metadata: ECS-specific context for the investigation. + :type metadata: RemediationEcsMetadata, optional + + :param org_id: Datadog organization ID that owns the investigation (64-bit integer encoded as a string). + :type org_id: str, optional + + :param plan: The remediation plan proposed by the ECS remediation agent. + :type plan: RemediationPlan, optional + + :param resource_arn: ARN of the ECS resource the investigation is about. + :type resource_arn: str, optional + + :param status: Investigation status. + :type status: RemediationInvestigationStatus, optional + + :param updated_at_ms: Last update time in epoch milliseconds (64-bit integer encoded as a string). + :type updated_at_ms: str, optional + """ + if code_session is not unset: + kwargs["code_session"] = code_session + if created_at_ms is not unset: + kwargs["created_at_ms"] = created_at_ms + if guardrail_decision is not unset: + kwargs["guardrail_decision"] = guardrail_decision + if history is not unset: + kwargs["history"] = history + if id is not unset: + kwargs["id"] = id + if issue_type is not unset: + kwargs["issue_type"] = issue_type + if last_action_at_ms is not unset: + kwargs["last_action_at_ms"] = last_action_at_ms + if metadata is not unset: + kwargs["metadata"] = metadata + if org_id is not unset: + kwargs["org_id"] = org_id + if plan is not unset: + kwargs["plan"] = plan + if resource_arn is not unset: + kwargs["resource_arn"] = resource_arn + if status is not unset: + kwargs["status"] = status + if updated_at_ms is not unset: + kwargs["updated_at_ms"] = updated_at_ms + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_investigation_status.py b/src/datadog_api_client/v2/model/remediation_investigation_status.py new file mode 100644 index 0000000000..fe77c273be --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_investigation_status.py @@ -0,0 +1,47 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationInvestigationStatus(ModelSimple): + """ + Investigation status. + + :param value: Must be one of ["open", "approval_required", "executing", "succeeded", "failed"]. + :type value: str + """ + + allowed_values = { + "open", + "approval_required", + "executing", + "succeeded", + "failed", + } + OPEN: ClassVar["RemediationInvestigationStatus"] + APPROVAL_REQUIRED: ClassVar["RemediationInvestigationStatus"] + EXECUTING: ClassVar["RemediationInvestigationStatus"] + SUCCEEDED: ClassVar["RemediationInvestigationStatus"] + FAILED: ClassVar["RemediationInvestigationStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationInvestigationStatus.OPEN = RemediationInvestigationStatus("open") +RemediationInvestigationStatus.APPROVAL_REQUIRED = RemediationInvestigationStatus("approval_required") +RemediationInvestigationStatus.EXECUTING = RemediationInvestigationStatus("executing") +RemediationInvestigationStatus.SUCCEEDED = RemediationInvestigationStatus("succeeded") +RemediationInvestigationStatus.FAILED = RemediationInvestigationStatus("failed") diff --git a/src/datadog_api_client/v2/model/remediation_launch_type.py b/src/datadog_api_client/v2/model/remediation_launch_type.py new file mode 100644 index 0000000000..72ab5b5b7d --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_launch_type.py @@ -0,0 +1,38 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationLaunchType(ModelSimple): + """ + ECS launch type. + + :param value: Must be one of ["EC2", "FARGATE"]. + :type value: str + """ + + allowed_values = { + "EC2", + "FARGATE", + } + EC2: ClassVar["RemediationLaunchType"] + FARGATE: ClassVar["RemediationLaunchType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationLaunchType.EC2 = RemediationLaunchType("EC2") +RemediationLaunchType.FARGATE = RemediationLaunchType("FARGATE") diff --git a/src/datadog_api_client/v2/model/remediation_list_investigations_response.py b/src/datadog_api_client/v2/model/remediation_list_investigations_response.py new file mode 100644 index 0000000000..efb98a70bb --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_list_investigations_response.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.remediation_investigation import RemediationInvestigation + + +class RemediationListInvestigationsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_investigation import RemediationInvestigation + + return { + "investigations": ([RemediationInvestigation],), + "next_page_token": (str,), + } + + attribute_map = { + "investigations": "investigations", + "next_page_token": "next_page_token", + } + + def __init__( + self_, + investigations: Union[List[RemediationInvestigation], UnsetType] = unset, + next_page_token: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Response payload for listing investigations. + + :param investigations: The matching investigations. + :type investigations: [RemediationInvestigation], optional + + :param next_page_token: Token to pass as page_token on the next call. Empty when there are no further pages. + :type next_page_token: str, optional + """ + if investigations is not unset: + kwargs["investigations"] = investigations + if next_page_token is not unset: + kwargs["next_page_token"] = next_page_token + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_plan.py b/src/datadog_api_client/v2/model/remediation_plan.py new file mode 100644 index 0000000000..d01b831d81 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_plan.py @@ -0,0 +1,112 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.remediation_confidence import RemediationConfidence + from datadog_api_client.v2.model.remediation_guardrail_decision import RemediationGuardrailDecision + from datadog_api_client.v2.model.remediation_plan_source import RemediationPlanSource + from datadog_api_client.v2.model.remediation_proposed_fix import RemediationProposedFix + from datadog_api_client.v2.model.remediation_plan_status import RemediationPlanStatus + from datadog_api_client.v2.model.remediation_step import RemediationStep + + +class RemediationPlan(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_confidence import RemediationConfidence + from datadog_api_client.v2.model.remediation_guardrail_decision import RemediationGuardrailDecision + from datadog_api_client.v2.model.remediation_plan_source import RemediationPlanSource + from datadog_api_client.v2.model.remediation_proposed_fix import RemediationProposedFix + from datadog_api_client.v2.model.remediation_plan_status import RemediationPlanStatus + from datadog_api_client.v2.model.remediation_step import RemediationStep + + return { + "confidence": (RemediationConfidence,), + "evidence": (str,), + "explanation": (str,), + "guardrail_decision": (RemediationGuardrailDecision,), + "plan_source": (RemediationPlanSource,), + "proposed_fix": ([RemediationProposedFix],), + "status": (RemediationPlanStatus,), + "steps": ([RemediationStep],), + } + + attribute_map = { + "confidence": "confidence", + "evidence": "evidence", + "explanation": "explanation", + "guardrail_decision": "guardrail_decision", + "plan_source": "plan_source", + "proposed_fix": "proposed_fix", + "status": "status", + "steps": "steps", + } + + def __init__( + self_, + confidence: Union[RemediationConfidence, UnsetType] = unset, + evidence: Union[str, UnsetType] = unset, + explanation: Union[str, UnsetType] = unset, + guardrail_decision: Union[RemediationGuardrailDecision, UnsetType] = unset, + plan_source: Union[RemediationPlanSource, UnsetType] = unset, + proposed_fix: Union[List[RemediationProposedFix], UnsetType] = unset, + status: Union[RemediationPlanStatus, UnsetType] = unset, + steps: Union[List[RemediationStep], UnsetType] = unset, + **kwargs, + ): + """ + The remediation plan proposed by the ECS remediation agent. + + :param confidence: The agent's self-rated confidence in a plan. + :type confidence: RemediationConfidence, optional + + :param evidence: Evidence supporting the diagnosis. Treat as user-provided content and escape before display. + :type evidence: str, optional + + :param explanation: Human-readable summary of why the plan was proposed. Treat as user-provided content and escape before display. + :type explanation: str, optional + + :param guardrail_decision: The guardrail decision applied to a plan or investigation. + :type guardrail_decision: RemediationGuardrailDecision, optional + + :param plan_source: How the plan was produced. + :type plan_source: RemediationPlanSource, optional + + :param proposed_fix: Recommendation-oriented view of the candidate remediations, distinct from the execution-oriented steps. + :type proposed_fix: [RemediationProposedFix], optional + + :param status: Plan status. + :type status: RemediationPlanStatus, optional + + :param steps: Execution-oriented steps that make up the plan. + :type steps: [RemediationStep], optional + """ + if confidence is not unset: + kwargs["confidence"] = confidence + if evidence is not unset: + kwargs["evidence"] = evidence + if explanation is not unset: + kwargs["explanation"] = explanation + if guardrail_decision is not unset: + kwargs["guardrail_decision"] = guardrail_decision + if plan_source is not unset: + kwargs["plan_source"] = plan_source + if proposed_fix is not unset: + kwargs["proposed_fix"] = proposed_fix + if status is not unset: + kwargs["status"] = status + if steps is not unset: + kwargs["steps"] = steps + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_plan_source.py b/src/datadog_api_client/v2/model/remediation_plan_source.py new file mode 100644 index 0000000000..9317443883 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_plan_source.py @@ -0,0 +1,38 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationPlanSource(ModelSimple): + """ + How the plan was produced. + + :param value: Must be one of ["deterministic", "ai"]. + :type value: str + """ + + allowed_values = { + "deterministic", + "ai", + } + DETERMINISTIC: ClassVar["RemediationPlanSource"] + AI: ClassVar["RemediationPlanSource"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationPlanSource.DETERMINISTIC = RemediationPlanSource("deterministic") +RemediationPlanSource.AI = RemediationPlanSource("ai") diff --git a/src/datadog_api_client/v2/model/remediation_plan_status.py b/src/datadog_api_client/v2/model/remediation_plan_status.py new file mode 100644 index 0000000000..0c9d18f6a8 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_plan_status.py @@ -0,0 +1,44 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationPlanStatus(ModelSimple): + """ + Plan status. + + :param value: Must be one of ["pending", "in_progress", "completed", "failed"]. + :type value: str + """ + + allowed_values = { + "pending", + "in_progress", + "completed", + "failed", + } + PENDING: ClassVar["RemediationPlanStatus"] + IN_PROGRESS: ClassVar["RemediationPlanStatus"] + COMPLETED: ClassVar["RemediationPlanStatus"] + FAILED: ClassVar["RemediationPlanStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationPlanStatus.PENDING = RemediationPlanStatus("pending") +RemediationPlanStatus.IN_PROGRESS = RemediationPlanStatus("in_progress") +RemediationPlanStatus.COMPLETED = RemediationPlanStatus("completed") +RemediationPlanStatus.FAILED = RemediationPlanStatus("failed") diff --git a/src/datadog_api_client/v2/model/remediation_problem_container.py b/src/datadog_api_client/v2/model/remediation_problem_container.py new file mode 100644 index 0000000000..535dbbf026 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_problem_container.py @@ -0,0 +1,102 @@ +# 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 + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RemediationProblemContainer(ModelNormal): + validations = { + "exit_code": { + "inclusive_maximum": 255, + }, + } + + @cached_property + def openapi_types(_): + return { + "cpu_limit": (int,), + "exit_code": (int,), + "health_status": (str,), + "image": (str,), + "last_status": (str,), + "memory_limit_mib": (int,), + "name": (str,), + "reason": (str,), + } + + attribute_map = { + "cpu_limit": "cpu_limit", + "exit_code": "exit_code", + "health_status": "health_status", + "image": "image", + "last_status": "last_status", + "memory_limit_mib": "memory_limit_mib", + "name": "name", + "reason": "reason", + } + + def __init__( + self_, + cpu_limit: Union[int, UnsetType] = unset, + exit_code: Union[int, UnsetType] = unset, + health_status: Union[str, UnsetType] = unset, + image: Union[str, UnsetType] = unset, + last_status: Union[str, UnsetType] = unset, + memory_limit_mib: Union[int, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + reason: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A container within a problematic task that is exhibiting issues. + + :param cpu_limit: CPU limit. + :type cpu_limit: int, optional + + :param exit_code: Exit code if the container stopped. + :type exit_code: int, optional + + :param health_status: Container health status. + :type health_status: str, optional + + :param image: Docker image URI. + :type image: str, optional + + :param last_status: Container status. + :type last_status: str, optional + + :param memory_limit_mib: Memory limit in MiB. + :type memory_limit_mib: int, optional + + :param name: Container name from the task definition. + :type name: str, optional + + :param reason: Stop reason. + :type reason: str, optional + """ + if cpu_limit is not unset: + kwargs["cpu_limit"] = cpu_limit + if exit_code is not unset: + kwargs["exit_code"] = exit_code + if health_status is not unset: + kwargs["health_status"] = health_status + if image is not unset: + kwargs["image"] = image + if last_status is not unset: + kwargs["last_status"] = last_status + if memory_limit_mib is not unset: + kwargs["memory_limit_mib"] = memory_limit_mib + if name is not unset: + kwargs["name"] = name + if reason is not unset: + kwargs["reason"] = reason + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_problem_task.py b/src/datadog_api_client/v2/model/remediation_problem_task.py new file mode 100644 index 0000000000..f08836e15f --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_problem_task.py @@ -0,0 +1,184 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.remediation_problem_container import RemediationProblemContainer + from datadog_api_client.v2.model.remediation_launch_type import RemediationLaunchType + + +class RemediationProblemTask(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_problem_container import RemediationProblemContainer + from datadog_api_client.v2.model.remediation_launch_type import RemediationLaunchType + + return { + "availability_zone": (str,), + "container_instance_arn": (str,), + "containers": ([RemediationProblemContainer],), + "cpu_units": (str,), + "desired_status": (str,), + "execution_role_arn": (str,), + "health_status": (str,), + "issue_start_time": (str,), + "issue_type": (str,), + "last_status": (str,), + "launch_type": (RemediationLaunchType,), + "memory_mib": (str,), + "stop_code": (str,), + "stopped_reason": (str,), + "tags": ([str],), + "task_arn": (str,), + "task_definition_arn": (str,), + "task_role_arn": (str,), + } + + attribute_map = { + "availability_zone": "availability_zone", + "container_instance_arn": "container_instance_arn", + "containers": "containers", + "cpu_units": "cpu_units", + "desired_status": "desired_status", + "execution_role_arn": "execution_role_arn", + "health_status": "health_status", + "issue_start_time": "issue_start_time", + "issue_type": "issue_type", + "last_status": "last_status", + "launch_type": "launch_type", + "memory_mib": "memory_mib", + "stop_code": "stop_code", + "stopped_reason": "stopped_reason", + "tags": "tags", + "task_arn": "task_arn", + "task_definition_arn": "task_definition_arn", + "task_role_arn": "task_role_arn", + } + + def __init__( + self_, + availability_zone: Union[str, UnsetType] = unset, + container_instance_arn: Union[str, UnsetType] = unset, + containers: Union[List[RemediationProblemContainer], UnsetType] = unset, + cpu_units: Union[str, UnsetType] = unset, + desired_status: Union[str, UnsetType] = unset, + execution_role_arn: Union[str, UnsetType] = unset, + health_status: Union[str, UnsetType] = unset, + issue_start_time: Union[str, UnsetType] = unset, + issue_type: Union[str, UnsetType] = unset, + last_status: Union[str, UnsetType] = unset, + launch_type: Union[RemediationLaunchType, UnsetType] = unset, + memory_mib: Union[str, UnsetType] = unset, + stop_code: Union[str, UnsetType] = unset, + stopped_reason: Union[str, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + task_arn: Union[str, UnsetType] = unset, + task_definition_arn: Union[str, UnsetType] = unset, + task_role_arn: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + An individual ECS task in a problematic state. + + :param availability_zone: Availability zone where the task is running. + :type availability_zone: str, optional + + :param container_instance_arn: Container instance ARN (EC2 launch type only). + :type container_instance_arn: str, optional + + :param containers: Problematic containers within the task. + :type containers: [RemediationProblemContainer], optional + + :param cpu_units: CPU units allocated to the task (64-bit integer encoded as a string). + :type cpu_units: str, optional + + :param desired_status: Desired task status. + :type desired_status: str, optional + + :param execution_role_arn: IAM role used by ECS to pull images and fetch secrets. + :type execution_role_arn: str, optional + + :param health_status: Task-level health status. + :type health_status: str, optional + + :param issue_start_time: When this task's issue started, epoch milliseconds (64-bit integer encoded as a string). + :type issue_start_time: str, optional + + :param issue_type: Issue type for this specific task. + :type issue_type: str, optional + + :param last_status: Current task status. + :type last_status: str, optional + + :param launch_type: ECS launch type. + :type launch_type: RemediationLaunchType, optional + + :param memory_mib: Memory in MiB allocated to the task (64-bit integer encoded as a string). + :type memory_mib: str, optional + + :param stop_code: Stop code if the task was stopped. + :type stop_code: str, optional + + :param stopped_reason: Stop reason if the task was stopped. + :type stopped_reason: str, optional + + :param tags: Task-level tags. + :type tags: [str], optional + + :param task_arn: Full task ARN. + :type task_arn: str, optional + + :param task_definition_arn: Task definition ARN with revision. + :type task_definition_arn: str, optional + + :param task_role_arn: IAM role used by the task at runtime. + :type task_role_arn: str, optional + """ + if availability_zone is not unset: + kwargs["availability_zone"] = availability_zone + if container_instance_arn is not unset: + kwargs["container_instance_arn"] = container_instance_arn + if containers is not unset: + kwargs["containers"] = containers + if cpu_units is not unset: + kwargs["cpu_units"] = cpu_units + if desired_status is not unset: + kwargs["desired_status"] = desired_status + if execution_role_arn is not unset: + kwargs["execution_role_arn"] = execution_role_arn + if health_status is not unset: + kwargs["health_status"] = health_status + if issue_start_time is not unset: + kwargs["issue_start_time"] = issue_start_time + if issue_type is not unset: + kwargs["issue_type"] = issue_type + if last_status is not unset: + kwargs["last_status"] = last_status + if launch_type is not unset: + kwargs["launch_type"] = launch_type + if memory_mib is not unset: + kwargs["memory_mib"] = memory_mib + if stop_code is not unset: + kwargs["stop_code"] = stop_code + if stopped_reason is not unset: + kwargs["stopped_reason"] = stopped_reason + if tags is not unset: + kwargs["tags"] = tags + if task_arn is not unset: + kwargs["task_arn"] = task_arn + if task_definition_arn is not unset: + kwargs["task_definition_arn"] = task_definition_arn + if task_role_arn is not unset: + kwargs["task_role_arn"] = task_role_arn + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_proposed_fix.py b/src/datadog_api_client/v2/model/remediation_proposed_fix.py new file mode 100644 index 0000000000..3df5c1d582 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_proposed_fix.py @@ -0,0 +1,70 @@ +# 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.remediation_risk_level import RemediationRiskLevel + + +class RemediationProposedFix(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_risk_level import RemediationRiskLevel + + return { + "description": (str,), + "reversible": (bool,), + "risk": (RemediationRiskLevel,), + "title": (str,), + } + + attribute_map = { + "description": "description", + "reversible": "reversible", + "risk": "risk", + "title": "title", + } + + def __init__( + self_, + description: Union[str, UnsetType] = unset, + reversible: Union[bool, UnsetType] = unset, + risk: Union[RemediationRiskLevel, UnsetType] = unset, + title: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A recommendation-oriented summary of a candidate remediation. + + :param description: Explanation of the proposed change and why it resolves the root cause. Treat as user-provided content and escape before display. + :type description: str, optional + + :param reversible: Whether the proposed fix can be reversed after execution. + :type reversible: bool, optional + + :param risk: Estimated risk of a remediation step or proposed fix. + :type risk: RemediationRiskLevel, optional + + :param title: Short title for the proposed fix. + :type title: str, optional + """ + if description is not unset: + kwargs["description"] = description + if reversible is not unset: + kwargs["reversible"] = reversible + if risk is not unset: + kwargs["risk"] = risk + if title is not unset: + kwargs["title"] = title + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_pull_request_status.py b/src/datadog_api_client/v2/model/remediation_pull_request_status.py new file mode 100644 index 0000000000..8dacd7b64d --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_pull_request_status.py @@ -0,0 +1,41 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationPullRequestStatus(ModelSimple): + """ + Pull request status for a linked code session. + + :param value: Must be one of ["open", "closed", "merged"]. + :type value: str + """ + + allowed_values = { + "open", + "closed", + "merged", + } + OPEN: ClassVar["RemediationPullRequestStatus"] + CLOSED: ClassVar["RemediationPullRequestStatus"] + MERGED: ClassVar["RemediationPullRequestStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationPullRequestStatus.OPEN = RemediationPullRequestStatus("open") +RemediationPullRequestStatus.CLOSED = RemediationPullRequestStatus("closed") +RemediationPullRequestStatus.MERGED = RemediationPullRequestStatus("merged") diff --git a/src/datadog_api_client/v2/model/remediation_risk_level.py b/src/datadog_api_client/v2/model/remediation_risk_level.py new file mode 100644 index 0000000000..403c804303 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_risk_level.py @@ -0,0 +1,41 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationRiskLevel(ModelSimple): + """ + Estimated risk of a remediation step or proposed fix. + + :param value: Must be one of ["low", "medium", "high"]. + :type value: str + """ + + allowed_values = { + "low", + "medium", + "high", + } + LOW: ClassVar["RemediationRiskLevel"] + MEDIUM: ClassVar["RemediationRiskLevel"] + HIGH: ClassVar["RemediationRiskLevel"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationRiskLevel.LOW = RemediationRiskLevel("low") +RemediationRiskLevel.MEDIUM = RemediationRiskLevel("medium") +RemediationRiskLevel.HIGH = RemediationRiskLevel("high") diff --git a/src/datadog_api_client/v2/model/remediation_step.py b/src/datadog_api_client/v2/model/remediation_step.py new file mode 100644 index 0000000000..ae988f63a2 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_step.py @@ -0,0 +1,88 @@ +# 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.remediation_step_approval_state import RemediationStepApprovalState + from datadog_api_client.v2.model.remediation_risk_level import RemediationRiskLevel + + +class RemediationStep(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_step_approval_state import RemediationStepApprovalState + from datadog_api_client.v2.model.remediation_risk_level import RemediationRiskLevel + + return { + "action_fqn": (str,), + "approval_state": (RemediationStepApprovalState,), + "description": (str,), + "reversible": (bool,), + "risk": (RemediationRiskLevel,), + "step_id": (str,), + } + + attribute_map = { + "action_fqn": "action_fqn", + "approval_state": "approval_state", + "description": "description", + "reversible": "reversible", + "risk": "risk", + "step_id": "step_id", + } + + def __init__( + self_, + action_fqn: Union[str, UnsetType] = unset, + approval_state: Union[RemediationStepApprovalState, UnsetType] = unset, + description: Union[str, UnsetType] = unset, + reversible: Union[bool, UnsetType] = unset, + risk: Union[RemediationRiskLevel, UnsetType] = unset, + step_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A single execution-oriented step in a remediation plan. + + :param action_fqn: Fully qualified action type, for example ecs.update_service_memory. + :type action_fqn: str, optional + + :param approval_state: Approval state for a remediation step. + :type approval_state: RemediationStepApprovalState, optional + + :param description: Human-readable description of the step. + :type description: str, optional + + :param reversible: Whether the step can be reversed after execution. + :type reversible: bool, optional + + :param risk: Estimated risk of a remediation step or proposed fix. + :type risk: RemediationRiskLevel, optional + + :param step_id: Unique ID for the step within the plan. + :type step_id: str, optional + """ + if action_fqn is not unset: + kwargs["action_fqn"] = action_fqn + if approval_state is not unset: + kwargs["approval_state"] = approval_state + if description is not unset: + kwargs["description"] = description + if reversible is not unset: + kwargs["reversible"] = reversible + if risk is not unset: + kwargs["risk"] = risk + if step_id is not unset: + kwargs["step_id"] = step_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_step_approval_state.py b/src/datadog_api_client/v2/model/remediation_step_approval_state.py new file mode 100644 index 0000000000..b11f3ce6ac --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_step_approval_state.py @@ -0,0 +1,41 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationStepApprovalState(ModelSimple): + """ + Approval state for a remediation step. + + :param value: Must be one of ["pending_approval", "approved", "rejected"]. + :type value: str + """ + + allowed_values = { + "pending_approval", + "approved", + "rejected", + } + PENDING_APPROVAL: ClassVar["RemediationStepApprovalState"] + APPROVED: ClassVar["RemediationStepApprovalState"] + REJECTED: ClassVar["RemediationStepApprovalState"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationStepApprovalState.PENDING_APPROVAL = RemediationStepApprovalState("pending_approval") +RemediationStepApprovalState.APPROVED = RemediationStepApprovalState("approved") +RemediationStepApprovalState.REJECTED = RemediationStepApprovalState("rejected") diff --git a/src/datadog_api_client/v2/model/remediation_workload_summary.py b/src/datadog_api_client/v2/model/remediation_workload_summary.py new file mode 100644 index 0000000000..65e3357fb6 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_workload_summary.py @@ -0,0 +1,94 @@ +# 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.remediation_deployment_rollout_state import RemediationDeploymentRolloutState + + +class RemediationWorkloadSummary(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.remediation_deployment_rollout_state import RemediationDeploymentRolloutState + + return { + "deployment_rollout_state": (RemediationDeploymentRolloutState,), + "desired_count": (str,), + "failed_count": (str,), + "failed_percent": (str,), + "pending_count": (str,), + "previous_task_definition": (str,), + "running_count": (str,), + } + + attribute_map = { + "deployment_rollout_state": "deployment_rollout_state", + "desired_count": "desired_count", + "failed_count": "failed_count", + "failed_percent": "failed_percent", + "pending_count": "pending_count", + "previous_task_definition": "previous_task_definition", + "running_count": "running_count", + } + + def __init__( + self_, + deployment_rollout_state: Union[RemediationDeploymentRolloutState, UnsetType] = unset, + desired_count: Union[str, UnsetType] = unset, + failed_count: Union[str, UnsetType] = unset, + failed_percent: Union[str, UnsetType] = unset, + pending_count: Union[str, UnsetType] = unset, + previous_task_definition: Union[str, UnsetType] = unset, + running_count: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Aggregated health across all tasks in a workload (service or daemon). + + :param deployment_rollout_state: ECS deployment state, populated only for deployment failures. + :type deployment_rollout_state: RemediationDeploymentRolloutState, optional + + :param desired_count: Expected task count (64-bit integer encoded as a string). + :type desired_count: str, optional + + :param failed_count: Tasks in a problematic state (64-bit integer encoded as a string). + :type failed_count: str, optional + + :param failed_percent: Percentage of desired count that is failed (64-bit integer encoded as a string). + :type failed_percent: str, optional + + :param pending_count: Tasks currently pending (64-bit integer encoded as a string). + :type pending_count: str, optional + + :param previous_task_definition: Previous deployment's task definition, as family:revision or a full task definition ARN. Empty when no rollback target is visible. + :type previous_task_definition: str, optional + + :param running_count: Tasks currently running (64-bit integer encoded as a string). + :type running_count: str, optional + """ + if deployment_rollout_state is not unset: + kwargs["deployment_rollout_state"] = deployment_rollout_state + if desired_count is not unset: + kwargs["desired_count"] = desired_count + if failed_count is not unset: + kwargs["failed_count"] = failed_count + if failed_percent is not unset: + kwargs["failed_percent"] = failed_percent + if pending_count is not unset: + kwargs["pending_count"] = pending_count + if previous_task_definition is not unset: + kwargs["previous_task_definition"] = previous_task_definition + if running_count is not unset: + kwargs["running_count"] = running_count + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/remediation_workload_type.py b/src/datadog_api_client/v2/model/remediation_workload_type.py new file mode 100644 index 0000000000..905f92b386 --- /dev/null +++ b/src/datadog_api_client/v2/model/remediation_workload_type.py @@ -0,0 +1,44 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RemediationWorkloadType(ModelSimple): + """ + The kind of ECS workload that owns the problematic tasks. + + :param value: Must be one of ["WORKLOAD_TYPE_UNSPECIFIED", "SERVICE", "STANDALONE_TASK", "DAEMON"]. + :type value: str + """ + + allowed_values = { + "WORKLOAD_TYPE_UNSPECIFIED", + "SERVICE", + "STANDALONE_TASK", + "DAEMON", + } + WORKLOAD_TYPE_UNSPECIFIED: ClassVar["RemediationWorkloadType"] + SERVICE: ClassVar["RemediationWorkloadType"] + STANDALONE_TASK: ClassVar["RemediationWorkloadType"] + DAEMON: ClassVar["RemediationWorkloadType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RemediationWorkloadType.WORKLOAD_TYPE_UNSPECIFIED = RemediationWorkloadType("WORKLOAD_TYPE_UNSPECIFIED") +RemediationWorkloadType.SERVICE = RemediationWorkloadType("SERVICE") +RemediationWorkloadType.STANDALONE_TASK = RemediationWorkloadType("STANDALONE_TASK") +RemediationWorkloadType.DAEMON = RemediationWorkloadType("DAEMON") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 9413425cce..59bd942bbb 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -6489,6 +6489,32 @@ from datadog_api_client.v2.model.relationship_to_user_team_user_data import RelationshipToUserTeamUserData from datadog_api_client.v2.model.relationship_to_users import RelationshipToUsers from datadog_api_client.v2.model.remediation import Remediation +from datadog_api_client.v2.model.remediation_code_session import RemediationCodeSession +from datadog_api_client.v2.model.remediation_confidence import RemediationConfidence +from datadog_api_client.v2.model.remediation_deployment_rollout_state import RemediationDeploymentRolloutState +from datadog_api_client.v2.model.remediation_ecs_metadata import RemediationEcsMetadata +from datadog_api_client.v2.model.remediation_execute_request import RemediationExecuteRequest +from datadog_api_client.v2.model.remediation_execute_response import RemediationExecuteResponse +from datadog_api_client.v2.model.remediation_get_investigation_response import RemediationGetInvestigationResponse +from datadog_api_client.v2.model.remediation_guardrail_decision import RemediationGuardrailDecision +from datadog_api_client.v2.model.remediation_guardrail_verdict import RemediationGuardrailVerdict +from datadog_api_client.v2.model.remediation_history_event import RemediationHistoryEvent +from datadog_api_client.v2.model.remediation_investigation import RemediationInvestigation +from datadog_api_client.v2.model.remediation_investigation_status import RemediationInvestigationStatus +from datadog_api_client.v2.model.remediation_launch_type import RemediationLaunchType +from datadog_api_client.v2.model.remediation_list_investigations_response import RemediationListInvestigationsResponse +from datadog_api_client.v2.model.remediation_plan import RemediationPlan +from datadog_api_client.v2.model.remediation_plan_source import RemediationPlanSource +from datadog_api_client.v2.model.remediation_plan_status import RemediationPlanStatus +from datadog_api_client.v2.model.remediation_problem_container import RemediationProblemContainer +from datadog_api_client.v2.model.remediation_problem_task import RemediationProblemTask +from datadog_api_client.v2.model.remediation_proposed_fix import RemediationProposedFix +from datadog_api_client.v2.model.remediation_pull_request_status import RemediationPullRequestStatus +from datadog_api_client.v2.model.remediation_risk_level import RemediationRiskLevel +from datadog_api_client.v2.model.remediation_step import RemediationStep +from datadog_api_client.v2.model.remediation_step_approval_state import RemediationStepApprovalState +from datadog_api_client.v2.model.remediation_workload_summary import RemediationWorkloadSummary +from datadog_api_client.v2.model.remediation_workload_type import RemediationWorkloadType from datadog_api_client.v2.model.reorder_retention_filters_request import ReorderRetentionFiltersRequest from datadog_api_client.v2.model.reorder_rule_resource_array import ReorderRuleResourceArray from datadog_api_client.v2.model.reorder_rule_resource_data import ReorderRuleResourceData @@ -14069,6 +14095,32 @@ "RelationshipToUserTeamUserData", "RelationshipToUsers", "Remediation", + "RemediationCodeSession", + "RemediationConfidence", + "RemediationDeploymentRolloutState", + "RemediationEcsMetadata", + "RemediationExecuteRequest", + "RemediationExecuteResponse", + "RemediationGetInvestigationResponse", + "RemediationGuardrailDecision", + "RemediationGuardrailVerdict", + "RemediationHistoryEvent", + "RemediationInvestigation", + "RemediationInvestigationStatus", + "RemediationLaunchType", + "RemediationListInvestigationsResponse", + "RemediationPlan", + "RemediationPlanSource", + "RemediationPlanStatus", + "RemediationProblemContainer", + "RemediationProblemTask", + "RemediationProposedFix", + "RemediationPullRequestStatus", + "RemediationRiskLevel", + "RemediationStep", + "RemediationStepApprovalState", + "RemediationWorkloadSummary", + "RemediationWorkloadType", "ReorderRetentionFiltersRequest", "ReorderRuleResourceArray", "ReorderRuleResourceData",