> ## Documentation Index
> Fetch the complete documentation index at: https://docs.controlplane.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ipset

> cpln ipset — Reserve and manage static public IP addresses for workloads and GVC load balancers.

Manage IP Sets

```none theme={null}
cpln ipset [SUBCOMMAND]
```

```text theme={null}
Commands:
  cpln ipset access-report <ref>    Show the access report for the referenced ip set
  cpln ipset add-location <ref>     Add one or more locations to the referenced IP set
  cpln ipset audit [ref]            Retrieve audit trail events for the referenced ip set
  cpln ipset clone <ref>            Create a clone of the referenced ip set; this will only duplicate its spec.  [aliases: copy]
  cpln ipset create                 Create a new ip set
  cpln ipset delete <ref...>        Delete one or more referenced ip sets
  cpln ipset edit <ref>             Edit the referenced ip set, as YAML, within an editor
  cpln ipset eventlog <ref>         Show the event log of the referenced ip set  [aliases: log]
  cpln ipset get [ref...]           Retrieve one or more referenced ip set
  cpln ipset patch <ref>            Update the referenced ip set's metadata using an input file
  cpln ipset permissions            Show the grantable permissions for an ip set object type
  cpln ipset query                  Find all the ip sets based on the given query
  cpln ipset remove-location <ref>  Remove one or more locations from the referenced IP set
  cpln ipset tag <ref...>           Manage the tags belonging to one or more referenced ip sets
  cpln ipset update <ref>           Update properties of the referenced ip set
  cpln ipset update-location <ref>  Update one or more locations from the referenced IP set

Options:
  --help  Show help  [boolean]
```

***

#### ipset access-report

Show the access report for the referenced ip set

**Usage**

```none theme={null}
cpln ipset access-report <ref> [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.  [required]

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset access-report demo-ipset --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------+--------------------------------------------------------+--------+
    |PERMISSION |PRINCIPAL                                               |GRANTED |
    |-----------|--------------------------------------------------------|--------|
    |create     |/org/demo-cpln-organization/group/superusers            |manage  |
    |create     |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
    |delete     |/org/demo-cpln-organization/group/superusers            |manage  |
    |delete     |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
    |edit       |/org/demo-cpln-organization/group/superusers            |manage  |
    |edit       |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
    |manage     |/org/demo-cpln-organization/group/superusers            |manage  |
    |manage     |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
    |view       |/org/demo-cpln-organization/group/viewers               |view    |
    |view       |/org/demo-cpln-organization/group/superusers            |manage  |
    |view       |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
    +-----------+--------------------------------------------------------+--------+
    ```
  </CodeGroup>
</Accordion>

***

#### ipset add-location

Add one or more locations to the referenced IP set

**Usage**

```none theme={null}
cpln ipset add-location <ref> [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.  [required]

  Command options:
    --location  Add a location with an optional retention policy (`keep` or `free`), e.g., aws-eu-central-1,keep.  [required]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    {COMMAND}
    ```

    ```text Output theme={null}
    {CODE}
    ```
  </CodeGroup>
</Accordion>

***

#### ipset audit

Retrieve audit trail events for the referenced ip set

**Usage**

```none theme={null}
cpln ipset audit [ref] [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.

  Command options:
    --subject  Filter by subject (serviceaccount name or user email)  [string]
    --context  Audit context name (the 'cpln' context displays Control Plane actions)  [string] [default: "cpln"]
    --since    Relative lookback window from now (e.g., 1h, 24h, 7d). Mutually exclusive with --from/--to  [string] [default: "7d"]
    --from     Start time for audit events (ISO 8601 format or relative duration, e.g., 2025-10-23T07:00:00Z, 7d, 1h). Cannot be used with --since  [string]
    --to       End time for audit events (ISO 8601 format or relative duration, e.g., 2025-10-23T07:00:00Z, 1d, 30m)  [string]

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

***

#### ipset clone

Create a clone of the referenced ip set; this will only duplicate its spec.

**Usage**

```none theme={null}
cpln ipset clone <ref> --name CLONE_NAME [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.  [required]

  Command options:
    --name         Set the name for the clone  [required]
    --description  Optional description, defaults to the name if not set
    --tag          Attach tags (e.g., --tag drink=water)

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset clone demo-ipset --name demo-ipset-clone --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------------+--------------------+-----+----------+--------------+
    |NAME             |DESCRIPTION         |LINK |LOCATIONS |TAGS          |
    |-----------------|--------------------|-----|----------|--------------|
    |demo-ipset-clone |Clone of demo-ipset |     |          |drink="water" |
    +-----------------+--------------------+-----+----------+--------------+
    ```
  </CodeGroup>
</Accordion>

***

#### ipset create

Create a new ip set

**Usage**

```none theme={null}
cpln ipset create --name NAME [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Command options:
    --name                 Name of the new volume set  [required]
    --description, --desc  Optional description, defaults to the name if not set
    --link                 A link to a workload
    --location             Specifies a location and optional retention policy (keep or free), e.g., aws-eu-central-1,keep
    --tag                  Attach tags (e.g., --tag drink=water)

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset create --name demo-ipset --desc demo-ipset --tag drink=water --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------+------------+-----+----------+--------------+
    |NAME       |DESCRIPTION |LINK |LOCATIONS |TAGS          |
    |-----------|------------|-----|----------|--------------|
    |demo-ipset |demo-ipset  |     |          |drink="water" |
    +-----------+------------+-----+----------+--------------+
    ```
  </CodeGroup>
</Accordion>

***

#### ipset delete

Delete one or more referenced ip sets

**Usage**

```none theme={null}
cpln ipset delete <ref...> [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  One or more resource references. Usually it is the name of the resource.  [array] [required] [default: []]

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset delete demo-ipset --org demo-cpln-organization
    ```

    ```text Output theme={null}
    If the delete was successful, a new command prompt will be shown.
    ```
  </CodeGroup>
</Accordion>

***

#### ipset edit

Edit the referenced ip set, as YAML, within an editor

**Usage**

```none theme={null}
cpln ipset edit <ref> [OPTIONS]
```

<Note>
  The default editor can be set by using the EDITOR environment variable.
</Note>

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.  [required]

  Command options:
    --replace, -r  Replace instead of patch/merge  [boolean] [default: false]

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset edit demo-ipset --org demo-cpln-organization
    ```

    ```text Output theme={null}
    Your default editor will be launched.

    Once any modifications are saved, the updates will be sent to the API.
    ```
  </CodeGroup>
</Accordion>

***

#### ipset eventlog

Show the event log of the referenced ip set

**Usage**

```none theme={null}
cpln ipset eventlog <ref> [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.  [required]

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset eventlog demo-ipset --org demo-cpln-organization
    ```

    ```text Output theme={null}
    The event log for the referenced ipset will be shown.
    ```
  </CodeGroup>
</Accordion>

***

#### ipset get

Retrieve one or more referenced ip set

**Usage**

```none theme={null}
cpln ipset get [ref...] [OPTIONS]
```

<Note>
  An empty reference will return all references
</Note>

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  One or more resource references. Usually it is the name of the resource.  [array] [default: []]

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  * Get all ipsets

  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset get --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------------+-----------------+-----+----------+--------------+
    |NAME             |DESCRIPTION      |LINK |LOCATIONS |TAGS          |
    |-----------------|-----------------|-----|----------|--------------|
    |demo-ipset       |demo-ipset       |     |          |drink="water" |
    |demo-ipset-get-1 |demo-ipset-get-1 |     |          |              |
    |demo-ipset-get-2 |demo-ipset-get-2 |     |          |              |
    +-----------------+-----------------+-----+----------+--------------+
    ```
  </CodeGroup>

  * Get one ipset

  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset get demo-ipset-get-1 --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------------+-----------------+-----+----------+-----+
    |NAME             |DESCRIPTION      |LINK |LOCATIONS |TAGS |
    |-----------------|-----------------|-----|----------|-----|
    |demo-ipset-get-1 |demo-ipset-get-1 |     |          |     |
    +-----------------+-----------------+-----+----------+-----+
    ```
  </CodeGroup>

  * Get multiple ipsets

  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset get demo-ipset-get-1 demo-ipset-get-2 --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------------+-----------------+-----+----------+-----+
    |NAME             |DESCRIPTION      |LINK |LOCATIONS |TAGS |
    |-----------------|-----------------|-----|----------|-----|
    |demo-ipset-get-1 |demo-ipset-get-1 |     |          |     |
    |demo-ipset-get-2 |demo-ipset-get-2 |     |          |     |
    +-----------------+-----------------+-----+----------+-----+
    ```
  </CodeGroup>
</Accordion>

***

#### ipset patch

Update the referenced ip set's metadata using an input file

**Usage**

```none theme={null}
cpln ipset patch <ref> --file FILE_NAME [OPTIONS]
```

<Note>
  Running this command with the option **`--file -`** sets the input to stdin. The input is required to be a valid JSON or YAML string (e.g., `{"description": "My new description"}` or `description: My new description`). To complete the update, press Control-D (or Control-Z if you are using Windows).
</Note>

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.  [required]

  Command options:
    --file, -f  File to load the patch from. Use `--file -` to enable input from stdin.  [required]

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset patch demo-ipset --file update.json --org demo-cpln-organization
    ```

    ```text Output theme={null}
    The changes within the JSON file will be performed against the referenced ipset.
    ```
  </CodeGroup>
</Accordion>

***

#### ipset permissions

Show the grantable permissions for an ip set object type

**Usage**

```none theme={null}
cpln ipset permissions [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset permissions --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-------+--------------------------+-----------------------------------+
    |NAME   |DESCRIPTION               |IMPLIES                            |
    |-------|--------------------------|-----------------------------------|
    |create |Create new ip sets        |                                   |
    |delete |Delete ip sets            |                                   |
    |edit   |Modify existing resources |view                               |
    |manage |Full access               |create, delete, edit, manage, view |
    |view   |Read-only access          |                                   |
    +-------+--------------------------+-----------------------------------+
    ```
  </CodeGroup>
</Accordion>

***

#### ipset query

Find all the ip sets based on the given query

**Usage**

```none theme={null}
cpln ipset query QUERY_OPTIONS [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Query options:
    --match             Query filter type  [choices: "all", "none", "any"] [default: "all"]
    --property, --prop  Property to query
    --tag               Tag to query
    --rel               Relation to query

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <Note>
    Use the `--match` option to display **all**, **none**, or **any** of the results based on a given property or tag
  </Note>

  * Search for an ipset based on the name property

  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset query --match any --prop name=demo-ipset --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------+------------+-----+----------+--------------+
    |NAME       |DESCRIPTION |LINK |LOCATIONS |TAGS          |
    |-----------|------------|-----|----------|--------------|
    |demo-ipset |demo-ipset  |     |          |drink="water" |
    +-----------+------------+-----+----------+--------------+
    ```
  </CodeGroup>

  * Search for an ipset based on the description property

  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset query --match any --prop description="demo-ipset" --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------+------------+-----+----------+--------------+
    |NAME       |DESCRIPTION |LINK |LOCATIONS |TAGS          |
    |-----------|------------|-----|----------|--------------|
    |demo-ipset |demo-ipset  |     |          |drink="water" |
    +-----------+------------+-----+----------+--------------+
    ```
  </CodeGroup>

  * Search for an ipset based on a tag

  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset query --match any --tag drink=water --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------+------------+-----+----------+--------------+
    |NAME       |DESCRIPTION |LINK |LOCATIONS |TAGS          |
    |-----------|------------|-----|----------|--------------|
    |demo-ipset |demo-ipset  |     |          |drink="water" |
    +-----------+------------+-----+----------+--------------+
    ```
  </CodeGroup>

  * Search for an ipset based on a property and tag

  <CodeGroup>
    ```bash Command theme={null}
    cpln ipset query --match any --prop description="demo-ipset" --tag drink=water --org demo-cpln-organization
    ```

    ```text Output theme={null}
    +-----------+------------+-----+----------+--------------+
    |NAME       |DESCRIPTION |LINK |LOCATIONS |TAGS          |
    |-----------|------------|-----|----------|--------------|
    |demo-ipset |demo-ipset  |     |          |drink="water" |
    +-----------+------------+-----+----------+--------------+
    ```
  </CodeGroup>
</Accordion>

***

#### ipset remove-location

Remove one or more locations from the referenced IP set

**Usage**

```none theme={null}
cpln ipset remove-location <ref> [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.  [required]

  Command options:
    --location  Remove a location by name, e.g., aws-eu-central-1.  [required]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  <CodeGroup>
    ```bash Command theme={null}
    {COMMAND}
    ```

    ```text Output theme={null}
    {CODE}
    ```
  </CodeGroup>
</Accordion>

***

#### ipset tag

Manage the tags belonging to one or more referenced ip sets

**Usage**

```none theme={null}
cpln ipset tag <ref...> --tag KEY=VALUE [OPTIONS]
```

<Note>
  Built-in tags, which begin with cpln/\*, can't be modified.
</Note>

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  One or more resource references. Usually it is the name of the resource.  [array] [required] [default: []]

  Command options:
    --tag         Attach tags (e.g., --tag drink=water)
    --remove-tag  Remove tags (e.g., --remove-tag tagname)

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  * Add a tag to an IP Set

  <CodeGroup>
    ```bash Command theme={null}
    {ADD_TAG_COMMAND}
    ```

    ```text Output theme={null}
    {ADD_TAG_CODE}
    ```
  </CodeGroup>

  * Update same tag (after running the example above)

  <CodeGroup>
    ```bash Command theme={null}
    {UPDATE_TAG_COMMAND}
    ```

    ```text Output theme={null}
    {UPDATE_TAG_CODE}
    ```
  </CodeGroup>

  * Remove tag (after running the example above)

  <CodeGroup>
    ```bash Command theme={null}
    {REMOVE_TAG_COMMAND}
    ```

    ```text Output theme={null}
    {REMOVE_TAG_CODE}
    ```
  </CodeGroup>

  * Add same tag to multiple IP Sets

  <CodeGroup>
    ```bash Command theme={null}
    {ADD_TAG_MULTIPLE_COMMAND}
    ```

    ```text Output theme={null}
    {ADD_TAG_MULTIPLE_CODE}
    ```
  </CodeGroup>

  * Update same tag on multiple IP Sets (after running the example above)

  <CodeGroup>
    ```bash Command theme={null}
    {UPDATE_TAG_MULTIPLE_COMMAND}
    ```

    ```text Output theme={null}
    {UPDATE_TAG_MULTIPLE_CODE}
    ```
  </CodeGroup>

  * Remove same tag from multiple IP Sets (after running the example above)

  <CodeGroup>
    ```bash Command theme={null}
    {REMOVE_TAG_MULTIPLE_COMMAND}
    ```

    ```text Output theme={null}
    {REMOVE_TAG_MULTIPLE_CODE}
    ```
  </CodeGroup>
</Accordion>

***

#### ipset update

Update properties of the referenced ip set

**Usage**

```none theme={null}
cpln ipset update <ref> --set UPDATE_PROPERTY [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.  [required]

  Update Properties:
    --set    Update the following properties (e.g., --set description="Updated Description"):

             description    string
             tags.<key>     string
             spec.link      string
    --unset  Unset a property (same paths as --set, e.g., --unset description)

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  * For the examples below, the initial IP Set is configured as:

  ```text theme={null}
  {RESOURCE_CODE}
  ```

  * Update an IP Set's description

  <CodeGroup>
    ```bash Command theme={null}
    {UPDATE_DESCRIPTION_COMMAND}
    ```

    ```text Output theme={null}
    {UPDATE_DESCRIPTION_CODE}
    ```
  </CodeGroup>

  * Update an IP Set's tags

  <CodeGroup>
    ```bash Command theme={null}
    {UPDATE_TAGS_COMMAND}
    ```

    ```text Output theme={null}
    {UPDATE_TAGS_CODE}
    ```
  </CodeGroup>

  * Update an IP Set's link

  <CodeGroup>
    ```bash Command theme={null}
    {UPDATE_LINK_COMMAND}
    ```

    ```text Output theme={null}
    {UPDATE_LINK_CODE}
    ```
  </CodeGroup>
</Accordion>

***

#### ipset update-location

Update one or more locations from the referenced IP set

**Usage**

```none theme={null}
cpln ipset update-location <ref> [OPTIONS]
```

<Accordion title="Reference">
  ```text theme={null}
  Positionals:
    ref  The resource reference. Usually it is the name of the resource.  [required]

  Command options:
    --location  Add a location with an optional retention policy (`keep` or `free`), e.g., aws-eu-central-1,keep.  [required]

  Context options:
    --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
    --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command

  Format options:
    --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
    --color       Colorize the output  [boolean] [default: true]
    --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
    --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]

  Request options:
    --token         Override the authorization token
    --endpoint      Override the API URL
    --insecure, -k  Ignore TLS errors  [boolean]

  Debug options:
    --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
    --debug, -d    Show all HTTP communications  [boolean] [default: false]

  Options:
    --help  Show help  [boolean]
  ```

  [Common Options Reference](/cli-reference/using-cli/common-options)
</Accordion>

<Accordion title="Example">
  * For the examples below, the initial IP Set is configured as:

  ```text theme={null}
  {IPSET}
  ```

  * Update one or more locations from the referenced IP set wtih an optional retention policy (one of `keep` or `free`).

  <CodeGroup>
    ```bash Command theme={null}
    {UPDATE_LOCATION_COMMAND}
    ```

    ```text Output theme={null}
    {UPDATE_LOCATION_CODE}
    ```
  </CodeGroup>
</Accordion>

***
