azure-sdk-for-js/sdk/datamigration/arm-datamigration/samples-dev/projectsDelete.ts

36 строки
1.4 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.
/**
* This sample demonstrates how to The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project.
*
* @summary The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project.
* x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2021-10-30-preview/examples/Projects_Delete.json
*/
import { DataMigrationManagementClient } from "@azure/arm-datamigration";
import { DefaultAzureCredential } from "@azure/identity";
async function projectsDelete() {
const subscriptionId = "fc04246f-04c5-437e-ac5e-206a19e7193f";
const groupName = "DmsSdkRg";
const serviceName = "DmsSdkService";
const projectName = "DmsSdkProject";
const credential = new DefaultAzureCredential();
const client = new DataMigrationManagementClient(credential, subscriptionId);
const result = await client.projects.delete(
groupName,
serviceName,
projectName
);
console.log(result);
}
projectsDelete().catch(console.error);