def METHOD_NAME(peering_name: Optional[str] = None,
                          registered_prefix_name: Optional[str] = None,
                          resource_group_name: Optional[str] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegisteredPrefixResult:
    """
    Gets an existing registered prefix with the specified name under the given subscription, resource group and peering.
    :param str peering_name: The name of the peering.
    :param str registered_prefix_name: The name of the registered prefix.
    :param str resource_group_name: The name of the resource group.
    """
    __args__ = dict()
    __args__['peeringName'] = peering_name
    __args__['registeredPrefixName'] = registered_prefix_name
    __args__['resourceGroupName'] = resource_group_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:peering/v20221001:getRegisteredPrefix', __args__, opts=opts, typ=GetRegisteredPrefixResult).value
    return AwaitableGetRegisteredPrefixResult(
        error_message=pulumi.get(__ret__, 'error_message'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        peering_service_prefix_key=pulumi.get(__ret__, 'peering_service_prefix_key'),
        prefix=pulumi.get(__ret__, 'prefix'),
        prefix_validation_state=pulumi.get(__ret__, 'prefix_validation_state'),
        provisioning_state=pulumi.get(__ret__, 'provisioning_state'),
        type=pulumi.get(__ret__, 'type'))