ALIYUN::CMS2::IntegrationPolicy

更新时间:
复制 MD 格式

ALIYUN::CMS2::IntegrationPolicy类型用于创建接入中心策略。

语法

{
  "Type": "ALIYUN::CMS2::IntegrationPolicy",
  "Properties": {
    "PolicyType": String,
    "EntityGroup": Map,
    "PolicyName": String,
    "ResourceGroupId": String,
    "Tags": List,
    "Workspace": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

PolicyType

String

集成策略类型。

取值:

  • CS

  • ECS

  • Cloud

EntityGroup

Map

实体组信息。

更多信息,请参考EntityGroup属性

PolicyName

String

集成策略名称。

ResourceGroupId

String

资源组 ID。

Tags

List

集成策略的标签,

创建集成策略时最多支持添加 20 个标签。每个标签包含 Key 和 Value 两个属性,Key 为必填项。更多信息,请参考Tags属性

Workspace

String

集成策略的工作空间。

EntityGroup语法

"EntityGroup": {
  "EntityUserId": String,
  "VpcId": String,
  "ClusterId": String,
  "ClusterEntityType": String,
  "EntityGroupId": String,
  "ClusterNamespace": String,
  "DisablePolicyShare": Boolean
}

EntityGroup属性

属性名称

类型

必须

允许更新

描述

约束

ClusterEntityType

String

集群实体类型。

ClusterId

String

集群 ID。

ClusterNamespace

String

集群命名空间。

DisablePolicyShare

Boolean

是否禁用策略共享。

EntityGroupId

String

实体组 ID。

EntityUserId

String

实体用户 ID。

VpcId

String

专有网络。

Tags语法

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

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

Value

String

标签值。

返回值

Fn::GetAtt

PolicyId:集成策略 ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  EntityGroup:
    AssociationPropertyMetadata:
      Parameters:
        ClusterEntityType:
          Description:
            en: The cluster entity type.
          Required: false
          Type: String
        ClusterId:
          Description:
            en: The cluster ID.
          Required: false
          Type: String
        ClusterNamespace:
          Description:
            en: The cluster namespace.
          Required: false
          Type: String
        DisablePolicyShare:
          Description:
            en: Whether to disable policy sharing.
          Required: false
          Type: Boolean
        EntityGroupId:
          Description:
            en: The entity group ID.
          Required: false
          Type: String
        EntityUserId:
          Description:
            en: The entity user ID.
          Required: false
          Type: String
        VpcId:
          AssociationProperty: ALIYUN::ECS::VPC::VPCId
          Description:
            en: The VPC ID.
          Required: false
          Type: String
    Description:
      en: The entity group information.
    Required: false
    Type: Json
  PolicyName:
    Description:
      en: The name of the integration policy.
    Required: false
    Type: String
  PolicyType:
    AllowedValues:
      - CS
      - ECS
      - Cloud
    Description:
      en: The type of the integration policy.
    Required: true
    Type: String
  ResourceGroupId:
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
    Description:
      en: The ID of the resource group.
    Required: false
    Type: String
  Tags:
    AssociationProperty: List[Parameters]
    AssociationPropertyMetadata:
      ListMetadata:
        Order:
          - Key
          - Value
      Parameters:
        Key:
          Required: true
          Type: String
        Value:
          Required: false
          Type: String
    Description:
      en: Tags to attach to integration policy. Max support 20 tags to add during
        create integration policy. Each tag with two properties Key and Value, and
        Key is required.
    MaxLength: 20
    Required: false
    Type: Json
  Workspace:
    Description:
      en: The workspace of the integration policy.
    Required: false
    Type: String
Resources:
  IntegrationPolicy:
    Properties:
      EntityGroup:
        Ref: EntityGroup
      PolicyName:
        Ref: PolicyName
      PolicyType:
        Ref: PolicyType
      ResourceGroupId:
        Ref: ResourceGroupId
      Tags:
        Ref: Tags
      Workspace:
        Ref: Workspace
    Type: ALIYUN::CMS2::IntegrationPolicy
Outputs:
  PolicyId:
    Description: The ID of the integration policy.
    Value:
      Fn::GetAtt:
        - IntegrationPolicy
        - PolicyId
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "PolicyType": {
      "Type": "String",
      "Description": {
        "en": "The type of the integration policy."
      },
      "AllowedValues": [
        "CS",
        "ECS",
        "Cloud"
      ],
      "Required": true
    },
    "ResourceGroupId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
      "Description": {
        "en": "The ID of the resource group."
      },
      "Required": false
    },
    "EntityGroup": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "EntityUserId": {
            "Type": "String",
            "Description": {
              "en": "The entity user ID."
            },
            "Required": false
          },
          "VpcId": {
            "Type": "String",
            "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
            "Description": {
              "en": "The VPC ID."
            },
            "Required": false
          },
          "ClusterId": {
            "Type": "String",
            "Description": {
              "en": "The cluster ID."
            },
            "Required": false
          },
          "ClusterEntityType": {
            "Type": "String",
            "Description": {
              "en": "The cluster entity type."
            },
            "Required": false
          },
          "EntityGroupId": {
            "Type": "String",
            "Description": {
              "en": "The entity group ID."
            },
            "Required": false
          },
          "ClusterNamespace": {
            "Type": "String",
            "Description": {
              "en": "The cluster namespace."
            },
            "Required": false
          },
          "DisablePolicyShare": {
            "Type": "Boolean",
            "Description": {
              "en": "Whether to disable policy sharing."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "The entity group information."
      },
      "Required": false
    },
    "PolicyName": {
      "Type": "String",
      "Description": {
        "en": "The name of the integration policy."
      },
      "Required": false
    },
    "Tags": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Value": {
            "Type": "String",
            "Required": false
          },
          "Key": {
            "Type": "String",
            "Required": true
          }
        },
        "ListMetadata": {
          "Order": [
            "Key",
            "Value"
          ]
        }
      },
      "Type": "Json",
      "AssociationProperty": "List[Parameters]",
      "Description": {
        "en": "Tags to attach to integration policy. Max support 20 tags to add during create integration policy. Each tag with two properties Key and Value, and Key is required."
      },
      "Required": false,
      "MaxLength": 20
    },
    "Workspace": {
      "Type": "String",
      "Description": {
        "en": "The workspace of the integration policy."
      },
      "Required": false
    }
  },
  "Resources": {
    "IntegrationPolicy": {
      "Type": "ALIYUN::CMS2::IntegrationPolicy",
      "Properties": {
        "PolicyType": {
          "Ref": "PolicyType"
        },
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "EntityGroup": {
          "Ref": "EntityGroup"
        },
        "PolicyName": {
          "Ref": "PolicyName"
        },
        "Tags": {
          "Ref": "Tags"
        },
        "Workspace": {
          "Ref": "Workspace"
        }
      }
    }
  },
  "Outputs": {
    "PolicyId": {
      "Description": "The ID of the integration policy.",
      "Value": {
        "Fn::GetAtt": [
          "IntegrationPolicy",
          "PolicyId"
        ]
      }
    }
  }
}