All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::OOS::Parameter

Last Updated:Jul 20, 2026

The DATASOURCE::OOS::Parameter data source type is used to query common parameters.

Syntax

{
  "Type": "DATASOURCE::OOS::Parameter",
  "Properties": {
    "Name": String,
    "ParameterVersion": Integer,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraints

Name

String

Yes

No

The name of the common parameter.

None

ParameterVersion

Integer

No

No

The version number of the common parameter.

None

RefreshOptions

String

No

Yes

The refresh policy of the data source resource when the stack is updated.

Valid values:

  • Never (default): The data source resource is never refreshed when the stack is updated.

  • Always: The data source resource is always refreshed when the stack is updated.

Return values

Fn::GetAtt

  • UpdatedBy: The user who last updated the common parameter.

  • Type: The data type of the common parameter.

  • Description: The description of the common parameter.

  • Constraints: The constraints of the common parameter.

  • CreatedBy: The user who created the common parameter.

  • UpdatedDate: The time when the common parameter was last updated.

  • ParameterVersion: The version number of the common parameter.

  • Value: The value of the common parameter.

  • CreatedDate: The time when the common parameter was created.

  • ParameterId: The ID of the common parameter.

  • Tags: The tags of the common parameter.

  • ShareType: The share type of the common parameter.

Examples

Scenario 1: Query the value and metadata of a single OOS common parameter.

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: Query the value and metadata of an existing OOS common parameter for referencing centralized configurations in a stack.
Parameters:
  ParameterName:
    Type: String
    Label: Common Parameter Name
    Description: The name of the OOS common parameter. The name cannot start with ALIYUN, ALIBABA, ALICLOUD, ACS, or OOS.
    Default: demo-config-param
Resources:
  ParameterDataSource:
    Type: DATASOURCE::OOS::Parameter
    Properties:
      Name:
        Ref: ParameterName
Outputs:
  ParameterId:
    Description: Common parameter ID.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - ParameterId
  ParameterValue:
    Description: Common parameter value.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - Value
  ParameterType:
    Description: Common parameter data type.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - Type
  ParameterVersion:
    Description: Common parameter version number.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - ParameterVersion
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Query the value and metadata of an existing OOS common parameter for referencing centralized configurations in a stack."
  },
  "Parameters": {
    "ParameterName": {
      "Type": "String",
      "Label": "Common Parameter Name",
      "Description": "The name of the OOS common parameter. The name cannot start with ALIYUN, ALIBABA, ALICLOUD, ACS, or OOS.",
      "Default": "demo-config-param"
    }
  },
  "Resources": {
    "ParameterDataSource": {
      "Type": "DATASOURCE::OOS::Parameter",
      "Properties": {
        "Name": { "Ref": "ParameterName" }
      }
    }
  },
  "Outputs": {
    "ParameterId": {
      "Description": "Common parameter ID.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "ParameterId"] }
    },
    "ParameterValue": {
      "Description": "Common parameter value.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "Value"] }
    },
    "ParameterType": {
      "Description": "Common parameter data type.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "Type"] }
    },
    "ParameterVersion": {
      "Description": "Common parameter version number.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "ParameterVersion"] }
    }
  }
}

Scenario 2: Query a specific version of an OOS common parameter with a configured refresh policy.

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: Query a specific version of an OOS common parameter and configure the refresh policy on stack update.
Parameters:
  ParameterName:
    Type: String
    Label: Common Parameter Name
    Description: The name of the OOS common parameter. The name cannot start with ALIYUN, ALIBABA, ALICLOUD, ACS, or OOS.
    Default: demo-config-param
  ParameterVersion:
    Type: Number
    Label: Parameter Version Number
    Description: The version number of the parameter to query. Leave empty to query the latest version.
    MinValue: 1
    Default: 1
  RefreshOptions:
    Type: String
    Label: Refresh Policy
    Description: The refresh policy of the data source resource when the stack is updated. Always: Refresh on every update. Never: Never refresh.
    AllowedValues:
      - Always
      - Never
    Default: Always
Resources:
  ParameterDataSource:
    Type: DATASOURCE::OOS::Parameter
    Properties:
      Name:
        Ref: ParameterName
      ParameterVersion:
        Ref: ParameterVersion
      RefreshOptions:
        Ref: RefreshOptions
Outputs:
  ParameterId:
    Description: Common parameter ID.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - ParameterId
  ParameterValue:
    Description: Common parameter value for the specified version.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - Value
  ParameterType:
    Description: Common parameter data type.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - Type
  ParameterVersion:
    Description: Version number of the queried parameter.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - ParameterVersion
  ParameterDescription:
    Description: Common parameter description.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - Description
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Query a specific version of an OOS common parameter and configure the refresh policy on stack update."
  },
  "Parameters": {
    "ParameterName": {
      "Type": "String",
      "Label": "Common Parameter Name",
      "Description": "The name of the OOS common parameter. The name cannot start with ALIYUN, ALIBABA, ALICLOUD, ACS, or OOS.",
      "Default": "demo-config-param"
    },
    "ParameterVersion": {
      "Type": "Number",
      "Label": "Parameter Version Number",
      "Description": "The version number of the parameter to query. Leave empty to query the latest version.",
      "MinValue": 1,
      "Default": 1
    },
    "RefreshOptions": {
      "Type": "String",
      "Label": "Refresh Policy",
      "Description": "The refresh policy of the data source resource when the stack is updated. Always: Refresh on every update. Never: Never refresh.",
      "AllowedValues": ["Always", "Never"],
      "Default": "Always"
    }
  },
  "Resources": {
    "ParameterDataSource": {
      "Type": "DATASOURCE::OOS::Parameter",
      "Properties": {
        "Name": { "Ref": "ParameterName" },
        "ParameterVersion": { "Ref": "ParameterVersion" },
        "RefreshOptions": { "Ref": "RefreshOptions" }
      }
    }
  },
  "Outputs": {
    "ParameterId": {
      "Description": "Common parameter ID.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "ParameterId"] }
    },
    "ParameterValue": {
      "Description": "Common parameter value for the specified version.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "Value"] }
    },
    "ParameterType": {
      "Description": "Common parameter data type.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "Type"] }
    },
    "ParameterVersion": {
      "Description": "Version number of the queried parameter.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "ParameterVersion"] }
    },
    "ParameterDescription": {
      "Description": "Common parameter description.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "Description"] }
    }
  }
}

Scenario 3: Create an OOS common parameter to store an ECS instance type and use the data source to drive ECS instance creation.

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: Create an OOS common parameter to store an ECS instance type, query it via a data source, and use the value to create an ECS instance, achieving centralized configuration-driven resource creation.
Parameters:
  ZoneId:
    Type: String
    Label: Availability Zone
    Description: The availability zone for the ECS instance and vSwitch.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
  ImageId:
    Type: String
    Label: Image ID
    Description: The image ID for the ECS instance. You can select from the image dropdown.
    AssociationProperty: ALIYUN::ECS::ImageId::ImageID
  SystemDiskCategory:
    Type: String
    Label: System Disk Category
    Description: The disk category for the ECS system disk.
    Default: cloud_essd
  InstancePassword:
    Type: String
    Label: Instance Password
    Description: 8~30 characters, containing at least three of the following: uppercase letters, lowercase letters, digits, and special characters.
    NoEcho: true
    MinLength: 8
    MaxLength: 30
  ParameterName:
    Type: String
    Label: OOS Parameter Name
    Description: The name of the OOS common parameter used to store the instance type. The name cannot start with ALIYUN, ALIBABA, ALICLOUD, ACS, or OOS.
    Default: demo-ecs-instance-type
  ParameterValue:
    Type: String
    Label: Parameter Value (Instance Type)
    Description: The ECS instance type to store in the OOS common parameter, for example, ecs.t6-c1m2.large.
    MinLength: 1
    MaxLength: 4096
    Default: ecs.t6-c1m2.large
Resources:
  OosParameter:
    Type: ALIYUN::OOS::Parameter
    Properties:
      Name:
        Ref: ParameterName
      Type: String
      Value:
        Ref: ParameterValue
      Description: ECS instance type managed by OOS Parameter Store
  ParameterDataSource:
    Type: DATASOURCE::OOS::Parameter
    Properties:
      Name:
        Fn::GetAtt:
          - OosParameter
          - Name
      RefreshOptions: Always
    DependsOn: OosParameter
  Vpc:
    Type: ALIYUN::ECS::VPC
    Properties:
      CidrBlock: 192.168.0.0/16
      VpcName: oos-demo-vpc
  VSwitch:
    Type: ALIYUN::ECS::VSwitch
    Properties:
      ZoneId:
        Ref: ZoneId
      CidrBlock: 192.168.0.0/24
      VpcId:
        Ref: Vpc
      VSwitchName: oos-demo-vsw
  SecurityGroup:
    Type: ALIYUN::ECS::SecurityGroup
    Properties:
      VpcId:
        Ref: Vpc
      SecurityGroupName: oos-demo-sg
  EcsInstance:
    Type: ALIYUN::ECS::InstanceGroup
    Properties:
      ZoneId:
        Ref: ZoneId
      InstanceType:
        Fn::GetAtt:
          - ParameterDataSource
          - Value
      ImageId:
        Ref: ImageId
      SystemDiskCategory:
        Ref: SystemDiskCategory
      VpcId:
        Ref: Vpc
      VSwitchId:
        Ref: VSwitch
      SecurityGroupId:
        Ref: SecurityGroup
      Password:
        Ref: InstancePassword
      InstanceName: oos-demo-ecs
      MaxAmount: 1
      InternetMaxBandwidthOut: 5
    DependsOn:
      - ParameterDataSource
      - VSwitch
      - SecurityGroup
Outputs:
  ParameterId:
    Description: OOS common parameter ID.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - ParameterId
  ParameterName:
    Description: OOS common parameter name.
    Value:
      Ref: ParameterName
  ParameterValue:
    Description: The parameter value (ECS instance type) retrieved by the data source.
    Value:
      Fn::GetAtt:
        - ParameterDataSource
        - Value
  InstanceIds:
    Description: The list of ECS instance IDs created.
    Value:
      Fn::GetAtt:
        - EcsInstance
        - InstanceIds
  PublicIps:
    Description: The list of public IP addresses of the ECS instances.
    Value:
      Fn::GetAtt:
        - EcsInstance
        - PublicIps
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Create an OOS common parameter to store an ECS instance type, query it via a data source, and use the value to create an ECS instance, achieving centralized configuration-driven resource creation."
  },
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Label": "Availability Zone",
      "Description": "The availability zone for the ECS instance and vSwitch.",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
    },
    "ImageId": {
      "Type": "String",
      "Label": "Image ID",
      "Description": "The image ID for the ECS instance. You can select from the image dropdown.",
      "AssociationProperty": "ALIYUN::ECS::ImageId::ImageID"
    },
    "SystemDiskCategory": {
      "Type": "String",
      "Label": "System Disk Category",
      "Description": "The disk category for the ECS system disk.",
      "Default": "cloud_essd"
    },
    "InstancePassword": {
      "Type": "String",
      "Label": "Instance Password",
      "Description": "8~30 characters, containing at least three of the following: uppercase letters, lowercase letters, digits, and special characters.",
      "NoEcho": true,
      "MinLength": 8,
      "MaxLength": 30
    },
    "ParameterName": {
      "Type": "String",
      "Label": "OOS Parameter Name",
      "Description": "The name of the OOS common parameter used to store the instance type. The name cannot start with ALIYUN, ALIBABA, ALICLOUD, ACS, or OOS.",
      "Default": "demo-ecs-instance-type"
    },
    "ParameterValue": {
      "Type": "String",
      "Label": "Parameter Value (Instance Type)",
      "Description": "The ECS instance type to store in the OOS common parameter, for example, ecs.t6-c1m2.large.",
      "MinLength": 1,
      "MaxLength": 4096,
      "Default": "ecs.t6-c1m2.large"
    }
  },
  "Resources": {
    "OosParameter": {
      "Type": "ALIYUN::OOS::Parameter",
      "Properties": {
        "Name": { "Ref": "ParameterName" },
        "Type": "String",
        "Value": { "Ref": "ParameterValue" },
        "Description": "ECS instance type managed by OOS Parameter Store"
      }
    },
    "ParameterDataSource": {
      "Type": "DATASOURCE::OOS::Parameter",
      "Properties": {
        "Name": { "Fn::GetAtt": ["OosParameter", "Name"] },
        "RefreshOptions": "Always"
      },
      "DependsOn": "OosParameter"
    },
    "Vpc": {
      "Type": "ALIYUN::ECS::VPC",
      "Properties": { "CidrBlock": "192.168.0.0/16", "VpcName": "oos-demo-vpc" }
    },
    "VSwitch": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "ZoneId": { "Ref": "ZoneId" },
        "CidrBlock": "192.168.0.0/24",
        "VpcId": { "Ref": "Vpc" },
        "VSwitchName": "oos-demo-vsw"
      }
    },
    "SecurityGroup": {
      "Type": "ALIYUN::ECS::SecurityGroup",
      "Properties": { "VpcId": { "Ref": "Vpc" }, "SecurityGroupName": "oos-demo-sg" }
    },
    "EcsInstance": {
      "Type": "ALIYUN::ECS::InstanceGroup",
      "Properties": {
        "ZoneId": { "Ref": "ZoneId" },
        "InstanceType": { "Fn::GetAtt": ["ParameterDataSource", "Value"] },
        "ImageId": { "Ref": "ImageId" },
        "SystemDiskCategory": { "Ref": "SystemDiskCategory" },
        "VpcId": { "Ref": "Vpc" },
        "VSwitchId": { "Ref": "VSwitch" },
        "SecurityGroupId": { "Ref": "SecurityGroup" },
        "Password": { "Ref": "InstancePassword" },
        "InstanceName": "oos-demo-ecs",
        "MaxAmount": 1,
        "InternetMaxBandwidthOut": 5
      },
      "DependsOn": ["ParameterDataSource", "VSwitch", "SecurityGroup"]
    }
  },
  "Outputs": {
    "ParameterId": {
      "Description": "OOS common parameter ID.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "ParameterId"] }
    },
    "ParameterName": {
      "Description": "OOS common parameter name.",
      "Value": { "Ref": "ParameterName" }
    },
    "ParameterValue": {
      "Description": "The parameter value (ECS instance type) retrieved by the data source.",
      "Value": { "Fn::GetAtt": ["ParameterDataSource", "Value"] }
    },
    "InstanceIds": {
      "Description": "The list of ECS instance IDs created.",
      "Value": { "Fn::GetAtt": ["EcsInstance", "InstanceIds"] }
    },
    "PublicIps": {
      "Description": "The list of public IP addresses of the ECS instances.",
      "Value": { "Fn::GetAtt": ["EcsInstance", "PublicIps"] }
    }
  }
}