|
| 1 | +--- |
| 2 | +title: Programmatically deploy and manage Azure Arc Extended Security Updates licenses |
| 3 | +description: Learn how to programmatically deploy and manage Azure Arc Extended Security Updates licenses for Windows Server 2012. |
| 4 | +ms.date: 09/20/2023 |
| 5 | +ms.topic: conceptual |
| 6 | +--- |
| 7 | + |
| 8 | +# Programmatically deploy and manage Azure Arc Extended Security Updates licenses |
| 9 | + |
| 10 | +This article provides instructions to programmatically provision and manage Windows Server 2012 and Windows Server 2012 R2 Extended Security Updates lifecycle operations through the Azure Arc WS2012 ESU ARM APIs. |
| 11 | + |
| 12 | +> [!NOTE] |
| 13 | +> For each of the API commands, be sure to enter accurate parameter information for location, state, edition, type, and processors depending on your particular scenario |
| 14 | +> |
| 15 | +## Provision a license |
| 16 | + |
| 17 | +To provision a license, execute the following commands: |
| 18 | + |
| 19 | +``` |
| 20 | +PUT |
| 21 | +https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/licenses/LICENSE_NAME?api-version=2023-06-20-preview |
| 22 | +{ |
| 23 | + "location": "ENTER-REGION", |
| 24 | + "properties": { |
| 25 | + "licenseDetails": { |
| 26 | + "state": "Activated", |
| 27 | + "target": "Windows Server 2012", |
| 28 | + "Edition": "Datacenter", |
| 29 | + "Type": "pCore", |
| 30 | + "Processors": 12 |
| 31 | + } |
| 32 | + } |
| 33 | +} |
| 34 | +``` |
| 35 | + |
| 36 | +## Link a license |
| 37 | + |
| 38 | +To link a license, execute the following commands: |
| 39 | + |
| 40 | +``` |
| 41 | +PUT |
| 42 | +https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/machines/MACHINE_NAME/licenseProfiles/default?api-version=2023-06-20-preview |
| 43 | +{ |
| 44 | + “location”: “SAME_REGION_AS_MACHINE”, |
| 45 | + “properties”: { |
| 46 | + “esuProfile”: { |
| 47 | + “assignedLicense”: “RESOURCE_ID_OF_LICENSE” |
| 48 | + } |
| 49 | + } |
| 50 | +} |
| 51 | +``` |
| 52 | + |
| 53 | +## Modify a license |
| 54 | + |
| 55 | +To modify a license, execute the following commands: |
| 56 | + |
| 57 | +``` |
| 58 | +PUT/PATCH |
| 59 | +https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/licenses/LICENSE_NAME?api-version=2023-06-20-preview |
| 60 | +{ |
| 61 | + "location": "ENTER-REGION", |
| 62 | + "properties": { |
| 63 | + "licenseDetails": { |
| 64 | + "state": "Activated", |
| 65 | + "target": "Windows Server 2012", |
| 66 | + "Edition": "Datacenter", |
| 67 | + "Type": "pCore", |
| 68 | + "Processors": 12 |
| 69 | + } |
| 70 | + } |
| 71 | +} |
| 72 | +``` |
| 73 | + |
| 74 | +> [!NOTE] |
| 75 | +> For PUT, all of the properties must be provided. For PATCH, a subset may be provided. |
| 76 | +> |
| 77 | +
|
| 78 | +## Delete a license |
| 79 | + |
| 80 | +To delete a license, execute the following commands: |
| 81 | + |
| 82 | +``` |
| 83 | +DELETE |
| 84 | +https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/licenses/LICENSE_NAME?api-version=2023-06-20-preview |
| 85 | +``` |
0 commit comments