﻿---
title: stack kb fleet-package-policies put-fleet-package-policies-packagepolicyid cli command
description: Update a package policy Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4089/reference/elastic-cli/cli/stack/kb/fleet-package-policies/put-fleet-package-policies-packagepolicyid
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb fleet-package-policies put-fleet-package-policies-packagepolicyid cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb fleet-package-policies put-fleet-package-policies-packagepolicyid \
  --package-policy-id <package-policy-id> \
  [options]
```

Update a package policy
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--package-policy-id string required">
    The ID of the package policy
  </definition>
  <definition term="--format enum">
    Format for the response: simplified or legacy
    **Values:** simplified, legacy
  </definition>
  <definition term="--additional-datastreams-permissions string[]">
    Additional data stream permissions that will be added to the agent policy.
    **Repeatable:** pass `--additional-datastreams-permissions` multiple times to supply more than one value
  </definition>
  <definition term="--cloud-connector-id string">
    ID of the cloud connector associated with this package policy.
  </definition>
  <definition term="--cloud-connector-name string">
    Transient field for cloud connector name during creation.
  </definition>
  <definition term="--condition string">
    Agent condition expression to evaluate whether to apply this integration to its inputs.
  </definition>
  <definition term="--description string">
    Policy description.
  </definition>
  <definition term="--enabled">
  </definition>
  <definition term="--force">
    Force package policy creation even if the package is not verified, or if the agent policy is managed.
  </definition>
  <definition term="--global-data-tags string[]">
    **Repeatable:** pass `--global-data-tags` multiple times to supply more than one value
  </definition>
  <definition term="--inputs string">
    Package policy inputs. Refer to the integration documentation to know which inputs are available.
  </definition>
  <definition term="--is-managed">
  </definition>
  <definition term="--name string">
    Unique name for the policy.
  </definition>
  <definition term="--namespace string">
    Policy namespace. When not specified, it inherits the agent policy namespace.
  </definition>
  <definition term="--output-id string">
  </definition>
  <definition term="--overrides string">
    Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.
  </definition>
  <definition term="--package string">
  </definition>
  <definition term="--package-agent-version-condition string">
  </definition>
  <definition term="--policy-id string">
    Deprecated. Use policy_ids instead.
  </definition>
  <definition term="--policy-ids string[]">
    IDs of the agent policies that the package policy will be added to.
    **Repeatable:** pass `--policy-ids` multiple times to supply more than one value
  </definition>
  <definition term="--space-ids string[]">
    **Repeatable:** pass `--space-ids` multiple times to supply more than one value
  </definition>
  <definition term="--supports-agentless">
    Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet managed integrations API.
  </definition>
  <definition term="--supports-cloud-connector">
    Indicates whether the package policy supports cloud connectors.
  </definition>
  <definition term="--var-group-selections string">
    Variable group selections. Maps var_group name to the selected option name within that group.
  </definition>
  <definition term="--vars string">
    Input/stream level variable. Refer to the integration documentation for more information.
  </definition>
  <definition term="--version string">
  </definition>
  <definition term="--create-dataset-templates">
    When true, install dedicated index templates for streams with a custom data_stream.dataset. Defaults to true for input packages, false for integration packages.
  </definition>
  <definition term="--id string">
    Policy unique identifier.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>