You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/gcloud/gcloud-declarative-schema.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,23 +17,19 @@ This document describes the schema for the gcloud Declarative YAML.
17
17
|`help_text`| string | Is the help text shown for the argument in gcloud help and error messages. |
18
18
|`action`| string | Overrides the argparse action used for the argument, for example store_true or store_true_false. Typically used with boolean fields. |
19
19
|`is_positional`| bool | Makes the argument positional rather than a flag. |
20
-
|`is_primary_resource`| bool | Marks this argument as the primary resource the command operates on. At most one argument per command may set this. |
21
-
|`request_id_field`| string | Is the request-message field that receives the user-supplied resource ID on a create command, for example instanceId. |
22
-
|`resource_spec`|[ResourceSpec](#resourcespec-configuration) (optional) | Declares this argument as a gcloud concept resource and describes its collection and attributes. |
23
20
|`required`| bool | Makes the argument mandatory. gcloud rejects invocations that leave it unset. |
24
21
|`repeated`| bool | Accepts more than one value for the argument and maps to a repeated API field. |
25
22
|`clearable`| bool | Causes gcloud to also generate companion flags such as<br>--clear-..., --add-..., and --remove-... on update commands. |
26
23
|`type`| string | Selects the gcloud argument parser, for example long, double, or a fully-qualified reference to an ArgDict or ArgList parser. |
27
24
|`default`|[Default](#default-configuration)| Is the value used when the user does not supply the argument. |
28
25
|`choices`| list of [Choice](#choice-configuration)| Is the fixed set of values the user can supply. Used for enum-typed fields; each choice maps an arg_value to an enum_value. |
29
26
|`spec`| list of [ArgSpec](#argspec-configuration)| Lists the sub-fields of a structured argument such as a map. For a map field, Spec typically contains entries for key and value. |
30
-
|`resource_method_params`| map[string]string | Maps API method parameter names to attribute names on a resource argument. Use it when the API method uses a non-standard parameter name for the resource. |
31
27
32
28
## Arguments Configuration
33
29
34
30
| Field | Type | Description |
35
31
| :--- | :--- | :--- |
36
-
|`params`| list of [Argument](#argument-configuration)| Is the ordered list of arguments the command accepts. Each entry becomes either a positional argument or a flag. |
32
+
|`params`| list of any| Is the ordered list of arguments the command accepts. Each entry becomes either a positional argument or a flag. |
37
33
38
34
## Async Configuration
39
35
@@ -103,6 +99,22 @@ This document describes the schema for the gcloud Declarative YAML.
103
99
|`method`| string | Is the API method name. When empty, gcloud infers the method from the command type (for example, list for a list command). |
104
100
|`static_fields`| map[string]string | Sets request fields to fixed values regardless of user input. Keys are dot-separated field paths in the request message. |
105
101
102
+
## ResourceArg Configuration
103
+
104
+
| Field | Type | Description |
105
+
| :--- | :--- | :--- |
106
+
|`arg_name`| string | Is the name of the argument as it appears to the user, such as instance. For flags gcloud prepends --. |
107
+
|`help_text`| string | Is the help text shown for the argument in gcloud help and error messages. |
108
+
|`is_positional`| bool | Makes the argument positional rather than a flag. |
109
+
|`is_primary_resource`| bool | Marks this argument as the primary resource the command operates on. At most one argument per command may set this. |
110
+
|`request_id_field`| string | Is the request-message field that receives the user-supplied resource ID on a create command, for example instanceId. |
111
+
|`resource_spec`|[ResourceSpec](#resourcespec-configuration) (optional) | Declares this argument as a gcloud concept resource and describes its collection and attributes. |
112
+
|`required`| bool | Makes the argument mandatory. gcloud rejects invocations that leave it unset. |
113
+
|`repeated`| bool | Accepts more than one value for the argument and maps to a repeated API field. |
114
+
|`clearable`| bool | Causes gcloud to also generate companion flags such as<br>--clear-..., --add-..., and --remove-... on update commands. |
115
+
|`spec`| list of [ArgSpec](#argspec-configuration)| Lists the sub-fields of a structured argument such as a map. For a map field, Spec typically contains entries for key and value. |
116
+
|`resource_method_params`| map[string]string | Maps API method parameter names to attribute names on a resource argument. Use it when the API method uses a non-standard parameter name for the resource. |
Copy file name to clipboardExpand all lines: internal/surfer/testdata/apis/developerconnect/expected/current/surface/developerconnect/account_connectors/users/_partials/_fetch_access_token_ga.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@
31
31
The resource name of the AccountConnector in the format
Copy file name to clipboardExpand all lines: internal/surfer/testdata/apis/developerconnect/expected/current/surface/developerconnect/account_connectors/users/_partials/_fetch_self_ga.yaml
Copy file name to clipboardExpand all lines: internal/surfer/testdata/apis/developerconnect/expected/current/surface/developerconnect/account_connectors/users/_partials/_finish_o_auth_flow_ga.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@
43
43
The resource name of the AccountConnector in the format
Copy file name to clipboardExpand all lines: internal/surfer/testdata/apis/developerconnect/expected/current/surface/developerconnect/account_connectors/users/_partials/_start_o_auth_flow_ga.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@
31
31
The resource name of the AccountConnector in the format
Copy file name to clipboardExpand all lines: internal/surfer/testdata/apis/developerconnect/expected/current/surface/developerconnect/connections/_partials/_fetch_git_hub_installations_ga.yaml
Copy file name to clipboardExpand all lines: internal/surfer/testdata/apis/developerconnect/expected/current/surface/developerconnect/connections/_partials/_fetch_linkable_git_repositories_ga.yaml
0 commit comments