ListStackOperationRisks
Description
call the ListStackOperationRisks interface to detect the high-risk resources that may be involved in the operation of deleting the resource stack, and return the risk reason corresponding to each resource.
Request Method
POST
Request Path
/apsara/route/ROS/ListStackOperationRisks
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
RamRoleName | BODY | string | No | test-role | RAM role name. if a RAM role is specified, ROS will create a resource stack according to the permissions of the RAM role and use the credentials of the role to make interface calls on behalf of the user. If you do not specify a RAM role, ROS will use the relevant permissions of the current account to create a resource stack. The maximum length of the RAM role name is 64 bytes. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
RetainAllResources | BODY | boolean | No | false | whether to keep all resources under the resource stack. Value: true: reserved. false (default): not reserved. Description This parameter is valid when the OperationType value is DeleteStack. |
OperationType | BODY | string | Yes | DeleteStack | the type of operation to be detected. The value is DeleteStack, which indicates that the high-risk resources involved in the operation of deleting the resource stack are detected. |
RegionId | BODY | string | Yes | cn-hangzhou | the region ID to which the resource stack belongs. |
ClientToken | BODY | string | No | 123e4567-e89b-12d3-a456-42665544**** | guarantees the idempotence of the request. This value is generated by the client and must be globally unique. is no more than 64 characters in length and can contain English letters, numbers, dashes (-) and underscores (_). |
RetainResources.N | BODY | repeatlist | No | WebServer | the list of resources that need to be kept. Description This parameter is valid when the OperationType value is DeleteStack. |
version | BODY | string | No | 2016-01-01 | version of api |
StackId | BODY | string | Yes | 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** | resource stack ID. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
LogicalResourceId | string | MySG | resource logical ID, that is, the resource name defined by the template. |
RequestId | string | DF4296CF-F45F-4845-A72B-BE617601DB25 | the request ID when the risk detection of the resource fails. this parameter is not returned when the risk detection is normal. |
RiskResources | array of resource | No sample value for this parameter. | risk information. |
Message | string | You are not authorized to complete this action. | error information when the risk detection of resources fails. this parameter is not returned when the risk detection is normal. |
PhysicalResourceId | string | sg-bp1dpioafqphedg9**** | resource physical ID, that is, the actual resource ID. |
ResourceType | string | ALIYUN::ECS::SecurityGroup | resource type. |
Code | string | NoPermission | the error code when the risk detection of resources fails. this parameter is not returned when the risk detection is normal. |
Reason | string | There are some ECS instances (i-bp18el96s4wq635e****) depending on the security group. | Risk cause. |
RiskType | string | Referenced | risk type, value: Referenced: the current resource is referenced by other resources. MaybeReferenced: the current resource may be referenced by other resources. AdditionalRiskCheckRequired: nested resource stacks require additional risk detection. |
Example
Successful Response example
{
"LogicalResourceId":"MySG",
"RequestId":"DF4296CF-F45F-4845-A72B-BE617601DB25",
"RiskResources":"",
"Message":"You are not authorized to complete this action.",
"PhysicalResourceId":"sg-bp1dpioafqphedg9****",
"ResourceType":"ALIYUN::ECS::SecurityGroup",
"Code":"NoPermission",
"Reason":"There are some ECS instances (i-bp18el96s4wq635e****) depending on the security group.",
"RiskType":"Referenced"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}