diff --git a/.generated-info b/.generated-info index 3bdd0a805300..88e0363cc379 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "62a19e4", - "generated": "2025-08-27 15:01:20.504" + "spec_repo_commit": "6d9663b", + "generated": "2025-08-27 16:37:46.678" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e09c94804791..19e228a115b2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -14485,6 +14485,10 @@ components: description: Entity definition in raw JSON or YAML representation. example: "apiVersion: v3\nkind: service\nmetadata:\n name: myservice\n" type: string + EntityReference: + description: The unique reference for an IDP entity. + example: service:my-service + type: string EntityRelationships: description: Entity relationships. properties: @@ -34444,6 +34448,8 @@ components: description: If enabled, the rule is calculated as part of the score. example: true type: boolean + level: + $ref: '#/components/schemas/RuleLevel' modified_at: description: Time of the last rule outcome modification. format: date-time @@ -34464,6 +34470,13 @@ components: description: The unique ID for a scorecard rule. example: q8MQxk8TCqrHnWkx type: string + RuleLevel: + description: The maturity level of the rule (1, 2, or 3). + example: 2 + format: int32 + maximum: 3 + minimum: 1 + type: integer RuleName: description: Name of the notification rule. example: Rule 1 @@ -43835,6 +43848,57 @@ components: id: $ref: '#/components/schemas/ApiID' type: object + UpdateOutcomesAsyncAttributes: + description: The JSON:API attributes for a batched set of scorecard outcomes. + properties: + results: + description: Set of scorecard outcomes to update asynchronously. + items: + $ref: '#/components/schemas/UpdateOutcomesAsyncRequestItem' + type: array + type: object + UpdateOutcomesAsyncRequest: + description: Scorecard outcomes batch request. + properties: + data: + $ref: '#/components/schemas/UpdateOutcomesAsyncRequestData' + type: object + UpdateOutcomesAsyncRequestData: + description: Scorecard outcomes batch request data. + properties: + attributes: + $ref: '#/components/schemas/UpdateOutcomesAsyncAttributes' + type: + $ref: '#/components/schemas/UpdateOutcomesAsyncType' + type: object + UpdateOutcomesAsyncRequestItem: + description: Scorecard outcome for a single entity and rule. + properties: + entity_reference: + $ref: '#/components/schemas/EntityReference' + remarks: + description: Any remarks regarding the scorecard rule's evaluation. Supports + HTML hyperlinks. + example: 'See: Services' + type: string + rule_id: + $ref: '#/components/schemas/RuleId' + state: + $ref: '#/components/schemas/State' + required: + - rule_id + - entity_reference + - state + type: object + UpdateOutcomesAsyncType: + default: batched-outcome + description: The JSON:API type for scorecard outcomes. + enum: + - batched-outcome + example: batched-outcome + type: string + x-enum-varnames: + - BATCHED_OUTCOME UpdateResourceEvaluationFiltersRequest: description: Request object to update a resource filter. properties: @@ -61882,6 +61946,39 @@ paths: resultsPath: data x-unstable: '**Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Updates multiple scorecard rule outcomes in a single batched request. + operationId: UpdateScorecardOutcomesAsync + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateOutcomesAsyncRequest' + description: Set of scorecard outcomes. + required: true + responses: + '202': + description: Accepted + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_write + summary: Update Scorecard outcomes asynchronously + tags: + - Service Scorecards + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/scorecard/outcomes/batch: post: diff --git a/cassettes/features/v2/service_scorecards/Create-a-new-rule-returns-Bad-Request-response.frozen b/cassettes/features/v2/service_scorecards/Create-a-new-rule-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..5d0a1ab65485 --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Create-a-new-rule-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-26T15:48:59.496Z \ No newline at end of file diff --git a/cassettes/features/v2/service_scorecards/Create-a-new-rule-returns-Bad-Request-response.yml b/cassettes/features/v2/service_scorecards/Create-a-new-rule-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..121fddeccc7a --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Create-a-new-rule-returns-Bad-Request-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Tue, 26 Aug 2025 15:48:59 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":true,"level":2,"name":"Team Defined","scorecard_id":"NOT.FOUND"},"type":"rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/scorecard/rules + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"scorecard_id\" failed scorecard lookup"}]}' + 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/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response.frozen b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response.frozen new file mode 100644 index 000000000000..90ae34fee25c --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response.frozen @@ -0,0 +1 @@ +2025-08-26T14:46:17.790Z \ No newline at end of file diff --git a/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response.yml b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response.yml new file mode 100644 index 000000000000..2bc0b21b1b51 --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Tue, 26 Aug 2025 14:46:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":true,"name":"Test-Update_Scorecard_outcomes_asynchronously_returns_Accepted_response-1756219577","owner":"Datadog","scorecard_name":"OpenAPI + Spec Test Best Practices"},"type":"rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/scorecard/rules + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"5e3dexz6x_4f_4pa","type":"rule","attributes":{"category":"OpenAPI + Spec Test Best Practices","created_at":"2025-08-26T14:46:18.889883535Z","custom":true,"enabled":true,"level":3,"modified_at":"2025-08-26T14:46:18.889883535Z","name":"Test-Update_Scorecard_outcomes_asynchronously_returns_Accepted_response-1756219577","owner":"Datadog","scorecard_name":"OpenAPI + Spec Test Best Practices"},"relationships":{"scorecard":{"data":{"id":"qsxpoYRhU_yz","type":"scorecard"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Tue, 26 Aug 2025 14:46:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"results":[{"entity_reference":"service:my-service","remarks":"See: + Services","rule_id":"5e3dexz6x_4f_4pa","state":"pass"}]},"type":"batched-outcome"}}' + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/scorecard/outcomes + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"4iexte5r8prsrlrtzzxpy","type":"async-request"},"meta":{"total_received":1}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 202 + message: Accepted +- recorded_at: Tue, 26 Aug 2025 14:46:17 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/scorecard/rules/5e3dexz6x_4f_4pa + 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/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response.frozen b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..b743ee81bce1 --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-26T14:46:19.541Z \ No newline at end of file diff --git a/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response.yml b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..4091eb5cee0a --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Tue, 26 Aug 2025 14:46:19 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":true,"name":"Test-Update_Scorecard_outcomes_asynchronously_returns_Bad_Request_response-1756219579","owner":"Datadog","scorecard_name":"OpenAPI + Spec Test Best Practices"},"type":"rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/scorecard/rules + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"cyysw9dtqcu8zemc","type":"rule","attributes":{"category":"OpenAPI + Spec Test Best Practices","created_at":"2025-08-26T14:46:19.594805953Z","custom":true,"enabled":true,"level":3,"modified_at":"2025-08-26T14:46:19.594805953Z","name":"Test-Update_Scorecard_outcomes_asynchronously_returns_Bad_Request_response-1756219579","owner":"Datadog","scorecard_name":"OpenAPI + Spec Test Best Practices"},"relationships":{"scorecard":{"data":{"id":"qsxpoYRhU_yz","type":"scorecard"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Tue, 26 Aug 2025 14:46:19 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"results":[{"entity_reference":"service:my-service","rule_id":"cyysw9dtqcu8zemc","state":"INVALID"}]},"type":"batched-outcome"}}' + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/scorecard/outcomes + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"state\" must be one of \"pass fail skip\""}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +- recorded_at: Tue, 26 Aug 2025 14:46:19 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/scorecard/rules/cyysw9dtqcu8zemc + 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/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response.frozen b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response.frozen new file mode 100644 index 000000000000..eb7d1dc0b1a3 --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response.frozen @@ -0,0 +1 @@ +2025-08-26T14:46:20.159Z \ No newline at end of file diff --git a/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response.yml b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response.yml new file mode 100644 index 000000000000..780204daecaf --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Tue, 26 Aug 2025 14:46:20 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"results":[{"entity_reference":"service:my-service","remarks":"See: + Services","rule_id":"INVALID.RULE_ID","state":"pass"}]},"type":"batched-outcome"}}' + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/scorecard/outcomes + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"409","title":"Invalid rule_id"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 409 + message: Conflict +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Bad-Request-response.frozen b/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..5eaafa2c3605 --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-26T19:33:28.111Z \ No newline at end of file diff --git a/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Bad-Request-response.yml b/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..fee994792ebe --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Bad-Request-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Tue, 26 Aug 2025 19:33:28 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":true,"name":"Test-Update_an_existing_scorecard_rule_returns_Bad_Request_response-1756236808","owner":"Datadog","scorecard_name":"OpenAPI + Spec Test Best Practices"},"type":"rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/scorecard/rules + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"z661h8n2bpc5q0kx","type":"rule","attributes":{"category":"OpenAPI + Spec Test Best Practices","created_at":"2025-08-26T19:32:32.06573621Z","custom":true,"enabled":true,"level":3,"modified_at":"2025-08-26T19:32:32.06573621Z","name":"Test-Update_an_existing_scorecard_rule_returns_Bad_Request_response-1756236808","owner":"Datadog","scorecard_name":"OpenAPI + Spec Test Best Practices"},"relationships":{"scorecard":{"data":{"id":"qsxpoYRhU_yz","type":"scorecard"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Tue, 26 Aug 2025 19:33:28 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":true,"level":2,"name":"Team Defined","scorecard_id":"NOT.FOUND"},"type":"rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v2/scorecard/rules/z661h8n2bpc5q0kx + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"scorecard_id\" failed scorecard lookup"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +- recorded_at: Tue, 26 Aug 2025 19:33:28 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/scorecard/rules/z661h8n2bpc5q0kx + 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/service_scorecards/Update-an-existing-scorecard-rule-returns-Not-Found-response.frozen b/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..865cee5ede76 --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-08-26T19:33:28.966Z \ No newline at end of file diff --git a/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Not-Found-response.yml b/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Not-Found-response.yml new file mode 100644 index 000000000000..4ffb7edf0372 --- /dev/null +++ b/cassettes/features/v2/service_scorecards/Update-an-existing-scorecard-rule-returns-Not-Found-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Tue, 26 Aug 2025 19:33:28 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":true,"level":2,"name":"Team Defined","scorecard_name":"Deployments + automated via Deployment Trains"},"type":"rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v2/scorecard/rules/REPLACE.ME + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"rule not found: + REPLACE.ME"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/examples/v2/service-scorecards/UpdateScorecardOutcomesAsync.rb b/examples/v2/service-scorecards/UpdateScorecardOutcomesAsync.rb new file mode 100644 index 000000000000..b2c19901654b --- /dev/null +++ b/examples/v2/service-scorecards/UpdateScorecardOutcomesAsync.rb @@ -0,0 +1,27 @@ +# Update Scorecard outcomes asynchronously returns "Accepted" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_scorecard_outcomes_async".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ServiceScorecardsAPI.new + +# there is a valid "create_scorecard_rule" in the system +CREATE_SCORECARD_RULE_DATA_ID = ENV["CREATE_SCORECARD_RULE_DATA_ID"] + +body = DatadogAPIClient::V2::UpdateOutcomesAsyncRequest.new({ + data: DatadogAPIClient::V2::UpdateOutcomesAsyncRequestData.new({ + attributes: DatadogAPIClient::V2::UpdateOutcomesAsyncAttributes.new({ + results: [ + DatadogAPIClient::V2::UpdateOutcomesAsyncRequestItem.new({ + rule_id: CREATE_SCORECARD_RULE_DATA_ID, + entity_reference: "service:my-service", + remarks: 'See: Services', + state: DatadogAPIClient::V2::State::PASS, + }), + ], + }), + type: DatadogAPIClient::V2::UpdateOutcomesAsyncType::BATCHED_OUTCOME, + }), +}) +p api_instance.update_scorecard_outcomes_async(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 2159ef256c13..e1bd7f875de1 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2511,6 +2511,9 @@ "filter_rule_id" => "String", "filter_rule_name" => "String", }, + "v2.UpdateScorecardOutcomesAsync" => { + "body" => "UpdateOutcomesAsyncRequest", + }, "v2.CreateScorecardOutcomesBatch" => { "body" => "OutcomesBatchRequest", }, diff --git a/features/v2/service_scorecards.feature b/features/v2/service_scorecards.feature index 11d2c7f43287..387f04cf7113 100644 --- a/features/v2/service_scorecards.feature +++ b/features/v2/service_scorecards.feature @@ -10,11 +10,11 @@ Feature: Service Scorecards And a valid "appKeyAuth" key in the system And an instance of "ServiceScorecards" API - @generated @skip @team:DataDog/service-catalog + @team:DataDog/service-catalog Scenario: Create a new rule returns "Bad Request" response Given operation "CreateScorecardRule" enabled And new "CreateScorecardRule" request - And body with value {"data": {"attributes": {"enabled": true, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}} + And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_id": "NOT.FOUND"}, "type": "rule"}} When the request is sent Then the response status is 400 Bad Request @@ -121,12 +121,41 @@ Feature: Service Scorecards Then the response status is 200 OK And the response has 4 items + @team:DataDog/service-catalog + Scenario: Update Scorecard outcomes asynchronously returns "Accepted" response + Given operation "UpdateScorecardOutcomesAsync" enabled + And there is a valid "create_scorecard_rule" in the system + And new "UpdateScorecardOutcomesAsync" request + And body with value {"data": {"attributes": {"results": [{"rule_id": "{{create_scorecard_rule.data.id}}", "entity_reference": "service:my-service", "remarks": "See: Services", "state": "pass"}]}, "type": "batched-outcome"}} + When the request is sent + Then the response status is 202 Accepted + + @team:DataDog/service-catalog + Scenario: Update Scorecard outcomes asynchronously returns "Bad Request" response + Given operation "UpdateScorecardOutcomesAsync" enabled + And there is a valid "create_scorecard_rule" in the system + And new "UpdateScorecardOutcomesAsync" request + And body with value {"data": {"attributes": {"results": [{"rule_id": "{{create_scorecard_rule.data.id}}", "entity_reference": "service:my-service", "state": "INVALID"}]}, "type": "batched-outcome"}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0]" has field "detail" + + @team:DataDog/service-catalog + Scenario: Update Scorecard outcomes asynchronously returns "Conflict" response + Given operation "UpdateScorecardOutcomesAsync" enabled + And new "UpdateScorecardOutcomesAsync" request + And body with value {"data": {"attributes": {"results": [{"rule_id": "INVALID.RULE_ID", "entity_reference": "service:my-service", "remarks": "See: Services", "state": "pass"}]}, "type": "batched-outcome"}} + When the request is sent + Then the response status is 409 Conflict + And the response "errors" has length 1 + @generated @skip @team:DataDog/service-catalog Scenario: Update an existing rule returns "Bad Request" response Given operation "UpdateScorecardRule" enabled And new "UpdateScorecardRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"enabled": true, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}} + And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}} When the request is sent Then the response status is 400 Bad Request @@ -139,3 +168,22 @@ Feature: Service Scorecards And body with value {"data": { "attributes" : {"enabled": true, "name": "{{create_scorecard_rule.data.attributes.name}}", "scorecard_name": "{{create_scorecard_rule.data.attributes.scorecard_name}}", "description": "Updated description via test"}}} When the request is sent Then the response status is 200 Rule updated successfully + + @team:DataDog/service-catalog + Scenario: Update an existing scorecard rule returns "Bad Request" response + Given operation "UpdateScorecardRule" enabled + And there is a valid "create_scorecard_rule" in the system + And new "UpdateScorecardRule" request + And request contains "rule_id" parameter from "create_scorecard_rule.data.id" + And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_id": "NOT.FOUND"}, "type": "rule"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/service-catalog + Scenario: Update an existing scorecard rule returns "Not Found" response + Given operation "UpdateScorecardRule" enabled + And new "UpdateScorecardRule" request + And request contains "rule_id" parameter with value "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}} + When the request is sent + Then the response status is 404 Not Found diff --git a/features/v2/undo.json b/features/v2/undo.json index 9878d7a46785..444ec9d07dcc 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2742,6 +2742,12 @@ "type": "safe" } }, + "UpdateScorecardOutcomesAsync": { + "tag": "Service Scorecards", + "undo": { + "type": "idempotent" + } + }, "CreateScorecardOutcomesBatch": { "tag": "Service Scorecards", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index a6a5a665e366..7700e3412f14 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -265,6 +265,7 @@ def initialize "v2.delete_scorecard_rule": false, "v2.list_scorecard_outcomes": false, "v2.list_scorecard_rules": false, + "v2.update_scorecard_outcomes_async": false, "v2.update_scorecard_rule": false, "v2.create_incident_service": false, "v2.delete_incident_service": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 7d7d1985f89c..d23ae42738fb 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3709,6 +3709,11 @@ def overrides "v2.update_open_api_response" => "UpdateOpenAPIResponse", "v2.update_open_api_response_attributes" => "UpdateOpenAPIResponseAttributes", "v2.update_open_api_response_data" => "UpdateOpenAPIResponseData", + "v2.update_outcomes_async_attributes" => "UpdateOutcomesAsyncAttributes", + "v2.update_outcomes_async_request" => "UpdateOutcomesAsyncRequest", + "v2.update_outcomes_async_request_data" => "UpdateOutcomesAsyncRequestData", + "v2.update_outcomes_async_request_item" => "UpdateOutcomesAsyncRequestItem", + "v2.update_outcomes_async_type" => "UpdateOutcomesAsyncType", "v2.update_resource_evaluation_filters_request" => "UpdateResourceEvaluationFiltersRequest", "v2.update_resource_evaluation_filters_request_data" => "UpdateResourceEvaluationFiltersRequestData", "v2.update_resource_evaluation_filters_response" => "UpdateResourceEvaluationFiltersResponse", diff --git a/lib/datadog_api_client/v2/api/service_scorecards_api.rb b/lib/datadog_api_client/v2/api/service_scorecards_api.rb index b1385f3bea1b..b9ba3606557a 100644 --- a/lib/datadog_api_client/v2/api/service_scorecards_api.rb +++ b/lib/datadog_api_client/v2/api/service_scorecards_api.rb @@ -454,6 +454,79 @@ def list_scorecard_rules_with_pagination(opts = {}) end end + # Update Scorecard outcomes asynchronously. + # + # @see #update_scorecard_outcomes_async_with_http_info + def update_scorecard_outcomes_async(body, opts = {}) + update_scorecard_outcomes_async_with_http_info(body, opts) + nil + end + + # Update Scorecard outcomes asynchronously. + # + # Updates multiple scorecard rule outcomes in a single batched request. + # + # @param body [UpdateOutcomesAsyncRequest] Set of scorecard outcomes. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def update_scorecard_outcomes_async_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_scorecard_outcomes_async".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_scorecard_outcomes_async") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_scorecard_outcomes_async")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.update_scorecard_outcomes_async ...' + 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 ServiceScorecardsAPI.update_scorecard_outcomes_async" + end + # resource path + local_var_path = '/api/v2/scorecard/outcomes' + + # 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(['*/*']) + # 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] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_scorecard_outcomes_async, + :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: ServiceScorecardsAPI#update_scorecard_outcomes_async\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update an existing rule. # # @see #update_scorecard_rule_with_http_info diff --git a/lib/datadog_api_client/v2/models/rule_attributes.rb b/lib/datadog_api_client/v2/models/rule_attributes.rb index 95f63feedfa8..15a41060681b 100644 --- a/lib/datadog_api_client/v2/models/rule_attributes.rb +++ b/lib/datadog_api_client/v2/models/rule_attributes.rb @@ -36,6 +36,9 @@ class RuleAttributes # If enabled, the rule is calculated as part of the score. attr_accessor :enabled + # The maturity level of the rule (1, 2, or 3). + attr_reader :level + # Time of the last rule outcome modification. attr_accessor :modified_at @@ -59,6 +62,7 @@ def self.attribute_map :'custom' => :'custom', :'description' => :'description', :'enabled' => :'enabled', + :'level' => :'level', :'modified_at' => :'modified_at', :'name' => :'name', :'owner' => :'owner', @@ -75,6 +79,7 @@ def self.openapi_types :'custom' => :'Boolean', :'description' => :'String', :'enabled' => :'Boolean', + :'level' => :'Integer', :'modified_at' => :'Time', :'name' => :'String', :'owner' => :'String', @@ -120,6 +125,10 @@ def initialize(attributes = {}) self.enabled = attributes[:'enabled'] end + if attributes.key?(:'level') + self.level = attributes[:'level'] + end + if attributes.key?(:'modified_at') self.modified_at = attributes[:'modified_at'] end @@ -137,6 +146,28 @@ def initialize(attributes = {}) 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 !@level.nil? && @level > 3 + return false if !@level.nil? && @level < 1 + true + end + + # Custom attribute writer method with validation + # @param level [Object] Object to be assigned + # @!visibility private + def level=(level) + if !level.nil? && level > 3 + fail ArgumentError, 'invalid value for "level", must be smaller than or equal to 3.' + end + if !level.nil? && level < 1 + fail ArgumentError, 'invalid value for "level", must be greater than or equal to 1.' + end + @level = level + end + # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private @@ -168,6 +199,7 @@ def ==(o) custom == o.custom && description == o.description && enabled == o.enabled && + level == o.level && modified_at == o.modified_at && name == o.name && owner == o.owner && @@ -179,7 +211,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [category, created_at, custom, description, enabled, modified_at, name, owner, scorecard_name, additional_properties].hash + [category, created_at, custom, description, enabled, level, modified_at, name, owner, scorecard_name, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/update_outcomes_async_attributes.rb b/lib/datadog_api_client/v2/models/update_outcomes_async_attributes.rb new file mode 100644 index 000000000000..0b0fb15b436b --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_outcomes_async_attributes.rb @@ -0,0 +1,107 @@ +=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 JSON:API attributes for a batched set of scorecard outcomes. + class UpdateOutcomesAsyncAttributes + include BaseGenericModel + + # Set of scorecard outcomes to update asynchronously. + attr_accessor :results + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'results' => :'results' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'results' => :'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::UpdateOutcomesAsyncAttributes` 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?(:'results') + if (value = attributes[:'results']).is_a?(Array) + self.results = value + end + 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 && + results == o.results && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [results, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_outcomes_async_request.rb b/lib/datadog_api_client/v2/models/update_outcomes_async_request.rb new file mode 100644 index 000000000000..3520dd1ceaad --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_outcomes_async_request.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 + # Scorecard outcomes batch request. + class UpdateOutcomesAsyncRequest + include BaseGenericModel + + # Scorecard outcomes batch request data. + 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' => :'UpdateOutcomesAsyncRequestData' + } + 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::UpdateOutcomesAsyncRequest` 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/update_outcomes_async_request_data.rb b/lib/datadog_api_client/v2/models/update_outcomes_async_request_data.rb new file mode 100644 index 000000000000..1b7a73a953a1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_outcomes_async_request_data.rb @@ -0,0 +1,115 @@ +=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 + # Scorecard outcomes batch request data. + class UpdateOutcomesAsyncRequestData + include BaseGenericModel + + # The JSON:API attributes for a batched set of scorecard outcomes. + attr_accessor :attributes + + # The JSON:API type for scorecard outcomes. + attr_accessor :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' => :'UpdateOutcomesAsyncAttributes', + :'type' => :'UpdateOutcomesAsyncType' + } + 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::UpdateOutcomesAsyncRequestData` 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 + + # 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/update_outcomes_async_request_item.rb b/lib/datadog_api_client/v2/models/update_outcomes_async_request_item.rb new file mode 100644 index 000000000000..6df5336218ea --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_outcomes_async_request_item.rb @@ -0,0 +1,175 @@ +=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 + # Scorecard outcome for a single entity and rule. + class UpdateOutcomesAsyncRequestItem + include BaseGenericModel + + # The unique reference for an IDP entity. + attr_reader :entity_reference + + # Any remarks regarding the scorecard rule's evaluation. Supports HTML hyperlinks. + attr_accessor :remarks + + # The unique ID for a scorecard rule. + attr_reader :rule_id + + # The state of the rule evaluation. + attr_reader :state + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'entity_reference' => :'entity_reference', + :'remarks' => :'remarks', + :'rule_id' => :'rule_id', + :'state' => :'state' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'entity_reference' => :'String', + :'remarks' => :'String', + :'rule_id' => :'String', + :'state' => :'State' + } + 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::UpdateOutcomesAsyncRequestItem` 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?(:'entity_reference') + self.entity_reference = attributes[:'entity_reference'] + end + + if attributes.key?(:'remarks') + self.remarks = attributes[:'remarks'] + end + + if attributes.key?(:'rule_id') + self.rule_id = attributes[:'rule_id'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + 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 @entity_reference.nil? + return false if @rule_id.nil? + return false if @state.nil? + true + end + + # Custom attribute writer method with validation + # @param entity_reference [Object] Object to be assigned + # @!visibility private + def entity_reference=(entity_reference) + if entity_reference.nil? + fail ArgumentError, 'invalid value for "entity_reference", entity_reference cannot be nil.' + end + @entity_reference = entity_reference + end + + # Custom attribute writer method with validation + # @param rule_id [Object] Object to be assigned + # @!visibility private + def rule_id=(rule_id) + if rule_id.nil? + fail ArgumentError, 'invalid value for "rule_id", rule_id cannot be nil.' + end + @rule_id = rule_id + end + + # Custom attribute writer method with validation + # @param state [Object] Object to be assigned + # @!visibility private + def state=(state) + if state.nil? + fail ArgumentError, 'invalid value for "state", state cannot be nil.' + end + @state = state + 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 && + entity_reference == o.entity_reference && + remarks == o.remarks && + rule_id == o.rule_id && + state == o.state && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [entity_reference, remarks, rule_id, state, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_outcomes_async_type.rb b/lib/datadog_api_client/v2/models/update_outcomes_async_type.rb new file mode 100644 index 000000000000..76da169c92fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_outcomes_async_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 + # The JSON:API type for scorecard outcomes. + class UpdateOutcomesAsyncType + include BaseEnumModel + + BATCHED_OUTCOME = "batched-outcome".freeze + end +end