diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 620108cc5bf2..4ac4cbb66ff7 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -791,11 +791,6 @@ components: items: $ref: "#/components/schemas/ResourceProviderConfig" type: array - secretless_auth_enabled: - description: |- - (Preview) When enabled, Datadog authenticates with this app registration using federated workload identity credentials instead of a client secret. - example: true - type: boolean tenant_name: description: Your Azure Active Directory ID. example: "testc44-1234-5678-9101-cc00736ftest" diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 95a832b986b5..458903144508 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -6369,6 +6369,62 @@ components: type: string x-enum-varnames: - ARBITRARY_RULE + ArbitraryRuleStatusResponseArray: + description: The definition of `ArbitraryRuleStatusResponseArray` object. + example: + data: + - attributes: + processing_status: processing + id: "123" + type: arbitrary_rule_status + - attributes: + processing_status: done + id: "456" + type: arbitrary_rule_status + properties: + data: + description: The `ArbitraryRuleStatusResponseArray` `data`. + items: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseData" + type: array + required: + - data + type: object + ArbitraryRuleStatusResponseData: + description: The definition of `ArbitraryRuleStatusResponseData` object. + properties: + attributes: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseDataAttributes" + id: + description: The unique identifier of the custom allocation rule. + example: "123" + type: string + type: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseDataType" + required: + - id + - type + - attributes + type: object + ArbitraryRuleStatusResponseDataAttributes: + description: The definition of `ArbitraryRuleStatusResponseDataAttributes` object. + properties: + processing_status: + description: The processing status of the custom allocation rule. + example: processing + type: string + required: + - processing_status + type: object + ArbitraryRuleStatusResponseDataType: + default: arbitrary_rule_status + description: Arbitrary rule status resource type. + enum: + - arbitrary_rule_status + example: arbitrary_rule_status + type: string + x-enum-varnames: + - ARBITRARY_RULE_STATUS Argument: description: A named argument for a custom static analysis rule. properties: @@ -60338,6 +60394,62 @@ components: type: string x-enum-varnames: - RULESET + RulesetStatusRespArray: + description: The definition of `RulesetStatusRespArray` object. + example: + data: + - attributes: + processing_status: processing + id: 55ef2385-9ae1-4410-90c4-5ac1b60fec10 + type: ruleset_status + - attributes: + processing_status: done + id: a7b8c9d0-1234-5678-9abc-def012345678 + type: ruleset_status + properties: + data: + description: The `RulesetStatusRespArray` `data`. + items: + $ref: "#/components/schemas/RulesetStatusRespData" + type: array + required: + - data + type: object + RulesetStatusRespData: + description: The definition of `RulesetStatusRespData` object. + properties: + attributes: + $ref: "#/components/schemas/RulesetStatusRespDataAttributes" + id: + description: The unique identifier of the ruleset. + example: 55ef2385-9ae1-4410-90c4-5ac1b60fec10 + type: string + type: + $ref: "#/components/schemas/RulesetStatusRespDataType" + required: + - id + - type + - attributes + type: object + RulesetStatusRespDataAttributes: + description: The definition of `RulesetStatusRespDataAttributes` object. + properties: + processing_status: + description: The processing status of the ruleset. + example: processing + type: string + required: + - processing_status + type: object + RulesetStatusRespDataType: + default: ruleset_status + description: Ruleset status resource type. + enum: + - ruleset_status + example: ruleset_status + type: string + x-enum-varnames: + - RULESET_STATUS RumCrossProductSampling: description: The configuration for cross-product retention filters. properties: @@ -92445,6 +92557,27 @@ paths: summary: Reorder custom allocation rules tags: - Cloud Cost Management + /api/v2/cost/arbitrary_rule/status: + get: + description: List the processing status of all custom allocation rules. Returns only the ID and processing status for each rule. + operationId: ListCustomAllocationRulesStatus + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List custom allocation rules status + tags: + - Cloud Cost Management /api/v2/cost/arbitrary_rule/{rule_id}: delete: description: Delete a custom allocation rule - Delete an existing custom allocation rule by its ID @@ -131002,6 +131135,27 @@ paths: summary: Reorder tag pipeline rulesets tags: - Cloud Cost Management + /api/v2/tags/enrichment/status: + get: + description: List the processing status of all tag pipeline rulesets. Returns only the ID and processing status for each ruleset. + operationId: ListTagPipelinesRulesetsStatus + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RulesetStatusRespArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List tag pipeline rulesets status + tags: + - Cloud Cost Management /api/v2/tags/enrichment/validate-query: post: description: Validate a tag pipeline query - Validate the syntax and structure of a tag pipeline query diff --git a/cassettes/features/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.frozen b/cassettes/features/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.frozen index fc085ae47b00..4cf590b2a0f2 100644 --- a/cassettes/features/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.frozen +++ b/cassettes/features/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.frozen @@ -1 +1 @@ -2026-05-04T13:56:51.846Z \ No newline at end of file +2024-12-17T21:43:00.678Z \ No newline at end of file diff --git a/cassettes/features/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.yml b/cassettes/features/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.yml index ba3d73fd2352..c3c0be904ce9 100644 --- a/cassettes/features/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.yml +++ b/cassettes/features/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Mon, 04 May 2026 13:56:51 GMT +- recorded_at: Tue, 17 Dec 2024 21:43:00 GMT request: body: encoding: UTF-8 - string: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17779030-0000-0000-0000-177790301100","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_enabled":true,"metrics_enabled_default":true,"new_client_id":"17779030-0000-0000-0000-177790301100","new_tenant_name":"17779030-0000-0000-0000-177790301100","resource_collection_enabled":true,"resource_provider_configs":[{"metrics_enabled":false,"namespace":"Microsoft.Compute"},{"metrics_enabled":false,"namespace":"Microsoft.Web"}],"secretless_auth_enabled":false,"tenant_name":"17779030-0000-0000-0000-177790301100","usage_metrics_enabled":true}' + string: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17344717-0000-0000-0000-173447178000","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_enabled":true,"metrics_enabled_default":true,"new_client_id":"17344717-0000-0000-0000-173447178000","new_tenant_name":"17344717-0000-0000-0000-173447178000","resource_collection_enabled":true,"resource_provider_configs":[{"metrics_enabled":false,"namespace":"Microsoft.Compute"},{"metrics_enabled":false,"namespace":"Microsoft.Web"}],"tenant_name":"17344717-0000-0000-0000-173447178000","usage_metrics_enabled":true}' headers: Accept: - application/json @@ -23,11 +23,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 04 May 2026 13:56:51 GMT +- recorded_at: Tue, 17 Dec 2024 21:43:00 GMT request: body: encoding: UTF-8 - string: '{"client_id":"17779030-0000-0000-0000-177790301100","tenant_name":"17779030-0000-0000-0000-177790301100"}' + string: '{"client_id":"17344717-0000-0000-0000-173447178000","tenant_name":"17344717-0000-0000-0000-173447178000"}' headers: Accept: - application/json @@ -47,11 +47,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 04 May 2026 13:56:51 GMT +- recorded_at: Tue, 17 Dec 2024 21:43:00 GMT request: body: encoding: UTF-8 - string: '{"client_id":"17779030-0000-0000-0000-177790301100","tenant_name":"17779030-0000-0000-0000-177790301100"}' + string: '{"client_id":"17344717-0000-0000-0000-173447178000","tenant_name":"17344717-0000-0000-0000-173447178000"}' headers: Accept: - application/json diff --git a/cassettes/features/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.frozen b/cassettes/features/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.frozen index 08d5b0bf6a3f..d500dc214ee7 100644 --- a/cassettes/features/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.frozen +++ b/cassettes/features/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.frozen @@ -1 +1 @@ -2026-05-04T13:56:52.686Z \ No newline at end of file +2024-12-17T21:43:01.129Z \ No newline at end of file diff --git a/cassettes/features/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.yml b/cassettes/features/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.yml index c082090d0b0a..3a6a11362960 100644 --- a/cassettes/features/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.yml +++ b/cassettes/features/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Mon, 04 May 2026 13:56:52 GMT +- recorded_at: Tue, 17 Dec 2024 21:43:01 GMT request: body: encoding: UTF-8 - string: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17779030-0000-0000-0000-177790301200","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_enabled":true,"metrics_enabled_default":true,"new_client_id":"17779030-0000-0000-0000-177790301200","new_tenant_name":"17779030-0000-0000-0000-177790301200","resource_collection_enabled":true,"resource_provider_configs":[{"metrics_enabled":false,"namespace":"Microsoft.Compute"},{"metrics_enabled":false,"namespace":"Microsoft.Web"}],"secretless_auth_enabled":false,"tenant_name":"17779030-0000-0000-0000-177790301200","usage_metrics_enabled":true}' + string: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17344717-0000-0000-0000-173447178100","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_enabled":true,"metrics_enabled_default":true,"new_client_id":"17344717-0000-0000-0000-173447178100","new_tenant_name":"17344717-0000-0000-0000-173447178100","resource_collection_enabled":true,"resource_provider_configs":[{"metrics_enabled":false,"namespace":"Microsoft.Compute"},{"metrics_enabled":false,"namespace":"Microsoft.Web"}],"tenant_name":"17344717-0000-0000-0000-173447178100","usage_metrics_enabled":true}' headers: Accept: - application/json @@ -23,11 +23,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 04 May 2026 13:56:52 GMT +- recorded_at: Tue, 17 Dec 2024 21:43:01 GMT request: body: encoding: UTF-8 - string: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17779030-0000-0000-0000-177790301200","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17779030-0000-0000-0000-177790301200","new_tenant_name":"17779030-0000-0000-0000-177790301200","resource_collection_enabled":true,"secretless_auth_enabled":true,"tenant_name":"17779030-0000-0000-0000-177790301200"}' + string: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17344717-0000-0000-0000-173447178100","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17344717-0000-0000-0000-173447178100","new_tenant_name":"17344717-0000-0000-0000-173447178100","resource_collection_enabled":true,"tenant_name":"17344717-0000-0000-0000-173447178100"}' headers: Accept: - application/json @@ -47,11 +47,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 04 May 2026 13:56:52 GMT +- recorded_at: Tue, 17 Dec 2024 21:43:01 GMT request: body: encoding: UTF-8 - string: '{"client_id":"17779030-0000-0000-0000-177790301200","tenant_name":"17779030-0000-0000-0000-177790301200"}' + string: '{"client_id":"17344717-0000-0000-0000-173447178100","tenant_name":"17344717-0000-0000-0000-173447178100"}' headers: Accept: - application/json diff --git a/examples/v1/azure-integration/UpdateAzureHostFilters.rb b/examples/v1/azure-integration/UpdateAzureHostFilters.rb index 25f6c5f5b5d9..7606cc492784 100644 --- a/examples/v1/azure-integration/UpdateAzureHostFilters.rb +++ b/examples/v1/azure-integration/UpdateAzureHostFilters.rb @@ -26,7 +26,6 @@ namespace: "Microsoft.Compute", }), ], - secretless_auth_enabled: true, tenant_name: "testc44-1234-5678-9101-cc00736ftest", usage_metrics_enabled: true, }) diff --git a/examples/v1/azure-integration/UpdateAzureIntegration.rb b/examples/v1/azure-integration/UpdateAzureIntegration.rb index aae11d7b611b..cdbaa5254276 100644 --- a/examples/v1/azure-integration/UpdateAzureIntegration.rb +++ b/examples/v1/azure-integration/UpdateAzureIntegration.rb @@ -18,7 +18,6 @@ new_client_id: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", new_tenant_name: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", resource_collection_enabled: true, - secretless_auth_enabled: true, tenant_name: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", }) p api_instance.update_azure_integration(body) diff --git a/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.rb b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.rb new file mode 100644 index 000000000000..5fd70ffb7066 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.rb @@ -0,0 +1,5 @@ +# List custom allocation rules status returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.list_custom_allocation_rules_status() diff --git a/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.rb b/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.rb new file mode 100644 index 000000000000..5cb03ac4e6c0 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.rb @@ -0,0 +1,5 @@ +# List tag pipeline rulesets status returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.list_tag_pipelines_rulesets_status() diff --git a/features/v1/azure_integration.feature b/features/v1/azure_integration.feature index 6ba40e91e5b5..8d31237b5b60 100644 --- a/features/v1/azure_integration.feature +++ b/features/v1/azure_integration.feature @@ -12,7 +12,7 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Create an Azure integration returns "Bad Request" response Given new "CreateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @@ -26,7 +26,7 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Delete an Azure integration returns "Bad Request" response Given new "DeleteAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @@ -53,21 +53,21 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "Bad Request" response Given new "UpdateAzureHostFilters" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "OK" response Given new "UpdateAzureHostFilters" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/azure-integrations Scenario: Update an Azure integration returns "Bad Request" response Given new "UpdateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @@ -75,6 +75,6 @@ Feature: Azure Integration Scenario: Update an Azure integration returns "OK" response Given there is a valid "azure_account" in the system And new "UpdateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "secretless_auth_enabled": true, "tenant_name": "{{ uuid }}"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK diff --git a/features/v1/given.json b/features/v1/given.json index 4415a28bc00c..2606012caa1d 100644 --- a/features/v1/given.json +++ b/features/v1/given.json @@ -117,7 +117,7 @@ { "name": "body", "origin": "request", - "value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\n \"client_secret\": \"TestingRh2nx664kUy5dIApvM54T4AtO\",\n \"container_app_filters\": \"key:value,filter:example\",\n \"cspm_enabled\": true,\n \"custom_metrics_enabled\": true,\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"metrics_enabled\": true,\n \"metrics_enabled_default\": true,\n \"new_client_id\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"resource_provider_configs\": [\n {\n \"namespace\": \"Microsoft.Compute\",\n \"metrics_enabled\": false\n },\n {\n \"namespace\": \"Microsoft.Web\",\n \"metrics_enabled\": false\n }\n ],\n \"secretless_auth_enabled\": false,\n \"tenant_name\": \"{{ uuid }}\",\n \"usage_metrics_enabled\": true\n}" + "value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\n \"client_secret\": \"TestingRh2nx664kUy5dIApvM54T4AtO\",\n \"container_app_filters\": \"key:value,filter:example\",\n \"cspm_enabled\": true,\n \"custom_metrics_enabled\": true,\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"metrics_enabled\": true,\n \"metrics_enabled_default\": true,\n \"new_client_id\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"resource_provider_configs\": [\n {\n \"namespace\": \"Microsoft.Compute\",\n \"metrics_enabled\": false\n },\n {\n \"namespace\": \"Microsoft.Web\",\n \"metrics_enabled\": false\n }\n ],\n \"tenant_name\": \"{{ uuid }}\",\n \"usage_metrics_enabled\": true\n}" } ], "step": "there is a valid \"azure_account\" in the system", diff --git a/features/v2/cloud_cost_management.feature b/features/v2/cloud_cost_management.feature index c5fc0adc05de..5a2be1e25a44 100644 --- a/features/v2/cloud_cost_management.feature +++ b/features/v2/cloud_cost_management.feature @@ -358,6 +358,12 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data[0].attributes.rule_name" is equal to "example-arbitrary-cost-rule" + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List custom allocation rules status returns "OK" response + Given new "ListCustomAllocationRulesStatus" request + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: List tag pipeline rulesets returns "OK" response Given new "ListTagPipelinesRulesets" request @@ -365,6 +371,12 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data[0].attributes.name" is equal to "New Ruleset" + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List tag pipeline rulesets status returns "OK" response + Given new "ListTagPipelinesRulesetsStatus" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management Scenario: Reorder custom allocation rules returns "Successfully reordered rules" response Given new "ReorderCustomAllocationRules" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 21d7896f03bd..1acde7aa5399 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1283,6 +1283,12 @@ "type": "idempotent" } }, + "ListCustomAllocationRulesStatus": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "DeleteCustomAllocationRule": { "tag": "Cloud Cost Management", "undo": { @@ -6691,6 +6697,12 @@ "type": "idempotent" } }, + "ListTagPipelinesRulesetsStatus": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "ValidateQuery": { "tag": "Cloud Cost Management", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 8d3dc51e5100..2b2671db27d3 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1288,6 +1288,10 @@ def overrides "v2.arbitrary_rule_response_data_attributes_strategy_based_on_costs_items" => "ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems", "v2.arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items" => "ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems", "v2.arbitrary_rule_response_data_type" => "ArbitraryRuleResponseDataType", + "v2.arbitrary_rule_status_response_array" => "ArbitraryRuleStatusResponseArray", + "v2.arbitrary_rule_status_response_data" => "ArbitraryRuleStatusResponseData", + "v2.arbitrary_rule_status_response_data_attributes" => "ArbitraryRuleStatusResponseDataAttributes", + "v2.arbitrary_rule_status_response_data_type" => "ArbitraryRuleStatusResponseDataType", "v2.argument" => "Argument", "v2.asana_access_token" => "AsanaAccessToken", "v2.asana_access_token_type" => "AsanaAccessTokenType", @@ -4841,6 +4845,10 @@ def overrides "v2.ruleset_resp_data_attributes_rules_items_reference_table" => "RulesetRespDataAttributesRulesItemsReferenceTable", "v2.ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items" => "RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems", "v2.ruleset_resp_data_type" => "RulesetRespDataType", + "v2.ruleset_status_resp_array" => "RulesetStatusRespArray", + "v2.ruleset_status_resp_data" => "RulesetStatusRespData", + "v2.ruleset_status_resp_data_attributes" => "RulesetStatusRespDataAttributes", + "v2.ruleset_status_resp_data_type" => "RulesetStatusRespDataType", "v2.rule_severity" => "RuleSeverity", "v2.rules_validate_query_request" => "RulesValidateQueryRequest", "v2.rules_validate_query_request_data" => "RulesValidateQueryRequestData", diff --git a/lib/datadog_api_client/v1/models/azure_account.rb b/lib/datadog_api_client/v1/models/azure_account.rb index 7b1ac82258e5..2159d31e2acd 100644 --- a/lib/datadog_api_client/v1/models/azure_account.rb +++ b/lib/datadog_api_client/v1/models/azure_account.rb @@ -70,9 +70,6 @@ class AzureAccount # Configuration settings applied to resources from the specified Azure resource providers. attr_accessor :resource_provider_configs - # (Preview) When enabled, Datadog authenticates with this app registration using federated workload identity credentials instead of a client secret. - attr_accessor :secretless_auth_enabled - # Your Azure Active Directory ID. attr_accessor :tenant_name @@ -100,7 +97,6 @@ def self.attribute_map :'new_tenant_name' => :'new_tenant_name', :'resource_collection_enabled' => :'resource_collection_enabled', :'resource_provider_configs' => :'resource_provider_configs', - :'secretless_auth_enabled' => :'secretless_auth_enabled', :'tenant_name' => :'tenant_name', :'usage_metrics_enabled' => :'usage_metrics_enabled' } @@ -125,7 +121,6 @@ def self.openapi_types :'new_tenant_name' => :'String', :'resource_collection_enabled' => :'Boolean', :'resource_provider_configs' => :'Array', - :'secretless_auth_enabled' => :'Boolean', :'tenant_name' => :'String', :'usage_metrics_enabled' => :'Boolean' } @@ -213,10 +208,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:'secretless_auth_enabled') - self.secretless_auth_enabled = attributes[:'secretless_auth_enabled'] - end - if attributes.key?(:'tenant_name') self.tenant_name = attributes[:'tenant_name'] end @@ -267,7 +258,6 @@ def ==(o) new_tenant_name == o.new_tenant_name && resource_collection_enabled == o.resource_collection_enabled && resource_provider_configs == o.resource_provider_configs && - secretless_auth_enabled == o.secretless_auth_enabled && tenant_name == o.tenant_name && usage_metrics_enabled == o.usage_metrics_enabled && additional_properties == o.additional_properties @@ -277,7 +267,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [app_service_plan_filters, automute, client_id, client_secret, container_app_filters, cspm_enabled, custom_metrics_enabled, errors, host_filters, metrics_enabled, metrics_enabled_default, new_client_id, new_tenant_name, resource_collection_enabled, resource_provider_configs, secretless_auth_enabled, tenant_name, usage_metrics_enabled, additional_properties].hash + [app_service_plan_filters, automute, client_id, client_secret, container_app_filters, cspm_enabled, custom_metrics_enabled, errors, host_filters, metrics_enabled, metrics_enabled_default, new_client_id, new_tenant_name, resource_collection_enabled, resource_provider_configs, tenant_name, usage_metrics_enabled, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb b/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb index 8aa3e1002f88..9c44fcdb5ba3 100644 --- a/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +++ b/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb @@ -1640,6 +1640,66 @@ def list_custom_allocation_rules_with_http_info(opts = {}) return data, status_code, headers end + # List custom allocation rules status. + # + # @see #list_custom_allocation_rules_status_with_http_info + def list_custom_allocation_rules_status(opts = {}) + data, _status_code, _headers = list_custom_allocation_rules_status_with_http_info(opts) + data + end + + # List custom allocation rules status. + # + # List the processing status of all custom allocation rules. Returns only the ID and processing status for each rule. + # + # @param opts [Hash] the optional parameters + # @return [Array<(ArbitraryRuleStatusResponseArray, Integer, Hash)>] ArbitraryRuleStatusResponseArray data, response status code and response headers + def list_custom_allocation_rules_status_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_custom_allocation_rules_status ...' + end + # resource path + local_var_path = '/api/v2/cost/arbitrary_rule/status' + + # 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] || 'ArbitraryRuleStatusResponseArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_custom_allocation_rules_status, + :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: CloudCostManagementAPI#list_custom_allocation_rules_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List Custom Costs files. # # @see #list_custom_costs_files_with_http_info @@ -1773,6 +1833,66 @@ def list_tag_pipelines_rulesets_with_http_info(opts = {}) return data, status_code, headers end + # List tag pipeline rulesets status. + # + # @see #list_tag_pipelines_rulesets_status_with_http_info + def list_tag_pipelines_rulesets_status(opts = {}) + data, _status_code, _headers = list_tag_pipelines_rulesets_status_with_http_info(opts) + data + end + + # List tag pipeline rulesets status. + # + # List the processing status of all tag pipeline rulesets. Returns only the ID and processing status for each ruleset. + # + # @param opts [Hash] the optional parameters + # @return [Array<(RulesetStatusRespArray, Integer, Hash)>] RulesetStatusRespArray data, response status code and response headers + def list_tag_pipelines_rulesets_status_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_tag_pipelines_rulesets_status ...' + end + # resource path + local_var_path = '/api/v2/tags/enrichment/status' + + # 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] || 'RulesetStatusRespArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_tag_pipelines_rulesets_status, + :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: CloudCostManagementAPI#list_tag_pipelines_rulesets_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Reorder custom allocation rules. # # @see #reorder_custom_allocation_rules_with_http_info diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_status_response_array.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_status_response_array.rb new file mode 100644 index 000000000000..22a71e87228e --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_status_response_array.rb @@ -0,0 +1,125 @@ +=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 definition of `ArbitraryRuleStatusResponseArray` object. + class ArbitraryRuleStatusResponseArray + include BaseGenericModel + + # The `ArbitraryRuleStatusResponseArray` `data`. + 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' => :'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::ArbitraryRuleStatusResponseArray` 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 + 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/arbitrary_rule_status_response_data.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_status_response_data.rb new file mode 100644 index 000000000000..d26425d8df09 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_status_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 + # The definition of `ArbitraryRuleStatusResponseData` object. + class ArbitraryRuleStatusResponseData + include BaseGenericModel + + # The definition of `ArbitraryRuleStatusResponseDataAttributes` object. + attr_reader :attributes + + # The unique identifier of the custom allocation rule. + attr_reader :id + + # Arbitrary rule status resource type. + 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' => :'ArbitraryRuleStatusResponseDataAttributes', + :'id' => :'String', + :'type' => :'ArbitraryRuleStatusResponseDataType' + } + 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::ArbitraryRuleStatusResponseData` 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/arbitrary_rule_status_response_data_attributes.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_status_response_data_attributes.rb new file mode 100644 index 000000000000..ee2bf7d6807b --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_status_response_data_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 + # The definition of `ArbitraryRuleStatusResponseDataAttributes` object. + class ArbitraryRuleStatusResponseDataAttributes + include BaseGenericModel + + # The processing status of the custom allocation rule. + attr_reader :processing_status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'processing_status' => :'processing_status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'processing_status' => :'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::ArbitraryRuleStatusResponseDataAttributes` 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?(:'processing_status') + self.processing_status = attributes[:'processing_status'] + 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 @processing_status.nil? + true + end + + # Custom attribute writer method with validation + # @param processing_status [Object] Object to be assigned + # @!visibility private + def processing_status=(processing_status) + if processing_status.nil? + fail ArgumentError, 'invalid value for "processing_status", processing_status cannot be nil.' + end + @processing_status = processing_status + 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 && + processing_status == o.processing_status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [processing_status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_status_response_data_type.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_status_response_data_type.rb new file mode 100644 index 000000000000..e59a96c2e939 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_status_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 + # Arbitrary rule status resource type. + class ArbitraryRuleStatusResponseDataType + include BaseEnumModel + + ARBITRARY_RULE_STATUS = "arbitrary_rule_status".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_status_resp_array.rb b/lib/datadog_api_client/v2/models/ruleset_status_resp_array.rb new file mode 100644 index 000000000000..c0dbb6cec7e0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_status_resp_array.rb @@ -0,0 +1,125 @@ +=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 definition of `RulesetStatusRespArray` object. + class RulesetStatusRespArray + include BaseGenericModel + + # The `RulesetStatusRespArray` `data`. + 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' => :'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::RulesetStatusRespArray` 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 + 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/ruleset_status_resp_data.rb b/lib/datadog_api_client/v2/models/ruleset_status_resp_data.rb new file mode 100644 index 000000000000..1b34789f6cba --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_status_resp_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 + # The definition of `RulesetStatusRespData` object. + class RulesetStatusRespData + include BaseGenericModel + + # The definition of `RulesetStatusRespDataAttributes` object. + attr_reader :attributes + + # The unique identifier of the ruleset. + attr_reader :id + + # Ruleset status resource type. + 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' => :'RulesetStatusRespDataAttributes', + :'id' => :'String', + :'type' => :'RulesetStatusRespDataType' + } + 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::RulesetStatusRespData` 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/ruleset_status_resp_data_attributes.rb b/lib/datadog_api_client/v2/models/ruleset_status_resp_data_attributes.rb new file mode 100644 index 000000000000..029c099aea3a --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_status_resp_data_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 + # The definition of `RulesetStatusRespDataAttributes` object. + class RulesetStatusRespDataAttributes + include BaseGenericModel + + # The processing status of the ruleset. + attr_reader :processing_status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'processing_status' => :'processing_status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'processing_status' => :'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::RulesetStatusRespDataAttributes` 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?(:'processing_status') + self.processing_status = attributes[:'processing_status'] + 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 @processing_status.nil? + true + end + + # Custom attribute writer method with validation + # @param processing_status [Object] Object to be assigned + # @!visibility private + def processing_status=(processing_status) + if processing_status.nil? + fail ArgumentError, 'invalid value for "processing_status", processing_status cannot be nil.' + end + @processing_status = processing_status + 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 && + processing_status == o.processing_status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [processing_status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_status_resp_data_type.rb b/lib/datadog_api_client/v2/models/ruleset_status_resp_data_type.rb new file mode 100644 index 000000000000..1ddfd7bf9d9c --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_status_resp_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 + # Ruleset status resource type. + class RulesetStatusRespDataType + include BaseEnumModel + + RULESET_STATUS = "ruleset_status".freeze + end +end