diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6bc9597abb62..65fad375253b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -20573,6 +20573,48 @@ components: - PIPELINES_FAILED_DESCENDING - PIPELINES_DURATION_LOST_ASCENDING - PIPELINES_DURATION_LOST_DESCENDING + FleetAgentVersion: + description: Represents an available Datadog Agent version. + properties: + attributes: + $ref: '#/components/schemas/FleetAgentVersionAttributes' + id: + description: Unique identifier for the Agent version (same as version). + example: 7.50.0 + type: string + type: + $ref: '#/components/schemas/FleetAgentVersionResourceType' + required: + - id + - type + type: object + FleetAgentVersionAttributes: + properties: + version: + description: The Agent version string. + example: 7.50.0 + type: string + type: object + FleetAgentVersionResourceType: + default: agent_version + description: The type of Agent version resource. + enum: + - agent_version + example: agent_version + type: string + x-enum-varnames: + - AGENT_VERSION + FleetAgentVersionsResponse: + description: Response containing a list of available Agent versions. + properties: + data: + description: Array of available Agent versions. + items: + $ref: '#/components/schemas/FleetAgentVersion' + type: array + required: + - data + type: object FleetDeployment: description: A deployment that defines automated configuration changes for a fleet of hosts. @@ -20611,10 +20653,30 @@ components: example: env:prod AND service:web type: string high_level_status: - description: Current high-level status of the deployment (for example, "pending", - "running", "completed", "failed"). + description: 'Current high-level status of the deployment (for example, + "pending", "running", + + "completed", "failed").' example: pending type: string + hosts: + description: 'Paginated list of hosts in this deployment with their individual + statuses. Only included + + when fetching a single deployment by ID. Use the `limit` and `page` query + parameters to + + navigate through pages. Pagination metadata is included in the response + `meta.hosts` field.' + items: + $ref: '#/components/schemas/FleetDeploymentHost' + type: array + packages: + description: List of packages to deploy to target hosts. Present only for + package upgrade deployments. + items: + $ref: '#/components/schemas/FleetDeploymentPackage' + type: array total_hosts: description: Total number of hosts targeted by this deployment. example: 42 @@ -20639,7 +20701,7 @@ components: - config_operations type: object FleetDeploymentConfigureCreate: - description: Data for creating a new deployment. + description: Data for creating a new configuration deployment. properties: attributes: $ref: '#/components/schemas/FleetDeploymentConfigureAttributes' @@ -20650,7 +20712,7 @@ components: - attributes type: object FleetDeploymentConfigureCreateRequest: - description: Request payload for creating a new deployment. + description: Request payload for creating a new configuration deployment. properties: data: $ref: '#/components/schemas/FleetDeploymentConfigureCreate' @@ -20670,6 +20732,76 @@ components: x-enum-varnames: - MERGE_PATCH - DELETE + FleetDeploymentHost: + description: A host that is part of a deployment with its current status. + properties: + error: + description: Error message if the deployment failed on this host. + example: '' + type: string + hostname: + description: The hostname of the agent. + example: web-server-01.example.com + type: string + status: + description: Current deployment status for this specific host. + example: succeeded + type: string + versions: + description: List of packages and their versions currently installed on + this host. + items: + $ref: '#/components/schemas/FleetDeploymentHostPackage' + type: array + type: object + FleetDeploymentHostPackage: + description: 'Package version information for a host, showing the initial version + before deployment, + + the target version to deploy, and the current version on the host.' + properties: + current_version: + description: The current version of the package on the host. + example: 7.51.0 + type: string + initial_version: + description: The initial version of the package on the host before the deployment + started. + example: 7.51.0 + type: string + package_name: + description: The name of the package. + example: datadog-agent + type: string + target_version: + description: The target version that the deployment is attempting to install. + example: 7.52.0 + type: string + type: object + FleetDeploymentHostsPage: + description: Pagination details for the list of hosts in a deployment. + properties: + current_page: + description: Current page index (zero-based). + example: 0 + format: int64 + type: integer + page_size: + description: Number of hosts returned per page. + example: 50 + format: int64 + type: integer + total_hosts: + description: Total number of hosts in this deployment. + example: 150 + format: int64 + type: integer + total_pages: + description: Total number of pages available. + example: 3 + format: int64 + type: integer + type: object FleetDeploymentOperation: description: A single configuration file operation to perform on the target hosts. @@ -20690,9 +20822,9 @@ components: the entire file. The structure must match the target configuration file format (for example, - YAML structure for Datadog Agent config). + YAML structure - Not applicable when using the `delete` operation.' + for Datadog Agent config). Not applicable when using the `delete` operation.' example: apm_config: enabled: true @@ -20703,6 +20835,57 @@ components: - file_op - file_path type: object + FleetDeploymentPackage: + description: A package and its target version for deployment. + properties: + name: + description: The name of the package to deploy. + example: datadog-agent + type: string + version: + description: The target version of the package to deploy. + example: 7.52.0 + type: string + required: + - name + - version + type: object + FleetDeploymentPackageUpgradeAttributes: + description: Attributes for creating a new package upgrade deployment. + properties: + filter_query: + description: Query used to filter and select target hosts for the deployment. + Uses the Datadog query syntax. + example: env:prod AND service:web + type: string + target_packages: + description: List of packages and their target versions to deploy to the + selected hosts. + items: + $ref: '#/components/schemas/FleetDeploymentPackage' + type: array + required: + - target_packages + type: object + FleetDeploymentPackageUpgradeCreate: + description: Data for creating a new package upgrade deployment. + properties: + attributes: + $ref: '#/components/schemas/FleetDeploymentPackageUpgradeAttributes' + type: + $ref: '#/components/schemas/FleetDeploymentResourceType' + required: + - type + - attributes + type: object + FleetDeploymentPackageUpgradeCreateRequest: + description: Request payload for creating a new package upgrade deployment. + properties: + data: + $ref: '#/components/schemas/FleetDeploymentPackageUpgradeCreate' + required: + - data + type: object FleetDeploymentResourceType: default: deployment description: The type of deployment resource. @@ -20717,6 +20900,15 @@ components: properties: data: $ref: '#/components/schemas/FleetDeployment' + meta: + $ref: '#/components/schemas/FleetDeploymentResponseMeta' + type: object + FleetDeploymentResponseMeta: + description: Metadata for a single deployment response, including pagination + information for hosts. + properties: + hosts: + $ref: '#/components/schemas/FleetDeploymentHostsPage' type: object FleetDeploymentsPage: description: Pagination details for the list of deployments. @@ -20746,6 +20938,262 @@ components: page: $ref: '#/components/schemas/FleetDeploymentsPage' type: object + FleetSchedule: + description: A schedule that automatically creates deployments based on a recurrence + rule. + properties: + attributes: + $ref: '#/components/schemas/FleetScheduleAttributes' + id: + description: Unique identifier for the schedule. + example: abc-def-ghi-123 + type: string + type: + $ref: '#/components/schemas/FleetScheduleResourceType' + required: + - id + - type + - attributes + type: object + FleetScheduleAttributes: + description: Attributes of a schedule in the response. + properties: + created_at_unix: + description: Unix timestamp (seconds since epoch) when the schedule was + created. + example: 1699999999 + format: int64 + type: integer + created_by: + description: User handle of the person who created the schedule. + example: user@example.com + type: string + name: + description: Human-readable name for the schedule. + example: Weekly Production Agent Updates + type: string + query: + description: Query used to filter and select target hosts for scheduled + deployments. Uses the Datadog query syntax. + example: env:prod AND service:web + type: string + rule: + $ref: '#/components/schemas/FleetScheduleRecurrenceRule' + status: + $ref: '#/components/schemas/FleetScheduleStatus' + updated_at_unix: + description: Unix timestamp (seconds since epoch) when the schedule was + last updated. + example: 1699999999 + format: int64 + type: integer + updated_by: + description: User handle of the person who last updated the schedule. + example: user@example.com + type: string + version_to_latest: + description: 'Number of major versions behind the latest to target for upgrades. + + - 0: Always upgrade to the latest version + + - 1: Upgrade to latest minus 1 major version + + - 2: Upgrade to latest minus 2 major versions + + Maximum value is 2.' + example: 0 + format: int64 + maximum: 2 + minimum: 0 + type: integer + type: object + FleetScheduleCreate: + description: Data for creating a new schedule. + properties: + attributes: + $ref: '#/components/schemas/FleetScheduleCreateAttributes' + type: + $ref: '#/components/schemas/FleetScheduleResourceType' + required: + - type + - attributes + type: object + FleetScheduleCreateAttributes: + description: Attributes for creating a new schedule. + properties: + name: + description: Human-readable name for the schedule. + example: Weekly Production Agent Updates + type: string + query: + description: Query used to filter and select target hosts for scheduled + deployments. Uses the Datadog query syntax. + example: env:prod AND service:web + type: string + rule: + $ref: '#/components/schemas/FleetScheduleRecurrenceRule' + status: + $ref: '#/components/schemas/FleetScheduleStatus' + version_to_latest: + description: 'Number of major versions behind the latest to target for upgrades. + + - 0: Always upgrade to the latest version (default) + + - 1: Upgrade to latest minus 1 major version + + - 2: Upgrade to latest minus 2 major versions + + Maximum value is 2.' + example: 0 + format: int64 + maximum: 2 + minimum: 0 + type: integer + required: + - name + - query + - rule + type: object + FleetScheduleCreateRequest: + description: Request payload for creating a new schedule. + properties: + data: + $ref: '#/components/schemas/FleetScheduleCreate' + required: + - data + type: object + FleetSchedulePatch: + description: Data for partially updating a schedule. + properties: + attributes: + $ref: '#/components/schemas/FleetSchedulePatchAttributes' + type: + $ref: '#/components/schemas/FleetScheduleResourceType' + required: + - type + type: object + FleetSchedulePatchAttributes: + description: Attributes for partially updating a schedule. All fields are optional. + properties: + name: + description: Human-readable name for the schedule. + example: Weekly Production Agent Updates + type: string + query: + description: Query used to filter and select target hosts for scheduled + deployments. Uses the Datadog query syntax. + example: env:prod AND service:web + type: string + rule: + $ref: '#/components/schemas/FleetScheduleRecurrenceRule' + status: + $ref: '#/components/schemas/FleetScheduleStatus' + version_to_latest: + description: 'Number of major versions behind the latest to target for upgrades. + + - 0: Always upgrade to the latest version + + - 1: Upgrade to latest minus 1 major version + + - 2: Upgrade to latest minus 2 major versions + + Maximum value is 2.' + example: 0 + format: int64 + maximum: 2 + minimum: 0 + type: integer + type: object + FleetSchedulePatchRequest: + description: Request payload for partially updating a schedule. + properties: + data: + $ref: '#/components/schemas/FleetSchedulePatch' + required: + - data + type: object + FleetScheduleRecurrenceRule: + description: 'Defines the recurrence pattern for the schedule. Specifies when + deployments should be + + automatically triggered based on maintenance windows.' + properties: + days_of_week: + description: 'List of days of the week when the schedule should trigger. + Valid values are: + + "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun".' + example: + - Mon + - Wed + - Fri + items: + type: string + type: array + maintenance_window_duration: + description: Duration of the maintenance window in minutes. + example: 1200 + format: int64 + type: integer + start_maintenance_window: + description: 'Start time of the maintenance window in 24-hour clock format + (HH:MM). + + Deployments will be triggered at this time on the specified days.' + example: 02:00 + type: string + timezone: + description: Timezone for the schedule in IANA Time Zone Database format + (e.g., "America/New_York", "UTC"). + example: America/New_York + type: string + required: + - days_of_week + - start_maintenance_window + - maintenance_window_duration + - timezone + type: object + FleetScheduleResourceType: + default: schedule + description: The type of schedule resource. + enum: + - schedule + example: schedule + type: string + x-enum-varnames: + - SCHEDULE + FleetScheduleResponse: + description: Response containing a single schedule. + properties: + data: + $ref: '#/components/schemas/FleetSchedule' + type: object + FleetScheduleStatus: + description: 'The status of the schedule. + + - `active`: The schedule is active and will create deployments according to + its recurrence rule. + + - `inactive`: The schedule is inactive and will not create any deployments.' + enum: + - active + - inactive + example: active + type: string + x-enum-varnames: + - ACTIVE + - INACTIVE + FleetSchedulesResponse: + description: Response containing a list of schedules. + properties: + data: + description: Array of schedules. + items: + $ref: '#/components/schemas/FleetSchedule' + type: array + required: + - data + type: object FormulaLimit: description: 'Message for specifying limits to the number of values returned by a query. @@ -54359,6 +54807,49 @@ info: version: '1.0' openapi: 3.0.0 paths: + /api/unstable/fleet/agents: + get: + description: 'Retrieve a list of all available Datadog Agent versions. + + + This endpoint returns the available Agent versions that can be deployed to + your fleet. + + These versions are used when creating deployments or configuring schedules + for + + automated Agent upgrades.' + operationId: ListFleetAgentVersions + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetAgentVersionsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List all available Agent versions + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - hosts_read + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/unstable/fleet/deployments: get: description: 'Retrieve a list of all deployments for fleet automation. @@ -54414,9 +54905,15 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/unstable/fleet/deployments/configure: post: - description: 'Create a new deployment to apply configuration changes - - to a fleet of hosts matching the specified filter query.' + description: "Create a new deployment to apply configuration changes\nto a fleet + of hosts matching the specified filter query.\n\nThis endpoint supports two + types of configuration operations:\n- `merge-patch`: Merges the provided patch + data with the existing configuration file,\n creating the file if it doesn't + exist\n- `delete`: Removes the specified configuration file from the target + hosts\n\nThe deployment is created and started automatically. You can specify + multiple configuration\noperations that will be executed in order on each + target host. Use the filter query to target\nspecific hosts using the Datadog + query syntax." operationId: CreateFleetDeploymentConfigure requestBody: content: @@ -54505,7 +55002,88 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Create a deployment + summary: Create a configuration deployment + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - agent_upgrade_write + - fleet_policies_write + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/unstable/fleet/deployments/upgrade: + post: + description: 'Create and immediately start a new package upgrade + + on hosts matching the specified filter query. + + + This endpoint allows you to upgrade the Datadog Agent to a specific version + + on hosts matching the specified filter query. + + + The deployment is created and started automatically. The system will: + + 1. Identify all hosts matching the filter query + + 2. Validate that the specified version is available + + 3. Begin rolling out the package upgrade to the target hosts' + operationId: CreateFleetDeploymentUpgrade + requestBody: + content: + application/json: + examples: + upgrade_agent: + summary: Upgrade Datadog Agent to version 7.52.0 + value: + data: + attributes: + filter_query: env:prod AND service:web + target_packages: + - name: datadog-agent + version: 7.52.0 + type: deployment + upgrade_multiple_packages: + summary: Upgrade multiple packages + value: + data: + attributes: + filter_query: env:staging + target_packages: + - name: datadog-agent + version: 7.52.0-1 + - name: datadog-apm-inject + version: 0.10.0 + type: deployment + schema: + $ref: '#/components/schemas/FleetDeploymentPackageUpgradeCreateRequest' + description: Request payload containing the package upgrade details. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetDeploymentResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Upgrade hosts tags: - Fleet Automation x-permission: @@ -54518,8 +55096,22 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/unstable/fleet/deployments/{deployment_id}: get: - description: Retrieve the details of a specific deployment using its unique - identifier. + description: "Retrieve detailed information about a specific deployment using + its unique identifier.\nThis endpoint returns comprehensive information about + a deployment, including:\n- Deployment metadata (ID, type, filter query)\n- + Total number of target hosts\n- Current high-level status (pending, running, + succeeded, failed)\n- Estimated completion time\n- Configuration operations + that were or are being applied\n- Detailed host list: A paginated array of + hosts included in this deployment with individual\n host status, current + package versions, and any errors\n\nThe host list provides visibility into + the per-host execution status, allowing you to:\n- Monitor which hosts have + completed successfully\n- Identify hosts that are still in progress\n- Investigate + failures on specific hosts\n- View current package versions installed on each + host (including initial, target, and current\n versions for each package)\n\nPagination: + Use the `limit` and `page` query parameters to paginate through hosts. The + response\nincludes pagination metadata in the `meta.hosts` field with information + about the current page,\ntotal pages, and total host count. The default page + size is 50 hosts, with a maximum of 100." operationId: GetFleetDeployment parameters: - description: The unique identifier of the deployment to retrieve. @@ -54529,6 +55121,25 @@ paths: required: true schema: type: string + - description: Maximum number of hosts to return per page. Default is 50, maximum + is 100. + in: query + name: limit + required: false + schema: + default: 50 + format: int64 + maximum: 100 + type: integer + - description: Page index for pagination (zero-based). Use this to retrieve + subsequent pages of hosts. + in: query + name: page + required: false + schema: + default: 0 + format: int64 + type: integer responses: '200': content: @@ -54549,7 +55160,7 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Get a deployment by ID + summary: Get a configuration deployment by ID tags: - Fleet Automation x-permission: @@ -54561,11 +55172,23 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/unstable/fleet/deployments/{deployment_id}/cancel: post: - description: 'Cancel this deployment and stop all associated operations. + description: 'Cancel an active deployment and stop all pending operations. + + When you cancel a deployment: + + - All pending operations on hosts that haven''t started yet are stopped - If a workflow is currently running for this deployment, it is canceled immediately. + - Operations currently in progress on hosts may complete or be interrupted, + depending on their current state - Changes already applied to hosts are not rolled back.' + - Configuration changes or package upgrades already applied to hosts are not + rolled back + + + After cancellation, you can view the final state of the deployment using the + GET endpoint to see which hosts + + were successfully updated before the cancellation.' operationId: CancelFleetDeployment parameters: - description: The unique identifier of the deployment to cancel. @@ -54601,6 +55224,412 @@ paths: - fleet_policies_write x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/unstable/fleet/schedules: + get: + description: 'Retrieve a list of all schedules for automated fleet deployments. + + + Schedules allow you to automate package upgrades by defining maintenance windows + + and recurrence rules. Each schedule automatically creates deployments based + on its + + configuration.' + operationId: ListFleetSchedules + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetSchedulesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List all schedules + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - hosts_read + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: 'Create a new schedule for automated package upgrades. + + + Schedules define when and how often to automatically deploy package upgrades + to a fleet + + of hosts. Each schedule includes: + + - A filter query to select target hosts + + - A recurrence rule defining maintenance windows + + - A version strategy (e.g., always latest, or N versions behind latest) + + + When the schedule triggers during a maintenance window, it automatically creates + a + + deployment that upgrades the Datadog Agent to the specified version on all + matching hosts.' + operationId: CreateFleetSchedule + requestBody: + content: + application/json: + examples: + conservative_staging: + summary: Conservative staging updates (N-1 version) + value: + data: + attributes: + name: Staging Environment - Conservative Updates + query: env:staging + rule: + days_of_week: + - Fri + maintenance_window_duration: 240 + start_maintenance_window: '22:00' + timezone: UTC + status: active + version_to_latest: 1 + type: schedule + weekly_production_update: + summary: Weekly production agent updates + value: + data: + attributes: + name: Weekly Production Agent Updates + query: env:prod + rule: + days_of_week: + - Mon + - Wed + maintenance_window_duration: 180 + start_maintenance_window: 02:00 + timezone: America/New_York + status: active + version_to_latest: 0 + type: schedule + schema: + $ref: '#/components/schemas/FleetScheduleCreateRequest' + description: Request payload containing the schedule details. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetScheduleResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create a schedule + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - agent_upgrade_write + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/unstable/fleet/schedules/{id}: + delete: + description: 'Delete a schedule permanently. + + + When you delete a schedule: + + - The schedule is permanently removed and will no longer create deployments + + - Any deployments already created by this schedule are not affected + + - This action cannot be undone + + + If you want to temporarily stop a schedule from creating deployments, consider + + updating its status to "inactive" instead of deleting it.' + operationId: DeleteFleetSchedule + parameters: + - description: The unique identifier of the schedule to delete. + example: abc-def-ghi-123 + in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: Schedule successfully deleted. + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete a schedule + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - agent_upgrade_write + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: 'Retrieve detailed information about a specific schedule using + its unique identifier. + + + This endpoint returns comprehensive information about a schedule, including: + + - Schedule metadata (ID, name, creation/update timestamps) + + - Filter query for selecting target hosts + + - Recurrence rule defining when deployments are triggered + + - Version strategy for package upgrades + + - Current status (active or inactive)' + operationId: GetFleetSchedule + parameters: + - description: The unique identifier of the schedule to retrieve. + example: abc-def-ghi-123 + in: path + name: id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetScheduleResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a schedule by ID + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - hosts_read + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: 'Partially update a schedule by providing only the fields you want + to change. + + + This endpoint allows you to modify specific attributes of a schedule without + + affecting other fields. Common use cases include: + + - Changing the schedule status between active and inactive + + - Updating the maintenance window times + + - Modifying the filter query to target different hosts + + - Adjusting the version strategy + + + Only include the fields you want to update in the request body. All fields + + are optional in a PATCH request.' + operationId: UpdateFleetSchedule + parameters: + - description: The unique identifier of the schedule to update. + example: abc-def-ghi-123 + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + change_maintenance_window: + summary: Change maintenance window time + value: + data: + attributes: + rule: + days_of_week: + - Mon + - Wed + - Fri + maintenance_window_duration: 240 + start_maintenance_window: 03:00 + timezone: America/New_York + type: schedule + pause_schedule: + summary: Pause a schedule + value: + data: + attributes: + status: inactive + type: schedule + update_query: + summary: Update target hosts query + value: + data: + attributes: + query: env:prod AND service:api + type: schedule + schema: + $ref: '#/components/schemas/FleetSchedulePatchRequest' + description: Request payload containing the fields to update. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetScheduleResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update a schedule + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - agent_upgrade_write + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/unstable/fleet/schedules/{id}/trigger: + post: + description: 'Manually trigger a schedule to immediately create and start a + deployment. + + + This endpoint allows you to manually initiate a deployment using the schedule''s + + configuration, without waiting for the next scheduled maintenance window. + This is + + useful for: + + - Testing a schedule before it runs automatically + + - Performing an emergency update outside the regular maintenance window + + - Creating an ad-hoc deployment with the same settings as a schedule + + + The deployment is created immediately with: + + - The same filter query as the schedule + + - The package version determined by the schedule''s version strategy + + - All matching hosts as targets + + + The manually triggered deployment is independent of the schedule and does + not + + affect the schedule''s normal recurrence pattern.' + operationId: TriggerFleetSchedule + parameters: + - description: The unique identifier of the schedule to trigger. + example: abc-def-ghi-123 + in: path + name: id + required: true + schema: + type: string + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetDeploymentResponse' + description: CREATED - Deployment successfully created and started. + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Trigger a schedule deployment + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - agent_upgrade_write + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/actions-datastores: get: @@ -81558,9 +82587,24 @@ tags: name: Fastly Integration - description: 'Manage automated deployments across your fleet of hosts. - Use these endpoints to create, retrieve, and cancel deployments - that apply configuration changes to multiple hosts at once.' + Fleet Automation provides two types of deployments: + + + Configuration Deployments (`/configure`): + + - Apply configuration file changes to target hosts + + - Support merge-patch operations to update specific configuration fields + + - Support delete operations to remove configuration files + + - Useful for updating Datadog Agent settings, integration configs, and more + + + Package Upgrade Deployments (`/upgrade`): + + - Upgrade the Datadog Agent to specific versions' name: Fleet Automation - description: 'Configure your Datadog-Google Cloud Platform (GCP) integration directly diff --git a/features/v2/fleet_automation.feature b/features/v2/fleet_automation.feature index 2e91b6e0a852..0024399c7455 100644 --- a/features/v2/fleet_automation.feature +++ b/features/v2/fleet_automation.feature @@ -1,8 +1,13 @@ @endpoint(fleet-automation) @endpoint(fleet-automation-v2) Feature: Fleet Automation - Manage automated deployments across your fleet of hosts. Use these - endpoints to create, retrieve, and cancel deployments that apply - configuration changes to multiple hosts at once. + Manage automated deployments across your fleet of hosts. Fleet Automation + provides two types of deployments: Configuration Deployments + (`/configure`): - Apply configuration file changes to target hosts - + Support merge-patch operations to update specific configuration fields - + Support delete operations to remove configuration files - Useful for + updating Datadog Agent settings, integration configs, and more Package + Upgrade Deployments (`/upgrade`): - Upgrade the Datadog Agent to specific + versions Background: Given a valid "apiKeyAuth" key in the system @@ -34,7 +39,7 @@ Feature: Fleet Automation Then the response status is 404 Not Found @generated @skip @team:DataDog/fleet-automation - Scenario: Create a deployment returns "Bad Request" response + Scenario: Create a configuration deployment returns "Bad Request" response Given operation "CreateFleetDeploymentConfigure" enabled And new "CreateFleetDeploymentConfigure" request And body with value {"data": {"attributes": {"config_operations": [{"file_op": "merge-patch", "file_path": "/datadog.yaml", "patch": {"apm_config": {"enabled": true}, "log_level": "debug", "logs_enabled": true}}], "filter_query": "env:prod AND service:web"}, "type": "deployment"}} @@ -42,7 +47,7 @@ Feature: Fleet Automation Then the response status is 400 Bad Request @generated @skip @team:DataDog/fleet-automation - Scenario: Create a deployment returns "CREATED" response + Scenario: Create a configuration deployment returns "CREATED" response Given operation "CreateFleetDeploymentConfigure" enabled And new "CreateFleetDeploymentConfigure" request And body with value {"data": {"attributes": {"config_operations": [{"file_op": "merge-patch", "file_path": "/datadog.yaml", "patch": {"apm_config": {"enabled": true}, "log_level": "debug", "logs_enabled": true}}], "filter_query": "env:prod AND service:web"}, "type": "deployment"}} @@ -50,7 +55,47 @@ Feature: Fleet Automation Then the response status is 201 CREATED @generated @skip @team:DataDog/fleet-automation - Scenario: Get a deployment by ID returns "Bad Request" response + Scenario: Create a schedule returns "Bad Request" response + Given operation "CreateFleetSchedule" enabled + And new "CreateFleetSchedule" request + And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: Create a schedule returns "CREATED" response + Given operation "CreateFleetSchedule" enabled + And new "CreateFleetSchedule" request + And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/fleet-automation + Scenario: Delete a schedule returns "Bad Request" response + Given operation "DeleteFleetSchedule" enabled + And new "DeleteFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: Delete a schedule returns "Not Found" response + Given operation "DeleteFleetSchedule" enabled + And new "DeleteFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: Delete a schedule returns "Schedule successfully deleted." response + Given operation "DeleteFleetSchedule" enabled + And new "DeleteFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 Schedule successfully deleted. + + @generated @skip @team:DataDog/fleet-automation + Scenario: Get a configuration deployment by ID returns "Bad Request" response Given operation "GetFleetDeployment" enabled And new "GetFleetDeployment" request And request contains "deployment_id" parameter from "REPLACE.ME" @@ -58,13 +103,21 @@ Feature: Fleet Automation Then the response status is 400 Bad Request @generated @skip @team:DataDog/fleet-automation - Scenario: Get a deployment by ID returns "Not Found" response + Scenario: Get a configuration deployment by ID returns "Not Found" response Given operation "GetFleetDeployment" enabled And new "GetFleetDeployment" request And request contains "deployment_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/fleet-automation + Scenario: Get a configuration deployment by ID returns "OK" response + Given operation "GetFleetDeployment" enabled + And new "GetFleetDeployment" request + And request contains "deployment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/fleet-automation Scenario: Get a deployment by ID returns "OK" response Given operation "GetFleetDeployment" enabled @@ -74,6 +127,52 @@ Feature: Fleet Automation When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/fleet-automation + Scenario: Get a schedule by ID returns "Bad Request" response + Given operation "GetFleetSchedule" enabled + And new "GetFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: Get a schedule by ID returns "Not Found" response + Given operation "GetFleetSchedule" enabled + And new "GetFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/fleet-automation + Scenario: Get a schedule by ID returns "OK" response + Given operation "GetFleetSchedule" enabled + And there is a valid "fleet_schedule" in the system + And new "GetFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all available Agent versions returns "Bad Request" response + Given operation "ListFleetAgentVersions" enabled + And new "ListFleetAgentVersions" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all available Agent versions returns "Not Found" response + Given operation "ListFleetAgentVersions" enabled + And new "ListFleetAgentVersions" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all available Agent versions returns "OK" response + Given operation "ListFleetAgentVersions" enabled + And new "ListFleetAgentVersions" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/fleet-automation Scenario: List all deployments returns "Bad Request" response Given operation "ListFleetDeployments" enabled @@ -87,3 +186,92 @@ Feature: Fleet Automation And new "ListFleetDeployments" request When the request is sent Then the response status is 200 OK + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all schedules returns "Bad Request" response + Given operation "ListFleetSchedules" enabled + And new "ListFleetSchedules" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all schedules returns "OK" response + Given operation "ListFleetSchedules" enabled + And new "ListFleetSchedules" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/fleet-automation + Scenario: Trigger a schedule deployment returns "Bad Request" response + Given operation "TriggerFleetSchedule" enabled + And new "TriggerFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: Trigger a schedule deployment returns "CREATED - Deployment successfully created and started." response + Given operation "TriggerFleetSchedule" enabled + And new "TriggerFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 201 CREATED - Deployment successfully created and started. + + @generated @skip @team:DataDog/fleet-automation + Scenario: Trigger a schedule deployment returns "Not Found" response + Given operation "TriggerFleetSchedule" enabled + And new "TriggerFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: Update a schedule returns "Bad Request" response + Given operation "UpdateFleetSchedule" enabled + And new "UpdateFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: Update a schedule returns "Not Found" response + Given operation "UpdateFleetSchedule" enabled + And new "UpdateFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: Update a schedule returns "OK" response + Given operation "UpdateFleetSchedule" enabled + And new "UpdateFleetSchedule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/fleet-automation + Scenario: Upgrade hosts returns "Bad Request" response + Given operation "CreateFleetDeploymentUpgrade" enabled + And new "CreateFleetDeploymentUpgrade" request + And body with value {"data": {"attributes": {"filter_query": "env:prod AND service:web", "target_packages": [{"name": "datadog-agent", "version": "7.52.0"}]}, "type": "deployment"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: Upgrade hosts returns "CREATED" response + Given operation "CreateFleetDeploymentUpgrade" enabled + And new "CreateFleetDeploymentUpgrade" request + And body with value {"data": {"attributes": {"filter_query": "env:prod AND service:web", "target_packages": [{"name": "datadog-agent", "version": "7.52.0"}]}, "type": "deployment"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/fleet-automation + Scenario: Upgrade hosts returns "Not Found" response + Given operation "CreateFleetDeploymentUpgrade" enabled + And new "CreateFleetDeploymentUpgrade" request + And body with value {"data": {"attributes": {"filter_query": "env:prod AND service:web", "target_packages": [{"name": "datadog-agent", "version": "7.52.0"}]}, "type": "deployment"}} + When the request is sent + Then the response status is 404 Not Found diff --git a/features/v2/given.json b/features/v2/given.json index 7c9df160aade..12852be0f21b 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -12,6 +12,32 @@ "tag": "Fleet Automation", "operationId": "CreateFleetDeploymentConfigure" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"deployment\",\n \"attributes\": {\n \"filter_query\": \"env:prod AND service:{{ unique_lower }}\",\n \"target_packages\": [\n {\n \"name\": \"datadog-agent\",\n \"version\": \"7.52.0\"\n }\n ]\n }\n }\n}" + } + ], + "source": "data", + "step": "there is a valid \"package_deployment\" in the system", + "key": "package_deployment", + "tag": "Fleet Automation", + "operationId": "CreateFleetDeploymentUpgrade" + }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"schedule\",\n \"attributes\": {\n \"name\": \"Weekly {{ unique }} Updates\",\n \"query\": \"env:prod AND service:{{ unique_lower }}\",\n \"status\": \"active\",\n \"version_to_latest\": 0,\n \"rule\": {\n \"days_of_week\": [\"Mon\"],\n \"start_maintenance_window\": \"02:00\",\n \"maintenance_window_duration\": 120,\n \"timezone\": \"America/New_York\"\n }\n }\n }\n}" + } + ], + "source": "data", + "step": "there is a valid \"fleet_schedule\" in the system", + "key": "schedule", + "tag": "Fleet Automation", + "operationId": "CreateFleetSchedule" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index 1865379ddbe0..07c8d427480e 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1,4 +1,10 @@ { + "ListFleetAgentVersions": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, "ListFleetDeployments": { "tag": "Fleet Automation", "undo": { @@ -18,6 +24,19 @@ "type": "unsafe" } }, + "CreateFleetDeploymentUpgrade": { + "tag": "Fleet Automation", + "undo": { + "operationId": "CancelFleetDeployment", + "parameters": [ + { + "name": "deployment_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, "GetFleetDeployment": { "tag": "Fleet Automation", "undo": { @@ -30,6 +49,56 @@ "type": "idempotent" } }, + "ListFleetSchedules": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, + "CreateFleetSchedule": { + "tag": "Fleet Automation", + "undo": { + "operationId": "DeleteFleetSchedule", + "parameters": [ + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteFleetSchedule": { + "tag": "Fleet Automation", + "undo": { + "type": "unsafe" + } + }, + "GetFleetSchedule": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, + "UpdateFleetSchedule": { + "tag": "Fleet Automation", + "undo": { + "type": "idempotent" + } + }, + "TriggerFleetSchedule": { + "tag": "Fleet Automation", + "undo": { + "operationId": "CancelFleetDeployment", + "parameters": [ + { + "name": "deployment_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, "ListDatastores": { "tag": "Actions Datastores", "undo": { diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index 71b27057152b..5d09b5e36ec3 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -2350,6 +2350,9 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { "AuthenticationApi.V1.Validate": { operationResponseType: "AuthenticationValidationResponse", }, + "FleetAutomationApi.V2.ListFleetAgentVersions": { + operationResponseType: "FleetAgentVersionsResponse", + }, "FleetAutomationApi.V2.ListFleetDeployments": { pageSize: { type: "number", @@ -2368,11 +2371,26 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "FleetDeploymentResponse", }, + "FleetAutomationApi.V2.CreateFleetDeploymentUpgrade": { + body: { + type: "FleetDeploymentPackageUpgradeCreateRequest", + format: "", + }, + operationResponseType: "FleetDeploymentResponse", + }, "FleetAutomationApi.V2.GetFleetDeployment": { deploymentId: { type: "string", format: "", }, + limit: { + type: "number", + format: "int64", + }, + page: { + type: "number", + format: "int64", + }, operationResponseType: "FleetDeploymentResponse", }, "FleetAutomationApi.V2.CancelFleetDeployment": { @@ -2382,6 +2400,48 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "{}", }, + "FleetAutomationApi.V2.ListFleetSchedules": { + operationResponseType: "FleetSchedulesResponse", + }, + "FleetAutomationApi.V2.CreateFleetSchedule": { + body: { + type: "FleetScheduleCreateRequest", + format: "", + }, + operationResponseType: "FleetScheduleResponse", + }, + "FleetAutomationApi.V2.GetFleetSchedule": { + id: { + type: "string", + format: "", + }, + operationResponseType: "FleetScheduleResponse", + }, + "FleetAutomationApi.V2.DeleteFleetSchedule": { + id: { + type: "string", + format: "", + }, + operationResponseType: "{}", + }, + "FleetAutomationApi.V2.UpdateFleetSchedule": { + id: { + type: "string", + format: "", + }, + body: { + type: "FleetSchedulePatchRequest", + format: "", + }, + operationResponseType: "FleetScheduleResponse", + }, + "FleetAutomationApi.V2.TriggerFleetSchedule": { + id: { + type: "string", + format: "", + }, + operationResponseType: "FleetDeploymentResponse", + }, "ActionsDatastoresApi.V2.ListDatastores": { operationResponseType: "DatastoreArray", }, diff --git a/services/fleet_automation/README.md b/services/fleet_automation/README.md index 25a3fce5205a..a809cbd40b2e 100644 --- a/services/fleet_automation/README.md +++ b/services/fleet_automation/README.md @@ -3,8 +3,17 @@ ## Description Manage automated deployments across your fleet of hosts. -Use these endpoints to create, retrieve, and cancel deployments -that apply configuration changes to multiple hosts at once. + +Fleet Automation provides two types of deployments: + +Configuration Deployments (`/configure`): +- Apply configuration file changes to target hosts +- Support merge-patch operations to update specific configuration fields +- Support delete operations to remove configuration files +- Useful for updating Datadog Agent settings, integration configs, and more + +Package Upgrade Deployments (`/upgrade`): +- Upgrade the Datadog Agent to specific versions ## Navigation @@ -30,15 +39,14 @@ const configuration = createConfiguration(); // Enable unstable operations const configurationOpts = { unstableOperations: { - "FleetAutomationApi.v2.listFleetDeployments": true + "FleetAutomationApi.v2.listFleetAgentVersions": true } } const configuration = createConfiguration(configurationOpts); const apiInstance = new FleetAutomationApiV2(configuration); -const params = {/* parameters */}; -apiInstance.listFleetDeployments(params).then((data) => { +apiInstance.listFleetAgentVersions().then((data) => { console.log("API called successfully. Returned data: " + JSON.stringify(data)); }).catch((error) => { console.error("Error calling API: " + error); diff --git a/services/fleet_automation/src/v2/FleetAutomationApi.ts b/services/fleet_automation/src/v2/FleetAutomationApi.ts index 81b1022b6021..ca00f1311d67 100644 --- a/services/fleet_automation/src/v2/FleetAutomationApi.ts +++ b/services/fleet_automation/src/v2/FleetAutomationApi.ts @@ -23,9 +23,15 @@ import { import { TypingInfo } from "./models/TypingInfo"; import { APIErrorResponse } from "./models/APIErrorResponse"; +import { FleetAgentVersionsResponse } from "./models/FleetAgentVersionsResponse"; import { FleetDeploymentConfigureCreateRequest } from "./models/FleetDeploymentConfigureCreateRequest"; +import { FleetDeploymentPackageUpgradeCreateRequest } from "./models/FleetDeploymentPackageUpgradeCreateRequest"; import { FleetDeploymentResponse } from "./models/FleetDeploymentResponse"; import { FleetDeploymentsResponse } from "./models/FleetDeploymentsResponse"; +import { FleetScheduleCreateRequest } from "./models/FleetScheduleCreateRequest"; +import { FleetSchedulePatchRequest } from "./models/FleetSchedulePatchRequest"; +import { FleetScheduleResponse } from "./models/FleetScheduleResponse"; +import { FleetSchedulesResponse } from "./models/FleetSchedulesResponse"; import { version } from "../version"; export class FleetAutomationApiRequestFactory extends BaseAPIRequestFactory { @@ -150,8 +156,185 @@ export class FleetAutomationApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async createFleetDeploymentUpgrade( + body: FleetDeploymentPackageUpgradeCreateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "FleetAutomationApi.v2.createFleetDeploymentUpgrade" + ] + ) { + throw new Error( + "Unstable operation 'createFleetDeploymentUpgrade' is disabled. Enable it by setting `configuration.unstableOperations['FleetAutomationApi.v2.createFleetDeploymentUpgrade'] = true`", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createFleetDeploymentUpgrade"); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/deployments/upgrade"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "FleetAutomationApi.v2.createFleetDeploymentUpgrade", + FleetAutomationApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize( + body, + TypingInfo, + "FleetDeploymentPackageUpgradeCreateRequest", + "", + ), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createFleetSchedule( + body: FleetScheduleCreateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["FleetAutomationApi.v2.createFleetSchedule"] + ) { + throw new Error( + "Unstable operation 'createFleetSchedule' is disabled. Enable it by setting `configuration.unstableOperations['FleetAutomationApi.v2.createFleetSchedule'] = true`", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createFleetSchedule"); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/schedules"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "FleetAutomationApi.v2.createFleetSchedule", + FleetAutomationApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "FleetScheduleCreateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteFleetSchedule( + id: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["FleetAutomationApi.v2.deleteFleetSchedule"] + ) { + throw new Error( + "Unstable operation 'deleteFleetSchedule' is disabled. Enable it by setting `configuration.unstableOperations['FleetAutomationApi.v2.deleteFleetSchedule'] = true`", + ); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "deleteFleetSchedule"); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/schedules/{id}".replace( + "{id}", + encodeURIComponent(String(id)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "FleetAutomationApi.v2.deleteFleetSchedule", + FleetAutomationApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.DELETE, + overrides, + ); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async getFleetDeployment( deploymentId: string, + limit?: number, + page?: number, _options?: Configuration, ): Promise { const _config = _options || this.configuration; @@ -194,6 +377,117 @@ export class FleetAutomationApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("User-Agent", this.userAgent); } + // Query Params + if (limit !== undefined) { + requestContext.setQueryParam( + "limit", + serialize(limit, TypingInfo, "number", "int64"), + "", + ); + } + if (page !== undefined) { + requestContext.setQueryParam( + "page", + serialize(page, TypingInfo, "number", "int64"), + "", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getFleetSchedule( + id: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["FleetAutomationApi.v2.getFleetSchedule"]) { + throw new Error( + "Unstable operation 'getFleetSchedule' is disabled. Enable it by setting `configuration.unstableOperations['FleetAutomationApi.v2.getFleetSchedule'] = true`", + ); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "getFleetSchedule"); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/schedules/{id}".replace( + "{id}", + encodeURIComponent(String(id)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "FleetAutomationApi.v2.getFleetSchedule", + FleetAutomationApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listFleetAgentVersions( + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "FleetAutomationApi.v2.listFleetAgentVersions" + ] + ) { + throw new Error( + "Unstable operation 'listFleetAgentVersions' is disabled. Enable it by setting `configuration.unstableOperations['FleetAutomationApi.v2.listFleetAgentVersions'] = true`", + ); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/agents"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "FleetAutomationApi.v2.listFleetAgentVersions", + FleetAutomationApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -239,50 +533,686 @@ export class FleetAutomationApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("User-Agent", this.userAgent); } - // Query Params - if (pageSize !== undefined) { - requestContext.setQueryParam( - "page_size", - serialize(pageSize, TypingInfo, "number", "int64"), - "", - ); - } - if (pageOffset !== undefined) { - requestContext.setQueryParam( - "page_offset", - serialize(pageOffset, TypingInfo, "number", "int64"), + // Query Params + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page_size", + serialize(pageSize, TypingInfo, "number", "int64"), + "", + ); + } + if (pageOffset !== undefined) { + requestContext.setQueryParam( + "page_offset", + serialize(pageOffset, TypingInfo, "number", "int64"), + "", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listFleetSchedules( + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["FleetAutomationApi.v2.listFleetSchedules"] + ) { + throw new Error( + "Unstable operation 'listFleetSchedules' is disabled. Enable it by setting `configuration.unstableOperations['FleetAutomationApi.v2.listFleetSchedules'] = true`", + ); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/schedules"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "FleetAutomationApi.v2.listFleetSchedules", + FleetAutomationApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async triggerFleetSchedule( + id: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["FleetAutomationApi.v2.triggerFleetSchedule"] + ) { + throw new Error( + "Unstable operation 'triggerFleetSchedule' is disabled. Enable it by setting `configuration.unstableOperations['FleetAutomationApi.v2.triggerFleetSchedule'] = true`", + ); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "triggerFleetSchedule"); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/schedules/{id}/trigger".replace( + "{id}", + encodeURIComponent(String(id)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "FleetAutomationApi.v2.triggerFleetSchedule", + FleetAutomationApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateFleetSchedule( + id: string, + body: FleetSchedulePatchRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["FleetAutomationApi.v2.updateFleetSchedule"] + ) { + throw new Error( + "Unstable operation 'updateFleetSchedule' is disabled. Enable it by setting `configuration.unstableOperations['FleetAutomationApi.v2.updateFleetSchedule'] = true`", + ); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "updateFleetSchedule"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateFleetSchedule"); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/schedules/{id}".replace( + "{id}", + encodeURIComponent(String(id)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "FleetAutomationApi.v2.updateFleetSchedule", + FleetAutomationApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "FleetSchedulePatchRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class FleetAutomationApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to cancelFleetDeployment + * @throws ApiException if the response code was not in [200, 299] + */ + public async cancelFleetDeployment(response: ResponseContext): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createFleetDeploymentConfigure + * @throws ApiException if the response code was not in [200, 299] + */ + public async createFleetDeploymentConfigure( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 201) { + const body: FleetDeploymentResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetDeploymentResponse", + ) as FleetDeploymentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FleetDeploymentResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetDeploymentResponse", + "", + ) as FleetDeploymentResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createFleetDeploymentUpgrade + * @throws ApiException if the response code was not in [200, 299] + */ + public async createFleetDeploymentUpgrade( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 201) { + const body: FleetDeploymentResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetDeploymentResponse", + ) as FleetDeploymentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FleetDeploymentResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetDeploymentResponse", + "", + ) as FleetDeploymentResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createFleetSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + public async createFleetSchedule( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 201) { + const body: FleetScheduleResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetScheduleResponse", + ) as FleetScheduleResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FleetScheduleResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetScheduleResponse", + "", + ) as FleetScheduleResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteFleetSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteFleetSchedule(response: ResponseContext): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFleetDeployment + * @throws ApiException if the response code was not in [200, 299] + */ + public async getFleetDeployment( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: FleetDeploymentResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetDeploymentResponse", + ) as FleetDeploymentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FleetDeploymentResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetDeploymentResponse", + "", + ) as FleetDeploymentResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFleetSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + public async getFleetSchedule( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: FleetScheduleResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetScheduleResponse", + ) as FleetScheduleResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FleetScheduleResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetScheduleResponse", + "", + ) as FleetScheduleResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listFleetAgentVersions + * @throws ApiException if the response code was not in [200, 299] + */ + public async listFleetAgentVersions( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: FleetAgentVersionsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetAgentVersionsResponse", + ) as FleetAgentVersionsResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FleetAgentVersionsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetAgentVersionsResponse", "", - ); + ) as FleetAgentVersionsResponse; + return body; } - // Apply auth methods - applySecurityAuthentication(_config, requestContext, [ - "apiKeyAuth", - "appKeyAuth", - ]); - - return requestContext; + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); } -} -export class FleetAutomationApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to cancelFleetDeployment + * @params response Response returned by the server for a request to listFleetDeployments * @throws ApiException if the response code was not in [200, 299] */ - public async cancelFleetDeployment(response: ResponseContext): Promise { + public async listFleetDeployments( + response: ResponseContext, + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 204) { - return; + if (response.httpStatusCode === 200) { + const body: FleetDeploymentsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetDeploymentsResponse", + ) as FleetDeploymentsResponse; + return body; } if ( response.httpStatusCode === 400 || response.httpStatusCode === 401 || response.httpStatusCode === 403 || - response.httpStatusCode === 404 || response.httpStatusCode === 429 ) { const bodyText = parse(await response.body.text(), contentType); @@ -305,7 +1235,13 @@ export class FleetAutomationApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + const body: FleetDeploymentsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "FleetDeploymentsResponse", + "", + ) as FleetDeploymentsResponse; + return body; } const body = (await response.body.text()) || ""; @@ -319,19 +1255,19 @@ export class FleetAutomationApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createFleetDeploymentConfigure + * @params response Response returned by the server for a request to listFleetSchedules * @throws ApiException if the response code was not in [200, 299] */ - public async createFleetDeploymentConfigure( + public async listFleetSchedules( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 201) { - const body: FleetDeploymentResponse = deserialize( + if (response.httpStatusCode === 200) { + const body: FleetSchedulesResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "FleetDeploymentResponse", - ) as FleetDeploymentResponse; + "FleetSchedulesResponse", + ) as FleetSchedulesResponse; return body; } if ( @@ -360,12 +1296,12 @@ export class FleetAutomationApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: FleetDeploymentResponse = deserialize( + const body: FleetSchedulesResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "FleetDeploymentResponse", + "FleetSchedulesResponse", "", - ) as FleetDeploymentResponse; + ) as FleetSchedulesResponse; return body; } @@ -380,14 +1316,14 @@ export class FleetAutomationApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getFleetDeployment + * @params response Response returned by the server for a request to triggerFleetSchedule * @throws ApiException if the response code was not in [200, 299] */ - public async getFleetDeployment( + public async triggerFleetSchedule( response: ResponseContext, ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 200) { + if (response.httpStatusCode === 201) { const body: FleetDeploymentResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, @@ -442,25 +1378,26 @@ export class FleetAutomationApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to listFleetDeployments + * @params response Response returned by the server for a request to updateFleetSchedule * @throws ApiException if the response code was not in [200, 299] */ - public async listFleetDeployments( + public async updateFleetSchedule( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); if (response.httpStatusCode === 200) { - const body: FleetDeploymentsResponse = deserialize( + const body: FleetScheduleResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "FleetDeploymentsResponse", - ) as FleetDeploymentsResponse; + "FleetScheduleResponse", + ) as FleetScheduleResponse; return body; } if ( response.httpStatusCode === 400 || response.httpStatusCode === 401 || response.httpStatusCode === 403 || + response.httpStatusCode === 404 || response.httpStatusCode === 429 ) { const bodyText = parse(await response.body.text(), contentType); @@ -483,12 +1420,12 @@ export class FleetAutomationApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: FleetDeploymentsResponse = deserialize( + const body: FleetScheduleResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "FleetDeploymentsResponse", + "FleetScheduleResponse", "", - ) as FleetDeploymentsResponse; + ) as FleetScheduleResponse; return body; } @@ -516,12 +1453,54 @@ export interface FleetAutomationApiCreateFleetDeploymentConfigureRequest { body: FleetDeploymentConfigureCreateRequest; } +export interface FleetAutomationApiCreateFleetDeploymentUpgradeRequest { + /** + * Request payload containing the package upgrade details. + * @type FleetDeploymentPackageUpgradeCreateRequest + */ + body: FleetDeploymentPackageUpgradeCreateRequest; +} + +export interface FleetAutomationApiCreateFleetScheduleRequest { + /** + * Request payload containing the schedule details. + * @type FleetScheduleCreateRequest + */ + body: FleetScheduleCreateRequest; +} + +export interface FleetAutomationApiDeleteFleetScheduleRequest { + /** + * The unique identifier of the schedule to delete. + * @type string + */ + id: string; +} + export interface FleetAutomationApiGetFleetDeploymentRequest { /** * The unique identifier of the deployment to retrieve. * @type string */ deploymentId: string; + /** + * Maximum number of hosts to return per page. Default is 50, maximum is 100. + * @type number + */ + limit?: number; + /** + * Page index for pagination (zero-based). Use this to retrieve subsequent pages of hosts. + * @type number + */ + page?: number; +} + +export interface FleetAutomationApiGetFleetScheduleRequest { + /** + * The unique identifier of the schedule to retrieve. + * @type string + */ + id: string; } export interface FleetAutomationApiListFleetDeploymentsRequest { @@ -537,6 +1516,27 @@ export interface FleetAutomationApiListFleetDeploymentsRequest { pageOffset?: number; } +export interface FleetAutomationApiTriggerFleetScheduleRequest { + /** + * The unique identifier of the schedule to trigger. + * @type string + */ + id: string; +} + +export interface FleetAutomationApiUpdateFleetScheduleRequest { + /** + * The unique identifier of the schedule to update. + * @type string + */ + id: string; + /** + * Request payload containing the fields to update. + * @type FleetSchedulePatchRequest + */ + body: FleetSchedulePatchRequest; +} + export class FleetAutomationApi { private requestFactory: FleetAutomationApiRequestFactory; private responseProcessor: FleetAutomationApiResponseProcessor; @@ -558,9 +1558,14 @@ export class FleetAutomationApi { } /** - * Cancel this deployment and stop all associated operations. - * If a workflow is currently running for this deployment, it is canceled immediately. - * Changes already applied to hosts are not rolled back. + * Cancel an active deployment and stop all pending operations. + * When you cancel a deployment: + * - All pending operations on hosts that haven't started yet are stopped + * - Operations currently in progress on hosts may complete or be interrupted, depending on their current state + * - Configuration changes or package upgrades already applied to hosts are not rolled back + * + * After cancellation, you can view the final state of the deployment using the GET endpoint to see which hosts + * were successfully updated before the cancellation. * @param param The request object */ public cancelFleetDeployment( @@ -583,6 +1588,15 @@ export class FleetAutomationApi { /** * Create a new deployment to apply configuration changes * to a fleet of hosts matching the specified filter query. + * + * This endpoint supports two types of configuration operations: + * - `merge-patch`: Merges the provided patch data with the existing configuration file, + * creating the file if it doesn't exist + * - `delete`: Removes the specified configuration file from the target hosts + * + * The deployment is created and started automatically. You can specify multiple configuration + * operations that will be executed in order on each target host. Use the filter query to target + * specific hosts using the Datadog query syntax. * @param param The request object */ public createFleetDeploymentConfigure( @@ -603,7 +1617,115 @@ export class FleetAutomationApi { } /** - * Retrieve the details of a specific deployment using its unique identifier. + * Create and immediately start a new package upgrade + * on hosts matching the specified filter query. + * + * This endpoint allows you to upgrade the Datadog Agent to a specific version + * on hosts matching the specified filter query. + * + * The deployment is created and started automatically. The system will: + * 1. Identify all hosts matching the filter query + * 2. Validate that the specified version is available + * 3. Begin rolling out the package upgrade to the target hosts + * @param param The request object + */ + public createFleetDeploymentUpgrade( + param: FleetAutomationApiCreateFleetDeploymentUpgradeRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.createFleetDeploymentUpgrade(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createFleetDeploymentUpgrade( + responseContext, + ); + }); + }); + } + + /** + * Create a new schedule for automated package upgrades. + * + * Schedules define when and how often to automatically deploy package upgrades to a fleet + * of hosts. Each schedule includes: + * - A filter query to select target hosts + * - A recurrence rule defining maintenance windows + * - A version strategy (e.g., always latest, or N versions behind latest) + * + * When the schedule triggers during a maintenance window, it automatically creates a + * deployment that upgrades the Datadog Agent to the specified version on all matching hosts. + * @param param The request object + */ + public createFleetSchedule( + param: FleetAutomationApiCreateFleetScheduleRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.createFleetSchedule( + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createFleetSchedule(responseContext); + }); + }); + } + + /** + * Delete a schedule permanently. + * + * When you delete a schedule: + * - The schedule is permanently removed and will no longer create deployments + * - Any deployments already created by this schedule are not affected + * - This action cannot be undone + * + * If you want to temporarily stop a schedule from creating deployments, consider + * updating its status to "inactive" instead of deleting it. + * @param param The request object + */ + public deleteFleetSchedule( + param: FleetAutomationApiDeleteFleetScheduleRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.deleteFleetSchedule( + param.id, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteFleetSchedule(responseContext); + }); + }); + } + + /** + * Retrieve detailed information about a specific deployment using its unique identifier. + * This endpoint returns comprehensive information about a deployment, including: + * - Deployment metadata (ID, type, filter query) + * - Total number of target hosts + * - Current high-level status (pending, running, succeeded, failed) + * - Estimated completion time + * - Configuration operations that were or are being applied + * - Detailed host list: A paginated array of hosts included in this deployment with individual + * host status, current package versions, and any errors + * + * The host list provides visibility into the per-host execution status, allowing you to: + * - Monitor which hosts have completed successfully + * - Identify hosts that are still in progress + * - Investigate failures on specific hosts + * - View current package versions installed on each host (including initial, target, and current + * versions for each package) + * + * Pagination: Use the `limit` and `page` query parameters to paginate through hosts. The response + * includes pagination metadata in the `meta.hosts` field with information about the current page, + * total pages, and total host count. The default page size is 50 hosts, with a maximum of 100. * @param param The request object */ public getFleetDeployment( @@ -612,6 +1734,8 @@ export class FleetAutomationApi { ): Promise { const requestContextPromise = this.requestFactory.getFleetDeployment( param.deploymentId, + param.limit, + param.page, options, ); return requestContextPromise.then((requestContext) => { @@ -623,6 +1747,56 @@ export class FleetAutomationApi { }); } + /** + * Retrieve detailed information about a specific schedule using its unique identifier. + * + * This endpoint returns comprehensive information about a schedule, including: + * - Schedule metadata (ID, name, creation/update timestamps) + * - Filter query for selecting target hosts + * - Recurrence rule defining when deployments are triggered + * - Version strategy for package upgrades + * - Current status (active or inactive) + * @param param The request object + */ + public getFleetSchedule( + param: FleetAutomationApiGetFleetScheduleRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.getFleetSchedule( + param.id, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getFleetSchedule(responseContext); + }); + }); + } + + /** + * Retrieve a list of all available Datadog Agent versions. + * + * This endpoint returns the available Agent versions that can be deployed to your fleet. + * These versions are used when creating deployments or configuring schedules for + * automated Agent upgrades. + * @param param The request object + */ + public listFleetAgentVersions( + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.listFleetAgentVersions(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listFleetAgentVersions(responseContext); + }); + }); + } + /** * Retrieve a list of all deployments for fleet automation. * Use the `page_size` and `page_offset` parameters to paginate results. @@ -645,4 +1819,94 @@ export class FleetAutomationApi { }); }); } + + /** + * Retrieve a list of all schedules for automated fleet deployments. + * + * Schedules allow you to automate package upgrades by defining maintenance windows + * and recurrence rules. Each schedule automatically creates deployments based on its + * configuration. + * @param param The request object + */ + public listFleetSchedules( + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.listFleetSchedules(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listFleetSchedules(responseContext); + }); + }); + } + + /** + * Manually trigger a schedule to immediately create and start a deployment. + * + * This endpoint allows you to manually initiate a deployment using the schedule's + * configuration, without waiting for the next scheduled maintenance window. This is + * useful for: + * - Testing a schedule before it runs automatically + * - Performing an emergency update outside the regular maintenance window + * - Creating an ad-hoc deployment with the same settings as a schedule + * + * The deployment is created immediately with: + * - The same filter query as the schedule + * - The package version determined by the schedule's version strategy + * - All matching hosts as targets + * + * The manually triggered deployment is independent of the schedule and does not + * affect the schedule's normal recurrence pattern. + * @param param The request object + */ + public triggerFleetSchedule( + param: FleetAutomationApiTriggerFleetScheduleRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.triggerFleetSchedule( + param.id, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.triggerFleetSchedule(responseContext); + }); + }); + } + + /** + * Partially update a schedule by providing only the fields you want to change. + * + * This endpoint allows you to modify specific attributes of a schedule without + * affecting other fields. Common use cases include: + * - Changing the schedule status between active and inactive + * - Updating the maintenance window times + * - Modifying the filter query to target different hosts + * - Adjusting the version strategy + * + * Only include the fields you want to update in the request body. All fields + * are optional in a PATCH request. + * @param param The request object + */ + public updateFleetSchedule( + param: FleetAutomationApiUpdateFleetScheduleRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateFleetSchedule( + param.id, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateFleetSchedule(responseContext); + }); + }); + } } diff --git a/services/fleet_automation/src/v2/index.ts b/services/fleet_automation/src/v2/index.ts index 3305627dce8b..9a5d791a9814 100644 --- a/services/fleet_automation/src/v2/index.ts +++ b/services/fleet_automation/src/v2/index.ts @@ -1,21 +1,52 @@ export { FleetAutomationApiCancelFleetDeploymentRequest, FleetAutomationApiCreateFleetDeploymentConfigureRequest, + FleetAutomationApiCreateFleetDeploymentUpgradeRequest, + FleetAutomationApiCreateFleetScheduleRequest, + FleetAutomationApiDeleteFleetScheduleRequest, FleetAutomationApiGetFleetDeploymentRequest, + FleetAutomationApiGetFleetScheduleRequest, FleetAutomationApiListFleetDeploymentsRequest, + FleetAutomationApiTriggerFleetScheduleRequest, + FleetAutomationApiUpdateFleetScheduleRequest, FleetAutomationApi, } from "./FleetAutomationApi"; export { APIErrorResponse } from "./models/APIErrorResponse"; +export { FleetAgentVersion } from "./models/FleetAgentVersion"; +export { FleetAgentVersionAttributes } from "./models/FleetAgentVersionAttributes"; +export { FleetAgentVersionResourceType } from "./models/FleetAgentVersionResourceType"; +export { FleetAgentVersionsResponse } from "./models/FleetAgentVersionsResponse"; export { FleetDeployment } from "./models/FleetDeployment"; export { FleetDeploymentAttributes } from "./models/FleetDeploymentAttributes"; export { FleetDeploymentConfigureAttributes } from "./models/FleetDeploymentConfigureAttributes"; export { FleetDeploymentConfigureCreate } from "./models/FleetDeploymentConfigureCreate"; export { FleetDeploymentConfigureCreateRequest } from "./models/FleetDeploymentConfigureCreateRequest"; export { FleetDeploymentFileOp } from "./models/FleetDeploymentFileOp"; +export { FleetDeploymentHost } from "./models/FleetDeploymentHost"; +export { FleetDeploymentHostPackage } from "./models/FleetDeploymentHostPackage"; +export { FleetDeploymentHostsPage } from "./models/FleetDeploymentHostsPage"; export { FleetDeploymentOperation } from "./models/FleetDeploymentOperation"; +export { FleetDeploymentPackage } from "./models/FleetDeploymentPackage"; +export { FleetDeploymentPackageUpgradeAttributes } from "./models/FleetDeploymentPackageUpgradeAttributes"; +export { FleetDeploymentPackageUpgradeCreate } from "./models/FleetDeploymentPackageUpgradeCreate"; +export { FleetDeploymentPackageUpgradeCreateRequest } from "./models/FleetDeploymentPackageUpgradeCreateRequest"; export { FleetDeploymentResourceType } from "./models/FleetDeploymentResourceType"; export { FleetDeploymentResponse } from "./models/FleetDeploymentResponse"; +export { FleetDeploymentResponseMeta } from "./models/FleetDeploymentResponseMeta"; export { FleetDeploymentsPage } from "./models/FleetDeploymentsPage"; export { FleetDeploymentsResponse } from "./models/FleetDeploymentsResponse"; export { FleetDeploymentsResponseMeta } from "./models/FleetDeploymentsResponseMeta"; +export { FleetSchedule } from "./models/FleetSchedule"; +export { FleetScheduleAttributes } from "./models/FleetScheduleAttributes"; +export { FleetScheduleCreate } from "./models/FleetScheduleCreate"; +export { FleetScheduleCreateAttributes } from "./models/FleetScheduleCreateAttributes"; +export { FleetScheduleCreateRequest } from "./models/FleetScheduleCreateRequest"; +export { FleetSchedulePatch } from "./models/FleetSchedulePatch"; +export { FleetSchedulePatchAttributes } from "./models/FleetSchedulePatchAttributes"; +export { FleetSchedulePatchRequest } from "./models/FleetSchedulePatchRequest"; +export { FleetScheduleRecurrenceRule } from "./models/FleetScheduleRecurrenceRule"; +export { FleetScheduleResourceType } from "./models/FleetScheduleResourceType"; +export { FleetScheduleResponse } from "./models/FleetScheduleResponse"; +export { FleetSchedulesResponse } from "./models/FleetSchedulesResponse"; +export { FleetScheduleStatus } from "./models/FleetScheduleStatus"; diff --git a/services/fleet_automation/src/v2/models/FleetAgentVersion.ts b/services/fleet_automation/src/v2/models/FleetAgentVersion.ts new file mode 100644 index 000000000000..1ac174053612 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetAgentVersion.ts @@ -0,0 +1,62 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetAgentVersionAttributes } from "./FleetAgentVersionAttributes"; +import { FleetAgentVersionResourceType } from "./FleetAgentVersionResourceType"; + +/** + * Represents an available Datadog Agent version. + */ +export class FleetAgentVersion { + "attributes"?: FleetAgentVersionAttributes; + /** + * Unique identifier for the Agent version (same as version). + */ + "id": string; + /** + * The type of Agent version resource. + */ + "type": FleetAgentVersionResourceType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "FleetAgentVersionAttributes", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "FleetAgentVersionResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentVersion.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetAgentVersionAttributes.ts b/services/fleet_automation/src/v2/models/FleetAgentVersionAttributes.ts new file mode 100644 index 000000000000..46a042caf4cb --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetAgentVersionAttributes.ts @@ -0,0 +1,41 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +export class FleetAgentVersionAttributes { + /** + * The Agent version string. + */ + "version"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + version: { + baseName: "version", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentVersionAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetAgentVersionResourceType.ts b/services/fleet_automation/src/v2/models/FleetAgentVersionResourceType.ts new file mode 100644 index 000000000000..1084b13f25b5 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetAgentVersionResourceType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * The type of Agent version resource. + */ +export type FleetAgentVersionResourceType = + | typeof AGENT_VERSION + | UnparsedObject; +export const AGENT_VERSION = "agent_version"; diff --git a/services/fleet_automation/src/v2/models/FleetAgentVersionsResponse.ts b/services/fleet_automation/src/v2/models/FleetAgentVersionsResponse.ts new file mode 100644 index 000000000000..9b3171fff613 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetAgentVersionsResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetAgentVersion } from "./FleetAgentVersion"; + +/** + * Response containing a list of available Agent versions. + */ +export class FleetAgentVersionsResponse { + /** + * Array of available Agent versions. + */ + "data": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentVersionsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentAttributes.ts b/services/fleet_automation/src/v2/models/FleetDeploymentAttributes.ts index 9419ad951ded..d12a3c5957cf 100644 --- a/services/fleet_automation/src/v2/models/FleetDeploymentAttributes.ts +++ b/services/fleet_automation/src/v2/models/FleetDeploymentAttributes.ts @@ -1,6 +1,8 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; +import { FleetDeploymentHost } from "./FleetDeploymentHost"; import { FleetDeploymentOperation } from "./FleetDeploymentOperation"; +import { FleetDeploymentPackage } from "./FleetDeploymentPackage"; /** * Attributes of a deployment in the response. @@ -19,9 +21,20 @@ export class FleetDeploymentAttributes { */ "filterQuery"?: string; /** - * Current high-level status of the deployment (for example, "pending", "running", "completed", "failed"). + * Current high-level status of the deployment (for example, "pending", "running", + * "completed", "failed"). */ "highLevelStatus"?: string; + /** + * Paginated list of hosts in this deployment with their individual statuses. Only included + * when fetching a single deployment by ID. Use the `limit` and `page` query parameters to + * navigate through pages. Pagination metadata is included in the response `meta.hosts` field. + */ + "hosts"?: Array; + /** + * List of packages to deploy to target hosts. Present only for package upgrade deployments. + */ + "packages"?: Array; /** * Total number of hosts targeted by this deployment. */ @@ -58,6 +71,14 @@ export class FleetDeploymentAttributes { baseName: "high_level_status", type: "string", }, + hosts: { + baseName: "hosts", + type: "Array", + }, + packages: { + baseName: "packages", + type: "Array", + }, totalHosts: { baseName: "total_hosts", type: "number", diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentConfigureCreate.ts b/services/fleet_automation/src/v2/models/FleetDeploymentConfigureCreate.ts index e0f131a1d150..04b95ccd9de1 100644 --- a/services/fleet_automation/src/v2/models/FleetDeploymentConfigureCreate.ts +++ b/services/fleet_automation/src/v2/models/FleetDeploymentConfigureCreate.ts @@ -4,7 +4,7 @@ import { FleetDeploymentConfigureAttributes } from "./FleetDeploymentConfigureAt import { FleetDeploymentResourceType } from "./FleetDeploymentResourceType"; /** - * Data for creating a new deployment. + * Data for creating a new configuration deployment. */ export class FleetDeploymentConfigureCreate { /** diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentConfigureCreateRequest.ts b/services/fleet_automation/src/v2/models/FleetDeploymentConfigureCreateRequest.ts index 0dab7475788e..630f36f9ff6c 100644 --- a/services/fleet_automation/src/v2/models/FleetDeploymentConfigureCreateRequest.ts +++ b/services/fleet_automation/src/v2/models/FleetDeploymentConfigureCreateRequest.ts @@ -3,11 +3,11 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; import { FleetDeploymentConfigureCreate } from "./FleetDeploymentConfigureCreate"; /** - * Request payload for creating a new deployment. + * Request payload for creating a new configuration deployment. */ export class FleetDeploymentConfigureCreateRequest { /** - * Data for creating a new deployment. + * Data for creating a new configuration deployment. */ "data": FleetDeploymentConfigureCreate; /** diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentHost.ts b/services/fleet_automation/src/v2/models/FleetDeploymentHost.ts new file mode 100644 index 000000000000..08db3f6fa9c1 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetDeploymentHost.ts @@ -0,0 +1,70 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetDeploymentHostPackage } from "./FleetDeploymentHostPackage"; + +/** + * A host that is part of a deployment with its current status. + */ +export class FleetDeploymentHost { + /** + * Error message if the deployment failed on this host. + */ + "error"?: string; + /** + * The hostname of the agent. + */ + "hostname"?: string; + /** + * Current deployment status for this specific host. + */ + "status"?: string; + /** + * List of packages and their versions currently installed on this host. + */ + "versions"?: Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + error: { + baseName: "error", + type: "string", + }, + hostname: { + baseName: "hostname", + type: "string", + }, + status: { + baseName: "status", + type: "string", + }, + versions: { + baseName: "versions", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetDeploymentHost.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentHostPackage.ts b/services/fleet_automation/src/v2/models/FleetDeploymentHostPackage.ts new file mode 100644 index 000000000000..2b319a420153 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetDeploymentHostPackage.ts @@ -0,0 +1,69 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Package version information for a host, showing the initial version before deployment, + * the target version to deploy, and the current version on the host. + */ +export class FleetDeploymentHostPackage { + /** + * The current version of the package on the host. + */ + "currentVersion"?: string; + /** + * The initial version of the package on the host before the deployment started. + */ + "initialVersion"?: string; + /** + * The name of the package. + */ + "packageName"?: string; + /** + * The target version that the deployment is attempting to install. + */ + "targetVersion"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + currentVersion: { + baseName: "current_version", + type: "string", + }, + initialVersion: { + baseName: "initial_version", + type: "string", + }, + packageName: { + baseName: "package_name", + type: "string", + }, + targetVersion: { + baseName: "target_version", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetDeploymentHostPackage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentHostsPage.ts b/services/fleet_automation/src/v2/models/FleetDeploymentHostsPage.ts new file mode 100644 index 000000000000..f86cbabf94ca --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetDeploymentHostsPage.ts @@ -0,0 +1,72 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Pagination details for the list of hosts in a deployment. + */ +export class FleetDeploymentHostsPage { + /** + * Current page index (zero-based). + */ + "currentPage"?: number; + /** + * Number of hosts returned per page. + */ + "pageSize"?: number; + /** + * Total number of hosts in this deployment. + */ + "totalHosts"?: number; + /** + * Total number of pages available. + */ + "totalPages"?: number; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + currentPage: { + baseName: "current_page", + type: "number", + format: "int64", + }, + pageSize: { + baseName: "page_size", + type: "number", + format: "int64", + }, + totalHosts: { + baseName: "total_hosts", + type: "number", + format: "int64", + }, + totalPages: { + baseName: "total_pages", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetDeploymentHostsPage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentOperation.ts b/services/fleet_automation/src/v2/models/FleetDeploymentOperation.ts index 2120cc9ed7e8..fda30aa1e67b 100644 --- a/services/fleet_automation/src/v2/models/FleetDeploymentOperation.ts +++ b/services/fleet_automation/src/v2/models/FleetDeploymentOperation.ts @@ -21,8 +21,8 @@ export class FleetDeploymentOperation { * Patch data in JSON format to apply to the configuration file. * When using `merge-patch`, this object is merged with the existing configuration, * allowing you to add, update, or override specific fields without replacing the entire file. - * The structure must match the target configuration file format (for example, YAML structure for Datadog Agent config). - * Not applicable when using the `delete` operation. + * The structure must match the target configuration file format (for example, YAML structure + * for Datadog Agent config). Not applicable when using the `delete` operation. */ "patch"?: { [key: string]: any }; /** diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentPackage.ts b/services/fleet_automation/src/v2/models/FleetDeploymentPackage.ts new file mode 100644 index 000000000000..3c652f003e38 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetDeploymentPackage.ts @@ -0,0 +1,54 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * A package and its target version for deployment. + */ +export class FleetDeploymentPackage { + /** + * The name of the package to deploy. + */ + "name": string; + /** + * The target version of the package to deploy. + */ + "version": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + version: { + baseName: "version", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetDeploymentPackage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentPackageUpgradeAttributes.ts b/services/fleet_automation/src/v2/models/FleetDeploymentPackageUpgradeAttributes.ts new file mode 100644 index 000000000000..afff83c6fede --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetDeploymentPackageUpgradeAttributes.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetDeploymentPackage } from "./FleetDeploymentPackage"; + +/** + * Attributes for creating a new package upgrade deployment. + */ +export class FleetDeploymentPackageUpgradeAttributes { + /** + * Query used to filter and select target hosts for the deployment. Uses the Datadog query syntax. + */ + "filterQuery"?: string; + /** + * List of packages and their target versions to deploy to the selected hosts. + */ + "targetPackages": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + filterQuery: { + baseName: "filter_query", + type: "string", + }, + targetPackages: { + baseName: "target_packages", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetDeploymentPackageUpgradeAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentPackageUpgradeCreate.ts b/services/fleet_automation/src/v2/models/FleetDeploymentPackageUpgradeCreate.ts new file mode 100644 index 000000000000..f9a5c21b3819 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetDeploymentPackageUpgradeCreate.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetDeploymentPackageUpgradeAttributes } from "./FleetDeploymentPackageUpgradeAttributes"; +import { FleetDeploymentResourceType } from "./FleetDeploymentResourceType"; + +/** + * Data for creating a new package upgrade deployment. + */ +export class FleetDeploymentPackageUpgradeCreate { + /** + * Attributes for creating a new package upgrade deployment. + */ + "attributes": FleetDeploymentPackageUpgradeAttributes; + /** + * The type of deployment resource. + */ + "type": FleetDeploymentResourceType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "FleetDeploymentPackageUpgradeAttributes", + required: true, + }, + type: { + baseName: "type", + type: "FleetDeploymentResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetDeploymentPackageUpgradeCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentPackageUpgradeCreateRequest.ts b/services/fleet_automation/src/v2/models/FleetDeploymentPackageUpgradeCreateRequest.ts new file mode 100644 index 000000000000..ecbf64e52427 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetDeploymentPackageUpgradeCreateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetDeploymentPackageUpgradeCreate } from "./FleetDeploymentPackageUpgradeCreate"; + +/** + * Request payload for creating a new package upgrade deployment. + */ +export class FleetDeploymentPackageUpgradeCreateRequest { + /** + * Data for creating a new package upgrade deployment. + */ + "data": FleetDeploymentPackageUpgradeCreate; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "FleetDeploymentPackageUpgradeCreate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetDeploymentPackageUpgradeCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentResponse.ts b/services/fleet_automation/src/v2/models/FleetDeploymentResponse.ts index c9e6f202927d..68eb87abf8b3 100644 --- a/services/fleet_automation/src/v2/models/FleetDeploymentResponse.ts +++ b/services/fleet_automation/src/v2/models/FleetDeploymentResponse.ts @@ -1,6 +1,7 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; import { FleetDeployment } from "./FleetDeployment"; +import { FleetDeploymentResponseMeta } from "./FleetDeploymentResponseMeta"; /** * Response containing a single deployment. @@ -10,6 +11,10 @@ export class FleetDeploymentResponse { * A deployment that defines automated configuration changes for a fleet of hosts. */ "data"?: FleetDeployment; + /** + * Metadata for a single deployment response, including pagination information for hosts. + */ + "meta"?: FleetDeploymentResponseMeta; /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -29,6 +34,10 @@ export class FleetDeploymentResponse { baseName: "data", type: "FleetDeployment", }, + meta: { + baseName: "meta", + type: "FleetDeploymentResponseMeta", + }, additionalProperties: { baseName: "additionalProperties", type: "{ [key: string]: any; }", diff --git a/services/fleet_automation/src/v2/models/FleetDeploymentResponseMeta.ts b/services/fleet_automation/src/v2/models/FleetDeploymentResponseMeta.ts new file mode 100644 index 000000000000..d8df69b3cf0d --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetDeploymentResponseMeta.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetDeploymentHostsPage } from "./FleetDeploymentHostsPage"; + +/** + * Metadata for a single deployment response, including pagination information for hosts. + */ +export class FleetDeploymentResponseMeta { + /** + * Pagination details for the list of hosts in a deployment. + */ + "hosts"?: FleetDeploymentHostsPage; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + hosts: { + baseName: "hosts", + type: "FleetDeploymentHostsPage", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetDeploymentResponseMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetSchedule.ts b/services/fleet_automation/src/v2/models/FleetSchedule.ts new file mode 100644 index 000000000000..26daaebab125 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetSchedule.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetScheduleAttributes } from "./FleetScheduleAttributes"; +import { FleetScheduleResourceType } from "./FleetScheduleResourceType"; + +/** + * A schedule that automatically creates deployments based on a recurrence rule. + */ +export class FleetSchedule { + /** + * Attributes of a schedule in the response. + */ + "attributes": FleetScheduleAttributes; + /** + * Unique identifier for the schedule. + */ + "id": string; + /** + * The type of schedule resource. + */ + "type": FleetScheduleResourceType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "FleetScheduleAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "FleetScheduleResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetSchedule.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetScheduleAttributes.ts b/services/fleet_automation/src/v2/models/FleetScheduleAttributes.ts new file mode 100644 index 000000000000..e224ba3c2ab4 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetScheduleAttributes.ts @@ -0,0 +1,121 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetScheduleRecurrenceRule } from "./FleetScheduleRecurrenceRule"; +import { FleetScheduleStatus } from "./FleetScheduleStatus"; + +/** + * Attributes of a schedule in the response. + */ +export class FleetScheduleAttributes { + /** + * Unix timestamp (seconds since epoch) when the schedule was created. + */ + "createdAtUnix"?: number; + /** + * User handle of the person who created the schedule. + */ + "createdBy"?: string; + /** + * Human-readable name for the schedule. + */ + "name"?: string; + /** + * Query used to filter and select target hosts for scheduled deployments. Uses the Datadog query syntax. + */ + "query"?: string; + /** + * Defines the recurrence pattern for the schedule. Specifies when deployments should be + * automatically triggered based on maintenance windows. + */ + "rule"?: FleetScheduleRecurrenceRule; + /** + * The status of the schedule. + * - `active`: The schedule is active and will create deployments according to its recurrence rule. + * - `inactive`: The schedule is inactive and will not create any deployments. + */ + "status"?: FleetScheduleStatus; + /** + * Unix timestamp (seconds since epoch) when the schedule was last updated. + */ + "updatedAtUnix"?: number; + /** + * User handle of the person who last updated the schedule. + */ + "updatedBy"?: string; + /** + * Number of major versions behind the latest to target for upgrades. + * - 0: Always upgrade to the latest version + * - 1: Upgrade to latest minus 1 major version + * - 2: Upgrade to latest minus 2 major versions + * Maximum value is 2. + */ + "versionToLatest"?: number; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAtUnix: { + baseName: "created_at_unix", + type: "number", + format: "int64", + }, + createdBy: { + baseName: "created_by", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + query: { + baseName: "query", + type: "string", + }, + rule: { + baseName: "rule", + type: "FleetScheduleRecurrenceRule", + }, + status: { + baseName: "status", + type: "FleetScheduleStatus", + }, + updatedAtUnix: { + baseName: "updated_at_unix", + type: "number", + format: "int64", + }, + updatedBy: { + baseName: "updated_by", + type: "string", + }, + versionToLatest: { + baseName: "version_to_latest", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetScheduleAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetScheduleCreate.ts b/services/fleet_automation/src/v2/models/FleetScheduleCreate.ts new file mode 100644 index 000000000000..b1a41ba83872 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetScheduleCreate.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetScheduleCreateAttributes } from "./FleetScheduleCreateAttributes"; +import { FleetScheduleResourceType } from "./FleetScheduleResourceType"; + +/** + * Data for creating a new schedule. + */ +export class FleetScheduleCreate { + /** + * Attributes for creating a new schedule. + */ + "attributes": FleetScheduleCreateAttributes; + /** + * The type of schedule resource. + */ + "type": FleetScheduleResourceType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "FleetScheduleCreateAttributes", + required: true, + }, + type: { + baseName: "type", + type: "FleetScheduleResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetScheduleCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetScheduleCreateAttributes.ts b/services/fleet_automation/src/v2/models/FleetScheduleCreateAttributes.ts new file mode 100644 index 000000000000..54b0e7d199db --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetScheduleCreateAttributes.ts @@ -0,0 +1,90 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetScheduleRecurrenceRule } from "./FleetScheduleRecurrenceRule"; +import { FleetScheduleStatus } from "./FleetScheduleStatus"; + +/** + * Attributes for creating a new schedule. + */ +export class FleetScheduleCreateAttributes { + /** + * Human-readable name for the schedule. + */ + "name": string; + /** + * Query used to filter and select target hosts for scheduled deployments. Uses the Datadog query syntax. + */ + "query": string; + /** + * Defines the recurrence pattern for the schedule. Specifies when deployments should be + * automatically triggered based on maintenance windows. + */ + "rule": FleetScheduleRecurrenceRule; + /** + * The status of the schedule. + * - `active`: The schedule is active and will create deployments according to its recurrence rule. + * - `inactive`: The schedule is inactive and will not create any deployments. + */ + "status"?: FleetScheduleStatus; + /** + * Number of major versions behind the latest to target for upgrades. + * - 0: Always upgrade to the latest version (default) + * - 1: Upgrade to latest minus 1 major version + * - 2: Upgrade to latest minus 2 major versions + * Maximum value is 2. + */ + "versionToLatest"?: number; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + query: { + baseName: "query", + type: "string", + required: true, + }, + rule: { + baseName: "rule", + type: "FleetScheduleRecurrenceRule", + required: true, + }, + status: { + baseName: "status", + type: "FleetScheduleStatus", + }, + versionToLatest: { + baseName: "version_to_latest", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetScheduleCreateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetScheduleCreateRequest.ts b/services/fleet_automation/src/v2/models/FleetScheduleCreateRequest.ts new file mode 100644 index 000000000000..981f7b0c7a3c --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetScheduleCreateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetScheduleCreate } from "./FleetScheduleCreate"; + +/** + * Request payload for creating a new schedule. + */ +export class FleetScheduleCreateRequest { + /** + * Data for creating a new schedule. + */ + "data": FleetScheduleCreate; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "FleetScheduleCreate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetScheduleCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetSchedulePatch.ts b/services/fleet_automation/src/v2/models/FleetSchedulePatch.ts new file mode 100644 index 000000000000..4fab2341f927 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetSchedulePatch.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetSchedulePatchAttributes } from "./FleetSchedulePatchAttributes"; +import { FleetScheduleResourceType } from "./FleetScheduleResourceType"; + +/** + * Data for partially updating a schedule. + */ +export class FleetSchedulePatch { + /** + * Attributes for partially updating a schedule. All fields are optional. + */ + "attributes"?: FleetSchedulePatchAttributes; + /** + * The type of schedule resource. + */ + "type": FleetScheduleResourceType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "FleetSchedulePatchAttributes", + }, + type: { + baseName: "type", + type: "FleetScheduleResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetSchedulePatch.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetSchedulePatchAttributes.ts b/services/fleet_automation/src/v2/models/FleetSchedulePatchAttributes.ts new file mode 100644 index 000000000000..d5e2bacd0d87 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetSchedulePatchAttributes.ts @@ -0,0 +1,87 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetScheduleRecurrenceRule } from "./FleetScheduleRecurrenceRule"; +import { FleetScheduleStatus } from "./FleetScheduleStatus"; + +/** + * Attributes for partially updating a schedule. All fields are optional. + */ +export class FleetSchedulePatchAttributes { + /** + * Human-readable name for the schedule. + */ + "name"?: string; + /** + * Query used to filter and select target hosts for scheduled deployments. Uses the Datadog query syntax. + */ + "query"?: string; + /** + * Defines the recurrence pattern for the schedule. Specifies when deployments should be + * automatically triggered based on maintenance windows. + */ + "rule"?: FleetScheduleRecurrenceRule; + /** + * The status of the schedule. + * - `active`: The schedule is active and will create deployments according to its recurrence rule. + * - `inactive`: The schedule is inactive and will not create any deployments. + */ + "status"?: FleetScheduleStatus; + /** + * Number of major versions behind the latest to target for upgrades. + * - 0: Always upgrade to the latest version + * - 1: Upgrade to latest minus 1 major version + * - 2: Upgrade to latest minus 2 major versions + * Maximum value is 2. + */ + "versionToLatest"?: number; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + }, + query: { + baseName: "query", + type: "string", + }, + rule: { + baseName: "rule", + type: "FleetScheduleRecurrenceRule", + }, + status: { + baseName: "status", + type: "FleetScheduleStatus", + }, + versionToLatest: { + baseName: "version_to_latest", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetSchedulePatchAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetSchedulePatchRequest.ts b/services/fleet_automation/src/v2/models/FleetSchedulePatchRequest.ts new file mode 100644 index 000000000000..a6728d24f189 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetSchedulePatchRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetSchedulePatch } from "./FleetSchedulePatch"; + +/** + * Request payload for partially updating a schedule. + */ +export class FleetSchedulePatchRequest { + /** + * Data for partially updating a schedule. + */ + "data": FleetSchedulePatch; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "FleetSchedulePatch", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetSchedulePatchRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetScheduleRecurrenceRule.ts b/services/fleet_automation/src/v2/models/FleetScheduleRecurrenceRule.ts new file mode 100644 index 000000000000..fa637550479b --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetScheduleRecurrenceRule.ts @@ -0,0 +1,76 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Defines the recurrence pattern for the schedule. Specifies when deployments should be + * automatically triggered based on maintenance windows. + */ +export class FleetScheduleRecurrenceRule { + /** + * List of days of the week when the schedule should trigger. Valid values are: + * "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun". + */ + "daysOfWeek": Array; + /** + * Duration of the maintenance window in minutes. + */ + "maintenanceWindowDuration": number; + /** + * Start time of the maintenance window in 24-hour clock format (HH:MM). + * Deployments will be triggered at this time on the specified days. + */ + "startMaintenanceWindow": string; + /** + * Timezone for the schedule in IANA Time Zone Database format (e.g., "America/New_York", "UTC"). + */ + "timezone": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + daysOfWeek: { + baseName: "days_of_week", + type: "Array", + required: true, + }, + maintenanceWindowDuration: { + baseName: "maintenance_window_duration", + type: "number", + required: true, + format: "int64", + }, + startMaintenanceWindow: { + baseName: "start_maintenance_window", + type: "string", + required: true, + }, + timezone: { + baseName: "timezone", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetScheduleRecurrenceRule.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetScheduleResourceType.ts b/services/fleet_automation/src/v2/models/FleetScheduleResourceType.ts new file mode 100644 index 000000000000..a2535174478f --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetScheduleResourceType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * The type of schedule resource. + */ +export type FleetScheduleResourceType = typeof SCHEDULE | UnparsedObject; +export const SCHEDULE = "schedule"; diff --git a/services/fleet_automation/src/v2/models/FleetScheduleResponse.ts b/services/fleet_automation/src/v2/models/FleetScheduleResponse.ts new file mode 100644 index 000000000000..680051e3b7c1 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetScheduleResponse.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetSchedule } from "./FleetSchedule"; + +/** + * Response containing a single schedule. + */ +export class FleetScheduleResponse { + /** + * A schedule that automatically creates deployments based on a recurrence rule. + */ + "data"?: FleetSchedule; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "FleetSchedule", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetScheduleResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/FleetScheduleStatus.ts b/services/fleet_automation/src/v2/models/FleetScheduleStatus.ts new file mode 100644 index 000000000000..36b85324e392 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetScheduleStatus.ts @@ -0,0 +1,13 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * The status of the schedule. + * - `active`: The schedule is active and will create deployments according to its recurrence rule. + * - `inactive`: The schedule is inactive and will not create any deployments. + */ +export type FleetScheduleStatus = + | typeof ACTIVE + | typeof INACTIVE + | UnparsedObject; +export const ACTIVE = "active"; +export const INACTIVE = "inactive"; diff --git a/services/fleet_automation/src/v2/models/FleetSchedulesResponse.ts b/services/fleet_automation/src/v2/models/FleetSchedulesResponse.ts new file mode 100644 index 000000000000..c4e0c8c0de66 --- /dev/null +++ b/services/fleet_automation/src/v2/models/FleetSchedulesResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { FleetSchedule } from "./FleetSchedule"; + +/** + * Response containing a list of schedules. + */ +export class FleetSchedulesResponse { + /** + * Array of schedules. + */ + "data": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetSchedulesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/fleet_automation/src/v2/models/TypingInfo.ts b/services/fleet_automation/src/v2/models/TypingInfo.ts index 73c0177a285c..a92a93c67792 100644 --- a/services/fleet_automation/src/v2/models/TypingInfo.ts +++ b/services/fleet_automation/src/v2/models/TypingInfo.ts @@ -1,35 +1,84 @@ import { ModelTypingInfo } from "@datadog/datadog-api-client"; import { APIErrorResponse } from "./APIErrorResponse"; +import { FleetAgentVersion } from "./FleetAgentVersion"; +import { FleetAgentVersionAttributes } from "./FleetAgentVersionAttributes"; +import { FleetAgentVersionsResponse } from "./FleetAgentVersionsResponse"; import { FleetDeployment } from "./FleetDeployment"; import { FleetDeploymentAttributes } from "./FleetDeploymentAttributes"; import { FleetDeploymentConfigureAttributes } from "./FleetDeploymentConfigureAttributes"; import { FleetDeploymentConfigureCreate } from "./FleetDeploymentConfigureCreate"; import { FleetDeploymentConfigureCreateRequest } from "./FleetDeploymentConfigureCreateRequest"; +import { FleetDeploymentHost } from "./FleetDeploymentHost"; +import { FleetDeploymentHostPackage } from "./FleetDeploymentHostPackage"; +import { FleetDeploymentHostsPage } from "./FleetDeploymentHostsPage"; import { FleetDeploymentOperation } from "./FleetDeploymentOperation"; +import { FleetDeploymentPackage } from "./FleetDeploymentPackage"; +import { FleetDeploymentPackageUpgradeAttributes } from "./FleetDeploymentPackageUpgradeAttributes"; +import { FleetDeploymentPackageUpgradeCreate } from "./FleetDeploymentPackageUpgradeCreate"; +import { FleetDeploymentPackageUpgradeCreateRequest } from "./FleetDeploymentPackageUpgradeCreateRequest"; import { FleetDeploymentResponse } from "./FleetDeploymentResponse"; +import { FleetDeploymentResponseMeta } from "./FleetDeploymentResponseMeta"; import { FleetDeploymentsPage } from "./FleetDeploymentsPage"; import { FleetDeploymentsResponse } from "./FleetDeploymentsResponse"; import { FleetDeploymentsResponseMeta } from "./FleetDeploymentsResponseMeta"; +import { FleetSchedule } from "./FleetSchedule"; +import { FleetScheduleAttributes } from "./FleetScheduleAttributes"; +import { FleetScheduleCreate } from "./FleetScheduleCreate"; +import { FleetScheduleCreateAttributes } from "./FleetScheduleCreateAttributes"; +import { FleetScheduleCreateRequest } from "./FleetScheduleCreateRequest"; +import { FleetSchedulePatch } from "./FleetSchedulePatch"; +import { FleetSchedulePatchAttributes } from "./FleetSchedulePatchAttributes"; +import { FleetSchedulePatchRequest } from "./FleetSchedulePatchRequest"; +import { FleetScheduleRecurrenceRule } from "./FleetScheduleRecurrenceRule"; +import { FleetScheduleResponse } from "./FleetScheduleResponse"; +import { FleetSchedulesResponse } from "./FleetSchedulesResponse"; export const TypingInfo: ModelTypingInfo = { enumsMap: { + FleetAgentVersionResourceType: ["agent_version"], FleetDeploymentFileOp: ["merge-patch", "delete"], FleetDeploymentResourceType: ["deployment"], + FleetScheduleResourceType: ["schedule"], + FleetScheduleStatus: ["active", "inactive"], }, oneOfMap: {}, typeMap: { APIErrorResponse: APIErrorResponse, + FleetAgentVersion: FleetAgentVersion, + FleetAgentVersionAttributes: FleetAgentVersionAttributes, + FleetAgentVersionsResponse: FleetAgentVersionsResponse, FleetDeployment: FleetDeployment, FleetDeploymentAttributes: FleetDeploymentAttributes, FleetDeploymentConfigureAttributes: FleetDeploymentConfigureAttributes, FleetDeploymentConfigureCreate: FleetDeploymentConfigureCreate, FleetDeploymentConfigureCreateRequest: FleetDeploymentConfigureCreateRequest, + FleetDeploymentHost: FleetDeploymentHost, + FleetDeploymentHostPackage: FleetDeploymentHostPackage, + FleetDeploymentHostsPage: FleetDeploymentHostsPage, FleetDeploymentOperation: FleetDeploymentOperation, + FleetDeploymentPackage: FleetDeploymentPackage, + FleetDeploymentPackageUpgradeAttributes: + FleetDeploymentPackageUpgradeAttributes, + FleetDeploymentPackageUpgradeCreate: FleetDeploymentPackageUpgradeCreate, + FleetDeploymentPackageUpgradeCreateRequest: + FleetDeploymentPackageUpgradeCreateRequest, FleetDeploymentResponse: FleetDeploymentResponse, + FleetDeploymentResponseMeta: FleetDeploymentResponseMeta, FleetDeploymentsPage: FleetDeploymentsPage, FleetDeploymentsResponse: FleetDeploymentsResponse, FleetDeploymentsResponseMeta: FleetDeploymentsResponseMeta, + FleetSchedule: FleetSchedule, + FleetScheduleAttributes: FleetScheduleAttributes, + FleetScheduleCreate: FleetScheduleCreate, + FleetScheduleCreateAttributes: FleetScheduleCreateAttributes, + FleetScheduleCreateRequest: FleetScheduleCreateRequest, + FleetSchedulePatch: FleetSchedulePatch, + FleetSchedulePatchAttributes: FleetSchedulePatchAttributes, + FleetSchedulePatchRequest: FleetSchedulePatchRequest, + FleetScheduleRecurrenceRule: FleetScheduleRecurrenceRule, + FleetScheduleResponse: FleetScheduleResponse, + FleetSchedulesResponse: FleetSchedulesResponse, }, };