Edit

Share via


Get-AzApiManagementCache

Get the details of the Cache.

Syntax

ContextParameterSet (Default)

Get-AzApiManagementCache
    -Context <PsApiManagementContext>
    [-CacheId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ResourceIdParameterSet

Get-AzApiManagementCache
    -ResourceId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Get the details of the Cache configured in Api Management service.

Examples

Example 1: Get all Caches

$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementCache -Context $apimContext
CacheId           : westus
Description       : apim.redis.cache.windows.net
ConnectionString  : {{5cc1848125a3f724dcf9a928}}
ResourceId        : https://management.azure.com/subscriptions/a200340d-6b82-494d-9dbf-687ba6e33f9e/resourceGroups/Api-Default-West-US/providers/Microsoft.Cache/Redis/apim
Id                : /subscriptions/a200340d-6b82-494d-9dbf-687ba6e33f9e/resourceGroups/Api-Default-West-US/providers/Microsoft.ApiManagement/service/contoso/caches/westus
ResourceGroupName : Api-Default-West-US
ServiceName       : contoso

Gets a list of all the Caches configured in the Api Management service.

Example 2: Get the Cache specified by the Identifier westus

$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementCache -Context $apimContext -cacheId westus
CacheId           : westus
Description       : apim.redis.cache.windows.net
ConnectionString  : {{5cc1848125a3f724dcf9a928}}
ResourceId        : https://management.azure.com/subscriptions/a200340d-6b82-494d-9dbf-687ba6e33f9e/resourceGroups/Api-Default-West-US/providers/Microsoft.Cache/Redis/apim
Id                : /subscriptions/a200340d-6b82-494d-9dbf-687ba6e33f9e/resourceGroups/Api-Default-WestUS/providers/Microsoft.ApiManagement/service/contoso/caches/westus
ResourceGroupName : Api-Default-WestUS
ServiceName       : contoso

Get the details of the specified Cache configured for westus

Parameters

-CacheId

Identifier of a cache. If specified will try to find cache by the identifier. This parameter is optional.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ContextParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Context

Instance of PsApiManagementContext. This parameter is required.

Parameter properties

Type:PsApiManagementContext
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ContextParameterSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

Arm Resource Identifier of a cache. If specified will try to find cache by the identifier. This parameter is required.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ResourceIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PsApiManagementContext

String

Outputs

PsApiManagementCache