Contact Us 1-800-596-4880

Custom Policy Examples

Flex Gateway Policy Development Kit (PDK) provides example policy projects to get started configuring your Rust source code.

Find all policy examples and their documentation in the PDK Custom Policy GitHub Repository.

PDK offers the following example policies:

Set Up an Example Policy Project

To begin using an example policy project:

  1. Ensure you have installed all the PDK prerequisites.

  2. Clone the PDK Custom Policy GitHub Repository with the following command or your preferred GitHub interface:

    git clone https://github.com/mulesoft/pdk-custom-policy-examples.git
  3. Navigate to the newly cloned directory, then copy and paste the directory of your desired policy into a new location.

  4. In the cargo.toml file of the copied policy example, replace the group-id with your group ID, for example:

    group_id = "<your-group-id>"
  5. Run the make setup command.

    make setup
  6. Navigate to the README.md file in the example policy to read more about the policy and how to test it.