File tree Expand file tree Collapse file tree 4 files changed +9
-2
lines changed
src/ResourceManager/ApiManagement/Commands.ApiManagement/help Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ This cmdlet stores the backup as an Azure Storage blob.
26
26
27
27
### Example 1: Back up an API Management service
28
28
```
29
+ PS C:\>New-AzureRmStorageAccount -StorageAccountName "ContosoStorage" -Location $location -ResourceGroupName "ContosoGroup02" -Type Standard_LRS
30
+ PS C:\>$storageKey = (Get-AzureRmStorageAccountKey -ResourceGroupName "ContosoGroup02" -StorageAccountName "ContosoStorage")[0].Value
31
+ PS C:\>$storageContext = New-AzureStorageContext -StorageAccountName "ContosoStorage" -StorageAccountKey $storageKey
29
32
PS C:\>Backup-AzureRmApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi" -StorageContext $StorageContext -TargetContainerName "ContosoBackups" -TargetBlobName "ContosoBackup.apimbackup"
30
33
```
31
34
Original file line number Diff line number Diff line change @@ -31,10 +31,11 @@ The **New-AzureRmApiManagementCertificate** cmdlet creates an Azure API Manageme
31
31
32
32
### Example 1: Create and upload a certificate
33
33
```
34
+ PS C:\>$ApiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
34
35
PS C:\>New-AzureRmApiManagementCertificate -Context $ApiMgmtContext -PfxFilePath "C:\contoso\certificates\apimanagement.pfx" -PfxPassword "1111"
35
36
```
36
37
37
- This command creates an API Management certificate and uploads it .
38
+ This command uploads a certificate to Api Management. This certificate can be used for mutual authentication with backend using policies .
38
39
39
40
## PARAMETERS
40
41
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ The **Restore-AzureRmApiManagement** cmdlet restores an API Management Service f
25
25
26
26
### Example 1: Restore an API Management service
27
27
```
28
+ PS C:\>New-AzureRmStorageAccount -StorageAccountName "ContosoStorage" -Location $location -ResourceGroupName "ContosoGroup02" -Type Standard_LRS
29
+ PS C:\>$storageKey = (Get-AzureRmStorageAccountKey -ResourceGroupName "ContosoGroup02" -StorageAccountName "ContosoStorage")[0].Value
30
+ PS C:\>$storageContext = New-AzureStorageContext -StorageAccountName "ContosoStorage" -StorageAccountKey $storageKey
28
31
PS C:\>Restore-AzureRmApiManagement -ResourceGroupName "ContosoGroup" -Name "RestoredContosoApi" -StorageContext $StorageContext -SourceContainerName "ContosoBackups" -SourceBlobName "ContosoBackup.apimbackup"
29
32
```
30
33
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ The **Set-AzureRmApiManagementSubscription** cmdlet sets existing subscription d
27
27
### Example 1: Set the state and primary and secondary keys for a subscription
28
28
```
29
29
PS C:\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
30
- PS C:\>Set-AzureRmApiManagementSubscription -Context $apimContext -SubscriptionId -0123456789 -PrimaryKey "80450f7d0b6d481382113073f67822c1" -SencondaryKey "97d6112c3a8f48d5bf0266b7a09a761c" -State "Active"
30
+ PS C:\>Set-AzureRmApiManagementSubscription -Context $apimContext -SubscriptionId -0123456789 -PrimaryKey "80450f7d0b6d481382113073f67822c1" -SecondaryKey "97d6112c3a8f48d5bf0266b7a09a761c" -State "Active"
31
31
```
32
32
33
33
This command sets the primary and secondary keys for a subscription and activates it.
You can’t perform that action at this time.
0 commit comments