Clones a security group.


  "Type": "ALIYUN::ECS::SecurityGroupClone",
  "Properties": {
    "SourceSecurityGroupId": String,
    "NetworkType": String,
    "VpcId": String,
    "Description": String,
    "SecurityGroupName": String


Name Type Required Editable Description Validity
SourceSecurityGroupId String Yes No The ID of the security group to be cloned. Only applicable security group rules are copied to the target security group. The security group rules are selected based on the network type of the target security group.
NetworkType String No No The network type of the new security group. Set this parameter to "Classic." Valid value: Classic.
VpcId String No No The ID of the VPC selected for the new security group. NetworkType is inapplicable if both VpcId and NetworkType are specified.
Description String No No The description of the security group. The description must be 2 to 256 characters in length and must not start with http:// or https://.
SecurityGroupName String No No The name of the security group. The parameter is unspecified by default. The name must be 2 to 128 characters in length, including letters, Chinese characters, digits, periods (.), underscores (_), and hyphens (-). It must start with an uppercase letter, lowercase letter or a Chinese character and must not start with http:// or https://.

Response elements


SecurityGroupId: indicates the ID of the security group.


  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "SG": {
      "Properties": {
        "SourceSecurityGroupId": "sg-2zeb0x9wr30oj2pqoeq8",
        "SecurityGroupName": "clone_sg_vpc",
        "Description": "test clone sg vpc",
        "NetworkType": "Classic",
        "VpcId": "vpc-2zehznmzvxdhtalybjvj8"
      "Type": "ALIYUN::ECS::SecurityGroupClone"
  "Outputs": {
    "SecurityGroupId": {
      "Value": {
        "Fn::GetAtt": [