---
updatedAt: 2026-07-30T15:31:16.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/powershell/llms.txt
---

# Manage policy rules

Manage, optimize, and modify your images and short-form videos. With this customization, you can deliver a smooth, efficient, and visually engaging customer experience.

When working with the Image and Video Manager API, your contract should include images or videos or both depending on the media type you want to work with. You also need to have `READ-WRITE` access to the Property Manager API.

## Create policy sets and policies

A policy set serves as a collection of policies with optimization and transformation configuration settings for your images and videos. You can create these policy set types:

* An image policy set contains only image policies.
* A video policy set contains only video policies.

### New policy set

When creating a new policy set with the `New-IVMPolicySet` command, define the following:

* Policy name.
* Region for which it applies.
* Policy type (image or video).
* Your contract ID.

You can tab through the `-Region` and `-Type` parameters to see the acceptable values; they're prepopulated in the function.

Optionally, you define your own default settings in a variable as a hashtable, `PSCustomObject`, or JSON string, and then pass the variable to the `-DefaultPolicy` parameter. If you don't pass it, the policy set will use the system default.

See the [New policy](#new-policy) section for the full list of image and video policy properties you can pass in the `-DefaultPolicy` parameter.

```powershell Command: Hashtable
$myDefaultPolicy = @{
  output = @{
    adaptiveQuality = 75
    perceptualQuality = "mediumHigh"
  }
  postBreakpointTransformations = @(
    @{
      color = "#ff6347"
      transformation = "BackgroundColor"
    }
  )
  breakpoints = @{
    widths = 320, 501, 1039, 2050, 5000
  }
  rolloutDuration = 5500
}

New-IVMPolicySet -Name 'my-policy-set' -Region 'US' -Type 'IMAGE' -DefaultPolicy $myDefaultPolicy -ContractID 'C-0N7RAC7'
```
```powershell Command: JSON string
$myDefaultPolicy = '{
  "output": {
    "adaptiveQuality": 75,
    "perceptualQuality": "mediumHigh"
  },
  "postBreakpointTransformations": [
    {
      "color": "#ff6347",
      "transformation": "BackgroundColor"
    }
  ],
  "breakpoints": {
    "widths": [
      320,
      501,
      1039,
      2050,
      5000
    ]
  },
  "rolloutDuration": 5500
}'

New-IVMPolicySet -Name 'my-policy-set' -Region 'US' -Type 'IMAGE' -DefaultPolicy $myDefaultPolicy -ContractID 'C-0N7RAC7'
```
```powershell Output
id           : ivm_12345
name         : my-policy-set
region       : US
type         : IMAGE
properties   : {}
user         : 1abcdefgh2ijklmn
lastModified : 2024-12-04 11:59:05+0000
```

Instead of specifying the `-Name`, `-Region`, `-Type`, and `-DefaultPolicy` parameters individually, you can also use the `-Body` parameter to specify them within an object or you can pipe the object to the command.

```powershell Command
$Body = @{
  name = "my-policy-set"
  region = "US"
  type = "IMAGE"
  defaultPolicy = $myDefaultPolicy
}

# Option 1: Pass the object in the `-Body` parameter
New-IVMPolicySet -Body $Body -ContractID 'C-0N7RAC7'

# Option 2: Pipe your object to the command
$Body | New-IVMPolicySet -ContractID 'C-0N7RAC7'
```

Each time you create a new policy set, the policy set is automatically activated on both staging and production networks and a default `.auto` policy with baseline settings is generated.

You can create as many policy sets and policies as you need on a single contract.

### New policy

When creating a new policy within your policy set, specify its settings in a variable as a hashtable, `PSCustomObject`, or JSON string and then pass the variable in the `-Body` parameter of the `New-IVMPolicy` command. Define also the policy ID and network on which you want to activate your policy.

<table>
    <thead>
        <tr>
            <th>Parameter</th>
            <th>Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Image policy</td>
        </tr>
        <tr>
            <td><code>breakpoints</code></td>
            <td>The list of breakpoint <code>widths</code> in pixels to use to create derivative images.</td>
        </tr>
        <tr>
            <td><code>hosts</code></td>
            <td>The hosts allowed for image URLs within transformations or variables.</td>
        </tr>
        <tr>
            <td><code>output</code></td>
            <td> The output quality and formats created for each resized image. If unspecified, image formats are created to support all browsers at the default quality level (<code>85</code>) including formats such as WEBP, JPEG2000, and JPEG-XR for specific browsers. Contains:
                <ul>
                    <li><code>adaptiveQuality</code>. The quality value applied to an image when Image and Video Manager detects a slow connection (RTT > 300 ms). This value (1-100) overrides the derivative quality value. Specifying a lower value can reduce load times for users with slow connections without impacting the quality of images for users with standard connections.</li>
                    <li><code>perceptualQuality</code>. The perceptual quality to use when comparing resulting images. Perceptual quality tunes each image format's quality parameter dynamically based on the human-perceived quality of the output image. The visual quality of derivative videos after they have been compressed to maximize byte savings. You can select one of these perceptual quality values:
                        <div class="Flex-two">
                            <div class="Flex-item-two">
                                <ul>
                                    <li class="inner-list-behavior"><code>high</code></li>
                                    <li class="inner-list-behavior"><code>mediumHigh</code></li>
                                    <li class="inner-list-behavior"><code>medium</code></li>
                                </ul>
                            </div>
                            <div class="Flex-item-two">
                                <ul>
                                    <li class="inner-list-behavior"><code>mediumLow</code></li>
                                    <li class="inner-list-behavior"><code>low</code></li>
                                </ul>
                            </div>
                        </div>
                        <code>high</code> results in the highest visual quality with the least byte savings, while <code>low</code> results in lower visual quality with the greatest byte savings. You can set either <code>perceptualQuality</code> or <code>quality</code>, but not both. If setting a variable for this argument, use <code>var</code> inside it instead of a direct value.
                    </li>
                    <li><code>perceptualQualityFloor</code>. Applies only when <code>perceptualQuality</code> is set. The minimum image quality to respect when perceptual quality is set. Image quality will not be reduced below this value even if it's determined that a further compressed image would be acceptably visually similar. Set a value between 1-100.</li>
                    <li><code>quality</code>. The specified quality of the output images expressed as a value from 1-100. You can set either <code>perceptualQuality</code> or <code>quality</code>, but not both. If neither is set, <code>quality</code> is the default. If setting a variable for this argument, use <code>var</code> inside it instead of a direct value.</li>
                </ul>
            </td>
        </tr>
        <tr>
            <td><code>postBreakpointTransformations</code></td>
            <td>The set of post-processing transformations applied to the image after image and quality settings have been applied. This is a subset of the complete list of transformations and includes:
            <div class="Flex-two">
                <div class="Flex-item-two">
                    <ul>
                        <li class="inner-list-behavior"><code>BackgroundColor</code></li>
                        <li class="inner-list-behavior"><code>Blur</code></li>
                        <li class="inner-list-behavior"><code>ChromaKey</code></li>
                        <li class="inner-list-behavior"><code>Composite</code></li>
                        <li class="inner-list-behavior"><code>Compound</code></li>
                        <li class="inner-list-behavior"><code>Contrast</code></li>
                        <li class="inner-list-behavior"><code>Goop</code></li>
                        <li class="inner-list-behavior"><code>Grayscale</code></li>
                        <li class="inner-list-behavior"><code>HSL</code></li>
                    </ul>
                </div>
                <div class="Flex-item-two">
                    <ul>
                        <li class="inner-list-behavior"><code>HSV</code></li>
                        <li class="inner-list-behavior"><code>IfDimension</code></li>
                        <li class="inner-list-behavior"><code>IfOrientation</code></li>
                        <li class="inner-list-behavior"><code>MaxColors</code></li>
                        <li class="inner-list-behavior"><code>Mirror</code></li>
                        <li class="inner-list-behavior"><code>MonoHue</code></li>
                        <li class="inner-list-behavior"><code>Opacity</code></li>
                        <li class="inner-list-behavior"><code>RemoveColor</code></li>
                        <li class="inner-list-behavior"><code>UnsharpMask</code></li>
                    </ul>
                </div>
            </div>
            For information about these transformations and their supporting arguments, see the <a href="doc:transform-images">Transform images</a> guide.</td>
        </tr>
        <tr>
            <td><code>rolloutDuration</code></td>
            <td>The amount of time in seconds that it takes for the policy to roll out. During the rollout, the proportion of images with the new policy applied continually increases until cached videos associated with the previous version of the policy are no longer being served. The default is <code>3600</code> seconds.</td>
        </tr>
        <tr>
            <td><code>transformations</code></td>
            <td> The set of image transformations applied to the original image. If unspecified, no operations are performed. For information about available transformations and their supporting arguments, see the <a href="doc:transform-images">Transform images</a> guide.</td>
        </tr>
        <tr>
            <td><code>variables</code></td>
            <td>The variables available for the policy. Any variable declared here can be invoked in transformations. You can also pass in these variable names and values dynamically as query parameters in the image's request URL. See <a href="doc:transform-images#use-variables">Variables</a> for more information.
                <ul>
                    <li><code>name</code>. Required. The name of the variable. It's also available as the query parameter name to set the variable's value dynamically. Can be up to 50 alphanumeric characters.</li>
                    <li><code>type</code>. Required. The type of value for the variable. Value is one of:
                        <div class="Flex-two">
                            <div class="Flex-item-two">
                                <ul>
                                    <li class="inner-list-behavior"><code>bool</code></li>
                                    <li class="inner-list-behavior"><code>number</code></li>
                                    <li class="inner-list-behavior"><code>url</code></li>
                                    <li class="inner-list-behavior"><code>color</code></li>
                                    <li class="inner-list-behavior"><code>gravity</code></li>
                                    <li class="inner-list-behavior"><code>placement</code></li>
                                    <li class="inner-list-behavior"><code>scaleDimension</code></li>
                                </ul>
                            </div>
                            <div class="Flex-item-two">
                                <ul>
                                    <li class="inner-list-behavior"><code>grayscaleType</code></li>
                                    <li class="inner-list-behavior"><code>aspect</code></li>
                                    <li class="inner-list-behavior"><code>resizeType</code></li>
                                    <li class="inner-list-behavior"><code>dimension</code></li>
                                    <li class="inner-list-behavior"><code>perceptualQuality</code></li>
                                    <li class="inner-list-behavior"><code>string</code></li>
                                    <li class="inner-list-behavior"><code>focus</code></li>
                                </ul>
                            </div>
                      </div>
                    </li>
                    <li><code>defaultValue</code>. Required. The default value of the variable if no query parameter is provided. It needs to be one of the <code>enumOptions</code> if any are provided.</li>
                    <li><code>enumOptions</code>. Limits the set of possible values for a variable. Contains:
                        <ul>
                            <li><code>id</code>. Required. The ID for each enum value. Can be up to 50 alphanumeric characters.</li>
                            <li><code>value</code>. Required. The value of the variable when the <code>id</code> is provided.</li>
                        </ul>
                    </li>
                    <li><code>postfix</code>. A postfix added to the value provided for the variable or to the default value.</li>
                    <li><code>prefix</code>. A prefix added to the value provided for the variable or to the default value.</li>
                </ul></td>
        </tr>
        <tr>
            <td>Video policy</td>
        </tr>
        <tr>
            <td><code>breakpoints</code></td>
            <td>The list of breakpoint <code>widths</code> in pixels used to create derivative videos.</td>
        </tr>
        <tr>
            <td><code>hosts</code></td>
            <td>The hosts allowed for video URLs within variables.</td>
        </tr>
        <tr>
            <td><code>output</code></td>
            <td>The output quality of each resized video. Contains:
                <ul>
                    <li><code>perceptualQuality</code>. The visual quality of derivative videos after they have been compressed to maximize byte savings. You can select one of these perceptual quality values:
                        <div class="Flex-two">
                            <div class="Flex-item-two">
                                <ul>
                                    <li class="inner-list-behavior"><code>high</code></li>
                                    <li class="inner-list-behavior"><code>mediumHigh</code></li>
                                    <li class="inner-list-behavior"><code>medium</code></li>
                                </ul>
                            </div>
                            <div class="Flex-item-two">
                                <ul>
                                    <li class="inner-list-behavior"><code>mediumLow</code></li>
                                    <li class="inner-list-behavior"><code>low</code></li>
                                </ul>
                            </div>
                        </div>
                        <code>high</code> results in the highest visual quality with the least byte savings, while <code>low</code> results in lower visual quality with the greatest byte savings. If setting a variable for this argument, use <code>var</code> inside it instead of a direct value.
                    </li>
                    <li><code>placeholderVideoUrl</code>. The URL for a specific placeholder video that appears when you first request a video, and Image and Video Manager is still processing the derivative video. If no placeholder video is specified, the original video plays while the derivative video is processed. If setting a variable for this argument, use <code>var</code> inside it instead of a direct value.</li>
                    <li><code>videoAdaptiveQuality</code>. The quality value applied to a video when Image and Video Manager detects a slow connection (RTT > 300 ms). This value overrides the derivative quality value. Specifying a lower value can reduce load times for users with slow connections without impacting the quality of videos for users with standard connections. If setting a variable for this argument, use <code>var</code> inside it instead of a direct value.</li>
                </ul>
            </td>
        </tr>
        <tr>
            <td><code>rolloutDuration</code></td>
            <td>The amount of time in seconds that it takes for the policy to roll out. During the rollout, the proportion of videos with the new policy applied continually increases until cached videos associated with the previous version of the policy are no longer being served.</td>
        </tr>
        <tr>
            <td><code>variables</code></td>
            <td>The variables available for the policy. Any variable declared here can be invoked in transformations. You can also pass in these variable names and values dynamically as query parameters in the image's request URL. See <a href="doc:transform-images#use-variables">Variables</a> for more information.
                <ul>
                    <li><code>name</code>. Required. The name of the variable. It's also available as the query parameter name to set the variable's value dynamically. Can be up to 50 alphanumeric characters.</li>
                    <li><code>type</code>. Required. The type of value for the variable. Value is one of:
                        <div class="Flex-two">
                            <div class="Flex-item-two">
                                <ul>
                                    <li class="inner-list-behavior"><code>bool</code></li>
                                    <li class="inner-list-behavior"><code>number</code></li>
                                    <li class="inner-list-behavior"><code>url</code></li>
                                    <li class="inner-list-behavior"><code>color</code></li>
                                    <li class="inner-list-behavior"><code>gravity</code></li>
                                    <li class="inner-list-behavior"><code>placement</code></li>
                                    <li class="inner-list-behavior"><code>scaleDimension</code></li>
                                </ul>
                            </div>
                            <div class="Flex-item-two">
                                <ul>
                                    <li class="inner-list-behavior"><code>grayscaleType</code></li>
                                    <li class="inner-list-behavior"><code>aspect</code></li>
                                    <li class="inner-list-behavior"><code>resizeType</code></li>
                                    <li class="inner-list-behavior"><code>dimension</code></li>
                                    <li class="inner-list-behavior"><code>perceptualQuality</code></li>
                                    <li class="inner-list-behavior"><code>string</code></li>
                                    <li class="inner-list-behavior"><code>focus</code></li>
                                </ul>
                            </div>
                      </div>
                    </li>
                    <li><code>defaultValue</code>. Required. The default value of the variable if no query parameter is provided. It needs to be one of the <code>enumOptions</code> if any are provided.</li>
                    <li><code>enumOptions</code>. Limits the set of possible values for a variable. Contains:
                        <ul>
                            <li><code>id</code>. Required. The ID for each enum value. Can be up to 50 alphanumeric characters.</li>
                            <li><code>value</code>. Required. The value of the variable when the <code>id</code> is provided.</li>
                        </ul>
                    </li>
                    <li><code>postfix</code>. A postfix added to the value provided for the variable or to the default value.</li>
                    <li><code>prefix</code>. A prefix added to the value provided for the variable or to the default value.</li>
                </ul>
            </td>
        </tr>
    </tbody>
</table>

```powershell Command: Hashtable
$myNewPolicy = @{
  output = @{
    adaptiveQuality = 75
    quality = 86
  }
  postBreakpointTransformations = @(
    @{
      color = "#000000"
      transformation = "BackgroundColor"
    },
    @{
      sigma = 5
      transformation = "Blur"
    }
  )
  breakpoints = @{
    widths = 501, 1050, 5000
  }
  rolloutDuration = 5500
}

New-IVMPolicy -PolicySetID 'ivm_12345' -PolicyID '1234' -Network 'Staging' -Body $myNewPolicy -ContractID 'C-0N7RAC7'
```
```powershell Command: JSON string
$myNewPolicy = '{
  "output": {
    "adaptiveQuality": 75,
    "quality": 86
  },
  "postBreakpointTransformations": [
    {
      "color": "#000000",
      "transformation": "BackgroundColor"
    },
    {
      "transformation": "Blur",
      "sigma": 5
    }
  ],
  "breakpoints": {
    "widths": [
      501,
      1050,
      5000
    ]
  },
  "rolloutDuration": 5500
}'

New-IVMPolicy -PolicySetID 'ivm_12345' -PolicyID '1234' -Network 'Staging' -Body $myNewPolicy -ContractID 'C-0N7RAC7'
```
```powershell Output
operationPerformed description          id
------------------ -----------          --
CREATED            Policy 1234 created. 1234
```

You can also define your custom policy settings in a JSON file, load the file into a variable, convert it into a PowerShell object, and pipe it to the command.

```powershell
$myCustomPolicy = Get-Content ./myCustomPolicy.json | ConvertFrom-Json -Depth 100

$myCustomPolicy | New-IVMPolicy -PolicySetID 'ivm_12345' -PolicyID '1234' -Network 'Staging' -ContractID 'C-0N7RAC7'
```

## Update your policy set

For an existing policy set, you can only update its name and region. Altering the value of the `-Region` parameter on an existing policy set voids previously cached images and videos and requires their transformation again.

1. If you don't know your policy set ID, use the `Get-IVMPolicySet` command to return a list of policy sets available to you. For a specific policy set, also pass the `-PolicySetID` parameter in the command.

   ```powershell Command
    # Get all
    Get-IVMPolicySet

    # Get one
    Get-IVMPolicySet -PolicySetID 'ivm_12345'
   ```
   ```powershell Output: All
   id           : ivm_12345
   name         : my-policy-set-1
   region       : EMEA
   type         : IMAGE
   properties   : {my.property1.com}
   user         : jsmith
   lastModified : 2024-12-04 11:59:05+0000

   id           : ivm_98765
   name         : my-policy-set-2
   region       : US
   type         : IMAGE
   properties   : {my.property2.com}
   user         : josmith
   lastModified : 2024-06-02 14:06:53+0000
   ```
   ```powershell Output: One
   id           : ivm_12345
   name         : my-policy-set-1
   region       : EMEA
   type         : IMAGE
   properties   : {my.property1.com}
   user         : jsmith
   lastModified : 2024-12-04 11:59:05+0000
   ```

2. Once you have the policy set you need, make appropriate changes to the policy set using the `Set-IVMPolicySet` command.

   ```powershell Command
   Set-IVMPolicySet -PolicySetID 'ivm_12345' -Name 'my-updated-policy-set' -Region 'ASIA'
   ```
   ```powershell Output
    id           : ivm_12345
    name         : my-updated-policy-set
    region       : ASIA
    type         : IMAGE
    properties   : {}
    user         : jsmith
    lastModified : 2024-12-05 16:43:54+0000
   ```

## Update your policy

To update an existing policy with your policy set, set the policy settings you want to change to a variable and make your changes.

1. If you don't know your policy ID, use the `Get-IVMPolicy` command to return a list of policies within a given policy set. In this command, specify the policy set ID you want to retrieve all policies for, the contract ID, and the network type. For a specific policy, also pass a policy ID in the command.

   ```powershell Command
    # Get all
    Get-IVMPolicy -PolicySetID 'ivm_12345' -Network 'Staging' -ContractID 'C-0N7RAC7'

    # Get one
    Get-IVMPolicy -PolicySetID 'ivm_12345' -PolicyID '.auto' -Network 'Staging' -ContractID 'C-0N7RAC7'
   ```
   ```powershell Output: All
   id              : .auto
   version         : 1
   previousVersion : 0
   rolloutInfo     : @{startTime=1654179539; endTime=1654179540; rolloutDuration=1; serveStaleEndTime=1654179539}
   video           : False
   user            : jsmith
   dateCreated     : 2022-06-02 14:18:58+0000

   id              : 1234
   version         : 1
   previousVersion : 0
   rolloutInfo     : @{startTime=1654187793; endTime=1654187794; rolloutDuration=1; serveStaleEndTime=1654187793}
   output          : @{quality=85; allowedFormats=System.Object[]}
   video           : False
   user            : jsmith
   dateCreated     : 2022-06-02 16:36:32+0000
   ```
   ```powershell Output: One
   id              : .auto
   version         : 1
   previousVersion : 0
   rolloutInfo     : @{startTime=1654179539; endTime=1654179540; rolloutDuration=1; serveStaleEndTime=1654179539}
   video           : False
   user            : jsmith
   dateCreated     : 2022-06-02 14:18:58+0000
   ```

2. To update a specific policy, get a specific record, save its output locally, and edit it according to your needs.

   ```powershell Command
   Get-IVMPolicy -PolicySetID 'ivm_12345' -PolicyID '.auto' -Network 'Staging' -ContractID 'C-0N7RAC7' | ConvertTo-Json -Depth 100 | Out-File -FilePath ./myPolicy.json
   ```
   ```json
   {
     "id": ".auto",
     "version": 1,
     "previousVersion": 0,
     "rolloutInfo": {
       "startTime": 1740163087,
       "endTime": 1740163088,
       "rolloutDuration": 1,
       "serveStaleEndTime": 1740163087
     },
     "breakpoints": {
       "widths": [
         300,
         451,
         2039,
         5000
       ]
     },
     "output": {
       "quality": 94,
       "adaptiveQuality": 70
     },
     "transformations": [
       {
         "transformation": "Contrast",
         "brightness": 0.5,
         "contrast": 0.2
       },
       {
         "gravity": "SouthWest",
         "image": {
           "url": "www.example.com/image.png"
         },
         "transformation": "Composite",
         "xPosition": 0,
         "yPosition": 0
       }
     ],
     "postBreakpointTransformations": [
       {
         "color": "#ffffff",
         "transformation": "BackgroundColor"
       },
       {
         "transformation": "Blur",
         "sigma": 5
       }
     ],
     "video": false,
     "user": "1abcdefghi2jklmn",
     "dateCreated": "2025-02-20 14:38:06+0000"
   }
   ```

   Then convert it back to a PowerShell object and pipe it to the `Set-IVMPolicy` command along with the required ID and network type.

   ```powershell Command
   $myPolicy = Get-Content ./myPolicy.json | ConvertFrom-Json -Depth 100

   $myPolicy | Set-IVMPolicy -PolicySetID 'ivm_12345' -PolicyID '.auto' -Network 'Staging' -ContractID 'C-0N7RAC7'
   ```
   ```powershell Output
   operationPerformed description           id
   ------------------ -----------           --
   UPDATED            Policy .auto updated. .auto
   ```

   Alternatively, you can save the result of the `Get-IVMPolicy` command in a variable and update specific attributes of your policy, then pipe the whole object back to the `Set-IVMPolicy` command to make your changes effective.

   ```powershell Command
   $myPolicy = Get-IVMPolicy -PolicySetID 'ivm_12345' -PolicyID '.auto' -Network 'Staging' -ContractID 'C-0N7RAC7'

   $myPolicy.breakpoints.widths = @(200, 100, 500, 3000)
   $myPolicy.output.quality = 98
   $myPolicy.postBreakpointTransformations[0].color = '#d9a61a'
   $myPolicy.transformations[1].gravity = 'Center'

   $myPolicy | Set-IVMPolicy -PolicySetID 'ivm_12345' -PolicyID '.auto' -Network 'Staging' -ContractID 'C-0N7RAC7'
   ```

## Update your property rule tree

You need to add one or more imaging policy behaviors to the JSON rule tree file for each property you're adding image policies to.

1. Get your property's rule tree as a JSON file. The output is a JSON file at your current location containing your rule's configurations.

   ```powershell Command
   Get-PropertyRules -PropertyName 'my-property' -PropertyVersion 'latest' -OutputToFile
   ```

2. Depending on the policy set type you're adding, add appropriate behaviors to your property rules' `main.json`. When adding these behaviors, make sure to use the correct policy set ID.

   * [imageManager](https://techdocs.akamai.com/property-mgr/reference/ga-image-manager)
   * [imageManagerVideo](https://techdocs.akamai.com/property-mgr/reference/ga-image-manager-video)

   ```json imageManager
   {
     "name": "Image and Video Manager (Images)",
     "children": [],
     "behaviors": [
       {
         "name": "caching",
         "options": {
           "behavior": "MAX_AGE",
           "mustRevalidate": false,
           "ttl": "30d"
         }
       },
       {
         "name": "imageManager",
         "options": {
           "apiReferenceTitle": "",
           "applyBestFileType": true,
           "enabled": true,
           "resize": false,
           "settingsTitle": "",
           "useExistingPolicySet": true,
           "trafficTitle": "",
           "cpCodeOriginal": {
             "id": 12345
           },
           "cpCodeTransformed": {
             "id": 98765
           },
           "policySet": "ivm_12345"
         }
       }
     ],
     "criteria": [
       {
         "name": "fileExtension",
         "options": {
           "matchCaseSensitive": false,
           "matchOperator": "IS_ONE_OF",
           "values": [
             "jpg",
             "gif",
             "jpeg",
             "png",
             "imviewer"
           ]
         }
       }
     ],
     "criteriaMustSatisfy": "all",
     "comments": ""
   }
   ```
   ```json imageManagerVideo
   {
     "name": "Image and Video Manager (Videos)",
     "children": [],
     "behaviors": [
       {
         "name": "caching",
         "options": {
           "behavior": "MAX_AGE",
           "mustRevalidate": false,
           "ttl": "30d"
         }
       },
       {
         "name": "imageManagerVideo",
         "options": {
           "apiReferenceTitle": "",
           "applyBestFileType": true,
           "enabled": true,
           "resize": false,
           "settingsTitle": "",
           "useExistingPolicySet": false,
           "trafficTitle": "",
           "cpCodeOriginal": {
             "id": 12345
           },
           "cpCodeTransformed": {
             "id": 98765
           },
           "superCacheRegion": "US",
           "advanced": false,
           "policyTokenDefault": "my-default-policy"
         }
       }
     ],
     "criteria": [
       {
         "name": "fileExtension",
         "options": {
           "matchCaseSensitive": false,
           "matchOperator": "IS_ONE_OF",
           "values": [
             "mp4"
           ]
         }
       }
     ],
     "criteriaMustSatisfy": "all",
     "comments": ""
   }
   ```

   Additional considerations:

   * To apply these behaviors, you also need to add the [fileExtension](https://techdocs.akamai.com/property-mgr/reference/ga-file-extension) match criteria and the [caching](https://techdocs.akamai.com/property-mgr/reference/ga-caching) behavior.
   * The `imageManager` behavior includes its own CP code settings. Make sure not to include it in the same rule with the [cpCode](https://techdocs.akamai.com/property-mgr/reference/ga-cp-code) behavior.
   * Place your `imageManager` or `imageManagerVideo` behavior at the end of your property rules to ensure it works correctly.

3. Update your property's rules, pointing to the appropriate file.

   <blockquote style="border-left-style: solid; border-left-color: #d9534f; border-width: 0.25em; padding: 1.33rem; background-color: #fdf7f7;"><div style="overflow:auto;"><div>Send your <em><strong>entire</strong></em> rule tree back. Rules not returned are removed from your property.</div></blockquote>

   ```powershell Command
   Set-PropertyRules -PropertyName 'my-property' -PropertyVersion latest -InputFile './main.json' -VersionNotes 'Adding a video policy'
   ```

   The output returns your rule tree along with any errors or warnings on upload.

## Activate your property

To activate the property containing your newly added imaging or video policies, provide a value for the network, staging or production, and activate your property.

```powershell Command
New-PropertyActivation -PropertyName 'my-property' -PropertyVersion 'latest' -Network 'Staging' -NotifyEmails 'jsmith@email.com'
```
```powershell Output
activationLink                                                                                      activationId
--------------                                                                                      ------------
/papi/v1/properties/prp_12345/activations/atv_67890?contractId=ctr_C-0N7RAC7&groupId=grp_12345      atv_67890
```

## Delete policy sets and policies

To delete a policy set and its related policies from both staging and production networks, pass the policy set and contract IDs in the `Remove-IVMPolicySet` command.

```powershell Command
Remove-IVMPolicySet -PolicySetID 'ivm_12345' -ContractID 'C-0N7RAC7'
```

To delete a policy from a policy set, pass the policy, policy set, and contract IDs in the `Remove-IVMPolicy` command. Also, include the network type from which you want to remove the policy.

You can't delete a default `.auto` policy with this command. You can delete it only when you remove the whole policy set.

```powershell Command
Remove-IVMPolicy -PolicySetID 'ivm_12345' -PolicyID '1234' -Network 'Staging' -ContractID 'C-0N7RAC7'
```

# Sibling pages

* [Transform images](https://techdocs.akamai.com/powershell/docs/transform-images.md)
* [Function index](https://techdocs.akamai.com/powershell/docs/ivm-index.md)
* [Get](https://techdocs.akamai.com/powershell/docs/get.md)
* [New](https://techdocs.akamai.com/powershell/docs/ivm-new.md)
* [Restore](https://techdocs.akamai.com/powershell/docs/ivm-restore.md)
* [Remove](https://techdocs.akamai.com/powershell/docs/ivm-remove.md)
* [Set](https://techdocs.akamai.com/powershell/docs/ivm-set.md)