public void AddDbSecurityGroup(DbSecurityGroup securityGroup)
        {
            var replaceWith = new List <ReferenceProperty>();

            if (this.DBSecurityGroups != null && this.DBSecurityGroups.Any())
            {
                replaceWith.AddRange(this.DBSecurityGroups.ToArray());
            }
            replaceWith.Add(new ReferenceProperty(securityGroup));
            this.DBSecurityGroups = replaceWith.ToArray();
        }
 public DbInstance(DbInstanceClassEnum instanceType,
                   EngineType engineType,
                   LicenseModelType licenseType,
                   Ebs.VolumeTypes storageType,
                   int allocatedStorage,
                   object masterUserName,
                   object masterPassword,
                   DbSubnetGroup subnetGroup,
                   DbSecurityGroup dbSecurityGroup
                   ) : this(instanceType, engineType, licenseType, storageType, allocatedStorage, masterUserName, masterPassword)
 {
     this.DBSubnetGroupName = new ReferenceProperty(subnetGroup);
     this.AddDbSecurityGroup(dbSecurityGroup);
 }