edit-icon download-icon

ALIYUN::ECS::SecurityGroupClone

Last Updated: Jun 13, 2018

The ALIYUN::ECS::SecurityGroupClone type is used to clone security groups.

Syntax

  1. {
  2. "Type" : "ALIYUN::ECS::SecurityGroupClone",
  3. "Properties" : {
  4. "SourceSecurityGroupId" : String,
  5. "NetworkType" : String,
  6. "VpcId" : String,
  7. "Description" : String,
  8. "SecurityGroupName" : String
  9. }
  10. }

Attributes

Attribute name Type Required Update allowed Description Constraint
SourceSecurityGroupId string Yes No ID of the original security group to be cloned. An appropriate security group rule is cloned based on the network type of the new security group.
NetworkType string No No The network type of the cloned security group is a classic network. Value option: Classic.
VpcId string No No ID of the VPC to which the new security group belongs. NetworkType is ignored if VpcId and NetworkType are specified at the same time.
Description string No No Security group description. The description is a string of 2 to 256 characters. It cannot start with “http://“ or “https://“.
SecurityGroupName string No No Security group name. If this parameter is not specified, it is null. The default value is null. The name is a string of 2 to 128 characters. It must start with an uppercase or a lowercase English letter or a Chinese character, and can contain letters, Chinese characters, digits, periods(.), underscores(), and hyphens(-). It cannot start with “http://“ or “https://“.

Return values

Fn::GetAtt

SecurityGroupId: Security group ID.

Examples

  1. {
  2. "ROSTemplateFormatVersion": "2015-09-01",
  3. "Resources": {
  4. "SG": {
  5. "Properties": {
  6. "SourceSecurityGroupId": "sg-2zeb0x9wr30oj2pqoeq8",
  7. "SecurityGroupName": "clone_sg_vpc",
  8. "Description": "test clone sg vpc",
  9. "NetworkType": "Classic",
  10. "VpcId": "vpc-2zehznmzvxdhtalybjvj8"
  11. },
  12. "Type": "ALIYUN::ECS::SecurityGroupClone"
  13. }
  14. },
  15. "Outputs": {
  16. "SecurityGroupId": {
  17. "Value": {
  18. "Fn::GetAtt": [
  19. "SG",
  20. "SecurityGroupId"
  21. ]
  22. }
  23. }
  24. }
  25. }
Thank you! We've received your feedback.