Files
kazrael2119andGitHub 6e008cc77c recording refresh7 (#23937)
* recording refresh7

* update files

* update files

* update files

* update files

* update files
2022-11-23 14:52:56 +08:00

39 lines
1.6 KiB
JavaScript

/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DevSpacesManagementClient } = require("@azure/arm-devspaces");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates an Azure Dev Spaces Controller with the specified create parameters.
*
* @summary Creates an Azure Dev Spaces Controller with the specified create parameters.
* x-ms-original-file: specification/devspaces/resource-manager/Microsoft.DevSpaces/stable/2019-04-01/examples/ControllersCreate_example.json
*/
async function controllersCreate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const name = "myControllerResource";
const controller = {
location: "eastus",
sku: { name: "S1", tier: "Standard" },
tags: {},
targetContainerHostCredentialsBase64: "QmFzZTY0IEVuY29kZWQgVmFsdWUK",
targetContainerHostResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myCluster",
};
const credential = new DefaultAzureCredential();
const client = new DevSpacesManagementClient(credential, subscriptionId);
const result = await client.controllers.beginCreateAndWait(resourceGroupName, name, controller);
console.log(result);
}
controllersCreate().catch(console.error);