Get-AzPeeringAsn

Gets the peer ASN with the specified name under the given subscription.

Syntax

Get-AzPeeringAsn
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPeeringAsn
   -Name <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPeeringAsn
   -InputObject <IPeeringIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

Gets the peer ASN with the specified name under the given subscription.

Examples

Example 1: List PeerAsns

Get-AzPeeringAsn

Name            PeerName PropertiesPeerAsn ValidationState PeerContactDetail
----            -------- ----------------- --------------- -----------------
ContosoEdgeTest Contoso  65000             Approved        {{…}}

List all the peer asns under subscription

Example 2: Get Specific PeerAsn

Get-AzPeeringAsn -Name ContosoEdgeTest

Name            PeerName PropertiesPeerAsn ValidationState PeerContactDetail
----            -------- ----------------- --------------- -----------------
ContosoEdgeTest Contoso  65000             Approved        {{…}}

Get peer asn by name

Parameters

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IPeeringIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The peer ASN name.

Type:String
Aliases:PeerAsnName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The Azure subscription ID.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IPeeringIdentity

Outputs

IPeerAsn