Template name
ACS-ECS-DeleteImage
Template description
Deletes an Elastic Compute Service (ECS) image.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
Parameter | Description | Type | Required | Default value | Limit |
imageId | The image ID. | String | Yes | ||
regionId | The region ID. | String | No | {{ ACS::RegionId }} | |
force | Specifies whether to forcefully delete the ECS image. | Boolean | No | False | |
OOSAssumeRole | The Resource Access Management (RAM) role that is assumed by CloudOps Orchestration Service (OOS). | String | No | "" |
Output parameters
None
Permission policy that is required to execute the template
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DeleteImage",
"ecs:DescribeImageSharePermission",
"ecs:ModifyImageSharePermission"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
References
For more information, see ACS-ECS-DeleteImage.yml at GitHub.
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Deletes an ECS image
zh-cn: the description in Chinese
name-en: Delete Image
name-zh-cn: the description in Chinese
categories:
- image_manage
- application_manage
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: the description in Chinese
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
imageId:
Label:
en: ImageId
zh-cn: the description in Chinese
Type: String
AssociationProperty: 'ALIYUN::ECS::Image::ImageId'
AssociationPropertyMetadata:
RegionId: regionId
SupportedImageOwnerAlias:
- self
force:
Label:
en: Force
zh-cn: the description in Chinese
Type: Boolean
Default: false
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: the description in Chinese
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: deleteImage
Action: ACS::ECS::DeleteImage
Description:
en: Deletes the specified ECS image
zh-cn: the description in Chinese
Properties:
regionId: '{{ regionId }}'
imageId: '{{ imageId }}'
force: '{{ force }}'
Outputs:
imageId:
ValueSelector: imageId
Type: String
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- regionId
- imageId
- force
Label:
default:
zh-cn: the description in Chinese
en: Select Image
- Parameters:
- OOSAssumeRole
Label:
default:
zh-cn: the description in Chinese
en: Control Options