Skip to content

zip url deploy not working beginCreateZipDeploymentForStaticSiteAndWait #24353

Open

Description

  • @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

App ServicesMgmtThis issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-author-feedbackWorkflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions