diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/CHANGELOG.md b/sdk/appcomplianceautomation/arm-appcomplianceautomation/CHANGELOG.md index 0f3cc41281cb..66c8fdf396a8 100644 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/CHANGELOG.md +++ b/sdk/appcomplianceautomation/arm-appcomplianceautomation/CHANGELOG.md @@ -1,7 +1,5 @@ # Release History -## 1.0.0 (2024-06-25) - -### Features Added +## 1.0.0 (2024-06-27) The package of @azure/arm-appcomplianceautomation is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/README.md b/sdk/appcomplianceautomation/arm-appcomplianceautomation/README.md index d0b95622a71b..88834bdee511 100644 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/README.md +++ b/sdk/appcomplianceautomation/arm-appcomplianceautomation/README.md @@ -53,14 +53,15 @@ const { AppComplianceAutomationToolForMicrosoft365 } = require("@azure/arm-appco const { DefaultAzureCredential } = require("@azure/identity"); // For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. -const client = new AppComplianceAutomationToolForMicrosoft365(new DefaultAzureCredential()); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new AppComplianceAutomationToolForMicrosoft365(new DefaultAzureCredential(), subscriptionId); // For client-side applications running in the browser, use this code instead: // const credential = new InteractiveBrowserCredential({ // tenantId: "", // clientId: "" // }); -// const client = new AppComplianceAutomationToolForMicrosoft365(credential); +// const client = new AppComplianceAutomationToolForMicrosoft365(credential, subscriptionId); ``` diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/_meta.json b/sdk/appcomplianceautomation/arm-appcomplianceautomation/_meta.json index fa68fd1ef8ce..623440dcfc06 100644 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/_meta.json +++ b/sdk/appcomplianceautomation/arm-appcomplianceautomation/_meta.json @@ -1,8 +1,8 @@ { - "commit": "cfe9fa198c87ac665d79458810b9f8179912a6d2", + "commit": "3b56cecc53db6b3505dbab08bc20c211b431c23b", "readme": "specification/appcomplianceautomation/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\appcomplianceautomation\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/appcomplianceautomation/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.7.10", - "use": "@autorest/typescript@6.0.23" + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/assets.json b/sdk/appcomplianceautomation/arm-appcomplianceautomation/assets.json deleted file mode 100644 index a9c4c91b1099..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/appcomplianceautomation/arm-appcomplianceautomation", - "Tag": "js/appcomplianceautomation/arm-appcomplianceautomation_884dfb0038" -} diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/package.json b/sdk/appcomplianceautomation/arm-appcomplianceautomation/package.json index 254d9f170fae..e2c588edfd4e 100644 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/package.json +++ b/sdk/appcomplianceautomation/arm-appcomplianceautomation/package.json @@ -106,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcomplianceautomation/arm-appcomplianceautomation", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appcomplianceautomation?view=azure-node-preview" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcomplianceautomation/arm-appcomplianceautomation" } \ No newline at end of file diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceCreateOrUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceCreateOrUpdateSample.ts deleted file mode 100644 index c034a37c8ec8..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update an evidence a specified report - * - * @summary Create or Update an evidence a specified report - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_CreateOrUpdate.json - */ -async function evidenceCreateOrUpdate() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.createOrUpdate(reportName, evidenceName, - { - "properties": { - "controlId": "Operational_Security_10", - "evidenceType": "File", - "filePath": "/test-byos/evidence1.png", - "responsibilityId": "authorized_ip_ranges_should_be_defined_on_kubernetes_services" - } - } - ); - console.log(result); -} - -async function main() { - evidenceCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceDeleteSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceDeleteSample.ts deleted file mode 100644 index 2769fce413c6..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an existent evidence from a specified report - * - * @summary Delete an existent evidence from a specified report - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Delete.json - */ -async function evidenceDelete() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.delete(reportName, evidenceName); - console.log(result); -} - -async function main() { - evidenceDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceDownloadSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceDownloadSample.ts deleted file mode 100644 index 25732dd5fffa..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceDownloadSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Download evidence file. - * - * @summary Download evidence file. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Download.json - */ -async function evidenceDownload() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.download(reportName, evidenceName, - { - "offerGuid": "00000000-0000-0000-0000-000000000000", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -async function main() { - evidenceDownload(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceGetSample.ts deleted file mode 100644 index 90dc70c4484d..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the evidence metadata - * - * @summary Get the evidence metadata - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Get.json - */ -async function evidenceGet() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.get(reportName, evidenceName); - console.log(result); -} - -async function main() { - evidenceGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceListByReportSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceListByReportSample.ts deleted file mode 100644 index 71077ba55a79..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/evidenceListByReportSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns a paginated list of evidences for a specified report. - * - * @summary Returns a paginated list of evidences for a specified report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_ListByReport.json - */ -async function evidenceListByReport() { - const reportName = "reportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.evidence.listByReport(reportName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - evidenceListByReport(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/operationsListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/operationsListSample.ts deleted file mode 100644 index 5b309da24bcd..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Operations_List.json - */ -async function operationsList() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsCheckNameAvailabilitySample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsCheckNameAvailabilitySample.ts deleted file mode 100644 index 7821e01e824b..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Check if the given name is available for a report. - * - * @summary Check if the given name is available for a report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CheckNameAvailability.json - */ -async function reportCheckNameAvailability() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.checkNameAvailability({ - "name": "reportABC", - "type": "Microsoft.AppComplianceAutomation/reports" - }); - console.log(result); -} - -async function main() { - reportCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsGetCollectionCountSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsGetCollectionCountSample.ts deleted file mode 100644 index 8e93fb0798e6..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsGetCollectionCountSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the count of reports. - * - * @summary Get the count of reports. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetCollectionCount.json - */ -async function reportGetCollectionCount() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.getCollectionCount({ - "type": "Microsoft.AppComplianceAutomation/reports" - }); - console.log(result); -} - -async function main() { - reportGetCollectionCount(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsGetOverviewStatusSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsGetOverviewStatusSample.ts deleted file mode 100644 index 35b13c7f3bee..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsGetOverviewStatusSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the resource overview status. - * - * @summary Get the resource overview status. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetOverviewStatus.json - */ -async function reportGetOverviewStatus() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.getOverviewStatus({ - "type": "Microsoft.AppComplianceAutomation/reports" - }); - console.log(result); -} - -async function main() { - reportGetOverviewStatus(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsListInUseStorageAccountsSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsListInUseStorageAccountsSample.ts deleted file mode 100644 index aebcd2ae5e4f..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsListInUseStorageAccountsSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the storage accounts which are in use by related reports - * - * @summary List the storage accounts which are in use by related reports - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithSubscriptions.json - */ -async function listInUseStorageAccountsWithSubscriptions() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.listInUseStorageAccounts({ - "subscriptionIds": [ - "0000000-0000-0000-0000-000000000001", - "0000000-0000-0000-0000-000000000002" - ] - }); - console.log(result); -} - -/** - * This sample demonstrates how to List the storage accounts which are in use by related reports - * - * @summary List the storage accounts which are in use by related reports - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithoutSubscriptions.json - */ -async function listInUseStorageAccountsWithoutSubscriptions() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.listInUseStorageAccounts({}); - console.log(result); -} - -async function main() { - listInUseStorageAccountsWithSubscriptions(); - listInUseStorageAccountsWithoutSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsOnboardSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsOnboardSample.ts deleted file mode 100644 index cfc00499469f..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsOnboardSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. - * - * @summary Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Onboard.json - */ -async function onboard() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.beginOnboardAndWait({ - "subscriptionIds": [ - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000001" - ] - }); - console.log(result); -} - -async function main() { - onboard(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsTriggerEvaluationSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsTriggerEvaluationSample.ts deleted file mode 100644 index e4d9da9871d6..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/providerActionsTriggerEvaluationSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Trigger quick evaluation for the given subscriptions. - * - * @summary Trigger quick evaluation for the given subscriptions. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/TriggerEvaluation.json - */ -async function triggerEvaluation() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.beginTriggerEvaluationAndWait({ - "resourceIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService" - ] - }); - console.log(result); -} - -async function main() { - triggerEvaluation(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportCreateOrUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportCreateOrUpdateSample.ts deleted file mode 100644 index ce3816bf1ecb..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @summary Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CreateOrUpdate.json - */ -async function reportCreateOrUpdate() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginCreateOrUpdateAndWait(reportName, - { - "properties": { - "offerGuid": "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002", - "resources": [ - { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", - "resourceOrigin": "Azure", - "resourceType": "Microsoft.SignalRService/SignalR" - } - ], - "storageInfo": { - "accountName": "testStorageAccount", - "location": "East US", - "resourceGroup": "testResourceGroup", - "subscriptionId": "00000000-0000-0000-0000-000000000000" - }, - "timeZone": "GMT Standard Time", - "triggerTime": new Date("2022-03-04T05:00:00.000Z") - } - } - ); - console.log(result); -} - -async function main() { - reportCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportDeleteSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportDeleteSample.ts deleted file mode 100644 index 6ab60d2310b3..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an AppComplianceAutomation report. - * - * @summary Delete an AppComplianceAutomation report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Delete.json - */ -async function reportDelete() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginDeleteAndWait(reportName); - console.log(result); -} - -async function main() { - reportDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportFixSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportFixSample.ts deleted file mode 100644 index e5f46e06b5d3..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportFixSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * - * @summary Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Fix.json - */ -async function reportFix() { - const reportName = "testReport"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginFixAndWait(reportName); - console.log(result); -} - -async function main() { - reportFix(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportGetSample.ts deleted file mode 100644 index b3cc566ba5f7..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation report and its properties. - * - * @summary Get the AppComplianceAutomation report and its properties. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Get.json - */ -async function reportGet() { - const reportName = "testReport"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.get(reportName); - console.log(result); -} - -async function main() { - reportGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportGetScopingQuestionsSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportGetScopingQuestionsSample.ts deleted file mode 100644 index 2ec8c684088a..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportGetScopingQuestionsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * - * @summary Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetScopingQuestions.json - */ -async function reportGetScopingQuestions() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.getScopingQuestions(reportName); - console.log(result); -} - -async function main() { - reportGetScopingQuestions(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportListSample.ts deleted file mode 100644 index 079613e219cf..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportListSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 { - ReportListOptionalParams, - AppComplianceAutomationToolForMicrosoft365, -} from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation report list for the tenant. - * - * @summary Get the AppComplianceAutomation report list for the tenant. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_List.json - */ -async function reportList() { - const skipToken = "1"; - const top = 100; - const offerGuid = "00000000-0000-0000-0000-000000000000"; - const reportCreatorTenantId = "00000000-0000-0000-0000-000000000000"; - const options: ReportListOptionalParams = { - skipToken, - top, - offerGuid, - reportCreatorTenantId, - }; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.report.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - reportList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportNestedResourceCheckNameAvailabilitySample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportNestedResourceCheckNameAvailabilitySample.ts deleted file mode 100644 index cf2d8d84534d..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportNestedResourceCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * - * @summary Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Evidence_Check_Name_Availability.json - */ -async function reportEvidenceCheckNameAvailability() { - const reportName = "reportABC"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = - await client.report.nestedResourceCheckNameAvailability(reportName, - { - "name": "evidenceABC", - "type": "Microsoft.AppComplianceAutomation/reports/evidences" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * - * @summary Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Snapshot_Check_Name_Availability.json - */ -async function reportSnapshotCheckNameAvailability() { - const reportName = "reportABC"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = - await client.report.nestedResourceCheckNameAvailability(reportName, - { - "name": "snapshotABC", - "type": "Microsoft.AppComplianceAutomation/reports/snapshots" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * - * @summary Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Webhook_Check_Name_Availability.json - */ -async function reportWebhookCheckNameAvailability() { - const reportName = "reportABC"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = - await client.report.nestedResourceCheckNameAvailability(reportName, - { - "name": "webhookABC", - "type": "Microsoft.AppComplianceAutomation/reports/webhooks" - } - ); - console.log(result); -} - -async function main() { - reportEvidenceCheckNameAvailability(); - reportSnapshotCheckNameAvailability(); - reportWebhookCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportSyncCertRecordSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportSyncCertRecordSample.ts deleted file mode 100644 index d739e7d3d27f..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportSyncCertRecordSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Synchronize attestation record from app compliance. - * - * @summary Synchronize attestation record from app compliance. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_SyncCertRecord.json - */ -async function reportSyncCertRecord() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginSyncCertRecordAndWait(reportName, - { - "certRecord": { - "certificationStatus": "CertIngestion", - "controls": [ - { - "controlId": "Operational_Security_10", - "controlStatus": "Approved" - } - ], - "ingestionStatus": "EvidenceResubmitted", - "offerGuid": "00000000-0000-0000-0000-000000000001" - } - } - ); - console.log(result); -} - -async function main() { - reportSyncCertRecord(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportUpdateSample.ts deleted file mode 100644 index ae66f20c643e..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update an exiting AppComplianceAutomation report. - * - * @summary Update an exiting AppComplianceAutomation report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Update.json - */ -async function reportUpdate() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginUpdateAndWait(reportName, - { - "properties": { - "offerGuid": "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002", - "resources": [ - { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", - "resourceOrigin": "Azure", - "resourceType": "Microsoft.SignalRService/SignalR" - }, - { - "accountId": "000000000000", - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser", - "resourceOrigin": "AWS", - "resourceType": "iam.user" - } - ], - "storageInfo": { - "accountName": "testStorageAccount", - "location": "East US", - "resourceGroup": "testResourceGroup", - "subscriptionId": "00000000-0000-0000-0000-000000000000" - }, - "timeZone": "GMT Standard Time", - "triggerTime": new Date("2022-03-04T05:00:00.000Z") - } - } - ); - console.log(result); -} - -async function main() { - reportUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportVerifySample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportVerifySample.ts deleted file mode 100644 index 1f41092b0e4a..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/reportVerifySample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Verify the AppComplianceAutomation report health status. - * - * @summary Verify the AppComplianceAutomation report health status. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Verify.json - */ -async function reportVerify() { - const reportName = "testReport"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginVerifyAndWait(reportName); - console.log(result); -} - -async function main() { - reportVerify(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationCreateOrUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationCreateOrUpdateSample.ts deleted file mode 100644 index e98f0724b67e..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation scoping configuration of the specific report. - * - * @summary Get the AppComplianceAutomation scoping configuration of the specific report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_CreateOrUpdate.json - */ -async function scopingConfigurationCreateOrUpdate() { - const reportName = "testReportName"; - const scopingConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.scopingConfiguration.createOrUpdate( - reportName, - scopingConfigurationName, - { - "properties": { - "answers": [ - { - "answers": [ - "Azure" - ], - "questionId": "GEN20_hostingEnvironment" - }, - { - "answers": [], - "questionId": "DHP_G07_customerDataProcess" - }, - { - "answers": [], - "questionId": "Tier2InitSub_serviceCommunicate" - } - ] - } - } - ); - console.log(result); -} - -async function main() { - scopingConfigurationCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationDeleteSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationDeleteSample.ts deleted file mode 100644 index f631b4d652b3..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationDeleteSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Clean the AppComplianceAutomation scoping configuration of the specific report. - * - * @summary Clean the AppComplianceAutomation scoping configuration of the specific report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Delete.json - */ -async function scopingConfigurationDelete() { - const reportName = "testReportName"; - const scopingConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.scopingConfiguration.delete( - reportName, - scopingConfigurationName, - ); - console.log(result); -} - -async function main() { - scopingConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationGetSample.ts deleted file mode 100644 index 1048fda7d9c0..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation scoping configuration of the specific report. - * - * @summary Get the AppComplianceAutomation scoping configuration of the specific report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Get.json - */ -async function scopingConfiguration() { - const reportName = "testReportName"; - const scopingConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.scopingConfiguration.get( - reportName, - scopingConfigurationName, - ); - console.log(result); -} - -async function main() { - scopingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationListSample.ts deleted file mode 100644 index 7b40433551fd..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/scopingConfigurationListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns a list format of the singleton scopingConfiguration for a specified report. - * - * @summary Returns a list format of the singleton scopingConfiguration for a specified report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_List.json - */ -async function scopingConfigurationList() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.scopingConfiguration.list(reportName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scopingConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/snapshotDownloadSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/snapshotDownloadSample.ts deleted file mode 100644 index 0bd838baf9d7..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/snapshotDownloadSample.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Detailed_Pdf_Report.json - */ -async function snapshotDownloadComplianceDetailedPdfReport() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait( - reportName, - snapshotName, - { - "downloadType": "ComplianceDetailedPdfReport", - "offerGuid": "00000000-0000-0000-0000-000000000000", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Pdf_Report.json - */ -async function snapshotDownloadCompliancePdfReport() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait( - reportName, - snapshotName, - { - "downloadType": "CompliancePdfReport", - "offerGuid": "00000000-0000-0000-0000-000000000001", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Report.json - */ -async function snapshotDownloadComplianceReport() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait( - reportName, - snapshotName, - { - "downloadType": "ComplianceReport", - "offerGuid": "00000000-0000-0000-0000-000000000001", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Resource_List.json - */ -async function snapshotDownloadResourceList() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait( - reportName, - snapshotName, - { - "downloadType": "ResourceList", - "offerGuid": "00000000-0000-0000-0000-000000000001", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -async function main() { - snapshotDownloadComplianceDetailedPdfReport(); - snapshotDownloadCompliancePdfReport(); - snapshotDownloadComplianceReport(); - snapshotDownloadResourceList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/snapshotGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/snapshotGetSample.ts deleted file mode 100644 index 9e7c4a5ab48a..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/snapshotGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation snapshot and its properties. - * - * @summary Get the AppComplianceAutomation snapshot and its properties. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Get.json - */ -async function snapshotGet() { - const reportName = "testReportName"; - const snapshotName = "testSnapshot"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.get(reportName, snapshotName); - console.log(result); -} - -async function main() { - snapshotGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/snapshotListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/snapshotListSample.ts deleted file mode 100644 index aead6cd8070f..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/snapshotListSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { - SnapshotListOptionalParams, - AppComplianceAutomationToolForMicrosoft365, -} from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation snapshot list. - * - * @summary Get the AppComplianceAutomation snapshot list. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_List.json - */ -async function snapshotList() { - const skipToken = "1"; - const top = 100; - const offerGuid = "00000000-0000-0000-0000-000000000001"; - const reportCreatorTenantId = "00000000-0000-0000-0000-000000000000"; - const reportName = "testReportName"; - const options: SnapshotListOptionalParams = { - skipToken, - top, - offerGuid, - reportCreatorTenantId, - }; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.snapshot.list(reportName, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - snapshotList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookCreateOrUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookCreateOrUpdateSample.ts deleted file mode 100644 index 4b244ff95861..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. - * - * @summary Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_CreateOrUpdate.json - */ -async function webhookCreateOrUpdate() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.createOrUpdate(reportName, webhookName, - { - "properties": { - "contentType": "application/json", - "enableSslVerification": "true", - "events": [ - "generate_snapshot_failed" - ], - "payloadUrl": "https://example.com", - "sendAllEvents": "false", - "status": "Enabled", - "updateWebhookKey": "true", - "webhookKey": "00000000-0000-0000-0000-000000000000" - } - } - ); - console.log(result); -} - -async function main() { - webhookCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookDeleteSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookDeleteSample.ts deleted file mode 100644 index 8ee74e288ed8..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an AppComplianceAutomation webhook. - * - * @summary Delete an AppComplianceAutomation webhook. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Delete.json - */ -async function webhookDelete() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.delete(reportName, webhookName); - console.log(result); -} - -async function main() { - webhookDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookGetSample.ts deleted file mode 100644 index 8120f301e857..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation webhook and its properties. - * - * @summary Get the AppComplianceAutomation webhook and its properties. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Get.json - */ -async function webhookGet() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.get(reportName, webhookName); - console.log(result); -} - -async function main() { - webhookGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookListSample.ts deleted file mode 100644 index bcda540f859e..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookListSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 { - WebhookListOptionalParams, - AppComplianceAutomationToolForMicrosoft365, -} from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation webhook list. - * - * @summary Get the AppComplianceAutomation webhook list. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_List.json - */ -async function webhookList() { - const skipToken = "1"; - const top = 100; - const reportName = "testReportName"; - const options: WebhookListOptionalParams = { skipToken, top }; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.webhook.list(reportName, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - webhookList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookUpdateSample.ts deleted file mode 100644 index d6a808f2f69e..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples-dev/webhookUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update an exiting AppComplianceAutomation webhook. - * - * @summary Update an exiting AppComplianceAutomation webhook. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Update.json - */ -async function webhookUpdate() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.update(reportName, webhookName, - { - "properties": { - "contentType": "application/json", - "enableSslVerification": "true", - "events": [ - "generate_snapshot_failed" - ], - "payloadUrl": "https://example.com", - "sendAllEvents": "false", - "status": "Enabled", - "updateWebhookKey": "true", - "webhookKey": "00000000-0000-0000-0000-000000000000" - } - } - ); - console.log(result); -} - -async function main() { - webhookUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/README.md b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/README.md deleted file mode 100644 index ee590de955b1..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/README.md +++ /dev/null @@ -1,116 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [evidenceCreateOrUpdateSample.js][evidencecreateorupdatesample] | Create or Update an evidence a specified report x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_CreateOrUpdate.json | -| [evidenceDeleteSample.js][evidencedeletesample] | Delete an existent evidence from a specified report x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Delete.json | -| [evidenceDownloadSample.js][evidencedownloadsample] | Download evidence file. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Download.json | -| [evidenceGetSample.js][evidencegetsample] | Get the evidence metadata x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Get.json | -| [evidenceListByReportSample.js][evidencelistbyreportsample] | Returns a paginated list of evidences for a specified report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_ListByReport.json | -| [operationsListSample.js][operationslistsample] | List the operations for the provider x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Operations_List.json | -| [providerActionsCheckNameAvailabilitySample.js][provideractionschecknameavailabilitysample] | Check if the given name is available for a report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CheckNameAvailability.json | -| [providerActionsGetCollectionCountSample.js][provideractionsgetcollectioncountsample] | Get the count of reports. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetCollectionCount.json | -| [providerActionsGetOverviewStatusSample.js][provideractionsgetoverviewstatussample] | Get the resource overview status. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetOverviewStatus.json | -| [providerActionsListInUseStorageAccountsSample.js][provideractionslistinusestorageaccountssample] | List the storage accounts which are in use by related reports x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithSubscriptions.json | -| [providerActionsOnboardSample.js][provideractionsonboardsample] | Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Onboard.json | -| [providerActionsTriggerEvaluationSample.js][provideractionstriggerevaluationsample] | Trigger quick evaluation for the given subscriptions. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/TriggerEvaluation.json | -| [reportCreateOrUpdateSample.js][reportcreateorupdatesample] | Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CreateOrUpdate.json | -| [reportDeleteSample.js][reportdeletesample] | Delete an AppComplianceAutomation report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Delete.json | -| [reportFixSample.js][reportfixsample] | Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Fix.json | -| [reportGetSample.js][reportgetsample] | Get the AppComplianceAutomation report and its properties. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Get.json | -| [reportGetScopingQuestionsSample.js][reportgetscopingquestionssample] | Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetScopingQuestions.json | -| [reportListSample.js][reportlistsample] | Get the AppComplianceAutomation report list for the tenant. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_List.json | -| [reportNestedResourceCheckNameAvailabilitySample.js][reportnestedresourcechecknameavailabilitysample] | Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Evidence_Check_Name_Availability.json | -| [reportSyncCertRecordSample.js][reportsynccertrecordsample] | Synchronize attestation record from app compliance. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_SyncCertRecord.json | -| [reportUpdateSample.js][reportupdatesample] | Update an exiting AppComplianceAutomation report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Update.json | -| [reportVerifySample.js][reportverifysample] | Verify the AppComplianceAutomation report health status. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Verify.json | -| [scopingConfigurationCreateOrUpdateSample.js][scopingconfigurationcreateorupdatesample] | Get the AppComplianceAutomation scoping configuration of the specific report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_CreateOrUpdate.json | -| [scopingConfigurationDeleteSample.js][scopingconfigurationdeletesample] | Clean the AppComplianceAutomation scoping configuration of the specific report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Delete.json | -| [scopingConfigurationGetSample.js][scopingconfigurationgetsample] | Get the AppComplianceAutomation scoping configuration of the specific report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Get.json | -| [scopingConfigurationListSample.js][scopingconfigurationlistsample] | Returns a list format of the singleton scopingConfiguration for a specified report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_List.json | -| [snapshotDownloadSample.js][snapshotdownloadsample] | Download compliance needs from snapshot, like: Compliance Report, Resource List. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Detailed_Pdf_Report.json | -| [snapshotGetSample.js][snapshotgetsample] | Get the AppComplianceAutomation snapshot and its properties. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Get.json | -| [snapshotListSample.js][snapshotlistsample] | Get the AppComplianceAutomation snapshot list. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_List.json | -| [webhookCreateOrUpdateSample.js][webhookcreateorupdatesample] | Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_CreateOrUpdate.json | -| [webhookDeleteSample.js][webhookdeletesample] | Delete an AppComplianceAutomation webhook. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Delete.json | -| [webhookGetSample.js][webhookgetsample] | Get the AppComplianceAutomation webhook and its properties. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Get.json | -| [webhookListSample.js][webhooklistsample] | Get the AppComplianceAutomation webhook list. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_List.json | -| [webhookUpdateSample.js][webhookupdatesample] | Update an exiting AppComplianceAutomation webhook. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Update.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node evidenceCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node evidenceCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[evidencecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceCreateOrUpdateSample.js -[evidencedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceDeleteSample.js -[evidencedownloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceDownloadSample.js -[evidencegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceGetSample.js -[evidencelistbyreportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceListByReportSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/operationsListSample.js -[provideractionschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsCheckNameAvailabilitySample.js -[provideractionsgetcollectioncountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsGetCollectionCountSample.js -[provideractionsgetoverviewstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsGetOverviewStatusSample.js -[provideractionslistinusestorageaccountssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsListInUseStorageAccountsSample.js -[provideractionsonboardsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsOnboardSample.js -[provideractionstriggerevaluationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsTriggerEvaluationSample.js -[reportcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportCreateOrUpdateSample.js -[reportdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportDeleteSample.js -[reportfixsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportFixSample.js -[reportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportGetSample.js -[reportgetscopingquestionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportGetScopingQuestionsSample.js -[reportlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportListSample.js -[reportnestedresourcechecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportNestedResourceCheckNameAvailabilitySample.js -[reportsynccertrecordsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportSyncCertRecordSample.js -[reportupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportUpdateSample.js -[reportverifysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportVerifySample.js -[scopingconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationCreateOrUpdateSample.js -[scopingconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationDeleteSample.js -[scopingconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationGetSample.js -[scopingconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationListSample.js -[snapshotdownloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotDownloadSample.js -[snapshotgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotGetSample.js -[snapshotlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotListSample.js -[webhookcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookCreateOrUpdateSample.js -[webhookdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookDeleteSample.js -[webhookgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookGetSample.js -[webhooklistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookListSample.js -[webhookupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookUpdateSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appcomplianceautomation?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/README.md diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceCreateOrUpdateSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceCreateOrUpdateSample.js deleted file mode 100644 index 3e6d4017fbac..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or Update an evidence a specified report - * - * @summary Create or Update an evidence a specified report - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_CreateOrUpdate.json - */ -async function evidenceCreateOrUpdate() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.createOrUpdate(reportName, evidenceName, { - properties: { - controlId: "Operational_Security_10", - evidenceType: "File", - filePath: "/test-byos/evidence1.png", - responsibilityId: "authorized_ip_ranges_should_be_defined_on_kubernetes_services", - }, - }); - console.log(result); -} - -async function main() { - evidenceCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceDeleteSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceDeleteSample.js deleted file mode 100644 index 6c83bfb46aa1..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete an existent evidence from a specified report - * - * @summary Delete an existent evidence from a specified report - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Delete.json - */ -async function evidenceDelete() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.delete(reportName, evidenceName); - console.log(result); -} - -async function main() { - evidenceDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceDownloadSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceDownloadSample.js deleted file mode 100644 index 7c63a58b1b16..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceDownloadSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Download evidence file. - * - * @summary Download evidence file. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Download.json - */ -async function evidenceDownload() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.download(reportName, evidenceName, { - offerGuid: "00000000-0000-0000-0000-000000000000", - reportCreatorTenantId: "00000000-0000-0000-0000-000000000000", - }); - console.log(result); -} - -async function main() { - evidenceDownload(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceGetSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceGetSample.js deleted file mode 100644 index b6f2b5ceb757..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the evidence metadata - * - * @summary Get the evidence metadata - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Get.json - */ -async function evidenceGet() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.get(reportName, evidenceName); - console.log(result); -} - -async function main() { - evidenceGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceListByReportSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceListByReportSample.js deleted file mode 100644 index 65b3838fccc9..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/evidenceListByReportSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns a paginated list of evidences for a specified report. - * - * @summary Returns a paginated list of evidences for a specified report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_ListByReport.json - */ -async function evidenceListByReport() { - const reportName = "reportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.evidence.listByReport(reportName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - evidenceListByReport(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/operationsListSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/operationsListSample.js deleted file mode 100644 index 78e9a759ff2e..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Operations_List.json - */ -async function operationsList() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/package.json b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/package.json deleted file mode 100644 index a93ebb60a743..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-appcomplianceautomation-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/appcomplianceautomation/arm-appcomplianceautomation" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcomplianceautomation/arm-appcomplianceautomation", - "dependencies": { - "@azure/arm-appcomplianceautomation": "latest", - "dotenv": "latest", - "@azure/identity": "^4.0.1" - } -} diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsCheckNameAvailabilitySample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsCheckNameAvailabilitySample.js deleted file mode 100644 index b0936cabe2ad..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsCheckNameAvailabilitySample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Check if the given name is available for a report. - * - * @summary Check if the given name is available for a report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CheckNameAvailability.json - */ -async function reportCheckNameAvailability() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.checkNameAvailability({ - name: "reportABC", - type: "Microsoft.AppComplianceAutomation/reports", - }); - console.log(result); -} - -async function main() { - reportCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsGetCollectionCountSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsGetCollectionCountSample.js deleted file mode 100644 index e9458bdde150..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsGetCollectionCountSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the count of reports. - * - * @summary Get the count of reports. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetCollectionCount.json - */ -async function reportGetCollectionCount() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.getCollectionCount({ - type: "Microsoft.AppComplianceAutomation/reports", - }); - console.log(result); -} - -async function main() { - reportGetCollectionCount(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsGetOverviewStatusSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsGetOverviewStatusSample.js deleted file mode 100644 index 9f4d5fbb0393..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsGetOverviewStatusSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the resource overview status. - * - * @summary Get the resource overview status. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetOverviewStatus.json - */ -async function reportGetOverviewStatus() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.getOverviewStatus({ - type: "Microsoft.AppComplianceAutomation/reports", - }); - console.log(result); -} - -async function main() { - reportGetOverviewStatus(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsListInUseStorageAccountsSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsListInUseStorageAccountsSample.js deleted file mode 100644 index e96d24fc441f..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsListInUseStorageAccountsSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the storage accounts which are in use by related reports - * - * @summary List the storage accounts which are in use by related reports - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithSubscriptions.json - */ -async function listInUseStorageAccountsWithSubscriptions() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.listInUseStorageAccounts({ - subscriptionIds: ["0000000-0000-0000-0000-000000000001", "0000000-0000-0000-0000-000000000002"], - }); - console.log(result); -} - -/** - * This sample demonstrates how to List the storage accounts which are in use by related reports - * - * @summary List the storage accounts which are in use by related reports - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithoutSubscriptions.json - */ -async function listInUseStorageAccountsWithoutSubscriptions() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.listInUseStorageAccounts({}); - console.log(result); -} - -async function main() { - listInUseStorageAccountsWithSubscriptions(); - listInUseStorageAccountsWithoutSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsOnboardSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsOnboardSample.js deleted file mode 100644 index 15654244c07c..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsOnboardSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. - * - * @summary Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Onboard.json - */ -async function onboard() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.beginOnboardAndWait({ - subscriptionIds: [ - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000001", - ], - }); - console.log(result); -} - -async function main() { - onboard(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsTriggerEvaluationSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsTriggerEvaluationSample.js deleted file mode 100644 index bbd3e3bbafdd..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/providerActionsTriggerEvaluationSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Trigger quick evaluation for the given subscriptions. - * - * @summary Trigger quick evaluation for the given subscriptions. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/TriggerEvaluation.json - */ -async function triggerEvaluation() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.beginTriggerEvaluationAndWait({ - resourceIds: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", - ], - }); - console.log(result); -} - -async function main() { - triggerEvaluation(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportCreateOrUpdateSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportCreateOrUpdateSample.js deleted file mode 100644 index e301a85ce356..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @summary Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CreateOrUpdate.json - */ -async function reportCreateOrUpdate() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginCreateOrUpdateAndWait(reportName, { - properties: { - offerGuid: "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002", - resources: [ - { - resourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", - resourceOrigin: "Azure", - resourceType: "Microsoft.SignalRService/SignalR", - }, - ], - storageInfo: { - accountName: "testStorageAccount", - location: "East US", - resourceGroup: "testResourceGroup", - subscriptionId: "00000000-0000-0000-0000-000000000000", - }, - timeZone: "GMT Standard Time", - triggerTime: new Date("2022-03-04T05:00:00.000Z"), - }, - }); - console.log(result); -} - -async function main() { - reportCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportDeleteSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportDeleteSample.js deleted file mode 100644 index 0dd888c7adf1..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete an AppComplianceAutomation report. - * - * @summary Delete an AppComplianceAutomation report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Delete.json - */ -async function reportDelete() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginDeleteAndWait(reportName); - console.log(result); -} - -async function main() { - reportDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportFixSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportFixSample.js deleted file mode 100644 index c0adea36c003..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportFixSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * - * @summary Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Fix.json - */ -async function reportFix() { - const reportName = "testReport"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginFixAndWait(reportName); - console.log(result); -} - -async function main() { - reportFix(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportGetSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportGetSample.js deleted file mode 100644 index cf4bde2bf8cd..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation report and its properties. - * - * @summary Get the AppComplianceAutomation report and its properties. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Get.json - */ -async function reportGet() { - const reportName = "testReport"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.get(reportName); - console.log(result); -} - -async function main() { - reportGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportGetScopingQuestionsSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportGetScopingQuestionsSample.js deleted file mode 100644 index 49426da87378..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportGetScopingQuestionsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * - * @summary Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetScopingQuestions.json - */ -async function reportGetScopingQuestions() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.getScopingQuestions(reportName); - console.log(result); -} - -async function main() { - reportGetScopingQuestions(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportListSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportListSample.js deleted file mode 100644 index 31e9fb40926b..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportListSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation report list for the tenant. - * - * @summary Get the AppComplianceAutomation report list for the tenant. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_List.json - */ -async function reportList() { - const skipToken = "1"; - const top = 100; - const offerGuid = "00000000-0000-0000-0000-000000000000"; - const reportCreatorTenantId = "00000000-0000-0000-0000-000000000000"; - const options = { - skipToken, - top, - offerGuid, - reportCreatorTenantId, - }; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.report.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - reportList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportNestedResourceCheckNameAvailabilitySample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportNestedResourceCheckNameAvailabilitySample.js deleted file mode 100644 index 61455a57f4d8..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportNestedResourceCheckNameAvailabilitySample.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * - * @summary Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Evidence_Check_Name_Availability.json - */ -async function reportEvidenceCheckNameAvailability() { - const reportName = "reportABC"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.nestedResourceCheckNameAvailability(reportName, { - name: "evidenceABC", - type: "Microsoft.AppComplianceAutomation/reports/evidences", - }); - console.log(result); -} - -/** - * This sample demonstrates how to Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * - * @summary Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Snapshot_Check_Name_Availability.json - */ -async function reportSnapshotCheckNameAvailability() { - const reportName = "reportABC"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.nestedResourceCheckNameAvailability(reportName, { - name: "snapshotABC", - type: "Microsoft.AppComplianceAutomation/reports/snapshots", - }); - console.log(result); -} - -/** - * This sample demonstrates how to Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * - * @summary Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Webhook_Check_Name_Availability.json - */ -async function reportWebhookCheckNameAvailability() { - const reportName = "reportABC"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.nestedResourceCheckNameAvailability(reportName, { - name: "webhookABC", - type: "Microsoft.AppComplianceAutomation/reports/webhooks", - }); - console.log(result); -} - -async function main() { - reportEvidenceCheckNameAvailability(); - reportSnapshotCheckNameAvailability(); - reportWebhookCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportSyncCertRecordSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportSyncCertRecordSample.js deleted file mode 100644 index af38bdcf1837..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportSyncCertRecordSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Synchronize attestation record from app compliance. - * - * @summary Synchronize attestation record from app compliance. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_SyncCertRecord.json - */ -async function reportSyncCertRecord() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginSyncCertRecordAndWait(reportName, { - certRecord: { - certificationStatus: "CertIngestion", - controls: [ - { - controlId: "Operational_Security_10", - controlStatus: "Approved", - }, - ], - ingestionStatus: "EvidenceResubmitted", - offerGuid: "00000000-0000-0000-0000-000000000001", - }, - }); - console.log(result); -} - -async function main() { - reportSyncCertRecord(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportUpdateSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportUpdateSample.js deleted file mode 100644 index 953abcb66810..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportUpdateSample.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update an exiting AppComplianceAutomation report. - * - * @summary Update an exiting AppComplianceAutomation report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Update.json - */ -async function reportUpdate() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginUpdateAndWait(reportName, { - properties: { - offerGuid: "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002", - resources: [ - { - resourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", - resourceOrigin: "Azure", - resourceType: "Microsoft.SignalRService/SignalR", - }, - { - accountId: "000000000000", - resourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser", - resourceOrigin: "AWS", - resourceType: "iam.user", - }, - ], - storageInfo: { - accountName: "testStorageAccount", - location: "East US", - resourceGroup: "testResourceGroup", - subscriptionId: "00000000-0000-0000-0000-000000000000", - }, - timeZone: "GMT Standard Time", - triggerTime: new Date("2022-03-04T05:00:00.000Z"), - }, - }); - console.log(result); -} - -async function main() { - reportUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportVerifySample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportVerifySample.js deleted file mode 100644 index 619b11310794..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/reportVerifySample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Verify the AppComplianceAutomation report health status. - * - * @summary Verify the AppComplianceAutomation report health status. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Verify.json - */ -async function reportVerify() { - const reportName = "testReport"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginVerifyAndWait(reportName); - console.log(result); -} - -async function main() { - reportVerify(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/sample.env b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationCreateOrUpdateSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationCreateOrUpdateSample.js deleted file mode 100644 index f506a408e74d..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationCreateOrUpdateSample.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation scoping configuration of the specific report. - * - * @summary Get the AppComplianceAutomation scoping configuration of the specific report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_CreateOrUpdate.json - */ -async function scopingConfigurationCreateOrUpdate() { - const reportName = "testReportName"; - const scopingConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.scopingConfiguration.createOrUpdate( - reportName, - scopingConfigurationName, - { - properties: { - answers: [ - { - answers: ["Azure"], - questionId: "GEN20_hostingEnvironment", - }, - { - answers: [], - questionId: "DHP_G07_customerDataProcess", - }, - { - answers: [], - questionId: "Tier2InitSub_serviceCommunicate", - }, - ], - }, - }, - ); - console.log(result); -} - -async function main() { - scopingConfigurationCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationDeleteSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationDeleteSample.js deleted file mode 100644 index 12acdf632101..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Clean the AppComplianceAutomation scoping configuration of the specific report. - * - * @summary Clean the AppComplianceAutomation scoping configuration of the specific report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Delete.json - */ -async function scopingConfigurationDelete() { - const reportName = "testReportName"; - const scopingConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.scopingConfiguration.delete(reportName, scopingConfigurationName); - console.log(result); -} - -async function main() { - scopingConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationGetSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationGetSample.js deleted file mode 100644 index 487243129242..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation scoping configuration of the specific report. - * - * @summary Get the AppComplianceAutomation scoping configuration of the specific report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Get.json - */ -async function scopingConfiguration() { - const reportName = "testReportName"; - const scopingConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.scopingConfiguration.get(reportName, scopingConfigurationName); - console.log(result); -} - -async function main() { - scopingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationListSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationListSample.js deleted file mode 100644 index 48aaf0025f74..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/scopingConfigurationListSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns a list format of the singleton scopingConfiguration for a specified report. - * - * @summary Returns a list format of the singleton scopingConfiguration for a specified report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_List.json - */ -async function scopingConfigurationList() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.scopingConfiguration.list(reportName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scopingConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotDownloadSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotDownloadSample.js deleted file mode 100644 index 02237f91372a..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotDownloadSample.js +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Detailed_Pdf_Report.json - */ -async function snapshotDownloadComplianceDetailedPdfReport() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait(reportName, snapshotName, { - downloadType: "ComplianceDetailedPdfReport", - offerGuid: "00000000-0000-0000-0000-000000000000", - reportCreatorTenantId: "00000000-0000-0000-0000-000000000000", - }); - console.log(result); -} - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Pdf_Report.json - */ -async function snapshotDownloadCompliancePdfReport() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait(reportName, snapshotName, { - downloadType: "CompliancePdfReport", - offerGuid: "00000000-0000-0000-0000-000000000001", - reportCreatorTenantId: "00000000-0000-0000-0000-000000000000", - }); - console.log(result); -} - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Report.json - */ -async function snapshotDownloadComplianceReport() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait(reportName, snapshotName, { - downloadType: "ComplianceReport", - offerGuid: "00000000-0000-0000-0000-000000000001", - reportCreatorTenantId: "00000000-0000-0000-0000-000000000000", - }); - console.log(result); -} - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Resource_List.json - */ -async function snapshotDownloadResourceList() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait(reportName, snapshotName, { - downloadType: "ResourceList", - offerGuid: "00000000-0000-0000-0000-000000000001", - reportCreatorTenantId: "00000000-0000-0000-0000-000000000000", - }); - console.log(result); -} - -async function main() { - snapshotDownloadComplianceDetailedPdfReport(); - snapshotDownloadCompliancePdfReport(); - snapshotDownloadComplianceReport(); - snapshotDownloadResourceList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotGetSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotGetSample.js deleted file mode 100644 index baec752cddd7..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation snapshot and its properties. - * - * @summary Get the AppComplianceAutomation snapshot and its properties. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Get.json - */ -async function snapshotGet() { - const reportName = "testReportName"; - const snapshotName = "testSnapshot"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.get(reportName, snapshotName); - console.log(result); -} - -async function main() { - snapshotGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotListSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotListSample.js deleted file mode 100644 index bee5ab01f6e7..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/snapshotListSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation snapshot list. - * - * @summary Get the AppComplianceAutomation snapshot list. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_List.json - */ -async function snapshotList() { - const skipToken = "1"; - const top = 100; - const offerGuid = "00000000-0000-0000-0000-000000000001"; - const reportCreatorTenantId = "00000000-0000-0000-0000-000000000000"; - const reportName = "testReportName"; - const options = { - skipToken, - top, - offerGuid, - reportCreatorTenantId, - }; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.snapshot.list(reportName, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - snapshotList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookCreateOrUpdateSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookCreateOrUpdateSample.js deleted file mode 100644 index a72bef178102..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. - * - * @summary Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_CreateOrUpdate.json - */ -async function webhookCreateOrUpdate() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.createOrUpdate(reportName, webhookName, { - properties: { - contentType: "application/json", - enableSslVerification: "true", - events: ["generate_snapshot_failed"], - payloadUrl: "https://example.com", - sendAllEvents: "false", - status: "Enabled", - updateWebhookKey: "true", - webhookKey: "00000000-0000-0000-0000-000000000000", - }, - }); - console.log(result); -} - -async function main() { - webhookCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookDeleteSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookDeleteSample.js deleted file mode 100644 index f3f9689edcd2..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete an AppComplianceAutomation webhook. - * - * @summary Delete an AppComplianceAutomation webhook. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Delete.json - */ -async function webhookDelete() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.delete(reportName, webhookName); - console.log(result); -} - -async function main() { - webhookDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookGetSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookGetSample.js deleted file mode 100644 index 0e228e8bdb20..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation webhook and its properties. - * - * @summary Get the AppComplianceAutomation webhook and its properties. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Get.json - */ -async function webhookGet() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.get(reportName, webhookName); - console.log(result); -} - -async function main() { - webhookGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookListSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookListSample.js deleted file mode 100644 index 543044041516..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookListSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation webhook list. - * - * @summary Get the AppComplianceAutomation webhook list. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_List.json - */ -async function webhookList() { - const skipToken = "1"; - const top = 100; - const reportName = "testReportName"; - const options = { skipToken, top }; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.webhook.list(reportName, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - webhookList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookUpdateSample.js b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookUpdateSample.js deleted file mode 100644 index 180da6daacbd..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/javascript/webhookUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 { - AppComplianceAutomationToolForMicrosoft365, -} = require("@azure/arm-appcomplianceautomation"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update an exiting AppComplianceAutomation webhook. - * - * @summary Update an exiting AppComplianceAutomation webhook. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Update.json - */ -async function webhookUpdate() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.update(reportName, webhookName, { - properties: { - contentType: "application/json", - enableSslVerification: "true", - events: ["generate_snapshot_failed"], - payloadUrl: "https://example.com", - sendAllEvents: "false", - status: "Enabled", - updateWebhookKey: "true", - webhookKey: "00000000-0000-0000-0000-000000000000", - }, - }); - console.log(result); -} - -async function main() { - webhookUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/README.md b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/README.md deleted file mode 100644 index d542e75c8358..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [evidenceCreateOrUpdateSample.ts][evidencecreateorupdatesample] | Create or Update an evidence a specified report x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_CreateOrUpdate.json | -| [evidenceDeleteSample.ts][evidencedeletesample] | Delete an existent evidence from a specified report x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Delete.json | -| [evidenceDownloadSample.ts][evidencedownloadsample] | Download evidence file. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Download.json | -| [evidenceGetSample.ts][evidencegetsample] | Get the evidence metadata x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Get.json | -| [evidenceListByReportSample.ts][evidencelistbyreportsample] | Returns a paginated list of evidences for a specified report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_ListByReport.json | -| [operationsListSample.ts][operationslistsample] | List the operations for the provider x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Operations_List.json | -| [providerActionsCheckNameAvailabilitySample.ts][provideractionschecknameavailabilitysample] | Check if the given name is available for a report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CheckNameAvailability.json | -| [providerActionsGetCollectionCountSample.ts][provideractionsgetcollectioncountsample] | Get the count of reports. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetCollectionCount.json | -| [providerActionsGetOverviewStatusSample.ts][provideractionsgetoverviewstatussample] | Get the resource overview status. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetOverviewStatus.json | -| [providerActionsListInUseStorageAccountsSample.ts][provideractionslistinusestorageaccountssample] | List the storage accounts which are in use by related reports x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithSubscriptions.json | -| [providerActionsOnboardSample.ts][provideractionsonboardsample] | Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Onboard.json | -| [providerActionsTriggerEvaluationSample.ts][provideractionstriggerevaluationsample] | Trigger quick evaluation for the given subscriptions. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/TriggerEvaluation.json | -| [reportCreateOrUpdateSample.ts][reportcreateorupdatesample] | Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CreateOrUpdate.json | -| [reportDeleteSample.ts][reportdeletesample] | Delete an AppComplianceAutomation report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Delete.json | -| [reportFixSample.ts][reportfixsample] | Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Fix.json | -| [reportGetSample.ts][reportgetsample] | Get the AppComplianceAutomation report and its properties. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Get.json | -| [reportGetScopingQuestionsSample.ts][reportgetscopingquestionssample] | Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetScopingQuestions.json | -| [reportListSample.ts][reportlistsample] | Get the AppComplianceAutomation report list for the tenant. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_List.json | -| [reportNestedResourceCheckNameAvailabilitySample.ts][reportnestedresourcechecknameavailabilitysample] | Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Evidence_Check_Name_Availability.json | -| [reportSyncCertRecordSample.ts][reportsynccertrecordsample] | Synchronize attestation record from app compliance. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_SyncCertRecord.json | -| [reportUpdateSample.ts][reportupdatesample] | Update an exiting AppComplianceAutomation report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Update.json | -| [reportVerifySample.ts][reportverifysample] | Verify the AppComplianceAutomation report health status. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Verify.json | -| [scopingConfigurationCreateOrUpdateSample.ts][scopingconfigurationcreateorupdatesample] | Get the AppComplianceAutomation scoping configuration of the specific report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_CreateOrUpdate.json | -| [scopingConfigurationDeleteSample.ts][scopingconfigurationdeletesample] | Clean the AppComplianceAutomation scoping configuration of the specific report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Delete.json | -| [scopingConfigurationGetSample.ts][scopingconfigurationgetsample] | Get the AppComplianceAutomation scoping configuration of the specific report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Get.json | -| [scopingConfigurationListSample.ts][scopingconfigurationlistsample] | Returns a list format of the singleton scopingConfiguration for a specified report. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_List.json | -| [snapshotDownloadSample.ts][snapshotdownloadsample] | Download compliance needs from snapshot, like: Compliance Report, Resource List. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Detailed_Pdf_Report.json | -| [snapshotGetSample.ts][snapshotgetsample] | Get the AppComplianceAutomation snapshot and its properties. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Get.json | -| [snapshotListSample.ts][snapshotlistsample] | Get the AppComplianceAutomation snapshot list. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_List.json | -| [webhookCreateOrUpdateSample.ts][webhookcreateorupdatesample] | Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_CreateOrUpdate.json | -| [webhookDeleteSample.ts][webhookdeletesample] | Delete an AppComplianceAutomation webhook. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Delete.json | -| [webhookGetSample.ts][webhookgetsample] | Get the AppComplianceAutomation webhook and its properties. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Get.json | -| [webhookListSample.ts][webhooklistsample] | Get the AppComplianceAutomation webhook list. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_List.json | -| [webhookUpdateSample.ts][webhookupdatesample] | Update an exiting AppComplianceAutomation webhook. x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Update.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/evidenceCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node dist/evidenceCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[evidencecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceCreateOrUpdateSample.ts -[evidencedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceDeleteSample.ts -[evidencedownloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceDownloadSample.ts -[evidencegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceGetSample.ts -[evidencelistbyreportsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceListByReportSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/operationsListSample.ts -[provideractionschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsCheckNameAvailabilitySample.ts -[provideractionsgetcollectioncountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsGetCollectionCountSample.ts -[provideractionsgetoverviewstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsGetOverviewStatusSample.ts -[provideractionslistinusestorageaccountssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsListInUseStorageAccountsSample.ts -[provideractionsonboardsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsOnboardSample.ts -[provideractionstriggerevaluationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsTriggerEvaluationSample.ts -[reportcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportCreateOrUpdateSample.ts -[reportdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportDeleteSample.ts -[reportfixsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportFixSample.ts -[reportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportGetSample.ts -[reportgetscopingquestionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportGetScopingQuestionsSample.ts -[reportlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportListSample.ts -[reportnestedresourcechecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportNestedResourceCheckNameAvailabilitySample.ts -[reportsynccertrecordsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportSyncCertRecordSample.ts -[reportupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportUpdateSample.ts -[reportverifysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportVerifySample.ts -[scopingconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationCreateOrUpdateSample.ts -[scopingconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationDeleteSample.ts -[scopingconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationGetSample.ts -[scopingconfigurationlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationListSample.ts -[snapshotdownloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotDownloadSample.ts -[snapshotgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotGetSample.ts -[snapshotlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotListSample.ts -[webhookcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookCreateOrUpdateSample.ts -[webhookdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookDeleteSample.ts -[webhookgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookGetSample.ts -[webhooklistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookListSample.ts -[webhookupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookUpdateSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appcomplianceautomation?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcomplianceautomation/arm-appcomplianceautomation/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/package.json b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/package.json deleted file mode 100644 index db955b0f96c6..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-appcomplianceautomation-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/appcomplianceautomation/arm-appcomplianceautomation" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcomplianceautomation/arm-appcomplianceautomation", - "dependencies": { - "@azure/arm-appcomplianceautomation": "latest", - "dotenv": "latest", - "@azure/identity": "^4.0.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.4.5", - "rimraf": "latest" - } -} diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/sample.env b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceCreateOrUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceCreateOrUpdateSample.ts deleted file mode 100644 index c034a37c8ec8..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update an evidence a specified report - * - * @summary Create or Update an evidence a specified report - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_CreateOrUpdate.json - */ -async function evidenceCreateOrUpdate() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.createOrUpdate(reportName, evidenceName, - { - "properties": { - "controlId": "Operational_Security_10", - "evidenceType": "File", - "filePath": "/test-byos/evidence1.png", - "responsibilityId": "authorized_ip_ranges_should_be_defined_on_kubernetes_services" - } - } - ); - console.log(result); -} - -async function main() { - evidenceCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceDeleteSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceDeleteSample.ts deleted file mode 100644 index 2769fce413c6..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an existent evidence from a specified report - * - * @summary Delete an existent evidence from a specified report - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Delete.json - */ -async function evidenceDelete() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.delete(reportName, evidenceName); - console.log(result); -} - -async function main() { - evidenceDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceDownloadSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceDownloadSample.ts deleted file mode 100644 index 25732dd5fffa..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceDownloadSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Download evidence file. - * - * @summary Download evidence file. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Download.json - */ -async function evidenceDownload() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.download(reportName, evidenceName, - { - "offerGuid": "00000000-0000-0000-0000-000000000000", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -async function main() { - evidenceDownload(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceGetSample.ts deleted file mode 100644 index 90dc70c4484d..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the evidence metadata - * - * @summary Get the evidence metadata - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Get.json - */ -async function evidenceGet() { - const reportName = "testReportName"; - const evidenceName = "evidence1"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.evidence.get(reportName, evidenceName); - console.log(result); -} - -async function main() { - evidenceGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceListByReportSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceListByReportSample.ts deleted file mode 100644 index 71077ba55a79..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/evidenceListByReportSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns a paginated list of evidences for a specified report. - * - * @summary Returns a paginated list of evidences for a specified report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_ListByReport.json - */ -async function evidenceListByReport() { - const reportName = "reportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.evidence.listByReport(reportName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - evidenceListByReport(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/operationsListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/operationsListSample.ts deleted file mode 100644 index 5b309da24bcd..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Operations_List.json - */ -async function operationsList() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsCheckNameAvailabilitySample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsCheckNameAvailabilitySample.ts deleted file mode 100644 index 7821e01e824b..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Check if the given name is available for a report. - * - * @summary Check if the given name is available for a report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CheckNameAvailability.json - */ -async function reportCheckNameAvailability() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.checkNameAvailability({ - "name": "reportABC", - "type": "Microsoft.AppComplianceAutomation/reports" - }); - console.log(result); -} - -async function main() { - reportCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsGetCollectionCountSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsGetCollectionCountSample.ts deleted file mode 100644 index 8e93fb0798e6..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsGetCollectionCountSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the count of reports. - * - * @summary Get the count of reports. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetCollectionCount.json - */ -async function reportGetCollectionCount() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.getCollectionCount({ - "type": "Microsoft.AppComplianceAutomation/reports" - }); - console.log(result); -} - -async function main() { - reportGetCollectionCount(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsGetOverviewStatusSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsGetOverviewStatusSample.ts deleted file mode 100644 index 35b13c7f3bee..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsGetOverviewStatusSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the resource overview status. - * - * @summary Get the resource overview status. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetOverviewStatus.json - */ -async function reportGetOverviewStatus() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.getOverviewStatus({ - "type": "Microsoft.AppComplianceAutomation/reports" - }); - console.log(result); -} - -async function main() { - reportGetOverviewStatus(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsListInUseStorageAccountsSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsListInUseStorageAccountsSample.ts deleted file mode 100644 index aebcd2ae5e4f..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsListInUseStorageAccountsSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the storage accounts which are in use by related reports - * - * @summary List the storage accounts which are in use by related reports - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithSubscriptions.json - */ -async function listInUseStorageAccountsWithSubscriptions() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.listInUseStorageAccounts({ - "subscriptionIds": [ - "0000000-0000-0000-0000-000000000001", - "0000000-0000-0000-0000-000000000002" - ] - }); - console.log(result); -} - -/** - * This sample demonstrates how to List the storage accounts which are in use by related reports - * - * @summary List the storage accounts which are in use by related reports - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithoutSubscriptions.json - */ -async function listInUseStorageAccountsWithoutSubscriptions() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.listInUseStorageAccounts({}); - console.log(result); -} - -async function main() { - listInUseStorageAccountsWithSubscriptions(); - listInUseStorageAccountsWithoutSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsOnboardSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsOnboardSample.ts deleted file mode 100644 index cfc00499469f..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsOnboardSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. - * - * @summary Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Onboard.json - */ -async function onboard() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.beginOnboardAndWait({ - "subscriptionIds": [ - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000001" - ] - }); - console.log(result); -} - -async function main() { - onboard(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsTriggerEvaluationSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsTriggerEvaluationSample.ts deleted file mode 100644 index e4d9da9871d6..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/providerActionsTriggerEvaluationSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Trigger quick evaluation for the given subscriptions. - * - * @summary Trigger quick evaluation for the given subscriptions. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/TriggerEvaluation.json - */ -async function triggerEvaluation() { - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.providerActions.beginTriggerEvaluationAndWait({ - "resourceIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService" - ] - }); - console.log(result); -} - -async function main() { - triggerEvaluation(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportCreateOrUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportCreateOrUpdateSample.ts deleted file mode 100644 index ce3816bf1ecb..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @summary Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CreateOrUpdate.json - */ -async function reportCreateOrUpdate() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginCreateOrUpdateAndWait(reportName, - { - "properties": { - "offerGuid": "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002", - "resources": [ - { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", - "resourceOrigin": "Azure", - "resourceType": "Microsoft.SignalRService/SignalR" - } - ], - "storageInfo": { - "accountName": "testStorageAccount", - "location": "East US", - "resourceGroup": "testResourceGroup", - "subscriptionId": "00000000-0000-0000-0000-000000000000" - }, - "timeZone": "GMT Standard Time", - "triggerTime": new Date("2022-03-04T05:00:00.000Z") - } - } - ); - console.log(result); -} - -async function main() { - reportCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportDeleteSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportDeleteSample.ts deleted file mode 100644 index 6ab60d2310b3..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an AppComplianceAutomation report. - * - * @summary Delete an AppComplianceAutomation report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Delete.json - */ -async function reportDelete() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginDeleteAndWait(reportName); - console.log(result); -} - -async function main() { - reportDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportFixSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportFixSample.ts deleted file mode 100644 index e5f46e06b5d3..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportFixSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * - * @summary Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Fix.json - */ -async function reportFix() { - const reportName = "testReport"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginFixAndWait(reportName); - console.log(result); -} - -async function main() { - reportFix(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportGetSample.ts deleted file mode 100644 index b3cc566ba5f7..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation report and its properties. - * - * @summary Get the AppComplianceAutomation report and its properties. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Get.json - */ -async function reportGet() { - const reportName = "testReport"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.get(reportName); - console.log(result); -} - -async function main() { - reportGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportGetScopingQuestionsSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportGetScopingQuestionsSample.ts deleted file mode 100644 index 2ec8c684088a..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportGetScopingQuestionsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * - * @summary Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetScopingQuestions.json - */ -async function reportGetScopingQuestions() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.getScopingQuestions(reportName); - console.log(result); -} - -async function main() { - reportGetScopingQuestions(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportListSample.ts deleted file mode 100644 index 079613e219cf..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportListSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 { - ReportListOptionalParams, - AppComplianceAutomationToolForMicrosoft365, -} from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation report list for the tenant. - * - * @summary Get the AppComplianceAutomation report list for the tenant. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_List.json - */ -async function reportList() { - const skipToken = "1"; - const top = 100; - const offerGuid = "00000000-0000-0000-0000-000000000000"; - const reportCreatorTenantId = "00000000-0000-0000-0000-000000000000"; - const options: ReportListOptionalParams = { - skipToken, - top, - offerGuid, - reportCreatorTenantId, - }; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.report.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - reportList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportNestedResourceCheckNameAvailabilitySample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportNestedResourceCheckNameAvailabilitySample.ts deleted file mode 100644 index cf2d8d84534d..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportNestedResourceCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * - * @summary Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Evidence_Check_Name_Availability.json - */ -async function reportEvidenceCheckNameAvailability() { - const reportName = "reportABC"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = - await client.report.nestedResourceCheckNameAvailability(reportName, - { - "name": "evidenceABC", - "type": "Microsoft.AppComplianceAutomation/reports/evidences" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * - * @summary Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Snapshot_Check_Name_Availability.json - */ -async function reportSnapshotCheckNameAvailability() { - const reportName = "reportABC"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = - await client.report.nestedResourceCheckNameAvailability(reportName, - { - "name": "snapshotABC", - "type": "Microsoft.AppComplianceAutomation/reports/snapshots" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * - * @summary Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Webhook_Check_Name_Availability.json - */ -async function reportWebhookCheckNameAvailability() { - const reportName = "reportABC"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = - await client.report.nestedResourceCheckNameAvailability(reportName, - { - "name": "webhookABC", - "type": "Microsoft.AppComplianceAutomation/reports/webhooks" - } - ); - console.log(result); -} - -async function main() { - reportEvidenceCheckNameAvailability(); - reportSnapshotCheckNameAvailability(); - reportWebhookCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportSyncCertRecordSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportSyncCertRecordSample.ts deleted file mode 100644 index d739e7d3d27f..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportSyncCertRecordSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Synchronize attestation record from app compliance. - * - * @summary Synchronize attestation record from app compliance. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_SyncCertRecord.json - */ -async function reportSyncCertRecord() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginSyncCertRecordAndWait(reportName, - { - "certRecord": { - "certificationStatus": "CertIngestion", - "controls": [ - { - "controlId": "Operational_Security_10", - "controlStatus": "Approved" - } - ], - "ingestionStatus": "EvidenceResubmitted", - "offerGuid": "00000000-0000-0000-0000-000000000001" - } - } - ); - console.log(result); -} - -async function main() { - reportSyncCertRecord(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportUpdateSample.ts deleted file mode 100644 index ae66f20c643e..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update an exiting AppComplianceAutomation report. - * - * @summary Update an exiting AppComplianceAutomation report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Update.json - */ -async function reportUpdate() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginUpdateAndWait(reportName, - { - "properties": { - "offerGuid": "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002", - "resources": [ - { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", - "resourceOrigin": "Azure", - "resourceType": "Microsoft.SignalRService/SignalR" - }, - { - "accountId": "000000000000", - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser", - "resourceOrigin": "AWS", - "resourceType": "iam.user" - } - ], - "storageInfo": { - "accountName": "testStorageAccount", - "location": "East US", - "resourceGroup": "testResourceGroup", - "subscriptionId": "00000000-0000-0000-0000-000000000000" - }, - "timeZone": "GMT Standard Time", - "triggerTime": new Date("2022-03-04T05:00:00.000Z") - } - } - ); - console.log(result); -} - -async function main() { - reportUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportVerifySample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportVerifySample.ts deleted file mode 100644 index 1f41092b0e4a..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/reportVerifySample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Verify the AppComplianceAutomation report health status. - * - * @summary Verify the AppComplianceAutomation report health status. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Verify.json - */ -async function reportVerify() { - const reportName = "testReport"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.report.beginVerifyAndWait(reportName); - console.log(result); -} - -async function main() { - reportVerify(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationCreateOrUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationCreateOrUpdateSample.ts deleted file mode 100644 index e98f0724b67e..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation scoping configuration of the specific report. - * - * @summary Get the AppComplianceAutomation scoping configuration of the specific report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_CreateOrUpdate.json - */ -async function scopingConfigurationCreateOrUpdate() { - const reportName = "testReportName"; - const scopingConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.scopingConfiguration.createOrUpdate( - reportName, - scopingConfigurationName, - { - "properties": { - "answers": [ - { - "answers": [ - "Azure" - ], - "questionId": "GEN20_hostingEnvironment" - }, - { - "answers": [], - "questionId": "DHP_G07_customerDataProcess" - }, - { - "answers": [], - "questionId": "Tier2InitSub_serviceCommunicate" - } - ] - } - } - ); - console.log(result); -} - -async function main() { - scopingConfigurationCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationDeleteSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationDeleteSample.ts deleted file mode 100644 index f631b4d652b3..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationDeleteSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Clean the AppComplianceAutomation scoping configuration of the specific report. - * - * @summary Clean the AppComplianceAutomation scoping configuration of the specific report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Delete.json - */ -async function scopingConfigurationDelete() { - const reportName = "testReportName"; - const scopingConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.scopingConfiguration.delete( - reportName, - scopingConfigurationName, - ); - console.log(result); -} - -async function main() { - scopingConfigurationDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationGetSample.ts deleted file mode 100644 index 1048fda7d9c0..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation scoping configuration of the specific report. - * - * @summary Get the AppComplianceAutomation scoping configuration of the specific report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_Get.json - */ -async function scopingConfiguration() { - const reportName = "testReportName"; - const scopingConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.scopingConfiguration.get( - reportName, - scopingConfigurationName, - ); - console.log(result); -} - -async function main() { - scopingConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationListSample.ts deleted file mode 100644 index 7b40433551fd..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/scopingConfigurationListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns a list format of the singleton scopingConfiguration for a specified report. - * - * @summary Returns a list format of the singleton scopingConfiguration for a specified report. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_List.json - */ -async function scopingConfigurationList() { - const reportName = "testReportName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.scopingConfiguration.list(reportName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scopingConfigurationList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotDownloadSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotDownloadSample.ts deleted file mode 100644 index 0bd838baf9d7..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotDownloadSample.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Detailed_Pdf_Report.json - */ -async function snapshotDownloadComplianceDetailedPdfReport() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait( - reportName, - snapshotName, - { - "downloadType": "ComplianceDetailedPdfReport", - "offerGuid": "00000000-0000-0000-0000-000000000000", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Pdf_Report.json - */ -async function snapshotDownloadCompliancePdfReport() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait( - reportName, - snapshotName, - { - "downloadType": "CompliancePdfReport", - "offerGuid": "00000000-0000-0000-0000-000000000001", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Report.json - */ -async function snapshotDownloadComplianceReport() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait( - reportName, - snapshotName, - { - "downloadType": "ComplianceReport", - "offerGuid": "00000000-0000-0000-0000-000000000001", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -/** - * This sample demonstrates how to Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @summary Download compliance needs from snapshot, like: Compliance Report, Resource List. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Resource_List.json - */ -async function snapshotDownloadResourceList() { - const reportName = "testReportName"; - const snapshotName = "testSnapshotName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.beginDownloadAndWait( - reportName, - snapshotName, - { - "downloadType": "ResourceList", - "offerGuid": "00000000-0000-0000-0000-000000000001", - "reportCreatorTenantId": "00000000-0000-0000-0000-000000000000" - } - ); - console.log(result); -} - -async function main() { - snapshotDownloadComplianceDetailedPdfReport(); - snapshotDownloadCompliancePdfReport(); - snapshotDownloadComplianceReport(); - snapshotDownloadResourceList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotGetSample.ts deleted file mode 100644 index 9e7c4a5ab48a..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation snapshot and its properties. - * - * @summary Get the AppComplianceAutomation snapshot and its properties. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Get.json - */ -async function snapshotGet() { - const reportName = "testReportName"; - const snapshotName = "testSnapshot"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.snapshot.get(reportName, snapshotName); - console.log(result); -} - -async function main() { - snapshotGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotListSample.ts deleted file mode 100644 index aead6cd8070f..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/snapshotListSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { - SnapshotListOptionalParams, - AppComplianceAutomationToolForMicrosoft365, -} from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation snapshot list. - * - * @summary Get the AppComplianceAutomation snapshot list. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_List.json - */ -async function snapshotList() { - const skipToken = "1"; - const top = 100; - const offerGuid = "00000000-0000-0000-0000-000000000001"; - const reportCreatorTenantId = "00000000-0000-0000-0000-000000000000"; - const reportName = "testReportName"; - const options: SnapshotListOptionalParams = { - skipToken, - top, - offerGuid, - reportCreatorTenantId, - }; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.snapshot.list(reportName, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - snapshotList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookCreateOrUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookCreateOrUpdateSample.ts deleted file mode 100644 index 4b244ff95861..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. - * - * @summary Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_CreateOrUpdate.json - */ -async function webhookCreateOrUpdate() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.createOrUpdate(reportName, webhookName, - { - "properties": { - "contentType": "application/json", - "enableSslVerification": "true", - "events": [ - "generate_snapshot_failed" - ], - "payloadUrl": "https://example.com", - "sendAllEvents": "false", - "status": "Enabled", - "updateWebhookKey": "true", - "webhookKey": "00000000-0000-0000-0000-000000000000" - } - } - ); - console.log(result); -} - -async function main() { - webhookCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookDeleteSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookDeleteSample.ts deleted file mode 100644 index 8ee74e288ed8..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an AppComplianceAutomation webhook. - * - * @summary Delete an AppComplianceAutomation webhook. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Delete.json - */ -async function webhookDelete() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.delete(reportName, webhookName); - console.log(result); -} - -async function main() { - webhookDelete(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookGetSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookGetSample.ts deleted file mode 100644 index 8120f301e857..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation webhook and its properties. - * - * @summary Get the AppComplianceAutomation webhook and its properties. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Get.json - */ -async function webhookGet() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.get(reportName, webhookName); - console.log(result); -} - -async function main() { - webhookGet(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookListSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookListSample.ts deleted file mode 100644 index bcda540f859e..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookListSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 { - WebhookListOptionalParams, - AppComplianceAutomationToolForMicrosoft365, -} from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the AppComplianceAutomation webhook list. - * - * @summary Get the AppComplianceAutomation webhook list. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_List.json - */ -async function webhookList() { - const skipToken = "1"; - const top = 100; - const reportName = "testReportName"; - const options: WebhookListOptionalParams = { skipToken, top }; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const resArray = new Array(); - for await (let item of client.webhook.list(reportName, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - webhookList(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookUpdateSample.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookUpdateSample.ts deleted file mode 100644 index d6a808f2f69e..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/src/webhookUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update an exiting AppComplianceAutomation webhook. - * - * @summary Update an exiting AppComplianceAutomation webhook. - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Update.json - */ -async function webhookUpdate() { - const reportName = "testReportName"; - const webhookName = "testWebhookName"; - const credential = new DefaultAzureCredential(); - const client = new AppComplianceAutomationToolForMicrosoft365(credential); - const result = await client.webhook.update(reportName, webhookName, - { - "properties": { - "contentType": "application/json", - "enableSslVerification": "true", - "events": [ - "generate_snapshot_failed" - ], - "payloadUrl": "https://example.com", - "sendAllEvents": "false", - "status": "Enabled", - "updateWebhookKey": "true", - "webhookKey": "00000000-0000-0000-0000-000000000000" - } - } - ); - console.log(result); -} - -async function main() { - webhookUpdate(); -} - -main().catch(console.error); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/tsconfig.json b/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/samples/v1/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/test/appcomplianceautomation_operations_test.spec.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/test/appcomplianceautomation_operations_test.spec.ts deleted file mode 100644 index e65946e11ca7..000000000000 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/test/appcomplianceautomation_operations_test.spec.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ - -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { AppComplianceAutomationToolForMicrosoft365 } from "../src/appComplianceAutomationToolForMicrosoft365" - -const replaceableVariables: Record = { - SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888" -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("appcomplianceautomation test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: AppComplianceAutomationToolForMicrosoft365; - let location: string; - let resourceGroup: string; - let resourcename: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new AppComplianceAutomationToolForMicrosoft365(credential, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("operations list test", async function () { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); - -}) diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/test/sampleTest.ts b/sdk/appcomplianceautomation/arm-appcomplianceautomation/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/appcomplianceautomation/arm-appcomplianceautomation/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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. + */ + +import { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/appcomplianceautomation/arm-appcomplianceautomation/tsconfig.json b/sdk/appcomplianceautomation/arm-appcomplianceautomation/tsconfig.json index 1795f632f0eb..3e6ae96443f3 100644 --- a/sdk/appcomplianceautomation/arm-appcomplianceautomation/tsconfig.json +++ b/sdk/appcomplianceautomation/arm-appcomplianceautomation/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-appcomplianceautomation": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"