RegionId:华北2(北京)

ImageId:m-2ze191gh7vw63wjgbl08

先调用DescribeImages接口进行查询结果如下:

  1. {
  2. "TotalCount": 1,
  3. "RequestId": "0FD0BBA9-95B4-453C-9C19-81A4100EA14F",
  4. "PageSize": 10,
  5. "PageNumber": 1,
  6. "Images": {
  7. "Image": [
  8. {
  9. "ImageOwnerAlias": "self",
  10. "Description": "00",
  11. "IsSelfShared": "True",
  12. "Platform": "CentOS",
  13. "ResourceGroupId": "",
  14. "Size": 40,
  15. "IsSubscribed": false,
  16. "OSName": "CentOS_64",
  17. "ImageId": "m-2ze191gh7vw63wjgbl08",
  18. "OSNameEn": "CentOS_64",
  19. "Tags": {
  20. "Tag": [
  21. {
  22. "TagKey": "imagepipelineid",
  23. "TagValue": "ip-2zeis96caasovc9wcb9h"
  24. }
  25. ]
  26. },
  27. "Status": "Available",
  28. "Progress": "100%",
  29. "Usage": "instance",
  30. "Architecture": "x86_64",
  31. "ProductCode": "",
  32. "IsCopied": false,
  33. "ImageFamily": "",
  34. "IsSupportIoOptimized": true,
  35. "IsSupportCloudinit": false,
  36. "ImageName": "镜像构建创建的镜像",
  37. "DiskDeviceMappings": {
  38. "DiskDeviceMapping": [
  39. {
  40. "SnapshotId": "s-2ze191gh7vw63wjlmfs1",
  41. "Type": "system",
  42. "Progress": "",
  43. "Format": "",
  44. "Size": "40",
  45. "Device": "/dev/xvda",
  46. "ImportOSSBucket": "",
  47. "ImportOSSObject": ""
  48. }
  49. ]
  50. },
  51. "ImageVersion": "",
  52. "OSType": "linux",
  53. "CreationTime": "2021-03-17T03:09:48Z"
  54. }
  55. ]
  56. },
  57. "RegionId": "cn-beijing"
  58. }

此时调用ModifyImageAttribute接口传入参数如下:
image.png
调用结果如下:

  1. {
  2. "RequestId": "4917C612-DC09-4BBF-A5ED-FBA7439713CC"
  3. }

再次调用DescribeImages接口进行查询结果如下:

  1. {
  2. "TotalCount": 1,
  3. "RequestId": "A76096C2-3DBB-405A-B0F5-2A6BE947CDDF",
  4. "PageSize": 10,
  5. "PageNumber": 1,
  6. "Images": {
  7. "Image": [
  8. {
  9. "ImageOwnerAlias": "self",
  10. "Description": "00",
  11. "IsSelfShared": "True",
  12. "Platform": "CentOS",
  13. "ResourceGroupId": "",
  14. "Size": 40,
  15. "IsSubscribed": false,
  16. "OSName": "CentOS_64",
  17. "ImageId": "m-2ze191gh7vw63wjgbl08",
  18. "OSNameEn": "CentOS_64",
  19. "Tags": {
  20. "Tag": [
  21. {
  22. "TagKey": "imagepipelineid",
  23. "TagValue": "ip-2zeis96caasovc9wcb9h"
  24. }
  25. ]
  26. },
  27. "Status": "Available",
  28. "Progress": "100%",
  29. "Usage": "instance",
  30. "Architecture": "x86_64",
  31. "ProductCode": "",
  32. "IsCopied": false,
  33. "ImageFamily": "",
  34. "IsSupportIoOptimized": true,
  35. "IsSupportCloudinit": false,
  36. "ImageName": "这是一个修改后的镜像名称",
  37. "DiskDeviceMappings": {
  38. "DiskDeviceMapping": [
  39. {
  40. "SnapshotId": "s-2ze191gh7vw63wjlmfs1",
  41. "Type": "system",
  42. "Progress": "",
  43. "Format": "",
  44. "Size": "40",
  45. "Device": "/dev/xvda",
  46. "ImportOSSBucket": "",
  47. "ImportOSSObject": ""
  48. }
  49. ]
  50. },
  51. "ImageVersion": "",
  52. "OSType": "linux",
  53. "CreationTime": "2021-03-17T03:09:48Z"
  54. }
  55. ]
  56. },
  57. "RegionId": "cn-beijing"
  58. }

此时ImageName修改成功


RegionId:华北2(北京)

ImageId:m-2zef44az7gpjqdaf2ay0

先调用DescribeImages接口进行查询结果如下:

  1. {
  2. "TotalCount": 1,
  3. "RequestId": "AD8023F7-11B4-48CC-B99F-516AD36C6FAF",
  4. "PageSize": 10,
  5. "PageNumber": 1,
  6. "Images": {
  7. "Image": [
  8. {
  9. "ImageOwnerAlias": "self",
  10. "Description": "测试uefi镜像",
  11. "IsSelfShared": "False",
  12. "Platform": "CentOS",
  13. "ResourceGroupId": "",
  14. "Size": 40,
  15. "IsSubscribed": false,
  16. "OSName": "CentOS 8.3 64位 UEFI版",
  17. "ImageId": "m-2zef44az7gpjqdaf2ay0",
  18. "OSNameEn": "CentOS 8.3 64 bit UEFI Edition",
  19. "Tags": {
  20. "Tag": []
  21. },
  22. "Status": "Available",
  23. "Progress": "100%",
  24. "Usage": "none",
  25. "Architecture": "x86_64",
  26. "ProductCode": "",
  27. "IsCopied": false,
  28. "ImageFamily": "",
  29. "IsSupportIoOptimized": true,
  30. "IsSupportCloudinit": true,
  31. "ImageName": "测试uefi镜像",
  32. "DiskDeviceMappings": {
  33. "DiskDeviceMapping": [
  34. {
  35. "SnapshotId": "s-2zef44az7gpjqda6tt8j",
  36. "Type": "system",
  37. "Progress": "",
  38. "Format": "",
  39. "Size": "40",
  40. "Device": "/dev/xvda",
  41. "ImportOSSBucket": "",
  42. "ImportOSSObject": ""
  43. }
  44. ]
  45. },
  46. "ImageVersion": "",
  47. "OSType": "linux",
  48. "CreationTime": "2021-04-06T06:09:56Z"
  49. }
  50. ]
  51. },
  52. "RegionId": "cn-beijing"
  53. }

此时调用ModifyImageAttribute接口传入参数如下:
image.png
调用结果如下:

  1. {
  2. "RequestId": "776258A1-3B31-4233-B3CC-EC84003AA743"
  3. }

再次调用DescribeImages接口进行查询结果如下:

  1. {
  2. "TotalCount": 0,
  3. "RequestId": "F6F1DD7A-1E59-4B83-B555-F0F92095BDD2",
  4. "PageSize": 10,
  5. "PageNumber": 1,
  6. "Images": {
  7. "Image": []
  8. },
  9. "RegionId": "cn-beijing"
  10. }

当修改属性Status为Deprecated后,该镜像将被启用,无法查询到信息
**


RegionId:华东1(杭州)

ImageId:m-bp10bltz93t296vrli5x

先调用DescribeImages接口进行查询结果如下:

  1. {
  2. "TotalCount": 1,
  3. "RequestId": "A63F56E9-0A8F-4B0F-9566-D7BE3303970F",
  4. "PageSize": 10,
  5. "PageNumber": 1,
  6. "Images": {
  7. "Image": [
  8. {
  9. "ImageOwnerAlias": "self",
  10. "Description": "alinux-uefi版,魔改ostype到可信版,在c6t上验证",
  11. "IsSelfShared": "False",
  12. "Platform": "Aliyun",
  13. "ResourceGroupId": "",
  14. "Size": 40,
  15. "IsSubscribed": false,
  16. "OSName": "Alibaba Cloud Linux 2.1903 64位 可信版",
  17. "ImageId": "m-bp10bltz93t296vrli5x",
  18. "OSNameEn": "Alibaba Cloud Linux 2.1903 64 bit Trust Edition",
  19. "Tags": {
  20. "Tag": []
  21. },
  22. "Status": "Available",
  23. "Progress": "100%",
  24. "Usage": "none",
  25. "Architecture": "x86_64",
  26. "ProductCode": "",
  27. "IsCopied": false,
  28. "ImageFamily": "",
  29. "IsSupportIoOptimized": true,
  30. "IsSupportCloudinit": true,
  31. "ImageName": "alinux-uefi版魔改ostype",
  32. "DiskDeviceMappings": {
  33. "DiskDeviceMapping": [
  34. {
  35. "SnapshotId": "s-bp10bltz93t296vpehw5",
  36. "Type": "system",
  37. "Progress": "",
  38. "Format": "",
  39. "Size": "40",
  40. "Device": "/dev/xvda",
  41. "ImportOSSBucket": "",
  42. "ImportOSSObject": ""
  43. }
  44. ]
  45. },
  46. "ImageVersion": "",
  47. "OSType": "linux",
  48. "CreationTime": "2021-03-26T08:01:36Z"
  49. }
  50. ]
  51. },
  52. "RegionId": "cn-hangzhou"
  53. }

此时调用ModifyImageAttribute接口传入参数如下:
image.png
调用结果如下:

  1. {
  2. "RequestId": "19351A18-920F-410C-A79E-39A86F55D613"
  3. }

再次调用DescribeImages接口进行查询结果如下:

  1. {
  2. "TotalCount": 1,
  3. "RequestId": "5EED9008-08D5-4C24-B1B7-DCA82588CBB7",
  4. "PageSize": 10,
  5. "PageNumber": 1,
  6. "Images": {
  7. "Image": [
  8. {
  9. "ImageOwnerAlias": "self",
  10. "Description": "今日事今日毕",
  11. "IsSelfShared": "False",
  12. "Platform": "Aliyun",
  13. "ResourceGroupId": "",
  14. "Size": 40,
  15. "IsSubscribed": false,
  16. "OSName": "Alibaba Cloud Linux 2.1903 64位 可信版",
  17. "ImageId": "m-bp10bltz93t296vrli5x",
  18. "OSNameEn": "Alibaba Cloud Linux 2.1903 64 bit Trust Edition",
  19. "Tags": {
  20. "Tag": []
  21. },
  22. "Status": "Available",
  23. "Progress": "100%",
  24. "Usage": "none",
  25. "Architecture": "x86_64",
  26. "ProductCode": "",
  27. "IsCopied": false,
  28. "ImageFamily": "",
  29. "IsSupportIoOptimized": true,
  30. "IsSupportCloudinit": true,
  31. "ImageName": "提携玉龙为君死",
  32. "DiskDeviceMappings": {
  33. "DiskDeviceMapping": [
  34. {
  35. "SnapshotId": "s-bp10bltz93t296vpehw5",
  36. "Type": "system",
  37. "Progress": "",
  38. "Format": "",
  39. "Size": "40",
  40. "Device": "/dev/xvda",
  41. "ImportOSSBucket": "",
  42. "ImportOSSObject": ""
  43. }
  44. ]
  45. },
  46. "ImageVersion": "",
  47. "OSType": "linux",
  48. "CreationTime": "2021-03-26T08:01:36Z"
  49. }
  50. ]
  51. },
  52. "RegionId": "cn-hangzhou"
  53. }

此时属性ImageName修改为提携玉龙为君死,属性Description修改为今日事今日毕

**