def xml_for_create_resource(region="West US", promotion_code=None, intrinsic_settings=None, etag=None, plan="Free"): if not etag: etag = str(uuid.uuid1()) headers = [('Content-Type', 'application/xml')] x = XMLBuilder('Resource', xmlns='http://schemas.microsoft.com/windowsazure') with x.CloudServiceSettings: x.GeoRegion(region) x.ETag(etag) x.IntrinsicSettings(intrinsic_settings) x.PromotionCode(promotion_code) x.Plan(plan) x.SchemaVersion("1.0") x.Type("cloudkeys") x.Version("1.0") return str(x)