Skip to main content

saucectl apit vault set-snippet

Sets/updates a snippet in a project's vault.

Usage

When a snippet_name exists in the vault, it will be replaced with the new content. If it does not exist, a new snippet is created. You can update or add a snippet by either specifying a file that contains the snippet or by using "-" to input the snippet directly from the standard input stream (stdin).

To update or add from a file:

saucectl apit vault set-snippet "snippet_name" "file_name" [flags]

To update or add via stdin:

cat "file_name" | saucectl apit vault set-snippet "snippet_name" - [flags]

Available Options

FlagShorthandDescription
--projectNoneSelect a vault by project name.
--region-rThe Sauce Labs region. Options are us-west-1 (default) and eu-central-1.

Options Details

--project

| OPTIONAL | STRING |

Specifies the project by its name using --project, or omits --project to select from a list of available projects.
saucectl apit vault set-snippet "snippet_name" "file_name" --project "project_name"
or
cat "file_name" | saucectl apit vault set-snippet "snippet_name" - --project "project_name"

--region

| OPTIONAL | STRING |

The Sauce Labs region. Options are us-west-1 (default) and eu-central-1.Shorthand: -r <region>
saucectl apit vault set-snippet "snippet_name" "file_name" --region us-west-1
or
cat "file_name" | saucectl apit vault set-snippet "snippet_name" - --region us-west-1