46 строки
1.5 KiB
TypeScript
46 строки
1.5 KiB
TypeScript
/*
|
|
* 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.
|
|
import {
|
|
IntegrationRuntimeResource,
|
|
SynapseManagementClient
|
|
} from "@azure/arm-synapse";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
/**
|
|
* This sample demonstrates how to Create an integration runtime
|
|
*
|
|
* @summary Create an integration runtime
|
|
* x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Create.json
|
|
*/
|
|
async function createIntegrationRuntime() {
|
|
const subscriptionId = "12345678-1234-1234-1234-12345678abc";
|
|
const resourceGroupName = "exampleResourceGroup";
|
|
const workspaceName = "exampleWorkspace";
|
|
const integrationRuntimeName = "exampleIntegrationRuntime";
|
|
const integrationRuntime: IntegrationRuntimeResource = {
|
|
properties: {
|
|
type: "SelfHosted",
|
|
description: "A selfhosted integration runtime"
|
|
}
|
|
};
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new SynapseManagementClient(credential, subscriptionId);
|
|
const result = await client.integrationRuntimes.beginCreateAndWait(
|
|
resourceGroupName,
|
|
workspaceName,
|
|
integrationRuntimeName,
|
|
integrationRuntime
|
|
);
|
|
console.log(result);
|
|
}
|
|
|
|
createIntegrationRuntime().catch(console.error);
|