All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::PAI::Image

更新時間:Jul 05, 2026

The ALIYUN::PAI::Image resource defines a custom image in a workspace.

Syntax

{
  "Type": "ALIYUN::PAI::Image",
  "Properties": {
    "ImageName": String,
    "ImageUri": String,
    "Accessibility": String,
    "Labels": List,
    "WorkspaceId": String
  }
}

Properties

Property name

Type

Required

Editable

Description

Constraints

ImageName

String

Yes

No

The image name.

None

ImageUri

String

Yes

No

The image URI.

The URI must include a version number.

Accessibility

String

No

Yes

The image visibility.

Allowed values:

  • PUBLIC: All members in the workspace can manage the image.

  • PRIVATE: Only the creator can manage the image.

Labels

List

No

Yes

The labels to apply to the image.

The number of labels can be from 0 to 20. For more information, see the Labels properties.

WorkspaceId

String

No

No

The ID of the workspace.

None

Labels syntax

"Labels": [
  {
    "Value": String,
    "Key": String
  }
]

Labels properties

Property name

Type

Required

Editable

Description

Constraints

Key

String

Yes

Yes

The key for the label.

None

Value

String

No

Yes

The value for the key.

None

Return values

Fn::GetAtt

  • ImageName: The image name.

  • Accessibility: The image visibility.

  • WorkspaceId: The ID of the workspace.

  • Labels: The labels applied to the image.

  • ImageUri: The image URI, which includes the version number.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  WorkspaceId:
    Type: String
    Description:
      en: The ID of the workspace.
    Default: Null
    Required: false
  ImageName:
    Type: String
    Description:
      en: The image name.
    Required: true
  Labels:
    Description:
      en: The labels to apply to the image.
    Required: false
    Default: Null
    Type: Json
    MinLength: 0
    MaxLength: 20
    AssociationProperty: List[Parameters]
    AssociationPropertyMetadata:
      Parameters:
        Key:
          Type: String
          Description:
            en: The key for the label.
          Required: true
        Value:
          Type: String
          Description:
            en: The value for the key.
          Default: Null
          Required: false
  Accessibility:
    Type: String
    Description:
      en: |-
        The image visibility. Possible values:
        - PUBLIC: All members in the workspace can manage the image.
        - PRIVATE: Only the creator can manage the image.
    AllowedValues:
      - PUBLIC
      - PRIVATE
    Default: Null
    Required: false
  ImageUri:
    Type: String
    Description:
      en: The image URI, which includes the version number.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::PAI::Image
    Properties:
      WorkspaceId:
        Ref: WorkspaceId
      ImageName:
        Ref: ImageName
      Labels:
        Ref: Labels
      Accessibility:
        Ref: Accessibility
      ImageUri:
        Ref: ImageUri
Outputs:
  WorkspaceId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - WorkspaceId
    Description: The ID of the workspace.
  ImageName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImageName
    Description: The image name.
  Labels:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Labels
    Description: The labels of the image.
  Accessibility:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Accessibility
    Description: The image visibility.
  ImageUri:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImageUri
    Description: The image URI, which includes the version number.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "WorkspaceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the workspace."
      },
      "Default": null,
      "Required": false
    },
    "ImageName": {
      "Type": "String",
      "Description": {
        "en": "The image name."
      },
      "Required": true
    },
    "Labels": {
      "Description": {
        "en": "The labels to apply to the image."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "MinLength": 0,
      "MaxLength": 20,
      "AssociationProperty": "List[Parameters]",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Key": {
            "Type": "String",
            "Description": {
              "en": "The key for the label."
            },
            "Required": true
          },
          "Value": {
            "Type": "String",
            "Description": {
              "en": "The value for the key."
            },
            "Default": null,
            "Required": false
          }
        }
      }
    },
    "Accessibility": {
      "Type": "String",
      "Description": {
        "en": "The image visibility. Possible values:\n- PUBLIC: All members in the workspace can manage the image.\n- PRIVATE: Only the creator can manage the image."
      },
      "AllowedValues": [
        "PUBLIC",
        "PRIVATE"
      ],
      "Default": null,
      "Required": false
    },
    "ImageUri": {
      "Type": "String",
      "Description": {
        "en": "The image URI, which includes the version number."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::PAI::Image",
      "Properties": {
        "WorkspaceId": {
          "Ref": "WorkspaceId"
        },
        "ImageName": {
          "Ref": "ImageName"
        },
        "Labels": {
          "Ref": "Labels"
        },
        "Accessibility": {
          "Ref": "Accessibility"
        },
        "ImageUri": {
          "Ref": "ImageUri"
        }
      }
    }
  },
  "Outputs": {
    "WorkspaceId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "WorkspaceId"
        ]
      },
      "Description": "The ID of the workspace."
    },
    "ImageName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImageName"
        ]
      },
      "Description": "The image name."
    },
    "Labels": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Labels"
        ]
      },
      "Description": "The labels of the image."
    },
    "Accessibility": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Accessibility"
        ]
      },
      "Description": "The image visibility."
    },
    "ImageUri": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImageUri"
        ]
      },
      "Description": "The image URI, which includes the version number."
    }
  }
}