def METHOD_NAME(api_id: Optional[str] = None,
                   policy_id: Optional[str] = None,
                   resource_group_name: Optional[str] = None,
                   service_name: Optional[str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetApiPolicyResult:
    """
    Get the policy configuration at the API level.
    :param str api_id: API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
    :param str policy_id: The identifier of the Policy.
    :param str resource_group_name: The name of the resource group.
    :param str service_name: The name of the API Management service.
    """
    __args__ = dict()
    __args__['apiId'] = api_id
    __args__['policyId'] = policy_id
    __args__['resourceGroupName'] = resource_group_name
    __args__['serviceName'] = service_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:apimanagement/v20180601preview:getApiPolicy', __args__, opts=opts, typ=GetApiPolicyResult).value
    return AwaitableGetApiPolicyResult(
        content_format=pulumi.get(__ret__, 'content_format'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        policy_content=pulumi.get(__ret__, 'policy_content'),
        type=pulumi.get(__ret__, 'type'))