ALIYUN::CMS2::IntegrationPolicy

更新时间:
复制 MD 格式

The ALIYUN::CMS2::IntegrationPolicy type creates an integration policy.

Syntax

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

Properties

Parameter

Type

Required

Editable

Description

Constraints

PolicyType

String

Yes

No

The integration policy type.

Valid values:

  • CS

  • ECS

  • Cloud

EntityGroup

Map

No

No

The entity group information.

For more information, see EntityGroup properties.

PolicyName

String

No

Yes

The integration policy name.

None

ResourceGroupId

String

No

Yes

The resource group ID.

None

Tags

List

No

Yes

The tags of the integration policy.

When you create an integration policy, you can add up to 20 tags. Each tag consists of a Key and a Value. The Key is required. For more information, see Tags properties.

Workspace

String

No

No

The workspace for the integration policy.

None

EntityGroup syntax

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

EntityGroup properties

Parameter

Type

Required

Updatable

Description

Constraints

ClusterEntityType

String

No

No

The cluster entity type.

None

ClusterId

String

No

No

The cluster ID.

None

ClusterNamespace

String

No

No

The cluster namespace.

None

DisablePolicyShare

Boolean

No

No

Indicates whether to disable policy sharing.

None

EntityGroupId

String

No

No

The entity group ID.

None

EntityUserId

String

No

No

The entity user ID.

None

VpcId

String

No

No

The VPC ID.

None

Tags syntax

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

Tags properties

Parameter

Type

Required

Updatable

Description

Constraints

Key

String

Yes

No

The tag key.

None

Value

String

No

No

The tag value.

None

Return values

Fn::GetAtt

PolicyId: The ID of the integration policy.

Examples

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: The tags to attach to the integration policy. You can add up to 20 tags.
        Each tag consists of a Key and a Value, and the 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": "The tags to attach to the integration policy. You can add up to 20 tags. Each tag consists of a Key and Value, and the 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"
        ]
      }
    }
  }
}