All Products
Search
Document Center

Resource Orchestration Service:OSS resources

Last Updated:Jun 22, 2026

Lists the AssociationProperty values and AssociationPropertyMetadata parameters available for Object Storage Service (OSS) resources in ROS templates.

AssociationProperty Value

Description

Corresponding AssociationPropertyMetadata

ALIYUN::OSS::Bucket::BucketName

The name of an OSS bucket.

RegionId: The ID of the region. The default value is the region of the stack.

Example:

  • Example code

    JSON example:

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "RegionId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::RegionId"
        },
        "BucketName": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::OSS::Bucket::BucketName",
          "AssociationPropertyMetadata": {
            "RegionId": "${RegionId}"
          }
        }
      }
    }

    YAML example:

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      RegionId:
        Type: String
        AssociationProperty: ALIYUN::ECS::RegionId
      BucketName:
        Type: String
        AssociationProperty: ALIYUN::OSS::Bucket::BucketName
        AssociationPropertyMetadata:
          RegionId: ${RegionId}
  • Example description

    Retrieves an OSS bucket from the current region. `AssociationProperty` is set to `ALIYUN::OSS::Bucket::BucketName` and `AssociationPropertyMetadata` is set to `RegionId`.

ALIYUN::OSS::Bucket::Object

An OSS object.

  • RegionId: The ID of the region. The default value is the region of the stack.

  • ObjectType: The storage class of the object.

  • ValueType: The value type of the object.

Example:

  • Example code

    JSON example:

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "RegionId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::RegionId"
        },
        "BucketObject": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::NLB::Zone::ZoneId",
          "AssociationPropertyMetadata": {
            "RegionId": "${RegionId}"
          }
        }
      }
    }

    YAML example:

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      RegionId:
        Type: String
        AssociationProperty: ALIYUN::ECS::RegionId
      BucketObject:
        Type: String
        AssociationProperty: ALIYUN::NLB::Zone::ZoneId
        AssociationPropertyMetadata:
          RegionId: ${RegionId}
  • Example description

    Retrieves an OSS object from the current region. `AssociationProperty` is set to `ALIYUN::OSS::Bucket::Object` and `AssociationPropertyMetadata` is set to `RegionId`.

ALIYUN::OSS::Object::ObjectName

The name of an OSS object.

  • RegionId: The ID of the region. The default value is the region of the stack.

  • BucketName: The name of the bucket.

  • ValueType: The type of the returned address.

    • The default value is `OSSUrl`. This value returns the full path of the object, such as: oss://beijing-test-delete/test.xml.

    • If you set this parameter to any other value, only the object name is returned, such as test.xml.

Example:

  • Example code

    JSON example:

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "RegionId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::RegionId"
        },
        "BucketName": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::OSS::Bucket::BucketName",
          "AssociationPropertyMetadata": {
            "RegionId": "${RegionId}"
          }
        },
        "ObjectName": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::OSS::Object::ObjectName",
          "AssociationPropertyMetadata": {
            "RegionId": "${RegionId}",
            "BucketName": "${BucketName}",
            "ValueType": "OSSUrl"
          }
        }
      }
    }

    YAML example:

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      RegionId:
        Type: String
        AssociationProperty: ALIYUN::ECS::RegionId
      BucketName:
        Type: String
        AssociationProperty: ALIYUN::OSS::Bucket::BucketName
        AssociationPropertyMetadata:
          RegionId: ${RegionId}
      ObjectName:
        Type: String
        AssociationProperty: ALIYUN::OSS::Object::ObjectName
        AssociationPropertyMetadata:
          RegionId: ${RegionId}
          BucketName: ${BucketName}
          ValueType: OSSUrl
  • Example description

    Retrieves an OSS object from the current region. `AssociationProperty` is set to `ALIYUN::OSS::Object::ObjectName` and `AssociationPropertyMetadata` is configured with `RegionId` and `BucketName`.

UploadFilesToUserBucket

A component for uploading files to an OSS bucket.

  • Mode: The display mode of the component. Valid values:

    • normal

    • dragger (default)

  • RegionId: The region of the bucket. Default: the region of the current environment. Make sure this matches the region of the specified bucket.

  • BucketName: The name of the bucket.

  • Multiple: Specifies whether to allow uploading multiple files at a time. Valid value:

    • true

  • Directory: Specifies whether to enable folder uploads. Allowed values:

    • true

  • ValueType: The type of the returned value. The default value is the OSS URL.

  • ObjectNamePrefix: The upload destination path.

  • AddSuffix: Specifies whether to append a timestamp suffix to the uploaded file name. Valid value:

    • true

  • SuffixFormat: The format of the timestamp suffix. Example: `YYYY-MM-DD`.

Example:

  • Example code

    JSON example:

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "BucketName": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::OSS::Bucket::BucketName",
          "AssociationPropertyMetadata": {
            "RegionId": "${RegionId}"
          }
        },
        "UploadFilesToUserBucket": {
          "Type": "String",
          "AssociationProperty": "UploadFilesToUserBucket",
          "AssociationPropertyMetadata": {
            "Mode": "dragger",
            "BucketName": "${BucketName}",
            "Multiple": true,
            "Directory": true,
            "ValueType": "OSS Url",
            "AddSuffix": true,
            "SuffixFormat": "YYYY-MM-DD"
          }
        }
      }
    }

    YAML example:

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      RegionId:
        Type: String
        AssociatiROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      BucketName:
        Type: String
        AssociationProperty: ALIYUN::OSS::Bucket::BucketName
        AssociationPropertyMetadata:
          RegionId: ${RegionId}
      UploadFilesToUserBucket:
        Type: String
        AssociationProperty: UploadFilesToUserBucket
        AssociationPropertyMetadata:
          Mode: dragger
          BucketName: ${BucketName}
          Multiple: true
          Directory: true
          ValueType: OSS Url
          AddSuffix: true
          SuffixFormat: YYYY-MM-DD
  • Example description

    Retrieves OSS objects in the current region by setting the AssociationProperty of the BucketName parameter to ALIYUN::OSS::Bucket::BucketName with RegionId and BucketName as AssociationPropertyMetadata. Uploads files to the specified bucket by setting AssociationProperty to UploadFilesToUserBucket with BucketName as metadata.