From 19ead281dfd801ce6c08562d7bcce8fc5433b37f Mon Sep 17 00:00:00 2001 From: Oliver Li Date: Fri, 20 Dec 2024 16:49:23 -0500 Subject: [PATCH 1/2] delete app_deployment --- .../features/v2/app_deployment.feature | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 tests/scenarios/features/v2/app_deployment.feature diff --git a/tests/scenarios/features/v2/app_deployment.feature b/tests/scenarios/features/v2/app_deployment.feature deleted file mode 100644 index b76bc1d88..000000000 --- a/tests/scenarios/features/v2/app_deployment.feature +++ /dev/null @@ -1,58 +0,0 @@ -@endpoint(app-deployment) @endpoint(app-deployment-v2) -Feature: App Deployment - Deploy and disable apps in App Builder. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "AppDeployment" API - - @skip-typescript @team:DataDog/app-builder-backend - Scenario: Deploy App returns "Bad Request" response - Given operation "DeployApp" enabled - And new "DeployApp" request - And request contains "app_id" parameter with value "invalid-uuid" - When the request is sent - Then the response status is 400 Bad Request - - @skip-typescript @team:DataDog/app-builder-backend - Scenario: Deploy App returns "Created" response - Given operation "DeployApp" enabled - And new "DeployApp" request - And there is a valid "app" in the system - And request contains "app_id" parameter from "app.data.id" - When the request is sent - Then the response status is 201 Created - - @skip-typescript @team:DataDog/app-builder-backend - Scenario: Deploy App returns "Not Found" response - Given operation "DeployApp" enabled - And new "DeployApp" request - And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" - When the request is sent - Then the response status is 404 Not Found - - @skip-typescript @team:DataDog/app-builder-backend - Scenario: Disable App returns "Bad Request" response - Given operation "DisableApp" enabled - And new "DisableApp" request - And request contains "app_id" parameter with value "invalid-uuid" - When the request is sent - Then the response status is 400 Bad Request - - @skip-typescript @team:DataDog/app-builder-backend - Scenario: Disable App returns "Not Found" response - Given operation "DisableApp" enabled - And new "DisableApp" request - And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" - When the request is sent - Then the response status is 404 Not Found - - @skip-typescript @team:DataDog/app-builder-backend - Scenario: Disable App returns "OK" response - Given operation "DisableApp" enabled - And new "DisableApp" request - And there is a valid "app" in the system - And request contains "app_id" parameter from "app.data.id" - When the request is sent - Then the response status is 200 OK From 5c0edcbd7e2054c98a7f0cd474abe2166084f8f4 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 26 Dec 2024 22:12:24 +0000 Subject: [PATCH 2/2] Regenerate client from commit 930cad1d of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 130 +++---- ...ment_DeployApp.rs => v2_apps_DeployApp.rs} | 4 +- ...nt_DisableApp.rs => v2_apps_DisableApp.rs} | 4 +- examples/v2_apps_GetApp.rs | 5 +- src/datadog/configuration.rs | 4 +- src/datadogV2/api/api_app_deployment.rs | 316 ---------------- src/datadogV2/api/api_apps.rs | 337 ++++++++++++++++-- src/datadogV2/api/mod.rs | 1 - src/datadogV2/mod.rs | 1 - src/datadogV2/model/mod.rs | 6 - .../model/model_app_builder_error.rs | 109 ------ .../model_app_builder_error_errors_items.rs | 126 ------- ...l_app_builder_error_errors_items_source.rs | 122 ------- src/datadogV2/model/model_app_meta.rs | 6 +- .../model/model_deployment_included_meta.rs | 6 +- src/datadogV2/model/model_deployment_meta.rs | 6 +- .../model_deployment_relationship_meta.rs | 6 +- ...oy-App-returns-Bad-Request-response.frozen | 1 - ...Deploy-App-returns-Created-response.frozen | 1 - ...ploy-App-returns-Not-Found-response.frozen | 1 - ...le-App-returns-Bad-Request-response.frozen | 1 - ...able-App-returns-Not-Found-response.frozen | 1 - .../Disable-App-returns-OK-response.frozen | 1 - ...te-App-returns-App-Created-response.frozen | 2 +- ...eate-App-returns-App-Created-response.json | 10 +- ...te-App-returns-Bad-Request-response.frozen | 2 +- ...eate-App-returns-Bad-Request-response.json | 2 +- ...te-App-returns-Bad-Request-response.frozen | 2 +- ...lete-App-returns-Bad-Request-response.json | 2 +- ...lete-App-returns-Not-Found-response.frozen | 2 +- ...Delete-App-returns-Not-Found-response.json | 2 +- .../Delete-App-returns-OK-response.frozen | 2 +- .../apps/Delete-App-returns-OK-response.json | 14 +- ...e-Apps-returns-Bad-Request-response.frozen | 2 +- ...ple-Apps-returns-Bad-Request-response.json | 2 +- ...ple-Apps-returns-Not-Found-response.frozen | 2 +- ...tiple-Apps-returns-Not-Found-response.json | 2 +- ...e-Multiple-Apps-returns-OK-response.frozen | 2 +- ...ete-Multiple-Apps-returns-OK-response.json | 14 +- ...oy-App-returns-Bad-Request-response.frozen | 1 + ...ploy-App-returns-Bad-Request-response.json | 2 +- ...Deploy-App-returns-Created-response.frozen | 1 + .../Deploy-App-returns-Created-response.json | 16 +- ...ploy-App-returns-Not-Found-response.frozen | 1 + ...Deploy-App-returns-Not-Found-response.json | 2 +- ...le-App-returns-Bad-Request-response.frozen | 1 + ...able-App-returns-Bad-Request-response.json | 2 +- ...able-App-returns-Not-Found-response.frozen | 1 + ...isable-App-returns-Not-Found-response.json | 2 +- .../Disable-App-returns-OK-response.frozen | 1 + .../Disable-App-returns-OK-response.json | 16 +- ...et-App-returns-Bad-Request-response.frozen | 2 +- .../Get-App-returns-Bad-Request-response.json | 2 +- .../Get-App-returns-Not-Found-response.frozen | 2 +- .../Get-App-returns-Not-Found-response.json | 2 +- .../apps/Get-App-returns-OK-response.frozen | 2 +- .../v2/apps/Get-App-returns-OK-response.json | 16 +- .../apps/List-Apps-returns-OK-response.frozen | 2 +- .../apps/List-Apps-returns-OK-response.json | 4 +- ...te-App-returns-Bad-Request-response.frozen | 2 +- ...date-App-returns-Bad-Request-response.json | 16 +- .../Update-App-returns-OK-response.frozen | 2 +- .../apps/Update-App-returns-OK-response.json | 18 +- tests/scenarios/features/v2/apps.feature | 59 ++- tests/scenarios/features/v2/given.json | 2 +- tests/scenarios/features/v2/undo.json | 4 +- tests/scenarios/function_mappings.rs | 24 +- 68 files changed, 558 insertions(+), 914 deletions(-) rename examples/{v2_app-deployment_DeployApp.rs => v2_apps_DeployApp.rs} (80%) rename examples/{v2_app-deployment_DisableApp.rs => v2_apps_DisableApp.rs} (79%) delete mode 100644 src/datadogV2/api/api_app_deployment.rs delete mode 100644 src/datadogV2/model/model_app_builder_error.rs delete mode 100644 src/datadogV2/model/model_app_builder_error_errors_items.rs delete mode 100644 src/datadogV2/model/model_app_builder_error_errors_items_source.rs delete mode 100644 tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Bad-Request-response.frozen delete mode 100644 tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Created-response.frozen delete mode 100644 tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Not-Found-response.frozen delete mode 100644 tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Bad-Request-response.frozen delete mode 100644 tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Not-Found-response.frozen delete mode 100644 tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-OK-response.frozen create mode 100644 tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Bad-Request-response.frozen rename tests/scenarios/cassettes/v2/{app_deployment => apps}/Deploy-App-returns-Bad-Request-response.json (93%) create mode 100644 tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Created-response.frozen rename tests/scenarios/cassettes/v2/{app_deployment => apps}/Deploy-App-returns-Created-response.json (74%) create mode 100644 tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Not-Found-response.frozen rename tests/scenarios/cassettes/v2/{app_deployment => apps}/Deploy-App-returns-Not-Found-response.json (93%) create mode 100644 tests/scenarios/cassettes/v2/apps/Disable-App-returns-Bad-Request-response.frozen rename tests/scenarios/cassettes/v2/{app_deployment => apps}/Disable-App-returns-Bad-Request-response.json (93%) create mode 100644 tests/scenarios/cassettes/v2/apps/Disable-App-returns-Not-Found-response.frozen rename tests/scenarios/cassettes/v2/{app_deployment => apps}/Disable-App-returns-Not-Found-response.json (93%) create mode 100644 tests/scenarios/cassettes/v2/apps/Disable-App-returns-OK-response.frozen rename tests/scenarios/cassettes/v2/{app_deployment => apps}/Disable-App-returns-OK-response.json (76%) diff --git a/.apigentools-info b/.apigentools-info index abc44614b..627090b59 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-23 16:35:38.708989", - "spec_repo_commit": "19946d35" + "regenerated": "2024-12-26 22:06:30.710428", + "spec_repo_commit": "930cad1d" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-23 16:35:38.724544", - "spec_repo_commit": "19946d35" + "regenerated": "2024-12-26 22:06:30.724980", + "spec_repo_commit": "930cad1d" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3480f9db3..ea5a2767e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1615,34 +1615,6 @@ components: type: string x-enum-varnames: - apm_retention_filter - AppBuilderError: - description: The definition of `AppBuilderError` object. - properties: - errors: - description: The `AppBuilderError` `errors`. - items: - $ref: '#/components/schemas/AppBuilderErrorErrorsItems' - type: array - type: object - AppBuilderErrorErrorsItems: - description: The definition of `AppBuilderErrorErrorsItems` object. - properties: - detail: - description: The `items` `detail`. - type: string - source: - $ref: '#/components/schemas/AppBuilderErrorErrorsItemsSource' - type: object - AppBuilderErrorErrorsItemsSource: - description: The definition of `AppBuilderErrorErrorsItemsSource` object. - properties: - parameter: - description: The `source` `parameter`. - type: string - pointer: - description: The `source` `pointer`. - type: string - type: object AppBuilderEvent: additionalProperties: {} description: The definition of `AppBuilderEvent` object. @@ -1729,6 +1701,7 @@ components: type: string user_uuid: description: The `AppMeta` `user_uuid`. + format: uuid type: string version: description: The `AppMeta` `version`. @@ -8765,6 +8738,7 @@ components: type: string user_uuid: description: The `meta` `user_uuid`. + format: uuid type: string type: object DeploymentIncludedType: @@ -8790,6 +8764,7 @@ components: type: string user_uuid: description: The `DeploymentMeta` `user_uuid`. + format: uuid type: string type: object DeploymentRelationship: @@ -8832,6 +8807,7 @@ components: type: string user_uuid: description: The `meta` `user_uuid`. + format: uuid type: string type: object DeploymentType: @@ -30153,19 +30129,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Forbidden, e.g. missing permissions to delete one or more apps + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30182,63 +30158,71 @@ paths: description: List all apps, with optional filters and sorting operationId: ListApps parameters: - - description: The number of apps to return per page + - description: The number of apps to return per page. in: query name: limit required: false schema: format: int64 type: integer - - description: The page number to return + - description: The page number to return. in: query name: page required: false schema: format: int64 type: integer - - description: The `AppsFilter` `user_name`. + - description: Filter apps by the app creator. Usually the user's email. in: query name: filter[user_name] required: false schema: type: string - - description: The `AppsFilter` `user_uuid`. + - description: Filter apps by the app creator's UUID. in: query name: filter[user_uuid] required: false schema: + format: uuid type: string - - description: The `AppsFilter` `name`. + - description: Filter by app name. in: query name: filter[name] required: false schema: type: string - - description: The `AppsFilter` `query`. + - description: Filter apps by the app name or the app creator. in: query name: filter[query] required: false schema: type: string - - description: The `AppsFilter` `deployed`. + - description: Filter apps by whether they are published. in: query name: filter[deployed] required: false schema: type: boolean - - description: The `AppsFilter` `tags`. + - description: Filter apps by tags. in: query name: filter[tags] required: false schema: type: string - - description: The `AppsFilter` `favorite`. + - description: Filter apps by whether you have added them to your favorites. in: query name: filter[favorite] required: false schema: type: boolean - - explode: false + - description: Filter apps by whether they are enabled for self-service. + in: query + name: filter[self_service] + required: false + schema: + type: boolean + - description: The fields and direction to sort apps by. + explode: false in: query name: sort required: false @@ -30258,13 +30242,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Bad Request, e.g. invalid sort parameter + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30297,15 +30281,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Forbidden, e.g. missing required permissions to a connection - or workflow used in the app + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Create App @@ -30340,25 +30323,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '410': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Gone '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30380,6 +30363,11 @@ paths: required: true schema: type: string + - in: query + name: version + required: false + schema: + type: string responses: '200': content: @@ -30391,19 +30379,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30443,15 +30431,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Forbidden, e.g. missing required permissions to a connection - or workflow used in the app + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Update App @@ -30486,25 +30473,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Disable App tags: - - App Deployment + - Apps x-permission: operator: OR permissions: @@ -30531,25 +30518,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Deploy App tags: - - App Deployment + - Apps x-permission: operator: OR permissions: @@ -46584,9 +46571,10 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection name: AWS Logs Integration -- description: Deploy and disable apps in App Builder. - name: App Deployment -- description: Create, read, update, and delete apps in App Builder. +- description: Datadog App Builder provides a low-code solution to rapidly develop + and integrate secure, customized applications into your monitoring stack that + are built to accelerate remediation at scale. These API endpoints allow you to + create, read, update, delete, and publish apps. name: Apps - description: Search your Audit Logs events over HTTP. name: Audit diff --git a/examples/v2_app-deployment_DeployApp.rs b/examples/v2_apps_DeployApp.rs similarity index 80% rename from examples/v2_app-deployment_DeployApp.rs rename to examples/v2_apps_DeployApp.rs index 27dd9dcdd..f3ddbaa99 100644 --- a/examples/v2_app-deployment_DeployApp.rs +++ b/examples/v2_apps_DeployApp.rs @@ -1,6 +1,6 @@ // Deploy App returns "Created" response use datadog_api_client::datadog; -use datadog_api_client::datadogV2::api_app_deployment::AppDeploymentAPI; +use datadog_api_client::datadogV2::api_apps::AppsAPI; #[tokio::main] async fn main() { @@ -8,7 +8,7 @@ async fn main() { let app_data_id = std::env::var("APP_DATA_ID").unwrap(); let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeployApp", true); - let api = AppDeploymentAPI::with_config(configuration); + let api = AppsAPI::with_config(configuration); let resp = api.deploy_app(app_data_id.clone()).await; if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_app-deployment_DisableApp.rs b/examples/v2_apps_DisableApp.rs similarity index 79% rename from examples/v2_app-deployment_DisableApp.rs rename to examples/v2_apps_DisableApp.rs index d12e7c6c5..93345080a 100644 --- a/examples/v2_app-deployment_DisableApp.rs +++ b/examples/v2_apps_DisableApp.rs @@ -1,6 +1,6 @@ // Disable App returns "OK" response use datadog_api_client::datadog; -use datadog_api_client::datadogV2::api_app_deployment::AppDeploymentAPI; +use datadog_api_client::datadogV2::api_apps::AppsAPI; #[tokio::main] async fn main() { @@ -8,7 +8,7 @@ async fn main() { let app_data_id = std::env::var("APP_DATA_ID").unwrap(); let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DisableApp", true); - let api = AppDeploymentAPI::with_config(configuration); + let api = AppsAPI::with_config(configuration); let resp = api.disable_app(app_data_id.clone()).await; if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_apps_GetApp.rs b/examples/v2_apps_GetApp.rs index 0cd550bf5..2ed077e44 100644 --- a/examples/v2_apps_GetApp.rs +++ b/examples/v2_apps_GetApp.rs @@ -1,6 +1,7 @@ // Get App returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_apps::AppsAPI; +use datadog_api_client::datadogV2::api_apps::GetAppOptionalParams; #[tokio::main] async fn main() { @@ -9,7 +10,9 @@ async fn main() { let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetApp", true); let api = AppsAPI::with_config(configuration); - let resp = api.get_app(app_data_id.clone()).await; + let resp = api + .get_app(app_data_id.clone(), GetAppOptionalParams::default()) + .await; if let Ok(value) = resp { println!("{:#?}", value); } else { diff --git a/src/datadog/configuration.rs b/src/datadog/configuration.rs index 1267592cb..eb8a8f0f3 100644 --- a/src/datadog/configuration.rs +++ b/src/datadog/configuration.rs @@ -137,11 +137,11 @@ impl Default for Configuration { ("v2.create_app".to_owned(), false), ("v2.delete_app".to_owned(), false), ("v2.delete_apps".to_owned(), false), + ("v2.deploy_app".to_owned(), false), + ("v2.disable_app".to_owned(), false), ("v2.get_app".to_owned(), false), ("v2.list_apps".to_owned(), false), ("v2.update_app".to_owned(), false), - ("v2.deploy_app".to_owned(), false), - ("v2.disable_app".to_owned(), false), ("v2.get_active_billing_dimensions".to_owned(), false), ("v2.get_billing_dimension_mapping".to_owned(), false), ("v2.get_monthly_cost_attribution".to_owned(), false), diff --git a/src/datadogV2/api/api_app_deployment.rs b/src/datadogV2/api/api_app_deployment.rs deleted file mode 100644 index 8f61c3185..000000000 --- a/src/datadogV2/api/api_app_deployment.rs +++ /dev/null @@ -1,316 +0,0 @@ -// 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 2019-Present Datadog, Inc. -use crate::datadog; -use log::warn; -use reqwest::header::{HeaderMap, HeaderValue}; -use serde::{Deserialize, Serialize}; - -/// DeployAppError is a struct for typed errors of method [`AppDeploymentAPI::deploy_app`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeployAppError { - AppBuilderError(crate::datadogV2::model::AppBuilderError), - APIErrorResponse(crate::datadogV2::model::APIErrorResponse), - UnknownValue(serde_json::Value), -} - -/// DisableAppError is a struct for typed errors of method [`AppDeploymentAPI::disable_app`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DisableAppError { - AppBuilderError(crate::datadogV2::model::AppBuilderError), - APIErrorResponse(crate::datadogV2::model::APIErrorResponse), - UnknownValue(serde_json::Value), -} - -/// Deploy and disable apps in App Builder. -#[derive(Debug, Clone)] -pub struct AppDeploymentAPI { - config: datadog::Configuration, - client: reqwest_middleware::ClientWithMiddleware, -} - -impl Default for AppDeploymentAPI { - fn default() -> Self { - Self::with_config(datadog::Configuration::default()) - } -} - -impl AppDeploymentAPI { - pub fn new() -> Self { - Self::default() - } - pub fn with_config(config: datadog::Configuration) -> Self { - let mut reqwest_client_builder = reqwest::Client::builder(); - - if let Some(proxy_url) = &config.proxy_url { - let proxy = reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"); - reqwest_client_builder = reqwest_client_builder.proxy(proxy); - } - - let mut middleware_client_builder = - reqwest_middleware::ClientBuilder::new(reqwest_client_builder.build().unwrap()); - - if config.enable_retry { - struct RetryableStatus; - impl reqwest_retry::RetryableStrategy for RetryableStatus { - fn handle( - &self, - res: &Result, - ) -> Option { - match res { - Ok(success) => reqwest_retry::default_on_request_success(success), - Err(_) => None, - } - } - } - let backoff_policy = reqwest_retry::policies::ExponentialBackoff::builder() - .build_with_max_retries(config.max_retries); - - let retry_middleware = - reqwest_retry::RetryTransientMiddleware::new_with_policy_and_strategy( - backoff_policy, - RetryableStatus, - ); - - middleware_client_builder = middleware_client_builder.with(retry_middleware); - } - - let client = middleware_client_builder.build(); - - Self { config, client } - } - - pub fn with_client_and_config( - config: datadog::Configuration, - client: reqwest_middleware::ClientWithMiddleware, - ) -> Self { - Self { config, client } - } - - /// Deploy (publish) an app by ID - pub async fn deploy_app( - &self, - app_id: String, - ) -> Result> { - match self.deploy_app_with_http_info(app_id).await { - Ok(response_content) => { - if let Some(e) = response_content.entity { - Ok(e) - } else { - Err(datadog::Error::Serde(serde::de::Error::custom( - "response content was None", - ))) - } - } - Err(err) => Err(err), - } - } - - /// Deploy (publish) an app by ID - pub async fn deploy_app_with_http_info( - &self, - app_id: String, - ) -> Result< - datadog::ResponseContent, - datadog::Error, - > { - let local_configuration = &self.config; - let operation_id = "v2.deploy_app"; - if local_configuration.is_unstable_operation_enabled(operation_id) { - warn!("Using unstable operation {operation_id}"); - } else { - let local_error = datadog::UnstableOperationDisabledError { - msg: "Operation 'v2.deploy_app' is not enabled".to_string(), - }; - return Err(datadog::Error::UnstableOperationDisabledError(local_error)); - } - - let local_client = &self.client; - - let local_uri_str = format!( - "{}/api/v2/app-builder/apps/{app_id}/deployment", - local_configuration.get_operation_host(operation_id), - app_id = datadog::urlencode(app_id) - ); - let mut local_req_builder = - local_client.request(reqwest::Method::POST, local_uri_str.as_str()); - - // build headers - let mut headers = HeaderMap::new(); - headers.insert("Accept", HeaderValue::from_static("application/json")); - - // build user agent - match HeaderValue::from_str(local_configuration.user_agent.as_str()) { - Ok(user_agent) => headers.insert(reqwest::header::USER_AGENT, user_agent), - Err(e) => { - log::warn!("Failed to parse user agent header: {e}, falling back to default"); - headers.insert( - reqwest::header::USER_AGENT, - HeaderValue::from_static(datadog::DEFAULT_USER_AGENT.as_str()), - ) - } - }; - - // build auth - if let Some(local_key) = local_configuration.auth_keys.get("apiKeyAuth") { - headers.insert( - "DD-API-KEY", - HeaderValue::from_str(local_key.key.as_str()) - .expect("failed to parse DD-API-KEY header"), - ); - }; - if let Some(local_key) = local_configuration.auth_keys.get("appKeyAuth") { - headers.insert( - "DD-APPLICATION-KEY", - HeaderValue::from_str(local_key.key.as_str()) - .expect("failed to parse DD-APPLICATION-KEY header"), - ); - }; - - local_req_builder = local_req_builder.headers(headers); - let local_req = local_req_builder.build()?; - log::debug!("request content: {:?}", local_req.body()); - let local_resp = local_client.execute(local_req).await?; - - let local_status = local_resp.status(); - let local_content = local_resp.text().await?; - log::debug!("response content: {}", local_content); - - if !local_status.is_client_error() && !local_status.is_server_error() { - match serde_json::from_str::(&local_content) - { - Ok(e) => { - return Ok(datadog::ResponseContent { - status: local_status, - content: local_content, - entity: Some(e), - }) - } - Err(e) => return Err(datadog::Error::Serde(e)), - }; - } else { - let local_entity: Option = serde_json::from_str(&local_content).ok(); - let local_error = datadog::ResponseContent { - status: local_status, - content: local_content, - entity: local_entity, - }; - Err(datadog::Error::ResponseError(local_error)) - } - } - - /// Disable an app by ID - pub async fn disable_app( - &self, - app_id: String, - ) -> Result> { - match self.disable_app_with_http_info(app_id).await { - Ok(response_content) => { - if let Some(e) = response_content.entity { - Ok(e) - } else { - Err(datadog::Error::Serde(serde::de::Error::custom( - "response content was None", - ))) - } - } - Err(err) => Err(err), - } - } - - /// Disable an app by ID - pub async fn disable_app_with_http_info( - &self, - app_id: String, - ) -> Result< - datadog::ResponseContent, - datadog::Error, - > { - let local_configuration = &self.config; - let operation_id = "v2.disable_app"; - if local_configuration.is_unstable_operation_enabled(operation_id) { - warn!("Using unstable operation {operation_id}"); - } else { - let local_error = datadog::UnstableOperationDisabledError { - msg: "Operation 'v2.disable_app' is not enabled".to_string(), - }; - return Err(datadog::Error::UnstableOperationDisabledError(local_error)); - } - - let local_client = &self.client; - - let local_uri_str = format!( - "{}/api/v2/app-builder/apps/{app_id}/deployment", - local_configuration.get_operation_host(operation_id), - app_id = datadog::urlencode(app_id) - ); - let mut local_req_builder = - local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); - - // build headers - let mut headers = HeaderMap::new(); - headers.insert("Accept", HeaderValue::from_static("application/json")); - - // build user agent - match HeaderValue::from_str(local_configuration.user_agent.as_str()) { - Ok(user_agent) => headers.insert(reqwest::header::USER_AGENT, user_agent), - Err(e) => { - log::warn!("Failed to parse user agent header: {e}, falling back to default"); - headers.insert( - reqwest::header::USER_AGENT, - HeaderValue::from_static(datadog::DEFAULT_USER_AGENT.as_str()), - ) - } - }; - - // build auth - if let Some(local_key) = local_configuration.auth_keys.get("apiKeyAuth") { - headers.insert( - "DD-API-KEY", - HeaderValue::from_str(local_key.key.as_str()) - .expect("failed to parse DD-API-KEY header"), - ); - }; - if let Some(local_key) = local_configuration.auth_keys.get("appKeyAuth") { - headers.insert( - "DD-APPLICATION-KEY", - HeaderValue::from_str(local_key.key.as_str()) - .expect("failed to parse DD-APPLICATION-KEY header"), - ); - }; - - local_req_builder = local_req_builder.headers(headers); - let local_req = local_req_builder.build()?; - log::debug!("request content: {:?}", local_req.body()); - let local_resp = local_client.execute(local_req).await?; - - let local_status = local_resp.status(); - let local_content = local_resp.text().await?; - log::debug!("response content: {}", local_content); - - if !local_status.is_client_error() && !local_status.is_server_error() { - match serde_json::from_str::( - &local_content, - ) { - Ok(e) => { - return Ok(datadog::ResponseContent { - status: local_status, - content: local_content, - entity: Some(e), - }) - } - Err(e) => return Err(datadog::Error::Serde(e)), - }; - } else { - let local_entity: Option = serde_json::from_str(&local_content).ok(); - let local_error = datadog::ResponseContent { - status: local_status, - content: local_content, - entity: local_entity, - }; - Err(datadog::Error::ResponseError(local_error)) - } - } -} diff --git a/src/datadogV2/api/api_apps.rs b/src/datadogV2/api/api_apps.rs index 3b2eac039..f9c96e52c 100644 --- a/src/datadogV2/api/api_apps.rs +++ b/src/datadogV2/api/api_apps.rs @@ -11,77 +11,100 @@ use reqwest::header::{HeaderMap, HeaderValue}; use serde::{Deserialize, Serialize}; use std::io::Write; +/// GetAppOptionalParams is a struct for passing parameters to the method [`AppsAPI::get_app`] +#[non_exhaustive] +#[derive(Clone, Default, Debug)] +pub struct GetAppOptionalParams { + pub version: Option, +} + +impl GetAppOptionalParams { + pub fn version(mut self, value: String) -> Self { + self.version = Some(value); + self + } +} + /// ListAppsOptionalParams is a struct for passing parameters to the method [`AppsAPI::list_apps`] #[non_exhaustive] #[derive(Clone, Default, Debug)] pub struct ListAppsOptionalParams { - /// The number of apps to return per page + /// The number of apps to return per page. pub limit: Option, - /// The page number to return + /// The page number to return. pub page: Option, - /// The `AppsFilter` `user_name`. + /// Filter apps by the app creator. Usually the user's email. pub filter_user_name: Option, - /// The `AppsFilter` `user_uuid`. - pub filter_user_uuid: Option, - /// The `AppsFilter` `name`. + /// Filter apps by the app creator's UUID. + pub filter_user_uuid: Option, + /// Filter by app name. pub filter_name: Option, - /// The `AppsFilter` `query`. + /// Filter apps by the app name or the app creator. pub filter_query: Option, - /// The `AppsFilter` `deployed`. + /// Filter apps by whether they are published. pub filter_deployed: Option, - /// The `AppsFilter` `tags`. + /// Filter apps by tags. pub filter_tags: Option, - /// The `AppsFilter` `favorite`. + /// Filter apps by whether you have added them to your favorites. pub filter_favorite: Option, + /// Filter apps by whether they are enabled for self-service. + pub filter_self_service: Option, + /// The fields and direction to sort apps by. pub sort: Option>, } impl ListAppsOptionalParams { - /// The number of apps to return per page + /// The number of apps to return per page. pub fn limit(mut self, value: i64) -> Self { self.limit = Some(value); self } - /// The page number to return + /// The page number to return. pub fn page(mut self, value: i64) -> Self { self.page = Some(value); self } - /// The `AppsFilter` `user_name`. + /// Filter apps by the app creator. Usually the user's email. pub fn filter_user_name(mut self, value: String) -> Self { self.filter_user_name = Some(value); self } - /// The `AppsFilter` `user_uuid`. - pub fn filter_user_uuid(mut self, value: String) -> Self { + /// Filter apps by the app creator's UUID. + pub fn filter_user_uuid(mut self, value: uuid::Uuid) -> Self { self.filter_user_uuid = Some(value); self } - /// The `AppsFilter` `name`. + /// Filter by app name. pub fn filter_name(mut self, value: String) -> Self { self.filter_name = Some(value); self } - /// The `AppsFilter` `query`. + /// Filter apps by the app name or the app creator. pub fn filter_query(mut self, value: String) -> Self { self.filter_query = Some(value); self } - /// The `AppsFilter` `deployed`. + /// Filter apps by whether they are published. pub fn filter_deployed(mut self, value: bool) -> Self { self.filter_deployed = Some(value); self } - /// The `AppsFilter` `tags`. + /// Filter apps by tags. pub fn filter_tags(mut self, value: String) -> Self { self.filter_tags = Some(value); self } - /// The `AppsFilter` `favorite`. + /// Filter apps by whether you have added them to your favorites. pub fn filter_favorite(mut self, value: bool) -> Self { self.filter_favorite = Some(value); self } + /// Filter apps by whether they are enabled for self-service. + pub fn filter_self_service(mut self, value: bool) -> Self { + self.filter_self_service = Some(value); + self + } + /// The fields and direction to sort apps by. pub fn sort(mut self, value: Vec) -> Self { self.sort = Some(value); self @@ -92,7 +115,7 @@ impl ListAppsOptionalParams { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateAppError { - AppBuilderError(crate::datadogV2::model::AppBuilderError), + JSONAPIErrorResponse(crate::datadogV2::model::JSONAPIErrorResponse), APIErrorResponse(crate::datadogV2::model::APIErrorResponse), UnknownValue(serde_json::Value), } @@ -101,7 +124,7 @@ pub enum CreateAppError { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteAppError { - AppBuilderError(crate::datadogV2::model::AppBuilderError), + JSONAPIErrorResponse(crate::datadogV2::model::JSONAPIErrorResponse), APIErrorResponse(crate::datadogV2::model::APIErrorResponse), UnknownValue(serde_json::Value), } @@ -110,7 +133,25 @@ pub enum DeleteAppError { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteAppsError { - AppBuilderError(crate::datadogV2::model::AppBuilderError), + JSONAPIErrorResponse(crate::datadogV2::model::JSONAPIErrorResponse), + APIErrorResponse(crate::datadogV2::model::APIErrorResponse), + UnknownValue(serde_json::Value), +} + +/// DeployAppError is a struct for typed errors of method [`AppsAPI::deploy_app`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeployAppError { + JSONAPIErrorResponse(crate::datadogV2::model::JSONAPIErrorResponse), + APIErrorResponse(crate::datadogV2::model::APIErrorResponse), + UnknownValue(serde_json::Value), +} + +/// DisableAppError is a struct for typed errors of method [`AppsAPI::disable_app`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DisableAppError { + JSONAPIErrorResponse(crate::datadogV2::model::JSONAPIErrorResponse), APIErrorResponse(crate::datadogV2::model::APIErrorResponse), UnknownValue(serde_json::Value), } @@ -119,7 +160,7 @@ pub enum DeleteAppsError { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetAppError { - AppBuilderError(crate::datadogV2::model::AppBuilderError), + JSONAPIErrorResponse(crate::datadogV2::model::JSONAPIErrorResponse), APIErrorResponse(crate::datadogV2::model::APIErrorResponse), UnknownValue(serde_json::Value), } @@ -128,7 +169,7 @@ pub enum GetAppError { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ListAppsError { - AppBuilderError(crate::datadogV2::model::AppBuilderError), + JSONAPIErrorResponse(crate::datadogV2::model::JSONAPIErrorResponse), APIErrorResponse(crate::datadogV2::model::APIErrorResponse), UnknownValue(serde_json::Value), } @@ -137,12 +178,12 @@ pub enum ListAppsError { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateAppError { - AppBuilderError(crate::datadogV2::model::AppBuilderError), + JSONAPIErrorResponse(crate::datadogV2::model::JSONAPIErrorResponse), APIErrorResponse(crate::datadogV2::model::APIErrorResponse), UnknownValue(serde_json::Value), } -/// Create, read, update, and delete apps in App Builder. +/// Datadog App Builder provides a low-code solution to rapidly develop and integrate secure, customized applications into your monitoring stack that are built to accelerate remediation at scale. These API endpoints allow you to create, read, update, delete, and publish apps. #[derive(Debug, Clone)] pub struct AppsAPI { config: datadog::Configuration, @@ -634,12 +675,238 @@ impl AppsAPI { } } + /// Deploy (publish) an app by ID + pub async fn deploy_app( + &self, + app_id: String, + ) -> Result> { + match self.deploy_app_with_http_info(app_id).await { + Ok(response_content) => { + if let Some(e) = response_content.entity { + Ok(e) + } else { + Err(datadog::Error::Serde(serde::de::Error::custom( + "response content was None", + ))) + } + } + Err(err) => Err(err), + } + } + + /// Deploy (publish) an app by ID + pub async fn deploy_app_with_http_info( + &self, + app_id: String, + ) -> Result< + datadog::ResponseContent, + datadog::Error, + > { + let local_configuration = &self.config; + let operation_id = "v2.deploy_app"; + if local_configuration.is_unstable_operation_enabled(operation_id) { + warn!("Using unstable operation {operation_id}"); + } else { + let local_error = datadog::UnstableOperationDisabledError { + msg: "Operation 'v2.deploy_app' is not enabled".to_string(), + }; + return Err(datadog::Error::UnstableOperationDisabledError(local_error)); + } + + let local_client = &self.client; + + let local_uri_str = format!( + "{}/api/v2/app-builder/apps/{app_id}/deployment", + local_configuration.get_operation_host(operation_id), + app_id = datadog::urlencode(app_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build headers + let mut headers = HeaderMap::new(); + headers.insert("Accept", HeaderValue::from_static("application/json")); + + // build user agent + match HeaderValue::from_str(local_configuration.user_agent.as_str()) { + Ok(user_agent) => headers.insert(reqwest::header::USER_AGENT, user_agent), + Err(e) => { + log::warn!("Failed to parse user agent header: {e}, falling back to default"); + headers.insert( + reqwest::header::USER_AGENT, + HeaderValue::from_static(datadog::DEFAULT_USER_AGENT.as_str()), + ) + } + }; + + // build auth + if let Some(local_key) = local_configuration.auth_keys.get("apiKeyAuth") { + headers.insert( + "DD-API-KEY", + HeaderValue::from_str(local_key.key.as_str()) + .expect("failed to parse DD-API-KEY header"), + ); + }; + if let Some(local_key) = local_configuration.auth_keys.get("appKeyAuth") { + headers.insert( + "DD-APPLICATION-KEY", + HeaderValue::from_str(local_key.key.as_str()) + .expect("failed to parse DD-APPLICATION-KEY header"), + ); + }; + + local_req_builder = local_req_builder.headers(headers); + let local_req = local_req_builder.build()?; + log::debug!("request content: {:?}", local_req.body()); + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + log::debug!("response content: {}", local_content); + + if !local_status.is_client_error() && !local_status.is_server_error() { + match serde_json::from_str::(&local_content) + { + Ok(e) => { + return Ok(datadog::ResponseContent { + status: local_status, + content: local_content, + entity: Some(e), + }) + } + Err(e) => return Err(datadog::Error::Serde(e)), + }; + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = datadog::ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(datadog::Error::ResponseError(local_error)) + } + } + + /// Disable an app by ID + pub async fn disable_app( + &self, + app_id: String, + ) -> Result> { + match self.disable_app_with_http_info(app_id).await { + Ok(response_content) => { + if let Some(e) = response_content.entity { + Ok(e) + } else { + Err(datadog::Error::Serde(serde::de::Error::custom( + "response content was None", + ))) + } + } + Err(err) => Err(err), + } + } + + /// Disable an app by ID + pub async fn disable_app_with_http_info( + &self, + app_id: String, + ) -> Result< + datadog::ResponseContent, + datadog::Error, + > { + let local_configuration = &self.config; + let operation_id = "v2.disable_app"; + if local_configuration.is_unstable_operation_enabled(operation_id) { + warn!("Using unstable operation {operation_id}"); + } else { + let local_error = datadog::UnstableOperationDisabledError { + msg: "Operation 'v2.disable_app' is not enabled".to_string(), + }; + return Err(datadog::Error::UnstableOperationDisabledError(local_error)); + } + + let local_client = &self.client; + + let local_uri_str = format!( + "{}/api/v2/app-builder/apps/{app_id}/deployment", + local_configuration.get_operation_host(operation_id), + app_id = datadog::urlencode(app_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build headers + let mut headers = HeaderMap::new(); + headers.insert("Accept", HeaderValue::from_static("application/json")); + + // build user agent + match HeaderValue::from_str(local_configuration.user_agent.as_str()) { + Ok(user_agent) => headers.insert(reqwest::header::USER_AGENT, user_agent), + Err(e) => { + log::warn!("Failed to parse user agent header: {e}, falling back to default"); + headers.insert( + reqwest::header::USER_AGENT, + HeaderValue::from_static(datadog::DEFAULT_USER_AGENT.as_str()), + ) + } + }; + + // build auth + if let Some(local_key) = local_configuration.auth_keys.get("apiKeyAuth") { + headers.insert( + "DD-API-KEY", + HeaderValue::from_str(local_key.key.as_str()) + .expect("failed to parse DD-API-KEY header"), + ); + }; + if let Some(local_key) = local_configuration.auth_keys.get("appKeyAuth") { + headers.insert( + "DD-APPLICATION-KEY", + HeaderValue::from_str(local_key.key.as_str()) + .expect("failed to parse DD-APPLICATION-KEY header"), + ); + }; + + local_req_builder = local_req_builder.headers(headers); + let local_req = local_req_builder.build()?; + log::debug!("request content: {:?}", local_req.body()); + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + log::debug!("response content: {}", local_content); + + if !local_status.is_client_error() && !local_status.is_server_error() { + match serde_json::from_str::( + &local_content, + ) { + Ok(e) => { + return Ok(datadog::ResponseContent { + status: local_status, + content: local_content, + entity: Some(e), + }) + } + Err(e) => return Err(datadog::Error::Serde(e)), + }; + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = datadog::ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(datadog::Error::ResponseError(local_error)) + } + } + /// Get the full definition of an app by ID pub async fn get_app( &self, app_id: String, + params: GetAppOptionalParams, ) -> Result> { - match self.get_app_with_http_info(app_id).await { + match self.get_app_with_http_info(app_id, params).await { Ok(response_content) => { if let Some(e) = response_content.entity { Ok(e) @@ -657,6 +924,7 @@ impl AppsAPI { pub async fn get_app_with_http_info( &self, app_id: String, + params: GetAppOptionalParams, ) -> Result< datadog::ResponseContent, datadog::Error, @@ -672,6 +940,9 @@ impl AppsAPI { return Err(datadog::Error::UnstableOperationDisabledError(local_error)); } + // unbox and build optional parameters + let version = params.version; + let local_client = &self.client; let local_uri_str = format!( @@ -682,6 +953,11 @@ impl AppsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + if let Some(ref local_query_param) = version { + local_req_builder = + local_req_builder.query(&[("version", &local_query_param.to_string())]); + }; + // build headers let mut headers = HeaderMap::new(); headers.insert("Accept", HeaderValue::from_static("application/json")); @@ -793,6 +1069,7 @@ impl AppsAPI { let filter_deployed = params.filter_deployed; let filter_tags = params.filter_tags; let filter_favorite = params.filter_favorite; + let filter_self_service = params.filter_self_service; let sort = params.sort; let local_client = &self.client; @@ -840,6 +1117,10 @@ impl AppsAPI { local_req_builder = local_req_builder.query(&[("filter[favorite]", &local_query_param.to_string())]); }; + if let Some(ref local_query_param) = filter_self_service { + local_req_builder = local_req_builder + .query(&[("filter[self_service]", &local_query_param.to_string())]); + }; if let Some(ref local) = sort { local_req_builder = local_req_builder.query(&[( "sort", diff --git a/src/datadogV2/api/mod.rs b/src/datadogV2/api/mod.rs index f69132c08..7a56d9b6a 100644 --- a/src/datadogV2/api/mod.rs +++ b/src/datadogV2/api/mod.rs @@ -4,7 +4,6 @@ pub mod api_api_management; pub mod api_apm_retention_filters; -pub mod api_app_deployment; pub mod api_apps; pub mod api_audit; pub mod api_authn_mappings; diff --git a/src/datadogV2/mod.rs b/src/datadogV2/mod.rs index a8ca64c41..3cd002ce5 100644 --- a/src/datadogV2/mod.rs +++ b/src/datadogV2/mod.rs @@ -5,7 +5,6 @@ pub mod api; pub use self::api::api_api_management; pub use self::api::api_apm_retention_filters; -pub use self::api::api_app_deployment; pub use self::api::api_apps; pub use self::api::api_audit; pub use self::api::api_authn_mappings; diff --git a/src/datadogV2/model/mod.rs b/src/datadogV2/model/mod.rs index 909d05007..9197cd624 100644 --- a/src/datadogV2/model/mod.rs +++ b/src/datadogV2/model/mod.rs @@ -198,12 +198,6 @@ pub mod model_delete_apps_response_data_items; pub use self::model_delete_apps_response_data_items::DeleteAppsResponseDataItems; pub mod model_delete_apps_response_data_items_type; pub use self::model_delete_apps_response_data_items_type::DeleteAppsResponseDataItemsType; -pub mod model_app_builder_error; -pub use self::model_app_builder_error::AppBuilderError; -pub mod model_app_builder_error_errors_items; -pub use self::model_app_builder_error_errors_items::AppBuilderErrorErrorsItems; -pub mod model_app_builder_error_errors_items_source; -pub use self::model_app_builder_error_errors_items_source::AppBuilderErrorErrorsItemsSource; pub mod model_apps_sort_field; pub use self::model_apps_sort_field::AppsSortField; pub mod model_list_apps_response; diff --git a/src/datadogV2/model/model_app_builder_error.rs b/src/datadogV2/model/model_app_builder_error.rs deleted file mode 100644 index 8b2154205..000000000 --- a/src/datadogV2/model/model_app_builder_error.rs +++ /dev/null @@ -1,109 +0,0 @@ -// 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 2019-Present Datadog, Inc. -use serde::de::{Error, MapAccess, Visitor}; -use serde::{Deserialize, Deserializer, Serialize}; -use serde_with::skip_serializing_none; -use std::fmt::{self, Formatter}; - -/// The definition of `AppBuilderError` object. -#[non_exhaustive] -#[skip_serializing_none] -#[derive(Clone, Debug, PartialEq, Serialize)] -pub struct AppBuilderError { - /// The `AppBuilderError` `errors`. - #[serde(rename = "errors")] - pub errors: Option>, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, - #[serde(skip)] - #[serde(default)] - pub(crate) _unparsed: bool, -} - -impl AppBuilderError { - pub fn new() -> AppBuilderError { - AppBuilderError { - errors: None, - additional_properties: std::collections::BTreeMap::new(), - _unparsed: false, - } - } - - pub fn errors( - mut self, - value: Vec, - ) -> Self { - self.errors = Some(value); - self - } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } -} - -impl Default for AppBuilderError { - fn default() -> Self { - Self::new() - } -} - -impl<'de> Deserialize<'de> for AppBuilderError { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - struct AppBuilderErrorVisitor; - impl<'a> Visitor<'a> for AppBuilderErrorVisitor { - type Value = AppBuilderError; - - fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { - f.write_str("a mapping") - } - - fn visit_map(self, mut map: M) -> Result - where - M: MapAccess<'a>, - { - let mut errors: Option> = - None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); - let mut _unparsed = false; - - while let Some((k, v)) = map.next_entry::()? { - match k.as_str() { - "errors" => { - if v.is_null() { - continue; - } - errors = Some(serde_json::from_value(v).map_err(M::Error::custom)?); - } - &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } - } - } - } - - let content = AppBuilderError { - errors, - additional_properties, - _unparsed, - }; - - Ok(content) - } - } - - deserializer.deserialize_any(AppBuilderErrorVisitor) - } -} diff --git a/src/datadogV2/model/model_app_builder_error_errors_items.rs b/src/datadogV2/model/model_app_builder_error_errors_items.rs deleted file mode 100644 index bd9285ad5..000000000 --- a/src/datadogV2/model/model_app_builder_error_errors_items.rs +++ /dev/null @@ -1,126 +0,0 @@ -// 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 2019-Present Datadog, Inc. -use serde::de::{Error, MapAccess, Visitor}; -use serde::{Deserialize, Deserializer, Serialize}; -use serde_with::skip_serializing_none; -use std::fmt::{self, Formatter}; - -/// The definition of `AppBuilderErrorErrorsItems` object. -#[non_exhaustive] -#[skip_serializing_none] -#[derive(Clone, Debug, PartialEq, Serialize)] -pub struct AppBuilderErrorErrorsItems { - /// The `items` `detail`. - #[serde(rename = "detail")] - pub detail: Option, - /// The definition of `AppBuilderErrorErrorsItemsSource` object. - #[serde(rename = "source")] - pub source: Option, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, - #[serde(skip)] - #[serde(default)] - pub(crate) _unparsed: bool, -} - -impl AppBuilderErrorErrorsItems { - pub fn new() -> AppBuilderErrorErrorsItems { - AppBuilderErrorErrorsItems { - detail: None, - source: None, - additional_properties: std::collections::BTreeMap::new(), - _unparsed: false, - } - } - - pub fn detail(mut self, value: String) -> Self { - self.detail = Some(value); - self - } - - pub fn source( - mut self, - value: crate::datadogV2::model::AppBuilderErrorErrorsItemsSource, - ) -> Self { - self.source = Some(value); - self - } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } -} - -impl Default for AppBuilderErrorErrorsItems { - fn default() -> Self { - Self::new() - } -} - -impl<'de> Deserialize<'de> for AppBuilderErrorErrorsItems { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - struct AppBuilderErrorErrorsItemsVisitor; - impl<'a> Visitor<'a> for AppBuilderErrorErrorsItemsVisitor { - type Value = AppBuilderErrorErrorsItems; - - fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { - f.write_str("a mapping") - } - - fn visit_map(self, mut map: M) -> Result - where - M: MapAccess<'a>, - { - let mut detail: Option = None; - let mut source: Option = - None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); - let mut _unparsed = false; - - while let Some((k, v)) = map.next_entry::()? { - match k.as_str() { - "detail" => { - if v.is_null() { - continue; - } - detail = Some(serde_json::from_value(v).map_err(M::Error::custom)?); - } - "source" => { - if v.is_null() { - continue; - } - source = Some(serde_json::from_value(v).map_err(M::Error::custom)?); - } - &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } - } - } - } - - let content = AppBuilderErrorErrorsItems { - detail, - source, - additional_properties, - _unparsed, - }; - - Ok(content) - } - } - - deserializer.deserialize_any(AppBuilderErrorErrorsItemsVisitor) - } -} diff --git a/src/datadogV2/model/model_app_builder_error_errors_items_source.rs b/src/datadogV2/model/model_app_builder_error_errors_items_source.rs deleted file mode 100644 index 349e671b2..000000000 --- a/src/datadogV2/model/model_app_builder_error_errors_items_source.rs +++ /dev/null @@ -1,122 +0,0 @@ -// 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 2019-Present Datadog, Inc. -use serde::de::{Error, MapAccess, Visitor}; -use serde::{Deserialize, Deserializer, Serialize}; -use serde_with::skip_serializing_none; -use std::fmt::{self, Formatter}; - -/// The definition of `AppBuilderErrorErrorsItemsSource` object. -#[non_exhaustive] -#[skip_serializing_none] -#[derive(Clone, Debug, PartialEq, Serialize)] -pub struct AppBuilderErrorErrorsItemsSource { - /// The `source` `parameter`. - #[serde(rename = "parameter")] - pub parameter: Option, - /// The `source` `pointer`. - #[serde(rename = "pointer")] - pub pointer: Option, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, - #[serde(skip)] - #[serde(default)] - pub(crate) _unparsed: bool, -} - -impl AppBuilderErrorErrorsItemsSource { - pub fn new() -> AppBuilderErrorErrorsItemsSource { - AppBuilderErrorErrorsItemsSource { - parameter: None, - pointer: None, - additional_properties: std::collections::BTreeMap::new(), - _unparsed: false, - } - } - - pub fn parameter(mut self, value: String) -> Self { - self.parameter = Some(value); - self - } - - pub fn pointer(mut self, value: String) -> Self { - self.pointer = Some(value); - self - } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } -} - -impl Default for AppBuilderErrorErrorsItemsSource { - fn default() -> Self { - Self::new() - } -} - -impl<'de> Deserialize<'de> for AppBuilderErrorErrorsItemsSource { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - struct AppBuilderErrorErrorsItemsSourceVisitor; - impl<'a> Visitor<'a> for AppBuilderErrorErrorsItemsSourceVisitor { - type Value = AppBuilderErrorErrorsItemsSource; - - fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { - f.write_str("a mapping") - } - - fn visit_map(self, mut map: M) -> Result - where - M: MapAccess<'a>, - { - let mut parameter: Option = None; - let mut pointer: Option = None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); - let mut _unparsed = false; - - while let Some((k, v)) = map.next_entry::()? { - match k.as_str() { - "parameter" => { - if v.is_null() { - continue; - } - parameter = Some(serde_json::from_value(v).map_err(M::Error::custom)?); - } - "pointer" => { - if v.is_null() { - continue; - } - pointer = Some(serde_json::from_value(v).map_err(M::Error::custom)?); - } - &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } - } - } - } - - let content = AppBuilderErrorErrorsItemsSource { - parameter, - pointer, - additional_properties, - _unparsed, - }; - - Ok(content) - } - } - - deserializer.deserialize_any(AppBuilderErrorErrorsItemsSourceVisitor) - } -} diff --git a/src/datadogV2/model/model_app_meta.rs b/src/datadogV2/model/model_app_meta.rs index 8a64153c1..d933992f2 100644 --- a/src/datadogV2/model/model_app_meta.rs +++ b/src/datadogV2/model/model_app_meta.rs @@ -37,7 +37,7 @@ pub struct AppMeta { pub user_name: Option, /// The `AppMeta` `user_uuid`. #[serde(rename = "user_uuid")] - pub user_uuid: Option, + pub user_uuid: Option, /// The `AppMeta` `version`. #[serde(rename = "version")] pub version: Option, @@ -106,7 +106,7 @@ impl AppMeta { self } - pub fn user_uuid(mut self, value: String) -> Self { + pub fn user_uuid(mut self, value: uuid::Uuid) -> Self { self.user_uuid = Some(value); self } @@ -156,7 +156,7 @@ impl<'de> Deserialize<'de> for AppMeta { let mut updated_since_deployment: Option = None; let mut user_id: Option = None; let mut user_name: Option = None; - let mut user_uuid: Option = None; + let mut user_uuid: Option = None; let mut version: Option = None; let mut additional_properties: std::collections::BTreeMap< String, diff --git a/src/datadogV2/model/model_deployment_included_meta.rs b/src/datadogV2/model/model_deployment_included_meta.rs index 9161dc392..e54f77bcf 100644 --- a/src/datadogV2/model/model_deployment_included_meta.rs +++ b/src/datadogV2/model/model_deployment_included_meta.rs @@ -22,7 +22,7 @@ pub struct DeploymentIncludedMeta { pub user_name: Option, /// The `meta` `user_uuid`. #[serde(rename = "user_uuid")] - pub user_uuid: Option, + pub user_uuid: Option, #[serde(flatten)] pub additional_properties: std::collections::BTreeMap, #[serde(skip)] @@ -57,7 +57,7 @@ impl DeploymentIncludedMeta { self } - pub fn user_uuid(mut self, value: String) -> Self { + pub fn user_uuid(mut self, value: uuid::Uuid) -> Self { self.user_uuid = Some(value); self } @@ -97,7 +97,7 @@ impl<'de> Deserialize<'de> for DeploymentIncludedMeta { let mut created_at: Option = None; let mut user_id: Option = None; let mut user_name: Option = None; - let mut user_uuid: Option = None; + let mut user_uuid: Option = None; let mut additional_properties: std::collections::BTreeMap< String, serde_json::Value, diff --git a/src/datadogV2/model/model_deployment_meta.rs b/src/datadogV2/model/model_deployment_meta.rs index 126810396..f1d6baa8e 100644 --- a/src/datadogV2/model/model_deployment_meta.rs +++ b/src/datadogV2/model/model_deployment_meta.rs @@ -22,7 +22,7 @@ pub struct DeploymentMeta { pub user_name: Option, /// The `DeploymentMeta` `user_uuid`. #[serde(rename = "user_uuid")] - pub user_uuid: Option, + pub user_uuid: Option, #[serde(flatten)] pub additional_properties: std::collections::BTreeMap, #[serde(skip)] @@ -57,7 +57,7 @@ impl DeploymentMeta { self } - pub fn user_uuid(mut self, value: String) -> Self { + pub fn user_uuid(mut self, value: uuid::Uuid) -> Self { self.user_uuid = Some(value); self } @@ -97,7 +97,7 @@ impl<'de> Deserialize<'de> for DeploymentMeta { let mut created_at: Option = None; let mut user_id: Option = None; let mut user_name: Option = None; - let mut user_uuid: Option = None; + let mut user_uuid: Option = None; let mut additional_properties: std::collections::BTreeMap< String, serde_json::Value, diff --git a/src/datadogV2/model/model_deployment_relationship_meta.rs b/src/datadogV2/model/model_deployment_relationship_meta.rs index c99b9a1d0..83c0e9c1d 100644 --- a/src/datadogV2/model/model_deployment_relationship_meta.rs +++ b/src/datadogV2/model/model_deployment_relationship_meta.rs @@ -22,7 +22,7 @@ pub struct DeploymentRelationshipMeta { pub user_name: Option, /// The `meta` `user_uuid`. #[serde(rename = "user_uuid")] - pub user_uuid: Option, + pub user_uuid: Option, #[serde(flatten)] pub additional_properties: std::collections::BTreeMap, #[serde(skip)] @@ -57,7 +57,7 @@ impl DeploymentRelationshipMeta { self } - pub fn user_uuid(mut self, value: String) -> Self { + pub fn user_uuid(mut self, value: uuid::Uuid) -> Self { self.user_uuid = Some(value); self } @@ -97,7 +97,7 @@ impl<'de> Deserialize<'de> for DeploymentRelationshipMeta { let mut created_at: Option = None; let mut user_id: Option = None; let mut user_name: Option = None; - let mut user_uuid: Option = None; + let mut user_uuid: Option = None; let mut additional_properties: std::collections::BTreeMap< String, serde_json::Value, diff --git a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Bad-Request-response.frozen deleted file mode 100644 index 70eab29e2..000000000 --- a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-12-10T19:57:35.320Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Created-response.frozen b/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Created-response.frozen deleted file mode 100644 index 12cd09b1d..000000000 --- a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Created-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-12-12T20:29:22.668Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Not-Found-response.frozen deleted file mode 100644 index c11fe09d7..000000000 --- a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-12-10T19:57:35.984Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Bad-Request-response.frozen deleted file mode 100644 index bf3af7629..000000000 --- a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-12-10T19:57:36.091Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Not-Found-response.frozen deleted file mode 100644 index 8dc6b57d7..000000000 --- a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-12-10T19:57:36.179Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-OK-response.frozen deleted file mode 100644 index 883ce61de..000000000 --- a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-12-12T20:29:23.546Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Create-App-returns-App-Created-response.frozen b/tests/scenarios/cassettes/v2/apps/Create-App-returns-App-Created-response.frozen index 6dfadcf60..a188f5651 100644 --- a/tests/scenarios/cassettes/v2/apps/Create-App-returns-App-Created-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Create-App-returns-App-Created-response.frozen @@ -1 +1 @@ -2024-12-12T20:29:24.182Z \ No newline at end of file +2024-12-20T20:39:18.375Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Create-App-returns-App-Created-response.json b/tests/scenarios/cassettes/v2/apps/Create-App-returns-App-Created-response.json index 311006b82..1bb67b6b3 100644 --- a/tests/scenarios/cassettes/v2/apps/Create-App-returns-App-Created-response.json +++ b/tests/scenarios/cassettes/v2/apps/Create-App-returns-App-Created-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"2d9dd18e-c574-454c-8d43-3045b731d6a2\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"02c52f8c-78d9-4c14-ac27-b0bcac36ce74\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:24 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:18 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/2d9dd18e-c574-454c-8d43-3045b731d6a2" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/02c52f8c-78d9-4c14-ac27-b0bcac36ce74" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"2d9dd18e-c574-454c-8d43-3045b731d6a2\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"02c52f8c-78d9-4c14-ac27-b0bcac36ce74\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:24 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:18 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Create-App-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/apps/Create-App-returns-Bad-Request-response.frozen index 5912dc344..6bab6b517 100644 --- a/tests/scenarios/cassettes/v2/apps/Create-App-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Create-App-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.031Z \ No newline at end of file +2024-12-20T20:39:18.779Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Create-App-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/apps/Create-App-returns-Bad-Request-response.json index e834634c8..bc45fb30d 100644 --- a/tests/scenarios/cassettes/v2/apps/Create-App-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/apps/Create-App-returns-Bad-Request-response.json @@ -32,7 +32,7 @@ "message": "Bad Request" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:10 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:18 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Bad-Request-response.frozen index 3925b1b25..f2fcc286e 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.128Z \ No newline at end of file +2024-12-20T20:39:18.880Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Bad-Request-response.json index b94026f89..54d266049 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Bad-Request-response.json @@ -26,7 +26,7 @@ "message": "Bad Request" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:10 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:18 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Not-Found-response.frozen index cfa34bd9b..fb9dd880b 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.225Z \ No newline at end of file +2024-12-20T20:39:18.985Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Not-Found-response.json index 1fa48dc29..050daabf8 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-Not-Found-response.json @@ -26,7 +26,7 @@ "message": "Not Found" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:10 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:18 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-OK-response.frozen index 81a74305a..744eafd50 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-OK-response.frozen @@ -1 +1 @@ -2024-12-12T20:29:24.659Z \ No newline at end of file +2024-12-20T20:39:19.083Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-OK-response.json b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-OK-response.json index 2d351871d..a7c110146 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-App-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/apps/Delete-App-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"5cb67134-d7bd-4320-9cda-d79ec98cff4c\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"500bf715-77a5-4c1d-b4ef-0d181b071daf\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:24 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:19 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/5cb67134-d7bd-4320-9cda-d79ec98cff4c" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/500bf715-77a5-4c1d-b4ef-0d181b071daf" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"5cb67134-d7bd-4320-9cda-d79ec98cff4c\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"500bf715-77a5-4c1d-b4ef-0d181b071daf\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:24 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:19 GMT" }, { "request": { @@ -71,7 +71,7 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/5cb67134-d7bd-4320-9cda-d79ec98cff4c" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/500bf715-77a5-4c1d-b4ef-0d181b071daf" }, "response": { "body": { @@ -88,7 +88,7 @@ "message": "Not Found" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:24 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:19 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Bad-Request-response.frozen index 47c84b21b..c2c122a9a 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.845Z \ No newline at end of file +2024-12-20T20:39:19.594Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Bad-Request-response.json index f92a0f7b4..72eb00c98 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Bad-Request-response.json @@ -32,7 +32,7 @@ "message": "Bad Request" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:10 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:19 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Not-Found-response.frozen index 0fbfbe769..7d397ad29 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.942Z \ No newline at end of file +2024-12-20T20:39:19.688Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Not-Found-response.json index 0264cf115..197ea0660 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-Not-Found-response.json @@ -32,7 +32,7 @@ "message": "Not Found" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:10 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:19 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-OK-response.frozen index 5848314b7..d2346be1d 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-OK-response.frozen @@ -1 +1 @@ -2024-12-12T20:29:25.239Z \ No newline at end of file +2024-12-20T20:39:19.785Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-OK-response.json b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-OK-response.json index 3a1f55ef4..b73b201f9 100644 --- a/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/apps/Delete-Multiple-Apps-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"61d36766-5d27-47ea-a3e7-aa7bd77b1da3\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"884b37bc-71b8-40bc-8967-12684ec7f3c4\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:25 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:19 GMT" }, { "request": { "body": { - "string": "{\"data\":[{\"id\":\"61d36766-5d27-47ea-a3e7-aa7bd77b1da3\",\"type\":\"appDefinitions\"}]}", + "string": "{\"data\":[{\"id\":\"884b37bc-71b8-40bc-8967-12684ec7f3c4\",\"type\":\"appDefinitions\"}]}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "response": { "body": { - "string": "{\"data\":[{\"id\":\"61d36766-5d27-47ea-a3e7-aa7bd77b1da3\",\"type\":\"appDefinitions\"}]}", + "string": "{\"data\":[{\"id\":\"884b37bc-71b8-40bc-8967-12684ec7f3c4\",\"type\":\"appDefinitions\"}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:25 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:19 GMT" }, { "request": { @@ -77,7 +77,7 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/61d36766-5d27-47ea-a3e7-aa7bd77b1da3" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/884b37bc-71b8-40bc-8967-12684ec7f3c4" }, "response": { "body": { @@ -94,7 +94,7 @@ "message": "Not Found" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:25 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:19 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Bad-Request-response.frozen new file mode 100644 index 000000000..3f65923d0 --- /dev/null +++ b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2024-12-20T20:39:20.190Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Bad-Request-response.json similarity index 93% rename from tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Bad-Request-response.json rename to tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Bad-Request-response.json index 3edd87946..a6c04fdec 100644 --- a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Bad-Request-response.json @@ -26,7 +26,7 @@ "message": "Bad Request" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:35 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:20 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Created-response.frozen b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Created-response.frozen new file mode 100644 index 000000000..2c4a11702 --- /dev/null +++ b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Created-response.frozen @@ -0,0 +1 @@ +2024-12-20T20:39:20.292Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Created-response.json b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Created-response.json similarity index 74% rename from tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Created-response.json rename to tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Created-response.json index 0f33d71b0..3e6b0a867 100644 --- a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Created-response.json +++ b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Created-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"d9f547cd-bc8d-46be-b321-336856723728\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"290ad26d-6f5c-43b6-aef6-57b403d755e8\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:22 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:20 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/d9f547cd-bc8d-46be-b321-336856723728/deployment" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/290ad26d-6f5c-43b6-aef6-57b403d755e8/deployment" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"7e1d147c-815e-46fa-8be0-278783311881\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"f8567809-049e-49c2-b5c0-e5cb0e8e0f5e\"},\"meta\":{\"created_at\":\"2024-12-12T20:29:23.253704Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"user_name\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}", + "string": "{\"data\":{\"id\":\"74a4bbff-b587-4272-a207-b61678cc0bf1\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"ab334928-2df5-4e6e-8e40-9eeee2b2cd44\"},\"meta\":{\"created_at\":\"2024-12-20T20:39:20.594723Z\",\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\"}}}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:22 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:20 GMT" }, { "request": { @@ -71,11 +71,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/d9f547cd-bc8d-46be-b321-336856723728" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/290ad26d-6f5c-43b6-aef6-57b403d755e8" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"d9f547cd-bc8d-46be-b321-336856723728\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"290ad26d-6f5c-43b6-aef6-57b403d755e8\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -88,7 +88,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:22 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:20 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Not-Found-response.frozen new file mode 100644 index 000000000..f8f8e8f26 --- /dev/null +++ b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2024-12-20T20:39:20.929Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Not-Found-response.json similarity index 93% rename from tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Not-Found-response.json rename to tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Not-Found-response.json index 973dda706..adb223e88 100644 --- a/tests/scenarios/cassettes/v2/app_deployment/Deploy-App-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/apps/Deploy-App-returns-Not-Found-response.json @@ -26,7 +26,7 @@ "message": "Not Found" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:35 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:20 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Bad-Request-response.frozen new file mode 100644 index 000000000..afd2bf6b9 --- /dev/null +++ b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2024-12-20T20:39:21.034Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Bad-Request-response.json similarity index 93% rename from tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Bad-Request-response.json rename to tests/scenarios/cassettes/v2/apps/Disable-App-returns-Bad-Request-response.json index bcf179101..65c919483 100644 --- a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Bad-Request-response.json @@ -26,7 +26,7 @@ "message": "Bad Request" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:36 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Not-Found-response.frozen new file mode 100644 index 000000000..7332f6001 --- /dev/null +++ b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2024-12-20T20:39:21.129Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Not-Found-response.json similarity index 93% rename from tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Not-Found-response.json rename to tests/scenarios/cassettes/v2/apps/Disable-App-returns-Not-Found-response.json index 9f596d72c..e8e04ccde 100644 --- a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-Not-Found-response.json @@ -26,7 +26,7 @@ "message": "Not Found" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:36 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Disable-App-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-OK-response.frozen new file mode 100644 index 000000000..672904fce --- /dev/null +++ b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-12-20T20:39:21.230Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-OK-response.json b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-OK-response.json similarity index 76% rename from tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-OK-response.json rename to tests/scenarios/cassettes/v2/apps/Disable-App-returns-OK-response.json index 63d219481..7d2ec1ee4 100644 --- a/tests/scenarios/cassettes/v2/app_deployment/Disable-App-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/apps/Disable-App-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:23 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad/deployment" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5/deployment" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"be510de8-34d8-45fc-830f-85c208a42920\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"00000000-0000-0000-0000-000000000000\"},\"meta\":{\"created_at\":\"2024-12-12T20:29:23.883145Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"user_name\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}", + "string": "{\"data\":{\"id\":\"1c14f2b9-0161-4dac-ad44-b8dd84abcbe6\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"00000000-0000-0000-0000-000000000000\"},\"meta\":{\"created_at\":\"2024-12-20T20:39:21.490485Z\",\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\"}}}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:23 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" }, { "request": { @@ -71,11 +71,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -88,7 +88,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:23 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Get-App-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/apps/Get-App-returns-Bad-Request-response.frozen index 9a1b4493f..8251b6eaf 100644 --- a/tests/scenarios/cassettes/v2/apps/Get-App-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Get-App-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-12-10T19:57:11.519Z \ No newline at end of file +2024-12-20T20:39:21.680Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Get-App-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/apps/Get-App-returns-Bad-Request-response.json index 4d47e8159..ae6d44c13 100644 --- a/tests/scenarios/cassettes/v2/apps/Get-App-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/apps/Get-App-returns-Bad-Request-response.json @@ -26,7 +26,7 @@ "message": "Bad Request" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:11 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Get-App-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/apps/Get-App-returns-Not-Found-response.frozen index 0d42c7607..8bd6f7561 100644 --- a/tests/scenarios/cassettes/v2/apps/Get-App-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Get-App-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-12-10T19:57:11.612Z \ No newline at end of file +2024-12-20T20:39:21.762Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Get-App-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/apps/Get-App-returns-Not-Found-response.json index a83cb8847..98cb25fd0 100644 --- a/tests/scenarios/cassettes/v2/apps/Get-App-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/apps/Get-App-returns-Not-Found-response.json @@ -26,7 +26,7 @@ "message": "Not Found" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:11 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Get-App-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/apps/Get-App-returns-OK-response.frozen index 7b34332de..e407ffe5d 100644 --- a/tests/scenarios/cassettes/v2/apps/Get-App-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Get-App-returns-OK-response.frozen @@ -1 +1 @@ -2024-12-12T20:29:25.770Z \ No newline at end of file +2024-12-20T20:39:21.868Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Get-App-returns-OK-response.json b/tests/scenarios/cassettes/v2/apps/Get-App-returns-OK-response.json index 859a655f6..86c830634 100644 --- a/tests/scenarios/cassettes/v2/apps/Get-App-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/apps/Get-App-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"4937a273-31f5-4375-a9cf-b71eeb92f89c\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"e91c5ea9-5827-4008-b1e6-026d71f5c005\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:25 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "get", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/4937a273-31f5-4375-a9cf-b71eeb92f89c" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/e91c5ea9-5827-4008-b1e6-026d71f5c005" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"4937a273-31f5-4375-a9cf-b71eeb92f89c\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Example App\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":321813,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"user_name\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":1,\"updated_since_deployment\":false,\"created_at\":\"2024-12-12T20:29:25.869968Z\",\"updated_at\":\"2024-12-12T20:29:25.869968Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", + "string": "{\"data\":{\"id\":\"e91c5ea9-5827-4008-b1e6-026d71f5c005\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Example App\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\",\"version\":1,\"updated_since_deployment\":false,\"created_at\":\"2024-12-20T20:39:21.945448Z\",\"updated_at\":\"2024-12-20T20:39:21.945448Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:25 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" }, { "request": { @@ -71,11 +71,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/4937a273-31f5-4375-a9cf-b71eeb92f89c" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/e91c5ea9-5827-4008-b1e6-026d71f5c005" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"4937a273-31f5-4375-a9cf-b71eeb92f89c\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"e91c5ea9-5827-4008-b1e6-026d71f5c005\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -88,7 +88,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:25 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:21 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/List-Apps-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/apps/List-Apps-returns-OK-response.frozen index 1cb2468dc..b459860c3 100644 --- a/tests/scenarios/cassettes/v2/apps/List-Apps-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/List-Apps-returns-OK-response.frozen @@ -1 +1 @@ -2024-12-10T19:57:12.227Z \ No newline at end of file +2024-12-20T20:39:22.419Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/List-Apps-returns-OK-response.json b/tests/scenarios/cassettes/v2/apps/List-Apps-returns-OK-response.json index ec7b8dc71..5532ee3c7 100644 --- a/tests/scenarios/cassettes/v2/apps/List-Apps-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/apps/List-Apps-returns-OK-response.json @@ -13,7 +13,7 @@ }, "response": { "body": { - "string": "{\"data\":[{\"id\":\"d595693a-473d-4671-9da3-fce89e3a5c5d\",\"type\":\"appDefinitions\",\"attributes\":{\"description\":\"\",\"favorite\":false,\"name\":\"Max's App Fri, Jul 12, 11:10:35 am\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":7571362,\"user_uuid\":\"3114f3a0-3fc9-11ef-acbe-a6def6551924\",\"user_name\":\"max.gale@datadoghq.com\",\"version\":0,\"updated_since_deployment\":false,\"created_at\":\"2024-07-12T15:10:48.690305Z\",\"updated_at\":\"2024-07-12T15:10:48.690305Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}],\"meta\":{\"page\":{\"totalCount\":1,\"totalFilteredCount\":1}}}", + "string": "{\"data\":[{\"id\":\"0cc51f70-6f90-406e-880b-e2fac88e823a\",\"type\":\"appDefinitions\",\"attributes\":{\"description\":\"\",\"favorite\":false,\"name\":\"[synthetics] app name 0123456789\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":7571471,\"user_uuid\":\"01347f51-3fcd-11ef-95dd-a65df5ee2843\",\"user_name\":\"01347f51-3fcd-11ef-95dd-a65df5ee2843\",\"version\":0,\"updated_since_deployment\":false,\"created_at\":\"2024-12-18T11:48:55.89363Z\",\"updated_at\":\"2024-12-18T11:48:55.89363Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}},{\"id\":\"d595693a-473d-4671-9da3-fce89e3a5c5d\",\"type\":\"appDefinitions\",\"attributes\":{\"description\":\"\",\"favorite\":false,\"name\":\"Max's App Fri, Jul 12, 11:10:35 am\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":7571362,\"user_uuid\":\"3114f3a0-3fc9-11ef-acbe-a6def6551924\",\"user_name\":\"max.gale@datadoghq.com\",\"version\":0,\"updated_since_deployment\":false,\"created_at\":\"2024-07-12T15:10:48.690305Z\",\"updated_at\":\"2024-07-12T15:10:48.690305Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}],\"meta\":{\"page\":{\"totalCount\":2,\"totalFilteredCount\":2}}}", "encoding": null }, "headers": { @@ -26,7 +26,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 10 Dec 2024 19:57:12 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:22 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Update-App-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/apps/Update-App-returns-Bad-Request-response.frozen index 561628303..fd24ecdb5 100644 --- a/tests/scenarios/cassettes/v2/apps/Update-App-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Update-App-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-12-12T20:29:26.349Z \ No newline at end of file +2024-12-20T20:39:22.549Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Update-App-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/apps/Update-App-returns-Bad-Request-response.json index acf146ab6..b273ad554 100644 --- a/tests/scenarios/cassettes/v2/apps/Update-App-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/apps/Update-App-returns-Bad-Request-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"9d2ee93b-6ac5-4b0e-abd8-829916f2365d\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"2eb79081-77f2-4082-93d5-fbb4d2291dc7\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:26 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:22 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"rootInstanceName\":\"\"},\"id\":\"9d2ee93b-6ac5-4b0e-abd8-829916f2365d\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"attributes\":{\"rootInstanceName\":\"\"},\"id\":\"2eb79081-77f2-4082-93d5-fbb4d2291dc7\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -49,7 +49,7 @@ ] }, "method": "patch", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/9d2ee93b-6ac5-4b0e-abd8-829916f2365d" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/2eb79081-77f2-4082-93d5-fbb4d2291dc7" }, "response": { "body": { @@ -66,7 +66,7 @@ "message": "Bad Request" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:26 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:22 GMT" }, { "request": { @@ -77,11 +77,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/9d2ee93b-6ac5-4b0e-abd8-829916f2365d" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/2eb79081-77f2-4082-93d5-fbb4d2291dc7" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"9d2ee93b-6ac5-4b0e-abd8-829916f2365d\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"2eb79081-77f2-4082-93d5-fbb4d2291dc7\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -94,7 +94,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:26 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:22 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/apps/Update-App-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/apps/Update-App-returns-OK-response.frozen index 9a62b8023..b873204c5 100644 --- a/tests/scenarios/cassettes/v2/apps/Update-App-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/apps/Update-App-returns-OK-response.frozen @@ -1 +1 @@ -2024-12-12T20:29:26.986Z \ No newline at end of file +2024-12-20T20:39:23.050Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/apps/Update-App-returns-OK-response.json b/tests/scenarios/cassettes/v2/apps/Update-App-returns-OK-response.json index 0583caf07..8a06772e1 100644 --- a/tests/scenarios/cassettes/v2/apps/Update-App-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/apps/Update-App-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"5a5e6785-d3f8-41bf-9d5d-95a179362e02\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"22653158-3691-4a09-bbd9-f4197f14dd0c\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:26 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:23 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\"},\"id\":\"5a5e6785-d3f8-41bf-9d5d-95a179362e02\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"attributes\":{\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\"},\"id\":\"22653158-3691-4a09-bbd9-f4197f14dd0c\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -49,11 +49,11 @@ ] }, "method": "patch", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/5a5e6785-d3f8-41bf-9d5d-95a179362e02" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/22653158-3691-4a09-bbd9-f4197f14dd0c" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"5a5e6785-d3f8-41bf-9d5d-95a179362e02\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":321813,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"user_name\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":2,\"updated_since_deployment\":false,\"created_at\":\"2024-12-12T20:29:27.115629Z\",\"updated_at\":\"2024-12-12T20:29:27.362767Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", + "string": "{\"data\":{\"id\":\"22653158-3691-4a09-bbd9-f4197f14dd0c\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\",\"version\":2,\"updated_since_deployment\":false,\"created_at\":\"2024-12-20T20:39:23.117622Z\",\"updated_at\":\"2024-12-20T20:39:23.317526Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:26 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:23 GMT" }, { "request": { @@ -77,11 +77,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/5a5e6785-d3f8-41bf-9d5d-95a179362e02" + "uri": "https://api.datadoghq.com/api/v2/app-builder/apps/22653158-3691-4a09-bbd9-f4197f14dd0c" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"5a5e6785-d3f8-41bf-9d5d-95a179362e02\",\"type\":\"appDefinitions\"}}", + "string": "{\"data\":{\"id\":\"22653158-3691-4a09-bbd9-f4197f14dd0c\",\"type\":\"appDefinitions\"}}", "encoding": null }, "headers": { @@ -94,7 +94,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 12 Dec 2024 20:29:26 GMT" + "recorded_at": "Fri, 20 Dec 2024 20:39:23 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/features/v2/apps.feature b/tests/scenarios/features/v2/apps.feature index 531cc3826..1bed411c3 100644 --- a/tests/scenarios/features/v2/apps.feature +++ b/tests/scenarios/features/v2/apps.feature @@ -1,6 +1,9 @@ @endpoint(apps) @endpoint(apps-v2) Feature: Apps - Create, read, update, and delete apps in App Builder. + Datadog App Builder provides a low-code solution to rapidly develop and + integrate secure, customized applications into your monitoring stack that + are built to accelerate remediation at scale. These API endpoints allow + you to create, read, update, delete, and publish apps. Background: Given a valid "apiKeyAuth" key in the system @@ -88,6 +91,56 @@ Feature: Apps And the response "data" has length 1 And the response "data[0].id" has the same value as "app.data.id" + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Bad Request" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And request contains "app_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Created" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 201 Created + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Not Found" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Disable App returns "Bad Request" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And request contains "app_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Disable App returns "Not Found" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Disable App returns "OK" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 200 OK + @skip-typescript @team:DataDog/app-builder-backend Scenario: Get App returns "Bad Request" response Given operation "GetApp" enabled @@ -116,11 +169,11 @@ Feature: Apps And the response "data.type" is equal to "appDefinitions" @generated @skip @team:DataDog/app-builder-backend - Scenario: List Apps returns "Bad Request, e.g. invalid sort parameter" response + Scenario: List Apps returns "Bad Request" response Given operation "ListApps" enabled And new "ListApps" request When the request is sent - Then the response status is 400 Bad Request, e.g. invalid sort parameter + Then the response status is 400 Bad Request @skip-typescript @team:DataDog/app-builder-backend Scenario: List Apps returns "OK" response diff --git a/tests/scenarios/features/v2/given.json b/tests/scenarios/features/v2/given.json index 29503a6ae..3c9e42793 100644 --- a/tests/scenarios/features/v2/given.json +++ b/tests/scenarios/features/v2/given.json @@ -51,7 +51,7 @@ "parameters": [ { "name": "body", - "value": "{\"data\": {\"attributes\": {\"components\": [{\"events\": [], \"name\": \"grid0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"gridCell0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"calloutValue0\", \"properties\": {\"isVisible\": true, \"isDisabled\": false, \"isLoading\": false, \"label\": \"CPU Usage\", \"size\": \"sm\", \"style\": \"vivid_yellow\", \"unit\": \"kB\", \"value\": \"42\"}, \"type\": \"calloutValue\"}], \"isVisible\": \"true\", \"layout\": {\"default\": {\"height\": 8, \"width\": 2, \"x\": 0, \"y\": 0}}}, \"type\": \"gridCell\"}]}, \"type\": \"grid\"}], \"description\": \"This is a simple example app\", \"embeddedQueries\": [], \"name\": \"Example App\", \"rootInstanceName\": \"grid0\"}, \"type\": \"appDefinitions\"}}" + "value": "{\"data\": {\"attributes\": {\"components\": [{\"events\": [], \"name\": \"grid0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"gridCell0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"calloutValue0\", \"properties\": {\"isDisabled\": false, \"isLoading\": false, \"isVisible\": true, \"label\": \"CPU Usage\", \"size\": \"sm\", \"style\": \"vivid_yellow\", \"unit\": \"kB\", \"value\": \"42\"}, \"type\": \"calloutValue\"}], \"isVisible\": \"true\", \"layout\": {\"default\": {\"height\": 8, \"width\": 2, \"x\": 0, \"y\": 0}}}, \"type\": \"gridCell\"}]}, \"type\": \"grid\"}], \"description\": \"This is a simple example app\", \"embeddedQueries\": [], \"name\": \"Example App\", \"rootInstanceName\": \"grid0\"}, \"type\": \"appDefinitions\"}}" } ], "step": "there is a valid \"app\" in the system", diff --git a/tests/scenarios/features/v2/undo.json b/tests/scenarios/features/v2/undo.json index b1ed2db69..08d57ce2b 100644 --- a/tests/scenarios/features/v2/undo.json +++ b/tests/scenarios/features/v2/undo.json @@ -197,13 +197,13 @@ } }, "DisableApp": { - "tag": "App Deployment", + "tag": "Apps", "undo": { "type": "idempotent" } }, "DeployApp": { - "tag": "App Deployment", + "tag": "Apps", "undo": { "type": "idempotent" } diff --git a/tests/scenarios/function_mappings.rs b/tests/scenarios/function_mappings.rs index 43ad48ae7..95d5ec27a 100644 --- a/tests/scenarios/function_mappings.rs +++ b/tests/scenarios/function_mappings.rs @@ -55,7 +55,6 @@ pub struct ApiInstances { pub v2_api_apm_retention_filters: Option, pub v2_api_apps: Option, - pub v2_api_app_deployment: Option, pub v2_api_audit: Option, pub v2_api_authn_mappings: Option, pub v2_api_case_management: Option, @@ -485,14 +484,6 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { world.http_client.as_ref().unwrap().clone(), )); } - "AppDeployment" => { - world.api_instances.v2_api_app_deployment = Some( - datadogV2::api_app_deployment::AppDeploymentAPI::with_client_and_config( - world.config.clone(), - world.http_client.as_ref().unwrap().clone(), - ), - ); - } "Audit" => { world.api_instances.v2_api_audit = Some(datadogV2::api_audit::AuditAPI::with_client_and_config( @@ -11378,6 +11369,9 @@ fn test_v2_list_apps(world: &mut DatadogWorld, _parameters: &HashMap response, @@ -11467,7 +11462,12 @@ fn test_v2_get_app(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -11514,7 +11514,7 @@ fn test_v2_update_app(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_app_deployment + .v2_api_apps .as_ref() .expect("api instance not found"); let app_id = serde_json::from_value(_parameters.get("app_id").unwrap().clone()).unwrap(); @@ -11539,7 +11539,7 @@ fn test_v2_disable_app(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_app_deployment + .v2_api_apps .as_ref() .expect("api instance not found"); let app_id = serde_json::from_value(_parameters.get("app_id").unwrap().clone()).unwrap();