def METHOD_NAME(peer_asn_name: Optional[str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPeerAsnResult:
    """
    Gets the peer ASN with the specified name under the given subscription.
    :param str peer_asn_name: The peer ASN name.
    """
    __args__ = dict()
    __args__['peerAsnName'] = peer_asn_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:peering/v20210101:getPeerAsn', __args__, opts=opts, typ=GetPeerAsnResult).value
    return AwaitableGetPeerAsnResult(
        error_message=pulumi.get(__ret__, 'error_message'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        peer_asn=pulumi.get(__ret__, 'peer_asn'),
        peer_contact_detail=pulumi.get(__ret__, 'peer_contact_detail'),
        peer_name=pulumi.get(__ret__, 'peer_name'),
        type=pulumi.get(__ret__, 'type'),
        validation_state=pulumi.get(__ret__, 'validation_state'))