DATASOURCE::SAE::Applications类型用于获取应用列表。
语法
{
  "Type": "DATASOURCE::SAE::Applications",
  "Properties": {
    "NamespaceId": String,
    "FieldValue": String,
    "AppName": String,
    "FieldType": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| NamespaceId | String | 否 | 是 | 命名空间ID。 | 无 | 
| FieldValue | String | 否 | 是 | 输入目标应用的应用名称、应用ID、SLB IP地址或实例IP地址。 | 无 | 
| AppName | String | 否 | 是 | 应用名称。 | 无 | 
| FieldType | String | 否 | 是 | 设置筛选应用的维度。 | 取值: 
 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回数据(Fn::GetAtt)
- Applications:应用详情列表。 
- ApplicationIds:应用ID列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| ApplicationIds | List | 应用ID列表。 | 无 | 
| Applications | List | 应用详情列表。 | 无 | 
| AppId | String | 应用ID。 | 无 | 
| AppName | String | 应用名称。 | 无 | 
| AppDescription | String | 应用描述信息。 | 无 | 
| ScaleRuleEnabled | Boolean | 弹性伸缩策略是否启用。 | 取值: 
 | 
| Instances | Number | 应用实例个数。 | 无 | 
| RunningInstances | Number | 运行中的实例个数。 | 无 | 
| AppDeletingStatus | Boolean | 是否正在删除应用。 | 取值: 
 | 
| RegionId | String | 地域ID。 | 无 | 
示例
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "AppName": {
      "Type": "String",
      "Description": "The name of application."
    }
  },
  "Resources": {
    "Applications": {
      "Type": "DATASOURCE::SAE::Applications",
      "Properties": {
        "AppName": {
          "Ref": "AppName"
        }
      }
    }
  },
  "Outputs": {
    "Applications": {
      "Description": "The list of applications.",
      "Value": {
        "Fn::GetAtt": [
          "Applications",
          "Applications"
        ]
      }
    },
    "ApplicationIds": {
      "Description": "The list of application IDs.",
      "Value": {
        "Fn::GetAtt": [
          "Applications",
          "ApplicationIds"
        ]
      }
    }
  }
}ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AppName:
    Type: String
    Description: The name of application.
Resources:
  Applications:
    Type: DATASOURCE::SAE::Applications
    Properties:
      AppName:
        Ref: AppName
Outputs:
  Applications:
    Description: The list of applications.
    Value:
      Fn::GetAtt:
        - Applications
        - Applications
  ApplicationIds:
    Description: The list of application IDs.
    Value:
      Fn::GetAtt:
        - Applications
        - ApplicationIds
该文章对您有帮助吗?