def METHOD_NAME(expand: Optional[str] = None,
               peering_service_name: Optional[str] = None,
               prefix_name: Optional[str] = None,
               resource_group_name: Optional[str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPrefixResult:
    """
    Gets an existing prefix with the specified name under the given subscription, resource group and peering service.
    :param str expand: The properties to be expanded.
    :param str peering_service_name: The name of the peering service.
    :param str prefix_name: The name of the prefix.
    :param str resource_group_name: The name of the resource group.
    """
    __args__ = dict()
    __args__['expand'] = expand
    __args__['peeringServiceName'] = peering_service_name
    __args__['prefixName'] = 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:getPrefix', __args__, opts=opts, typ=GetPrefixResult).value
    return AwaitableGetPrefixResult(
        error_message=pulumi.get(__ret__, 'error_message'),
        events=pulumi.get(__ret__, 'events'),
        id=pulumi.get(__ret__, 'id'),
        learned_type=pulumi.get(__ret__, 'learned_type'),
        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'))