azure-sdk-for-js icon indicating copy to clipboard operation
azure-sdk-for-js copied to clipboard

zip url deploy not working beginCreateZipDeploymentForStaticSiteAndWait

Open davindersteltix opened this issue 2 years ago • 9 comments

  • @azure/arm-appservice: docs
  • 13.0.3:
  • macOS:
  • [*] nodejs
    • version:
  • [ ] browser
    • name/version:
  • [ ] typescript
    • version:

I'm using the below code to deploy a static web app using the zip URL.

const { WebSiteManagementClient } = require("@azure/arm-appservice");
const { DefaultAzureCredential } = require("@azure/identity");

/**
 * This sample demonstrates how to Description for Deploys zipped content to a static site.
 *
 * @summary Description for Deploys zipped content to a static site.
 * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2022-03-01/examples/StaticSiteZipDeploy.json
 */
async function deployASiteFromAZippedPackage() {
  const subscriptionId = ""; // made it empty for the issue
  const resourceGroupName = ""; // made it empty for the issue
  const name = "";
  const staticSiteZipDeploymentEnvelope = {
    appZipUrl: "myzipURL",
    deploymentTitle: "test",
    provider: "node",
  };
  const credential = new DefaultAzureCredential();
  console.log(credential);
  const client = new WebSiteManagementClient(credential, subscriptionId);
  const result =
    await client.staticSites.beginCreateZipDeploymentForStaticSiteAndWait(
      resourceGroupName,
      name,
      staticSiteZipDeploymentEnvelope
    );
  console.log(result);
}

deployASiteFromAZippedPackage().catch(console.error);

And getting the below error:

  "name": "RestError",
  "statusCode": 501,
  "request": {
    "url": "https://management.azure.com/subscriptions/dbb23b75-1396-4368-aa95-aac40adcd8b4/resourceGroups/appshare/providers/Microsoft.Web/staticSites/test5/zipdeploy?api-version=2022-03-01",
    "headers": {
      "content-type": "application/json",
      "accept": "application/json",
      "accept-encoding": "gzip,deflate",
      "user-agent": "azsdk-js-arm-appservice/13.0.3 core-rest-pipeline/1.10.0 Node/v16.17.1 OS/(arm64-Darwin-22.2.0)",
      "x-ms-client-request-id": "89b18f48-1d12-4f4f-9ce8-2985a1e179e9",
      "authorization": "REDACTED",
      "content-length": "274"
    },
    "method": "POST",
    "timeout": 0,
    "disableKeepAlive": false,
    "streamResponseStatusCodes": {},
    "withCredentials": false,
    "requestId": "89b18f48-1d12-4f4f-9ce8-2985a1e179e9",
    "allowInsecureConnection": false,
    "enableBrowserStreams": false
  },
  "details": {
    "Code": "NotImplemented",
    "Message": "The requested method is not implemented.",
    "Target": null,
    "Details": [
      {
        "Message": "The requested method is not implemented."
      },
      {
        "Code": "NotImplemented"
      },
      {
        "ErrorEntity": {
          "ExtendedCode": "51009",
          "MessageTemplate": "The requested method is not implemented.",
          "Parameters": [],
          "Code": "NotImplemented",
          "Message": "The requested method is not implemented."
        }
      }
    ],
    "Innererror": null
  }

Could please you let me know what I'm doing wrong?

Happy new Year and Thanks in Advance.

davindersteltix avatar Jan 03 '23 16:01 davindersteltix

@kazrael2119 Can you help take a look at this issue ? Thanks

qiaozha avatar Jan 04 '23 01:01 qiaozha

duplicate with https://github.com/Azure/azure-rest-api-specs-examples/issues/1678

qiaozha avatar Jan 04 '23 07:01 qiaozha

Thank you for your feedback. This has been routed to the support team for assistance.

ghost avatar Jan 04 '23 07:01 ghost

This seems to be a service issue add CXP Attention here.

qiaozha avatar Jan 04 '23 07:01 qiaozha

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp @AzureAppServiceCLI.

github-actions[bot] avatar Sep 28 '23 21:09 github-actions[bot]

Possibly the same issue as https://github.com/Azure/azure-rest-api-specs/issues/22267

Any update here? Is publishing SWA content via ZIP possible?

Mike-Crowley avatar Sep 22 '24 15:09 Mike-Crowley

@Mike-Crowley Our latest package version is 15.0.0 could you try to use this package?

kazrael2119 avatar Oct 21 '24 03:10 kazrael2119

Hi @davindersteltix. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] avatar Oct 22 '24 15:10 github-actions[bot]

@kazrael2119 , my issue was on 22 SEP 2024. Your link says its older than this.

Mike-Crowley avatar Oct 22 '24 18:10 Mike-Crowley

Hi @davindersteltix, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

github-actions[bot] avatar Oct 29 '24 21:10 github-actions[bot]