Nome do modelo
ACS-ECS-CreateImage
Descrição do modelo
Cria uma imagem personalizada a partir de uma instância existente do Elastic Compute Service (ECS) para backup da instância ou migração de sistema. É necessário especificar o ID da região, o ID da instância e o nome da imagem. Opcionalmente, defina whetherOnlySystemDisk para gerar uma imagem apenas do disco do sistema. Após a criação da imagem, o modelo retorna o novo ID da imagem.
Tipo de modelo
Automatizado
Proprietário
Alibaba Cloud
Parâmetros de entrada
|
Parâmetro |
Descrição |
Tipo |
Obrigatório |
Valor padrão |
Limite |
|
instanceId |
O ID da instância ECS. |
String |
Sim |
||
|
imageName |
O nome da nova imagem. |
String |
Sim |
||
|
regionId |
O ID da região. |
String |
Não |
{{ ACS::RegionId }} |
|
|
tags |
As tags da imagem. |
Json |
Não |
[] |
|
|
imageFamily |
A família da imagem. |
String |
Não |
False |
|
|
imageDescription |
A descrição da imagem. |
String |
Não |
"" |
|
|
resourceGroupId |
O ID do grupo de recursos. |
String |
Não |
"" |
|
|
detectionStrategy |
A estratégia de detecção da imagem. |
String |
Não |
"" |
|
|
whetherOnlySystemDisk |
Define se a imagem deve ser criada apenas a partir do disco do sistema. |
Boolean |
Não |
False |
|
|
OOSAssumeRole |
A função RAM assumida pelo OOS. |
String |
Não |
"" |
Parâmetros de saída
|
Parâmetro |
Descrição |
Tipo |
|
imageId |
String |
Política de permissões necessária para executar o modelo
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:CreateImage",
"ecs:CreateSnapshot",
"ecs:DescribeDisks",
"ecs:DescribeImages",
"ecs:DescribeInstances",
"ecs:DescribeSnapshots"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Detalhes
Para mais informações, consulte ACS-ECS-CreateImage.yml no GitHub.
Conteúdo do modelo
Note:
Description:
en: 'Creates an ECS image from an existing ECS instance. Use this for tasks such as system backup and migration. You must provide the region ID, instance ID, and image name. You can also choose to create an image from only the system disk. The template returns the new image ID after creation.'
zh-cn: 'Creates an ECS image from an existing ECS instance. Use this for tasks such as system backup and migration. You must provide the region ID, instance ID, and image name. You can also choose to create an image from only the system disk. The template returns the new image ID after creation.'
name-en: Create Image
name-zh-cn: Create Image
categories:
- image_manage
- application_manage
Parameters:
regionId:
Type: String
Label:
en: Region ID
zh-cn: Region ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
instanceId:
Label:
en: Instance ID
zh-cn: ECS Instance ID
Type: String
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
AssociationPropertyMetadata:
RegionId: regionId
imageName:
Label:
en: Image Name
zh-cn: New Image Name
Type: String
Description:
en: <p>Note:</p> <ul> <li>The name must be 2 to 128 characters in length.</li> <li><font>It must start with a letter or a Chinese character. It cannot start with http:// or https://.</font></li> <li>It can contain numbers, colons (:), underscores (_), and hyphens (-).</li> </ul>
zh-cn: <p>Note:</p> <ul> <li>The name must be 2 to 128 characters in length.</li> <li><font>It must start with a letter or a Chinese character. It cannot start with http:// or https://.</font></li> <li>It can contain numbers, colons (:), underscores (_), and hyphens (-).</li> </ul>
tags:
Label:
en: Tags
zh-cn: Image Tags
Type: Json
AssociationProperty: Tags
AssociationPropertyMetadata:
ShowSystem: false
Default: []
imageFamily:
Label:
en: Image Family
zh-cn: Image Family
Type: String
AssociationProperty: ALIYUN::ECS::Image::ImageFamily
Default: ''
imageDescription:
Label:
en: Image Description
zh-cn: Image Description
Type: String
Default: ''
resourceGroupId:
Label:
en: Resource Group ID
zh-cn: Resource Group ID
Type: String
AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
Default: ''
detectionStrategy:
Label:
en: Detection Strategy
zh-cn: Image Detection Strategy
Type: String
AllowedValues:
- Standard
- ''
Default: ''
whetherOnlySystemDisk:
Label:
en: Create from System Disk Only
zh-cn: Create from System Disk Only
Type: Boolean
Default: false
OOSAssumeRole:
Label:
en: OOS Assume Role
zh-cn: The RAM role for OOS to assume
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Conditions:
NotOnlySystemDisk:
Fn::Equals:
- '{{ whetherOnlySystemDisk }}'
- false
OnlySystemDisk:
Fn::Equals:
- '{{ whetherOnlySystemDisk }}'
- true
Tasks:
- Name: createImage
Action: ACS::ECS::CreateImage
Description:
en: Creates a new image with the specified instance ID and image name.
zh-cn: Creates a new image with the specified instance ID and image name.
When: NotOnlySystemDisk
Properties:
regionId: '{{ regionId }}'
imageName: '{{ imageName }}__on_{{ ACS::ExecutionId }}_at_{{ Acs::CurrentDate }}'
instanceId: '{{ instanceId }}'
tags: '{{tags}}'
imageFamily: '{{ imageFamily }}'
imageDescription: '{{ imageDescription }}'
resourceGroupId: '{{ resourceGroupId }}'
detectionStrategy: '{{ detectionStrategy }}'
Outputs:
imageId:
ValueSelector: imageId
Type: String
- Name: createImageOnlySystemDisk
Action: ACS::ECS::CreateImageForSystemDisk
Description:
en: Creates a new system disk image with the specified instance ID and image name.
zh-cn: Creates a new system disk image with the specified instance ID and image name.
When: OnlySystemDisk
Properties:
regionId: '{{ regionId }}'
imageName: '{{ imageName }}__on_{{ ACS::ExecutionId }}_at_{{ Acs::CurrentDate }}'
instanceId: '{{ instanceId }}'
tags: '{{tags}}'
imageFamily: '{{ imageFamily }}'
imageDescription: '{{ imageDescription }}'
resourceGroupId: '{{ resourceGroupId }}'
detectionStrategy: '{{ detectionStrategy }}'
Outputs:
imageId:
ValueSelector: imageId
Type: String
Outputs:
imageId:
Type: String
Value:
Fn::If:
- Fn::Equals:
- '{{ whetherOnlySystemDisk }}'
- false
- '{{ createImage.imageId }}'
- '{{ createImageOnlySystemDisk.imageId }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- regionId
- instanceId
Label:
default:
zh-cn: Select ECS Instance
en: Select ECS Instance
- Parameters:
- imageName
- tags
- whetherOnlySystemDisk
- imageFamily
- imageDescription
- resourceGroupId
- detectionStrategy
Label:
default:
zh-cn: Image Settings
en: Image Settings
- Parameters:
- OOSAssumeRole
Label:
default:
zh-cn: Advanced Options
en: Advanced Options
Instruções
Leia o documento em inglês para compreender O QUE precisa ser comunicado
Escreva o texto em português do Brasil DO ZERO — esqueça a estrutura das frases em inglês
Preserve toda a formatação markdown, blocos de código, links e imagens exatamente como estão
Tags xref (
<a data-tag="xref" ...>texto</a>) — preserve a tag INTEIRA com todos os atributos na ordem e caixa originais, traduza APENAS o texto visível entre > eAplique todas as regras específicas do idioma rigorosamente
Aplique as regras de stopwords com tolerância zero
Use o modo imperativo em passos numerados e listas de procedimentos
Garanta a consistência terminológica — mesmo termo = mesma tradução em todo o documento
Varie os inícios de frase em listas e tabelas — nenhum início repetido mais de 3 vezes
Retorne APENAS o documento markdown em português do Brasil, sem explicações