diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 035a0b327801..1fe1b58cae05 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -20382,6 +20382,238 @@ components: data: $ref: "#/components/schemas/ListDeploymentRuleResponseData" type: object + DeploymentGatesEvaluationRequest: + description: Request body for triggering a deployment gate evaluation. + properties: + data: + $ref: "#/components/schemas/DeploymentGatesEvaluationRequestData" + required: + - data + type: object + DeploymentGatesEvaluationRequestAttributes: + description: Attributes for a deployment gate evaluation request. + properties: + env: + description: The environment of the deployment. + example: "staging" + type: string + identifier: + default: default + description: The identifier of the deployment gate. Defaults to "default". + example: "pre-deploy" + type: string + primary_tag: + description: A primary tag to scope APM Faulty Deployment Detection rules. + example: "region:us-east-1" + type: string + service: + description: The service being deployed. + example: "transaction-backend" + type: string + version: + description: The version of the deployment. Required for APM Faulty Deployment Detection rules. + example: "v1.2.3" + type: string + required: + - env + - service + type: object + DeploymentGatesEvaluationRequestData: + description: Data for a deployment gate evaluation request. + properties: + attributes: + $ref: "#/components/schemas/DeploymentGatesEvaluationRequestAttributes" + type: + $ref: "#/components/schemas/DeploymentGatesEvaluationRequestDataType" + required: + - type + - attributes + type: object + DeploymentGatesEvaluationRequestDataType: + default: deployment_gates_evaluation_request + description: JSON:API type for a deployment gate evaluation request. + enum: + - deployment_gates_evaluation_request + example: deployment_gates_evaluation_request + type: string + x-enum-varnames: + - DEPLOYMENT_GATES_EVALUATION_REQUEST + DeploymentGatesEvaluationResponse: + description: Response for a deployment gate evaluation request. + properties: + data: + $ref: "#/components/schemas/DeploymentGatesEvaluationResponseData" + type: object + DeploymentGatesEvaluationResponseAttributes: + description: Attributes for a deployment gate evaluation response. + properties: + evaluation_id: + description: The unique identifier of the gate evaluation. + example: "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9" + type: string + required: + - evaluation_id + type: object + DeploymentGatesEvaluationResponseData: + description: Data for a deployment gate evaluation response. + properties: + attributes: + $ref: "#/components/schemas/DeploymentGatesEvaluationResponseAttributes" + id: + description: The unique identifier of the evaluation response. + example: "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9" + format: uuid + type: string + type: + $ref: "#/components/schemas/DeploymentGatesEvaluationResponseDataType" + required: + - type + - attributes + - id + type: object + DeploymentGatesEvaluationResponseDataType: + default: deployment_gates_evaluation_response + description: JSON:API type for a deployment gate evaluation response. + enum: + - deployment_gates_evaluation_response + example: deployment_gates_evaluation_response + type: string + x-enum-varnames: + - DEPLOYMENT_GATES_EVALUATION_RESPONSE + DeploymentGatesEvaluationResultResponse: + description: Response containing the result of a deployment gate evaluation. + properties: + data: + $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseData" + type: object + DeploymentGatesEvaluationResultResponseAttributes: + description: Attributes for a deployment gate evaluation result response. + properties: + dry_run: + description: Whether the gate was evaluated in dry-run mode. + example: false + type: boolean + evaluation_id: + description: The unique identifier of the gate evaluation. + example: "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9" + type: string + evaluation_url: + description: A URL to view the evaluation details in the Datadog UI. + example: "https://app.datadoghq.com/ci/deployment-gates/evaluations?index=cdgates&query=level%3Agate+%40evaluation_id%3Ae9d2f04f-4f4b-494b-86e5-52f03e10c8e9" + type: string + gate_id: + description: The unique identifier of the deployment gate. + example: "e140302e-0cba-40d2-978c-6780647f8f1c" + format: uuid + type: string + gate_status: + $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseAttributesGateStatus" + rules: + description: The results of individual rule evaluations. + items: + $ref: "#/components/schemas/DeploymentGatesRuleResponse" + type: array + required: + - dry_run + - evaluation_id + - evaluation_url + - gate_id + - gate_status + - rules + type: object + DeploymentGatesEvaluationResultResponseAttributesGateStatus: + description: |- + The overall status of the gate evaluation. + - `in_progress`: The evaluation is still running. + - `pass`: All rules passed successfully and the deployment is allowed to proceed. + - `fail`: One or more rules did not pass; the deployment should not proceed. + enum: + - in_progress + - pass + - fail + example: "pass" + type: string + x-enum-varnames: + - IN_PROGRESS + - PASS + - FAIL + DeploymentGatesEvaluationResultResponseData: + description: Data for a deployment gate evaluation result response. + properties: + attributes: + $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseAttributes" + id: + description: The unique identifier of the evaluation. + example: "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9" + type: string + type: + $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseDataType" + required: + - type + - attributes + - id + type: object + DeploymentGatesEvaluationResultResponseDataType: + default: deployment_gates_evaluation_result_response + description: JSON:API type for a deployment gate evaluation result response. + enum: + - deployment_gates_evaluation_result_response + example: deployment_gates_evaluation_result_response + type: string + x-enum-varnames: + - DEPLOYMENT_GATES_EVALUATION_RESULT_RESPONSE + DeploymentGatesListResponse: + description: Response containing a paginated list of deployment gates. + properties: + data: + description: Array of deployment gates. + items: + $ref: "#/components/schemas/DeploymentGateResponseData" + type: array + meta: + $ref: "#/components/schemas/DeploymentGatesListResponseMeta" + type: object + DeploymentGatesListResponseMeta: + description: Metadata for a list of deployment gates response. + properties: + page: + $ref: "#/components/schemas/DeploymentGatesListResponseMetaPage" + type: object + DeploymentGatesListResponseMetaPage: + description: Pagination information for a list of deployment gates. + properties: + cursor: + description: The cursor used for the current page. + type: string + next_cursor: + description: The cursor to use to fetch the next page. This is absent when there are no more pages. + type: string + size: + default: 50 + description: The number of results per page. + format: int64 + maximum: 1000 + minimum: 1 + type: integer + type: object + DeploymentGatesRuleResponse: + description: The result of a single rule evaluation. + properties: + dry_run: + description: Whether this rule was evaluated in dry-run mode. + example: false + type: boolean + name: + description: The name of the rule. + example: "Check service monitors" + type: string + reason: + description: The reason for the rule result, if applicable. + example: "One or more monitors in ALERT state" + type: string + status: + $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseAttributesGateStatus" + type: object DeploymentMetadata: description: Metadata object containing the publication creation information. properties: @@ -65653,6 +65885,8 @@ components: properties: frequency: $ref: "#/components/schemas/TeamSyncAttributesFrequency" + selection_state: + $ref: "#/components/schemas/TeamSyncAttributesSelectionState" source: $ref: "#/components/schemas/TeamSyncAttributesSource" sync_membership: @@ -65675,6 +65909,14 @@ components: - ONCE - CONTINUOUSLY - PAUSED + TeamSyncAttributesSelectionState: + description: |- + Specifies which teams or organizations to sync. When + provided, synchronization is limited to the specified + items and their subtrees. + items: + $ref: "#/components/schemas/TeamSyncSelectionStateItem" + type: array TeamSyncAttributesSource: description: The external source platform for team synchronization. Only "github" is supported. enum: @@ -65684,6 +65926,7 @@ components: x-enum-varnames: - GITHUB TeamSyncAttributesSyncMembership: + default: false description: Whether to sync members from the external team to the Datadog team. Defaults to `false` when not provided. example: true type: boolean @@ -65743,6 +65986,72 @@ components: $ref: "#/components/schemas/TeamSyncData" type: array type: object + TeamSyncSelectionStateExternalId: + description: The external identifier for a team or organization in the source platform. + properties: + type: + $ref: "#/components/schemas/TeamSyncSelectionStateExternalIdType" + value: + $ref: "#/components/schemas/TeamSyncSelectionStateExternalIdValue" + required: + - type + - value + type: object + TeamSyncSelectionStateExternalIdType: + description: |- + The type of external identifier for the selection state item. + For GitHub synchronization, the allowed values are `team` and + `organization`. + enum: + - team + - organization + example: team + type: string + x-enum-varnames: + - TEAM + - ORGANIZATION + TeamSyncSelectionStateExternalIdValue: + description: |- + The external identifier value from the source + platform. For GitHub, this is the string + representation of a GitHub organization ID or team + ID. + example: "1" + type: string + TeamSyncSelectionStateItem: + description: Identifies a team or organization hierarchy to include in synchronization. + properties: + external_id: + $ref: "#/components/schemas/TeamSyncSelectionStateExternalId" + operation: + $ref: "#/components/schemas/TeamSyncSelectionStateOperation" + scope: + $ref: "#/components/schemas/TeamSyncSelectionStateScope" + required: + - external_id + type: object + TeamSyncSelectionStateOperation: + description: |- + The operation to perform on the selected hierarchy. + When set to `include`, synchronization covers the + referenced teams or organizations. + enum: + - include + example: include + type: string + x-enum-varnames: + - INCLUDE + TeamSyncSelectionStateScope: + description: |- + The scope of the selection. When set to `subtree`, + synchronization includes the referenced team or + organization and everything nested under it. + enum: + - subtree + example: subtree + type: string + x-enum-varnames: + - SUBTREE TeamTarget: description: "Represents a team target for an escalation policy step, including the team's ID and resource type." properties: @@ -79324,6 +79633,61 @@ paths: **Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/deployment_gates: + get: + description: |- + Returns a paginated list of all deployment gates for the organization. + Use `page[cursor]` and `page[size]` query parameters to paginate through results. + operationId: ListDeploymentGates + parameters: + - description: Cursor for pagination. Use the `meta.page.next_cursor` value from the previous response. + in: query + name: page[cursor] + required: false + schema: + type: string + - description: Number of results per page. Defaults to 50. Must be between 1 and 1000. + in: query + name: page[size] + required: false + schema: + default: 50 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeploymentGatesListResponse" + 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: Get all deployment gates + 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/). post: description: |- Endpoint to create a deployment gate. @@ -79762,6 +80126,106 @@ paths: 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/deployments/gates/evaluation: + post: + description: |- + Triggers an asynchronous deployment gate evaluation for the given service and environment. + Returns an evaluation ID that can be used to poll for the result via the + `GET /api/v2/deployments/gates/evaluation/{id}` endpoint. + operationId: TriggerDeploymentGatesEvaluation + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeploymentGatesEvaluationRequest" + required: true + responses: + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DeploymentGatesEvaluationResponse" + description: Accepted + "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: Trigger a deployment gate evaluation + tags: ["Deployment Gates"] + x-permission: + operator: OR + permissions: + - deployment_gates_evaluate + 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/deployments/gates/evaluation/{id}: + get: + description: |- + Retrieves the result of a deployment gate evaluation by its evaluation ID. + If the evaluation is still in progress, `data.attributes.gate_status` will be `in_progress`; + continue polling until it returns `pass` or `fail`. + Polling every 10-20 seconds is recommended. + The endpoint may return a 404 if called too soon after triggering; retry after a few seconds. + operationId: GetDeploymentGatesEvaluationResult + parameters: + - description: The evaluation ID returned by the trigger endpoint. + in: path + name: id + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponse" + 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 a deployment gate evaluation result + tags: ["Deployment Gates"] + x-permission: + operator: OR + permissions: + - deployment_gates_evaluate + 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. @@ -105047,12 +105511,6 @@ paths: description: OK "403": $ref: "#/components/responses/ForbiddenResponse" - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Team sync configurations not found "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -105069,13 +105527,17 @@ paths: - teams_read post: description: |- - This endpoint attempts to link your existing Datadog teams with GitHub teams by matching their names. + This endpoint configures synchronization between your existing Datadog teams and GitHub teams by matching their names. It evaluates all current Datadog teams and compares them against teams in the GitHub organization connected to your Datadog account, based on Datadog Team handle and GitHub Team slug (lowercased and kebab-cased). This operation is read-only on the GitHub side, no teams will be modified or created. + Optionally, provide `selection_state` to limit synchronization + to specific teams or organizations and their subtrees, instead + of syncing all teams. + [A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/), and the GitHub App integrated with Datadog must have the `Members Read` permission. Matching is performed by comparing the Datadog team handle to the GitHub team slug using a normalized exact match; case is ignored and spaces are removed. No modifications are made @@ -105090,6 +105552,8 @@ paths: responses: "200": description: OK + "204": + description: No Content "403": $ref: "#/components/responses/ForbiddenResponse" "429": diff --git a/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK-.frozen b/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK-.frozen new file mode 100644 index 000000000000..6bcfea8f1373 --- /dev/null +++ b/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK-.frozen @@ -0,0 +1 @@ +2026-03-18T20:27:29.628Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK-.yml b/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK-.yml new file mode 100644 index 000000000000..d90990f74007 --- /dev/null +++ b/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK-.yml @@ -0,0 +1,137 @@ +http_interactions: +- recorded_at: Wed, 18 Mar 2026 20:27:29 GMT + request: + body: + encoding: UTF-8 + string: '{"layout_type":"ordered","title":"Test-Send_shared_dashboard_invitation_email_returns_OK_-1773865649 + with Profile Metrics Query","widgets":[{"definition":{"requests":[{"profile_metrics_query":{"compute":{"aggregation":"sum","facet":"@prof_core_cpu_cores"},"group_by":[{"facet":"service","limit":10,"sort":{"aggregation":"sum","facet":"@prof_core_cpu_cores","order":"desc"}}],"search":{"query":"runtime:jvm"}}}],"type":"timeseries"}}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + encoding: UTF-8 + string: '{"id":"uy7-jdc-khf","title":"Test-Send_shared_dashboard_invitation_email_returns_OK_-1773865649 + with Profile Metrics Query","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI + Account","layout_type":"ordered","url":"/dashboard/uy7-jdc-khf/test-sendshareddashboardinvitationemailreturnsok-1773865649-with-profile-metrics","template_variables":null,"widgets":[{"definition":{"requests":[{"profile_metrics_query":{"compute":{"aggregation":"sum","facet":"@prof_core_cpu_cores"},"group_by":[{"facet":"service","limit":10,"sort":{"aggregation":"sum","facet":"@prof_core_cpu_cores","order":"desc"}}],"search":{"query":"runtime:jvm"}}}],"type":"timeseries"},"id":3763196530100152}],"notify_list":null,"created_at":"2026-03-18T20:27:29.720762+00:00","modified_at":"2026-03-18T20:27:29.720762+00:00","restricted_roles":[]}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 18 Mar 2026 20:27:29 GMT + request: + body: + encoding: UTF-8 + string: '{"dashboard_id":"uy7-jdc-khf","dashboard_type":"custom_timeboard","global_time":{"live_span":"1h"},"share_list":["testsendshareddashboardinvitationemailreturnsok1773865649@datadoghq.com"],"share_type":"invite"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard/public + response: + body: + encoding: UTF-8 + string: '{"author":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"dashboard_id":"uy7-jdc-khf","dashboard_type":"custom_timeboard","status":"active","title":"Test-Send_shared_dashboard_invitation_email_returns_OK_-1773865649 + with Profile Metrics Query","viewing_preferences":{},"expiration":null,"last_accessed":null,"global_time_selectable_enabled":false,"global_time":{"live_span":"1h"},"selectable_template_vars":null,"token":"fasjyydbcgwwc2uc-4801190966e7cf88b180c12b876eca65","public_url":"https://p.datadoghq.com/sb/fasjyydbcgwwc2uc-4801190966e7cf88b180c12b876eca65","created":"2026-03-18T20:27:30.223874+00:00","share_type":"invite","share_list":["team-intg-tools-libs-spam@datadoghq.com","testsendshareddashboardinvitationemailreturnsok1773865649@datadoghq.com"],"session_duration_in_days":30,"invitees":[{"email":"team-intg-tools-libs-spam@datadoghq.com","access_expiration":null,"last_accessed":null,"created_at":"2026-03-18T20:27:30.248539+00:00"},{"email":"testsendshareddashboardinvitationemailreturnsok1773865649@datadoghq.com","access_expiration":null,"last_accessed":null,"created_at":"2026-03-18T20:27:30.248539+00:00"}],"embeddable_domains":[]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 18 Mar 2026 20:27:29 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"email":"testsendshareddashboardinvitationemailreturnsok1773865649@datadoghq.com"},"type":"public_dashboard_invitation"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard/public/fasjyydbcgwwc2uc-4801190966e7cf88b180c12b876eca65/invitation + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"public_dashboard_invitation","attributes":{"email":"testsendshareddashboardinvitationemailreturnsok1773865649@datadoghq.com","share_token":"fasjyydbcgwwc2uc-4801190966e7cf88b180c12b876eca65","created_at":"2026-03-18T20:27:30.426144+00:00","invitation_expiry":"2026-03-18T21:27:30.435235+00:00","has_session":false,"session_expiry":null}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 201 + message: Created +- recorded_at: Wed, 18 Mar 2026 20:27:29 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"email":"testsendshareddashboardinvitationemailreturnsok1773865649@datadoghq.com"},"type":"public_dashboard_invitation"}}' + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/public/fasjyydbcgwwc2uc-4801190966e7cf88b180c12b876eca65/invitation + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +- recorded_at: Wed, 18 Mar 2026 20:27:29 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/public/fasjyydbcgwwc2uc-4801190966e7cf88b180c12b876eca65 + response: + body: + encoding: UTF-8 + string: '{"deleted_public_dashboard_token":"fasjyydbcgwwc2uc-4801190966e7cf88b180c12b876eca65"} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 18 Mar 2026 20:27:29 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/uy7-jdc-khf + response: + body: + encoding: UTF-8 + string: '{"deleted_dashboard_id":"uy7-jdc-khf"}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK.frozen b/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK.frozen new file mode 100644 index 000000000000..8faa22ecff97 --- /dev/null +++ b/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK.frozen @@ -0,0 +1 @@ +2026-03-19T17:48:57.466Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK.yml b/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK.yml new file mode 100644 index 000000000000..062cec5bae43 --- /dev/null +++ b/cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK.yml @@ -0,0 +1,137 @@ +http_interactions: +- recorded_at: Thu, 19 Mar 2026 17:48:57 GMT + request: + body: + encoding: UTF-8 + string: '{"layout_type":"ordered","title":"Test-Send_shared_dashboard_invitation_email_returns_OK-1773942537 + with Profile Metrics Query","widgets":[{"definition":{"requests":[{"profile_metrics_query":{"compute":{"aggregation":"sum","facet":"@prof_core_cpu_cores"},"group_by":[{"facet":"service","limit":10,"sort":{"aggregation":"sum","facet":"@prof_core_cpu_cores","order":"desc"}}],"search":{"query":"runtime:jvm"}}}],"type":"timeseries"}}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + encoding: UTF-8 + string: '{"id":"i2s-n9z-69c","title":"Test-Send_shared_dashboard_invitation_email_returns_OK-1773942537 + with Profile Metrics Query","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI + Account","layout_type":"ordered","url":"/dashboard/i2s-n9z-69c/test-sendshareddashboardinvitationemailreturnsok-1773942537-with-profile-metrics","template_variables":null,"widgets":[{"definition":{"requests":[{"profile_metrics_query":{"compute":{"aggregation":"sum","facet":"@prof_core_cpu_cores"},"group_by":[{"facet":"service","limit":10,"sort":{"aggregation":"sum","facet":"@prof_core_cpu_cores","order":"desc"}}],"search":{"query":"runtime:jvm"}}}],"type":"timeseries"},"id":3342606346172255}],"notify_list":null,"created_at":"2026-03-19T17:48:57.600536+00:00","modified_at":"2026-03-19T17:48:57.600536+00:00","restricted_roles":[]}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Thu, 19 Mar 2026 17:48:57 GMT + request: + body: + encoding: UTF-8 + string: '{"dashboard_id":"i2s-n9z-69c","dashboard_type":"custom_timeboard","global_time":{"live_span":"1h"},"share_list":["testsendshareddashboardinvitationemailreturnsok1773942537@datadoghq.com"],"share_type":"invite"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard/public + response: + body: + encoding: UTF-8 + string: '{"author":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"dashboard_id":"i2s-n9z-69c","dashboard_type":"custom_timeboard","status":"active","title":"Test-Send_shared_dashboard_invitation_email_returns_OK-1773942537 + with Profile Metrics Query","viewing_preferences":{},"expiration":null,"last_accessed":null,"global_time_selectable_enabled":false,"global_time":{"live_span":"1h"},"selectable_template_vars":null,"token":"fasjyydbcgwwc2uc-3dde636009128a6f937e880f67a0ad04","public_url":"https://p.datadoghq.com/sb/fasjyydbcgwwc2uc-3dde636009128a6f937e880f67a0ad04","created":"2026-03-19T17:48:58.113567+00:00","share_type":"invite","share_list":["team-intg-tools-libs-spam@datadoghq.com","testsendshareddashboardinvitationemailreturnsok1773942537@datadoghq.com"],"session_duration_in_days":30,"invitees":[{"email":"team-intg-tools-libs-spam@datadoghq.com","access_expiration":null,"last_accessed":null,"created_at":"2026-03-19T17:48:58.132469+00:00"},{"email":"testsendshareddashboardinvitationemailreturnsok1773942537@datadoghq.com","access_expiration":null,"last_accessed":null,"created_at":"2026-03-19T17:48:58.132469+00:00"}],"embeddable_domains":[]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Thu, 19 Mar 2026 17:48:57 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"email":"testsendshareddashboardinvitationemailreturnsok1773942537@datadoghq.com"},"type":"public_dashboard_invitation"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard/public/fasjyydbcgwwc2uc-3dde636009128a6f937e880f67a0ad04/invitation + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"public_dashboard_invitation","attributes":{"email":"testsendshareddashboardinvitationemailreturnsok1773942537@datadoghq.com","share_token":"fasjyydbcgwwc2uc-3dde636009128a6f937e880f67a0ad04","created_at":"2026-03-19T17:48:58.452715+00:00","invitation_expiry":"2026-03-19T18:48:58.463251+00:00","has_session":false,"session_expiry":null}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 201 + message: Created +- recorded_at: Thu, 19 Mar 2026 17:48:57 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"email":"testsendshareddashboardinvitationemailreturnsok1773942537@datadoghq.com"},"type":"public_dashboard_invitation"}}' + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/public/fasjyydbcgwwc2uc-3dde636009128a6f937e880f67a0ad04/invitation + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +- recorded_at: Thu, 19 Mar 2026 17:48:57 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/public/fasjyydbcgwwc2uc-3dde636009128a6f937e880f67a0ad04 + response: + body: + encoding: UTF-8 + string: '{"deleted_public_dashboard_token":"fasjyydbcgwwc2uc-3dde636009128a6f937e880f67a0ad04"} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Thu, 19 Mar 2026 17:48:57 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/i2s-n9z-69c + response: + body: + encoding: UTF-8 + string: '{"deleted_dashboard_id":"i2s-n9z-69c"}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Create-deployment-gate-returns-Bad-request-invalid-response.frozen b/cassettes/features/v2/deployment_gates/Create-deployment-gate-returns-Bad-request-invalid-response.frozen new file mode 100644 index 000000000000..d82c14f94d08 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Create-deployment-gate-returns-Bad-request-invalid-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:13.804Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Create-deployment-gate-returns-Bad-request-invalid-response.yml b/cassettes/features/v2/deployment_gates/Create-deployment-gate-returns-Bad-request-invalid-response.yml new file mode 100644 index 000000000000..9cd0f5db87c5 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Create-deployment-gate-returns-Bad-request-invalid-response.yml @@ -0,0 +1,65 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:13 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentgatereturnsbadrequestresponse1773742993","service":"my-service"},"type":"deployment_gate"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployment_gates + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2ddfb377-44de-47fe-b53c-58cf800cca1b","type":"deployment_gate","attributes":{"created_at":"2026-03-17T10:23:14.339908Z","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-testcreatedeploymentgatereturnsbadrequestresponse1773742993","service":"my-service","updated_at":"2026-03-17T10:23:14.339908Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 10:23:13 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentgatereturnsbadrequestresponse1773742993","service":"my-service"},"type":"deployment_gate"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployment_gates + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"Gate already + exists with the given env, service and identifier"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +- recorded_at: Tue, 17 Mar 2026 10:23:13 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/deployment_gates/2ddfb377-44de-47fe-b53c-58cf800cca1b + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-request-invalid-response.frozen b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-request-invalid-response.frozen new file mode 100644 index 000000000000..51145fd23164 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-request-invalid-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:14.811Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-request-invalid-response.yml b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-request-invalid-response.yml new file mode 100644 index 000000000000..b023a7540181 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-request-invalid-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:14 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false,"name":"My deployment rule","options":{"duration":3600,"excluded_resources":["resource1","resource2"]},"type":"faulty_deployment_detection"},"type":"deployment_rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployment_gates/not-a-valid-id/rules + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"gate_id\" Invalid id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Bad-request-invalid-response.frozen b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Bad-request-invalid-response.frozen new file mode 100644 index 000000000000..dd4ee3cef648 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Bad-request-invalid-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:14.936Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Bad-request-invalid-response.yml b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Bad-request-invalid-response.yml new file mode 100644 index 000000000000..e8510d40a41e --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Bad-request-invalid-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:14 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/deployment_gates/not-a-valid-id + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"id\" Invalid id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Deployment-gate-not-found-response.frozen b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Deployment-gate-not-found-response.frozen new file mode 100644 index 000000000000..a44841431669 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Deployment-gate-not-found-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:15.078Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Deployment-gate-not-found-response.yml b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Deployment-gate-not-found-response.yml new file mode 100644 index 000000000000..c22373422c31 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-Deployment-gate-not-found-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/deployment_gates/00000000-0000-0000-0000-000000000000 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"Gate does + not exist"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Bad-request-invalid-response.frozen b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Bad-request-invalid-response.frozen new file mode 100644 index 000000000000..166e7ef115f8 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Bad-request-invalid-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:15.199Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Bad-request-invalid-response.yml b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Bad-request-invalid-response.yml new file mode 100644 index 000000000000..58897fb36959 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Bad-request-invalid-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/deployment_gates/not-a-valid-id/rules/not-a-valid-id + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"gate_id\" Invalid id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Deployment-gate-not-found-response.frozen b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Deployment-gate-not-found-response.frozen new file mode 100644 index 000000000000..d7a7461d0358 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Deployment-gate-not-found-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:15.316Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Deployment-gate-not-found-response.yml b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Deployment-gate-not-found-response.yml new file mode 100644 index 000000000000..a58e5a410753 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-Deployment-gate-not-found-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/deployment_gates/00000000-0000-0000-0000-000000000000/rules/00000000-0000-0000-0000-000000000000 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"Rule does + not exist"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Bad-request-response.frozen b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Bad-request-response.frozen new file mode 100644 index 000000000000..3bd75e8166bd --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Bad-request-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:15.458Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Bad-request-response.yml b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Bad-request-response.yml new file mode 100644 index 000000000000..461053dbe919 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Bad-request-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/deployments/gates/evaluation/not-a-valid-id + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"id\" Invalid id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Deployment-gate-not-found-response.frozen b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Deployment-gate-not-found-response.frozen new file mode 100644 index 000000000000..44058d5f1dd8 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Deployment-gate-not-found-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:15.592Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Deployment-gate-not-found-response.yml b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Deployment-gate-not-found-response.yml new file mode 100644 index 000000000000..46e48a55b6d2 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-Deployment-gate-not-found-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/deployments/gates/evaluation/00000000-0000-0000-0000-000000000000 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"gate evaluation + with id 00000000-0000-0000-0000-000000000000 not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-OK-response.frozen b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-OK-response.frozen new file mode 100644 index 000000000000..b929d919bfb7 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:15.715Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-OK-response.yml b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-OK-response.yml new file mode 100644 index 000000000000..fcb2ee1ea385 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-a-deployment-gates-evaluation-result-returns-OK-response.yml @@ -0,0 +1,124 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testgetadeploymentgatesevaluationresultreturnsokresponse1773742995","service":"my-service"},"type":"deployment_gate"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployment_gates + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"7b930550-63b0-4002-8b74-4c827bd070d3","type":"deployment_gate","attributes":{"created_at":"2026-03-17T10:23:15.799742Z","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-testgetadeploymentgatesevaluationresultreturnsokresponse1773742995","service":"my-service","updated_at":"2026-03-17T10:23:15.799742Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false,"name":"My deployment rule","options":{"excluded_resources":[]},"type":"faulty_deployment_detection"},"type":"deployment_rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployment_gates/7b930550-63b0-4002-8b74-4c827bd070d3/rules + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"c2058cfd-aa63-4efc-a8fe-a37d622e7cc3","type":"deployment_rule","attributes":{"created_at":"2026-03-17T10:23:15.934037Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"7b930550-63b0-4002-8b74-4c827bd070d3","name":"My + deployment rule","options":{"excluded_resources":[]},"type":"faulty_deployment_detection","updated_at":"2026-03-17T10:23:15.934037Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"env":"production","identifier":"my-gate-testgetadeploymentgatesevaluationresultreturnsokresponse1773742995","service":"my-service"},"type":"deployment_gates_evaluation_request"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployments/gates/evaluation + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"fb1d7aef-236f-433d-ab3e-11648edb64c0","type":"deployment_gates_evaluation_response","attributes":{"evaluation_id":"fb1d7aef-236f-433d-ab3e-11648edb64c0"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 202 + message: Accepted +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/deployments/gates/evaluation/fb1d7aef-236f-433d-ab3e-11648edb64c0 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"fb1d7aef-236f-433d-ab3e-11648edb64c0","type":"deployment_gates_evaluation_result_response","attributes":{"dry_run":false,"evaluation_id":"fb1d7aef-236f-433d-ab3e-11648edb64c0","evaluation_url":"https://frog.datadoghq.com/ci/deployment-gates/evaluations?deployment_gates_source=evaluation_result_url\u0026end=1773743896343\u0026index=cdgates\u0026paused=true\u0026query=level%3Agate+%40evaluation_id%3Afb1d7aef-236f-433d-ab3e-11648edb64c0\u0026recent_gate_id=fb1d7aef-236f-433d-ab3e-11648edb64c0\u0026start=1773742096343","gate_id":"7b930550-63b0-4002-8b74-4c827bd070d3","gate_status":"in_progress","rules":[{"name":"My + deployment rule","status":"in_progress","dry_run":false}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/deployment_gates/7b930550-63b0-4002-8b74-4c827bd070d3/rules/c2058cfd-aa63-4efc-a8fe-a37d622e7cc3 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Tue, 17 Mar 2026 10:23:15 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/deployment_gates/7b930550-63b0-4002-8b74-4c827bd070d3 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Bad-request-invalid-response.frozen b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Bad-request-invalid-response.frozen new file mode 100644 index 000000000000..fd19f0667fcb --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Bad-request-invalid-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:16.714Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Bad-request-invalid-response.yml b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Bad-request-invalid-response.yml new file mode 100644 index 000000000000..55017907c3ca --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Bad-request-invalid-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:16 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/deployment_gates/not-a-valid-id + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"id\" Invalid id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Deployment-gate-not-found-response.frozen b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Deployment-gate-not-found-response.frozen new file mode 100644 index 000000000000..9e48a99314cf --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Deployment-gate-not-found-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:16.827Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Deployment-gate-not-found-response.yml b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Deployment-gate-not-found-response.yml new file mode 100644 index 000000000000..e799b0bc50ef --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-Deployment-gate-not-found-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:16 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/deployment_gates/00000000-0000-0000-0000-000000000000 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"Gate does + not exist"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-request-invalid-response.frozen b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-request-invalid-response.frozen new file mode 100644 index 000000000000..b549853588ca --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-request-invalid-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:16.977Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-request-invalid-response.yml b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-request-invalid-response.yml new file mode 100644 index 000000000000..ac32b8fc63b1 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-request-invalid-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:16 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/deployment_gates/not-a-valid-id/rules/not-a-valid-id + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"gate_id\" Invalid id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Deployment-rule-not-found-response.frozen b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Deployment-rule-not-found-response.frozen new file mode 100644 index 000000000000..015ddfda3393 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Deployment-rule-not-found-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:17.101Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Deployment-rule-not-found-response.yml b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Deployment-rule-not-found-response.yml new file mode 100644 index 000000000000..ad72d78c5f14 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Deployment-rule-not-found-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:17 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/deployment_gates/00000000-0000-0000-0000-000000000000/rules/00000000-0000-0000-0000-000000000000 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"Rule does + not exist"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Get-rules-for-a-deployment-gate-returns-Bad-request-response.frozen b/cassettes/features/v2/deployment_gates/Get-rules-for-a-deployment-gate-returns-Bad-request-response.frozen new file mode 100644 index 000000000000..bec78d5b82ef --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-rules-for-a-deployment-gate-returns-Bad-request-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:17.224Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-rules-for-a-deployment-gate-returns-Bad-request-response.yml b/cassettes/features/v2/deployment_gates/Get-rules-for-a-deployment-gate-returns-Bad-request-response.yml new file mode 100644 index 000000000000..3b5c7dc9e3de --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Get-rules-for-a-deployment-gate-returns-Bad-request-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:17 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/deployment_gates/not-a-valid-id/rules + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"gate_id\" Invalid id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Accepted-response.frozen b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Accepted-response.frozen new file mode 100644 index 000000000000..de92181ae35c --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Accepted-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:17.356Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Accepted-response.yml b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Accepted-response.yml new file mode 100644 index 000000000000..49d9a847b972 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Accepted-response.yml @@ -0,0 +1,105 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testtriggeradeploymentgatesevaluationreturnsacceptedresponse1773742997","service":"my-service"},"type":"deployment_gate"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployment_gates + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"9d4fad94-29e3-452d-817d-5bc3f0ddbcb4","type":"deployment_gate","attributes":{"created_at":"2026-03-17T10:23:17.458814Z","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-testtriggeradeploymentgatesevaluationreturnsacceptedresponse1773742997","service":"my-service","updated_at":"2026-03-17T10:23:17.458814Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 10:23:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false,"name":"My deployment rule","options":{"excluded_resources":[]},"type":"faulty_deployment_detection"},"type":"deployment_rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployment_gates/9d4fad94-29e3-452d-817d-5bc3f0ddbcb4/rules + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"891bdcc9-ae8f-4fbc-87ad-5dfb83fc447f","type":"deployment_rule","attributes":{"created_at":"2026-03-17T10:23:17.620863Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"9d4fad94-29e3-452d-817d-5bc3f0ddbcb4","name":"My + deployment rule","options":{"excluded_resources":[]},"type":"faulty_deployment_detection","updated_at":"2026-03-17T10:23:17.620863Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 10:23:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"env":"production","identifier":"my-gate-testtriggeradeploymentgatesevaluationreturnsacceptedresponse1773742997","service":"my-service"},"type":"deployment_gates_evaluation_request"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployments/gates/evaluation + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"a3d2923c-ee20-490c-bd12-7139a805c949","type":"deployment_gates_evaluation_response","attributes":{"evaluation_id":"a3d2923c-ee20-490c-bd12-7139a805c949"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 202 + message: Accepted +- recorded_at: Tue, 17 Mar 2026 10:23:17 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/deployment_gates/9d4fad94-29e3-452d-817d-5bc3f0ddbcb4/rules/891bdcc9-ae8f-4fbc-87ad-5dfb83fc447f + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Tue, 17 Mar 2026 10:23:17 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/deployment_gates/9d4fad94-29e3-452d-817d-5bc3f0ddbcb4 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Bad-request-response.frozen b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Bad-request-response.frozen new file mode 100644 index 000000000000..882a0382f0bc --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Bad-request-response.frozen @@ -0,0 +1 @@ +2026-03-20T09:57:05.683Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Bad-request-response.yml b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Bad-request-response.yml new file mode 100644 index 000000000000..a57446bc19c3 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Bad-request-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Fri, 20 Mar 2026 09:57:05 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"env":"","service":"my-service"},"type":"deployment_gates_evaluation_request"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployments/gates/evaluation + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"required + env field is missing"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Deployment-gate-not-found-response.frozen b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Deployment-gate-not-found-response.frozen new file mode 100644 index 000000000000..273be7a0789d --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Deployment-gate-not-found-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:18.627Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Deployment-gate-not-found-response.yml b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Deployment-gate-not-found-response.yml new file mode 100644 index 000000000000..37ebc606162b --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Trigger-a-deployment-gates-evaluation-returns-Deployment-gate-not-found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"env":"staging","service":"non-existent-service-xyz"},"type":"deployment_gates_evaluation_request"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/deployments/gates/evaluation + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"no gate found + for service non-existent-service-xyz, env staging, and identifier default"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Bad-request-invalid-response.frozen b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Bad-request-invalid-response.frozen new file mode 100644 index 000000000000..1b2c93460c4d --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Bad-request-invalid-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:18.738Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Bad-request-invalid-response.yml b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Bad-request-invalid-response.yml new file mode 100644 index 000000000000..4c818b37cc4e --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Bad-request-invalid-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false},"id":"12345678-1234-1234-1234-123456789012","type":"deployment_gate"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v2/deployment_gates/not-a-valid-id + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"id\" Invalid id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Deployment-gate-not-found-response.frozen b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Deployment-gate-not-found-response.frozen new file mode 100644 index 000000000000..b5a2443187a8 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Deployment-gate-not-found-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:18.854Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Deployment-gate-not-found-response.yml b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Deployment-gate-not-found-response.yml new file mode 100644 index 000000000000..ae51b82f24f0 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-Deployment-gate-not-found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false},"id":"12345678-1234-1234-1234-123456789012","type":"deployment_gate"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v2/deployment_gates/00000000-0000-0000-0000-000000000000 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"Gate does + not exist"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-request-invalid-response.frozen b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-request-invalid-response.frozen new file mode 100644 index 000000000000..a30a58dadc0d --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-request-invalid-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:18.972Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-request-invalid-response.yml b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-request-invalid-response.yml new file mode 100644 index 000000000000..9c7be3783a13 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-request-invalid-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false,"name":"Updated deployment rule","options":{"duration":3600,"excluded_resources":["resource1","resource2"]}},"type":"deployment_rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v2/deployment_gates/not-a-valid-id/rules/not-a-valid-id + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"gate_id\" Invalid id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Deployment-rule-not-found-response.frozen b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Deployment-rule-not-found-response.frozen new file mode 100644 index 000000000000..cd87ba2394c2 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Deployment-rule-not-found-response.frozen @@ -0,0 +1 @@ +2026-03-17T10:23:19.084Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Deployment-rule-not-found-response.yml b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Deployment-rule-not-found-response.yml new file mode 100644 index 000000000000..1119304f8884 --- /dev/null +++ b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Deployment-rule-not-found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 10:23:19 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"dry_run":false,"name":"Updated deployment rule","options":{"duration":3600,"excluded_resources":["resource1","resource2"]}},"type":"deployment_rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v2/deployment_gates/00000000-0000-0000-0000-000000000000/rules/00000000-0000-0000-0000-000000000000 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"Rule does + not exist"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/teams/Get-team-sync-configurations-returns-OK-response.frozen b/cassettes/features/v2/teams/Get-team-sync-configurations-returns-OK-response.frozen new file mode 100644 index 000000000000..1332175b3b7e --- /dev/null +++ b/cassettes/features/v2/teams/Get-team-sync-configurations-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-04T16:01:00.945Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Get-team-sync-configurations-returns-OK-response.yml b/cassettes/features/v2/teams/Get-team-sync-configurations-returns-OK-response.yml new file mode 100644 index 000000000000..dffc37712599 --- /dev/null +++ b/cassettes/features/v2/teams/Get-team-sync-configurations-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Wed, 04 Mar 2026 16:01:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/team/sync?filter%5Bsource%5D=github + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"3d33cc55-aea4-4801-bb75-139d347298c9","type":"team_sync_bulk","attributes":{"frequency":"once","selection_state":[{"external_id":{"type":"organization","value":"1"},"operation":"include","scope":"subtree"}],"source":"github","sync_membership":false,"type":"link"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/teams/Link-Teams-with-GitHub-Teams-returns-No-Content-response.frozen b/cassettes/features/v2/teams/Link-Teams-with-GitHub-Teams-returns-No-Content-response.frozen new file mode 100644 index 000000000000..8e230ad67176 --- /dev/null +++ b/cassettes/features/v2/teams/Link-Teams-with-GitHub-Teams-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-03-04T16:01:34.366Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Sync-teams-returns-OK-response.yml b/cassettes/features/v2/teams/Link-Teams-with-GitHub-Teams-returns-No-Content-response.yml similarity index 53% rename from cassettes/features/v2/teams/Sync-teams-returns-OK-response.yml rename to cassettes/features/v2/teams/Link-Teams-with-GitHub-Teams-returns-No-Content-response.yml index 7b14ff86a49a..4fb3e11992ca 100644 --- a/cassettes/features/v2/teams/Sync-teams-returns-OK-response.yml +++ b/cassettes/features/v2/teams/Link-Teams-with-GitHub-Teams-returns-No-Content-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 15 Aug 2025 17:48:19 GMT +- recorded_at: Wed, 04 Mar 2026 16:01:34 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"source":"github","type":"link"},"type":"team_sync_bulk"}}' + string: '{"data":{"attributes":{"selection_state":[{"external_id":{"type":"organization","value":"1"}}],"source":"github","type":"link"},"type":"team_sync_bulk"}}' headers: Accept: - '*/*' @@ -15,10 +15,8 @@ http_interactions: body: encoding: UTF-8 string: '' - headers: - Content-Type: - - text/plain + headers: {} status: - code: 200 - message: OK + code: 204 + message: No Content recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/teams/Sync-teams-returns-OK-response.frozen b/cassettes/features/v2/teams/Sync-teams-returns-OK-response.frozen deleted file mode 100644 index 8723edd4fb60..000000000000 --- a/cassettes/features/v2/teams/Sync-teams-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-15T17:48:19.712Z \ No newline at end of file diff --git a/examples/v1/dashboards/SendPublicDashboardInvitation.rb b/examples/v1/dashboards/SendPublicDashboardInvitation.rb index 19ab7c609ec7..a695f2e0d78a 100644 --- a/examples/v1/dashboards/SendPublicDashboardInvitation.rb +++ b/examples/v1/dashboards/SendPublicDashboardInvitation.rb @@ -3,15 +3,14 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V1::DashboardsAPI.new -# there is a valid "shared_dashboard" in the system -SHARED_DASHBOARD_TOKEN = ENV["SHARED_DASHBOARD_TOKEN"] - body = DatadogAPIClient::V1::SharedDashboardInvites.new({ - data: DatadogAPIClient::V1::SharedDashboardInvitesDataObject.new({ - attributes: DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes.new({ - email: "exampledashboard@datadoghq.com", + data: [ + DatadogAPIClient::V1::SharedDashboardInvitesDataObject.new({ + attributes: DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes.new({ + email: "test@datadoghq.com", + }), + type: DatadogAPIClient::V1::DashboardInviteType::PUBLIC_DASHBOARD_INVITATION, }), - type: DatadogAPIClient::V1::DashboardInviteType::PUBLIC_DASHBOARD_INVITATION, - }), + ], }) -p api_instance.send_public_dashboard_invitation(SHARED_DASHBOARD_TOKEN, body) +p api_instance.send_public_dashboard_invitation("token", body) diff --git a/examples/v1/dashboards/SendPublicDashboardInvitation_3435926116.rb b/examples/v1/dashboards/SendPublicDashboardInvitation_3435926116.rb new file mode 100644 index 000000000000..993ffab72c9a --- /dev/null +++ b/examples/v1/dashboards/SendPublicDashboardInvitation_3435926116.rb @@ -0,0 +1,17 @@ +# Send shared dashboard invitation email returns OK + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::DashboardsAPI.new + +# there is a valid "shared_dashboard" in the system +SHARED_DASHBOARD_TOKEN = ENV["SHARED_DASHBOARD_TOKEN"] + +body = DatadogAPIClient::V1::SharedDashboardInvites.new({ + data: DatadogAPIClient::V1::SharedDashboardInvitesDataObject.new({ + attributes: DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes.new({ + email: "exampledashboard@datadoghq.com", + }), + type: DatadogAPIClient::V1::DashboardInviteType::PUBLIC_DASHBOARD_INVITATION, + }), +}) +p api_instance.send_public_dashboard_invitation(SHARED_DASHBOARD_TOKEN, body) diff --git a/examples/v2/deployment-gates/GetDeploymentGatesEvaluationResult.rb b/examples/v2/deployment-gates/GetDeploymentGatesEvaluationResult.rb new file mode 100644 index 000000000000..b20fb6a18db0 --- /dev/null +++ b/examples/v2/deployment-gates/GetDeploymentGatesEvaluationResult.rb @@ -0,0 +1,8 @@ +# Get a deployment gate evaluation result returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_deployment_gates_evaluation_result".to_sym] = true +end +api_instance = DatadogAPIClient::V2::DeploymentGatesAPI.new +p api_instance.get_deployment_gates_evaluation_result("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/deployment-gates/GetDeploymentGatesEvaluationResult_3594131214.rb b/examples/v2/deployment-gates/GetDeploymentGatesEvaluationResult_3594131214.rb new file mode 100644 index 000000000000..fef3e86b245f --- /dev/null +++ b/examples/v2/deployment-gates/GetDeploymentGatesEvaluationResult_3594131214.rb @@ -0,0 +1,11 @@ +# Get a deployment gates evaluation result returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_deployment_gates_evaluation_result".to_sym] = true +end +api_instance = DatadogAPIClient::V2::DeploymentGatesAPI.new + +# there is a valid "deployment_gates_evaluation" in the system +DEPLOYMENT_GATES_EVALUATION_DATA_ID = ENV["DEPLOYMENT_GATES_EVALUATION_DATA_ID"] +p api_instance.get_deployment_gates_evaluation_result(DEPLOYMENT_GATES_EVALUATION_DATA_ID) diff --git a/examples/v2/deployment-gates/ListDeploymentGates.rb b/examples/v2/deployment-gates/ListDeploymentGates.rb new file mode 100644 index 000000000000..0a49841793d1 --- /dev/null +++ b/examples/v2/deployment-gates/ListDeploymentGates.rb @@ -0,0 +1,8 @@ +# Get all deployment gates returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_deployment_gates".to_sym] = true +end +api_instance = DatadogAPIClient::V2::DeploymentGatesAPI.new +p api_instance.list_deployment_gates() diff --git a/examples/v2/deployment-gates/TriggerDeploymentGatesEvaluation.rb b/examples/v2/deployment-gates/TriggerDeploymentGatesEvaluation.rb new file mode 100644 index 000000000000..4bbeea630832 --- /dev/null +++ b/examples/v2/deployment-gates/TriggerDeploymentGatesEvaluation.rb @@ -0,0 +1,21 @@ +# Trigger a deployment gate evaluation returns "Accepted" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.trigger_deployment_gates_evaluation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::DeploymentGatesAPI.new + +body = DatadogAPIClient::V2::DeploymentGatesEvaluationRequest.new({ + data: DatadogAPIClient::V2::DeploymentGatesEvaluationRequestData.new({ + attributes: DatadogAPIClient::V2::DeploymentGatesEvaluationRequestAttributes.new({ + env: "staging", + identifier: "pre-deploy", + primary_tag: "region:us-east-1", + service: "transaction-backend", + version: "v1.2.3", + }), + type: DatadogAPIClient::V2::DeploymentGatesEvaluationRequestDataType::DEPLOYMENT_GATES_EVALUATION_REQUEST, + }), +}) +p api_instance.trigger_deployment_gates_evaluation(body) diff --git a/examples/v2/deployment-gates/TriggerDeploymentGatesEvaluation_691804290.rb b/examples/v2/deployment-gates/TriggerDeploymentGatesEvaluation_691804290.rb new file mode 100644 index 000000000000..8a685a8a12b2 --- /dev/null +++ b/examples/v2/deployment-gates/TriggerDeploymentGatesEvaluation_691804290.rb @@ -0,0 +1,22 @@ +# Trigger a deployment gates evaluation returns "Accepted" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.trigger_deployment_gates_evaluation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::DeploymentGatesAPI.new + +# there is a valid "deployment_gate" in the system +DEPLOYMENT_GATE_DATA_ATTRIBUTES_IDENTIFIER = ENV["DEPLOYMENT_GATE_DATA_ATTRIBUTES_IDENTIFIER"] + +body = DatadogAPIClient::V2::DeploymentGatesEvaluationRequest.new({ + data: DatadogAPIClient::V2::DeploymentGatesEvaluationRequestData.new({ + attributes: DatadogAPIClient::V2::DeploymentGatesEvaluationRequestAttributes.new({ + env: "production", + identifier: DEPLOYMENT_GATE_DATA_ATTRIBUTES_IDENTIFIER, + service: "my-service", + }), + type: DatadogAPIClient::V2::DeploymentGatesEvaluationRequestDataType::DEPLOYMENT_GATES_EVALUATION_REQUEST, + }), +}) +p api_instance.trigger_deployment_gates_evaluation(body) diff --git a/examples/v2/teams/SyncTeams_3215592344.rb b/examples/v2/teams/SyncTeams_3215592344.rb deleted file mode 100644 index acb04129ae52..000000000000 --- a/examples/v2/teams/SyncTeams_3215592344.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Sync teams returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -body = DatadogAPIClient::V2::TeamSyncRequest.new({ - data: DatadogAPIClient::V2::TeamSyncData.new({ - attributes: DatadogAPIClient::V2::TeamSyncAttributes.new({ - source: DatadogAPIClient::V2::TeamSyncAttributesSource::GITHUB, - type: DatadogAPIClient::V2::TeamSyncAttributesType::LINK, - }), - type: DatadogAPIClient::V2::TeamSyncBulkType::TEAM_SYNC_BULK, - }), -}) -p api_instance.sync_teams(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 9e3ecec5538f..0950b6282d25 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2025,6 +2025,10 @@ "v2.CancelDataDeletionRequest" => { "id" => "String", }, + "v2.ListDeploymentGates" => { + "page_cursor" => "String", + "page_size" => "Integer", + }, "v2.CreateDeploymentGate" => { "body" => "CreateDeploymentGateParams", }, @@ -2058,6 +2062,12 @@ "id" => "String", "body" => "UpdateDeploymentGateParams", }, + "v2.TriggerDeploymentGatesEvaluation" => { + "body" => "DeploymentGatesEvaluationRequest", + }, + "v2.GetDeploymentGatesEvaluationResult" => { + "id" => "UUID", + }, "v2.PatchDomainAllowlist" => { "body" => "DomainAllowlistRequest", }, diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index a586f0f7ddab..0b753ac17b9a 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -1357,8 +1357,16 @@ Feature: Dashboards When the request is sent Then the response status is 404 Not Found - @team:DataDog/reporting-and-sharing + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Send shared dashboard invitation email returns "OK" response + Given new "SendPublicDashboardInvitation" request + And request contains "token" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"email": "test@datadoghq.com"}, "type": "public_dashboard_invitation"}]} + When the request is sent + Then the response status is 201 OK + + @team:DataDog/reporting-and-sharing + Scenario: Send shared dashboard invitation email returns OK Given there is a valid "dashboard" in the system And there is a valid "shared_dashboard" in the system And new "SendPublicDashboardInvitation" request @@ -1366,7 +1374,7 @@ Feature: Dashboards And body with value {"data": {"attributes": {"email": "{{unique_lower_alnum}}@datadoghq.com"}, "type": "public_dashboard_invitation"}} When the request is sent Then the response status is 201 OK - And the response "data.attributes.email" has the same value as "shared_dashboard.share_list[0]" + And the response "data.attributes.email" has the same value as "shared_dashboard.share_list[1]" And the response "data.attributes.share_token" has the same value as "shared_dashboard.token" @generated @skip @team:DataDog/dashboards-backend diff --git a/features/v2/deployment_gates.feature b/features/v2/deployment_gates.feature index cb0c5a1262d6..df9494d2aed8 100644 --- a/features/v2/deployment_gates.feature +++ b/features/v2/deployment_gates.feature @@ -79,11 +79,11 @@ Feature: Deployment Gates When the request is sent Then the response status is 400 Bad request. - @generated @skip @team:DataDog/ci-app-backend + @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" + And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Deployment gate not found. @@ -114,12 +114,12 @@ Feature: Deployment Gates When the request is sent Then the response status is 400 Bad request. - @generated @skip @team:DataDog/ci-app-backend + @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" + And request contains "gate_id" parameter with value "00000000-0000-0000-0000-000000000000" + And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Deployment gate not found. @@ -134,6 +134,64 @@ Feature: Deployment Gates When the request is sent Then the response status is 204 No Content + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get a deployment gate evaluation result returns "Bad request." response + Given operation "GetDeploymentGatesEvaluationResult" enabled + And new "GetDeploymentGatesEvaluationResult" 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 a deployment gate evaluation result returns "Deployment gate not found." response + Given operation "GetDeploymentGatesEvaluationResult" enabled + And new "GetDeploymentGatesEvaluationResult" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Deployment gate not found. + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get a deployment gate evaluation result returns "OK" response + Given operation "GetDeploymentGatesEvaluationResult" enabled + And new "GetDeploymentGatesEvaluationResult" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/ci-app-backend + Scenario: Get a deployment gates evaluation result returns "Deployment gate not found." response + Given operation "GetDeploymentGatesEvaluationResult" enabled + And new "GetDeploymentGatesEvaluationResult" request + And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Deployment gate not found. + + @team:DataDog/ci-app-backend + Scenario: Get a deployment gates evaluation result returns "OK" response + Given operation "GetDeploymentGatesEvaluationResult" enabled + And there is a valid "deployment_gate" in the system + And there is a valid "deployment_rule" in the system + And there is a valid "deployment_gates_evaluation" in the system + And new "GetDeploymentGatesEvaluationResult" request + And request contains "id" parameter from "deployment_gates_evaluation.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "deployment_gates_evaluation_result_response" + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get all deployment gates returns "Bad request." response + Given operation "ListDeploymentGates" enabled + And new "ListDeploymentGates" request + When the request is sent + Then the response status is 400 Bad request. + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get all deployment gates returns "OK" response + Given operation "ListDeploymentGates" enabled + And new "ListDeploymentGates" request + When the request is sent + Then the response status is 200 OK + @team:DataDog/ci-app-backend Scenario: Get deployment gate returns "Bad Request" response Given operation "GetDeploymentGate" enabled @@ -150,11 +208,11 @@ Feature: Deployment Gates When the request is sent Then the response status is 400 Bad request. - @generated @skip @team:DataDog/ci-app-backend + @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" + And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Deployment gate not found. @@ -187,12 +245,12 @@ Feature: Deployment Gates When the request is sent Then the response status is 400 Bad request. - @generated @skip @team:DataDog/ci-app-backend + @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" + And request contains "gate_id" parameter with value "00000000-0000-0000-0000-000000000000" + And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Deployment rule not found. @@ -207,11 +265,11 @@ Feature: Deployment Gates When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/ci-app-backend + @team:DataDog/ci-app-backend Scenario: Get rules for a deployment gate returns "Bad request." response Given operation "GetDeploymentGateRules" enabled And new "GetDeploymentGateRules" request - And request contains "gate_id" parameter from "REPLACE.ME" + And request contains "gate_id" parameter with value "not-a-valid-id" When the request is sent Then the response status is 400 Bad request. @@ -224,6 +282,57 @@ Feature: Deployment Gates When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ci-app-backend + Scenario: Trigger a deployment gate evaluation returns "Accepted" response + Given operation "TriggerDeploymentGatesEvaluation" enabled + And new "TriggerDeploymentGatesEvaluation" request + And body with value {"data": {"attributes": {"env": "staging", "identifier": "pre-deploy", "primary_tag": "region:us-east-1", "service": "transaction-backend", "version": "v1.2.3"}, "type": "deployment_gates_evaluation_request"}} + When the request is sent + Then the response status is 202 Accepted + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Trigger a deployment gate evaluation returns "Bad request." response + Given operation "TriggerDeploymentGatesEvaluation" enabled + And new "TriggerDeploymentGatesEvaluation" request + And body with value {"data": {"attributes": {"env": "staging", "identifier": "pre-deploy", "primary_tag": "region:us-east-1", "service": "transaction-backend", "version": "v1.2.3"}, "type": "deployment_gates_evaluation_request"}} + When the request is sent + Then the response status is 400 Bad request. + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Trigger a deployment gate evaluation returns "Deployment gate not found." response + Given operation "TriggerDeploymentGatesEvaluation" enabled + And new "TriggerDeploymentGatesEvaluation" request + And body with value {"data": {"attributes": {"env": "staging", "identifier": "pre-deploy", "primary_tag": "region:us-east-1", "service": "transaction-backend", "version": "v1.2.3"}, "type": "deployment_gates_evaluation_request"}} + When the request is sent + Then the response status is 404 Deployment gate not found. + + @team:DataDog/ci-app-backend + Scenario: Trigger a deployment gates evaluation returns "Accepted" response + Given operation "TriggerDeploymentGatesEvaluation" enabled + And there is a valid "deployment_gate" in the system + And there is a valid "deployment_rule" in the system + And new "TriggerDeploymentGatesEvaluation" request + And body with value {"data": {"attributes": {"env": "production", "identifier": "{{ deployment_gate.data.attributes.identifier }}", "service": "my-service"}, "type": "deployment_gates_evaluation_request"}} + When the request is sent + Then the response status is 202 Accepted + And the response "data.type" is equal to "deployment_gates_evaluation_response" + + @team:DataDog/ci-app-backend + Scenario: Trigger a deployment gates evaluation returns "Bad request." response + Given operation "TriggerDeploymentGatesEvaluation" enabled + And new "TriggerDeploymentGatesEvaluation" request + And body with value {"data": {"attributes": {"env": "", "service": "my-service"}, "type": "deployment_gates_evaluation_request"}} + When the request is sent + Then the response status is 400 Bad request. + + @team:DataDog/ci-app-backend + Scenario: Trigger a deployment gates evaluation returns "Deployment gate not found." response + Given operation "TriggerDeploymentGatesEvaluation" enabled + And new "TriggerDeploymentGatesEvaluation" request + And body with value {"data": {"attributes": {"env": "staging", "service": "non-existent-service-xyz"}, "type": "deployment_gates_evaluation_request"}} + 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 "Bad Request" response Given operation "UpdateDeploymentGate" enabled @@ -242,11 +351,11 @@ Feature: Deployment Gates When the request is sent Then the response status is 400 Bad request. - @generated @skip @team:DataDog/ci-app-backend + @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 request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" 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. @@ -283,12 +392,12 @@ Feature: Deployment Gates When the request is sent Then the response status is 400 Bad request. - @generated @skip @team:DataDog/ci-app-backend + @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 request contains "gate_id" parameter with value "00000000-0000-0000-0000-000000000000" + And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" 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. diff --git a/features/v2/given.json b/features/v2/given.json index 61c0b7da7457..2fee80e2ff9e 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -404,6 +404,18 @@ "tag": "Deployment Gates", "operationId": "CreateDeploymentRule" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"deployment_gates_evaluation_request\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"{{ deployment_gate.data.attributes.identifier }}\"\n }\n }\n}" + } + ], + "step": "there is a valid \"deployment_gates_evaluation\" in the system", + "key": "deployment_gates_evaluation", + "tag": "Deployment Gates", + "operationId": "TriggerDeploymentGatesEvaluation" + }, { "parameters": [ { diff --git a/features/v2/teams.feature b/features/v2/teams.feature index 26bf0130d4e9..480e3215e994 100644 --- a/features/v2/teams.feature +++ b/features/v2/teams.feature @@ -431,20 +431,13 @@ Feature: Teams Then the response status is 200 OK And the response "data" has length 1 - @generated @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Get team sync configurations returns "OK" response Given new "GetTeamSync" request - And request contains "filter[source]" parameter from "REPLACE.ME" + And request contains "filter[source]" parameter with value "github" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/aaa-omg - Scenario: Get team sync configurations returns "Team sync configurations not found" response - Given new "GetTeamSync" request - And request contains "filter[source]" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Team sync configurations not found - @generated @skip @team:DataDog/aaa-omg Scenario: Get user memberships returns "API error response." response Given new "GetUserMemberships" request @@ -461,6 +454,13 @@ Feature: Teams Then the response status is 200 Represents a user's association to a team And the response "data" has length 0 + @team:DataDog/aaa-omg + Scenario: Link Teams with GitHub Teams returns "No Content" response + Given new "SyncTeams" request + And body with value {"data": {"attributes": {"source": "github", "type": "link", "selection_state": [{"external_id": {"type": "organization", "value": "1"}}]}, "type": "team_sync_bulk"}} + When the request is sent + Then the response status is 204 No Content + @generated @skip @team:DataDog/aaa-omg Scenario: Link Teams with GitHub Teams returns "OK" response Given new "SyncTeams" request @@ -582,13 +582,6 @@ Feature: Teams When the request is sent Then the response status is 204 No Content - @replay-only @team:DataDog/aaa-omg - Scenario: Sync teams returns "OK" response - Given new "SyncTeams" request - And body with value {"data": {"attributes": {"source": "github", "type": "link"}, "type": "team_sync_bulk"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/aaa-omg Scenario: Update a team link returns "API error response." response Given new "UpdateTeamLink" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 28ebe49741d0..405cf8c8f2b2 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1514,6 +1514,12 @@ "type": "idempotent" } }, + "ListDeploymentGates": { + "tag": "Deployment Gates", + "undo": { + "type": "safe" + } + }, "CreateDeploymentGate": { "tag": "Deployment Gates", "undo": { @@ -1586,6 +1592,18 @@ "type": "idempotent" } }, + "TriggerDeploymentGatesEvaluation": { + "tag": "Deployment Gates", + "undo": { + "type": "safe" + } + }, + "GetDeploymentGatesEvaluationResult": { + "tag": "Deployment Gates", + "undo": { + "type": "safe" + } + }, "GetDomainAllowlist": { "tag": "Domain Allowlist", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 81b467f8be00..3a8f242f0e9d 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -263,7 +263,10 @@ def initialize "v2.delete_deployment_rule": false, "v2.get_deployment_gate": false, "v2.get_deployment_gate_rules": false, + "v2.get_deployment_gates_evaluation_result": false, "v2.get_deployment_rule": false, + "v2.list_deployment_gates": false, + "v2.trigger_deployment_gates_evaluation": false, "v2.update_deployment_gate": false, "v2.update_deployment_rule": false, "v2.create_hamr_org_connection": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 6e305cbd67e7..5d076936bdf6 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2204,6 +2204,23 @@ def overrides "v2.deployment_gate_response_data_attributes_created_by" => "DeploymentGateResponseDataAttributesCreatedBy", "v2.deployment_gate_response_data_attributes_updated_by" => "DeploymentGateResponseDataAttributesUpdatedBy", "v2.deployment_gate_rules_response" => "DeploymentGateRulesResponse", + "v2.deployment_gates_evaluation_request" => "DeploymentGatesEvaluationRequest", + "v2.deployment_gates_evaluation_request_attributes" => "DeploymentGatesEvaluationRequestAttributes", + "v2.deployment_gates_evaluation_request_data" => "DeploymentGatesEvaluationRequestData", + "v2.deployment_gates_evaluation_request_data_type" => "DeploymentGatesEvaluationRequestDataType", + "v2.deployment_gates_evaluation_response" => "DeploymentGatesEvaluationResponse", + "v2.deployment_gates_evaluation_response_attributes" => "DeploymentGatesEvaluationResponseAttributes", + "v2.deployment_gates_evaluation_response_data" => "DeploymentGatesEvaluationResponseData", + "v2.deployment_gates_evaluation_response_data_type" => "DeploymentGatesEvaluationResponseDataType", + "v2.deployment_gates_evaluation_result_response" => "DeploymentGatesEvaluationResultResponse", + "v2.deployment_gates_evaluation_result_response_attributes" => "DeploymentGatesEvaluationResultResponseAttributes", + "v2.deployment_gates_evaluation_result_response_attributes_gate_status" => "DeploymentGatesEvaluationResultResponseAttributesGateStatus", + "v2.deployment_gates_evaluation_result_response_data" => "DeploymentGatesEvaluationResultResponseData", + "v2.deployment_gates_evaluation_result_response_data_type" => "DeploymentGatesEvaluationResultResponseDataType", + "v2.deployment_gates_list_response" => "DeploymentGatesListResponse", + "v2.deployment_gates_list_response_meta" => "DeploymentGatesListResponseMeta", + "v2.deployment_gates_list_response_meta_page" => "DeploymentGatesListResponseMetaPage", + "v2.deployment_gates_rule_response" => "DeploymentGatesRuleResponse", "v2.deployment_metadata" => "DeploymentMetadata", "v2.deployment_relationship" => "DeploymentRelationship", "v2.deployment_relationship_data" => "DeploymentRelationshipData", @@ -5326,6 +5343,11 @@ def overrides "v2.team_sync_data" => "TeamSyncData", "v2.team_sync_request" => "TeamSyncRequest", "v2.team_sync_response" => "TeamSyncResponse", + "v2.team_sync_selection_state_external_id" => "TeamSyncSelectionStateExternalId", + "v2.team_sync_selection_state_external_id_type" => "TeamSyncSelectionStateExternalIdType", + "v2.team_sync_selection_state_item" => "TeamSyncSelectionStateItem", + "v2.team_sync_selection_state_operation" => "TeamSyncSelectionStateOperation", + "v2.team_sync_selection_state_scope" => "TeamSyncSelectionStateScope", "v2.team_target" => "TeamTarget", "v2.team_target_type" => "TeamTargetType", "v2.team_type" => "TeamType", diff --git a/lib/datadog_api_client/v2/api/deployment_gates_api.rb b/lib/datadog_api_client/v2/api/deployment_gates_api.rb index e81fc32f44b7..ac38e2e41c71 100644 --- a/lib/datadog_api_client/v2/api/deployment_gates_api.rb +++ b/lib/datadog_api_client/v2/api/deployment_gates_api.rb @@ -463,6 +463,81 @@ def get_deployment_gate_rules_with_http_info(gate_id, opts = {}) return data, status_code, headers end + # Get a deployment gate evaluation result. + # + # @see #get_deployment_gates_evaluation_result_with_http_info + def get_deployment_gates_evaluation_result(id, opts = {}) + data, _status_code, _headers = get_deployment_gates_evaluation_result_with_http_info(id, opts) + data + end + + # Get a deployment gate evaluation result. + # + # Retrieves the result of a deployment gate evaluation by its evaluation ID. + # If the evaluation is still in progress, `data.attributes.gate_status` will be `in_progress`; + # continue polling until it returns `pass` or `fail`. + # Polling every 10-20 seconds is recommended. + # The endpoint may return a 404 if called too soon after triggering; retry after a few seconds. + # + # @param id [UUID] The evaluation ID returned by the trigger endpoint. + # @param opts [Hash] the optional parameters + # @return [Array<(DeploymentGatesEvaluationResultResponse, Integer, Hash)>] DeploymentGatesEvaluationResultResponse data, response status code and response headers + def get_deployment_gates_evaluation_result_with_http_info(id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_deployment_gates_evaluation_result".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_deployment_gates_evaluation_result") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_deployment_gates_evaluation_result")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.get_deployment_gates_evaluation_result ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.get_deployment_gates_evaluation_result" + end + # resource path + local_var_path = '/api/v2/deployments/gates/evaluation/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DeploymentGatesEvaluationResultResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_deployment_gates_evaluation_result, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DeploymentGatesAPI#get_deployment_gates_evaluation_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get deployment rule. # # @see #get_deployment_rule_with_http_info @@ -539,6 +614,158 @@ def get_deployment_rule_with_http_info(gate_id, id, opts = {}) return data, status_code, headers end + # Get all deployment gates. + # + # @see #list_deployment_gates_with_http_info + def list_deployment_gates(opts = {}) + data, _status_code, _headers = list_deployment_gates_with_http_info(opts) + data + end + + # Get all deployment gates. + # + # Returns a paginated list of all deployment gates for the organization. + # Use `page[cursor]` and `page[size]` query parameters to paginate through results. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :page_cursor Cursor for pagination. Use the `meta.page.next_cursor` value from the previous response. + # @option opts [Integer] :page_size Number of results per page. Defaults to 50. Must be between 1 and 1000. + # @return [Array<(DeploymentGatesListResponse, Integer, Hash)>] DeploymentGatesListResponse data, response status code and response headers + def list_deployment_gates_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_deployment_gates".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_deployment_gates") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_deployment_gates")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.list_deployment_gates ...' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling DeploymentGatesAPI.list_deployment_gates, must be smaller than or equal to 1000.' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling DeploymentGatesAPI.list_deployment_gates, must be greater than or equal to 1.' + end + # resource path + local_var_path = '/api/v2/deployment_gates' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DeploymentGatesListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_deployment_gates, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DeploymentGatesAPI#list_deployment_gates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Trigger a deployment gate evaluation. + # + # @see #trigger_deployment_gates_evaluation_with_http_info + def trigger_deployment_gates_evaluation(body, opts = {}) + data, _status_code, _headers = trigger_deployment_gates_evaluation_with_http_info(body, opts) + data + end + + # Trigger a deployment gate evaluation. + # + # Triggers an asynchronous deployment gate evaluation for the given service and environment. + # Returns an evaluation ID that can be used to poll for the result via the + # `GET /api/v2/deployments/gates/evaluation/{id}` endpoint. + # + # @param body [DeploymentGatesEvaluationRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(DeploymentGatesEvaluationResponse, Integer, Hash)>] DeploymentGatesEvaluationResponse data, response status code and response headers + def trigger_deployment_gates_evaluation_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.trigger_deployment_gates_evaluation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.trigger_deployment_gates_evaluation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.trigger_deployment_gates_evaluation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.trigger_deployment_gates_evaluation ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.trigger_deployment_gates_evaluation" + end + # resource path + local_var_path = '/api/v2/deployments/gates/evaluation' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'DeploymentGatesEvaluationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :trigger_deployment_gates_evaluation, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DeploymentGatesAPI#trigger_deployment_gates_evaluation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update deployment gate. # # @see #update_deployment_gate_with_http_info diff --git a/lib/datadog_api_client/v2/api/teams_api.rb b/lib/datadog_api_client/v2/api/teams_api.rb index 5e6e724b8bee..702dba4a46ac 100644 --- a/lib/datadog_api_client/v2/api/teams_api.rb +++ b/lib/datadog_api_client/v2/api/teams_api.rb @@ -2107,13 +2107,17 @@ def sync_teams(body, opts = {}) # Link Teams with GitHub Teams. # - # This endpoint attempts to link your existing Datadog teams with GitHub teams by matching their names. + # This endpoint configures synchronization between your existing Datadog teams and GitHub teams by matching their names. # It evaluates all current Datadog teams and compares them against teams in the GitHub organization # connected to your Datadog account, based on Datadog Team handle and GitHub Team slug # (lowercased and kebab-cased). # # This operation is read-only on the GitHub side, no teams will be modified or created. # + # Optionally, provide `selection_state` to limit synchronization + # to specific teams or organizations and their subtrees, instead + # of syncing all teams. + # # [A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/), # and the GitHub App integrated with Datadog must have the `Members Read` permission. Matching is performed by comparing the Datadog team handle to the GitHub team slug # using a normalized exact match; case is ignored and spaces are removed. No modifications are made diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request.rb new file mode 100644 index 000000000000..b0a575bf3ed3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request body for triggering a deployment gate evaluation. + class DeploymentGatesEvaluationRequest + include BaseGenericModel + + # Data for a deployment gate evaluation request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DeploymentGatesEvaluationRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesEvaluationRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request_attributes.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request_attributes.rb new file mode 100644 index 000000000000..b333e8677916 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request_attributes.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for a deployment gate evaluation request. + class DeploymentGatesEvaluationRequestAttributes + include BaseGenericModel + + # The environment of the deployment. + attr_reader :env + + # The identifier of the deployment gate. Defaults to "default". + attr_accessor :identifier + + # A primary tag to scope APM Faulty Deployment Detection rules. + attr_accessor :primary_tag + + # The service being deployed. + attr_reader :service + + # The version of the deployment. Required for APM Faulty Deployment Detection rules. + attr_accessor :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'env' => :'env', + :'identifier' => :'identifier', + :'primary_tag' => :'primary_tag', + :'service' => :'service', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'env' => :'String', + :'identifier' => :'String', + :'primary_tag' => :'String', + :'service' => :'String', + :'version' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesEvaluationRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'env') + self.env = attributes[:'env'] + end + + if attributes.key?(:'identifier') + self.identifier = attributes[:'identifier'] + end + + if attributes.key?(:'primary_tag') + self.primary_tag = attributes[:'primary_tag'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @env.nil? + return false if @service.nil? + true + end + + # Custom attribute writer method with validation + # @param env [Object] Object to be assigned + # @!visibility private + def env=(env) + if env.nil? + fail ArgumentError, 'invalid value for "env", env cannot be nil.' + end + @env = env + end + + # Custom attribute writer method with validation + # @param service [Object] Object to be assigned + # @!visibility private + def service=(service) + if service.nil? + fail ArgumentError, 'invalid value for "service", service cannot be nil.' + end + @service = service + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + env == o.env && + identifier == o.identifier && + primary_tag == o.primary_tag && + service == o.service && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [env, identifier, primary_tag, service, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request_data.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request_data.rb new file mode 100644 index 000000000000..233fc3df9525 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for a deployment gate evaluation request. + class DeploymentGatesEvaluationRequestData + include BaseGenericModel + + # Attributes for a deployment gate evaluation request. + attr_reader :attributes + + # JSON:API type for a deployment gate evaluation request. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DeploymentGatesEvaluationRequestAttributes', + :'type' => :'DeploymentGatesEvaluationRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesEvaluationRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request_data_type.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request_data_type.rb new file mode 100644 index 000000000000..04a616ad58f7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_request_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON:API type for a deployment gate evaluation request. + class DeploymentGatesEvaluationRequestDataType + include BaseEnumModel + + DEPLOYMENT_GATES_EVALUATION_REQUEST = "deployment_gates_evaluation_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response.rb new file mode 100644 index 000000000000..8ea2fcf180d2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response for a deployment gate evaluation request. + class DeploymentGatesEvaluationResponse + include BaseGenericModel + + # Data for a deployment gate evaluation response. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DeploymentGatesEvaluationResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesEvaluationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response_attributes.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response_attributes.rb new file mode 100644 index 000000000000..ca33893b60d8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response_attributes.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for a deployment gate evaluation response. + class DeploymentGatesEvaluationResponseAttributes + include BaseGenericModel + + # The unique identifier of the gate evaluation. + attr_reader :evaluation_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'evaluation_id' => :'evaluation_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'evaluation_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesEvaluationResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'evaluation_id') + self.evaluation_id = attributes[:'evaluation_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @evaluation_id.nil? + true + end + + # Custom attribute writer method with validation + # @param evaluation_id [Object] Object to be assigned + # @!visibility private + def evaluation_id=(evaluation_id) + if evaluation_id.nil? + fail ArgumentError, 'invalid value for "evaluation_id", evaluation_id cannot be nil.' + end + @evaluation_id = evaluation_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + evaluation_id == o.evaluation_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [evaluation_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response_data.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response_data.rb new file mode 100644 index 000000000000..03e4ebc6a4e7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for a deployment gate evaluation response. + class DeploymentGatesEvaluationResponseData + include BaseGenericModel + + # Attributes for a deployment gate evaluation response. + attr_reader :attributes + + # The unique identifier of the evaluation response. + attr_reader :id + + # JSON:API type for a deployment gate evaluation response. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DeploymentGatesEvaluationResponseAttributes', + :'id' => :'UUID', + :'type' => :'DeploymentGatesEvaluationResponseDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesEvaluationResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response_data_type.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response_data_type.rb new file mode 100644 index 000000000000..60868cddbc43 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_response_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON:API type for a deployment gate evaluation response. + class DeploymentGatesEvaluationResponseDataType + include BaseEnumModel + + DEPLOYMENT_GATES_EVALUATION_RESPONSE = "deployment_gates_evaluation_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response.rb new file mode 100644 index 000000000000..23b8054d45cd --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing the result of a deployment gate evaluation. + class DeploymentGatesEvaluationResultResponse + include BaseGenericModel + + # Data for a deployment gate evaluation result response. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DeploymentGatesEvaluationResultResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesEvaluationResultResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_attributes.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_attributes.rb new file mode 100644 index 000000000000..ebf9a07b4f02 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_attributes.rb @@ -0,0 +1,233 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for a deployment gate evaluation result response. + class DeploymentGatesEvaluationResultResponseAttributes + include BaseGenericModel + + # Whether the gate was evaluated in dry-run mode. + attr_reader :dry_run + + # The unique identifier of the gate evaluation. + attr_reader :evaluation_id + + # A URL to view the evaluation details in the Datadog UI. + attr_reader :evaluation_url + + # The unique identifier of the deployment gate. + attr_reader :gate_id + + # The overall status of the gate evaluation. + # - `in_progress`: The evaluation is still running. + # - `pass`: All rules passed successfully and the deployment is allowed to proceed. + # - `fail`: One or more rules did not pass; the deployment should not proceed. + attr_reader :gate_status + + # The results of individual rule evaluations. + attr_reader :rules + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dry_run' => :'dry_run', + :'evaluation_id' => :'evaluation_id', + :'evaluation_url' => :'evaluation_url', + :'gate_id' => :'gate_id', + :'gate_status' => :'gate_status', + :'rules' => :'rules' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dry_run' => :'Boolean', + :'evaluation_id' => :'String', + :'evaluation_url' => :'String', + :'gate_id' => :'UUID', + :'gate_status' => :'DeploymentGatesEvaluationResultResponseAttributesGateStatus', + :'rules' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesEvaluationResultResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'dry_run') + self.dry_run = attributes[:'dry_run'] + end + + if attributes.key?(:'evaluation_id') + self.evaluation_id = attributes[:'evaluation_id'] + end + + if attributes.key?(:'evaluation_url') + self.evaluation_url = attributes[:'evaluation_url'] + end + + if attributes.key?(:'gate_id') + self.gate_id = attributes[:'gate_id'] + end + + if attributes.key?(:'gate_status') + self.gate_status = attributes[:'gate_status'] + end + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @dry_run.nil? + return false if @evaluation_id.nil? + return false if @evaluation_url.nil? + return false if @gate_id.nil? + return false if @gate_status.nil? + return false if @rules.nil? + true + end + + # Custom attribute writer method with validation + # @param dry_run [Object] Object to be assigned + # @!visibility private + def dry_run=(dry_run) + if dry_run.nil? + fail ArgumentError, 'invalid value for "dry_run", dry_run cannot be nil.' + end + @dry_run = dry_run + end + + # Custom attribute writer method with validation + # @param evaluation_id [Object] Object to be assigned + # @!visibility private + def evaluation_id=(evaluation_id) + if evaluation_id.nil? + fail ArgumentError, 'invalid value for "evaluation_id", evaluation_id cannot be nil.' + end + @evaluation_id = evaluation_id + end + + # Custom attribute writer method with validation + # @param evaluation_url [Object] Object to be assigned + # @!visibility private + def evaluation_url=(evaluation_url) + if evaluation_url.nil? + fail ArgumentError, 'invalid value for "evaluation_url", evaluation_url cannot be nil.' + end + @evaluation_url = evaluation_url + end + + # Custom attribute writer method with validation + # @param gate_id [Object] Object to be assigned + # @!visibility private + def gate_id=(gate_id) + if gate_id.nil? + fail ArgumentError, 'invalid value for "gate_id", gate_id cannot be nil.' + end + @gate_id = gate_id + end + + # Custom attribute writer method with validation + # @param gate_status [Object] Object to be assigned + # @!visibility private + def gate_status=(gate_status) + if gate_status.nil? + fail ArgumentError, 'invalid value for "gate_status", gate_status cannot be nil.' + end + @gate_status = gate_status + end + + # Custom attribute writer method with validation + # @param rules [Object] Object to be assigned + # @!visibility private + def rules=(rules) + if rules.nil? + fail ArgumentError, 'invalid value for "rules", rules cannot be nil.' + end + @rules = rules + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + dry_run == o.dry_run && + evaluation_id == o.evaluation_id && + evaluation_url == o.evaluation_url && + gate_id == o.gate_id && + gate_status == o.gate_status && + rules == o.rules && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dry_run, evaluation_id, evaluation_url, gate_id, gate_status, rules, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_attributes_gate_status.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_attributes_gate_status.rb new file mode 100644 index 000000000000..67235708d8d3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_attributes_gate_status.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The overall status of the gate evaluation. + # - `in_progress`: The evaluation is still running. + # - `pass`: All rules passed successfully and the deployment is allowed to proceed. + # - `fail`: One or more rules did not pass; the deployment should not proceed. + class DeploymentGatesEvaluationResultResponseAttributesGateStatus + include BaseEnumModel + + IN_PROGRESS = "in_progress".freeze + PASS = "pass".freeze + FAIL = "fail".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_data.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_data.rb new file mode 100644 index 000000000000..f1cc60dbe3ab --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for a deployment gate evaluation result response. + class DeploymentGatesEvaluationResultResponseData + include BaseGenericModel + + # Attributes for a deployment gate evaluation result response. + attr_reader :attributes + + # The unique identifier of the evaluation. + attr_reader :id + + # JSON:API type for a deployment gate evaluation result response. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DeploymentGatesEvaluationResultResponseAttributes', + :'id' => :'String', + :'type' => :'DeploymentGatesEvaluationResultResponseDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesEvaluationResultResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_data_type.rb b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_data_type.rb new file mode 100644 index 000000000000..9e9389a784ff --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_evaluation_result_response_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON:API type for a deployment gate evaluation result response. + class DeploymentGatesEvaluationResultResponseDataType + include BaseEnumModel + + DEPLOYMENT_GATES_EVALUATION_RESULT_RESPONSE = "deployment_gates_evaluation_result_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_list_response.rb b/lib/datadog_api_client/v2/models/deployment_gates_list_response.rb new file mode 100644 index 000000000000..90baee6fc753 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_list_response.rb @@ -0,0 +1,117 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a paginated list of deployment gates. + class DeploymentGatesListResponse + include BaseGenericModel + + # Array of deployment gates. + attr_accessor :data + + # Metadata for a list of deployment gates response. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'DeploymentGatesListResponseMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesListResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_list_response_meta.rb b/lib/datadog_api_client/v2/models/deployment_gates_list_response_meta.rb new file mode 100644 index 000000000000..f79f184243b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_list_response_meta.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Metadata for a list of deployment gates response. + class DeploymentGatesListResponseMeta + include BaseGenericModel + + # Pagination information for a list of deployment gates. + attr_accessor :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'DeploymentGatesListResponseMetaPage' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesListResponseMeta` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'page') + self.page = attributes[:'page'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_list_response_meta_page.rb b/lib/datadog_api_client/v2/models/deployment_gates_list_response_meta_page.rb new file mode 100644 index 000000000000..5f9e66555b25 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_list_response_meta_page.rb @@ -0,0 +1,147 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Pagination information for a list of deployment gates. + class DeploymentGatesListResponseMetaPage + include BaseGenericModel + + # The cursor used for the current page. + attr_accessor :cursor + + # The cursor to use to fetch the next page. This is absent when there are no more pages. + attr_accessor :next_cursor + + # The number of results per page. + attr_reader :size + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cursor' => :'cursor', + :'next_cursor' => :'next_cursor', + :'size' => :'size' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cursor' => :'String', + :'next_cursor' => :'String', + :'size' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesListResponseMetaPage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@size.nil? && @size > 1000 + return false if !@size.nil? && @size < 1 + true + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned + # @!visibility private + def size=(size) + if !size.nil? && size > 1000 + fail ArgumentError, 'invalid value for "size", must be smaller than or equal to 1000.' + end + if !size.nil? && size < 1 + fail ArgumentError, 'invalid value for "size", must be greater than or equal to 1.' + end + @size = size + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cursor == o.cursor && + next_cursor == o.next_cursor && + size == o.size && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cursor, next_cursor, size, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/deployment_gates_rule_response.rb b/lib/datadog_api_client/v2/models/deployment_gates_rule_response.rb new file mode 100644 index 000000000000..9afeac7895e1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/deployment_gates_rule_response.rb @@ -0,0 +1,138 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The result of a single rule evaluation. + class DeploymentGatesRuleResponse + include BaseGenericModel + + # Whether this rule was evaluated in dry-run mode. + attr_accessor :dry_run + + # The name of the rule. + attr_accessor :name + + # The reason for the rule result, if applicable. + attr_accessor :reason + + # The overall status of the gate evaluation. + # - `in_progress`: The evaluation is still running. + # - `pass`: All rules passed successfully and the deployment is allowed to proceed. + # - `fail`: One or more rules did not pass; the deployment should not proceed. + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dry_run' => :'dry_run', + :'name' => :'name', + :'reason' => :'reason', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dry_run' => :'Boolean', + :'name' => :'String', + :'reason' => :'String', + :'status' => :'DeploymentGatesEvaluationResultResponseAttributesGateStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeploymentGatesRuleResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'dry_run') + self.dry_run = attributes[:'dry_run'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + dry_run == o.dry_run && + name == o.name && + reason == o.reason && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dry_run, name, reason, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/team_sync_attributes.rb b/lib/datadog_api_client/v2/models/team_sync_attributes.rb index 4982b6046b61..6613d2030dcc 100644 --- a/lib/datadog_api_client/v2/models/team_sync_attributes.rb +++ b/lib/datadog_api_client/v2/models/team_sync_attributes.rb @@ -24,6 +24,11 @@ class TeamSyncAttributes # How often the sync process should be run. Defaults to `once` when not provided. attr_accessor :frequency + # Specifies which teams or organizations to sync. When + # provided, synchronization is limited to the specified + # items and their subtrees. + attr_accessor :selection_state + # The external source platform for team synchronization. Only "github" is supported. attr_reader :source @@ -40,6 +45,7 @@ class TeamSyncAttributes def self.attribute_map { :'frequency' => :'frequency', + :'selection_state' => :'selection_state', :'source' => :'source', :'sync_membership' => :'sync_membership', :'type' => :'type' @@ -51,6 +57,7 @@ def self.attribute_map def self.openapi_types { :'frequency' => :'TeamSyncAttributesFrequency', + :'selection_state' => :'Array', :'source' => :'TeamSyncAttributesSource', :'sync_membership' => :'Boolean', :'type' => :'TeamSyncAttributesType' @@ -79,6 +86,12 @@ def initialize(attributes = {}) self.frequency = attributes[:'frequency'] end + if attributes.key?(:'selection_state') + if (value = attributes[:'selection_state']).is_a?(Array) + self.selection_state = value + end + end + if attributes.key?(:'source') self.source = attributes[:'source'] end @@ -148,6 +161,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && frequency == o.frequency && + selection_state == o.selection_state && source == o.source && sync_membership == o.sync_membership && type == o.type && @@ -158,7 +172,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [frequency, source, sync_membership, type, additional_properties].hash + [frequency, selection_state, source, sync_membership, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/team_sync_selection_state_external_id.rb b/lib/datadog_api_client/v2/models/team_sync_selection_state_external_id.rb new file mode 100644 index 000000000000..5c742bc16f95 --- /dev/null +++ b/lib/datadog_api_client/v2/models/team_sync_selection_state_external_id.rb @@ -0,0 +1,149 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The external identifier for a team or organization in the source platform. + class TeamSyncSelectionStateExternalId + include BaseGenericModel + + # The type of external identifier for the selection state item. + # For GitHub synchronization, the allowed values are `team` and + # `organization`. + attr_reader :type + + # The external identifier value from the source + # platform. For GitHub, this is the string + # representation of a GitHub organization ID or team + # ID. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'type' => :'TeamSyncSelectionStateExternalIdType', + :'value' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamSyncSelectionStateExternalId` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [type, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/team_sync_selection_state_external_id_type.rb b/lib/datadog_api_client/v2/models/team_sync_selection_state_external_id_type.rb new file mode 100644 index 000000000000..726efb469b71 --- /dev/null +++ b/lib/datadog_api_client/v2/models/team_sync_selection_state_external_id_type.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of external identifier for the selection state item. + # For GitHub synchronization, the allowed values are `team` and + # `organization`. + class TeamSyncSelectionStateExternalIdType + include BaseEnumModel + + TEAM = "team".freeze + ORGANIZATION = "organization".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/team_sync_selection_state_item.rb b/lib/datadog_api_client/v2/models/team_sync_selection_state_item.rb new file mode 100644 index 000000000000..5a62c3b7a25b --- /dev/null +++ b/lib/datadog_api_client/v2/models/team_sync_selection_state_item.rb @@ -0,0 +1,147 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Identifies a team or organization hierarchy to include in synchronization. + class TeamSyncSelectionStateItem + include BaseGenericModel + + # The external identifier for a team or organization in the source platform. + attr_reader :external_id + + # The operation to perform on the selected hierarchy. + # When set to `include`, synchronization covers the + # referenced teams or organizations. + attr_accessor :operation + + # The scope of the selection. When set to `subtree`, + # synchronization includes the referenced team or + # organization and everything nested under it. + attr_accessor :scope + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'external_id' => :'external_id', + :'operation' => :'operation', + :'scope' => :'scope' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'external_id' => :'TeamSyncSelectionStateExternalId', + :'operation' => :'TeamSyncSelectionStateOperation', + :'scope' => :'TeamSyncSelectionStateScope' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamSyncSelectionStateItem` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'external_id') + self.external_id = attributes[:'external_id'] + end + + if attributes.key?(:'operation') + self.operation = attributes[:'operation'] + end + + if attributes.key?(:'scope') + self.scope = attributes[:'scope'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @external_id.nil? + true + end + + # Custom attribute writer method with validation + # @param external_id [Object] Object to be assigned + # @!visibility private + def external_id=(external_id) + if external_id.nil? + fail ArgumentError, 'invalid value for "external_id", external_id cannot be nil.' + end + @external_id = external_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + external_id == o.external_id && + operation == o.operation && + scope == o.scope && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [external_id, operation, scope, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/team_sync_selection_state_operation.rb b/lib/datadog_api_client/v2/models/team_sync_selection_state_operation.rb new file mode 100644 index 000000000000..cb248882d4fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/team_sync_selection_state_operation.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The operation to perform on the selected hierarchy. + # When set to `include`, synchronization covers the + # referenced teams or organizations. + class TeamSyncSelectionStateOperation + include BaseEnumModel + + INCLUDE = "include".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/team_sync_selection_state_scope.rb b/lib/datadog_api_client/v2/models/team_sync_selection_state_scope.rb new file mode 100644 index 000000000000..45ab1c60ff09 --- /dev/null +++ b/lib/datadog_api_client/v2/models/team_sync_selection_state_scope.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The scope of the selection. When set to `subtree`, + # synchronization includes the referenced team or + # organization and everything nested under it. + class TeamSyncSelectionStateScope + include BaseEnumModel + + SUBTREE = "subtree".freeze + end +end