From 977eed86ae55841c48a31d292022779047f69840 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 21:51:24 +0000 Subject: [PATCH 1/6] dependencies: bump antd from 5.17.0 to 5.17.2 Bumps [antd](https://github.com/ant-design/ant-design) from 5.17.0 to 5.17.2. - [Release notes](https://github.com/ant-design/ant-design/releases) - [Changelog](https://github.com/ant-design/ant-design/blob/master/CHANGELOG.en-US.md) - [Commits](https://github.com/ant-design/ant-design/compare/5.17.0...5.17.2) --- updated-dependencies: - dependency-name: antd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 36 ++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 219e18958..8db670b0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@ant-design/icons": "^5.3.7", "@axa-fr/react-oidc": "^7.22.4", "@tanstack/react-query": "^5.36.0", - "antd": "^5.17.0", + "antd": "^5.17.2", "echarts": "5.5.0", "echarts-for-react": "^3.0.2", "rc-field-form": "^2.1.0", @@ -6214,13 +6214,13 @@ } }, "node_modules/antd": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/antd/-/antd-5.17.0.tgz", - "integrity": "sha512-jrzMIcaTJIy12/GJ2PfgchgZGuAlDodlaOKd05/TxEtFilRHnv8oaf0qfqNGG3slvvuy4J/57xn21jM4cLl7Hw==", + "version": "5.17.2", + "resolved": "https://registry.npmjs.org/antd/-/antd-5.17.2.tgz", + "integrity": "sha512-LVCR4kKWoNwaOEfYuWuXqwrK24W6YY6jlzROB4dTEEFvb2ovPi/5h9GcEB8U7ZJY/Yuvm1ehvRm9vohxVJzC3A==", "dependencies": { "@ant-design/colors": "^7.0.2", "@ant-design/cssinjs": "^1.19.1", - "@ant-design/icons": "^5.3.6", + "@ant-design/icons": "^5.3.7", "@ant-design/react-slick": "~1.1.2", "@babel/runtime": "^7.24.5", "@ctrl/tinycolor": "^3.6.1", @@ -6238,7 +6238,7 @@ "rc-dialog": "~9.4.0", "rc-drawer": "~7.1.0", "rc-dropdown": "~4.2.0", - "rc-field-form": "~2.0.0", + "rc-field-form": "~2.0.1", "rc-image": "~7.6.0", "rc-input": "~1.4.5", "rc-input-number": "~9.0.0", @@ -6252,7 +6252,7 @@ "rc-rate": "~2.12.0", "rc-resize-observer": "^1.4.0", "rc-segmented": "~2.3.0", - "rc-select": "~14.13.1", + "rc-select": "~14.13.3", "rc-slider": "~10.6.2", "rc-steps": "~6.0.1", "rc-switch": "~4.1.0", @@ -6260,10 +6260,10 @@ "rc-tabs": "~15.0.0 ", "rc-textarea": "~1.6.3", "rc-tooltip": "~6.2.0", - "rc-tree": "~5.8.5", + "rc-tree": "~5.8.7", "rc-tree-select": "~5.20.0", "rc-upload": "~4.5.2", - "rc-util": "^5.39.1", + "rc-util": "^5.39.3", "scroll-into-view-if-needed": "^3.1.0", "throttle-debounce": "^5.0.0" }, @@ -20651,9 +20651,9 @@ } }, "node_modules/rc-select": { - "version": "14.13.1", - "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.13.1.tgz", - "integrity": "sha512-A1VHqjIOemxLnUGRxLGVqXBs8jGcJemI5NXxOJwU5PQc1wigAu1T4PRLgMkTPDOz8gPhlY9dwsPzMgakMc2QjQ==", + "version": "14.13.3", + "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.13.3.tgz", + "integrity": "sha512-AMEfdE40RhlqahMGN3Q7OKVd1txNph0zIn2Xpvn0ZJiUYafCsqoGv+Rj6v1umgm8ZOEAJ3LefnkznAYNMMzACg==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/trigger": "^2.1.1", @@ -20791,9 +20791,9 @@ } }, "node_modules/rc-tree": { - "version": "5.8.5", - "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-5.8.5.tgz", - "integrity": "sha512-PRfcZtVDNkR7oh26RuNe1hpw11c1wfgzwmPFL0lnxGnYefe9lDAO6cg5wJKIAwyXFVt5zHgpjYmaz0CPy1ZtKg==", + "version": "5.8.7", + "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-5.8.7.tgz", + "integrity": "sha512-cpsIQZ4nNYwpj6cqPRt52e/69URuNdgQF9wZ10InmEf8W3+i0A41OVmZWwHuX9gegQSqj+DPmaDkZFKQZ+ZV1w==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", @@ -20840,9 +20840,9 @@ } }, "node_modules/rc-util": { - "version": "5.39.1", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.39.1.tgz", - "integrity": "sha512-OW/ERynNDgNr4y0oiFmtes3rbEamXw7GHGbkbNd9iRr7kgT03T6fT0b9WpJ3mbxKhyOcAHnGcIoh5u/cjrC2OQ==", + "version": "5.39.3", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.39.3.tgz", + "integrity": "sha512-j9wOELkLQ8gC/NkUg3qg9mHZcJf+5mYYv40JrDHqnaf8VSycji4pCf7kJ5fdTXQPDIF0vr5zpb/T2HdrMs9rWA==", "dependencies": { "@babel/runtime": "^7.18.3", "react-is": "^18.2.0" diff --git a/package.json b/package.json index 54bca1bca..4805d075d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "@ant-design/icons": "^5.3.7", "@axa-fr/react-oidc": "^7.22.4", "@tanstack/react-query": "^5.36.0", - "antd": "^5.17.0", + "antd": "^5.17.2", "echarts": "5.5.0", "echarts-for-react": "^3.0.2", "rc-field-form": "^2.1.0", From 1e26b627c7b114377196df8cbf017681c4573b5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 21:52:17 +0000 Subject: [PATCH 2/6] dependencies: bump @types/node from 20.12.11 to 20.12.12 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.11 to 20.12.12. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 219e18958..9b1cb1900 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "@testing-library/jest-dom": "^6.4.5", "@testing-library/react": "^15.0.7", "@types/jest": "^29.5.12", - "@types/node": "^20.12.11", + "@types/node": "^20.12.12", "@types/react": "^18.3.1", "@types/react-dom": "^18.3.0", "@types/uuid": "^9.0.8", @@ -5237,9 +5237,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz", - "integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==", + "version": "20.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", + "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" diff --git a/package.json b/package.json index 54bca1bca..6b625b136 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@testing-library/jest-dom": "^6.4.5", "@testing-library/react": "^15.0.7", "@types/jest": "^29.5.12", - "@types/node": "^20.12.11", + "@types/node": "^20.12.12", "@types/react": "^18.3.1", "@types/react-dom": "^18.3.0", "@types/uuid": "^9.0.8", From fb4fc8bcffeea89e71df5d5a855544fa9dee0040 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 21:53:05 +0000 Subject: [PATCH 3/6] dependencies: bump knip from 5.15.1 to 5.16.0 Bumps [knip](https://github.com/webpro/knip/tree/HEAD/packages/knip) from 5.15.1 to 5.16.0. - [Release notes](https://github.com/webpro/knip/releases) - [Changelog](https://github.com/webpro/knip/blob/main/packages/knip/.release-it.json) - [Commits](https://github.com/webpro/knip/commits/5.16.0/packages/knip) --- updated-dependencies: - dependency-name: knip dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 219e18958..183caa4ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", - "knip": "^5.15.1", + "knip": "^5.16.0", "openapi-typescript-codegen": "^0.29.0", "prettier": "3.2.5", "react-scripts": "5.0.1", @@ -16590,9 +16590,9 @@ } }, "node_modules/knip": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/knip/-/knip-5.15.1.tgz", - "integrity": "sha512-v6/Bf2qUmZ7pMJb2GjTficHyEjhP2ysIifjM1wgJr2psFbK6Vbxw2/DpeDAcgK9d99kTGh1PUQwoiFd6LHtI6A==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.16.0.tgz", + "integrity": "sha512-kdHfTRZuOqsMnvYYNT+pwefyBUNUYTqgyeGM8k4hfw++GZ3TMRGSPZoSl8IxQTy56AkxEDWyj1/P/mYv1vu/Gw==", "dev": true, "funding": [ { diff --git a/package.json b/package.json index 54bca1bca..b1ea85e76 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", - "knip": "^5.15.1", + "knip": "^5.16.0", "openapi-typescript-codegen": "^0.29.0", "prettier": "3.2.5", "react-scripts": "5.0.1", From f06f139f4fcac178b939d4293c9bbf7fb13ed182 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 21:53:38 +0000 Subject: [PATCH 4/6] dependencies: bump @tanstack/eslint-plugin-query from 5.32.1 to 5.35.6 Bumps [@tanstack/eslint-plugin-query](https://github.com/TanStack/query/tree/HEAD/packages/eslint-plugin-query) from 5.32.1 to 5.35.6. - [Release notes](https://github.com/TanStack/query/releases) - [Commits](https://github.com/TanStack/query/commits/v5.35.6/packages/eslint-plugin-query) --- updated-dependencies: - dependency-name: "@tanstack/eslint-plugin-query" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 219e18958..9cd525940 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "devDependencies": { "@axa-fr/oidc-client": "^7.22.4", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", - "@tanstack/eslint-plugin-query": "^5.32.1", + "@tanstack/eslint-plugin-query": "^5.35.6", "@testing-library/jest-dom": "^6.4.5", "@testing-library/react": "^15.0.7", "@types/jest": "^29.5.12", @@ -4519,9 +4519,9 @@ } }, "node_modules/@tanstack/eslint-plugin-query": { - "version": "5.32.1", - "resolved": "https://registry.npmjs.org/@tanstack/eslint-plugin-query/-/eslint-plugin-query-5.32.1.tgz", - "integrity": "sha512-hlvKBV0JncpoA2HThfiD6OH8pdtn2N7WR74nWmDEuBEV1HMwXDo1QF/h/oKRPheEjzokVI13D3p11Lfw2kQr+g==", + "version": "5.35.6", + "resolved": "https://registry.npmjs.org/@tanstack/eslint-plugin-query/-/eslint-plugin-query-5.35.6.tgz", + "integrity": "sha512-XhVRLsJFJMWYNzArPzy1MWSpx2BSUnc8Zof+fvsgaAnWBy9tjNXH3DFftZoNMGA8Mw1dPIdDPkEQcSku3m80Jw==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^6.20.0" diff --git a/package.json b/package.json index 54bca1bca..e65abfea2 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "devDependencies": { "@axa-fr/oidc-client": "^7.22.4", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", - "@tanstack/eslint-plugin-query": "^5.32.1", + "@tanstack/eslint-plugin-query": "^5.35.6", "@testing-library/jest-dom": "^6.4.5", "@testing-library/react": "^15.0.7", "@types/jest": "^29.5.12", From e565eff481eee597ab11866a17cf58c430b4123d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 03:49:30 +0000 Subject: [PATCH 5/6] dependencies: bump @types/react from 18.3.1 to 18.3.2 Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.1 to 18.3.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1d3e24b18..6b2f898ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "@testing-library/react": "^15.0.7", "@types/jest": "^29.5.12", "@types/node": "^20.12.12", - "@types/react": "^18.3.1", + "@types/react": "^18.3.2", "@types/react-dom": "^18.3.0", "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^7.9.0", @@ -5291,9 +5291,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.1.tgz", - "integrity": "sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==", + "version": "18.3.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.2.tgz", + "integrity": "sha512-Btgg89dAnqD4vV7R3hlwOxgqobUQKgx3MmrQRi0yYbs/P0ym8XozIAlkqVilPqHQwXs4e9Tf63rrCgl58BcO4w==", "devOptional": true, "dependencies": { "@types/prop-types": "*", diff --git a/package.json b/package.json index 7e904dbac..ac8c1dc2a 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@testing-library/react": "^15.0.7", "@types/jest": "^29.5.12", "@types/node": "^20.12.12", - "@types/react": "^18.3.1", + "@types/react": "^18.3.2", "@types/react-dom": "^18.3.0", "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^7.9.0", From 58af36d2951fdaa2ccb4387dc564a9266ef1c6ea Mon Sep 17 00:00:00 2001 From: WangLiNaruto Date: Wed, 15 May 2024 15:44:15 +0800 Subject: [PATCH 6/6] update api --- .../common/DeployedServicesRunningStatus.tsx | 13 +- .../myServices/MyServices.tsx | 10 +- .../query/useServiceStateRestartQuery.ts | 6 - .../query/useServiceStateStartQuery.ts | 6 - .../query/useServiceStateStopQuery.ts | 6 - src/xpanse-api/api.json | 1095 ++++++++++------- src/xpanse-api/generated/index.ts | 3 +- src/xpanse-api/generated/models/Billing.ts | 13 + .../generated/models/DeployedService.ts | 5 +- .../models/DeployedServiceDetails.ts | 5 +- src/xpanse-api/generated/models/Response.ts | 1 + .../generated/models/ServiceLockConfig.ts | 3 - .../ServiceStateManagementTaskDetails.ts | 61 + .../VendorHostedDeployedServiceDetails.ts | 5 +- .../ServiceStatusManagementService.ts | 142 ++- 15 files changed, 870 insertions(+), 504 deletions(-) create mode 100644 src/xpanse-api/generated/models/ServiceStateManagementTaskDetails.ts diff --git a/src/components/content/deployedServices/common/DeployedServicesRunningStatus.tsx b/src/components/content/deployedServices/common/DeployedServicesRunningStatus.tsx index 766a5331b..20ae313b3 100644 --- a/src/components/content/deployedServices/common/DeployedServicesRunningStatus.tsx +++ b/src/components/content/deployedServices/common/DeployedServicesRunningStatus.tsx @@ -9,10 +9,7 @@ import { Row, Tag, Tooltip } from 'antd'; import { PlayCircleOutlined, PoweroffOutlined, StopOutlined, SyncOutlined } from '@ant-design/icons'; export function DeployedServicesRunningStatus(record: DeployedService): React.JSX.Element { - if ( - record.serviceState === DeployedService.serviceState.RUNNING || - record.serviceState === DeployedService.serviceState.STOPPING_FAILED - ) { + if (record.serviceState === DeployedService.serviceState.RUNNING) { return ( ); - } else if ( - record.serviceState === DeployedService.serviceState.STOPPED || - record.serviceState === DeployedService.serviceState.STARTING_FAILED - ) { + } else if (record.serviceState === DeployedService.serviceState.STOPPED) { return ( stopped at - {record.lastStoppedAt}} @@ -39,7 +33,8 @@ export function DeployedServicesRunningStatus(record: DeployedService): React.JS ); } else if ( record.serviceState === DeployedService.serviceState.STOPPING || - record.serviceState === DeployedService.serviceState.STARTING + record.serviceState === DeployedService.serviceState.STARTING || + record.serviceState === DeployedService.serviceState.RESTARTING ) { return ( } color='processing'> diff --git a/src/components/content/deployedServices/myServices/MyServices.tsx b/src/components/content/deployedServices/myServices/MyServices.tsx index 5f4e6025a..e415e298b 100644 --- a/src/components/content/deployedServices/myServices/MyServices.tsx +++ b/src/components/content/deployedServices/myServices/MyServices.tsx @@ -586,10 +586,7 @@ function MyServices(): React.JSX.Element { return true; } - return ( - record.serviceState === DeployedService.serviceState.RUNNING || - record.serviceState === DeployedService.serviceState.STOPPING_FAILED - ); + return record.serviceState === DeployedService.serviceState.RUNNING; }; const isDisabledStopOrRestartBtn = (record: DeployedService) => { @@ -609,10 +606,7 @@ function MyServices(): React.JSX.Element { return true; } - return ( - record.serviceState === DeployedService.serviceState.STOPPED || - record.serviceState === DeployedService.serviceState.STARTING_FAILED - ); + return record.serviceState === DeployedService.serviceState.STOPPED; }; const closeDestroyResultAlert = (isClose: boolean) => { diff --git a/src/components/content/deployedServices/myServices/query/useServiceStateRestartQuery.ts b/src/components/content/deployedServices/myServices/query/useServiceStateRestartQuery.ts index f273e31e2..2d1affe8d 100644 --- a/src/components/content/deployedServices/myServices/query/useServiceStateRestartQuery.ts +++ b/src/components/content/deployedServices/myServices/query/useServiceStateRestartQuery.ts @@ -9,14 +9,8 @@ import { DeployedService, ServiceStatusManagementService } from '../../../../../ export function useServiceStateRestartQuery(refreshData: () => void) { return useMutation({ mutationFn: (deployedService: DeployedService) => { - deployedService.serviceState = DeployedService.serviceState.STOPPING; return ServiceStatusManagementService.restartService(deployedService.id); }, onSuccess: refreshData, - onSettled: (data: DeployedService | undefined, _error, deployedService: DeployedService, _context) => { - if (data) { - deployedService.serviceState = data.serviceState; - } - }, }); } diff --git a/src/components/content/deployedServices/myServices/query/useServiceStateStartQuery.ts b/src/components/content/deployedServices/myServices/query/useServiceStateStartQuery.ts index aaaa23f69..745f551aa 100644 --- a/src/components/content/deployedServices/myServices/query/useServiceStateStartQuery.ts +++ b/src/components/content/deployedServices/myServices/query/useServiceStateStartQuery.ts @@ -9,14 +9,8 @@ import { DeployedService, ServiceStatusManagementService } from '../../../../../ export function useServiceStateStartQuery(refreshData: () => void) { return useMutation({ mutationFn: (deployedService: DeployedService) => { - deployedService.serviceState = DeployedService.serviceState.STARTING; return ServiceStatusManagementService.startService(deployedService.id); }, onSuccess: refreshData, - onSettled: (data: DeployedService | undefined, _error, deployedService: DeployedService, _context) => { - if (data) { - deployedService.serviceState = data.serviceState; - } - }, }); } diff --git a/src/components/content/deployedServices/myServices/query/useServiceStateStopQuery.ts b/src/components/content/deployedServices/myServices/query/useServiceStateStopQuery.ts index 3e92c6119..cf74a9d89 100644 --- a/src/components/content/deployedServices/myServices/query/useServiceStateStopQuery.ts +++ b/src/components/content/deployedServices/myServices/query/useServiceStateStopQuery.ts @@ -9,14 +9,8 @@ import { DeployedService, ServiceStatusManagementService } from '../../../../../ export function useServiceStateStopQuery(refreshData: () => void) { return useMutation({ mutationFn: (deployedService: DeployedService) => { - deployedService.serviceState = DeployedService.serviceState.STOPPING; return ServiceStatusManagementService.stopService(deployedService.id); }, onSuccess: refreshData, - onSettled: (data, _error, variables, _context) => { - if (data) { - variables.serviceState = data.serviceState; - } - }, }); } diff --git a/src/xpanse-api/api.json b/src/xpanse-api/api.json index ea0c6c850..6bc06b977 100644 --- a/src/xpanse-api/api.json +++ b/src/xpanse-api/api.json @@ -20,11 +20,11 @@ "name": "ServiceCatalog", "description": "APIs to query the services which are available for the user to order." }, - { "name": "ServiceStatusManagement", "description": "APIs to manage the service instances" }, { "name": "UserPoliciesManagement", "description": "APIs for managing user's infra policies." }, { "name": "Migration", "description": "APIs to manage the service migration." }, { "name": "Admin", "description": "APIs for administrating Xpanse" }, { "name": "Workflow", "description": "APIs to manage the Workflow" }, + { "name": "ServiceStatusManagement", "description": "APIs to manage status of the service instances" }, { "name": "ISVCloudCredentialsManagement", "description": "APIs for managing isv's cloud provider credentials" @@ -72,14 +72,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -123,14 +123,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -188,14 +188,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -236,14 +236,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -274,14 +274,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -344,14 +344,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -360,12 +360,12 @@ } } }, - "/xpanse/services/stop/{id}": { + "/xpanse/services/stop/{serviceId}": { "put": { "tags": ["ServiceStatusManagement"], - "description": "Start a task to deploy service using registered service template.
Required role: admin or user", + "description": "Start a task to stop the service instance.
Required role: admin or user", "operationId": "stopService", - "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }], + "parameters": [{ "name": "serviceId", "in": "path", "required": true, "schema": { "type": "string" } }], "responses": { "500": { "description": "Internal Server Error", @@ -379,33 +379,31 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/DeployedService" } } - } + "202": { + "description": "Accepted", + "content": { "application/json": { "schema": { "type": "string", "format": "uuid" } } } } } } }, - "/xpanse/services/start/{id}": { + "/xpanse/services/start/{serviceId}": { "put": { "tags": ["ServiceStatusManagement"], - "description": "Start the service by the service id.
Required role: admin or user", + "description": "Start a task to start the service instance.
Required role: admin or user", "operationId": "startService", - "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }], + "parameters": [{ "name": "serviceId", "in": "path", "required": true, "schema": { "type": "string" } }], "responses": { "500": { "description": "Internal Server Error", @@ -419,33 +417,31 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/DeployedService" } } - } + "202": { + "description": "Accepted", + "content": { "application/json": { "schema": { "type": "string", "format": "uuid" } } } } } } }, - "/xpanse/services/restart/{id}": { + "/xpanse/services/restart/{serviceId}": { "put": { "tags": ["ServiceStatusManagement"], - "description": "Start a task to deploy service using registered service template.
Required role: admin or user", + "description": "Start a task to restart the service instance.
Required role: admin or user", "operationId": "restartService", - "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }], + "parameters": [{ "name": "serviceId", "in": "path", "required": true, "schema": { "type": "string" } }], "responses": { "500": { "description": "Internal Server Error", @@ -459,23 +455,21 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/DeployedService" } } - } + "202": { + "description": "Accepted", + "content": { "application/json": { "schema": { "type": "string", "format": "uuid" } } } } } } @@ -511,14 +505,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -563,14 +557,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -606,14 +600,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -656,14 +650,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -702,14 +696,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -754,14 +748,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -804,14 +798,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -844,14 +838,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -896,14 +890,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -934,14 +928,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -969,14 +963,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1019,14 +1013,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1055,14 +1049,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1120,14 +1114,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1168,14 +1162,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1206,14 +1200,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1276,14 +1270,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1388,14 +1382,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1434,14 +1428,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1475,14 +1469,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1586,14 +1580,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1632,14 +1626,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1680,14 +1674,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1728,14 +1722,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1773,14 +1767,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1840,38 +1834,242 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserPolicy" } } + } + } + } + } + }, + "post": { + "tags": ["UserPoliciesManagement"], + "description": "Add policy created by the user.
Required role: admin or user", + "operationId": "addUserPolicy", + "requestBody": { + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/UserPolicyCreateRequest" } } + }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPolicy" } } } + } + } + } + }, + "/xpanse/workflow/tasks": { + "get": { + "tags": ["Workflow"], + "description": "Query all tasks of the given user
Required role: admin or user", + "operationId": "queryTasks", + "parameters": [ + { + "name": "status", + "in": "query", + "description": "the status of task", + "required": false, + "schema": { "type": "string", "enum": ["done", "failed"] } + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkFlowTask" } } + } + } + } + } + } + }, + "/xpanse/services/{serviceId}/tasks": { + "get": { + "tags": ["ServiceStatusManagement"], + "description": "List state management tasks of the service.
Required role: admin or user", + "operationId": "listServiceStateManagementTasks", + "parameters": [ + { + "name": "serviceId", + "in": "path", + "description": "id of the service", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "taskType", + "in": "query", + "description": "type of the management task", + "required": false, + "schema": { "type": "string", "enum": ["start", "stop", "restart"] } + }, + { + "name": "taskStatus", + "in": "query", + "description": "status of the management task", + "required": false, + "schema": { "type": "string", "enum": ["created", "in progress", "successful", "failed"] } + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/ServiceStateManagementTaskDetails" } + } + } + } + } + } + }, + "delete": { + "tags": ["ServiceStatusManagement"], + "description": "Delete all state management tasks of the service.
Required role: admin or user", + "operationId": "deleteManagementTasksByServiceId", + "parameters": [ + { + "name": "serviceId", + "in": "path", + "description": "id of the service", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserPolicy" } } - } - } - } + "204": { "description": "No Content" } } - }, - "post": { - "tags": ["UserPoliciesManagement"], - "description": "Add policy created by the user.
Required role: admin or user", - "operationId": "addUserPolicy", - "requestBody": { - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/UserPolicyCreateRequest" } } - }, - "required": true - }, + } + }, + "/xpanse/services/tasks/{taskId}": { + "get": { + "tags": ["ServiceStatusManagement"], + "description": "Get state management task details by the task id.
Required role: admin or user", + "operationId": "getManagementTaskDetailsByTaskId", + "parameters": [ + { + "name": "taskId", + "in": "path", + "description": "id of the task", + "required": true, + "schema": { "type": "string" } + } + ], "responses": { "500": { "description": "Internal Server Error", @@ -1885,37 +2083,39 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "200": { "description": "OK", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPolicy" } } } + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ServiceStateManagementTaskDetails" } + } + } } } - } - }, - "/xpanse/workflow/tasks": { - "get": { - "tags": ["Workflow"], - "description": "Query all tasks of the given user
Required role: admin or user", - "operationId": "queryTasks", + }, + "delete": { + "tags": ["ServiceStatusManagement"], + "description": "Delete service state management task by the task id.
Required role: admin or user", + "operationId": "deleteManagementTaskByTaskId", "parameters": [ { - "name": "status", - "in": "query", - "description": "the status of task", - "required": false, - "schema": { "type": "string", "enum": ["done", "failed"] } + "name": "taskId", + "in": "path", + "description": "id of the task", + "required": true, + "schema": { "type": "string" } } ], "responses": { @@ -1931,26 +2131,19 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkFlowTask" } } - } - } - } + "204": { "description": "No Content" } } } }, @@ -2021,14 +2214,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2074,14 +2267,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2191,14 +2384,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2244,14 +2437,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2361,14 +2554,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2414,14 +2607,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2464,14 +2657,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2557,14 +2750,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2598,14 +2791,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2635,14 +2828,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2746,14 +2939,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2799,14 +2992,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2887,14 +3080,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2954,14 +3147,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3024,14 +3217,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3099,14 +3292,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3164,14 +3357,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3278,14 +3471,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3337,14 +3530,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3377,14 +3570,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3430,14 +3623,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3469,14 +3662,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3504,14 +3697,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3542,14 +3735,14 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3623,6 +3816,7 @@ "Eula Not Accepted", "Service Flavor Downgrade Not Allowed", "Billing Mode Not Supported", + "Service State Management Task Not Found", "Invalid Git Repo Details" ] }, @@ -3691,119 +3885,6 @@ }, "description": "The variables list of the credential" }, - "DeployedService": { - "required": [ - "category", - "createTime", - "csp", - "id", - "lastModifiedTime", - "name", - "serviceDeploymentState", - "serviceHostingType", - "serviceState", - "version" - ], - "type": "object", - "properties": { - "id": { "type": "string", "description": "The ID of the service", "format": "uuid" }, - "category": { - "type": "string", - "description": "The catalog of the service", - "enum": [ - "ai", - "compute", - "container", - "storage", - "network", - "database", - "mediaService", - "security", - "middleware", - "others" - ] - }, - "name": { "type": "string", "description": "The name of the service" }, - "customerServiceName": { - "type": "string", - "description": "Customer's name for the service. Used only for customer's reference.If not provided, this value will be auto-generated" - }, - "version": { "type": "string", "description": "The version of the service" }, - "csp": { - "type": "string", - "description": "The provider of the service", - "enum": ["huawei", "flexibleEngine", "openstack", "scs", "alicloud", "aws", "azure", "google"] - }, - "flavor": { "type": "string", "description": "The flavor of the service" }, - "serviceTemplateId": { - "type": "string", - "description": "The id of the Service Template", - "format": "uuid" - }, - "userId": { "type": "string", "description": "The id of the user who deployed the service." }, - "serviceDeploymentState": { - "type": "string", - "description": "The deployment state of the service", - "enum": [ - "deploying", - "deployment successful", - "deployment failed", - "destroying", - "destroy successful", - "destroy failed", - "manual cleanup required", - "rollback failed", - "modifying", - "modification failed", - "modification successful" - ] - }, - "serviceState": { - "type": "string", - "description": "The run state of the service", - "enum": [ - "not running", - "running", - "starting", - "starting failed", - "stopping", - "stopped", - "stopping failed" - ] - }, - "serviceHostingType": { - "type": "string", - "description": "Defines which cloud service account is used for deploying cloud resources.", - "enum": ["self", "service-vendor"] - }, - "createTime": { - "type": "string", - "description": "Time of register service.", - "format": "date-time" - }, - "lastModifiedTime": { - "type": "string", - "description": "Time of update service.", - "format": "date-time" - }, - "lastStartedAt": { - "type": "string", - "description": "Time of start service.", - "format": "date-time" - }, - "lastStoppedAt": { - "type": "string", - "description": "Time of stop service.", - "format": "date-time" - }, - "lockConfig": { "$ref": "#/components/schemas/ServiceLockConfig" } - } - }, - "ServiceLockConfig": { - "type": "object", - "properties": { "modifyLocked": { "type": "boolean" }, "destroyLocked": { "type": "boolean" } }, - "description": "The locks whether the service can be modified or destroyed." - }, "ModifyRequest": { "type": "object", "properties": { @@ -3819,6 +3900,10 @@ } } }, + "ServiceLockConfig": { + "type": "object", + "properties": { "modifyLocked": { "type": "boolean" }, "destroyLocked": { "type": "boolean" } } + }, "AutoFill": { "required": ["deployResourceKind", "isAllowCreate"], "type": "object", @@ -3869,6 +3954,11 @@ "description": "Supported billing modes by the managed service", "enum": ["Fixed", "Pay per Use"] } + }, + "defaultBillingMode": { + "type": "string", + "description": " This is used only for display purposes. When provided, this billingMode will be selected in the frontends by default.", + "enum": ["Fixed", "Pay per Use"] } }, "description": "The billing policy of the managed service" @@ -4694,6 +4784,145 @@ } } }, + "DeployedService": { + "required": [ + "category", + "createTime", + "csp", + "id", + "lastModifiedTime", + "name", + "serviceDeploymentState", + "serviceHostingType", + "serviceState", + "version" + ], + "type": "object", + "properties": { + "id": { "type": "string", "description": "The ID of the service", "format": "uuid" }, + "category": { + "type": "string", + "description": "The catalog of the service", + "enum": [ + "ai", + "compute", + "container", + "storage", + "network", + "database", + "mediaService", + "security", + "middleware", + "others" + ] + }, + "name": { "type": "string", "description": "The name of the service" }, + "customerServiceName": { + "type": "string", + "description": "Customer's name for the service. Used only for customer's reference.If not provided, this value will be auto-generated" + }, + "version": { "type": "string", "description": "The version of the service" }, + "csp": { + "type": "string", + "description": "The provider of the service", + "enum": ["huawei", "flexibleEngine", "openstack", "scs", "alicloud", "aws", "azure", "google"] + }, + "flavor": { "type": "string", "description": "The flavor of the service" }, + "serviceTemplateId": { + "type": "string", + "description": "The id of the Service Template", + "format": "uuid" + }, + "userId": { "type": "string", "description": "The id of the user who deployed the service." }, + "serviceDeploymentState": { + "type": "string", + "description": "The deployment state of the service", + "enum": [ + "deploying", + "deployment successful", + "deployment failed", + "destroying", + "destroy successful", + "destroy failed", + "manual cleanup required", + "rollback failed", + "modifying", + "modification failed", + "modification successful" + ] + }, + "serviceState": { + "type": "string", + "description": "The run state of the service", + "enum": ["not running", "running", "starting", "stopping", "stopped", "restarting"] + }, + "serviceHostingType": { + "type": "string", + "description": "Defines which cloud service account is used for deploying cloud resources.", + "enum": ["self", "service-vendor"] + }, + "createTime": { + "type": "string", + "description": "Time of register service.", + "format": "date-time" + }, + "lastModifiedTime": { + "type": "string", + "description": "Time of update service.", + "format": "date-time" + }, + "lastStartedAt": { + "type": "string", + "description": "Time of start service.", + "format": "date-time" + }, + "lastStoppedAt": { + "type": "string", + "description": "Time of stop service.", + "format": "date-time" + }, + "lockConfig": { "$ref": "#/components/schemas/ServiceLockConfig" }, + "latestRunningManagementTask": { "$ref": "#/components/schemas/ServiceStateManagementTaskDetails" } + } + }, + "ServiceStateManagementTaskDetails": { + "required": ["completedTime", "serviceId", "startedTime", "taskId", "taskStatus", "taskType"], + "type": "object", + "properties": { + "taskId": { + "type": "string", + "description": "The id of the service state management task.", + "format": "uuid" + }, + "serviceId": { + "type": "string", + "description": "The id of the deployed service.", + "format": "uuid" + }, + "taskType": { + "type": "string", + "description": "The type of the service state management task.", + "enum": ["start", "stop", "restart"] + }, + "taskStatus": { + "type": "string", + "description": "The status of the service state management task.", + "enum": ["created", "in progress", "successful", "failed"] + }, + "errorMsg": { "type": "string", "description": "The error message of the failed management task." }, + "startedTime": { + "type": "string", + "description": "The started time of the task.", + "format": "date-time" + }, + "completedTime": { + "type": "string", + "description": "The completed time of the task.", + "format": "date-time" + } + }, + "description": "The latest running service management task details." + }, "ServiceMigrationDetails": { "required": [ "createTime", @@ -4849,15 +5078,7 @@ "serviceState": { "type": "string", "description": "The run state of the service", - "enum": [ - "not running", - "running", - "starting", - "starting failed", - "stopping", - "stopped", - "stopping failed" - ] + "enum": ["not running", "running", "starting", "stopping", "stopped", "restarting"] }, "serviceHostingType": { "type": "string", @@ -4885,6 +5106,7 @@ "format": "date-time" }, "lockConfig": { "$ref": "#/components/schemas/ServiceLockConfig" }, + "latestRunningManagementTask": { "$ref": "#/components/schemas/ServiceStateManagementTaskDetails" }, "deployRequest": { "$ref": "#/components/schemas/DeployRequest" }, "deployResources": { "type": "array", @@ -4973,15 +5195,7 @@ "serviceState": { "type": "string", "description": "The run state of the service", - "enum": [ - "not running", - "running", - "starting", - "starting failed", - "stopping", - "stopped", - "stopping failed" - ] + "enum": ["not running", "running", "starting", "stopping", "stopped", "restarting"] }, "serviceHostingType": { "type": "string", @@ -5009,6 +5223,7 @@ "format": "date-time" }, "lockConfig": { "$ref": "#/components/schemas/ServiceLockConfig" }, + "latestRunningManagementTask": { "$ref": "#/components/schemas/ServiceStateManagementTaskDetails" }, "deployRequest": { "$ref": "#/components/schemas/DeployRequest" }, "deployedServiceProperties": { "type": "object", diff --git a/src/xpanse-api/generated/index.ts b/src/xpanse-api/generated/index.ts index 5fa0a105c..5ccf1b7f9 100644 --- a/src/xpanse-api/generated/index.ts +++ b/src/xpanse-api/generated/index.ts @@ -16,7 +16,7 @@ export { AbstractCredentialInfo } from './models/AbstractCredentialInfo'; export { AutoFill } from './models/AutoFill'; export type { AvailabilityZoneConfig } from './models/AvailabilityZoneConfig'; export { BackendSystemStatus } from './models/BackendSystemStatus'; -export type { Billing } from './models/Billing'; +export { Billing } from './models/Billing'; export { CloudServiceProvider } from './models/CloudServiceProvider'; export { CreateCredential } from './models/CreateCredential'; export type { CredentialVariable } from './models/CredentialVariable'; @@ -52,6 +52,7 @@ export type { ServicePolicy } from './models/ServicePolicy'; export type { ServicePolicyCreateRequest } from './models/ServicePolicyCreateRequest'; export type { ServicePolicyUpdateRequest } from './models/ServicePolicyUpdateRequest'; export type { ServiceProviderContactDetails } from './models/ServiceProviderContactDetails'; +export { ServiceStateManagementTaskDetails } from './models/ServiceStateManagementTaskDetails'; export { ServiceTemplateDetailVo } from './models/ServiceTemplateDetailVo'; export { SystemStatus } from './models/SystemStatus'; export type { TokenResponse } from './models/TokenResponse'; diff --git a/src/xpanse-api/generated/models/Billing.ts b/src/xpanse-api/generated/models/Billing.ts index 5c11e89a0..28f82f191 100644 --- a/src/xpanse-api/generated/models/Billing.ts +++ b/src/xpanse-api/generated/models/Billing.ts @@ -15,4 +15,17 @@ export type Billing = { * Supported billing modes by the managed service */ billingModes: Array<'Fixed' | 'Pay per Use'>; + /** + * This is used only for display purposes. When provided, this billingMode will be selected in the frontends by default. + */ + defaultBillingMode?: Billing.defaultBillingMode; }; +export namespace Billing { + /** + * This is used only for display purposes. When provided, this billingMode will be selected in the frontends by default. + */ + export enum defaultBillingMode { + FIXED = 'Fixed', + PAY_PER_USE = 'Pay per Use', + } +} diff --git a/src/xpanse-api/generated/models/DeployedService.ts b/src/xpanse-api/generated/models/DeployedService.ts index 47ea89e68..f94423e0b 100644 --- a/src/xpanse-api/generated/models/DeployedService.ts +++ b/src/xpanse-api/generated/models/DeployedService.ts @@ -8,6 +8,7 @@ /* tslint:disable */ /* eslint-disable */ import type { ServiceLockConfig } from './ServiceLockConfig'; +import type { ServiceStateManagementTaskDetails } from './ServiceStateManagementTaskDetails'; export type DeployedService = { /** * The ID of the service @@ -74,6 +75,7 @@ export type DeployedService = { */ lastStoppedAt?: string; lockConfig?: ServiceLockConfig; + latestRunningManagementTask?: ServiceStateManagementTaskDetails; }; export namespace DeployedService { /** @@ -127,10 +129,9 @@ export namespace DeployedService { NOT_RUNNING = 'not running', RUNNING = 'running', STARTING = 'starting', - STARTING_FAILED = 'starting failed', STOPPING = 'stopping', STOPPED = 'stopped', - STOPPING_FAILED = 'stopping failed', + RESTARTING = 'restarting', } /** * Defines which cloud service account is used for deploying cloud resources. diff --git a/src/xpanse-api/generated/models/DeployedServiceDetails.ts b/src/xpanse-api/generated/models/DeployedServiceDetails.ts index a4876b530..519a9dfc9 100644 --- a/src/xpanse-api/generated/models/DeployedServiceDetails.ts +++ b/src/xpanse-api/generated/models/DeployedServiceDetails.ts @@ -10,6 +10,7 @@ import type { DeployRequest } from './DeployRequest'; import type { DeployResource } from './DeployResource'; import type { ServiceLockConfig } from './ServiceLockConfig'; +import type { ServiceStateManagementTaskDetails } from './ServiceStateManagementTaskDetails'; export type DeployedServiceDetails = { /** * The ID of the service @@ -76,6 +77,7 @@ export type DeployedServiceDetails = { */ lastStoppedAt?: string; lockConfig?: ServiceLockConfig; + latestRunningManagementTask?: ServiceStateManagementTaskDetails; deployRequest: DeployRequest; /** * The resource list of the deployed service. @@ -142,10 +144,9 @@ export namespace DeployedServiceDetails { NOT_RUNNING = 'not running', RUNNING = 'running', STARTING = 'starting', - STARTING_FAILED = 'starting failed', STOPPING = 'stopping', STOPPED = 'stopped', - STOPPING_FAILED = 'stopping failed', + RESTARTING = 'restarting', } /** * Defines which cloud service account is used for deploying cloud resources. diff --git a/src/xpanse-api/generated/models/Response.ts b/src/xpanse-api/generated/models/Response.ts index 4692c69d0..1bc3e2ccd 100644 --- a/src/xpanse-api/generated/models/Response.ts +++ b/src/xpanse-api/generated/models/Response.ts @@ -77,6 +77,7 @@ export namespace Response { EULA_NOT_ACCEPTED = 'Eula Not Accepted', SERVICE_FLAVOR_DOWNGRADE_NOT_ALLOWED = 'Service Flavor Downgrade Not Allowed', BILLING_MODE_NOT_SUPPORTED = 'Billing Mode Not Supported', + SERVICE_STATE_MANAGEMENT_TASK_NOT_FOUND = 'Service State Management Task Not Found', INVALID_GIT_REPO_DETAILS = 'Invalid Git Repo Details', } } diff --git a/src/xpanse-api/generated/models/ServiceLockConfig.ts b/src/xpanse-api/generated/models/ServiceLockConfig.ts index 4be295640..661390ee6 100644 --- a/src/xpanse-api/generated/models/ServiceLockConfig.ts +++ b/src/xpanse-api/generated/models/ServiceLockConfig.ts @@ -7,9 +7,6 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -/** - * The locks whether the service can be modified or destroyed. - */ export type ServiceLockConfig = { modifyLocked?: boolean; destroyLocked?: boolean; diff --git a/src/xpanse-api/generated/models/ServiceStateManagementTaskDetails.ts b/src/xpanse-api/generated/models/ServiceStateManagementTaskDetails.ts new file mode 100644 index 000000000..fa443be67 --- /dev/null +++ b/src/xpanse-api/generated/models/ServiceStateManagementTaskDetails.ts @@ -0,0 +1,61 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The latest running service management task details. + */ +export type ServiceStateManagementTaskDetails = { + /** + * The id of the service state management task. + */ + taskId: string; + /** + * The id of the deployed service. + */ + serviceId: string; + /** + * The type of the service state management task. + */ + taskType: ServiceStateManagementTaskDetails.taskType; + /** + * The status of the service state management task. + */ + taskStatus: ServiceStateManagementTaskDetails.taskStatus; + /** + * The error message of the failed management task. + */ + errorMsg?: string; + /** + * The started time of the task. + */ + startedTime: string; + /** + * The completed time of the task. + */ + completedTime: string; +}; +export namespace ServiceStateManagementTaskDetails { + /** + * The type of the service state management task. + */ + export enum taskType { + START = 'start', + STOP = 'stop', + RESTART = 'restart', + } + /** + * The status of the service state management task. + */ + export enum taskStatus { + CREATED = 'created', + IN_PROGRESS = 'in progress', + SUCCESSFUL = 'successful', + FAILED = 'failed', + } +} diff --git a/src/xpanse-api/generated/models/VendorHostedDeployedServiceDetails.ts b/src/xpanse-api/generated/models/VendorHostedDeployedServiceDetails.ts index 7d0002367..1b7590d25 100644 --- a/src/xpanse-api/generated/models/VendorHostedDeployedServiceDetails.ts +++ b/src/xpanse-api/generated/models/VendorHostedDeployedServiceDetails.ts @@ -9,6 +9,7 @@ /* eslint-disable */ import type { DeployRequest } from './DeployRequest'; import type { ServiceLockConfig } from './ServiceLockConfig'; +import type { ServiceStateManagementTaskDetails } from './ServiceStateManagementTaskDetails'; export type VendorHostedDeployedServiceDetails = { /** * The ID of the service @@ -75,6 +76,7 @@ export type VendorHostedDeployedServiceDetails = { */ lastStoppedAt?: string; lockConfig?: ServiceLockConfig; + latestRunningManagementTask?: ServiceStateManagementTaskDetails; deployRequest: DeployRequest; /** * The properties of the deployed service. @@ -133,10 +135,9 @@ export namespace VendorHostedDeployedServiceDetails { NOT_RUNNING = 'not running', RUNNING = 'running', STARTING = 'starting', - STARTING_FAILED = 'starting failed', STOPPING = 'stopping', STOPPED = 'stopped', - STOPPING_FAILED = 'stopping failed', + RESTARTING = 'restarting', } /** * Defines which cloud service account is used for deploying cloud resources. diff --git a/src/xpanse-api/generated/services/ServiceStatusManagementService.ts b/src/xpanse-api/generated/services/ServiceStatusManagementService.ts index 1488b5633..044068b20 100644 --- a/src/xpanse-api/generated/services/ServiceStatusManagementService.ts +++ b/src/xpanse-api/generated/services/ServiceStatusManagementService.ts @@ -7,23 +7,23 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { DeployedService } from '../models/DeployedService'; +import type { ServiceStateManagementTaskDetails } from '../models/ServiceStateManagementTaskDetails'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class ServiceStatusManagementService { /** - * Start a task to deploy service using registered service template.
Required role: admin or user - * @param id - * @returns DeployedService OK + * Start a task to stop the service instance.
Required role: admin or user + * @param serviceId + * @returns string Accepted * @throws ApiError */ - public static stopService(id: string): CancelablePromise { + public static stopService(serviceId: string): CancelablePromise { return __request(OpenAPI, { method: 'PUT', - url: '/xpanse/services/stop/{id}', + url: '/xpanse/services/stop/{serviceId}', path: { - id: id, + serviceId: serviceId, }, errors: { 400: `Bad Request`, @@ -36,17 +36,17 @@ export class ServiceStatusManagementService { }); } /** - * Start the service by the service id.
Required role: admin or user - * @param id - * @returns DeployedService OK + * Start a task to start the service instance.
Required role: admin or user + * @param serviceId + * @returns string Accepted * @throws ApiError */ - public static startService(id: string): CancelablePromise { + public static startService(serviceId: string): CancelablePromise { return __request(OpenAPI, { method: 'PUT', - url: '/xpanse/services/start/{id}', + url: '/xpanse/services/start/{serviceId}', path: { - id: id, + serviceId: serviceId, }, errors: { 400: `Bad Request`, @@ -59,17 +59,121 @@ export class ServiceStatusManagementService { }); } /** - * Start a task to deploy service using registered service template.
Required role: admin or user - * @param id - * @returns DeployedService OK + * Start a task to restart the service instance.
Required role: admin or user + * @param serviceId + * @returns string Accepted * @throws ApiError */ - public static restartService(id: string): CancelablePromise { + public static restartService(serviceId: string): CancelablePromise { return __request(OpenAPI, { method: 'PUT', - url: '/xpanse/services/restart/{id}', + url: '/xpanse/services/restart/{serviceId}', path: { - id: id, + serviceId: serviceId, + }, + errors: { + 400: `Bad Request`, + 401: `Unauthorized`, + 403: `Forbidden`, + 422: `Unprocessable Entity`, + 500: `Internal Server Error`, + 502: `Bad Gateway`, + }, + }); + } + /** + * List state management tasks of the service.
Required role: admin or user + * @param serviceId id of the service + * @param taskType type of the management task + * @param taskStatus status of the management task + * @returns ServiceStateManagementTaskDetails OK + * @throws ApiError + */ + public static listServiceStateManagementTasks( + serviceId: string, + taskType?: 'start' | 'stop' | 'restart', + taskStatus?: 'created' | 'in progress' | 'successful' | 'failed' + ): CancelablePromise> { + return __request(OpenAPI, { + method: 'GET', + url: '/xpanse/services/{serviceId}/tasks', + path: { + serviceId: serviceId, + }, + query: { + taskType: taskType, + taskStatus: taskStatus, + }, + errors: { + 400: `Bad Request`, + 401: `Unauthorized`, + 403: `Forbidden`, + 422: `Unprocessable Entity`, + 500: `Internal Server Error`, + 502: `Bad Gateway`, + }, + }); + } + /** + * Delete all state management tasks of the service.
Required role: admin or user + * @param serviceId id of the service + * @returns void + * @throws ApiError + */ + public static deleteManagementTasksByServiceId(serviceId: string): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/xpanse/services/{serviceId}/tasks', + path: { + serviceId: serviceId, + }, + errors: { + 400: `Bad Request`, + 401: `Unauthorized`, + 403: `Forbidden`, + 422: `Unprocessable Entity`, + 500: `Internal Server Error`, + 502: `Bad Gateway`, + }, + }); + } + /** + * Get state management task details by the task id.
Required role: admin or user + * @param taskId id of the task + * @returns ServiceStateManagementTaskDetails OK + * @throws ApiError + */ + public static getManagementTaskDetailsByTaskId( + taskId: string + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/xpanse/services/tasks/{taskId}', + path: { + taskId: taskId, + }, + errors: { + 400: `Bad Request`, + 401: `Unauthorized`, + 403: `Forbidden`, + 422: `Unprocessable Entity`, + 500: `Internal Server Error`, + 502: `Bad Gateway`, + }, + }); + } + /** + * Delete service state management task by the task id.
Required role: admin or user + * @param taskId id of the task + * @returns void + * @throws ApiError + */ + public static deleteManagementTaskByTaskId(taskId: string): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/xpanse/services/tasks/{taskId}', + path: { + taskId: taskId, }, errors: { 400: `Bad Request`,