All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::FC3::LayerVersion

Last Updated:Apr 21, 2026

The ALIYUN::FC3::LayerVersion resource type creates a layer version.

Syntax

{
  "Type": "ALIYUN::FC3::LayerVersion",
  "Properties": {
    "LayerName": String,
    "Acl": String,
    "CompatibleRuntime": List,
    "Code": Map,
    "Description": String,
    "License": String
  }
}

Properties

Parameter

Type

Required

Update allowed

Description

Constraints

LayerName

String

Yes

No

The name of the layer.

None

Acl

String

No

Yes

The layer's access permission.

Valid values:

  • 1: public

  • 0: private

Default value: private.

Code

Map

No

No

The layer's code configuration.

For more information, see Code properties.

CompatibleRuntime

List

No

No

A list of compatible runtime environments.

Length: 0 to 20.

Description

String

No

No

A description of the layer version.

None

License

String

No

No

The license for the layer.

None

Code syntax

"Code": {
  "ZipFile": String,
  "Checksum": String,
  "OssObjectName": String,
  "OssBucketName": String
}

Code properties

Parameter

Type

Required

Update allowed

Description

Constraints

Checksum

String

No

No

The CRC-64 value of the code package.

If provided, Function Compute verifies that the code package's checksum matches this value.

OssBucketName

String

No

No

The OSS bucket that contains the layer's code package.

None

OssObjectName

String

No

No

The OSS object that contains the layer's code package.

None

ZipFile

String

No

No

The Base64-encoded layer code package.

None

Return values

Fn::GetAtt

  • CompatibleRuntime: A list of compatible runtime environments.

  • Description: The description of the layer version.

  • CodeSize: The size of the layer's code package, in bytes.

  • LayerVersionArn: The ARN of the layer version. The format is acs:fc:{region}:{accountID}:layers/{layerName}/versions/{layerVersion}.

  • Version: The version of the layer.

  • LayerName: The name of the layer.

  • CreateTime: The creation time of the resource.

  • License: The license for the layer.

  • Acl: The access permission of the layer. 1: public, 0: private. Default value: private.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CompatibleRuntime:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: A compatible runtime environment.
        Required: false
    Type: Json
    AssociationProperty: List[Parameter]
    Description:
      en: The list of runtime environments that the layer supports.
    Required: false
    MinLength: 0
    MaxLength: 20
  Description:
    Type: String
    AssociationProperty: TextArea
    Description:
      en: The description of the version.
    Required: false
  LayerName:
    Type: String
    Description:
      en: The name of the layer.
    Required: true
  License:
    Type: String
    Description:
      en: The license for the layer.
    Required: false
  Acl:
    Type: String
    Description:
      en: 'The access permission of the layer. Valid values: 1 (public) and 0 (private). Default value: private.'
    AllowedValues:
      - '1'
      - '0'
    Required: false
  Code:
    AssociationPropertyMetadata:
      Parameters:
        ZipFile:
          Type: String
          Description:
            en: The Base64-encoded layer code package.
          Required: false
        Checksum:
          Type: String
          Description:
            en: The CRC-64 value of the code package. If a checksum is provided, Function Compute verifies that the checksum of the code package matches the provided checksum.
          Required: false
        OssObjectName:
          Type: String
          Description:
            en: The name of the OSS object that contains the layer's code package.
          Required: false
        OssBucketName:
          Type: String
          Description:
            en: The name of the OSS bucket that contains the layer's code package.
          Required: false
    Type: Json
    Description:
      en: The code configuration for the layer.
    Required: false
Resources:
  ExtensionResource:
    Type: ALIYUN::FC3::LayerVersion
    Properties:
      CompatibleRuntime:
        Ref: CompatibleRuntime
      Description:
        Ref: Description
      LayerName:
        Ref: LayerName
      License:
        Ref: License
      Acl:
        Ref: Acl
      Code:
        Ref: Code
Outputs:
  CompatibleRuntime:
    Description: The list of runtime environments that the layer supports.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CompatibleRuntime
  Description:
    Description: The description of the version.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Description
  CodeSize:
    Description: The size of the layer's code package, in bytes.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CodeSize
  LayerVersionArn:
    Description: The ARN of the layer version. The format is acs:fc:{region}:{accountID}:layers/{layerName}/versions/{layerVersion}.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LayerVersionArn
  Version:
    Description: The version of the layer.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Version
  LayerName:
    Description: The name of the layer.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LayerName
  CreateTime:
    Description: The creation time of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  License:
    Description: The license for the layer.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - License
  Acl:
    Description: 'The access permission of the layer. 1: public, 0: private. Default value: private.'
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Acl
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CompatibleRuntime": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "A compatible runtime environment."
          },
          "Required": false
        }
      },
      "Type": "Json",
      "AssociationProperty": "List[Parameter]",
      "Description": {
        "en": "The list of runtime environments that the layer supports."
      },
      "Required": false,
      "MinLength": 0,
      "MaxLength": 20
    },
    "Description": {
      "Type": "String",
      "AssociationProperty": "TextArea",
      "Description": {
        "en": "The description of the version."
      },
      "Required": false
    },
    "LayerName": {
      "Type": "String",
      "Description": {
        "en": "The name of the layer."
      },
      "Required": true
    },
    "License": {
      "Type": "String",
      "Description": {
        "en": "The license for the layer."
      },
      "Required": false
    },
    "Acl": {
      "Type": "String",
      "Description": {
        "en": "The access permission of the layer. Valid values: 1 (public) and 0 (private). Default value: private."
      },
      "AllowedValues": [
        "1",
        "0"
      ],
      "Required": false
    },
    "Code": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "ZipFile": {
            "Type": "String",
            "Description": {
              "en": "The Base64-encoded layer code package."
            },
            "Required": false
          },
          "Checksum": {
            "Type": "String",
            "Description": {
              "en": "The CRC-64 value of the code package. If a checksum is provided, Function Compute verifies that the checksum of the code package matches the provided checksum."
            },
            "Required": false
          },
          "OssObjectName": {
            "Type": "String",
            "Description": {
              "en": "The name of the OSS object that contains the layer's code package."
            },
            "Required": false
          },
          "OssBucketName": {
            "Type": "String",
            "Description": {
              "en": "The name of the OSS bucket that contains the layer's code package."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "The code configuration for the layer."
      },
      "Required": false
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::FC3::LayerVersion",
      "Properties": {
        "CompatibleRuntime": {
          "Ref": "CompatibleRuntime"
        },
        "Description": {
          "Ref": "Description"
        },
        "LayerName": {
          "Ref": "LayerName"
        },
        "License": {
          "Ref": "License"
        },
        "Acl": {
          "Ref": "Acl"
        },
        "Code": {
          "Ref": "Code"
        }
      }
    }
  },
  "Outputs": {
    "CompatibleRuntime": {
      "Description": "The list of runtime environments that the layer supports.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CompatibleRuntime"
        ]
      }
    },
    "Description": {
      "Description": "The description of the version.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Description"
        ]
      }
    },
    "CodeSize": {
      "Description": "The size of the layer's code package, in bytes.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CodeSize"
        ]
      }
    },
    "LayerVersionArn": {
      "Description": "The ARN of the layer version. The format is acs:fc:{region}:{accountID}:layers/{layerName}/versions/{layerVersion}.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LayerVersionArn"
        ]
      }
    },
    "Version": {
      "Description": "The version of the layer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Version"
        ]
      }
    },
    "LayerName": {
      "Description": "The name of the layer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LayerName"
        ]
      }
    },
    "CreateTime": {
      "Description": "The creation time of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "License": {
      "Description": "The license for the layer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "License"
        ]
      }
    },
    "Acl": {
      "Description": "The access permission of the layer. 1: public, 0: private. Default value: private.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Acl"
        ]
      }
    }
  }
}