Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
🔍 Discover Our Product Documentation

Barracuda CloudGen Access
Results will update as you type.
  • Getting Started
  • Deployment
  • CloudGen Access Console
  • CloudGen Access Application
  • CloudGen Access User Directory Connector
  • CloudGen Access Proxy
  • CloudGen Access CLI Client
    • How to Set the CloudGen Access Console Endpoint
    • How to Use the Admin API
    • Batch Mode Operations
      • Add and Edit Users in Batch Mode
      • Add and Edit Groups in Batch Mode
      • Add and Edit Resources in Batch Mode
      • Add and Edit Proxies in Batch Mode
      • Add and Edit Policies in Batch Mode
      • Add Domains in Batch Mode
    • Using access-cli
    • Configuration File
    • Credentials File
  • FAQ
  • Best Practices
  • Maintenance
  • Troubleshooting
  • Release Notes
  • Glossary
  • Security Advisories

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Add and Edit Policies in Batch Mode
    Published Jan 07

    Add and Edit Policies in Batch Mode

    Jan 07, 2026
    Subscribe

    access-cli supports adding and editing policies in batch mode, importing data from JSON or CSV files. Batch operations on policies use the common batch mode flags.

    • JSON files should contain an array of objects, each containing the fields for each policy you wish to add or edit.

    • CSV files should be comma-separated. They must contain a header, specifying the fields and their order, followed by the records (one per line).

    When editing policies, unspecified non-mandatory fields remain unchanged.

    Fields

    The expected fields for each format are as follows:

    JSON Field Name

    JSON Type

    CSV Field Name

    Example

    Description

    Mandatory

    id

    integer

    ID

    123

    ID of the policy to edit.
    Used only when editing

    When editing

    name

    string

    Name

    Allow QA

    Name of the policy

    When adding

    access_resource_ids

    string array

    AccessResourceIds

    ["2a70f6e3-879d-462d-a14f-c58ccf048b9a"]

    Resource IDs of the policy

    No

    conditions

    object

    Unsupported

     

    See below

    No

    conditions

    To enable RBAC for this policy, include a conditions object as follows:

    "conditions": { "rbac": { "enabled": true, "group_ids": [28, 29, 30], "user_ids": [247, 45, 46] } }

    group_ids and user_ids can be empty arrays. If both are empty arrays, the policy will deny access to all users and groups.

    Specifying RBAC settings is not supported when using the CSV format.

    File Examples

    Field order can be different from what is shown in the examples, and non-mandatory fields can be omitted. When using CSV, make sure to specify the correct field order in the header, and to maintain the order and number of fields consistent throughout each line.

    Adding Policies
    JSON
    [ { "name": "Allow QA", "access_resource_ids": ["2a70f6e3-879d-462d-a14f-c58ccf048b9a"], "conditions": { "rbac": { "enabled": true, "group_ids": [33], "user_ids": [] } } }, { "name": "Example policy" } ]

    $ access-cli policies add --from-file=example.json

    CSV
    Name,AccessResourceIds Allow QA,[90] Example policy,[55]

    $ access-cli policies add --from-file=example.csv --file-format=csv

    Editing Policies
    JSON
    [ { "id": 890, "name": "Allow QA and Marketing", "access_resource_ids": ["2a70f6e3-879d-462d-a14f-c58ccf048b9a"] }, { "id": 893, "name": "Example policy", "access_resource_ids": ["f613d08e-4899-4330-9963-267361f09a16"] } ]

    $ access-cli policies edit --from-file=example.json

    CSV
    ID,Name,AccessResourceIds 890,Allow QA and Marketing,["2a70f6e3-879d-462d-a14f-c58ccf048b9a"] 893,Example policy,["f613d08e-4899-4330-9963-267361f09a16"]

    $ access-cli policies edit --from-file=example.csv --file-format=csv


    We value your feedback.
    If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
    For general product inquiries or technical support, please contact the global Barracuda Support team.

    {"serverDuration": 30, "requestCorrelationId": "5184963f8d0a41e5b2249898e524f0d7"}