|
| 1 | +# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema |
| 2 | +$schema: https://json-schema.org/draft/2020-12/schema |
| 3 | +$id: <HOST>/<PREFIX>/<VERSION>/extension/manifest.secret.yaml |
| 4 | + |
| 5 | +title: Secret operation command |
| 6 | +description: >- |
| 7 | + Defines how DSC must call the DSC extension to retrieve a secret value. |
| 8 | +markdownDescription: | # VS Code only |
| 9 | + *** |
| 10 | + [_Online Documentation_][00] |
| 11 | + *** |
| 12 | +
|
| 13 | + Defines how DSC must call the DSC extension to retrieve a secret value. An |
| 14 | + extension that defines this field in its manifest has the `secret` capability. |
| 15 | +
|
| 16 | + The secret operation is expected to output a single line to stdout containing |
| 17 | + the secret text. If the extension outputs no data to stdout, DSC treats it as |
| 18 | + "no secret returned". If the extension outputs multiple lines, DSC treats that |
| 19 | + as an error. |
| 20 | +
|
| 21 | + For details about the output format, see |
| 22 | + [Secret extension operation stdout][01]. |
| 23 | +
|
| 24 | + [00]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/secret?<DOCS_VERSION_PIN> |
| 25 | + [01]: <DOCS_BASE_URL>/reference/schemas/extension/stdout/secret?<DOCS_VERSION_PIN> |
| 26 | +
|
| 27 | +type: object |
| 28 | +required: |
| 29 | + - executable |
| 30 | +properties: |
| 31 | + executable: |
| 32 | + $ref: /<PREFIX>/<VERSION>/definitions/commandExecutable.yaml |
| 33 | + markdownDescription: | |
| 34 | + *** |
| 35 | + [_Online Documentation_][01] |
| 36 | + *** |
| 37 | +
|
| 38 | + Defines the name of the command to run. The value must be the name of a command discoverable |
| 39 | + in the system's `PATH` environment variable or the full path to the command. A file extension |
| 40 | + is only required when the command isn't recognizable by the operating system as an |
| 41 | + executable. |
| 42 | +
|
| 43 | + [01]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/secret?<DOCS_VERSION_PIN>#executable |
| 44 | + args: |
| 45 | + title: Arguments |
| 46 | + description: >- |
| 47 | + Defines an ordered list of arguments to pass to the command. |
| 48 | + markdownDescription: | |
| 49 | + *** |
| 50 | + [_Online Documentation_][01] |
| 51 | + *** |
| 52 | +
|
| 53 | + Defines an ordered list of arguments to pass to the command. Items can be plain strings or |
| 54 | + structured entries indicating which argument name should receive the secret name or the vault |
| 55 | + name. |
| 56 | +
|
| 57 | + DSC expands structured entries as follows: |
| 58 | +
|
| 59 | + - `{ "nameArg": "<flag>" }` expands to `"<flag>", "<secret-name>"`. |
| 60 | + - `{ "vaultArg": "<flag>" }` expands to `"<flag>", "<vault-name>"` (only when a vault is |
| 61 | + specified by the caller). |
| 62 | +
|
| 63 | + [01]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/secret?<DOCS_VERSION_PIN>#args |
| 64 | + type: array |
| 65 | + items: |
| 66 | + anyOf: |
| 67 | + - type: string |
| 68 | + - type: object |
| 69 | + additionalProperties: false |
| 70 | + required: |
| 71 | + - nameArg |
| 72 | + properties: |
| 73 | + nameArg: |
| 74 | + type: string |
| 75 | + - type: object |
| 76 | + additionalProperties: false |
| 77 | + required: |
| 78 | + - vaultArg |
| 79 | + properties: |
| 80 | + vaultArg: |
| 81 | + type: string |
| 82 | + |
| 83 | +defaultSnippets: # VS Code only |
| 84 | + - label: ' Define without arguments' |
| 85 | + markdownDescription: | |
| 86 | + Define the `secret` command for the extension when no arguments are required. |
| 87 | + body: |
| 88 | + executable: ${2:executable_name} |
| 89 | + - label: ' Define with arguments (flags + name)' |
| 90 | + markdownDescription: |- |
| 91 | + Define the `secret` command where the secret name is passed to a specific flag. |
| 92 | + body: |
| 93 | + executable: ${2:executable_name} |
| 94 | + args: |
| 95 | + - ${3:--get-secret} |
| 96 | + - nameArg: ${4:--name} |
| 97 | + - label: ' Define with arguments (flags + name + vault)' |
| 98 | + markdownDescription: |- |
| 99 | + Define the `secret` command where both the secret name and the vault name are passed. |
| 100 | + body: |
| 101 | + executable: ${2:executable_name} |
| 102 | + args: |
| 103 | + - ${3:--get-secret} |
| 104 | + - nameArg: ${4:--name} |
| 105 | + - vaultArg: ${5:--vault} |
0 commit comments