フォルダを作成します。
操作説明
ルートフォルダ配下には、最大 5 段階のフォルダ階層を作成できます。
この例では、ルートフォルダ配下に rdFolder という名前のフォルダを作成します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
resourcemanager:CreateFolder |
create |
*Folder
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ParentFolderId |
string |
任意 |
親フォルダの ID。 |
r-b1**** |
| FolderName |
string |
必須 |
フォルダの名前。 名前の長さは 1~24 文字で、英数字、アンダースコア (_)、ピリオド (.)、およびハイフン (-) を使用できます。 |
rdFolder |
共通リクエストパラメーターの詳細については、「共通パラメーター」をご参照ください。
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエストの ID。 |
C2CBCA30-C8DD-423E-B4AD-4FB694C9180C |
| Folder |
object |
フォルダの情報。 |
|
| FolderId |
string |
フォルダの ID。 |
fd-u8B321**** |
| CreateTime |
string |
フォルダが作成された時刻。 |
2019-02-19T09:34:50.757Z |
| ParentFolderId |
string |
親フォルダの ID。 |
r-b1**** |
| FolderName |
string |
フォルダの名前。 |
rdFolder |
例
成功レスポンス
JSONJSON
{
"RequestId": "C2CBCA30-C8DD-423E-B4AD-4FB694C9180C",
"Folder": {
"FolderId": "fd-u8B321****",
"CreateTime": "2019-02-19T09:34:50.757Z",
"ParentFolderId": "r-b1****",
"FolderName": "rdFolder"
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidParameter.ParentFolderId | The ParentFolderId is invalid. | 指定された親フォルダー ID は無効です。 ID は r- で始まる 6 文字の文字列か、fd- で始まる 10 文字の文字列である必要があり、 英数字を使用できます。 |
| 400 | MissingParameter.Folder.Name | You must specify the resource folder name. | 指定されたリソースディレクトリ名は無効です。 有効な名前を指定してください。 |
| 400 | InvalidParameter.Folder.Name | The Name of folder is invalid. | 指定されたリソースディレクトリ名は無効です。 指定されたリソースディレクトリ名は無効です。 リソースディレクトリ名は英数字、アンダースコア (_)、ピリオド (.)、およびハイフン (-) を使用できます。 |
| 400 | InvalidParameter.Folder.Name.Length | The Name of folder exceeds the length limit. | フォルダー名の文字数制限を超えました。 名前を 1~24 文字以内に指定してください。 |
| 400 | InvalidParameter.Folder.Name.AlreadyUsed | The name already exists under the same parent. Please change to another name. | |
| 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. |
| 404 | EntityNotExists.Folder | The resource directory folder does not exist. | 指定されたリソースディレクトリは既に存在しています。 まずリソースディレクトリを作成してください。 |
| 409 | LimitExceeded.Folder.Depth | The folder depth exceeds the limit of 5. | フォルダー階層の上限を超えました。 ルータディレクトリを除き、最大 5 階層のフォルダーを作成できます。 |
| 409 | QuotaExceeded.Folder.Count | The number of folders exceeds the quota. | リソースディレクトリの数が上限を超えました。 |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。