DATASOURCE::CR::Namespaces

DATASOURCE::CR::Namespaces类型用于查询命名空间列表。

语法

{
  "Type": "DATASOURCE::CR::Namespaces",
  "Properties": {
    "Status": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Status

String

命名空间状态。

取值:

  • NORMAL:正常。

  • DELETING:删除中。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回数据(Fn::GetAtt)

  • Namespaces:命名空间详情列表。

  • NamespaceNames:命名空间名称列表。

属性名称

类型

描述

约束

Namespaces

List

命名空间详情列表。

NamespaceNames

List

命名空间名称列表。

Namespace

String

命名空间名称。

NamespaceStatus

String

命名空间状态。

取值:

  • NORMAL:正常。

  • DELETING:删除中。

AuthorizeType

String

请求用户对该命名空间的操作权限。

示例

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Status": {
      "Type": "String",
      "Description": "The status of namespace."
    }
  },
  "Resources": {
    "Namespaces": {
      "Type": "DATASOURCE::CR::Namespaces",
      "Properties": {
        "Status": {
          "Ref": "Status"
        }
      }
    }
  },
  "Outputs": {
    "Namespaces": {
      "Description": "The list of namespaces.",
      "Value": {
        "Fn::GetAtt": [
          "Namespaces",
          "Namespaces"
        ]
      }
    },
    "NamespaceNames": {
      "Description": "The list of namespace names.",
      "Value": {
        "Fn::GetAtt": [
          "Namespaces",
          "NamespaceNames"
        ]
      }
    }
  }
}
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Status:
    Type: String
    Description: The status of namespace.
Resources:
  Namespaces:
    Type: DATASOURCE::CR::Namespaces
    Properties:
      Status:
        Ref: Status
Outputs:
  Namespaces:
    Description: The list of namespaces.
    Value:
      Fn::GetAtt:
        - Namespaces
        - Namespaces
  NamespaceNames:
    Description: The list of namespace names.
    Value:
      Fn::GetAtt:
        - Namespaces
        - NamespaceNames