0)"> application/json @{ var err = new JObject(); err["errors"] = (JArray)context.Variables["validationErrors"]; return err.ToString(); } @((string)context.Variables["armBasePath"] + (string)context.Variables["scopeValue"] + "?api-version=2022-08-01") GET @("Bearer " + (string)context.Variables["armToken"]) application/json @{ var err = new JObject(); err["error"] = "scope does not exist: " + (string)context.Variables["scopeValue"]; return err.ToString(); } @((string)context.Variables["armBasePath"] + "/subscriptions/" + context.Request.MatchedParameters["id"] + "?api-version=2022-08-01") GET @("Bearer " + (string)context.Variables["armToken"]) application/json @{ var err = new JObject(); err["error"] = "Subscription already exists: " + context.Request.MatchedParameters["id"]; return err.ToString(); } application/json @(((IResponse)context.Variables["existsCheckResponse"]).Body.As()) @((string)context.Variables["armBasePath"] + "/subscriptions/" + context.Request.MatchedParameters["id"] + "?api-version=2022-08-01") PUT @("Bearer " + (string)context.Variables["armToken"]) application/json @{ var input = (JObject)context.Variables["requestBody"]; var props = new JObject(); props["displayName"] = input["displayName"]; props["scope"] = input["scope"] != null ? input["scope"] : ""; props["state"] = input["state"] != null ? input["state"] : "active"; if (input["primaryKey"] != null) { props["primaryKey"] = input["primaryKey"]; } if (input["secondaryKey"] != null) { props["secondaryKey"] = input["secondaryKey"]; } var body = new JObject(); body["properties"] = props; return body.ToString(); } @((string)context.Variables["armBasePath"] + "/subscriptions/" + context.Request.MatchedParameters["id"] + "?api-version=2022-08-01") PATCH @("Bearer " + (string)context.Variables["armToken"]) * application/json @{ var input = (JObject)context.Variables["requestBody"]; var props = new JObject(); props["expirationDate"] = input["expirationDate"]; var body = new JObject(); body["properties"] = props; return body.ToString(); } ())" /> application/json @((string)context.Variables["finalBody"]) ())" /> application/json @{ var result = JObject.Parse((string)context.Variables["finalBody"]); result["warning"] = "Subscription was created, but setting expirationDate failed: " + ((IResponse)context.Variables["patchExpirationResponse"]).Body.As(); return result.ToString(); } application/json @(((IResponse)context.Variables["createResponse"]).Body.As())