mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
Configurations: 'specification/programenrollment/resource-manager/Microsoft.ProgramEnrollment/ProgramEnrollment/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: '2fa6d6ec33428702d1ee869d63e79687cf183fc4' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6420494 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. Release plan information is not available. Create a release plan and link SDK pull request to the release plan. Refer aka.ms/azsdk/releaseplan-dashboard for more info. ## Release Plan Details - Release Plan: https://azsdk-releaseplan-dashboard-hveph5aqhhcfhtgu.westus-01.azurewebsites.net/?releaseplan=34938 - Work Item Link: https://dev.azure.com/azure-sdk/fe81d705-3c06-41e5-bf7c-5ebea18efe89/_workitems/edit/34938 - Spec Pull Request: https://github.com/Azure/azure-rest-api-specs/pull/43694 - Spec API version:
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
import { ProgramEnrollmentClient } from "@azure/arm-programenrollment";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
/**
|
|
* This sample demonstrates how to creates or updates the specified edu enrollment.
|
|
*
|
|
* @summary creates or updates the specified edu enrollment.
|
|
* x-ms-original-file: 2026-03-01-preview/EduEnrollments_CreateOrUpdate.json
|
|
*/
|
|
async function createOrUpdateAnEduEnrollment(): Promise<void> {
|
|
const credential = new DefaultAzureCredential();
|
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
const client = new ProgramEnrollmentClient(credential, subscriptionId);
|
|
const result = await client.eduEnrollments.createOrUpdate("testrg", "default", {
|
|
location: "eastus",
|
|
properties: {
|
|
domains: [
|
|
{
|
|
domainNames: ["university.edu", "college.edu"],
|
|
tenantId: "00000000-0000-0000-0000-000000000001",
|
|
},
|
|
],
|
|
},
|
|
});
|
|
console.log(result);
|
|
}
|
|
|
|
async function main(): Promise<void> {
|
|
await createOrUpdateAnEduEnrollment();
|
|
}
|
|
|
|
main().catch(console.error);
|