テンプレート名
ACS-ECS-DeleteImage
テンプレートの説明
Elastic Compute Service (ECS) イメージを削除します。これは、カスタムイメージを削除してディスク容量を解放する場合に適用されます。このテンプレートを構成する際は、次のパラメーターを指定する必要があります。regionId: 削除するイメージのリージョン、imageId: イメージの ID、force: 強制削除を実行するかどうかを指定します。テンプレートが実行されると、イメージは削除されます。
テンプレートタイプ
自動化
所有者
Alibaba Cloud
入力パラメーター
パラメーター | 説明 | タイプ | 必須 | デフォルト値 | 制限 |
imageId | イメージ ID です。 | String | はい | ||
regionId | リージョン ID です。 | String | いいえ | {{ ACS::RegionId }} | |
force | ECS イメージを強制的に削除するかどうかを指定します。 | ブール値 | いいえ | False | |
OOSAssumeRole | CloudOps Orchestration Service (OOS) によって引き受けられる Resource Access Management (RAM) ロールです。 | String | いいえ | "" |
出力パラメーター
なし
テンプレートの実行に必要な権限ポリシー
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DeleteImage",
"ecs:DescribeImageSharePermission",
"ecs:ModifyImageSharePermission"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
参照
詳細については、GitHub の ACS-ECS-DeleteImage.yml をご参照ください。
テンプレートコンテンツ
FormatVersion: OOS-2019-06-01
Description:
en: 'Deletes an ECS image, applicable to freeing up storage space by removing custom images that are no longer needed. During configuration, users need to provide the following required parameter information: Region ID (regionId), which specifies the region of the ECS image to be deleted, and Image ID (imageId), which identifies the image to be deleted. Additionally, users can choose whether to enforce the deletion (force). Upon execution, the template will confirm the deletion of the specified ECS image.'
zh-cn: 中国語の説明
name-en: Delete Image
name-zh-cn: 中国語の説明
categories:
- image_manage
- application_manage
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: 中国語の説明
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
imageId:
Label:
en: ImageId
zh-cn: 中国語の説明
Type: String
AssociationProperty: 'ALIYUN::ECS::Image::ImageId'
AssociationPropertyMetadata:
RegionId: regionId
SupportedImageOwnerAlias:
- self
force:
Label:
en: Force
zh-cn: 中国語の説明
Type: Boolean
Default: false
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: 中国語の説明
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: deleteImage
Action: ACS::ECS::DeleteImage
Description:
en: Deletes the specified ECS image
zh-cn: 中国語の説明
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: 中国語の説明
en: Select Image
- Parameters:
- OOSAssumeRole
Label:
default:
zh-cn: 中国語の説明
en: Control Options