All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::OSS::BucketStyle

Last Updated:Jul 06, 2026

The ALIYUN::OSS::BucketStyle resource creates an image style.

Syntax

{
  "Type": "ALIYUN::OSS::BucketStyle",
  "Properties": {
    "Bucket": String,
    "Content": String,
    "StyleName": String,
    "Category": String
  }
}

Properties

Parameter

Type

Required

Editable

Description

Constraints

Bucket

String

Yes

No

The bucket to which the image style belongs.

None

Content

String

Yes

Yes

The content of the image style.

Specifies one or more image processing parameters.

StyleName

String

Yes

No

The name of the image style.

None

Category

String

No

Yes

The category of the style.

Valid values:

  • document

  • video

  • image

Outputs

Use the Fn::GetAtt intrinsic function to retrieve the value of the following attributes for this resource.

  • Category: The category of the style. Valid values: image, document, and video.

  • StyleName: The name of the image style.

  • Content: The content of the image style, which consists of one or more image processing parameters.

  • CreateTime: The creation time of the image style.

  • LastModifyTime: The last modification time of the image style.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Category:
    Type: String
    Description:
      en: 'The category of the style. Valid values: `document`, `video`, and `image`.'
    AllowedValues:
      - document
      - video
      - image
    Default: Null
    Required: false
  Content:
    Type: String
    Description:
      en: The image processing parameters that define the style.
    Required: true
  StyleName:
    Type: String
    Description:
      en: The name of the image style.
    Required: true
  Bucket:
    Type: String
    Description:
      en: The OSS bucket to which the image style belongs.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::OSS::BucketStyle
    Properties:
      Category:
        Ref: Category
      Content:
        Ref: Content
      StyleName:
        Ref: StyleName
      Bucket:
        Ref: Bucket
Outputs:
  Category:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Category
    Description: 'The category of the style. Valid values: `document`, `video`, and `image`.'
  Content:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Content
    Description: The image processing parameters that define the style.
  StyleName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - StyleName
    Description: The name of the image style.
  LastModifyTime:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LastModifyTime
    Description: The last modification time of the image style.
  CreateTime:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
    Description: The creation time of the image style.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Category": {
      "Type": "String",
      "Description": {
        "en": "The category of the style. Valid values: `document`, `video`, and `image`."
      },
      "AllowedValues": [
        "document",
        "video",
        "image"
      ],
      "Default": null,
      "Required": false
    },
    "Content": {
      "Type": "String",
      "Description": {
        "en": "The image processing parameters that define the style."
      },
      "Required": true
    },
    "StyleName": {
      "Type": "String",
      "Description": {
        "en": "The name of the image style."
      },
      "Required": true
    },
    "Bucket": {
      "Type": "String",
      "Description": {
        "en": "The OSS bucket to which the image style belongs."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::OSS::BucketStyle",
      "Properties": {
        "Category": {
          "Ref": "Category"
        },
        "Content": {
          "Ref": "Content"
        },
        "StyleName": {
          "Ref": "StyleName"
        },
        "Bucket": {
          "Ref": "Bucket"
        }
      }
    }
  },
  "Outputs": {
    "Category": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Category"
        ]
      },
      "Description": "The category of the style. Valid values: `document`, `video`, and `image`."
    },
    "Content": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Content"
        ]
      },
      "Description": "The image processing parameters that define the style."
    },
    "StyleName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "StyleName"
        ]
      },
      "Description": "The name of the image style."
    },
    "LastModifyTime": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LastModifyTime"
        ]
      },
      "Description": "The last modification time of the image style."
    },
    "CreateTime": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      },
      "Description": "The creation time of the image style."
    }
  }
}