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

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