﻿---
title: stack kb elastic-agent-policies get-fleet-agent-policies-agentpolicyid-full cli command
description: Get a full agent policy Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4116/reference/elastic-cli/cli/stack/kb/elastic-agent-policies/get-fleet-agent-policies-agentpolicyid-full
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb elastic-agent-policies get-fleet-agent-policies-agentpolicyid-full cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb elastic-agent-policies get-fleet-agent-policies-agentpolicyid-full \
  --agent-policy-id <agent-policy-id> \
  [options]
```

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

## Options

<definitions>
  <definition term="--agent-policy-id string required">
    The ID of the agent policy
  </definition>
  <definition term="--download">
    If true, returns the policy as a downloadable file
  </definition>
  <definition term="--standalone">
    If true, returns the policy formatted for standalone agents
  </definition>
  <definition term="--kubernetes">
    If true, returns the policy formatted for Kubernetes deployment
  </definition>
  <definition term="--revision number">
    If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags.
  </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>