Open ccastrotrejo opened 3 months ago
@ccastrotrejo thank you for reporting this issue! Could you please kindly add the @azure/arm-* package names that you are using?
Hi @jeremymeng sure, we are using these 3 "@azure/arm-appservice": "^13.0.3", "@azure/arm-appinsights": "^5.0.0-beta.7", "@azure/arm-storage": "17.2.1",
will check
@ccastrotrejo , sorry for the later reply , could you updrade the version of @azure/arm-appservice and @azure/arm-storage and try again? these are the latest stable versions of these two package: https://www.npmjs.com/package/@azure/arm-storage/v/18.2.0 https://www.npmjs.com/package/@azure/arm-appservice/v/14.1.0
I will go ahead to check this issue.
I see in sdk code https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appservice/arm-appservice/src/models/index.ts#L1459, it is readonly and it will not be serialized. but in your description, looks like type is required parameter in the request body, but SDK is generated from swagger, in swagger, it is defined as readonly https://github.com/Azure/azure-rest-api-specs/blob/main/specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/CommonDefinitions.json#L1566, so sdk will not seserialize this parameter
azure-arm-appservice-15.0.0.zip I tried to remove readonly and regenerate this package, could you try to use this one and try again?
Sure, thanks. I will be OOF next week, but I will give it a try the week after that
Describe the bug In the Logic Apps vscode extension we use the AppServicePlanCreateStep() to create a new app service plan when creating a new logic app in azure. There is a bug when we want to create a Logic App in a custom location, the api call for the service plan requires the
type
property in theextendedLocation
property in the plan. I could tell that your documentation says that this property is not getting serialized, is there anything I can do to serialize it and not make the API call fail?To Reproduce Steps to reproduce the behavior:
Create logic app in azure
command from the vscode extensionExpected behavior Should be able to create the hosting plan.
Additional context
{ code: "InvalidRequestContent", statusCode: 400, request: { url: "https://management.azure.com/subscriptions/<subID>/resourceGroups/<resourceGroup>/providers/Microsoft.Web/serverfarms/testLogicAppHybrid?api-version=2022-03-01", method: "PUT", headers: { _headersMap: { }, }, timeout: 0, withCredentials: false, body: "{\"kind\":\"linux,kubernetes\",\"location\":\"northcentralusstage\",\"sku\":{\"name\":\"K1\",\"tier\":\"Kubernetes\",\"size\":\"K1\",\"family\":\"K\",\"capacity\":1},\"extendedLocation\":{\"name\":\"/subscriptions/<subID>/resourceGroups/<resourceGroup>/providers/Microsoft.ExtendedLocation/customLocations/bectest22\"},\"properties\":{\"perSiteScaling\":true,\"reserved\":true,\"kubeEnvironmentProfile\":{\"id\":\"/subscriptions/<subId>/resourceGroups/bectest22/providers/Microsoft.Web/kubeEnvironments/bectest22-kubeenv\"}}}", multipartBody: undefined, formData: undefined, streamResponseStatusCodes: { }, enableBrowserStreams: false, proxySettings: undefined, disableKeepAlive: false, abortSignal: undefined, requestId: "a09b2e3b-3f85-409b-88a0-68ee25e28af2", tracingOptions: undefined, allowInsecureConnection: false, onUploadProgress: undefined, onDownloadProgress: undefined, }, response: { status: 400, headers: { _headersMap: { }, }, request: { url: "https://management.azure.com/subscriptions<subId>/resourceGroups/<resourceGroup>/providers/Microsoft.Web/serverfarms/testLogicAppHybrid?api-version=2022-03-01", method: "PUT", headers: { _headersMap: { }, }, timeout: 0, withCredentials: false, body: "{\"kind\":\"linux,kubernetes\",\"location\":\"northcentralusstage\",\"sku\":{\"name\":\"K1\",\"tier\":\"Kubernetes\",\"size\":\"K1\",\"family\":\"K\",\"capacity\":1},\"extendedLocation\":{\"name\":\"/subscriptions/<subId>/resourceGroups/<resourceGroup>/providers/Microsoft.ExtendedLocation/customLocations/bectest22\"},\"properties\":{\"perSiteScaling\":true,\"reserved\":true,\"kubeEnvironmentProfile\":{\"id\":\"/subscriptions/<subId>/resourceGroups/<resourceGroup>/providers/Microsoft.Web/kubeEnvironments/bectest22-kubeenv\"}}}", multipartBody: undefined, formData: undefined, streamResponseStatusCodes: { }, enableBrowserStreams: false, proxySettings: undefined, disableKeepAlive: false, abortSignal: undefined, requestId: "a09b2e3b-3f85-409b-88a0-68ee25e28af2", tracingOptions: undefined, allowInsecureConnection: false, onUploadProgress: undefined, onDownloadProgress: undefined, }, bodyAsText: "{\"error\":{\"code\":\"InvalidRequestContent\",\"message\":\"The request content was invalid and could not be deserialized: 'Required property 'type' not found in JSON. Path 'extendedLocation', line 1, position 307.'.\"}}", parsedBody: { error: { code: "InvalidRequestContent", message: "The request content was invalid and could not be deserialized: 'Required property 'type' not found in JSON. Path 'extendedLocation', line 1, position 307.'.", }, }, }, details: { error: { code: "InvalidRequestContent", message: "The request content was invalid and could not be deserialized: 'Required property 'type' not found in JSON. Path 'extendedLocation', line 1, position 307.'.", }, }, name: "RestError", }