@@ -15,71 +15,82 @@ import (
1515)
1616
1717const (
18- projectShort = "Update project resources "
18+ projectShort = "Update the characteristics of a project "
1919 projectLong = `
20- Update the project according to the flags passed. Allows you to archive or activate a project.
21- Activate project flytesnacks:
22- ::
23-
24- flytectl update project -p flytesnacks --activate
20+ Allows you to update the characteristics of a project, including its name, labels and description.
21+ Also allows you to archive or activate (unarchive) a project.
2522
26- Archive project flytesnacks :
23+ To archive a project, specify its ID with the *p* flag and add the *archive* flag :
2724
2825::
2926
30- flytectl update project -p flytesnacks --archive
27+ flytectl update project -p my-project-id --archive
3128
32- Incorrect usage when passing both archive and activate:
29+ To activate (unarchive) an archived project, specify its ID with the *p* flag and add the * activate* flag :
3330
3431::
3532
36- flytectl update project -p flytesnacks --archive --activate
33+ flytectl update project -p my-project-id --activate
3734
38- Incorrect usage when passing unknown- project:
35+ To update the characteristics of a project using flags, specify the project ID with the *p* flag and the flags corresponding to the characteristics you want to update :
3936
4037::
4138
42- flytectl update project unknown- project --archive
39+ flytectl update project -p my- project-id --description "A wonderful project" --labels app=my-app
4340
44- project ID is required flag
41+ To update the characteristics of a project using a *yaml* file, define the file with the project ID desired updates:
42+
43+ .. code-block:: yaml
44+
45+ id: "my-project-id"
46+ name: "my-project-name"
47+ labels:
48+ values:
49+ app: my-app
50+ description: "A wonderful project"
4551
46- ::
4752
48- flytectl update project unknown-project --archive
53+ (Note: The name parameter must not contain whitespace)
4954
50- Update projects.(project/projects can be used interchangeably in these commands)
55+ Then, pass it in using the *file* flag:
5156
5257::
5358
54- flytectl update project -p flytesnacks --description "flytesnacks description" --labels app=flyte
59+ flytectl update project --file project.yaml
5560
56- Update a project by definition file. Note: The name shouldn't contain any whitespace characters.
57- ::
61+ To archive or activate (unarchive) a project using a *yaml* file:
62+
63+ * Add a state field, with a value of *0* for activated (unarchived) or *1* for archived, at the top level of the the *yaml* file.
5864
59- flytectl update project --file project.yaml
65+ * Add the *archive* flag to the command.
66+
67+ For example, to archive a project:
6068
6169.. code-block:: yaml
6270
63- id: "project-unique-id"
64- name: "Name"
65- labels:
66- values:
67- app: flyte
68- description: "Some description for the project"
71+ # update.yaml
72+ id: "my-project-id"
73+ state: 1
6974
70- Update a project state by definition file. Note: The name shouldn't contain any whitespace characters.
7175::
7276
73- flytectl update project --file project.yaml --archive
77+ $ uctl update project --file update.yaml --archive
78+
79+ And to activate (unarchive) the same project:
7480
7581.. code-block:: yaml
7682
77- id: "project-unique-id"
78- name: "Name"
79- labels:
80- values:
81- app: flyte
82- description: "Some description for the project"
83+ # update.yaml
84+ id: "my-project-id"
85+ state: 0
86+
87+ ::
88+
89+ $ uctl update project --file update.yaml --archive
90+
91+ Note that when using a *yaml* file, the *activate* flag is not used.
92+ Instead, the *archive* flag is used for *both* archiving and activating (unarchiving) with the difference being in the *state* field of the *yaml* file.
93+ Furthermore, the *state* field only takes effect if the *archive* flag is present in the command.
8394
8495Usage
8596`
0 commit comments