GoodMemGoodMem
ReferenceCLIAccess Policy

Access Policy Role Assignment Assign

Access Policy Role Assignment Assign CLI command reference

goodmem access-policy role-assignment assign

Assign one code-defined role to a principal

Synopsis

Assign one code-defined role to a principal.

Use --principal for the HUMAN or SERVICE principal receiving the role and --role for the role name. The target identifies the instance or space where the role applies. The server validates principal state, role/target compatibility, duplicate assignments, and the caller's MANAGE_ACCESS authority.

goodmem access-policy role-assignment assign [flags]

Examples

  # Assign the standard instance USER role
  goodmem access-policy role-assignment assign \
    --principal b3303d0a-1a4a-493f-b9bf-38e37153b5a2 \
    --role USER --resource-kind INSTANCE

  # Assign SPACE_ADMIN within one space
  goodmem access-policy role-assignment assign \
    --principal b3303d0a-1a4a-493f-b9bf-38e37153b5a2 \
    --role SPACE_ADMIN --resource-kind SPACE \
    --resource-id 70e025f6-76ca-4cbe-b8fc-7dab8e84590a

Options

  -f, --format string          Output format: json, compact, quiet (default "json")
  -h, --help                   help for assign
      --id string              Optional client-provided role-assignment UUID
      --principal string       Principal UUID receiving the role
      --resource-id string     Policy target UUID; omit for INSTANCE
      --resource-kind string   Typed policy target kind (for example INSTANCE or SPACE)
      --role string            One code-defined role (for example SPACE_ADMIN)

Options inherited from parent commands

      --api-key string   API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
      --server string    GoodMem server address (gRPC API)

SEE ALSO