How do I create extensibility actions
With
Automation Assembler
, you can create extensibility actions for use in extensibility subscriptions. - Membership in an active and valid project.
- ConfiguredAmazon Web Servicesrole for Lambda functions. For example,AWSLambdaBasicExecutionRole.
- Cloud administrator role oriam:PassRolepermissions enabled.
Extensibility actions are highly customizable, lightweight, and flexible ways to extend application life cycles by using user-defined script code and action templates. Action templates contain predefined parameters that help set up the foundation of your extensibility action.
There are two methods of creating an extensibility action:
- Writing user-defined code for an extensibility action script.Writing user-defined code in the extensibility action editor might require an active Internet connection.
- Importing a deployment package as a ZIP package for an extensibility action. For information on creating a ZIP package for extensibility actions, see Create a ZIP package for Python runtime extensibility actions, Create a ZIP package for Node.js runtime extensibility actions, or Create a ZIP package for PowerShell runtime extensibility actions.
The following steps describe the procedure for creating an extensibility action that uses
Amazon Web Services
as a FaaS provider. - Select.
- ClickNew Action.
- Enter a name for your action and select a project.
- Add a description for your action.
- ClickNext.
- Search and select an action template.To create a custom action without using an action template, selectCustom script.New configurable parameters appear.
- SelectWrite scriptorImport package.
- Select the action runtime.
- Enter anMain functionname for the action's entry point.For actions imported from a ZIP package, the main function must also include the name of the script file that contains the entry point. For example, if your main script file is titledmain.pyand your entry point ishandler (context, inputs), the name of the main function must bemain.handler.
- Define the input and output parameters of the action.
- Add secrets or extensibility action constants to your default inputs.For more information on secrets and extensibiltity action constants, see How can I create secrets for use in extensibility actions and How can I create extensibility action constants.
- Add application dependencies to the action.For PowerShell scripts, you can define your application dependencies so they are resolved against the PowerShell Gallery repository. To define your application dependencies so, they are resolvable from the public repository use the following format:@{ Name = 'Version' } e.g. @{ Pester = '4.3.1' }For actions imported from a ZIP package, application dependencies are added automatically.
- To define timeout and memory limits, enable theSet custom timeout and limitsoption.The maximum timeout value for scripting type actions is 15 minutes. The maximum timeout value for flow type actions is five hours. For flow type actions, you can also leave the timeout text box blank in which case there is no timeout limit. If you do not set a timeout limit, the action run ends when all flow elements finish their tasks or an error occurs.
- To test your action, clickSaveand thenTest.
After your extensibility action is created and verified, you can assign it to a subscription.
Extensibility subscriptions use the latest released version of an extensibility action. After creating a new version of an action, click
Versions
on the top-right of the editor window. To release the version of the action you want to use in your subscription, click Release
.