@@ -15,71 +15,82 @@ import (
15
15
)
16
16
17
17
const (
18
- projectShort = "Update project resources "
18
+ projectShort = "Update the characteristics of a project "
19
19
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.
25
22
26
- Archive project flytesnacks :
23
+ To archive a project, specify its ID with the *p* flag and add the *archive* flag :
27
24
28
25
::
29
26
30
- flytectl update project -p flytesnacks --archive
27
+ flytectl update project -p my-project-id --archive
31
28
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 :
33
30
34
31
::
35
32
36
- flytectl update project -p flytesnacks --archive --activate
33
+ flytectl update project -p my-project-id --activate
37
34
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 :
39
36
40
37
::
41
38
42
- flytectl update project unknown- project --archive
39
+ flytectl update project -p my- project-id --description "A wonderful project" --labels app=my-app
43
40
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"
45
51
46
- ::
47
52
48
- flytectl update project unknown-project --archive
53
+ (Note: The name parameter must not contain whitespace)
49
54
50
- Update projects.(project/projects can be used interchangeably in these commands)
55
+ Then, pass it in using the *file* flag:
51
56
52
57
::
53
58
54
- flytectl update project -p flytesnacks --description "flytesnacks description" --labels app=flyte
59
+ flytectl update project --file project.yaml
55
60
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.
58
64
59
- flytectl update project --file project.yaml
65
+ * Add the *archive* flag to the command.
66
+
67
+ For example, to archive a project:
60
68
61
69
.. code-block:: yaml
62
70
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
69
74
70
- Update a project state by definition file. Note: The name shouldn't contain any whitespace characters.
71
75
::
72
76
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:
74
80
75
81
.. code-block:: yaml
76
82
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.
83
94
84
95
Usage
85
96
`
0 commit comments