From dd304bd61e5e9cbb50991361e46c4ffff65c566d Mon Sep 17 00:00:00 2001 From: WangLiNaruto Date: Thu, 13 Jun 2024 16:10:47 +0800 Subject: [PATCH] Add retry option to deployed services --- .../myServices/MyServices.tsx | 74 ++ .../content/order/create/OrderSubmit.tsx | 9 +- .../order/orderStatus/OrderSubmitResult.tsx | 60 +- .../orderStatus/OrderSubmitStatusAlert.tsx | 4 + .../RetryDeployServiceStatusAlert.tsx | 184 +++++ .../useRedeployFailedDeploymentQuery.ts | 15 + src/xpanse-api/api.json | 770 +++++++----------- src/xpanse-api/generated/index.ts | 1 - .../generated/services/ServiceService.ts | 23 + 9 files changed, 678 insertions(+), 462 deletions(-) create mode 100644 src/components/content/order/retryDeployment/RetryDeployServiceStatusAlert.tsx create mode 100644 src/components/content/order/retryDeployment/useRedeployFailedDeploymentQuery.ts diff --git a/src/components/content/deployedServices/myServices/MyServices.tsx b/src/components/content/deployedServices/myServices/MyServices.tsx index 1b12675f..d1c2ed18 100644 --- a/src/components/content/deployedServices/myServices/MyServices.tsx +++ b/src/components/content/deployedServices/myServices/MyServices.tsx @@ -66,6 +66,8 @@ import { MyServiceDetails } from './MyServiceDetails'; import { MyServiceHistory } from './MyServiceHistory'; import useGetOrderableServiceDetailsQuery from './query/useGetOrderableServiceDetailsQuery'; import useListDeployedServicesDetailsQuery from './query/useListDeployedServicesDetailsQuery'; +import useRedeployFailedDeploymentQuery from "../../order/retryDeployment/useRedeployFailedDeploymentQuery"; +import RetryDeployServiceStatusAlert from "../../order/retryDeployment/RetryDeployServiceStatusAlert"; function MyServices(): React.JSX.Element { const [urlParams] = useSearchParams(); @@ -90,6 +92,7 @@ function MyServices(): React.JSX.Element { const [isStopRequestSubmitted, setIsStopRequestSubmitted] = useState(false); const [isRestartRequestSubmitted, setIsRestartRequestSubmitted] = useState(false); const [isDestroyRequestSubmitted, setIsDestroyRequestSubmitted] = useState(false); + const [isRetryDeployRequestSubmitted, setIsRetryDeployRequestSubmitted] = useState(false); const [isPurgeRequestSubmitted, setIsPurgeRequestSubmitted] = useState(false); const [isMyServiceDetailsModalOpen, setIsMyServiceDetailsModalOpen] = useState(false); const [isMyServiceHistoryModalOpen, setIsMyServiceHistoryModalOpen] = useState(false); @@ -99,6 +102,7 @@ function MyServices(): React.JSX.Element { const [isLocksModalOpen, setIsLocksModalOpen] = useState(false); const serviceDestroyQuery = useDestroyRequestSubmitQuery(); const servicePurgeQuery = usePurgeRequestSubmitQuery(); + const redeployFailedDeploymentQuery = useRedeployFailedDeploymentQuery(); const serviceStateStartQuery = useServiceStateStartQuery(refreshData); const serviceStateStopQuery = useServiceStateStopQuery(refreshData); const serviceStateRestartQuery = useServiceStateRestartQuery(refreshData); @@ -116,6 +120,16 @@ function MyServices(): React.JSX.Element { ] ); + const getRetryDeployServiceDetailsByIdQuery = useServiceDetailsPollingQuery( + activeRecord?.serviceId, + redeployFailedDeploymentQuery.isSuccess, + activeRecord?.serviceHostingType ?? DeployedService.serviceHostingType.SELF, + [ + DeployedServiceDetails.serviceDeploymentState.DEPLOYMENT_SUCCESSFUL, + DeployedServiceDetails.serviceDeploymentState.DEPLOYMENT_FAILED, + ] + ); + const getStartServiceDetailsQuery = useServiceDetailsByServiceStatePollingQuery( activeRecord?.serviceId, serviceStateStartQuery.isSuccess, @@ -518,6 +532,30 @@ function MyServices(): React.JSX.Element { ), }, + { + key: 'retryDeployment', + label: record.serviceDeploymentState.toString() === + DeployedService.serviceDeploymentState.DEPLOYMENT_FAILED.toString() ?( + { + retryDeployment(record); + }} + > + + + ):(<>), + }, { key: 'start', label: ( @@ -636,6 +674,13 @@ function MyServices(): React.JSX.Element { return true; }; + const isDisableRetryDeploymentBtn = (record: DeployedService) => { + if(record.serviceDeploymentState === DeployedService.serviceDeploymentState.DEPLOYING){ + return true; + } + return false; + } + const isDisableStartBtn = (record: DeployedService) => { if ( record.serviceDeploymentState !== DeployedService.serviceDeploymentState.DEPLOYMENT_SUCCESSFUL && @@ -700,6 +745,14 @@ function MyServices(): React.JSX.Element { } }; + const closeRetryDeployResultAlert = (isClose: boolean) => { + if (isClose) { + setActiveRecord(undefined); + refreshData(); + setIsRetryDeployRequestSubmitted(false); + } + }; + const closeStartResultAlert = (isClose: boolean) => { if (isClose) { setActiveRecord(undefined); @@ -942,6 +995,17 @@ function MyServices(): React.JSX.Element { record.serviceDeploymentState = DeployedService.serviceDeploymentState.DESTROYING; } + function retryDeployment(record: DeployedService):void{ + setIsRetryDeployRequestSubmitted(true); + setActiveRecord( + record.serviceHostingType === DeployedService.serviceHostingType.SELF + ? (record as DeployedServiceDetails) + : (record as VendorHostedDeployedServiceDetails) + ); + redeployFailedDeploymentQuery.mutate(record.serviceId); + record.serviceDeploymentState = DeployedService.serviceDeploymentState.DEPLOYING; + } + function start(record: DeployedService): void { setIsStartRequestSubmitted(true); setActiveRecord( @@ -1271,6 +1335,16 @@ function MyServices(): React.JSX.Element { closeDestroyResultAlert={closeDestroyResultAlert} /> ) : null} + {isRetryDeployRequestSubmitted && activeRecord ? ( + + ) : null} {isStartRequestSubmitted && activeRecord ? ( void; + deployedServiceDetails: DeployedServiceDetails | undefined; }): React.JSX.Element => { + const redeployFailedDeploymentQuery = useRedeployFailedDeploymentQuery(); + stopWatch = useStopwatch({ + autoStart: true, + }); + const reDeploymentService = () => { + redeployFailedDeploymentQuery.mutate(uuid); + }; + + if (redeployFailedDeploymentQuery.isSuccess) { + retryRequest(); + } + if (deployedServiceDetails) { + if ( + deployedServiceDetails.serviceDeploymentState.toString() === + DeployedServiceDetails.serviceDeploymentState.DEPLOYMENT_FAILED.toString() || + deployedServiceDetails.serviceDeploymentState.toString() === + DeployedServiceDetails.serviceDeploymentState.ROLLBACK_FAILED.toString() || + deployedServiceDetails.serviceDeploymentState.toString() === + DeployedServiceDetails.serviceDeploymentState.DEPLOYMENT_SUCCESSFUL.toString() + ) { + if (stopWatch.isRunning) { + stopWatch.pause(); + } + } + + if ( + deployedServiceDetails.serviceDeploymentState.toString() === + DeployedServiceDetails.serviceDeploymentState.DEPLOYING.toString() + ) { + if (!stopWatch.isRunning) { + stopWatch.start(); + } + } + } + return (
{' '} @@ -37,6 +78,19 @@ export const OrderSubmitResult = ({ type={type} action={ <> + {type === 'error' ? ( + + ) : ( + <> + )} {contactServiceDetails !== undefined ? ( void; }): React.JSX.Element { const stopWatch = useStopwatch({ autoStart: true, @@ -121,6 +123,8 @@ function OrderSubmitStatusAlert({ type={alertType} stopWatch={stopWatch} contactServiceDetails={alertType !== 'success' ? serviceProviderContactDetails : undefined} + retryRequest={retryRequest} + deployedServiceDetails={deployedServiceDetails} /> ); } diff --git a/src/components/content/order/retryDeployment/RetryDeployServiceStatusAlert.tsx b/src/components/content/order/retryDeployment/RetryDeployServiceStatusAlert.tsx new file mode 100644 index 00000000..44243b2d --- /dev/null +++ b/src/components/content/order/retryDeployment/RetryDeployServiceStatusAlert.tsx @@ -0,0 +1,184 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +import { Alert } from 'antd'; +import React from 'react'; +import submitAlertStyles from '../../../../styles/submit-alert.module.css'; +import { ApiError, DeployedService, DeployedServiceDetails, Response } from '../../../../xpanse-api/generated'; +import { ContactDetailsShowType } from '../../common/ocl/ContactDetailsShowType'; +import { ContactDetailsText } from '../../common/ocl/ContactDetailsText'; +import useGetOrderableServiceDetailsQuery from '../../deployedServices/myServices/query/useGetOrderableServiceDetailsQuery'; +import OrderSubmitResultDetails from '../orderStatus/OrderSubmitResultDetails'; + +function RetryDeployServiceStatusAlert({ + deployedService, + retryDeploySubmitError, + statusPollingError, + deployedServiceDetails, + closeRetryDeployResultAlert, +}: { + deployedService: DeployedService; + retryDeploySubmitError: Error | null; + statusPollingError: Error | null; + deployedServiceDetails: DeployedServiceDetails | undefined; + closeRetryDeployResultAlert: (arg: boolean) => void; +}): React.JSX.Element { + const getOrderableServiceDetails = useGetOrderableServiceDetailsQuery(deployedService.serviceTemplateId); + if ( + deployedServiceDetails && + [ + DeployedServiceDetails.serviceDeploymentState.DEPLOYMENT_SUCCESSFUL, + DeployedServiceDetails.serviceDeploymentState.DEPLOYMENT_FAILED, + ].includes(deployedServiceDetails.serviceDeploymentState) + ) { + deployedService.serviceDeploymentState = deployedServiceDetails.serviceDeploymentState; + } + + const onClose = () => { + closeRetryDeployResultAlert(true); + }; + + if (retryDeploySubmitError) { + let errorMessage; + if (retryDeploySubmitError instanceof ApiError && retryDeploySubmitError.body && 'details' in retryDeploySubmitError.body) { + const response: Response = retryDeploySubmitError.body as Response; + errorMessage = response.details; + } else { + errorMessage = retryDeploySubmitError.message; + } + deployedService.serviceDeploymentState = DeployedService.serviceDeploymentState.DEPLOYMENT_FAILED; + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } + + if (statusPollingError) { + deployedService.serviceDeploymentState = DeployedService.serviceDeploymentState.DEPLOYMENT_FAILED; + if (statusPollingError instanceof ApiError && 'details' in statusPollingError.body) { + const response: Response = statusPollingError.body as Response; + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } + } + + if (deployedServiceDetails !== undefined) { + if ( + deployedServiceDetails.serviceDeploymentState.toString() === + DeployedServiceDetails.serviceDeploymentState.DEPLOYMENT_SUCCESSFUL.toString() + ) { + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'success'} + />{' '} +
+ ); + } else if ( + deployedServiceDetails.serviceDeploymentState.toString() === + DeployedServiceDetails.serviceDeploymentState.DEPLOYMENT_FAILED.toString() + ) { + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } + } + + return <>; +} + +export default RetryDeployServiceStatusAlert; diff --git a/src/components/content/order/retryDeployment/useRedeployFailedDeploymentQuery.ts b/src/components/content/order/retryDeployment/useRedeployFailedDeploymentQuery.ts new file mode 100644 index 00000000..788759c9 --- /dev/null +++ b/src/components/content/order/retryDeployment/useRedeployFailedDeploymentQuery.ts @@ -0,0 +1,15 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +import { useMutation } from '@tanstack/react-query'; +import { ServiceService } from '../../../../xpanse-api/generated'; + +export default function useRedeployFailedDeploymentQuery() { + return useMutation({ + mutationFn: (uuid: string) => { + return ServiceService.redeployFailedDeployment(uuid); + }, + }); +} diff --git a/src/xpanse-api/api.json b/src/xpanse-api/api.json index ad1ee416..95334004 100644 --- a/src/xpanse-api/api.json +++ b/src/xpanse-api/api.json @@ -24,7 +24,6 @@ { "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": "ServicePrices", "description": "API to manage prices of the flavors of the service." }, { @@ -40,107 +39,6 @@ { "name": "Monitor", "description": "APIs for getting metrics of deployed services." } ], "paths": { - "/xpanse/workflow/task/{id}": { - "put": { - "tags": ["Workflow"], - "description": "Manage failed task orders.
Required role: admin or user", - "operationId": "manageFailedOrder", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of the workflow task that needs to be handled", - "required": true, - "schema": { "type": "string" } - }, - { - "name": "retryOrder", - "in": "query", - "description": "Controls if the order must be retried again or simply closed.", - "required": true, - "schema": { "type": "boolean" } - } - ], - "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" } } } - }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, - "502": { - "description": "Bad Gateway", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, - "200": { "description": "OK" } - } - } - }, - "/xpanse/workflow/complete/task/{id}": { - "put": { - "tags": ["Workflow"], - "description": "Complete tasks by task ID and set global process variables .
Required role: admin or user", - "operationId": "completeTask", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of the workflow task that needs to be handled", - "required": true, - "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { "type": "object", "additionalProperties": { "type": "object" } } - } - }, - "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" } } } - }, - "403": { - "description": "Forbidden", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, - "502": { - "description": "Bad Gateway", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, - "200": { "description": "OK" } - } - } - }, "/xpanse/user/credentials": { "get": { "tags": ["UserCloudCredentialsManagement"], @@ -190,14 +88,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" } } } @@ -238,14 +136,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" } } } @@ -276,14 +174,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" } } } @@ -346,14 +244,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" } } } @@ -381,14 +279,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" } } } @@ -419,14 +317,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" } } } @@ -457,14 +355,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" } } } @@ -507,21 +405,59 @@ "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" } } } + }, + "202": { + "description": "Accepted", + "content": { "application/json": { "schema": { "type": "string", "format": "uuid" } } } + } + } + } + }, + "/xpanse/services/deploy/retry/{id}": { + "put": { + "tags": ["Service"], + "description": "Start a task to redeploy the failed deployment using id.
Required role: admin or user", + "operationId": "redeployFailedDeployment", + "parameters": [{ "name": "id", "in": "path", "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" } } } }, "202": { "description": "Accepted", - "content": { "application/json": { "schema": { "type": "string", "format": "uuid" } } } + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } } } } @@ -559,14 +495,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" } } } @@ -602,14 +538,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" } } } @@ -652,14 +588,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" } } } @@ -698,14 +634,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" } } } @@ -741,14 +677,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" } } } @@ -795,14 +731,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" } } } @@ -838,14 +774,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" } } } @@ -893,14 +829,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" } } } @@ -933,14 +869,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" } } } @@ -985,14 +921,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" } } } @@ -1023,14 +959,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" } } } @@ -1058,14 +994,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" } } } @@ -1108,14 +1044,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" } } } @@ -1144,14 +1080,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" } } } @@ -1209,14 +1145,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" } } } @@ -1257,14 +1193,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" } } } @@ -1295,14 +1231,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" } } } @@ -1365,14 +1301,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" } } } @@ -1477,14 +1413,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" } } } @@ -1523,14 +1459,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" } } } @@ -1564,14 +1500,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" } } } @@ -1678,14 +1614,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" } } } @@ -1724,14 +1660,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" } } } @@ -1772,14 +1708,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" } } } @@ -1820,14 +1756,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" } } } @@ -1865,14 +1801,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" } } } @@ -1932,14 +1868,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" } } } @@ -1977,71 +1913,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" } } } }, - "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" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "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" } } - } - } + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPolicy" } } } } } } @@ -2087,14 +1973,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" } } } @@ -2138,14 +2024,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" } } } @@ -2188,14 +2074,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" } } } @@ -2236,17 +2122,17 @@ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "422": { - "description": "Unprocessable Entity", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, - "403": { - "description": "Forbidden", + "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" } } } @@ -2282,14 +2168,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" } } } @@ -2330,14 +2216,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" } } } @@ -2373,14 +2259,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" } } } @@ -2421,14 +2307,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" } } } @@ -2504,14 +2390,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 +2443,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" } } } @@ -2674,14 +2560,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" } } } @@ -2727,14 +2613,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" } } } @@ -2844,14 +2730,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" } } } @@ -2897,14 +2783,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" } } } @@ -2947,14 +2833,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" } } } @@ -3016,14 +2902,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" } } } @@ -3078,14 +2964,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" } } } @@ -3176,14 +3062,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" } } } @@ -3217,14 +3103,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" } } } @@ -3254,14 +3140,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" } } } @@ -3368,14 +3254,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" } } } @@ -3421,14 +3307,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" } } } @@ -3509,14 +3395,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" } } } @@ -3576,14 +3462,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" } } } @@ -3646,14 +3532,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" } } } @@ -3721,14 +3607,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" } } } @@ -3786,14 +3672,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" } } } @@ -3900,14 +3786,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" } } } @@ -3959,14 +3845,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" } } } @@ -3999,14 +3885,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" } } } @@ -4052,14 +3938,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" } } } @@ -4091,14 +3977,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" } } } @@ -4126,14 +4012,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" } } } @@ -4164,14 +4050,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" } } } @@ -5131,36 +5017,6 @@ } } }, - "WorkFlowTask": { - "required": [ - "businessKey", - "createTime", - "executionId", - "processDefinitionId", - "processDefinitionName", - "processInstanceId", - "status", - "taskId", - "taskName" - ], - "type": "object", - "properties": { - "processInstanceId": { "type": "string", "description": "The id of the ProcessInstance" }, - "processInstanceName": { "type": "string", "description": "The name of the ProcessInstance" }, - "processDefinitionId": { "type": "string", "description": "The id of the ProcessDefinition" }, - "processDefinitionName": { "type": "string", "description": "The name of the ProcessDefinition" }, - "executionId": { "type": "string", "description": "The execution id of the ProcessInstance" }, - "taskId": { "type": "string", "description": "The id of the task" }, - "taskName": { "type": "string", "description": "The name of the task" }, - "businessKey": { "type": "string", "description": "The businessKey of the Process" }, - "status": { "type": "string", "description": "The status of the Task", "enum": ["done", "failed"] }, - "createTime": { - "type": "string", - "description": "The create time of the task", - "format": "date-time" - } - } - }, "AbstractCredentialInfo": { "required": ["csp", "description", "name", "type"], "type": "object", diff --git a/src/xpanse-api/generated/index.ts b/src/xpanse-api/generated/index.ts index ff629fa2..8c5f0bb4 100644 --- a/src/xpanse-api/generated/index.ts +++ b/src/xpanse-api/generated/index.ts @@ -63,7 +63,6 @@ export { UserPolicy } from './models/UserPolicy'; export { UserPolicyCreateRequest } from './models/UserPolicyCreateRequest'; export { UserPolicyUpdateRequest } from './models/UserPolicyUpdateRequest'; export { VendorHostedDeployedServiceDetails } from './models/VendorHostedDeployedServiceDetails'; -export { WorkFlowTask } from './models/WorkFlowTask'; export { AdminService } from './services/AdminService'; export { AuthManagementService } from './services/AuthManagementService'; diff --git a/src/xpanse-api/generated/services/ServiceService.ts b/src/xpanse-api/generated/services/ServiceService.ts index df4f6096..bdde5fc3 100644 --- a/src/xpanse-api/generated/services/ServiceService.ts +++ b/src/xpanse-api/generated/services/ServiceService.ts @@ -17,6 +17,29 @@ import type { Response } from '../models/Response'; import type { ServiceLockConfig } from '../models/ServiceLockConfig'; import type { VendorHostedDeployedServiceDetails } from '../models/VendorHostedDeployedServiceDetails'; export class ServiceService { + /** + * Start a task to redeploy the failed deployment using id.
Required role: admin or user + * @param id + * @returns Response Accepted + * @throws ApiError + */ + public static redeployFailedDeployment(id: string): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/xpanse/services/deploy/retry/{id}', + path: { + id: id, + }, + errors: { + 400: `Bad Request`, + 401: `Unauthorized`, + 403: `Forbidden`, + 422: `Unprocessable Entity`, + 500: `Internal Server Error`, + 502: `Bad Gateway`, + }, + }); + } /** * Change the lock config of the service.
Required role: admin or user * @param id The id of the service