From 43ab0ae2cbbe6a812b95c3cc8d5747574296dd6a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 18 Nov 2025 17:01:28 +0000 Subject: [PATCH] Regenerate client from commit a55abe2 of spec repo --- .generator/schemas/v2/openapi.yaml | 870 ++++++++- .../frozen.json | 1 + .../recording.har | 67 + .../frozen.json | 1 + .../recording.har | 104 ++ .../frozen.json | 1 + .../recording.har | 157 ++ .../frozen.json | 1 + .../recording.har | 194 ++ .../frozen.json | 1 + .../recording.har | 57 + .../frozen.json | 1 + .../recording.har | 147 ++ .../frozen.json | 1 + .../recording.har | 57 + .../frozen.json | 1 + .../recording.har | 237 +++ .../frozen.json | 1 + .../recording.har | 57 + .../frozen.json | 1 + .../recording.har | 147 ++ .../frozen.json | 1 + .../recording.har | 237 +++ .../frozen.json | 1 + .../recording.har | 237 +++ .../frozen.json | 1 + .../recording.har | 67 + .../frozen.json | 1 + .../recording.har | 157 ++ .../frozen.json | 1 + .../recording.har | 247 +++ .../frozen.json | 1 + .../recording.har | 247 +++ .../deployment-gates/CreateDeploymentGate.ts | 32 + .../deployment-gates/CreateDeploymentRule.ts | 38 + .../deployment-gates/DeleteDeploymentGate.ts | 25 + .../deployment-gates/DeleteDeploymentRule.ts | 29 + .../v2/deployment-gates/GetDeploymentGate.ts | 25 + .../v2/deployment-gates/GetDeploymentRule.ts | 29 + .../deployment-gates/UpdateDeploymentGate.ts | 34 + .../deployment-gates/UpdateDeploymentRule.ts | 41 + features/support/scenarios_model_mapping.ts | 80 + features/v2/deployment_gates.feature | 289 +++ features/v2/given.json | 28 + features/v2/undo.json | 66 + .../configuration.ts | 8 + .../apis/DeploymentGatesApi.ts | 1649 +++++++++++++++++ packages/datadog-api-client-v2/index.ts | 43 + .../models/CreateDeploymentGateParams.ts | 54 + .../models/CreateDeploymentGateParamsData.ts | 64 + ...reateDeploymentGateParamsDataAttributes.ts | 78 + .../models/CreateDeploymentRuleParams.ts | 53 + .../models/CreateDeploymentRuleParamsData.ts | 64 + ...reateDeploymentRuleParamsDataAttributes.ts | 80 + .../models/DeploymentGateDataType.ts | 14 + .../models/DeploymentGateResponse.ts | 53 + .../models/DeploymentGateResponseData.ts | 73 + .../DeploymentGateResponseDataAttributes.ts | 118 ++ ...mentGateResponseDataAttributesCreatedBy.ts | 69 + ...mentGateResponseDataAttributesUpdatedBy.ts | 69 + .../models/DeploymentRuleDataType.ts | 14 + ...entRuleOptionsFaultyDeploymentDetection.ts | 50 + .../models/DeploymentRuleOptionsMonitor.ts | 51 + .../models/DeploymentRuleResponse.ts | 53 + .../models/DeploymentRuleResponseData.ts | 73 + .../DeploymentRuleResponseDataAttributes.ts | 129 ++ ...mentRuleResponseDataAttributesCreatedBy.ts | 69 + ...eploymentRuleResponseDataAttributesType.ts | 18 + ...mentRuleResponseDataAttributesUpdatedBy.ts | 69 + .../models/DeploymentRulesOptions.ts | 18 + .../models/HTTPCDGatesBadRequestResponse.ts | 53 + .../models/HTTPCDGatesNotFoundResponse.ts | 53 + .../models/HTTPCDRulesNotFoundResponse.ts | 53 + .../models/ObjectSerializer.ts | 73 + .../models/UpdateDeploymentGateParams.ts | 54 + .../models/UpdateDeploymentGateParamsData.ts | 73 + ...pdateDeploymentGateParamsDataAttributes.ts | 53 + .../models/UpdateDeploymentRuleParams.ts | 54 + .../models/UpdateDeploymentRuleParamsData.ts | 64 + ...pdateDeploymentRuleParamsDataAttributes.ts | 72 + 80 files changed, 7651 insertions(+), 2 deletions(-) create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-Bad-Request-response_2727087309/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-Bad-Request-response_2727087309/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-OK-response_4140973969/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-OK-response_4140973969/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-Bad-Request-response_2824092514/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-Bad-Request-response_2824092514/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-Bad-Request-response_770984992/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-Bad-Request-response_770984992/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-No-Content-response_2018192270/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-No-Content-response_2018192270/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-Bad-Request-response_244866955/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-Bad-Request-response_244866955/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-Bad-Request-response_842931407/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-Bad-Request-response_842931407/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-Bad-Request-response_4008552930/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-Bad-Request-response_4008552930/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/recording.har create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-OK-response_2914944649/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-OK-response_2914944649/recording.har create mode 100644 examples/v2/deployment-gates/CreateDeploymentGate.ts create mode 100644 examples/v2/deployment-gates/CreateDeploymentRule.ts create mode 100644 examples/v2/deployment-gates/DeleteDeploymentGate.ts create mode 100644 examples/v2/deployment-gates/DeleteDeploymentRule.ts create mode 100644 examples/v2/deployment-gates/GetDeploymentGate.ts create mode 100644 examples/v2/deployment-gates/GetDeploymentRule.ts create mode 100644 examples/v2/deployment-gates/UpdateDeploymentGate.ts create mode 100644 examples/v2/deployment-gates/UpdateDeploymentRule.ts create mode 100644 features/v2/deployment_gates.feature create mode 100644 packages/datadog-api-client-v2/apis/DeploymentGatesApi.ts create mode 100644 packages/datadog-api-client-v2/models/CreateDeploymentGateParams.ts create mode 100644 packages/datadog-api-client-v2/models/CreateDeploymentGateParamsData.ts create mode 100644 packages/datadog-api-client-v2/models/CreateDeploymentGateParamsDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CreateDeploymentRuleParams.ts create mode 100644 packages/datadog-api-client-v2/models/CreateDeploymentRuleParamsData.ts create mode 100644 packages/datadog-api-client-v2/models/CreateDeploymentRuleParamsDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentGateDataType.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentGateResponse.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentGateResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributesCreatedBy.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributesUpdatedBy.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRuleDataType.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRuleOptionsFaultyDeploymentDetection.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRuleOptionsMonitor.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRuleResponse.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRuleResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesCreatedBy.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesType.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesUpdatedBy.ts create mode 100644 packages/datadog-api-client-v2/models/DeploymentRulesOptions.ts create mode 100644 packages/datadog-api-client-v2/models/HTTPCDGatesBadRequestResponse.ts create mode 100644 packages/datadog-api-client-v2/models/HTTPCDGatesNotFoundResponse.ts create mode 100644 packages/datadog-api-client-v2/models/HTTPCDRulesNotFoundResponse.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateDeploymentGateParams.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateDeploymentGateParamsData.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateDeploymentGateParamsDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateDeploymentRuleParams.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateDeploymentRuleParamsData.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateDeploymentRuleParamsDataAttributes.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 1907f9ce4060..3340fb18c177 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1158,6 +1158,24 @@ components: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + HTTPCDGatesBadRequestResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCDGatesBadRequestResponse' + description: Bad request. + HTTPCDGatesNotFoundResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCDGatesNotFoundResponse' + description: Deployment gate not found. + HTTPCDRulesNotFoundResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCDRulesNotFoundResponse' + description: Deployment rule not found. NotAuthorizedResponse: content: application/json: @@ -12733,6 +12751,91 @@ components: meta: $ref: '#/components/schemas/DataDeletionResponseMeta' type: object + CreateDeploymentGateParams: + description: Parameters for creating a deployment gate. + properties: + data: + $ref: '#/components/schemas/CreateDeploymentGateParamsData' + required: + - data + type: object + CreateDeploymentGateParamsData: + description: Parameters for creating a deployment gate. + properties: + attributes: + $ref: '#/components/schemas/CreateDeploymentGateParamsDataAttributes' + type: + $ref: '#/components/schemas/DeploymentGateDataType' + required: + - type + - attributes + type: object + CreateDeploymentGateParamsDataAttributes: + description: Parameters for creating a deployment gate. + properties: + dry_run: + default: false + description: Whether this gate is run in dry-run mode. + example: false + type: boolean + env: + description: The environment of the deployment gate. + example: production + type: string + identifier: + default: default + description: The identifier of the deployment gate. + example: pre + type: string + service: + description: The service of the deployment gate. + example: my-service + type: string + required: + - env + - service + type: object + CreateDeploymentRuleParams: + description: Parameters for creating a deployment rule. + properties: + data: + $ref: '#/components/schemas/CreateDeploymentRuleParamsData' + type: object + CreateDeploymentRuleParamsData: + description: Parameters for creating a deployment rule. + properties: + attributes: + $ref: '#/components/schemas/CreateDeploymentRuleParamsDataAttributes' + type: + $ref: '#/components/schemas/DeploymentRuleDataType' + required: + - type + - attributes + type: object + CreateDeploymentRuleParamsDataAttributes: + description: Parameters for creating a deployment rule. + properties: + dry_run: + default: false + description: Whether this rule is run in dry-run mode. + example: false + type: boolean + name: + description: The name of the deployment rule. + example: My deployment rule + type: string + options: + $ref: '#/components/schemas/DeploymentRulesOptions' + type: + description: The type of the deployment rule (faulty_deployment_detection + or monitor). + example: faulty_deployment_detection + type: string + required: + - name + - options + - type + type: object CreateIncidentNotificationRuleRequest: description: Create request for a notification rule. properties: @@ -16434,6 +16537,113 @@ components: format: uuid type: string type: object + DeploymentGateDataType: + description: Deployment gate resource type. + enum: + - deployment_gate + example: deployment_gate + type: string + x-enum-varnames: + - DEPLOYMENT_GATE + DeploymentGateResponse: + description: Response for a deployment gate. + properties: + data: + $ref: '#/components/schemas/DeploymentGateResponseData' + type: object + DeploymentGateResponseData: + description: Data for a deployment gate. + properties: + attributes: + $ref: '#/components/schemas/DeploymentGateResponseDataAttributes' + id: + description: Unique identifier of the deployment gate. + example: 1111-2222-3333-4444-555566667777 + type: string + type: + $ref: '#/components/schemas/DeploymentGateDataType' + required: + - type + - attributes + - id + type: object + DeploymentGateResponseDataAttributes: + description: Basic information about a deployment gate. + properties: + created_at: + description: The timestamp when the deployment gate was created. + example: '2021-01-01T00:00:00Z' + format: date-time + type: string + created_by: + $ref: '#/components/schemas/DeploymentGateResponseDataAttributesCreatedBy' + dry_run: + description: Whether this gate is run in dry-run mode. + example: false + type: boolean + env: + description: The environment of the deployment gate. + example: production + type: string + identifier: + description: The identifier of the deployment gate. + example: pre + type: string + service: + description: The service of the deployment gate. + example: my-service + type: string + updated_at: + description: The timestamp when the deployment gate was last updated. + example: '2021-01-01T00:00:00Z' + format: date-time + type: string + updated_by: + $ref: '#/components/schemas/DeploymentGateResponseDataAttributesUpdatedBy' + required: + - created_at + - created_by + - dry_run + - env + - identifier + - service + type: object + DeploymentGateResponseDataAttributesCreatedBy: + description: Information about the user who created the deployment gate. + properties: + handle: + description: The handle of the user who created the deployment rule. + example: test-user + type: string + id: + description: The ID of the user who created the deployment rule. + example: 1111-2222-3333-4444-555566667777 + type: string + name: + description: The name of the user who created the deployment rule. + example: Test User + type: string + required: + - id + type: object + DeploymentGateResponseDataAttributesUpdatedBy: + description: Information about the user who updated the deployment gate. + properties: + handle: + description: The handle of the user who updated the deployment rule. + example: test-user + type: string + id: + description: The ID of the user who updated the deployment rule. + example: 1111-2222-3333-4444-555566667777 + type: string + name: + description: The name of the user who updated the deployment rule. + example: Test User + type: string + required: + - id + type: object DeploymentMetadata: description: Metadata object containing the publication creation information. properties: @@ -16473,6 +16683,164 @@ components: type: $ref: '#/components/schemas/AppDeploymentType' type: object + DeploymentRuleDataType: + description: Deployment rule resource type. + enum: + - deployment_rule + example: deployment_rule + type: string + x-enum-varnames: + - DEPLOYMENT_RULE + DeploymentRuleOptionsFaultyDeploymentDetection: + additionalProperties: false + description: Faulty deployment detection options for deployment rules. + properties: + duration: + description: The duration for faulty deployment detection. + example: 3600 + format: int64 + type: integer + excluded_resources: + description: Resources to exclude from faulty deployment detection. + example: + - resource1 + - resource2 + items: + type: string + type: array + type: object + DeploymentRuleOptionsMonitor: + additionalProperties: false + description: Monitor options for deployment rules. + properties: + duration: + description: Seconds the monitor needs to stay in OK status for the rule + to pass. + example: 3600 + format: int64 + type: integer + query: + description: Monitors that match this query are evaluated. + example: service:my-service env:prod + type: string + required: + - query + type: object + DeploymentRuleResponse: + description: Response for a deployment rule. + properties: + data: + $ref: '#/components/schemas/DeploymentRuleResponseData' + type: object + DeploymentRuleResponseData: + description: Data for a deployment rule. + properties: + attributes: + $ref: '#/components/schemas/DeploymentRuleResponseDataAttributes' + id: + description: Unique identifier of the deployment rule. + example: 1111-2222-3333-4444-555566667777 + type: string + type: + $ref: '#/components/schemas/DeploymentRuleDataType' + required: + - type + - attributes + - id + type: object + DeploymentRuleResponseDataAttributes: + description: Basic information about a deployment rule. + properties: + created_at: + description: The timestamp when the deployment rule was created. + example: '2021-01-01T00:00:00Z' + format: date-time + type: string + created_by: + $ref: '#/components/schemas/DeploymentRuleResponseDataAttributesCreatedBy' + dry_run: + description: Whether this rule is run in dry-run mode. + example: false + type: boolean + gate_id: + description: The ID of the deployment gate. + example: 1111-2222-3333-4444-555566667777 + type: string + name: + description: The name of the deployment rule. + example: My deployment rule + type: string + options: + $ref: '#/components/schemas/DeploymentRulesOptions' + type: + $ref: '#/components/schemas/DeploymentRuleResponseDataAttributesType' + updated_at: + description: The timestamp when the deployment rule was last updated. + format: date-time + type: string + updated_by: + $ref: '#/components/schemas/DeploymentRuleResponseDataAttributesUpdatedBy' + required: + - created_at + - created_by + - dry_run + - gate_id + - name + - options + - type + type: object + DeploymentRuleResponseDataAttributesCreatedBy: + description: Information about the user who created the deployment rule. + properties: + handle: + description: The handle of the user who created the deployment rule. + example: test-user + type: string + id: + description: The ID of the user who created the deployment rule. + example: 1111-2222-3333-4444-555566667777 + type: string + name: + description: The name of the user who created the deployment rule. + example: Test User + type: string + required: + - id + type: object + DeploymentRuleResponseDataAttributesType: + description: The type of the deployment rule. + enum: + - faulty_deployment_detection + - monitor + example: faulty_deployment_detection + type: string + x-enum-varnames: + - FAULTY_DEPLOYMENT_DETECTION + - MONITOR + DeploymentRuleResponseDataAttributesUpdatedBy: + description: Information about the user who updated the deployment rule. + properties: + handle: + description: The handle of the user who updated the deployment rule. + example: test-user + type: string + id: + description: The ID of the user who updated the deployment rule. + example: 1111-2222-3333-4444-555566667777 + type: string + name: + description: The name of the user who updated the deployment rule. + example: Test User + type: string + required: + - id + type: object + DeploymentRulesOptions: + description: Options for deployment rule response representing either faulty + deployment detection or monitor options. + oneOf: + - $ref: '#/components/schemas/DeploymentRuleOptionsFaultyDeploymentDetection' + - $ref: '#/components/schemas/DeploymentRuleOptionsMonitor' DetailedFinding: description: A single finding with with message and resource configuration. properties: @@ -23420,6 +23788,33 @@ components: example: application/json type: string type: object + HTTPCDGatesBadRequestResponse: + description: Bad request. + properties: + errors: + description: Structured errors. + items: + $ref: '#/components/schemas/HTTPCIAppError' + type: array + type: object + HTTPCDGatesNotFoundResponse: + description: Deployment gate not found. + properties: + errors: + description: Structured errors. + items: + $ref: '#/components/schemas/HTTPCIAppError' + type: array + type: object + HTTPCDRulesNotFoundResponse: + description: Deployment rule not found. + properties: + errors: + description: Structured errors. + items: + $ref: '#/components/schemas/HTTPCIAppError' + type: array + type: object HTTPCIAppError: description: List of errors. properties: @@ -53596,6 +53991,77 @@ components: required: - data type: object + UpdateDeploymentGateParams: + description: Parameters for updating a deployment gate. + properties: + data: + $ref: '#/components/schemas/UpdateDeploymentGateParamsData' + required: + - data + type: object + UpdateDeploymentGateParamsData: + description: Parameters for updating a deployment gate. + properties: + attributes: + $ref: '#/components/schemas/UpdateDeploymentGateParamsDataAttributes' + id: + description: Unique identifier of the deployment gate. + example: 12345678-1234-1234-1234-123456789012 + type: string + type: + $ref: '#/components/schemas/DeploymentGateDataType' + required: + - type + - id + - attributes + type: object + UpdateDeploymentGateParamsDataAttributes: + description: Attributes for updating a deployment gate. + properties: + dry_run: + description: Whether to run in dry-run mode. + example: false + type: boolean + required: + - dry_run + type: object + UpdateDeploymentRuleParams: + description: Parameters for updating a deployment rule. + properties: + data: + $ref: '#/components/schemas/UpdateDeploymentRuleParamsData' + required: + - data + type: object + UpdateDeploymentRuleParamsData: + description: Parameters for updating a deployment rule. + properties: + attributes: + $ref: '#/components/schemas/UpdateDeploymentRuleParamsDataAttributes' + type: + $ref: '#/components/schemas/DeploymentRuleDataType' + required: + - type + - attributes + type: object + UpdateDeploymentRuleParamsDataAttributes: + description: Parameters for updating a deployment rule. + properties: + dry_run: + description: Whether to run this rule in dry-run mode. + example: false + type: boolean + name: + description: The name of the deployment rule. + example: Updated deployment rule + type: string + options: + $ref: '#/components/schemas/DeploymentRulesOptions' + required: + - dry_run + - name + - options + type: object UpdateOpenAPIResponse: description: Response for `UpdateOpenAPI`. properties: @@ -63852,6 +64318,403 @@ paths: x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/deployment_gates: + post: + description: Endpoint to create a deployment gate. + operationId: CreateDeploymentGate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDeploymentGateParams' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentGateResponse' + description: OK + '400': + $ref: '#/components/responses/HTTPCDGatesBadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create deployment gate + tags: + - Deployment Gates + x-permission: + operator: OR + permissions: + - deployment_gates_write + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/deployment_gates/{gate_id}/rules: + post: + description: Endpoint to create a deployment rule. A gate for the rule must + already exist. + operationId: CreateDeploymentRule + parameters: + - description: The ID of the deployment gate. + in: path + name: gate_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDeploymentRuleParams' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentRuleResponse' + description: OK + '400': + $ref: '#/components/responses/HTTPCDGatesBadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create deployment rule + tags: + - Deployment Gates + x-permission: + operator: OR + permissions: + - deployment_gates_write + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/deployment_gates/{gate_id}/rules/{id}: + delete: + description: Endpoint to delete a deployment rule. + operationId: DeleteDeploymentRule + parameters: + - description: The ID of the deployment gate. + in: path + name: gate_id + required: true + schema: + type: string + - description: The ID of the deployment rule. + in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/HTTPCDGatesBadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/HTTPCDGatesNotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete deployment rule + tags: + - Deployment Gates + x-permission: + operator: OR + permissions: + - deployment_gates_write + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Endpoint to get a deployment rule. + operationId: GetDeploymentRule + parameters: + - description: The ID of the deployment gate. + in: path + name: gate_id + required: true + schema: + type: string + - description: The ID of the deployment rule. + in: path + name: id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentRuleResponse' + description: OK + '400': + $ref: '#/components/responses/HTTPCDGatesBadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/HTTPCDRulesNotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get deployment rule + tags: + - Deployment Gates + x-permission: + operator: OR + permissions: + - deployment_gates_read + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + put: + description: Endpoint to update a deployment rule. + operationId: UpdateDeploymentRule + parameters: + - description: The ID of the deployment gate. + in: path + name: gate_id + required: true + schema: + type: string + - description: The ID of the deployment rule. + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateDeploymentRuleParams' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentRuleResponse' + description: OK + '400': + $ref: '#/components/responses/HTTPCDGatesBadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/HTTPCDRulesNotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update deployment rule + tags: + - Deployment Gates + x-permission: + operator: OR + permissions: + - deployment_gates_write + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/deployment_gates/{id}: + delete: + description: Endpoint to delete a deployment gate. Rules associated with the + gate are also deleted. + operationId: DeleteDeploymentGate + parameters: + - description: The ID of the deployment gate. + in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/HTTPCDGatesBadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/HTTPCDGatesNotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete deployment gate + tags: + - Deployment Gates + x-permission: + operator: OR + permissions: + - deployment_gates_write + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Endpoint to get a deployment gate. + operationId: GetDeploymentGate + parameters: + - description: The ID of the deployment gate. + in: path + name: id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentGateResponse' + description: OK + '400': + $ref: '#/components/responses/HTTPCDGatesBadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/HTTPCDGatesNotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get deployment gate + tags: + - Deployment Gates + x-permission: + operator: OR + permissions: + - deployment_gates_read + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + put: + description: Endpoint to update a deployment gate. + operationId: UpdateDeploymentGate + parameters: + - description: The ID of the deployment gate. + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateDeploymentGateParams' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentGateResponse' + description: OK + '400': + $ref: '#/components/responses/HTTPCDGatesBadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/HTTPCDGatesNotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update deployment gate + tags: + - Deployment Gates + x-permission: + operator: OR + permissions: + - deployment_gates_write + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/domain_allowlist: get: description: Get the domain allowlist for an organization. @@ -82419,8 +83282,7 @@ paths: operator: OR permissions: - test_optimization_read - x-unstable: '**Note**: This endpoint is in public beta and may be subject to - change. + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/usage/application_security: @@ -84154,6 +85016,10 @@ tags: view certain types of telemetry (for example, logs, traces, metrics, and RUM data).' name: Datasets +- description: Manage Deployment Gates using this API to reduce the likelihood and + impact of incidents caused by deployments. See the [Deployment Gates documentation](https://docs.datadoghq.com/deployment_gates/) + for more information. + name: Deployment Gates - description: 'Configure your Datadog Email Domain Allowlist directly through the Datadog API. diff --git a/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-Bad-Request-response_2727087309/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-Bad-Request-response_2727087309/frozen.json new file mode 100644 index 000000000000..8f43d2ecbca0 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-Bad-Request-response_2727087309/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:03:25.410Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-Bad-Request-response_2727087309/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-Bad-Request-response_2727087309/recording.har new file mode 100644 index 000000000000..9123e8cddb45 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-Bad-Request-response_2727087309/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Create deployment gate returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "6d773a528027f1e46c219fb0abee8579", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 107, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"env\":\"\",\"identifier\":\"my-gate\",\"service\":\"test-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 92, + "content": { + "mimeType": "application/vnd.api+json", + "size": 92, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"env\\\" is required\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 682, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-10-28T14:03:25.648Z", + "time": 444 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-OK-response_4140973969/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-OK-response_4140973969/frozen.json new file mode 100644 index 000000000000..49f606e746d3 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-OK-response_4140973969/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:03:26.103Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-OK-response_4140973969/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-OK-response_4140973969/recording.har new file mode 100644 index 000000000000..dcf215866774 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-gate-returns-OK-response_4140973969/recording.har @@ -0,0 +1,104 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Create deployment gate returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "e8fb7fa60b102413da27b9f59ff3d533", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 133, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-1\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 517, + "content": { + "mimeType": "application/vnd.api+json", + "size": 517, + "text": "{\"data\":{\"id\":\"0cc075c2-fec1-4ed3-9e43-0882646fac07\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:03:26.337009Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-1\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:03:26.337009Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:03:26.125Z", + "time": 284 + }, + { + "_id": "e3bbf4cef8434084dcf97fce973633d8", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/0cc075c2-fec1-4ed3-9e43-0882646fac07" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:03:26.415Z", + "time": 297 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-Bad-Request-response_2824092514/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-Bad-Request-response_2824092514/frozen.json new file mode 100644 index 000000000000..1d0cadcdf471 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-Bad-Request-response_2824092514/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:12.459Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-Bad-Request-response_2824092514/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-Bad-Request-response_2824092514/recording.har new file mode 100644 index 000000000000..153fc0694114 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-Bad-Request-response_2824092514/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Create deployment rule returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"c7d0bed9-01dc-45d5-88ad-242123881f81\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:13.006792Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:13.006792Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:12.875Z", + "time": 166 + }, + { + "_id": "4b327a76c9fae0b340074881b6c955cf", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 129, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 612, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"name\":\"test\",\"options\":{\"excluded_resources\":[]},\"type\":\"fdd\"},\"type\":\"deployment_rule\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/c7d0bed9-01dc-45d5-88ad-242123881f81/rules" + }, + "response": { + "bodySize": 136, + "content": { + "mimeType": "application/vnd.api+json", + "size": 136, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"type\\\" must be one of \\\"monitor faulty_deployment_detection\\\"\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 682, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-10-28T14:51:13.049Z", + "time": 144 + }, + { + "_id": "6fd06ae07209b0038c7df57e1adc7c10", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/c7d0bed9-01dc-45d5-88ad-242123881f81" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:13.199Z", + "time": 156 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/frozen.json new file mode 100644 index 000000000000..0bd2627a649b --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:13.363Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/recording.har new file mode 100644 index 000000000000..96f87a5d3221 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/recording.har @@ -0,0 +1,194 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Create deployment rule returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"58066a8e-44e7-4119-8ac6-a5ecc3b31c1b\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:13.477518Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:13.477518Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:13.365Z", + "time": 352 + }, + { + "_id": "a1ccd12a79836f5c10aa48b476b8a478", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 167, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"name\":\"My deployment rule\",\"options\":{\"excluded_resources\":[]},\"type\":\"faulty_deployment_detection\"},\"type\":\"deployment_rule\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/58066a8e-44e7-4119-8ac6-a5ecc3b31c1b/rules" + }, + "response": { + "bodySize": 577, + "content": { + "mimeType": "application/vnd.api+json", + "size": 577, + "text": "{\"data\":{\"id\":\"8330bf79-6906-4cea-85d5-a4da6767458e\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:13.852895Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"58066a8e-44e7-4119-8ac6-a5ecc3b31c1b\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-10-28T14:51:13.852895Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 682, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:13.722Z", + "time": 160 + }, + { + "_id": "8b403cc98e592b75b680b567c7637e14", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/58066a8e-44e7-4119-8ac6-a5ecc3b31c1b/rules/8330bf79-6906-4cea-85d5-a4da6767458e" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:13.888Z", + "time": 147 + }, + { + "_id": "35fb0c5236b4db7c94899e6b8c393fe5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/58066a8e-44e7-4119-8ac6-a5ecc3b31c1b" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:14.038Z", + "time": 148 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-Bad-Request-response_770984992/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-Bad-Request-response_770984992/frozen.json new file mode 100644 index 000000000000..5b3e5e0f5b8c --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-Bad-Request-response_770984992/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:03:29.170Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-Bad-Request-response_770984992/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-Bad-Request-response_770984992/recording.har new file mode 100644 index 000000000000..de0c0c860d6d --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-Bad-Request-response_770984992/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Delete deployment gate returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "a7bb4f92537941a50187bfc1bbffbeee", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/invalid-gate-id" + }, + "response": { + "bodySize": 90, + "content": { + "mimeType": "application/vnd.api+json", + "size": 90, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"id\\\" Invalid id\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-10-28T14:03:29.172Z", + "time": 244 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-No-Content-response_2018192270/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-No-Content-response_2018192270/frozen.json new file mode 100644 index 000000000000..b9c5a46bd220 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-No-Content-response_2018192270/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:14.192Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-No-Content-response_2018192270/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-No-Content-response_2018192270/recording.har new file mode 100644 index 000000000000..950ba7c4c881 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-gate-returns-No-Content-response_2018192270/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Delete deployment gate returns \"No Content\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"dba6d48b-b7ac-4ac8-b2d5-70e45b500eed\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:14.313688Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:14.313688Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:14.195Z", + "time": 156 + }, + { + "_id": "06c13af0863190d610201b7ddf35a59e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/dba6d48b-b7ac-4ac8-b2d5-70e45b500eed" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:14.356Z", + "time": 134 + }, + { + "_id": "06c13af0863190d610201b7ddf35a59e", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/dba6d48b-b7ac-4ac8-b2d5-70e45b500eed" + }, + "response": { + "bodySize": 80, + "content": { + "mimeType": "application/vnd.api+json", + "size": 80, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"Gate does not exist\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-10-28T14:51:14.494Z", + "time": 129 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-Bad-Request-response_244866955/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-Bad-Request-response_244866955/frozen.json new file mode 100644 index 000000000000..c1567417cc07 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-Bad-Request-response_244866955/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:03:30.230Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-Bad-Request-response_244866955/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-Bad-Request-response_244866955/recording.har new file mode 100644 index 000000000000..9f3f44320cc2 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-Bad-Request-response_244866955/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Delete deployment rule returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "addfa3900dcbad10c64cb7be21ff7604", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 545, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/invalid-gate-id/rules/invalid-rule-id" + }, + "response": { + "bodySize": 95, + "content": { + "mimeType": "application/vnd.api+json", + "size": 95, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"gate_id\\\" Invalid id\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-10-28T14:03:30.236Z", + "time": 265 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/frozen.json new file mode 100644 index 000000000000..81aa804a75ea --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:14.630Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/recording.har new file mode 100644 index 000000000000..8b2cd92070d8 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/recording.har @@ -0,0 +1,237 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Delete deployment rule returns \"No Content\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"8e202ae7-a86b-4f4a-a213-585801a42630\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:14.754979Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:14.754979Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:14.634Z", + "time": 154 + }, + { + "_id": "64372ed15fc942eca46e9526e5fc1dac", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 167, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"name\":\"My deployment rule\",\"options\":{\"excluded_resources\":[]},\"type\":\"faulty_deployment_detection\"},\"type\":\"deployment_rule\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/8e202ae7-a86b-4f4a-a213-585801a42630/rules" + }, + "response": { + "bodySize": 577, + "content": { + "mimeType": "application/vnd.api+json", + "size": 577, + "text": "{\"data\":{\"id\":\"31e6717f-2eaa-45e5-9559-a55ca9d45f8d\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:14.911642Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"8e202ae7-a86b-4f4a-a213-585801a42630\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-10-28T14:51:14.911642Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 682, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:14.796Z", + "time": 140 + }, + { + "_id": "7750dd6b72c8a686a6679e3cd66d2694", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/8e202ae7-a86b-4f4a-a213-585801a42630/rules/31e6717f-2eaa-45e5-9559-a55ca9d45f8d" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:14.940Z", + "time": 145 + }, + { + "_id": "7750dd6b72c8a686a6679e3cd66d2694", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/8e202ae7-a86b-4f4a-a213-585801a42630/rules/31e6717f-2eaa-45e5-9559-a55ca9d45f8d" + }, + "response": { + "bodySize": 80, + "content": { + "mimeType": "application/vnd.api+json", + "size": 80, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"Rule does not exist\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-10-28T14:51:15.090Z", + "time": 142 + }, + { + "_id": "dd8ed37e3b60352bb1d1b3f4c8e39a88", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/8e202ae7-a86b-4f4a-a213-585801a42630" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:15.235Z", + "time": 130 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-Bad-Request-response_842931407/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-Bad-Request-response_842931407/frozen.json new file mode 100644 index 000000000000..9a6b3cd38497 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-Bad-Request-response_842931407/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:03:31.887Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-Bad-Request-response_842931407/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-Bad-Request-response_842931407/recording.har new file mode 100644 index 000000000000..8dd0a8ea9c11 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-Bad-Request-response_842931407/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Get deployment gate returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "59b4094790d4685a2b0de1f51f0ff6c1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 530, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/invalid-gate-id" + }, + "response": { + "bodySize": 90, + "content": { + "mimeType": "application/vnd.api+json", + "size": 90, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"id\\\" Invalid id\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 680, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-10-28T14:03:31.889Z", + "time": 250 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/frozen.json new file mode 100644 index 000000000000..d1f252c97398 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:15.372Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/recording.har new file mode 100644 index 000000000000..58b90e5fd6bb --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Get deployment gate returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"ed4085c5-e8d3-4bf8-89a6-c257164d8952\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:15.478086Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:15.478086Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:15.373Z", + "time": 124 + }, + { + "_id": "a69cb1bc0a267ed9f06d1e6e1c5ae317", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 551, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/ed4085c5-e8d3-4bf8-89a6-c257164d8952" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"ed4085c5-e8d3-4bf8-89a6-c257164d8952\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:15.478086Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:15.478086Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 681, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:15.505Z", + "time": 219 + }, + { + "_id": "52e4fdebcdb58662dbd88b5df13ce3ab", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/ed4085c5-e8d3-4bf8-89a6-c257164d8952" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:15.728Z", + "time": 151 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/frozen.json new file mode 100644 index 000000000000..af761a7f62a3 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:15.883Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/recording.har new file mode 100644 index 000000000000..24232388b1f7 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/recording.har @@ -0,0 +1,237 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Get deployment rule returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"d49e6d82-2dc4-45b6-ab50-4fb09feae18e\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:16.013862Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:16.013862Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:15.885Z", + "time": 168 + }, + { + "_id": "666c0abd7c83dd7653a7a000b0b18cf5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 167, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 613, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"name\":\"My deployment rule\",\"options\":{\"excluded_resources\":[]},\"type\":\"faulty_deployment_detection\"},\"type\":\"deployment_rule\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/d49e6d82-2dc4-45b6-ab50-4fb09feae18e/rules" + }, + "response": { + "bodySize": 577, + "content": { + "mimeType": "application/vnd.api+json", + "size": 577, + "text": "{\"data\":{\"id\":\"611707d2-276e-4dc5-b754-db8f94eab0b5\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:16.184094Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"d49e6d82-2dc4-45b6-ab50-4fb09feae18e\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-10-28T14:51:16.184094Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 682, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:16.057Z", + "time": 143 + }, + { + "_id": "fb33a6dc801c60adbeedde2e3d4a63f4", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 552, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/invalid-gate-id/rules/invalid-rule-id" + }, + "response": { + "bodySize": 95, + "content": { + "mimeType": "application/vnd.api+json", + "size": 95, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"gate_id\\\" Invalid id\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 680, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-10-28T14:51:16.203Z", + "time": 131 + }, + { + "_id": "3b3081f939d99c5ed9c1935012a85099", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/d49e6d82-2dc4-45b6-ab50-4fb09feae18e/rules/611707d2-276e-4dc5-b754-db8f94eab0b5" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:16.338Z", + "time": 146 + }, + { + "_id": "f13a69de96efbc88bccd7dada289daf1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/d49e6d82-2dc4-45b6-ab50-4fb09feae18e" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:16.487Z", + "time": 149 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/frozen.json new file mode 100644 index 000000000000..44578f89d6b5 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:16.642Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/recording.har new file mode 100644 index 000000000000..95bc86b7ba5e --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/recording.har @@ -0,0 +1,237 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Get deployment rule returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:16.752908Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:16.752908Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:16.644Z", + "time": 168 + }, + { + "_id": "c9781ea9bfaa1188d56bbb91d1421fad", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 167, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"name\":\"My deployment rule\",\"options\":{\"excluded_resources\":[]},\"type\":\"faulty_deployment_detection\"},\"type\":\"deployment_rule\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56/rules" + }, + "response": { + "bodySize": 577, + "content": { + "mimeType": "application/vnd.api+json", + "size": 577, + "text": "{\"data\":{\"id\":\"a38ab685-4ef9-4000-a938-740da6c37296\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:16.947341Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-10-28T14:51:16.947341Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 682, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:16.827Z", + "time": 157 + }, + { + "_id": "285a097680b4ee662ad73bb66a7d8b0e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56/rules/a38ab685-4ef9-4000-a938-740da6c37296" + }, + "response": { + "bodySize": 577, + "content": { + "mimeType": "application/vnd.api+json", + "size": 577, + "text": "{\"data\":{\"id\":\"a38ab685-4ef9-4000-a938-740da6c37296\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:16.947341Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-10-28T14:51:16.947341Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 681, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:16.989Z", + "time": 329 + }, + { + "_id": "5309ca55be5902cdda2211e46b01ec30", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56/rules/a38ab685-4ef9-4000-a938-740da6c37296" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:17.323Z", + "time": 125 + }, + { + "_id": "ee7ee84971489b99357a9f3a0dd6e77f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:17.450Z", + "time": 130 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-Bad-Request-response_4008552930/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-Bad-Request-response_4008552930/frozen.json new file mode 100644 index 000000000000..aae4e8051e33 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-Bad-Request-response_4008552930/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:03:35.734Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-Bad-Request-response_4008552930/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-Bad-Request-response_4008552930/recording.har new file mode 100644 index 000000000000..abdc5e13aaca --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-Bad-Request-response_4008552930/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Update deployment gate returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "224572ce70db2f4beebce12f55df633f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 88, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 585, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":true},\"id\":\"invalid-gate-id\",\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/invalid-gate-id" + }, + "response": { + "bodySize": 90, + "content": { + "mimeType": "application/vnd.api+json", + "size": 90, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"id\\\" Invalid id\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 680, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-10-28T14:03:35.736Z", + "time": 233 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/frozen.json new file mode 100644 index 000000000000..0647a82aca50 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:17.586Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/recording.har new file mode 100644 index 000000000000..6c3aa18f5acf --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Update deployment gate returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"ef672c2e-81fc-4fcc-9690-392a9cf0d70c\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:17.693361Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:17.693361Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:17.589Z", + "time": 143 + }, + { + "_id": "b2eddf9a10a6ae934e739b613b82db5b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 110, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 606, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false},\"id\":\"12345678-1234-1234-1234-123456789012\",\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/ef672c2e-81fc-4fcc-9690-392a9cf0d70c" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"ef672c2e-81fc-4fcc-9690-392a9cf0d70c\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:17.693361Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:17.841019Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 681, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:17.736Z", + "time": 132 + }, + { + "_id": "2cd4c09eed517fb13a942907f1e39850", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/ef672c2e-81fc-4fcc-9690-392a9cf0d70c" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:17.872Z", + "time": 129 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/frozen.json new file mode 100644 index 000000000000..0120d7086a81 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:18.004Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/recording.har new file mode 100644 index 000000000000..66c33e209f79 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/recording.har @@ -0,0 +1,247 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Update deployment rule returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:18.108594Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:18.108594Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:18.010Z", + "time": 116 + }, + { + "_id": "4d5ec8dd7568e1653db866b89e5054a0", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 167, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"name\":\"My deployment rule\",\"options\":{\"excluded_resources\":[]},\"type\":\"faulty_deployment_detection\"},\"type\":\"deployment_rule\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d/rules" + }, + "response": { + "bodySize": 577, + "content": { + "mimeType": "application/vnd.api+json", + "size": 577, + "text": "{\"data\":{\"id\":\"189846d6-3c19-46e8-98d1-9d05a2f43361\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:18.251816Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-10-28T14:51:18.251816Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 682, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:18.130Z", + "time": 165 + }, + { + "_id": "7d25d788cd9d6480d8210f5a5ca31a95", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 135, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"name\":\"Updated deployment rule\",\"options\":{\"excluded_resources\":[]}},\"type\":\"deployment_rule\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/invalid-gate-id/rules/invalid-rule-id" + }, + "response": { + "bodySize": 95, + "content": { + "mimeType": "application/vnd.api+json", + "size": 95, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"gate_id\\\" Invalid id\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 680, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-10-28T14:51:18.299Z", + "time": 132 + }, + { + "_id": "59d200b66705c933cac03db89a7c5766", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d/rules/189846d6-3c19-46e8-98d1-9d05a2f43361" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:18.435Z", + "time": 132 + }, + { + "_id": "c175fc7e9e8ccefbe430ba4e5818f497", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:18.569Z", + "time": 146 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-OK-response_2914944649/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-OK-response_2914944649/frozen.json new file mode 100644 index 000000000000..7c0776180795 --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-OK-response_2914944649/frozen.json @@ -0,0 +1 @@ +"2025-10-28T14:51:18.721Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-OK-response_2914944649/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-OK-response_2914944649/recording.har new file mode 100644 index 000000000000..0f451a258f2e --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-OK-response_2914944649/recording.har @@ -0,0 +1,247 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Update deployment rule returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"301122dd-9022-40f0-886f-f9a6c227dc9a\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:18.845469Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-10-28T14:51:18.845469Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:18.722Z", + "time": 164 + }, + { + "_id": "ec0c5f43e8d98a9463cea8e99d31eb69", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 167, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 613, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"name\":\"My deployment rule\",\"options\":{\"excluded_resources\":[]},\"type\":\"faulty_deployment_detection\"},\"type\":\"deployment_rule\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/301122dd-9022-40f0-886f-f9a6c227dc9a/rules" + }, + "response": { + "bodySize": 577, + "content": { + "mimeType": "application/vnd.api+json", + "size": 577, + "text": "{\"data\":{\"id\":\"483937d1-efc4-4a7c-95a6-89bd6b2e4e75\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:19.007448Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"301122dd-9022-40f0-886f-f9a6c227dc9a\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-10-28T14:51:19.007448Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 682, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:18.890Z", + "time": 135 + }, + { + "_id": "4d411959683ad10dc42bfd77aea1fbcb", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 135, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 648, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"name\":\"Updated deployment rule\",\"options\":{\"excluded_resources\":[]}},\"type\":\"deployment_rule\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/301122dd-9022-40f0-886f-f9a6c227dc9a/rules/483937d1-efc4-4a7c-95a6-89bd6b2e4e75" + }, + "response": { + "bodySize": 582, + "content": { + "mimeType": "application/vnd.api+json", + "size": 582, + "text": "{\"data\":{\"id\":\"483937d1-efc4-4a7c-95a6-89bd6b2e4e75\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-10-28T14:51:19.007448Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"301122dd-9022-40f0-886f-f9a6c227dc9a\",\"name\":\"Updated deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-10-28T14:51:19.134366Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 681, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-10-28T14:51:19.030Z", + "time": 175 + }, + { + "_id": "97979e7e57c7d9bdd1bd4385af7df9ac", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 586, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/301122dd-9022-40f0-886f-f9a6c227dc9a/rules/483937d1-efc4-4a7c-95a6-89bd6b2e4e75" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:19.209Z", + "time": 135 + }, + { + "_id": "f8b7f255e2f0fcc6d32d78d9e518f898", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 542, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/301122dd-9022-40f0-886f-f9a6c227dc9a" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-10-28T14:51:19.347Z", + "time": 143 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/deployment-gates/CreateDeploymentGate.ts b/examples/v2/deployment-gates/CreateDeploymentGate.ts new file mode 100644 index 000000000000..1250852c4fd5 --- /dev/null +++ b/examples/v2/deployment-gates/CreateDeploymentGate.ts @@ -0,0 +1,32 @@ +/** + * Create deployment gate returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createDeploymentGate"] = true; +const apiInstance = new v2.DeploymentGatesApi(configuration); + +const params: v2.DeploymentGatesApiCreateDeploymentGateRequest = { + body: { + data: { + attributes: { + dryRun: false, + env: "production", + identifier: "my-gate-1", + service: "my-service", + }, + type: "deployment_gate", + }, + }, +}; + +apiInstance + .createDeploymentGate(params) + .then((data: v2.DeploymentGateResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/deployment-gates/CreateDeploymentRule.ts b/examples/v2/deployment-gates/CreateDeploymentRule.ts new file mode 100644 index 000000000000..d1844be8879a --- /dev/null +++ b/examples/v2/deployment-gates/CreateDeploymentRule.ts @@ -0,0 +1,38 @@ +/** + * Create deployment rule returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createDeploymentRule"] = true; +const apiInstance = new v2.DeploymentGatesApi(configuration); + +// there is a valid "deployment_gate" in the system +const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string; + +const params: v2.DeploymentGatesApiCreateDeploymentRuleRequest = { + body: { + data: { + attributes: { + dryRun: false, + name: "My deployment rule", + options: { + excludedResources: [], + }, + type: "faulty_deployment_detection", + }, + type: "deployment_rule", + }, + }, + gateId: DEPLOYMENT_GATE_DATA_ID, +}; + +apiInstance + .createDeploymentRule(params) + .then((data: v2.DeploymentRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/deployment-gates/DeleteDeploymentGate.ts b/examples/v2/deployment-gates/DeleteDeploymentGate.ts new file mode 100644 index 000000000000..a64d7297c976 --- /dev/null +++ b/examples/v2/deployment-gates/DeleteDeploymentGate.ts @@ -0,0 +1,25 @@ +/** + * Delete deployment gate returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteDeploymentGate"] = true; +const apiInstance = new v2.DeploymentGatesApi(configuration); + +// there is a valid "deployment_gate" in the system +const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string; + +const params: v2.DeploymentGatesApiDeleteDeploymentGateRequest = { + id: DEPLOYMENT_GATE_DATA_ID, +}; + +apiInstance + .deleteDeploymentGate(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/deployment-gates/DeleteDeploymentRule.ts b/examples/v2/deployment-gates/DeleteDeploymentRule.ts new file mode 100644 index 000000000000..1ee70c05a22d --- /dev/null +++ b/examples/v2/deployment-gates/DeleteDeploymentRule.ts @@ -0,0 +1,29 @@ +/** + * Delete deployment rule returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteDeploymentRule"] = true; +const apiInstance = new v2.DeploymentGatesApi(configuration); + +// there is a valid "deployment_gate" in the system +const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string; + +// there is a valid "deployment_rule" in the system +const DEPLOYMENT_RULE_DATA_ID = process.env.DEPLOYMENT_RULE_DATA_ID as string; + +const params: v2.DeploymentGatesApiDeleteDeploymentRuleRequest = { + gateId: DEPLOYMENT_GATE_DATA_ID, + id: DEPLOYMENT_RULE_DATA_ID, +}; + +apiInstance + .deleteDeploymentRule(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/deployment-gates/GetDeploymentGate.ts b/examples/v2/deployment-gates/GetDeploymentGate.ts new file mode 100644 index 000000000000..9555e81dfe89 --- /dev/null +++ b/examples/v2/deployment-gates/GetDeploymentGate.ts @@ -0,0 +1,25 @@ +/** + * Get deployment gate returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getDeploymentGate"] = true; +const apiInstance = new v2.DeploymentGatesApi(configuration); + +// there is a valid "deployment_gate" in the system +const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string; + +const params: v2.DeploymentGatesApiGetDeploymentGateRequest = { + id: DEPLOYMENT_GATE_DATA_ID, +}; + +apiInstance + .getDeploymentGate(params) + .then((data: v2.DeploymentGateResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/deployment-gates/GetDeploymentRule.ts b/examples/v2/deployment-gates/GetDeploymentRule.ts new file mode 100644 index 000000000000..7508985dcf08 --- /dev/null +++ b/examples/v2/deployment-gates/GetDeploymentRule.ts @@ -0,0 +1,29 @@ +/** + * Get deployment rule returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getDeploymentRule"] = true; +const apiInstance = new v2.DeploymentGatesApi(configuration); + +// there is a valid "deployment_gate" in the system +const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string; + +// there is a valid "deployment_rule" in the system +const DEPLOYMENT_RULE_DATA_ID = process.env.DEPLOYMENT_RULE_DATA_ID as string; + +const params: v2.DeploymentGatesApiGetDeploymentRuleRequest = { + gateId: DEPLOYMENT_GATE_DATA_ID, + id: DEPLOYMENT_RULE_DATA_ID, +}; + +apiInstance + .getDeploymentRule(params) + .then((data: v2.DeploymentRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/deployment-gates/UpdateDeploymentGate.ts b/examples/v2/deployment-gates/UpdateDeploymentGate.ts new file mode 100644 index 000000000000..1112cb0bbca2 --- /dev/null +++ b/examples/v2/deployment-gates/UpdateDeploymentGate.ts @@ -0,0 +1,34 @@ +/** + * Update deployment gate returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateDeploymentGate"] = true; +const apiInstance = new v2.DeploymentGatesApi(configuration); + +// there is a valid "deployment_gate" in the system +const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string; + +const params: v2.DeploymentGatesApiUpdateDeploymentGateRequest = { + body: { + data: { + attributes: { + dryRun: false, + }, + id: "12345678-1234-1234-1234-123456789012", + type: "deployment_gate", + }, + }, + id: DEPLOYMENT_GATE_DATA_ID, +}; + +apiInstance + .updateDeploymentGate(params) + .then((data: v2.DeploymentGateResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/deployment-gates/UpdateDeploymentRule.ts b/examples/v2/deployment-gates/UpdateDeploymentRule.ts new file mode 100644 index 000000000000..3c28e9b0ecdd --- /dev/null +++ b/examples/v2/deployment-gates/UpdateDeploymentRule.ts @@ -0,0 +1,41 @@ +/** + * Update deployment rule returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateDeploymentRule"] = true; +const apiInstance = new v2.DeploymentGatesApi(configuration); + +// there is a valid "deployment_gate" in the system +const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string; + +// there is a valid "deployment_rule" in the system +const DEPLOYMENT_RULE_DATA_ID = process.env.DEPLOYMENT_RULE_DATA_ID as string; + +const params: v2.DeploymentGatesApiUpdateDeploymentRuleRequest = { + body: { + data: { + attributes: { + dryRun: false, + name: "Updated deployment rule", + options: { + excludedResources: [], + }, + }, + type: "deployment_rule", + }, + }, + gateId: DEPLOYMENT_GATE_DATA_ID, + id: DEPLOYMENT_RULE_DATA_ID, +}; + +apiInstance + .updateDeploymentRule(params) + .then((data: v2.DeploymentRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 11287364c4aa..7bfe6adf50be 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -5313,6 +5313,86 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "CancelDataDeletionResponseBody", }, + "v2.CreateDeploymentGate": { + "body": { + "type": "CreateDeploymentGateParams", + "format": "", + }, + "operationResponseType": "DeploymentGateResponse", + }, + "v2.CreateDeploymentRule": { + "gateId": { + "type": "string", + "format": "", + }, + "body": { + "type": "CreateDeploymentRuleParams", + "format": "", + }, + "operationResponseType": "DeploymentRuleResponse", + }, + "v2.GetDeploymentRule": { + "gateId": { + "type": "string", + "format": "", + }, + "id": { + "type": "string", + "format": "", + }, + "operationResponseType": "DeploymentRuleResponse", + }, + "v2.UpdateDeploymentRule": { + "gateId": { + "type": "string", + "format": "", + }, + "id": { + "type": "string", + "format": "", + }, + "body": { + "type": "UpdateDeploymentRuleParams", + "format": "", + }, + "operationResponseType": "DeploymentRuleResponse", + }, + "v2.DeleteDeploymentRule": { + "gateId": { + "type": "string", + "format": "", + }, + "id": { + "type": "string", + "format": "", + }, + "operationResponseType": "{}", + }, + "v2.GetDeploymentGate": { + "id": { + "type": "string", + "format": "", + }, + "operationResponseType": "DeploymentGateResponse", + }, + "v2.UpdateDeploymentGate": { + "id": { + "type": "string", + "format": "", + }, + "body": { + "type": "UpdateDeploymentGateParams", + "format": "", + }, + "operationResponseType": "DeploymentGateResponse", + }, + "v2.DeleteDeploymentGate": { + "id": { + "type": "string", + "format": "", + }, + "operationResponseType": "{}", + }, "v2.GetDomainAllowlist": { "operationResponseType": "DomainAllowlistResponse", }, diff --git a/features/v2/deployment_gates.feature b/features/v2/deployment_gates.feature new file mode 100644 index 000000000000..e4023c5650b1 --- /dev/null +++ b/features/v2/deployment_gates.feature @@ -0,0 +1,289 @@ +@endpoint(deployment-gates) @endpoint(deployment-gates-v2) +Feature: Deployment Gates + Manage Deployment Gates using this API to reduce the likelihood and impact + of incidents caused by deployments. See the [Deployment Gates + documentation](https://docs.datadoghq.com/deployment_gates/) for more + information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "DeploymentGates" API + + @team:DataDog/ci-app-backend + Scenario: Create deployment gate returns "Bad Request" response + Given operation "CreateDeploymentGate" enabled + And new "CreateDeploymentGate" request + And body with value {"data": {"attributes": {"env": "", "service":"test-service", "identifier": "my-gate"}, "type": "deployment_gate"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Create deployment gate returns "Bad request." response + Given operation "CreateDeploymentGate" enabled + And new "CreateDeploymentGate" request + And body with value {"data": {"attributes": {"dry_run": false, "env": "production", "identifier": "pre", "service": "my-service"}, "type": "deployment_gate"}} + When the request is sent + Then the response status is 400 Bad request. + + @team:DataDog/ci-app-backend + Scenario: Create deployment gate returns "OK" response + Given operation "CreateDeploymentGate" enabled + And new "CreateDeploymentGate" request + And body with value {"data": {"attributes": {"dry_run": false, "env": "production", "identifier": "my-gate-1", "service": "my-service"}, "type": "deployment_gate"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/ci-app-backend + Scenario: Create deployment rule returns "Bad Request" response + Given there is a valid "deployment_gate" in the system + And operation "CreateDeploymentRule" enabled + And new "CreateDeploymentRule" request + And request contains "gate_id" parameter from "deployment_gate.data.id" + And body with value {"data": {"attributes": {"dry_run": false, "name":"test", "options": {"excluded_resources": []}, "type": "fdd"}, "type": "deployment_rule"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Create deployment rule returns "Bad request." response + Given operation "CreateDeploymentRule" enabled + And new "CreateDeploymentRule" request + And request contains "gate_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"dry_run": false, "name": "My deployment rule", "options": {"duration": 3600, "excluded_resources": ["resource1", "resource2"]}, "type": "faulty_deployment_detection"}, "type": "deployment_rule"}} + When the request is sent + Then the response status is 400 Bad request. + + @team:DataDog/ci-app-backend + Scenario: Create deployment rule returns "OK" response + Given there is a valid "deployment_gate" in the system + And operation "CreateDeploymentRule" enabled + And new "CreateDeploymentRule" request + And request contains "gate_id" parameter from "deployment_gate.data.id" + And body with value {"data": {"attributes": {"dry_run": false, "name": "My deployment rule", "options": {"excluded_resources": []}, "type": "faulty_deployment_detection"}, "type": "deployment_rule"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/ci-app-backend + Scenario: Delete deployment gate returns "Bad Request" response + Given operation "DeleteDeploymentGate" enabled + And new "DeleteDeploymentGate" request + And request contains "id" parameter with value "invalid-gate-id" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Delete deployment gate returns "Bad request." response + Given operation "DeleteDeploymentGate" enabled + And new "DeleteDeploymentGate" 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/ci-app-backend + Scenario: Delete deployment gate returns "Deployment gate not found." response + Given operation "DeleteDeploymentGate" enabled + And new "DeleteDeploymentGate" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Deployment gate not found. + + @team:DataDog/ci-app-backend + Scenario: Delete deployment gate returns "No Content" response + Given there is a valid "deployment_gate" in the system + And operation "DeleteDeploymentGate" enabled + And new "DeleteDeploymentGate" request + And request contains "id" parameter from "deployment_gate.data.id" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/ci-app-backend + Scenario: Delete deployment rule returns "Bad Request" response + Given operation "DeleteDeploymentRule" enabled + And new "DeleteDeploymentRule" request + And request contains "gate_id" parameter with value "invalid-gate-id" + And request contains "id" parameter with value "invalid-rule-id" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Delete deployment rule returns "Bad request." response + Given operation "DeleteDeploymentRule" enabled + And new "DeleteDeploymentRule" request + And request contains "gate_id" parameter from "REPLACE.ME" + 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/ci-app-backend + Scenario: Delete deployment rule returns "Deployment gate not found." response + Given operation "DeleteDeploymentRule" enabled + And new "DeleteDeploymentRule" request + And request contains "gate_id" parameter from "REPLACE.ME" + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Deployment gate not found. + + @team:DataDog/ci-app-backend + Scenario: Delete deployment rule returns "No Content" response + Given there is a valid "deployment_gate" in the system + And there is a valid "deployment_rule" in the system + And operation "DeleteDeploymentRule" enabled + And new "DeleteDeploymentRule" request + And request contains "gate_id" parameter from "deployment_gate.data.id" + And request contains "id" parameter from "deployment_rule.data.id" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/ci-app-backend + Scenario: Get deployment gate returns "Bad Request" response + Given operation "GetDeploymentGate" enabled + And new "GetDeploymentGate" request + And request contains "id" parameter with value "invalid-gate-id" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get deployment gate returns "Bad request." response + Given operation "GetDeploymentGate" enabled + And new "GetDeploymentGate" 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/ci-app-backend + Scenario: Get deployment gate returns "Deployment gate not found." response + Given operation "GetDeploymentGate" enabled + And new "GetDeploymentGate" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Deployment gate not found. + + @team:DataDog/ci-app-backend + Scenario: Get deployment gate returns "OK" response + Given there is a valid "deployment_gate" in the system + And operation "GetDeploymentGate" enabled + And new "GetDeploymentGate" request + And request contains "id" parameter from "deployment_gate.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/ci-app-backend + Scenario: Get deployment rule returns "Bad Request" response + Given there is a valid "deployment_gate" in the system + And there is a valid "deployment_rule" in the system + And operation "GetDeploymentRule" enabled + And new "GetDeploymentRule" request + And request contains "gate_id" parameter with value "invalid-gate-id" + And request contains "id" parameter with value "invalid-rule-id" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get deployment rule returns "Bad request." response + Given operation "GetDeploymentRule" enabled + And new "GetDeploymentRule" request + And request contains "gate_id" parameter from "REPLACE.ME" + 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/ci-app-backend + Scenario: Get deployment rule returns "Deployment rule not found." response + Given operation "GetDeploymentRule" enabled + And new "GetDeploymentRule" request + And request contains "gate_id" parameter from "REPLACE.ME" + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Deployment rule not found. + + @team:DataDog/ci-app-backend + Scenario: Get deployment rule returns "OK" response + Given there is a valid "deployment_gate" in the system + And there is a valid "deployment_rule" in the system + And operation "GetDeploymentRule" enabled + And new "GetDeploymentRule" request + And request contains "gate_id" parameter from "deployment_gate.data.id" + And request contains "id" parameter from "deployment_rule.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/ci-app-backend + Scenario: Update deployment gate returns "Bad Request" response + Given operation "UpdateDeploymentGate" enabled + And new "UpdateDeploymentGate" request + And request contains "id" parameter with value "invalid-gate-id" + And body with value {"data": {"attributes": {"dry_run":true}, "id": "invalid-gate-id", "type": "deployment_gate"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Update deployment gate returns "Bad request." response + Given operation "UpdateDeploymentGate" enabled + And new "UpdateDeploymentGate" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"dry_run": false}, "id": "12345678-1234-1234-1234-123456789012", "type": "deployment_gate"}} + When the request is sent + Then the response status is 400 Bad request. + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Update deployment gate returns "Deployment gate not found." response + Given operation "UpdateDeploymentGate" enabled + And new "UpdateDeploymentGate" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"dry_run": false}, "id": "12345678-1234-1234-1234-123456789012", "type": "deployment_gate"}} + When the request is sent + Then the response status is 404 Deployment gate not found. + + @team:DataDog/ci-app-backend + Scenario: Update deployment gate returns "OK" response + Given there is a valid "deployment_gate" in the system + And operation "UpdateDeploymentGate" enabled + And new "UpdateDeploymentGate" request + And request contains "id" parameter from "deployment_gate.data.id" + And body with value {"data": {"attributes": {"dry_run": false}, "id": "12345678-1234-1234-1234-123456789012", "type": "deployment_gate"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/ci-app-backend + Scenario: Update deployment rule returns "Bad Request" response + Given there is a valid "deployment_gate" in the system + And there is a valid "deployment_rule" in the system + And operation "UpdateDeploymentRule" enabled + And new "UpdateDeploymentRule" request + And request contains "gate_id" parameter with value "invalid-gate-id" + And request contains "id" parameter with value "invalid-rule-id" + And body with value {"data": {"attributes": {"dry_run": false, "name": "Updated deployment rule", "options": {"excluded_resources": []}}, "type": "deployment_rule"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Update deployment rule returns "Bad request." response + Given operation "UpdateDeploymentRule" enabled + And new "UpdateDeploymentRule" request + And request contains "gate_id" parameter from "REPLACE.ME" + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"dry_run": false, "name": "Updated deployment rule", "options": {"duration": 3600, "excluded_resources": ["resource1", "resource2"]}}, "type": "deployment_rule"}} + When the request is sent + Then the response status is 400 Bad request. + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Update deployment rule returns "Deployment rule not found." response + Given operation "UpdateDeploymentRule" enabled + And new "UpdateDeploymentRule" request + And request contains "gate_id" parameter from "REPLACE.ME" + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"dry_run": false, "name": "Updated deployment rule", "options": {"duration": 3600, "excluded_resources": ["resource1", "resource2"]}}, "type": "deployment_rule"}} + When the request is sent + Then the response status is 404 Deployment rule not found. + + @team:DataDog/ci-app-backend + Scenario: Update deployment rule returns "OK" response + Given there is a valid "deployment_gate" in the system + And there is a valid "deployment_rule" in the system + And operation "UpdateDeploymentRule" enabled + And new "UpdateDeploymentRule" request + And request contains "gate_id" parameter from "deployment_gate.data.id" + And request contains "id" parameter from "deployment_rule.data.id" + And body with value {"data": {"attributes": {"dry_run": false, "name": "Updated deployment rule", "options": {"excluded_resources": []}}, "type": "deployment_rule"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/given.json b/features/v2/given.json index 8afb9b89bda5..198c7af1b51d 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -346,6 +346,34 @@ "tag": "Data Deletion", "operationId": "CreateDataDeletionRequest" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate\",\n \"dry_run\": false\n }\n }\n}" + } + ], + "step": "there is a valid \"deployment_gate\" in the system", + "key": "deployment_gate", + "tag": "Deployment Gates", + "operationId": "CreateDeploymentGate" + }, + { + "parameters": [ + { + "name": "gate_id", + "source": "deployment_gate.data.id" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"deployment_rule\",\n \"attributes\": {\n \"name\": \"My deployment rule\",\n \"type\": \"faulty_deployment_detection\",\n \"options\": {\n \"excluded_resources\": []\n },\n \"dry_run\": false\n }\n }\n}" + } + ], + "step": "there is a valid \"deployment_rule\" in the system", + "key": "deployment_rule", + "tag": "Deployment Gates", + "operationId": "CreateDeploymentRule" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index dba9a5e29d71..0ed8bec8f3ea 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1310,6 +1310,72 @@ "type": "idempotent" } }, + "CreateDeploymentGate": { + "tag": "Deployment Gates", + "undo": { + "operationId": "DeleteDeploymentGate", + "parameters": [ + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "CreateDeploymentRule": { + "tag": "Deployment Gates", + "undo": { + "operationId": "DeleteDeploymentRule", + "parameters": [ + { + "name": "gate_id", + "source": "data.attributes.gate_id" + }, + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteDeploymentRule": { + "tag": "Deployment Gates", + "undo": { + "type": "idempotent" + } + }, + "GetDeploymentRule": { + "tag": "Deployment Gates", + "undo": { + "type": "safe" + } + }, + "UpdateDeploymentRule": { + "tag": "Deployment Gates", + "undo": { + "type": "idempotent" + } + }, + "DeleteDeploymentGate": { + "tag": "Deployment Gates", + "undo": { + "type": "idempotent" + } + }, + "GetDeploymentGate": { + "tag": "Deployment Gates", + "undo": { + "type": "safe" + } + }, + "UpdateDeploymentGate": { + "tag": "Deployment Gates", + "undo": { + "type": "idempotent" + } + }, "GetDomainAllowlist": { "tag": "Domain Allowlist", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index a711ffcddf04..89150931a146 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -268,6 +268,14 @@ export function createConfiguration( "v2.cancelDataDeletionRequest": false, "v2.createDataDeletionRequest": false, "v2.getDataDeletionRequests": false, + "v2.createDeploymentGate": false, + "v2.createDeploymentRule": false, + "v2.deleteDeploymentGate": false, + "v2.deleteDeploymentRule": false, + "v2.getDeploymentGate": false, + "v2.getDeploymentRule": false, + "v2.updateDeploymentGate": false, + "v2.updateDeploymentRule": false, "v2.createIncident": false, "v2.createIncidentImpact": false, "v2.createIncidentIntegration": false, diff --git a/packages/datadog-api-client-v2/apis/DeploymentGatesApi.ts b/packages/datadog-api-client-v2/apis/DeploymentGatesApi.ts new file mode 100644 index 000000000000..a248d90a62f9 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/DeploymentGatesApi.ts @@ -0,0 +1,1649 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { CreateDeploymentGateParams } from "../models/CreateDeploymentGateParams"; +import { CreateDeploymentRuleParams } from "../models/CreateDeploymentRuleParams"; +import { DeploymentGateResponse } from "../models/DeploymentGateResponse"; +import { DeploymentRuleResponse } from "../models/DeploymentRuleResponse"; +import { HTTPCDGatesBadRequestResponse } from "../models/HTTPCDGatesBadRequestResponse"; +import { HTTPCDGatesNotFoundResponse } from "../models/HTTPCDGatesNotFoundResponse"; +import { HTTPCDRulesNotFoundResponse } from "../models/HTTPCDRulesNotFoundResponse"; +import { HTTPCIAppErrors } from "../models/HTTPCIAppErrors"; +import { UpdateDeploymentGateParams } from "../models/UpdateDeploymentGateParams"; +import { UpdateDeploymentRuleParams } from "../models/UpdateDeploymentRuleParams"; + +export class DeploymentGatesApiRequestFactory extends BaseAPIRequestFactory { + public async createDeploymentGate( + body: CreateDeploymentGateParams, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createDeploymentGate'"); + if (!_config.unstableOperations["v2.createDeploymentGate"]) { + throw new Error("Unstable operation 'createDeploymentGate' is disabled"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createDeploymentGate"); + } + + // Path Params + const localVarPath = "/api/v2/deployment_gates"; + + // Make Request Context + const requestContext = _config + .getServer("v2.DeploymentGatesApi.createDeploymentGate") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CreateDeploymentGateParams", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createDeploymentRule( + gateId: string, + body: CreateDeploymentRuleParams, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createDeploymentRule'"); + if (!_config.unstableOperations["v2.createDeploymentRule"]) { + throw new Error("Unstable operation 'createDeploymentRule' is disabled"); + } + + // verify required parameter 'gateId' is not null or undefined + if (gateId === null || gateId === undefined) { + throw new RequiredError("gateId", "createDeploymentRule"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createDeploymentRule"); + } + + // Path Params + const localVarPath = "/api/v2/deployment_gates/{gate_id}/rules".replace( + "{gate_id}", + encodeURIComponent(String(gateId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.DeploymentGatesApi.createDeploymentRule") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CreateDeploymentRuleParams", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteDeploymentGate( + id: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'deleteDeploymentGate'"); + if (!_config.unstableOperations["v2.deleteDeploymentGate"]) { + throw new Error("Unstable operation 'deleteDeploymentGate' is disabled"); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "deleteDeploymentGate"); + } + + // Path Params + const localVarPath = "/api/v2/deployment_gates/{id}".replace( + "{id}", + encodeURIComponent(String(id)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.DeploymentGatesApi.deleteDeploymentGate") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteDeploymentRule( + gateId: string, + id: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'deleteDeploymentRule'"); + if (!_config.unstableOperations["v2.deleteDeploymentRule"]) { + throw new Error("Unstable operation 'deleteDeploymentRule' is disabled"); + } + + // verify required parameter 'gateId' is not null or undefined + if (gateId === null || gateId === undefined) { + throw new RequiredError("gateId", "deleteDeploymentRule"); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "deleteDeploymentRule"); + } + + // Path Params + const localVarPath = "/api/v2/deployment_gates/{gate_id}/rules/{id}" + .replace("{gate_id}", encodeURIComponent(String(gateId))) + .replace("{id}", encodeURIComponent(String(id))); + + // Make Request Context + const requestContext = _config + .getServer("v2.DeploymentGatesApi.deleteDeploymentRule") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getDeploymentGate( + id: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getDeploymentGate'"); + if (!_config.unstableOperations["v2.getDeploymentGate"]) { + throw new Error("Unstable operation 'getDeploymentGate' is disabled"); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "getDeploymentGate"); + } + + // Path Params + const localVarPath = "/api/v2/deployment_gates/{id}".replace( + "{id}", + encodeURIComponent(String(id)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.DeploymentGatesApi.getDeploymentGate") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getDeploymentRule( + gateId: string, + id: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getDeploymentRule'"); + if (!_config.unstableOperations["v2.getDeploymentRule"]) { + throw new Error("Unstable operation 'getDeploymentRule' is disabled"); + } + + // verify required parameter 'gateId' is not null or undefined + if (gateId === null || gateId === undefined) { + throw new RequiredError("gateId", "getDeploymentRule"); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "getDeploymentRule"); + } + + // Path Params + const localVarPath = "/api/v2/deployment_gates/{gate_id}/rules/{id}" + .replace("{gate_id}", encodeURIComponent(String(gateId))) + .replace("{id}", encodeURIComponent(String(id))); + + // Make Request Context + const requestContext = _config + .getServer("v2.DeploymentGatesApi.getDeploymentRule") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateDeploymentGate( + id: string, + body: UpdateDeploymentGateParams, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateDeploymentGate'"); + if (!_config.unstableOperations["v2.updateDeploymentGate"]) { + throw new Error("Unstable operation 'updateDeploymentGate' is disabled"); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "updateDeploymentGate"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateDeploymentGate"); + } + + // Path Params + const localVarPath = "/api/v2/deployment_gates/{id}".replace( + "{id}", + encodeURIComponent(String(id)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.DeploymentGatesApi.updateDeploymentGate") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "UpdateDeploymentGateParams", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateDeploymentRule( + gateId: string, + id: string, + body: UpdateDeploymentRuleParams, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateDeploymentRule'"); + if (!_config.unstableOperations["v2.updateDeploymentRule"]) { + throw new Error("Unstable operation 'updateDeploymentRule' is disabled"); + } + + // verify required parameter 'gateId' is not null or undefined + if (gateId === null || gateId === undefined) { + throw new RequiredError("gateId", "updateDeploymentRule"); + } + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "updateDeploymentRule"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateDeploymentRule"); + } + + // Path Params + const localVarPath = "/api/v2/deployment_gates/{gate_id}/rules/{id}" + .replace("{gate_id}", encodeURIComponent(String(gateId))) + .replace("{id}", encodeURIComponent(String(id))); + + // Make Request Context + const requestContext = _config + .getServer("v2.DeploymentGatesApi.updateDeploymentRule") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "UpdateDeploymentRuleParams", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class DeploymentGatesApiResponseProcessor { + /** + * 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 createDeploymentGate + * @throws ApiException if the response code was not in [200, 299] + */ + public async createDeploymentGate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DeploymentGateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentGateResponse" + ) as DeploymentGateResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesBadRequestResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesBadRequestResponse" + ) as HTTPCDGatesBadRequestResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 500) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCIAppErrors; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCIAppErrors" + ) as HTTPCIAppErrors; + } 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: DeploymentGateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentGateResponse", + "" + ) as DeploymentGateResponse; + 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 createDeploymentRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async createDeploymentRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DeploymentRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentRuleResponse" + ) as DeploymentRuleResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesBadRequestResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesBadRequestResponse" + ) as HTTPCDGatesBadRequestResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 500) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCIAppErrors; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCIAppErrors" + ) as HTTPCIAppErrors; + } 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: DeploymentRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentRuleResponse", + "" + ) as DeploymentRuleResponse; + 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 deleteDeploymentGate + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteDeploymentGate(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesBadRequestResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesBadRequestResponse" + ) as HTTPCDGatesBadRequestResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesNotFoundResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesNotFoundResponse" + ) as HTTPCDGatesNotFoundResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 500) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCIAppErrors; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCIAppErrors" + ) as HTTPCIAppErrors; + } 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 deleteDeploymentRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteDeploymentRule(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesBadRequestResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesBadRequestResponse" + ) as HTTPCDGatesBadRequestResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesNotFoundResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesNotFoundResponse" + ) as HTTPCDGatesNotFoundResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 500) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCIAppErrors; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCIAppErrors" + ) as HTTPCIAppErrors; + } 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 getDeploymentGate + * @throws ApiException if the response code was not in [200, 299] + */ + public async getDeploymentGate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DeploymentGateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentGateResponse" + ) as DeploymentGateResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesBadRequestResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesBadRequestResponse" + ) as HTTPCDGatesBadRequestResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesNotFoundResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesNotFoundResponse" + ) as HTTPCDGatesNotFoundResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 500) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCIAppErrors; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCIAppErrors" + ) as HTTPCIAppErrors; + } 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: DeploymentGateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentGateResponse", + "" + ) as DeploymentGateResponse; + 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 getDeploymentRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async getDeploymentRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DeploymentRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentRuleResponse" + ) as DeploymentRuleResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesBadRequestResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesBadRequestResponse" + ) as HTTPCDGatesBadRequestResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDRulesNotFoundResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDRulesNotFoundResponse" + ) as HTTPCDRulesNotFoundResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 500) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCIAppErrors; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCIAppErrors" + ) as HTTPCIAppErrors; + } 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: DeploymentRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentRuleResponse", + "" + ) as DeploymentRuleResponse; + 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 updateDeploymentGate + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateDeploymentGate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DeploymentGateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentGateResponse" + ) as DeploymentGateResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesBadRequestResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesBadRequestResponse" + ) as HTTPCDGatesBadRequestResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesNotFoundResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesNotFoundResponse" + ) as HTTPCDGatesNotFoundResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 500) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCIAppErrors; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCIAppErrors" + ) as HTTPCIAppErrors; + } 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: DeploymentGateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentGateResponse", + "" + ) as DeploymentGateResponse; + 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 updateDeploymentRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateDeploymentRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DeploymentRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentRuleResponse" + ) as DeploymentRuleResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDGatesBadRequestResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDGatesBadRequestResponse" + ) as HTTPCDGatesBadRequestResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCDRulesNotFoundResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCDRulesNotFoundResponse" + ) as HTTPCDRulesNotFoundResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 500) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: HTTPCIAppErrors; + try { + body = ObjectSerializer.deserialize( + bodyText, + "HTTPCIAppErrors" + ) as HTTPCIAppErrors; + } 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: DeploymentRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeploymentRuleResponse", + "" + ) as DeploymentRuleResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface DeploymentGatesApiCreateDeploymentGateRequest { + /** + * @type CreateDeploymentGateParams + */ + body: CreateDeploymentGateParams; +} + +export interface DeploymentGatesApiCreateDeploymentRuleRequest { + /** + * The ID of the deployment gate. + * @type string + */ + gateId: string; + /** + * @type CreateDeploymentRuleParams + */ + body: CreateDeploymentRuleParams; +} + +export interface DeploymentGatesApiDeleteDeploymentGateRequest { + /** + * The ID of the deployment gate. + * @type string + */ + id: string; +} + +export interface DeploymentGatesApiDeleteDeploymentRuleRequest { + /** + * The ID of the deployment gate. + * @type string + */ + gateId: string; + /** + * The ID of the deployment rule. + * @type string + */ + id: string; +} + +export interface DeploymentGatesApiGetDeploymentGateRequest { + /** + * The ID of the deployment gate. + * @type string + */ + id: string; +} + +export interface DeploymentGatesApiGetDeploymentRuleRequest { + /** + * The ID of the deployment gate. + * @type string + */ + gateId: string; + /** + * The ID of the deployment rule. + * @type string + */ + id: string; +} + +export interface DeploymentGatesApiUpdateDeploymentGateRequest { + /** + * The ID of the deployment gate. + * @type string + */ + id: string; + /** + * @type UpdateDeploymentGateParams + */ + body: UpdateDeploymentGateParams; +} + +export interface DeploymentGatesApiUpdateDeploymentRuleRequest { + /** + * The ID of the deployment gate. + * @type string + */ + gateId: string; + /** + * The ID of the deployment rule. + * @type string + */ + id: string; + /** + * @type UpdateDeploymentRuleParams + */ + body: UpdateDeploymentRuleParams; +} + +export class DeploymentGatesApi { + private requestFactory: DeploymentGatesApiRequestFactory; + private responseProcessor: DeploymentGatesApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: DeploymentGatesApiRequestFactory, + responseProcessor?: DeploymentGatesApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new DeploymentGatesApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new DeploymentGatesApiResponseProcessor(); + } + + /** + * Endpoint to create a deployment gate. + * @param param The request object + */ + public createDeploymentGate( + param: DeploymentGatesApiCreateDeploymentGateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createDeploymentGate( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createDeploymentGate(responseContext); + }); + }); + } + + /** + * Endpoint to create a deployment rule. A gate for the rule must already exist. + * @param param The request object + */ + public createDeploymentRule( + param: DeploymentGatesApiCreateDeploymentRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createDeploymentRule( + param.gateId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createDeploymentRule(responseContext); + }); + }); + } + + /** + * Endpoint to delete a deployment gate. Rules associated with the gate are also deleted. + * @param param The request object + */ + public deleteDeploymentGate( + param: DeploymentGatesApiDeleteDeploymentGateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteDeploymentGate( + param.id, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteDeploymentGate(responseContext); + }); + }); + } + + /** + * Endpoint to delete a deployment rule. + * @param param The request object + */ + public deleteDeploymentRule( + param: DeploymentGatesApiDeleteDeploymentRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteDeploymentRule( + param.gateId, + param.id, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteDeploymentRule(responseContext); + }); + }); + } + + /** + * Endpoint to get a deployment gate. + * @param param The request object + */ + public getDeploymentGate( + param: DeploymentGatesApiGetDeploymentGateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getDeploymentGate( + param.id, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getDeploymentGate(responseContext); + }); + }); + } + + /** + * Endpoint to get a deployment rule. + * @param param The request object + */ + public getDeploymentRule( + param: DeploymentGatesApiGetDeploymentRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getDeploymentRule( + param.gateId, + param.id, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getDeploymentRule(responseContext); + }); + }); + } + + /** + * Endpoint to update a deployment gate. + * @param param The request object + */ + public updateDeploymentGate( + param: DeploymentGatesApiUpdateDeploymentGateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateDeploymentGate( + param.id, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateDeploymentGate(responseContext); + }); + }); + } + + /** + * Endpoint to update a deployment rule. + * @param param The request object + */ + public updateDeploymentRule( + param: DeploymentGatesApiUpdateDeploymentRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateDeploymentRule( + param.gateId, + param.id, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateDeploymentRule(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index b8128b64d163..7a64795f7d8e 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -294,6 +294,18 @@ export { DatasetsApi, } from "./apis/DatasetsApi"; +export { + DeploymentGatesApiCreateDeploymentGateRequest, + DeploymentGatesApiCreateDeploymentRuleRequest, + DeploymentGatesApiDeleteDeploymentGateRequest, + DeploymentGatesApiDeleteDeploymentRuleRequest, + DeploymentGatesApiGetDeploymentGateRequest, + DeploymentGatesApiGetDeploymentRuleRequest, + DeploymentGatesApiUpdateDeploymentGateRequest, + DeploymentGatesApiUpdateDeploymentRuleRequest, + DeploymentGatesApi, +} from "./apis/DeploymentGatesApi"; + export { DomainAllowlistApiPatchDomainAllowlistRequest, DomainAllowlistApi, @@ -1638,6 +1650,12 @@ export { CreateDataDeletionRequestBodyAttributes } from "./models/CreateDataDele export { CreateDataDeletionRequestBodyData } from "./models/CreateDataDeletionRequestBodyData"; export { CreateDataDeletionRequestBodyDataType } from "./models/CreateDataDeletionRequestBodyDataType"; export { CreateDataDeletionResponseBody } from "./models/CreateDataDeletionResponseBody"; +export { CreateDeploymentGateParams } from "./models/CreateDeploymentGateParams"; +export { CreateDeploymentGateParamsData } from "./models/CreateDeploymentGateParamsData"; +export { CreateDeploymentGateParamsDataAttributes } from "./models/CreateDeploymentGateParamsDataAttributes"; +export { CreateDeploymentRuleParams } from "./models/CreateDeploymentRuleParams"; +export { CreateDeploymentRuleParamsData } from "./models/CreateDeploymentRuleParamsData"; +export { CreateDeploymentRuleParamsDataAttributes } from "./models/CreateDeploymentRuleParamsDataAttributes"; export { CreateIncidentNotificationRuleRequest } from "./models/CreateIncidentNotificationRuleRequest"; export { CreateIncidentNotificationTemplateRequest } from "./models/CreateIncidentNotificationTemplateRequest"; export { CreateNotificationRuleParameters } from "./models/CreateNotificationRuleParameters"; @@ -1851,9 +1869,25 @@ export { DeleteCustomFrameworkResponse } from "./models/DeleteCustomFrameworkRes export { DependencyLocation } from "./models/DependencyLocation"; export { Deployment } from "./models/Deployment"; export { DeploymentAttributes } from "./models/DeploymentAttributes"; +export { DeploymentGateDataType } from "./models/DeploymentGateDataType"; +export { DeploymentGateResponse } from "./models/DeploymentGateResponse"; +export { DeploymentGateResponseData } from "./models/DeploymentGateResponseData"; +export { DeploymentGateResponseDataAttributes } from "./models/DeploymentGateResponseDataAttributes"; +export { DeploymentGateResponseDataAttributesCreatedBy } from "./models/DeploymentGateResponseDataAttributesCreatedBy"; +export { DeploymentGateResponseDataAttributesUpdatedBy } from "./models/DeploymentGateResponseDataAttributesUpdatedBy"; export { DeploymentMetadata } from "./models/DeploymentMetadata"; export { DeploymentRelationship } from "./models/DeploymentRelationship"; export { DeploymentRelationshipData } from "./models/DeploymentRelationshipData"; +export { DeploymentRuleDataType } from "./models/DeploymentRuleDataType"; +export { DeploymentRuleOptionsFaultyDeploymentDetection } from "./models/DeploymentRuleOptionsFaultyDeploymentDetection"; +export { DeploymentRuleOptionsMonitor } from "./models/DeploymentRuleOptionsMonitor"; +export { DeploymentRuleResponse } from "./models/DeploymentRuleResponse"; +export { DeploymentRuleResponseData } from "./models/DeploymentRuleResponseData"; +export { DeploymentRuleResponseDataAttributes } from "./models/DeploymentRuleResponseDataAttributes"; +export { DeploymentRuleResponseDataAttributesCreatedBy } from "./models/DeploymentRuleResponseDataAttributesCreatedBy"; +export { DeploymentRuleResponseDataAttributesType } from "./models/DeploymentRuleResponseDataAttributesType"; +export { DeploymentRuleResponseDataAttributesUpdatedBy } from "./models/DeploymentRuleResponseDataAttributesUpdatedBy"; +export { DeploymentRulesOptions } from "./models/DeploymentRulesOptions"; export { DetailedFinding } from "./models/DetailedFinding"; export { DetailedFindingAttributes } from "./models/DetailedFindingAttributes"; export { DetailedFindingType } from "./models/DetailedFindingType"; @@ -2347,6 +2381,9 @@ export { HourlyUsagePagination } from "./models/HourlyUsagePagination"; export { HourlyUsageResponse } from "./models/HourlyUsageResponse"; export { HourlyUsageType } from "./models/HourlyUsageType"; export { HTTPBody } from "./models/HTTPBody"; +export { HTTPCDGatesBadRequestResponse } from "./models/HTTPCDGatesBadRequestResponse"; +export { HTTPCDGatesNotFoundResponse } from "./models/HTTPCDGatesNotFoundResponse"; +export { HTTPCDRulesNotFoundResponse } from "./models/HTTPCDRulesNotFoundResponse"; export { HTTPCIAppError } from "./models/HTTPCIAppError"; export { HTTPCIAppErrors } from "./models/HTTPCIAppErrors"; export { HTTPCredentials } from "./models/HTTPCredentials"; @@ -4292,6 +4329,12 @@ export { UpdateConnectionRequestDataAttributesFieldsToUpdateItems } from "./mode export { UpdateConnectionRequestDataType } from "./models/UpdateConnectionRequestDataType"; export { UpdateCustomFrameworkRequest } from "./models/UpdateCustomFrameworkRequest"; export { UpdateCustomFrameworkResponse } from "./models/UpdateCustomFrameworkResponse"; +export { UpdateDeploymentGateParams } from "./models/UpdateDeploymentGateParams"; +export { UpdateDeploymentGateParamsData } from "./models/UpdateDeploymentGateParamsData"; +export { UpdateDeploymentGateParamsDataAttributes } from "./models/UpdateDeploymentGateParamsDataAttributes"; +export { UpdateDeploymentRuleParams } from "./models/UpdateDeploymentRuleParams"; +export { UpdateDeploymentRuleParamsData } from "./models/UpdateDeploymentRuleParamsData"; +export { UpdateDeploymentRuleParamsDataAttributes } from "./models/UpdateDeploymentRuleParamsDataAttributes"; export { UpdateOpenAPIResponse } from "./models/UpdateOpenAPIResponse"; export { UpdateOpenAPIResponseAttributes } from "./models/UpdateOpenAPIResponseAttributes"; export { UpdateOpenAPIResponseData } from "./models/UpdateOpenAPIResponseData"; diff --git a/packages/datadog-api-client-v2/models/CreateDeploymentGateParams.ts b/packages/datadog-api-client-v2/models/CreateDeploymentGateParams.ts new file mode 100644 index 000000000000..f365e56fbaab --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateDeploymentGateParams.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CreateDeploymentGateParamsData } from "./CreateDeploymentGateParamsData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for creating a deployment gate. + */ +export class CreateDeploymentGateParams { + /** + * Parameters for creating a deployment gate. + */ + "data": CreateDeploymentGateParamsData; + + /** + * 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: "CreateDeploymentGateParamsData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateDeploymentGateParams.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateDeploymentGateParamsData.ts b/packages/datadog-api-client-v2/models/CreateDeploymentGateParamsData.ts new file mode 100644 index 000000000000..385368d55202 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateDeploymentGateParamsData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CreateDeploymentGateParamsDataAttributes } from "./CreateDeploymentGateParamsDataAttributes"; +import { DeploymentGateDataType } from "./DeploymentGateDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for creating a deployment gate. + */ +export class CreateDeploymentGateParamsData { + /** + * Parameters for creating a deployment gate. + */ + "attributes": CreateDeploymentGateParamsDataAttributes; + /** + * Deployment gate resource type. + */ + "type": DeploymentGateDataType; + + /** + * 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: "CreateDeploymentGateParamsDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "DeploymentGateDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateDeploymentGateParamsData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateDeploymentGateParamsDataAttributes.ts b/packages/datadog-api-client-v2/models/CreateDeploymentGateParamsDataAttributes.ts new file mode 100644 index 000000000000..ed4b6b607874 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateDeploymentGateParamsDataAttributes.ts @@ -0,0 +1,78 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for creating a deployment gate. + */ +export class CreateDeploymentGateParamsDataAttributes { + /** + * Whether this gate is run in dry-run mode. + */ + "dryRun"?: boolean; + /** + * The environment of the deployment gate. + */ + "env": string; + /** + * The identifier of the deployment gate. + */ + "identifier"?: string; + /** + * The service of the deployment gate. + */ + "service": 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 = { + dryRun: { + baseName: "dry_run", + type: "boolean", + }, + env: { + baseName: "env", + type: "string", + required: true, + }, + identifier: { + baseName: "identifier", + type: "string", + }, + service: { + baseName: "service", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateDeploymentGateParamsDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateDeploymentRuleParams.ts b/packages/datadog-api-client-v2/models/CreateDeploymentRuleParams.ts new file mode 100644 index 000000000000..716c4991548d --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateDeploymentRuleParams.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CreateDeploymentRuleParamsData } from "./CreateDeploymentRuleParamsData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for creating a deployment rule. + */ +export class CreateDeploymentRuleParams { + /** + * Parameters for creating a deployment rule. + */ + "data"?: CreateDeploymentRuleParamsData; + + /** + * 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: "CreateDeploymentRuleParamsData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateDeploymentRuleParams.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateDeploymentRuleParamsData.ts b/packages/datadog-api-client-v2/models/CreateDeploymentRuleParamsData.ts new file mode 100644 index 000000000000..cd8f0f535d88 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateDeploymentRuleParamsData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CreateDeploymentRuleParamsDataAttributes } from "./CreateDeploymentRuleParamsDataAttributes"; +import { DeploymentRuleDataType } from "./DeploymentRuleDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for creating a deployment rule. + */ +export class CreateDeploymentRuleParamsData { + /** + * Parameters for creating a deployment rule. + */ + "attributes": CreateDeploymentRuleParamsDataAttributes; + /** + * Deployment rule resource type. + */ + "type": DeploymentRuleDataType; + + /** + * 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: "CreateDeploymentRuleParamsDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "DeploymentRuleDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateDeploymentRuleParamsData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateDeploymentRuleParamsDataAttributes.ts b/packages/datadog-api-client-v2/models/CreateDeploymentRuleParamsDataAttributes.ts new file mode 100644 index 000000000000..beef21c7ef49 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateDeploymentRuleParamsDataAttributes.ts @@ -0,0 +1,80 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentRulesOptions } from "./DeploymentRulesOptions"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for creating a deployment rule. + */ +export class CreateDeploymentRuleParamsDataAttributes { + /** + * Whether this rule is run in dry-run mode. + */ + "dryRun"?: boolean; + /** + * The name of the deployment rule. + */ + "name": string; + /** + * Options for deployment rule response representing either faulty deployment detection or monitor options. + */ + "options": DeploymentRulesOptions; + /** + * The type of the deployment rule (faulty_deployment_detection or monitor). + */ + "type": 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 = { + dryRun: { + baseName: "dry_run", + type: "boolean", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + options: { + baseName: "options", + type: "DeploymentRulesOptions", + required: true, + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateDeploymentRuleParamsDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentGateDataType.ts b/packages/datadog-api-client-v2/models/DeploymentGateDataType.ts new file mode 100644 index 000000000000..2fb212d298f6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentGateDataType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Deployment gate resource type. + */ + +export type DeploymentGateDataType = typeof DEPLOYMENT_GATE | UnparsedObject; +export const DEPLOYMENT_GATE = "deployment_gate"; diff --git a/packages/datadog-api-client-v2/models/DeploymentGateResponse.ts b/packages/datadog-api-client-v2/models/DeploymentGateResponse.ts new file mode 100644 index 000000000000..50c8b1aa15e4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentGateResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentGateResponseData } from "./DeploymentGateResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response for a deployment gate. + */ +export class DeploymentGateResponse { + /** + * Data for a deployment gate. + */ + "data"?: DeploymentGateResponseData; + + /** + * 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: "DeploymentGateResponseData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentGateResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentGateResponseData.ts b/packages/datadog-api-client-v2/models/DeploymentGateResponseData.ts new file mode 100644 index 000000000000..01b9c97b02a6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentGateResponseData.ts @@ -0,0 +1,73 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentGateDataType } from "./DeploymentGateDataType"; +import { DeploymentGateResponseDataAttributes } from "./DeploymentGateResponseDataAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for a deployment gate. + */ +export class DeploymentGateResponseData { + /** + * Basic information about a deployment gate. + */ + "attributes": DeploymentGateResponseDataAttributes; + /** + * Unique identifier of the deployment gate. + */ + "id": string; + /** + * Deployment gate resource type. + */ + "type": DeploymentGateDataType; + + /** + * 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: "DeploymentGateResponseDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "DeploymentGateDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentGateResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributes.ts b/packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributes.ts new file mode 100644 index 000000000000..b6c9c0094652 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributes.ts @@ -0,0 +1,118 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentGateResponseDataAttributesCreatedBy } from "./DeploymentGateResponseDataAttributesCreatedBy"; +import { DeploymentGateResponseDataAttributesUpdatedBy } from "./DeploymentGateResponseDataAttributesUpdatedBy"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Basic information about a deployment gate. + */ +export class DeploymentGateResponseDataAttributes { + /** + * The timestamp when the deployment gate was created. + */ + "createdAt": Date; + /** + * Information about the user who created the deployment gate. + */ + "createdBy": DeploymentGateResponseDataAttributesCreatedBy; + /** + * Whether this gate is run in dry-run mode. + */ + "dryRun": boolean; + /** + * The environment of the deployment gate. + */ + "env": string; + /** + * The identifier of the deployment gate. + */ + "identifier": string; + /** + * The service of the deployment gate. + */ + "service": string; + /** + * The timestamp when the deployment gate was last updated. + */ + "updatedAt"?: Date; + /** + * Information about the user who updated the deployment gate. + */ + "updatedBy"?: DeploymentGateResponseDataAttributesUpdatedBy; + + /** + * 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 = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "DeploymentGateResponseDataAttributesCreatedBy", + required: true, + }, + dryRun: { + baseName: "dry_run", + type: "boolean", + required: true, + }, + env: { + baseName: "env", + type: "string", + required: true, + }, + identifier: { + baseName: "identifier", + type: "string", + required: true, + }, + service: { + baseName: "service", + type: "string", + required: true, + }, + updatedAt: { + baseName: "updated_at", + type: "Date", + format: "date-time", + }, + updatedBy: { + baseName: "updated_by", + type: "DeploymentGateResponseDataAttributesUpdatedBy", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentGateResponseDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributesCreatedBy.ts b/packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributesCreatedBy.ts new file mode 100644 index 000000000000..ab8f457119fc --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributesCreatedBy.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Information about the user who created the deployment gate. + */ +export class DeploymentGateResponseDataAttributesCreatedBy { + /** + * The handle of the user who created the deployment rule. + */ + "handle"?: string; + /** + * The ID of the user who created the deployment rule. + */ + "id": string; + /** + * The name of the user who created the deployment rule. + */ + "name"?: 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 = { + handle: { + baseName: "handle", + type: "string", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentGateResponseDataAttributesCreatedBy.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributesUpdatedBy.ts b/packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributesUpdatedBy.ts new file mode 100644 index 000000000000..43b40ee5729e --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentGateResponseDataAttributesUpdatedBy.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Information about the user who updated the deployment gate. + */ +export class DeploymentGateResponseDataAttributesUpdatedBy { + /** + * The handle of the user who updated the deployment rule. + */ + "handle"?: string; + /** + * The ID of the user who updated the deployment rule. + */ + "id": string; + /** + * The name of the user who updated the deployment rule. + */ + "name"?: 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 = { + handle: { + baseName: "handle", + type: "string", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentGateResponseDataAttributesUpdatedBy.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentRuleDataType.ts b/packages/datadog-api-client-v2/models/DeploymentRuleDataType.ts new file mode 100644 index 000000000000..b225a353ce75 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRuleDataType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Deployment rule resource type. + */ + +export type DeploymentRuleDataType = typeof DEPLOYMENT_RULE | UnparsedObject; +export const DEPLOYMENT_RULE = "deployment_rule"; diff --git a/packages/datadog-api-client-v2/models/DeploymentRuleOptionsFaultyDeploymentDetection.ts b/packages/datadog-api-client-v2/models/DeploymentRuleOptionsFaultyDeploymentDetection.ts new file mode 100644 index 000000000000..6be949b58300 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRuleOptionsFaultyDeploymentDetection.ts @@ -0,0 +1,50 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Faulty deployment detection options for deployment rules. + */ +export class DeploymentRuleOptionsFaultyDeploymentDetection { + /** + * The duration for faulty deployment detection. + */ + "duration"?: number; + /** + * Resources to exclude from faulty deployment detection. + */ + "excludedResources"?: Array; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + duration: { + baseName: "duration", + type: "number", + format: "int64", + }, + excludedResources: { + baseName: "excluded_resources", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentRuleOptionsFaultyDeploymentDetection.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentRuleOptionsMonitor.ts b/packages/datadog-api-client-v2/models/DeploymentRuleOptionsMonitor.ts new file mode 100644 index 000000000000..712c06a2febf --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRuleOptionsMonitor.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Monitor options for deployment rules. + */ +export class DeploymentRuleOptionsMonitor { + /** + * Seconds the monitor needs to stay in OK status for the rule to pass. + */ + "duration"?: number; + /** + * Monitors that match this query are evaluated. + */ + "query": string; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + duration: { + baseName: "duration", + type: "number", + format: "int64", + }, + query: { + baseName: "query", + type: "string", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentRuleOptionsMonitor.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentRuleResponse.ts b/packages/datadog-api-client-v2/models/DeploymentRuleResponse.ts new file mode 100644 index 000000000000..da0f20ccab63 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRuleResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentRuleResponseData } from "./DeploymentRuleResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response for a deployment rule. + */ +export class DeploymentRuleResponse { + /** + * Data for a deployment rule. + */ + "data"?: DeploymentRuleResponseData; + + /** + * 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: "DeploymentRuleResponseData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentRuleResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentRuleResponseData.ts b/packages/datadog-api-client-v2/models/DeploymentRuleResponseData.ts new file mode 100644 index 000000000000..e84296568d45 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRuleResponseData.ts @@ -0,0 +1,73 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentRuleDataType } from "./DeploymentRuleDataType"; +import { DeploymentRuleResponseDataAttributes } from "./DeploymentRuleResponseDataAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for a deployment rule. + */ +export class DeploymentRuleResponseData { + /** + * Basic information about a deployment rule. + */ + "attributes": DeploymentRuleResponseDataAttributes; + /** + * Unique identifier of the deployment rule. + */ + "id": string; + /** + * Deployment rule resource type. + */ + "type": DeploymentRuleDataType; + + /** + * 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: "DeploymentRuleResponseDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "DeploymentRuleDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentRuleResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributes.ts b/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributes.ts new file mode 100644 index 000000000000..0114167b1bee --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributes.ts @@ -0,0 +1,129 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentRuleResponseDataAttributesCreatedBy } from "./DeploymentRuleResponseDataAttributesCreatedBy"; +import { DeploymentRuleResponseDataAttributesType } from "./DeploymentRuleResponseDataAttributesType"; +import { DeploymentRuleResponseDataAttributesUpdatedBy } from "./DeploymentRuleResponseDataAttributesUpdatedBy"; +import { DeploymentRulesOptions } from "./DeploymentRulesOptions"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Basic information about a deployment rule. + */ +export class DeploymentRuleResponseDataAttributes { + /** + * The timestamp when the deployment rule was created. + */ + "createdAt": Date; + /** + * Information about the user who created the deployment rule. + */ + "createdBy": DeploymentRuleResponseDataAttributesCreatedBy; + /** + * Whether this rule is run in dry-run mode. + */ + "dryRun": boolean; + /** + * The ID of the deployment gate. + */ + "gateId": string; + /** + * The name of the deployment rule. + */ + "name": string; + /** + * Options for deployment rule response representing either faulty deployment detection or monitor options. + */ + "options": DeploymentRulesOptions; + /** + * The type of the deployment rule. + */ + "type": DeploymentRuleResponseDataAttributesType; + /** + * The timestamp when the deployment rule was last updated. + */ + "updatedAt"?: Date; + /** + * Information about the user who updated the deployment rule. + */ + "updatedBy"?: DeploymentRuleResponseDataAttributesUpdatedBy; + + /** + * 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 = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "DeploymentRuleResponseDataAttributesCreatedBy", + required: true, + }, + dryRun: { + baseName: "dry_run", + type: "boolean", + required: true, + }, + gateId: { + baseName: "gate_id", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + options: { + baseName: "options", + type: "DeploymentRulesOptions", + required: true, + }, + type: { + baseName: "type", + type: "DeploymentRuleResponseDataAttributesType", + required: true, + }, + updatedAt: { + baseName: "updated_at", + type: "Date", + format: "date-time", + }, + updatedBy: { + baseName: "updated_by", + type: "DeploymentRuleResponseDataAttributesUpdatedBy", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentRuleResponseDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesCreatedBy.ts b/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesCreatedBy.ts new file mode 100644 index 000000000000..efc7a629b5a3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesCreatedBy.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Information about the user who created the deployment rule. + */ +export class DeploymentRuleResponseDataAttributesCreatedBy { + /** + * The handle of the user who created the deployment rule. + */ + "handle"?: string; + /** + * The ID of the user who created the deployment rule. + */ + "id": string; + /** + * The name of the user who created the deployment rule. + */ + "name"?: 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 = { + handle: { + baseName: "handle", + type: "string", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentRuleResponseDataAttributesCreatedBy.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesType.ts b/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesType.ts new file mode 100644 index 000000000000..06389d95fc5e --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesType.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The type of the deployment rule. + */ + +export type DeploymentRuleResponseDataAttributesType = + | typeof FAULTY_DEPLOYMENT_DETECTION + | typeof MONITOR + | UnparsedObject; +export const FAULTY_DEPLOYMENT_DETECTION = "faulty_deployment_detection"; +export const MONITOR = "monitor"; diff --git a/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesUpdatedBy.ts b/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesUpdatedBy.ts new file mode 100644 index 000000000000..1c1285a20471 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRuleResponseDataAttributesUpdatedBy.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Information about the user who updated the deployment rule. + */ +export class DeploymentRuleResponseDataAttributesUpdatedBy { + /** + * The handle of the user who updated the deployment rule. + */ + "handle"?: string; + /** + * The ID of the user who updated the deployment rule. + */ + "id": string; + /** + * The name of the user who updated the deployment rule. + */ + "name"?: 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 = { + handle: { + baseName: "handle", + type: "string", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentRuleResponseDataAttributesUpdatedBy.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DeploymentRulesOptions.ts b/packages/datadog-api-client-v2/models/DeploymentRulesOptions.ts new file mode 100644 index 000000000000..5c9092595111 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DeploymentRulesOptions.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentRuleOptionsFaultyDeploymentDetection } from "./DeploymentRuleOptionsFaultyDeploymentDetection"; +import { DeploymentRuleOptionsMonitor } from "./DeploymentRuleOptionsMonitor"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Options for deployment rule response representing either faulty deployment detection or monitor options. + */ + +export type DeploymentRulesOptions = + | DeploymentRuleOptionsFaultyDeploymentDetection + | DeploymentRuleOptionsMonitor + | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/HTTPCDGatesBadRequestResponse.ts b/packages/datadog-api-client-v2/models/HTTPCDGatesBadRequestResponse.ts new file mode 100644 index 000000000000..5c7701915a10 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPCDGatesBadRequestResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { HTTPCIAppError } from "./HTTPCIAppError"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Bad request. + */ +export class HTTPCDGatesBadRequestResponse { + /** + * Structured errors. + */ + "errors"?: 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 = { + errors: { + baseName: "errors", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPCDGatesBadRequestResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPCDGatesNotFoundResponse.ts b/packages/datadog-api-client-v2/models/HTTPCDGatesNotFoundResponse.ts new file mode 100644 index 000000000000..291a5c6dd457 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPCDGatesNotFoundResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { HTTPCIAppError } from "./HTTPCIAppError"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Deployment gate not found. + */ +export class HTTPCDGatesNotFoundResponse { + /** + * Structured errors. + */ + "errors"?: 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 = { + errors: { + baseName: "errors", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPCDGatesNotFoundResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPCDRulesNotFoundResponse.ts b/packages/datadog-api-client-v2/models/HTTPCDRulesNotFoundResponse.ts new file mode 100644 index 000000000000..65489acfdac5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPCDRulesNotFoundResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { HTTPCIAppError } from "./HTTPCIAppError"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Deployment rule not found. + */ +export class HTTPCDRulesNotFoundResponse { + /** + * Structured errors. + */ + "errors"?: 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 = { + errors: { + baseName: "errors", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPCDRulesNotFoundResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index d9b57a17639d..9c2389422ee6 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -531,6 +531,12 @@ import { CreateDataDeletionRequestBody } from "./CreateDataDeletionRequestBody"; import { CreateDataDeletionRequestBodyAttributes } from "./CreateDataDeletionRequestBodyAttributes"; import { CreateDataDeletionRequestBodyData } from "./CreateDataDeletionRequestBodyData"; import { CreateDataDeletionResponseBody } from "./CreateDataDeletionResponseBody"; +import { CreateDeploymentGateParams } from "./CreateDeploymentGateParams"; +import { CreateDeploymentGateParamsData } from "./CreateDeploymentGateParamsData"; +import { CreateDeploymentGateParamsDataAttributes } from "./CreateDeploymentGateParamsDataAttributes"; +import { CreateDeploymentRuleParams } from "./CreateDeploymentRuleParams"; +import { CreateDeploymentRuleParamsData } from "./CreateDeploymentRuleParamsData"; +import { CreateDeploymentRuleParamsDataAttributes } from "./CreateDeploymentRuleParamsDataAttributes"; import { CreateIncidentNotificationRuleRequest } from "./CreateIncidentNotificationRuleRequest"; import { CreateIncidentNotificationTemplateRequest } from "./CreateIncidentNotificationTemplateRequest"; import { CreateNotificationRuleParameters } from "./CreateNotificationRuleParameters"; @@ -719,9 +725,21 @@ import { DeleteCustomFrameworkResponse } from "./DeleteCustomFrameworkResponse"; import { DependencyLocation } from "./DependencyLocation"; import { Deployment } from "./Deployment"; import { DeploymentAttributes } from "./DeploymentAttributes"; +import { DeploymentGateResponse } from "./DeploymentGateResponse"; +import { DeploymentGateResponseData } from "./DeploymentGateResponseData"; +import { DeploymentGateResponseDataAttributes } from "./DeploymentGateResponseDataAttributes"; +import { DeploymentGateResponseDataAttributesCreatedBy } from "./DeploymentGateResponseDataAttributesCreatedBy"; +import { DeploymentGateResponseDataAttributesUpdatedBy } from "./DeploymentGateResponseDataAttributesUpdatedBy"; import { DeploymentMetadata } from "./DeploymentMetadata"; import { DeploymentRelationship } from "./DeploymentRelationship"; import { DeploymentRelationshipData } from "./DeploymentRelationshipData"; +import { DeploymentRuleOptionsFaultyDeploymentDetection } from "./DeploymentRuleOptionsFaultyDeploymentDetection"; +import { DeploymentRuleOptionsMonitor } from "./DeploymentRuleOptionsMonitor"; +import { DeploymentRuleResponse } from "./DeploymentRuleResponse"; +import { DeploymentRuleResponseData } from "./DeploymentRuleResponseData"; +import { DeploymentRuleResponseDataAttributes } from "./DeploymentRuleResponseDataAttributes"; +import { DeploymentRuleResponseDataAttributesCreatedBy } from "./DeploymentRuleResponseDataAttributesCreatedBy"; +import { DeploymentRuleResponseDataAttributesUpdatedBy } from "./DeploymentRuleResponseDataAttributesUpdatedBy"; import { DetailedFinding } from "./DetailedFinding"; import { DetailedFindingAttributes } from "./DetailedFindingAttributes"; import { DeviceAttributes } from "./DeviceAttributes"; @@ -1068,6 +1086,9 @@ import { GreyNoiseIntegration } from "./GreyNoiseIntegration"; import { GreyNoiseIntegrationUpdate } from "./GreyNoiseIntegrationUpdate"; import { GroupScalarColumn } from "./GroupScalarColumn"; import { HTTPBody } from "./HTTPBody"; +import { HTTPCDGatesBadRequestResponse } from "./HTTPCDGatesBadRequestResponse"; +import { HTTPCDGatesNotFoundResponse } from "./HTTPCDGatesNotFoundResponse"; +import { HTTPCDRulesNotFoundResponse } from "./HTTPCDRulesNotFoundResponse"; import { HTTPCIAppError } from "./HTTPCIAppError"; import { HTTPCIAppErrors } from "./HTTPCIAppErrors"; import { HTTPHeader } from "./HTTPHeader"; @@ -2505,6 +2526,12 @@ import { UpdateConnectionRequestDataAttributes } from "./UpdateConnectionRequest import { UpdateConnectionRequestDataAttributesFieldsToUpdateItems } from "./UpdateConnectionRequestDataAttributesFieldsToUpdateItems"; import { UpdateCustomFrameworkRequest } from "./UpdateCustomFrameworkRequest"; import { UpdateCustomFrameworkResponse } from "./UpdateCustomFrameworkResponse"; +import { UpdateDeploymentGateParams } from "./UpdateDeploymentGateParams"; +import { UpdateDeploymentGateParamsData } from "./UpdateDeploymentGateParamsData"; +import { UpdateDeploymentGateParamsDataAttributes } from "./UpdateDeploymentGateParamsDataAttributes"; +import { UpdateDeploymentRuleParams } from "./UpdateDeploymentRuleParams"; +import { UpdateDeploymentRuleParamsData } from "./UpdateDeploymentRuleParamsData"; +import { UpdateDeploymentRuleParamsDataAttributes } from "./UpdateDeploymentRuleParamsDataAttributes"; import { UpdateOpenAPIResponse } from "./UpdateOpenAPIResponse"; import { UpdateOpenAPIResponseAttributes } from "./UpdateOpenAPIResponseAttributes"; import { UpdateOpenAPIResponseData } from "./UpdateOpenAPIResponseData"; @@ -3018,6 +3045,12 @@ const enumsMap: { [key: string]: any[] } = { DatastoreItemConflictMode: ["fail_on_conflict", "overwrite_on_conflict"], DatastoreItemsDataType: ["items"], DatastorePrimaryKeyGenerationStrategy: ["none", "uuid"], + DeploymentGateDataType: ["deployment_gate"], + DeploymentRuleDataType: ["deployment_rule"], + DeploymentRuleResponseDataAttributesType: [ + "faulty_deployment_detection", + "monitor", + ], DetailedFindingType: ["detailed_finding"], DnsMetricKey: [ "dns_total_requests", @@ -4892,6 +4925,14 @@ const typeMap: { [index: string]: any } = { CreateDataDeletionRequestBodyAttributes, CreateDataDeletionRequestBodyData: CreateDataDeletionRequestBodyData, CreateDataDeletionResponseBody: CreateDataDeletionResponseBody, + CreateDeploymentGateParams: CreateDeploymentGateParams, + CreateDeploymentGateParamsData: CreateDeploymentGateParamsData, + CreateDeploymentGateParamsDataAttributes: + CreateDeploymentGateParamsDataAttributes, + CreateDeploymentRuleParams: CreateDeploymentRuleParams, + CreateDeploymentRuleParamsData: CreateDeploymentRuleParamsData, + CreateDeploymentRuleParamsDataAttributes: + CreateDeploymentRuleParamsDataAttributes, CreateIncidentNotificationRuleRequest: CreateIncidentNotificationRuleRequest, CreateIncidentNotificationTemplateRequest: CreateIncidentNotificationTemplateRequest, @@ -5123,9 +5164,26 @@ const typeMap: { [index: string]: any } = { DependencyLocation: DependencyLocation, Deployment: Deployment, DeploymentAttributes: DeploymentAttributes, + DeploymentGateResponse: DeploymentGateResponse, + DeploymentGateResponseData: DeploymentGateResponseData, + DeploymentGateResponseDataAttributes: DeploymentGateResponseDataAttributes, + DeploymentGateResponseDataAttributesCreatedBy: + DeploymentGateResponseDataAttributesCreatedBy, + DeploymentGateResponseDataAttributesUpdatedBy: + DeploymentGateResponseDataAttributesUpdatedBy, DeploymentMetadata: DeploymentMetadata, DeploymentRelationship: DeploymentRelationship, DeploymentRelationshipData: DeploymentRelationshipData, + DeploymentRuleOptionsFaultyDeploymentDetection: + DeploymentRuleOptionsFaultyDeploymentDetection, + DeploymentRuleOptionsMonitor: DeploymentRuleOptionsMonitor, + DeploymentRuleResponse: DeploymentRuleResponse, + DeploymentRuleResponseData: DeploymentRuleResponseData, + DeploymentRuleResponseDataAttributes: DeploymentRuleResponseDataAttributes, + DeploymentRuleResponseDataAttributesCreatedBy: + DeploymentRuleResponseDataAttributesCreatedBy, + DeploymentRuleResponseDataAttributesUpdatedBy: + DeploymentRuleResponseDataAttributesUpdatedBy, DetailedFinding: DetailedFinding, DetailedFindingAttributes: DetailedFindingAttributes, DeviceAttributes: DeviceAttributes, @@ -5522,6 +5580,9 @@ const typeMap: { [index: string]: any } = { GreyNoiseIntegrationUpdate: GreyNoiseIntegrationUpdate, GroupScalarColumn: GroupScalarColumn, HTTPBody: HTTPBody, + HTTPCDGatesBadRequestResponse: HTTPCDGatesBadRequestResponse, + HTTPCDGatesNotFoundResponse: HTTPCDGatesNotFoundResponse, + HTTPCDRulesNotFoundResponse: HTTPCDRulesNotFoundResponse, HTTPCIAppError: HTTPCIAppError, HTTPCIAppErrors: HTTPCIAppErrors, HTTPHeader: HTTPHeader, @@ -7234,6 +7295,14 @@ const typeMap: { [index: string]: any } = { UpdateConnectionRequestDataAttributesFieldsToUpdateItems, UpdateCustomFrameworkRequest: UpdateCustomFrameworkRequest, UpdateCustomFrameworkResponse: UpdateCustomFrameworkResponse, + UpdateDeploymentGateParams: UpdateDeploymentGateParams, + UpdateDeploymentGateParamsData: UpdateDeploymentGateParamsData, + UpdateDeploymentGateParamsDataAttributes: + UpdateDeploymentGateParamsDataAttributes, + UpdateDeploymentRuleParams: UpdateDeploymentRuleParams, + UpdateDeploymentRuleParamsData: UpdateDeploymentRuleParamsData, + UpdateDeploymentRuleParamsDataAttributes: + UpdateDeploymentRuleParamsDataAttributes, UpdateOpenAPIResponse: UpdateOpenAPIResponse, UpdateOpenAPIResponseAttributes: UpdateOpenAPIResponseAttributes, UpdateOpenAPIResponseData: UpdateOpenAPIResponseData, @@ -7517,6 +7586,10 @@ const oneOfMap: { [index: string]: string[] } = { ], DatadogCredentials: ["DatadogAPIKey"], DatadogCredentialsUpdate: ["DatadogAPIKeyUpdate"], + DeploymentRulesOptions: [ + "DeploymentRuleOptionsFaultyDeploymentDetection", + "DeploymentRuleOptionsMonitor", + ], DowntimeMonitorIdentifier: [ "DowntimeMonitorIdentifierId", "DowntimeMonitorIdentifierTags", diff --git a/packages/datadog-api-client-v2/models/UpdateDeploymentGateParams.ts b/packages/datadog-api-client-v2/models/UpdateDeploymentGateParams.ts new file mode 100644 index 000000000000..97f70d747f0c --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateDeploymentGateParams.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { UpdateDeploymentGateParamsData } from "./UpdateDeploymentGateParamsData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for updating a deployment gate. + */ +export class UpdateDeploymentGateParams { + /** + * Parameters for updating a deployment gate. + */ + "data": UpdateDeploymentGateParamsData; + + /** + * 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: "UpdateDeploymentGateParamsData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateDeploymentGateParams.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateDeploymentGateParamsData.ts b/packages/datadog-api-client-v2/models/UpdateDeploymentGateParamsData.ts new file mode 100644 index 000000000000..14b64b356d86 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateDeploymentGateParamsData.ts @@ -0,0 +1,73 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentGateDataType } from "./DeploymentGateDataType"; +import { UpdateDeploymentGateParamsDataAttributes } from "./UpdateDeploymentGateParamsDataAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for updating a deployment gate. + */ +export class UpdateDeploymentGateParamsData { + /** + * Attributes for updating a deployment gate. + */ + "attributes": UpdateDeploymentGateParamsDataAttributes; + /** + * Unique identifier of the deployment gate. + */ + "id": string; + /** + * Deployment gate resource type. + */ + "type": DeploymentGateDataType; + + /** + * 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: "UpdateDeploymentGateParamsDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "DeploymentGateDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateDeploymentGateParamsData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateDeploymentGateParamsDataAttributes.ts b/packages/datadog-api-client-v2/models/UpdateDeploymentGateParamsDataAttributes.ts new file mode 100644 index 000000000000..49c1034a679f --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateDeploymentGateParamsDataAttributes.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for updating a deployment gate. + */ +export class UpdateDeploymentGateParamsDataAttributes { + /** + * Whether to run in dry-run mode. + */ + "dryRun": boolean; + + /** + * 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 = { + dryRun: { + baseName: "dry_run", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateDeploymentGateParamsDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateDeploymentRuleParams.ts b/packages/datadog-api-client-v2/models/UpdateDeploymentRuleParams.ts new file mode 100644 index 000000000000..a58ed7ae7fd0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateDeploymentRuleParams.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { UpdateDeploymentRuleParamsData } from "./UpdateDeploymentRuleParamsData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for updating a deployment rule. + */ +export class UpdateDeploymentRuleParams { + /** + * Parameters for updating a deployment rule. + */ + "data": UpdateDeploymentRuleParamsData; + + /** + * 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: "UpdateDeploymentRuleParamsData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateDeploymentRuleParams.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateDeploymentRuleParamsData.ts b/packages/datadog-api-client-v2/models/UpdateDeploymentRuleParamsData.ts new file mode 100644 index 000000000000..98d188de7ac5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateDeploymentRuleParamsData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentRuleDataType } from "./DeploymentRuleDataType"; +import { UpdateDeploymentRuleParamsDataAttributes } from "./UpdateDeploymentRuleParamsDataAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for updating a deployment rule. + */ +export class UpdateDeploymentRuleParamsData { + /** + * Parameters for updating a deployment rule. + */ + "attributes": UpdateDeploymentRuleParamsDataAttributes; + /** + * Deployment rule resource type. + */ + "type": DeploymentRuleDataType; + + /** + * 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: "UpdateDeploymentRuleParamsDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "DeploymentRuleDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateDeploymentRuleParamsData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateDeploymentRuleParamsDataAttributes.ts b/packages/datadog-api-client-v2/models/UpdateDeploymentRuleParamsDataAttributes.ts new file mode 100644 index 000000000000..159e6c4fa10f --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateDeploymentRuleParamsDataAttributes.ts @@ -0,0 +1,72 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DeploymentRulesOptions } from "./DeploymentRulesOptions"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for updating a deployment rule. + */ +export class UpdateDeploymentRuleParamsDataAttributes { + /** + * Whether to run this rule in dry-run mode. + */ + "dryRun": boolean; + /** + * The name of the deployment rule. + */ + "name": string; + /** + * Options for deployment rule response representing either faulty deployment detection or monitor options. + */ + "options": DeploymentRulesOptions; + + /** + * 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 = { + dryRun: { + baseName: "dry_run", + type: "boolean", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + options: { + baseName: "options", + type: "DeploymentRulesOptions", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateDeploymentRuleParamsDataAttributes.attributeTypeMap; + } + + public constructor() {} +}