How to create a ContainerGroup with the Azure SDK for Javascript

Richard Hussong 1 Reputation point
2020-12-04T22:44:49.147+00:00

I have working code to create a ContainerGroup using the deprecated Azure SDK for Node, and I am trying to update it to the Azure SDK for Javascript. In the old code, I create a new Container as "new client.models.Container()", fill in fields like the image, CPU, and memory information, then pass the Container in the "properties" argument to the containerGroups.createOrUpdate function, in the array properties.containers.

This does not work in the new SDK, because I can't figure out how to create a Container using the new ContainerInstanceManagementClient. Container is just an interface with no constructor, and I can see no other way to get a Container except from an existing ContainerGroup.

How is this supposed to work?

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
709 questions
{count} votes

1 answer

Sort by: Most helpful
  1. prmanhas-MSFT 17,906 Reputation points Microsoft Employee
    2020-12-28T13:39:22.9+00:00

    @Richard Hussong Posting as Answer so that it can reach broader audience.

    Since the issue is more specific to Azure SDK and not ACI itself I was suggested to open Git issue where our internal team can have a look and help you further with the issue.

    I have created a GitHub thread for you as below where you can share code snippet showing how you used the older SDK:

    https://github.com/Azure/azure-sdk-for-js/issues/12900

    Hope it helps!!!

    Please "Accept as Answer" so it can help others in community looking for help on similar topics.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.