describeImage - Amazon ParallelCluster
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

describeImage

获取有关现有映像的详细信息。

请求语法

GET /v3/images/custom/{imageId} { "region": "string" }

请求正文

imageId

映像的 ID。

类型:字符串

必需:是

region

在其中创建映像的 Amazon Web Services 区域。

类型:字符串

必需:否

响应语法

{ "imageId": "string", "region": "string", "version": "string", "imageBuildStatus": "BUILD_IN_PROGRESS", "imageBuildLogsArn": "string", "cloudformationStackStatus": "CREATE_IN_PROGRESS", "cloudformationStackStatusReason": "string", "cloudformationStackArn": "string", "creationTime": "2019-08-24T14:15:22Z", "cloudformationStackCreationTime": "2019-08-24T14:15:22Z", "cloudformationStackTags": [ { "key": "string", "value": "string" } ], "imageConfiguration": { "url": "string" }, "imagebuilderImageStatus": "PENDING", "imagebuilderImageStatusReason": "string", "ec2AmiInfo": { "amiId": "string", "tags": [ { "key": "string", "value": "string" } ], "amiName": "string", "architecture": "string", "state": "PENDING", "description": "string" } }

响应正文

imageId

要检索其详细信息的映像的 ID。

类型:字符串

imageBuildStatus

映像构建状态。

类型:字符串

有效值:BUILD_IN_PROGRESS | BUILD_FAILED | BUILD_COMPLETE | DELETE_IN_PROGRESS | DELETE_FAILED | DELETE_COMPLETE

imageConfiguration
url

映像配置文件的 URL。

类型:字符串

region

在其中创建映像的 Amazon Web Services 区域。

类型:字符串

version

用于构建映像的 Amazon ParallelCluster 版本。

类型:字符串

cloudformationStackArn

主 CloudFormation 堆栈的 Amazon 资源名称 (ARN)。

类型:字符串

cloudformationStackCreationTime

创建 CloudFormation 堆栈时的时间戳

类型:日期时间

cloudformationStackStatus

CloudFormation 堆栈状态。

类型:字符串

有效值:CREATE_IN_PROGRESS | CREATE_FAILED | CREATE_COMPLETE | ROLLBACK_IN_PROGRESS | ROLLBACK_FAILED | ROLLBACK_COMPLETE | DELETE_IN_PROGRESS | DELETE_FAILED | DELETE_COMPLETE | UPDATE_IN_PROGRESS | UPDATE_COMPLETE_CLEANUP_IN_PROGRESS | UPDATE_COMPLETE | UPDATE_ROLLBACK_IN_PROGRESS | UPDATE_ROLLBACK_FAILED | UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS | UPDATE_ROLLBACK_COMPLETE

cloudformationStackStatusReason

CloudFormation 堆栈状态的原因。

类型:字符串

cloudformationStackTags

CloudFormation 堆栈标签的列表。

key

标签名称。

类型:字符串

value

标签值。

类型:字符串

creationTime

创建映像时的时间戳。

类型:日期时间

ec2AmiInfo
amiId

EC2 AMI ID。

类型:字符串

amiName

EC2 AMI 名称。

类型:字符串

architecture

EC2 AMI 架构。

类型:字符串

state

EC2 AMI 的状态。

类型:字符串

有效值:PENDING | AVAILABLE | INVALID | DEREGISTERED | TRANSIENT | FAILED | ERROR

tags

EC2 AMI 标签的列表。

key

标签名称。

类型:字符串

value

标签值。

类型:字符串

imagebuilderImageStatus

ImageBuilder 状态。

类型:字符串

有效值:PENDING | CREATING | BUILDING | TESTING | DISTRIBUTING | INTEGRATING | AVAILABLE | CANCELLED | FAILED | DEPRECATED | DELETED

imagebuilderImageStatusReason

ImageBuilder 映像状态的原因。

类型:字符串

imageBuildLogsArn

映像构建过程日志的 Amazon 资源名称 (ARN)。

类型:字符串

示例

Python

请求

$ describe_image(custom-image-id)

200 响应

{ 'cloudformation_stack_arn': 'arn:aws:cloudformation:us-east-1:123456789012:stack/custom-image-id/6accc570-b080-11ec-845e-0e2dc6386985', 'cloudformation_stack_creation_time': datetime.datetime(2022, 3, 30, 23, 23, 33, 731000, tzinfo=tzlocal()), 'cloudformation_stack_status': 'CREATE_IN_PROGRESS', 'cloudformation_stack_tags': [ { 'key': 'parallelcluster:version', 'value': '3.2.1' }, { 'key': 'parallelcluster:image_name', 'value': 'custom-image-id' }, { 'key': 'parallelcluster:custom-image-id', 'value': 'custom-image-id' }, { 'key': 'parallelcluster:s3_bucket', 'value': 'parallelcluster-abcdef01234567890-v1-do-not-delete' }, { 'key': 'parallelcluster:s3_image_dir', 'value': 'parallelcluster/3.2.1/images/custom-image-id-1234567890abcdef0' }, { 'key': 'parallelcluster:build_log', 'value': 'arn:aws:logs:us-east-1:123456789012:log-group:/aws/imagebuilder/ParallelClusterImage-custom-image-id' }, { 'key': 'parallelcluster:build_config', 'value': 's3://parallelcluster-abcdef01234567890-v1-do-not-delete/parallelcluster/3.2.1/images/custom-image-id-1234567890abcdef0/configs/image-config.yaml' } ], 'image_build_logs_arn': 'arn:aws:logs:us-east-1:123456789012:log-group:/aws/imagebuilder/ParallelClusterImage-alinux2-image', 'image_build_status': 'BUILD_IN_PROGRESS', 'image_configuration': { 'url': 'https://parallelcluster-abcdef01234567890-v1-do-not-delete.s3.amazonaws.com/parallelcluster/3.2.1/images/custom-image-id-1234567890abcdef0/configs/image-config.yaml?...' }, 'image_id': 'custom-image-id', 'imagebuilder_image_status': 'PENDING', 'region': 'us-east-1', 'version': '3.2.1' }