How can I create extensibility action
constants
You can create and store constants for use in extensibility actions.
With extensibility action constants, you can add encrypted input values to your
extensibility actions. Encryption is useful for use cases where your inputs are used
to manage sensitive data, such as passwords and certificates. Constants are
available for all FaaS providers and runtimes.
Unlike secrets, extensibility
action constants can only be used for extensibility secrets. For more information on
secrets, see How can I create secrets for use in extensibility actions.
Extensibility action constants are
accessible to all users included in your organization.
Constants use the
context.getSecret()
function to run as part of your script.
This function uses the name of constant as a parameter. For example, you might use
an extensibility action constant named abxconstant
as an encrypted
input parameter in your action. To add this input parameter to your action script,
you must use context.getSecret(inputs["abxconstant"])
.- Create a extensibility action constant.
- Navigate to.
- SelectAction Constants.
- To create a constant, clickNew Action Constant.
- Enter a name and value for the constant, and clickSave.
- Add your constant to a extensibility action.
- Select an existing extensibility action or create a new extensibility action.
- UnderDefault Inputs, tick theSecretcheck box.
- Search for your constant and add it to the extensibility action inputs.
- Add the constant to the script of the extensibility action by using thecontext.getSecret()function.
- To test your extensibility action constant, clickTest.