46 строки
1.4 KiB
TypeScript
46 строки
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.
|
|
import { AzureMigrateV2 } from "@azure/arm-migrate";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
import * as dotenv from "dotenv";
|
|
|
|
dotenv.config();
|
|
|
|
/**
|
|
* This sample demonstrates how to Delete a Import collector from the project.
|
|
*
|
|
* @summary Delete a Import collector from the project.
|
|
* x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Delete.json
|
|
*/
|
|
async function importCollectorsDelete() {
|
|
const subscriptionId =
|
|
process.env["MIGRATE_SUBSCRIPTION_ID"] ||
|
|
"31be0ff4-c932-4cb3-8efc-efa411d79280";
|
|
const resourceGroupName =
|
|
process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg";
|
|
const projectName = "rajoshCCY9671project";
|
|
const importCollectorName = "importCollector2952";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new AzureMigrateV2(credential, subscriptionId);
|
|
const result = await client.importCollectors.delete(
|
|
resourceGroupName,
|
|
projectName,
|
|
importCollectorName
|
|
);
|
|
console.log(result);
|
|
}
|
|
|
|
async function main() {
|
|
importCollectorsDelete();
|
|
}
|
|
|
|
main().catch(console.error);
|