chore: add storage policy documentation (#4246)

* chore: update create storage bucket readme

* chore: update domain model docs for storage policy

* fix(website): update docs nav data

* docs: Update navigation

* docs: Copy edits

* chore: add resultant set of policy examples

* doc: Update resultant set of policy examples

* docs: Add policies to CLI commands

* docs: Add note about default policy name

* adds configure storage policies usage docs

* updates s3 policies to include the bucket resource itself

* adds commands/policies routes back

* Apply suggestions from code review

Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com>

* adds Manual deletion section

* updates UI step

* adds update storage policies usage doc

* attribute description updates and formatting fixes

* Apply suggestions from code review

Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com>

---------

Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com>
Co-authored-by: stellarsquall <stellarsquall@protonmail.ch>
Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2024-01-30 20:20:43 -05:00
1 parent 2005593dc2
commit 5dbf57ebfa
13 files changed
+1480 -13

No files matched your search

@@ -0,0 +1,61 @@
---
layout: docs
page_title: policies create - Command
description: |-
The "policies create" command lets you create Boundary policies.
---
# policies create
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
Command: `boundary policies create`
The `boundary policies create` command lets you create Boundary policies.
Storage policies codify how long session recordings must be kept and when they should be deleted.
For more information, refer to the [storage policies](/boundary/docs/concepts/domain-model/storage-policy) documentation.
## Example
This example creates a storage policy with the name `prod` and the description `Prod Storage Policy`.
The policy has a retention period of 10 days, and it will be deleted after 20 days:
```shell-session
$ boundary policies create storage -name prod -description "Prod Storage Policy" -retain-for-days 10 -delete-after-days 20
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary policies create storage [options] [args]
```
</CodeBlockConfig>
### Subcommands
- `storage` - Creates a storage type policy.
### Command options
- `-description=<string>` - The description to set for the policy.
- `-name=<string>` -The name to set on the policy.
The name is optional, but if you set it, it must be unique within the scope ID.
If you do not provide a name, Boundary uses the storage policy ID as the default name.
- `-scope-id=<string>` - Scope in which to create the policy.
The default scope is global.
You can also specify a scope using the **BOUNDARY_SCOPE_ID** environment variable.
### Storage policy options
- `-delete-after-days=<string>` - The number of days after which Boundary will delete a session recording.
- `-delete-after-overridable=<string>` - Whether the policy's deletion period can be overridden by downstream policies.
The value can be `true` or `false`.
- `-retain-for-days=<string>` - The number of days a session recording should be retained for.
- `-retain-for-overridable=<string>` - Whether the policy's retention period can be overriden by downstream storage policies.
The value can be `true` or `false`.
@include 'cmd-option-note.mdx'
@@ -0,0 +1,38 @@
---
layout: docs
page_title: policies delete - Command
description: |-
The "policies delete" command lets you delete Boundary policies.
---
# policies delete
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
Command: `boundary policies delete`
The `boundary policies delete` command lets you delete Boundary policies.
## Example
This example deletes a policy with the ID `p_1234567890`:
```shell-session
$ boundary policies delete -id p_1234567890
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary policies delete [options] [args]
```
</CodeBlockConfig>
### Command options
- `-id=<string>` - The ID of the policy you want to delete.
@include 'cmd-option-note.mdx'
@@ -0,0 +1,51 @@
---
layout: docs
page_title: policies - Command
description: |-
The "policies" command lets you perform operations on Boundary policy resources.
---
# policies
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
Command: `boundary policies`
The `policies` command lets you perform operations on Boundary policies.
Storage policies codify how long session recordings must be kept and when they should be deleted.
For more information, refer to the [storage policies](/boundary/docs/concepts/domain-model/storage-policy) documentation.
## Example
The following command reads a policy with the id `pst_1234567890`:
```shell-session
$ boundary policies read -id chr_1234567890
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
Usage: boundary policies <subcommand> [options] [args]
# ...
Subcommands:
create Create a policy
delete Delete a policy
list List a policy
read Read a policy
update Update a policy
```
</CodeBlockConfig>
For more information, examples, and usage, click on the name
of the subcommand in the sidebar or one of the links below:
- [create](/boundary/docs/commands/policies/create)
- [delete](/boundary/docs/commands/policies/delete)
- [list](/boundary/docs/commands/policies/list)
- [read](/boundary/docs/commands/policies/read)
- [update](/boundary/docs/commands/policies/update)
@@ -0,0 +1,47 @@
---
layout: docs
page_title: policies list - Command
description: |-
The "policies list" command lists the policies within a given scope or resource.
---
# policies list
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
Command: `policies list`
The `policies list` command lets you list the policies within a given scope or resource.
## Example
This example lists all policies within the scope `s_1234567890`.
The `recursive` option means Boundary runs the operation recursively on any child scopes, if applicable:
```shell-session
$ boundary policies list -scope-id s_1234567890 -recursive
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary policies list [options] [args]
```
</CodeBlockConfig>
### Command options
- `-filter=<string>` - If set, Boundary filters the list operation before the results are returned.
The filter operates against each item in the list.
We recommend that you use single quotes, because the filters contain double quotes.
Refer to the [Filter resource listings documentation](/boundary/docs/concepts/filtering/resource-listing) for more details.
- `recursive` - If set, runs the list operation recursively on any child scopes, if the type supports it.
The default value is `false`.
- `scope-id=<string>` - The scope from which to list policies.
The default value is `global`.
You can also specify this value using the **BOUNDARY_SCOPE_ID** environment variable.
@include 'cmd-option-note.mdx'
@@ -0,0 +1,38 @@
---
layout: docs
page_title: policies read - Command
description: |-
The "policies read" command lets you read information about Boundary policies.
---
# policies read
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
Command: `boundary policies read`
The `boundary policies read` command lets you read information about Boundary policies.
## Example
This example reads the details of a policy with the ID `p_1234567890`:
```shell-session
$ boundary policies read -id p_1234567890
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary policies read [options] [args]
```
</CodeBlockConfig>
### Command options
- `-id=<string>` - The ID of the policy you want to read.
@include 'cmd-option-note.mdx'
@@ -0,0 +1,61 @@
---
layout: docs
page_title: policies update - Command
description: |-
The "policies update" command lets you update Boundary policies.
---
# policies update
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
Command: `boundary policies update`
The `boundary policies update` command lets you update Boundary policies.
Storage policies codify how long session recordings must be kept and when they should be deleted.
For more information, refer to the [storage policies](/boundary/docs/concepts/domain-model/storage-policy) documentation.
## Example
This example updates a storage policy with the ID `pst_1234567890` to add the name `dev` and the description `Dev Storage Policy`.
The policy has a retention period of 1 day, and it will be deleted after 2 days:
```shell-session
$ boundary policies update storage -id pst_1234567890 -name dev -description "Dev Storage Policy" -retain-for-days 1 -delete-after-days 2
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary policies update storage [options] [args]
```
</CodeBlockConfig>
### Subcommands
- `storage` - Updates a storage type policy.
### Command options
- `-description=<string>` - The description to set for the policy.
- `-id=<string>` - The ID of the policy you want to update.
- `-name=<string>` -The name to set on the policy.
The name is optional, but if you set it, it must be unique within the scope ID.
If you do not provide a name, Boundary uses the storage policy ID as the default name.
- `-version=<int>` - The version of the policy to update.
If you do not specify a version, the command performs a check-and-set automatically.
### Storage policy options
- `-delete-after-days=<string>` - The number of days after which Boundary will delete a session recording.
- `-delete-after-overridable=<string>` - Whether the policy's deletion period can be overridden by downstream policies.
The value can be `true` or `false`.
- `-retain-for-days=<string>` - The number of days a session recording should be retained for.
- `-retain-for-overridable=<string>` - Whether the policy's retention period can be overriden by downstream storage policies.
The value can be `true` or `false`.
@include 'cmd-option-note.mdx'