DATASOURCE::ROS::StackInstance类型用于查询指定资源栈组关联的资源栈实例列表详情。
语法
{
"Type": "DATASOURCE::ROS::StackInstance",
"Properties": {
"StackInstanceAccountId": String,
"StackGroupName": String,
"StackInstanceRegionId": String,
"OutputOption": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
StackInstanceAccountId | String | 是 | 是 | 资源栈所属目标账号ID。 | 无 |
StackGroupName | String | 是 | 是 | 资源栈组名称。 | 无 |
StackInstanceRegionId | String | 是 | 是 | 资源栈所属地域。 | 无 |
OutputOption | String | 否 | 是 | 是否返回资源栈输出列表。 | 无 |
返回值
Fn::GetAtt
Status:资源栈的状态。
AccountId:资源栈所属目标账号ID。
StatusReason:状态原因描述。
ParameterOverrides:覆盖参数列表。
StackGroupName:资源栈组名称。
Outputs:资源栈的输出。
RdFolderId:资源目录的资源夹ID。
DriftDetectionTime:资源栈最近一次成功完成偏差检测的时间。
StackGroupId:资源栈组ID。
RegionId:资源栈所属地域。
StackDriftStatus:最近一次成功完成偏差检测的资源栈的状态。
StackId:资源栈所对应的资源栈ID。
示例
YAML
格式ROSTemplateFormatVersion: '2015-09-01' Parameters: OutputOption: Description: en: Whether to return the Outputs parameter resource stack output list. Required: false Type: String StackGroupName: Description: en: 'Resource stack group name. Names are unique within a single region. The length must not exceed 255 characters, must start with a number or an English letter, and can contain numbers, English letters, dashes (-) and underscores (_)' Required: true Type: String StackInstanceAccountId: Description: en: "The target account ID to which the resource stack belongs. \nIn the self-service\ \ management permission mode, the account is an Alibaba Cloud account.\nIn\ \ service management permission mode, this account is a member account of\ \ the resource directory." Required: true Type: String StackInstanceRegionId: Description: en: The region to which the resource stack belongs. Required: true Type: String Resources: ExtensionDataSource: Properties: OutputOption: Ref: OutputOption StackGroupName: Ref: StackGroupName StackInstanceAccountId: Ref: StackInstanceAccountId StackInstanceRegionId: Ref: StackInstanceRegionId Type: DATASOURCE::ROS::StackInstance Outputs: AccountId: Description: The account id of the stack. Value: Fn::GetAtt: - ExtensionDataSource - AccountId DriftDetectionTime: Description: The time when the resource stack group last successfully completed deviation detection. Value: Fn::GetAtt: - ExtensionDataSource - DriftDetectionTime Outputs: Description: The outputs of the stack instance Value: Fn::GetAtt: - ExtensionDataSource - Outputs ParameterOverrides: Description: Override parameter list. Value: Fn::GetAtt: - ExtensionDataSource - ParameterOverrides RdFolderId: Description: The resource folder ID of the resource directory. Value: Fn::GetAtt: - ExtensionDataSource - RdFolderId RegionId: Description: The region id of the stack. Value: Fn::GetAtt: - ExtensionDataSource - RegionId StackDriftStatus: Description: The status of the last successful deviation detection of the resource stack group. Value: Fn::GetAtt: - ExtensionDataSource - StackDriftStatus StackGroupId: Description: The resource stack group ID. Value: Fn::GetAtt: - ExtensionDataSource - StackGroupId StackGroupName: Description: The resource stack group name Value: Fn::GetAtt: - ExtensionDataSource - StackGroupName StackId: Description: The stack id of stack instance. Value: Fn::GetAtt: - ExtensionDataSource - StackId Status: Description: Resource stack status. Value: Fn::GetAtt: - ExtensionDataSource - Status StatusReason: Description: Status reason description. Value: Fn::GetAtt: - ExtensionDataSource - StatusReason
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "StackInstanceAccountId": { "Type": "String", "Description": { "en": "The target account ID to which the resource stack belongs. \nIn the self-service management permission mode, the account is an Alibaba Cloud account.\nIn service management permission mode, this account is a member account of the resource directory." }, "Required": true }, "StackGroupName": { "Type": "String", "Description": { "en": "Resource stack group name. Names are unique within a single region.\nThe length must not exceed 255 characters, must start with a number or an English letter, and can contain numbers, English letters, dashes (-) and underscores (_)" }, "Required": true }, "StackInstanceRegionId": { "Type": "String", "Description": { "en": "The region to which the resource stack belongs." }, "Required": true }, "OutputOption": { "Type": "String", "Description": { "en": "Whether to return the Outputs parameter resource stack output list." }, "Required": false } }, "Resources": { "ExtensionDataSource": { "Type": "DATASOURCE::ROS::StackInstance", "Properties": { "StackInstanceAccountId": { "Ref": "StackInstanceAccountId" }, "StackGroupName": { "Ref": "StackGroupName" }, "StackInstanceRegionId": { "Ref": "StackInstanceRegionId" }, "OutputOption": { "Ref": "OutputOption" } } } }, "Outputs": { "Status": { "Description": "Resource stack status.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Status" ] } }, "AccountId": { "Description": "The account id of the stack.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "AccountId" ] } }, "StatusReason": { "Description": "Status reason description.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "StatusReason" ] } }, "ParameterOverrides": { "Description": "Override parameter list.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ParameterOverrides" ] } }, "StackGroupName": { "Description": "The resource stack group name", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "StackGroupName" ] } }, "Outputs": { "Description": "The outputs of the stack instance", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Outputs" ] } }, "RdFolderId": { "Description": "The resource folder ID of the resource directory.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "RdFolderId" ] } }, "DriftDetectionTime": { "Description": "The time when the resource stack group last successfully completed deviation detection.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DriftDetectionTime" ] } }, "StackGroupId": { "Description": "The resource stack group ID.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "StackGroupId" ] } }, "RegionId": { "Description": "The region id of the stack.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "RegionId" ] } }, "StackDriftStatus": { "Description": "The status of the last successful deviation detection of the resource stack group.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "StackDriftStatus" ] } }, "StackId": { "Description": "The stack id of stack instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "StackId" ] } } } }