すべてのプロダクト
Search
ドキュメントセンター

Resource Management:InviteAccountToResourceDirectory

最終更新日:Mar 31, 2026

アカウントをリソースディレクトリに招待します。

操作説明

このトピックでは、アカウント someone@example.com をリソースディレクトリに招待するための API オペレーションの呼び出し例について説明します。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

resourcemanager:InviteAccountToResourceDirectory

create

*Handshake

acs:resourcemanager:*:{#accountId}:handshake/*

*Folder

acs:resourcemanager:*:{#accountId}:folder/{#ResourceDirectoryPath}

なし なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

TargetEntity

string

必須

招待対象のアカウントの ID またはログイン用メールアドレスです。

someone@example.com

TargetType

string

必須

招待対象のアカウントの種別です。有効な値は以下のとおりです。

  • Account:アカウント ID を指定します。

  • Email:アカウントのログイン用メールアドレスを指定します。

Email

Note

string

任意

招待に対するコメントです。

コメントは最大 1,024 文字まで入力できます。

欢迎您加入

Tag

array<object>

任意

タグキーおよびタグ値です。

object

任意

タグキーおよびタグ値です。

Key

string

任意

タグキーです。

k1

Value

string

任意

タグ値です。

v1

共通リクエストパラメーターの詳細については、「共通パラメーター」をご参照ください。

レスポンスフィールド

フィールド

説明

object

RequestId

string

リクエストの ID です。

9B34724D-54B0-4A51-B34D-4512372FE1BE

Handshake

object

招待情報です。

Status

string

招待のステータスです。

  • Pending:招待が承認待ちの状態です。

  • Accepted:招待が承認済みです。

  • Cancelled:招待がキャンセル済みです。

  • Declined:招待が拒否済みです。

  • Expired:招待の有効期限が切れた状態です。

Pending

ExpireTime

string

招待の有効期限です。時刻は協定世界時 (UTC) で表示されます。

2018-08-24T09:55:41Z

ResourceDirectoryId

string

リソースディレクトリの ID です。

rd-abcdef****

CreateTime

string

招待の作成時刻です。時刻は協定世界時 (UTC) で表示されます。

2018-08-10T09:55:41Z

Note

string

招待に対するコメントです。

欢迎您加入

TargetEntity

string

招待されたアカウントの ID またはログイン用メールアドレスです。

someone@example.com

MasterAccountId

string

リソースディレクトリの管理アカウントの ID です。

172841235500****

MasterAccountName

string

リソースディレクトリの管理アカウントの名前です。

Alice

ModifyTime

string

招待の更新時刻です。時刻は協定世界時 (UTC) で表示されます。

2018-08-10T09:55:41Z

TargetType

string

招待されたアカウントの種別です。有効な値は以下のとおりです。

  • Account:アカウント ID を指定します。

  • Email:アカウントのログイン用メールアドレスを指定します。

Email

HandshakeId

string

招待の ID です。

h-ycm4rp****

成功レスポンス

JSONJSON

{
  "RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE",
  "Handshake": {
    "Status": "Pending",
    "ExpireTime": "2018-08-24T09:55:41Z",
    "ResourceDirectoryId": "rd-abcdef****",
    "CreateTime": "2018-08-10T09:55:41Z",
    "Note": "欢迎您加入",
    "TargetEntity": "someone@example.com",
    "MasterAccountId": "172841235500****",
    "MasterAccountName": "Alice",
    "ModifyTime": "2018-08-10T09:55:41Z",
    "TargetType": "Email",
    "HandshakeId": "h-ycm4rp****"
  }
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 MissingParameter.TargetEntity You must specify TargetEntity.
400 InvalidParameter.TargetEntity The TargetEntity is invalid.
400 MissingParameter.TargetType You must specify TargetType.
400 InvalidParameter.TargetType The TargetType is invalid.
400 InvalidParameter.Note.Length The length of the invitation note exceeds the limit.
400 InvalidParameter.Note The Note is invalid.
404 EntityNotExists.ResourceDirectory The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.
409 LimitExceeded.Account The maximum number of member accounts in a resource directory exceeds the limit. The maximum number of member accounts in a resource directory exceeds the limit.
409 LimitExceeded.InvitationRate The number of invitations sent exceeds the limit.
409 EntityAlreadyExists.Handshake Handshakes with the same target entity already exist.
409 NotSupport.AccountInAnotherResourceDirectory Your account is a management account for another resource directory or a member of another resource directory.
409 LegalEntityMismatch Your account does not have the same legal entity as the master account.
409 Invalid.AccountType The specified profile type of account is invalid. The specified AccountType is invalid.

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。