Restore-AzureRmApiManagement

Restores an API Management Service from the specified Azure storage blob.

Syntax

Restore-AzureRmApiManagement
       -ResourceGroupName <String>
       -Name <String>
       [-StorageContext] <IStorageContext>
       -SourceContainerName <String>
       -SourceBlobName <String>
       [-PassThru]
       [-DefaultProfile <IAzureContextContainer>]
       [<CommonParameters>]

Description

The Restore-AzureRmApiManagement cmdlet restores an API Management Service from the specified backup residing in an Azurestorage blob.

Examples

Example 1: Restore an API Management service

PS C:\>New-AzureRmStorageAccount -StorageAccountName "ContosoStorage" -Location $location -ResourceGroupName "ContosoGroup02" -Type Standard_LRS
PS C:\>$storageKey = (Get-AzureRmStorageAccountKey -ResourceGroupName "ContosoGroup02" -StorageAccountName "ContosoStorage")[0].Value
PS C:\>$storageContext = New-AzureStorageContext -StorageAccountName "ContosoStorage" -StorageAccountKey $storageKey
PS C:\>Restore-AzureRmApiManagement -ResourceGroupName "ContosoGroup" -Name "RestoredContosoApi" -StorageContext $StorageContext -SourceContainerName "ContosoBackups" -SourceBlobName "ContosoBackup.apimbackup"

This command restores an API Management service from Azure storage blob.

Required Parameters

-Name

Specifies the name of the API Management instance that will be restored with the backup.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of resource group under which API Management exists.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SourceBlobName

Specifies the name of the Azure storage backup source blob.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SourceContainerName

Specifies the name of the Azure storage backup source container.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-StorageContext

Specifies the storage connection context.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement