サービスリンクロールを作成します。
今すぐお試しください
テスト
RAM 認証
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ServiceName |
string |
必須 |
サービス名。 サービス名の詳細については、「サービスリンクロールをサポートする Alibaba Cloud サービス」をご参照ください。 |
polardb.aliyuncs.com |
| CustomSuffix |
string |
任意 |
ロール名のサフィックス。 ロール名 (サフィックスを含む) は、1 文字から 64 文字の長さで、文字、数字、ピリオド (.)、およびハイフン (-) を含めることができます。 たとえば、サフィックスが |
Example |
| Description |
string |
任意 |
サービスリンクロールの説明。 カスタムサフィックスをサポートするサービスリンクロールの場合、このパラメーターを設定する必要があります。それ以外の場合、デフォルト値が使用され、変更できません。 説明は 1 文字から 1,024 文字の長さである必要があります。 |
Service Linked Role for PolarDB. PolarDB will use this role to access your resources in other services. |
共通リクエストパラメーターの詳細については、「共通パラメーター」をご参照ください。
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
戻りデータ。 |
||
| RequestId |
string |
リクエスト ID。 |
FE58D7CF-03BC-432A-B42D-BC3390C8C2E1 |
| Role |
object |
ロールに関する情報です。 |
|
| Arn |
string |
ロールの Alibaba Cloud リソース名 (ARN)。 |
acs:ram::177242285274****:role/aliyunserviceroleforpolardb |
| AssumeRolePolicyDocument |
string |
ロールの信頼ポリシーのドキュメント。 |
{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"polardb.aliyuncs.com\"]}}],\"Version\":\"1\"} |
| CreateDate |
string |
ロールが作成された時間。時間は協定世界時 (UTC) で表示されます。 |
2020-06-30T08:14:16Z |
| Description |
string |
ロールの説明。 |
Service Linked Role for PolarDB. PolarDB will use this role to access your resources in other services. |
| IsServiceLinkedRole |
boolean |
ロールがサービスリンクロールであるかどうかを示します。有効な値:
|
true |
| RoleId |
string |
ロール ID。 |
32833240981067**** |
| RoleName |
string |
ロール名。 |
AliyunServiceRoleForPolarDB |
| RolePrincipalName |
string |
ドメイン名をサフィックスとして使用するロール名。 |
AliyunServiceRoleForPolarDB@role.test.onaliyunservice.com |
例
成功レスポンス
JSONJSON
{
"RequestId": "FE58D7CF-03BC-432A-B42D-BC3390C8C2E1",
"Role": {
"Arn": "acs:ram::177242285274****:role/aliyunserviceroleforpolardb",
"AssumeRolePolicyDocument": "{\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":[\\\"polardb.aliyuncs.com\\\"]}}],\\\"Version\\\":\\\"1\\\"}",
"CreateDate": "2020-06-30T08:14:16Z",
"Description": "Service Linked Role for PolarDB. PolarDB will use this role to access your resources in other services.",
"IsServiceLinkedRole": true,
"RoleId": "32833240981067****",
"RoleName": "AliyunServiceRoleForPolarDB",
"RolePrincipalName": "AliyunServiceRoleForPolarDB@role.test.onaliyunservice.com"
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidParameter.CustomSuffix.NotAllowed | Custom suffix is not allowed for this Service Linked Role. | |
| 400 | InvalidParameter.CustomSuffix.InvalidChars | The parameter CustomSuffix contains invalid characters. | |
| 400 | InvalidParameter.CustomSuffix.Length | The maximum length of the parameter CustomSuffix is exceeded. | |
| 400 | InvalidParameter.Description.NotAllowed | Custom description is not allowed for default service linked role. | |
| 400 | InvalidParameter.Description.Length | The maximum length of the description is exceeded. It must not exceed 1024 characters. | The maximum length of the description is exceeded. It must not exceed 1024 characters. |
| 404 | EntityNotExist.Service | The service does not exist. | |
| 409 | EntityAlreadyExists.Role | The role already exists. | The role already exists. |
| 409 | LimitExceeded.Role | The maximum number of roles is exceeded. | The maximum number of roles is exceeded. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。