def METHOD_NAME(format: Optional[str] = None,
                                  id: Optional[str] = None,
                                  resource_group_name: Optional[str] = None,
                                  service_name: Optional[str] = None,
                                  workspace_id: Optional[str] = None,
                                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetWorkspacePolicyFragmentResult:
    """
    Gets a policy fragment.
    :param str format: Policy fragment content format.
    :param str id: A resource identifier.
    :param str resource_group_name: The name of the resource group. The name is case insensitive.
    :param str service_name: The name of the API Management service.
    :param str workspace_id: Workspace identifier. Must be unique in the current API Management service instance.
    """
    __args__ = dict()
    __args__['format'] = format
    __args__['id'] = id
    __args__['resourceGroupName'] = resource_group_name
    __args__['serviceName'] = service_name
    __args__['workspaceId'] = workspace_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:apimanagement/v20230301preview:getWorkspacePolicyFragment', __args__, opts=opts, typ=GetWorkspacePolicyFragmentResult).value
    return AwaitableGetWorkspacePolicyFragmentResult(
        description=pulumi.get(__ret__, 'description'),
        format=pulumi.get(__ret__, 'format'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        type=pulumi.get(__ret__, 'type'),
        value=pulumi.get(__ret__, 'value'))