projects¶
The projects command allows you to create, modify and view
projects.
Projects are internal resources that contain the clusters. They are automatically created when you create a cluster, but you can also create them manually and assign clusters to them.
Usage: croud projects [-h] {create,delete,edit,get,list,users} ...
projects create¶
Create a project in the specified organization and region.
Warning
Some optional arguments are for Edge regions only. An Edge region allows you to host CrateDB instances in your own infrastructure however this feature is not maintained anymore. It is not recommended to use it.
Usage: croud projects create [-h] --name NAME [--org-id ORG_ID]
[--backup-location-type {s3}]
[--backup-location BACKUP_LOCATION]
[--backup-location-access-key-id BACKUP_LOCATION_ACCESS_KEY_ID]
[--backup-location-endpoint-url BACKUP_LOCATION_ENDPOINT_URL]
[--backup-location-secret-access-key BACKUP_LOCATION_SECRET_ACCESS_KEY]
[--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Required Arguments¶
- --name
The project name to use.
Optional Arguments¶
- --org-id
The organization ID to use.
- --backup-location-type
Possible choices: s3
CrateDB Edge regions only. The type of the custom backup location to use. Only ‘s3’ currently supported.
- --backup-location
CrateDB Edge regions only. The location of where backups are to be stored, i.e. name of s3 bucket for s3 locations.
- --backup-location-access-key-id
CrateDB Edge regions only. The AWS access key id for the given s3 bucket.
- --backup-location-endpoint-url
CrateDB Edge regions only. The URL to a S3 compatible endpoint.
- --backup-location-secret-access-key
CrateDB Edge regions only. The AWS secret access key for the given s3 bucket.
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud projects create --name my-project --org-id a0df2925-cc73-4365-8a10-7ef847632b81
+--------------------------------------+
| id |
|--------------------------------------|
| 035f1161-402e-44b4-9073-0749586091e0 |
+--------------------------------------+
==> Success: Project created.
projects delete¶
Delete the specified project.
Usage: croud projects delete [-h] -p PROJECT_ID [-y] [--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Required Arguments¶
- -p, --project-id
The project ID to use.
Optional Arguments¶
- -y, --yes
Default:
False- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud projects delete --project-id 035f1161-402e-44b4-9073-0749586091e0
Are you sure you want to delete the project? [yN] y
==> Success: Project deleted.
projects edit¶
Rename the specified project.
Usage: croud projects edit [-h] -p PROJECT_ID [--name NAME] [--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Required Arguments¶
- -p, --project-id
The project ID to use.
Optional Arguments¶
- --name
The new project name to use.
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud projects edit --p f6c39580-5719-431d-a508-0cee4f9e8209 --name new-name
+--------------------------------------+-------------+
| project_id | name |
|--------------------------------------+-------------+
| f6c39580-5719-431d-a508-0cee4f9e8209 | new-name |
+--------------------------------------+-------------+
==> Success: Project edited.
projects list¶
List all projects the current user has access to in the specified organization.
Usage: croud projects list [-h] [--org-id ORG_ID] [--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Optional Arguments¶
- --org-id
The organization ID to use.
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud projects list
+--------------------------------------+-----------------+--------------------+--------------------------------------+-------------------+
| id | name | region | organization_id | backup_location |
|--------------------------------------+-----------------+--------------------+--------------------------------------+-------------------|
| 035f1161-402e-44b4-9073-0749586091e0 | my-project | aks1.eastus.azure | a0df2925-cc73-4365-8a10-7ef847632b81 | default |
+--------------------------------------+-----------------+--------------------+--------------------------------------+-------------------+
projects users¶
Manage users in projects.
Usage: croud projects users [-h] {add,list,remove} ...
projects users add¶
Add a user to a project. It allows the user to access the project and its clusters with the specified role.
Usage: croud projects users add [-h] -p PROJECT_ID --user USER --role ROLE
[--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Required Arguments¶
- -p, --project-id
The project ID to use.
- --user
The user email address or ID to use.
- --role
The role FQN to use. Run
croud users roles listfor a list of available roles.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud projects users add \
--project-id 035f1161-402e-44b4-9073-0749586091e0 \
--role project_member \
--user john.doe@example.com
+--------------------------------------+----------------+--------------------------------------+
| project_id | role_fqn | user_id |
|--------------------------------------+----------------+--------------------------------------|
| 035f1161-402e-44b4-9073-0749586091e0 | project_member | 6ac0f500-f9f8-4c12-82e2-3ad6192525d4 |
+--------------------------------------+----------------+--------------------------------------+
==> Success: User added to project.
projects users list¶
List the users who have access to a project.
Usage: croud projects users list [-h] -p PROJECT_ID [--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- -p, --project-id
The project ID to use.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud projects users list \
--project-id 035f1161-402e-44b4-9073-0749586091e0
+--------------------------------------+----------------------+----------+----------------+
| uid | email | username | project_roles |
|--------------------------------------+----------------------+----------+----------------|
| 6ac0f500-f9f8-4c12-82e2-3ad6192525d4 | john.doe@example.com | john.doe | project_admin |
+--------------------------------------+----------------------+----------+----------------+
projects users remove¶
Remove a user from a project.
Usage: croud projects users remove [-h] -p PROJECT_ID --user USER
[--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- -p, --project-id
The project ID to use.
- --user
The user email address or ID to use.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud projects users remove \
--project-id 035f1161-402e-44b4-9073-0749586091e0 \
--user john.doe@example.com
==> Success: User removed from project.