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

Resource Orchestration Service:ALIYUN::OSS::Directory

最終更新日:Mar 17, 2025

ALIYUN::OSS::Directory は、指定されたバケットのディレクトリを作成するために使用されます。

構文

{
  "Type": "ALIYUN::OSS::Directory",
  "Properties": {
    "BucketName": String,
    "DeletionForce": Boolean,
    "DirectoryName": String
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

BucketName

String

はい

いいえ

バケット名。

なし。

DeletionForce

Boolean

いいえ

はい

ディレクトリ内の関連オブジェクトを強制的に削除するかどうかを指定します。

有効な値:

  • true

  • false (デフォルト)

DirectoryName

String

はい

いいえ

ディレクトリ名。

命名規則:

  • ディレクトリ名は UTF-8 文字でなければならず、絵文字を含めることはできません。

  • スラッシュ (/) を使用して複数のパスを区切ります。スラッシュ (/) を使用して、サブディレクトリをすばやく作成できます。サブディレクトリ名は、スラッシュ (/) またはバックスラッシュ (\) で始めることができず、連続したスラッシュ (/) を含めることもできません。

  • 2 つの連続したピリオド (..) をサブディレクトリ名として指定することはできません。

  • ディレクトリ名は 1 ~ 254 文字の長さでなければなりません。

戻り値

Fn::GetAtt

  • BucketName: バケット名。

  • DirectoryName: ディレクトリ名。

  • YAML フォーマット

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      BucketName:
        Description:
          en: bucket name.
        Type: String
        Default: ros-doc-***
      DeletionForce:
        Default: false
        Description:
          en: Whether force delete the relative objects in the directory. Default value
            is false.
        Type: Boolean
      DirectoryName:
        AllowedPattern: '[^\/\\](?!//)(.*){1,254}$'
        Description:
          en: Directory name
        Type: String
        Default: test
    Resources:
      Directory:
        Properties:
          BucketName:
            Ref: BucketName
          DeletionForce:
            Ref: DeletionForce
          DirectoryName:
            Ref: DirectoryName
        Type: ALIYUN::OSS::Directory
    Outputs:
      BucketName:
        Description: The name of Bucket
        Value:
          Fn::GetAtt:
          - Directory
          - BucketName
      DirectoryName:
        Description: The name of Directory
        Value:
          Fn::GetAtt:
          - Directory
          - DirectoryName
                            
  • JSON フォーマット

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "BucketName": {
          "Description": {
            "en": "bucket name."
          },
          "Type": "String",
          "Default": "ros-doc-***"
        },
        "DeletionForce": {
          "Default": false,
          "Description": {
            "en": "Whether force delete the relative objects in the directory. Default value is false."
          },
          "Type": "Boolean"
        },
        "DirectoryName": {
          "AllowedPattern": "[^\\/\\\\](?!//)(.*){1,254}$",
          "Description": {
            "en": "Directory name"
          },
          "Type": "String",
          "Default": "test"
        }
      },
      "Resources": {
        "Directory": {
          "Properties": {
            "BucketName": {
              "Ref": "BucketName"
            },
            "DeletionForce": {
              "Ref": "DeletionForce"
            },
            "DirectoryName": {
              "Ref": "DirectoryName"
            }
          },
          "Type": "ALIYUN::OSS::Directory"
        }
      },
      "Outputs": {
        "BucketName": {
          "Description": "バケットの名前",
          "Value": {
            "Fn::GetAtt": [
              "Directory",
              "BucketName"
            ]
          }
        },
        "DirectoryName": {
          "Description": "ディレクトリの名前",
          "Value": {
            "Fn::GetAtt": [
              "Directory",
              "DirectoryName"
            ]
          }
        }
      }
    }