Skip to content

Commit c472f3a

Browse files
committed
Update API docs with state_reason
Signed-off-by: Rashed Kamal <rashed.kamal@broadcom.com>
1 parent a64f569 commit c472f3a

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

docs/v3/source/includes/api_resources/_stacks.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"name": "my-stack",
77
"description": "Here is my stack!",
88
"state": "ACTIVE",
9+
"state_reason": null,
910
"build_rootfs_image": "my-stack",
1011
"run_rootfs_image": "my-stack",
1112
"default": true,
@@ -47,6 +48,7 @@
4748
"run_rootfs_image": "my-stack-1-run",
4849
"description": "This is my first stack!",
4950
"state": "ACTIVE",
51+
"state_reason": null,
5052
"default": true,
5153
"metadata": {
5254
"labels": {},
@@ -67,6 +69,7 @@
6769
"build_rootfs_image": "my-stack-2-build",
6870
"run_rootfs_image": "my-stack-2-run",
6971
"state": "DEPRECATED",
72+
"state_reason": "Stack deprecated and will be removed in future release",
7073
"default": false,
7174
"metadata": {
7275
"labels": {},
@@ -91,6 +94,7 @@
9194
"name": "my-stack",
9295
"description": "Here is my stack!",
9396
"state": "DISABLED",
97+
"state_reason": "Stack disabled and cannot be used for staging new application",
9498
"build_rootfs_image": "my-stack",
9599
"run_rootfs_image": "my-stack",
96100
"default": true,

docs/v3/source/includes/resources/stacks/_create.md.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ curl "https://api.example.org/v3/stacks" \
1313
"name": "my-stack",
1414
"description": "Here is my stack!",
1515
"state": "ACTIVE",
16+
"state_reason": "",
1617
}'
1718
```
1819

@@ -44,6 +45,7 @@ Name | Type | Description | Default
4445
**metadata.labels** | [_label object_](#labels) | Labels applied to the stack
4546
**metadata.annotations** | [_annotation object_](#annotations) | Annotations applied to the stack
4647
**state** | string | The state of the stack; valid states are: `ACTIVE`, `RESTRICTED`, `DEPRECATED`, `DISABLED`
48+
**state_reason** | string | Optional plain text describing the stack change
4749

4850
#### Permitted roles
4951
|

docs/v3/source/includes/resources/stacks/_object.md.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Name | Type | Description
1515
**name** | _string_ | The name of the stack
1616
**description** | _string_ | The description of the stack
1717
**state** | string | The state of the stack; valid states are: `ACTIVE`, `RESTRICTED`, `DEPRECATED`, `DISABLED`
18+
**state_reason** | string | Optional plain text describing the stack change
1819
**build_rootfs_image** | _string | The name of the stack image associated with staging/building Apps. If a stack does not have unique images, this will be the same as the stack name.
1920
**run_rootfs_image** | _string | The name of the stack image associated with running Apps + Tasks. If a stack does not have unique images, this will be the same as the stack name.
2021
**default** | _boolean_ | Whether the stack is configured to be the default stack for new applications.

docs/v3/source/includes/resources/stacks/_update.md.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ curl "https://api.example.org/v3/stacks/[guid]" \
99
-X PATCH \
1010
-H "Authorization: bearer [token]" \
1111
-H "Content-Type: application/json" \
12-
-d '{ "metadata": { "labels": { "key": "value" }, "annotations": {"note": "detailed information"}},"state":"ACTIVE"}'
12+
-d '{ "metadata": { "labels": { "key": "value" }, "annotations": {"note": "detailed information"}},"state":"ACTIVE", "state_reason": "Optional plain text describing the stack change" }'
1313

1414
```
1515

@@ -34,6 +34,7 @@ Name | Type | Description
3434
**metadata.labels** | [_label object_](#labels) | Labels applied to the stack
3535
**metadata.annotations** | [_annotation object_](#annotations) | Annotations applied to the stack
3636
**state** | string | The state of the stack; valid states are: `ACTIVE`, `RESTRICTED`, `DEPRECATED`, `DISABLED`
37+
**state_reason** | string | Optional plain text describing the stack change
3738

3839
#### Permitted roles
3940
|

0 commit comments

Comments
 (0)