Skip to content

Commit 22a236c

Browse files
authored
Fixing code snippet formatting
1 parent bbf6202 commit 22a236c

File tree

1 file changed

+39
-40
lines changed

1 file changed

+39
-40
lines changed

articles/automation/automation-secure-asset-encryption.md

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ When you modify the key being used for Azure Automation secure asset encryption
4040

4141
The following three sections describe the mechanics of enabling customer-managed keys for an Automation account.
4242

43-
[!NOTE] To enable customer-managed keys, you will currently need to make Azure Automation REST APIs using api version 2020-01-13-preview
43+
> [!NOTE]
44+
> To enable customer-managed keys, you will currently need to make Azure Automation REST APIs using api version 2020-01-13-preview
4445
4546
### Pre-requisites for using Customer-managed keys in Azure Automation
4647

@@ -57,49 +58,47 @@ To use customer-managed keys with an automation account, your automation account
5758

5859
Configure a system assigned managed identity to the automation account using the following REST API call
5960

60-
``http
61-
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.Automation/automationAccounts/automation-account-name?api-version=2020-01-13-preview
62-
``
63-
64-
Request body
65-
``json
66-
{
67-
identity :
68-
{
69-
type: 'SystemAssigned'
70-
}
71-
}
72-
``
73-
61+
```http
62+
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.Automation/automationAccounts/automation-account-name?api-version=2020-01-13-preview
63+
```
64+
Request body
65+
```json
66+
{
67+
"identity":
68+
{
69+
"type": "SystemAssigned"
70+
}
71+
}
72+
```
7473

7574
System assigned identity for the automation account is returned in the response
7675

77-
``json
78-
{
79-
"name": "automation-account-name",
80-
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.Automation/automationAccounts/automation-account-name",
81-
..
82-
"identity": {
83-
"type": "SystemAssigned",
84-
"principalId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
85-
"tenantId": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
86-
},
87-
..
88-
}
89-
``
76+
```json
77+
{
78+
"name": "automation-account-name",
79+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.Automation/automationAccounts/automation-account-name",
80+
..
81+
"identity": {
82+
"type": "SystemAssigned",
83+
"principalId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
84+
"tenantId": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
85+
},
86+
..
87+
}
88+
```
9089

9190
### Configure the Key Vault access policy
9291

9392
Once a managed identity is assigned to the Automation account, you configure access to the Key Vault storing customer managed Keys. Azure Automation requires **get**, **recover**, **wrapKey**, **UnwrapKey** on the customer managed keys.
9493

9594
Such an access policy can be set using the following REST API call.
9695

97-
``http
96+
```http
9897
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/accessPolicies/add?api-version=2018-02-14
99-
``
98+
```
10099
Request body
101100

102-
``json
101+
```json
103102
{
104103
"properties": {
105104
"accessPolicies": [
@@ -120,21 +119,21 @@ Request body
120119
]
121120
}
122121
}
123-
``
122+
```
124123

125-
[!NOTE]
126-
The tenantId and objectId fields must be provided with values of identity.tenantId and identity.principalId from the response of managed identity for the automation account.
124+
> [!NOTE]
125+
> The tenantId and objectId fields must be provided with values of identity.tenantId and identity.principalId from the response of managed identity for the automation account.
127126
128127
### Change the configuration of automation account to use customer managed key
129128

130129
Finally, you can switch your automation account from Microsft-managed keys to customer-managed keys, using the following REST API call.
131130

132-
``http
131+
```http
133132
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.Automation/automationAccounts/automation-account-name?api-version=2020-01-13-preview
134-
``
133+
```
135134
Request body
136135

137-
``json
136+
```json
138137
{
139138
"properties": {
140139
"encryption": {
@@ -147,10 +146,10 @@ Request body
147146
}
148147
}
149148
}
150-
``
149+
```
151150
Sample response
152151

153-
``json
152+
```json
154153
{
155154
"name": "automation-account-name",
156155
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.Automation/automationAccounts/automation-account-name",
@@ -168,7 +167,7 @@ Sample response
168167
..
169168
}
170169
}
171-
170+
```
172171

173172
## Manage customer-managed keys lifecycle
174173

0 commit comments

Comments
 (0)