< Back

Backup-AzureRmApiManagement

Tue Jan 29, 2019 9:28 pm

NAME Backup-AzureRmApiManagement



SYNOPSIS

Backs up an API Management service.





SYNTAX

Backup-AzureRmApiManagement [-DefaultProfile <IAzureContextContainer>] -Name <String> [-PassThru] -ResourceGroupName <String> -StorageContext

<IStorageContext> [-TargetBlobName <String>] -TargetContainerName <String> [<CommonParameters>]





DESCRIPTION

The Backup-AzureRmApiManagement cmdlet backs up an instance of an Azure API Management service. This cmdlet stores the backup as an Azure Storage

blob.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the API Management deployment that this cmdlet backs up.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Indicates that this cmdlet returns the backed up PsApiManagement object, if the operation succeeds.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-StorageContext <IStorageContext>

Specifies a storage connection context.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TargetBlobName <String>

Specifies the name of the blob for the backup. If the blob does not exist, this cmdlet creates it. This cmdlet generates a default value based

on the following pattern:



{Name}-{yyyy-MM-dd-HH-mm}.apimbackup



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-TargetContainerName <String>

Specifies the name of the container of the blob for the backup. If the container does not exist, this cmdlet creates it.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement







NOTES









Example 1: Back up 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:\\>Backup-AzureRmApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi" -StorageContext $StorageContext -TargetContainerName

"ContosoBackups" -TargetBlobName "ContosoBackup.apimbackup"



This command backs up an API Management service to a Storage blob.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... management

Get-AzureRmApiManagement

New-AzureRmApiManagement

Remove-AzureRmApiManagement

Restore-AzureRmApiManagement