イメージ共有の権限を管理します。作成したカスタムイメージを他の Alibaba Cloud アカウントと共有したり、コミュニティイメージとして公開したりできます。
操作説明
この操作を呼び出す前に、「カスタムイメージの共有」をご参照ください。
以下の共有ルールにご注意ください。
-
共有制限:作成したカスタムイメージのみ共有できます。各イメージは最大 50 の Alibaba Cloud アカウントと共有できます。一度に最大 10 の Alibaba Cloud アカウントとイメージを共有できます。
-
インスタンスへの影響:共有されたカスタムイメージから ECS インスタンス (RunInstances) を作成した後、イメージの所有者がそのカスタムイメージの共有を解除するか、削除 (DeleteImage) した場合、そのインスタンスのシステムディスクを再初期化 (ReInitDisk) することはできなくなります。
コミュニティイメージを公開または非公開にする際の注意点は次のとおりです。
-
責任と契約:コミュニティイメージの所有者は、その品質と更新に責任を負います。Alibaba Cloud は共有のためのプラットフォームのみを提供します。イメージを公開する前に、コミュニティイメージ契約を理解し、署名する必要があります。詳細については、「コミュニティイメージの公開」をご参照ください。
-
暗号化の制限:暗号化されたイメージはコミュニティイメージとして公開できません。
-
パブリックアクセス:コミュニティイメージは公開されています。イメージが存在するリージョン内のすべての Alibaba Cloud アカウントが使用できます。
-
機能制限:コミュニティイメージは共有、エクスポート、コピーができません。
-
非公開化の影響:コミュニティイメージが非公開になると、パブリックアクセスはできなくなります。ただし、この操作は、以前にそのイメージから作成されたインスタンスには影響しません。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ecs:ModifyImageSharePermission |
update |
*Image
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
カスタムイメージが配置されているリージョン ID。Alibaba Cloud リージョンの最新リストを表示するには、DescribeRegions を呼び出してください。 |
cn-hangzhou |
| ImageId |
string |
必須 |
共有するカスタムイメージの ID。 重要 サービスキーで暗号化されたイメージは共有できなくなりました。カスタマーマスターキー (CMK) で暗号化されたイメージのみ共有できます。サービスキーで暗号化されたイメージを共有しようとすると、エラーが返されます。 |
m-bp18ygjuqnwhechc**** |
| LaunchPermission |
string |
任意 |
説明
このパラメーターは招待制プレビューであり、利用できません。 |
hide |
| AddAccount |
array |
任意 |
イメージを共有する Alibaba Cloud アカウントの ID。最大 10 個のアカウント ID を指定できます。10 個を超える ID を指定した場合、システムは最初の 10 個のみを処理し、残りは無視します。 |
1234567890 |
|
string |
任意 |
Alibaba Cloud アカウントの ID。 |
1234567890 |
|
| RemoveAccount |
array |
任意 |
イメージの共有を解除する Alibaba Cloud アカウントの ID。最大 10 個のアカウント ID を指定できます。10 個を超える ID を指定した場合、システムは最初の 10 個のみを処理し、残りは無視します。 |
1234567890 |
|
string |
任意 |
Alibaba Cloud アカウントの ID。 |
1234567890 |
|
| IsPublic |
boolean |
任意 |
イメージをコミュニティイメージとして公開するか、コミュニティイメージを非公開にするかを指定します。有効値:
デフォルト値:false。 |
false |
| DryRun |
boolean |
任意 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
例
成功レスポンス
JSONJSON
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
エラーレスポンス
JSONJSON
{
"RequestId": "C8B26B44-0189-443E-9816-D951F59623A9"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | MissingParameter | The input parameter "RegionId" that is mandatory for processing this request is not supplied. | |
| 400 | InvalidGroup.Malformed | The specified Group is wrongly formed. | |
| 400 | UnnecessaryParameter.LaunchPermission | The specified parameter "LaunchPermission" is unnecessary if paramter "AddAccounts" or "RemoveAccounts" exist. | |
| 400 | InvalidParameter.LaunchPermission | The specified parameter "LaunchPermission" is invalid. | |
| 400 | ForbiddenParameter.LaunchPermission | The specified parameter "LaunchPermission" is forbidden for current account. | |
| 403 | AssumeRoleError | Requires a RAM role of AliyunECSShareEncryptImageDefaultRole before sharing encrypted image. | |
| 403 | ImageDescription.ContainsSensitiveWords | The specified image description contains sensitive words. | |
| 403 | ImageName.ContainsSensitiveWords | The specified image name contains sensitive words. | |
| 403 | Image.Public | The specified image is public image. | |
| 403 | CurrentRegion.NotSupportPublicImage | Public image is not supported for current region. | |
| 403 | Image.NotPublic | The specified image is not public image. | |
| 403 | OperationDeined.FullImage | The encrypted image contains multiple snapshots, which do not support share. | |
| 403 | QuotaExceed.ShareImage | The shared Image Quota exceeds. | |
| 403 | QuotaExceed.ShareImageUser | The shared Image user Quota exceeds. | |
| 403 | InvalidImageId.BidMismatch | Cannot share the image with users %s of other sites. | |
| 403 | OperationDeined.EncryptedSnapshot | The image contains encrypted snapshots, which do not support share. | |
| 403 | OperationDenied.InvalidImageStatus | The specified image cannot be shared when it is deprecated. | |
| 403 | PublicImageAgreement.NotSigned | The current account has not signed "Community Image Terms of Service". | |
| 403 | InvalidParameter.IsPublic | The specified parameter IsPublic is conflicted with other parameters. | |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK(Customer Master Key) lacks authorization to add tags to the ECS service. | |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK (Customer Master Key) must be in an active state. | |
| 403 | InvalidOperation.ServiceKeyEncryptedImageUnsupported | The specified service key encrypted image is not supported for this operation. Please switch to a CMK (Customer Master Key) encrypted image and retry. | |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. | |
| 404 | InvalidAccount.NotFound | The specified account %s in parameter "AddAccount.n" or "RemoveAccount.n" does not exist. | |
| 404 | InvalidAccount.Forbbiden | The specified Account does not yourself. | |
| 404 | InvalidKMSKeyId.NotFound | The KMS key used by the disk does not exist. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。