The createActionFromTemplate() GraphQL mutation is used to create an action from yaml template.

For more information on creating an action, see the Actions documentation page.

Syntax

Below is the syntax for the createActionFromTemplate() mutation field:

graphql
createActionFromTemplate(
      input: CreateActionFromTemplateInput!
   ): Action!

Given Datatypes

For the input CreateActionFromTemplateInput, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: CreateActionFromTemplateInput

ParameterTypeRequired[a]DefaultDescription
namestringyes The name of the action.
displayNamestringyes The display name of the action.
idstringyes The unique identifier of the action.
yamlTemplateYAMLyes A template that can be used to recreate the action.
packagePackageInstallation  The package if any of which the action is a part (see PackageInstallation Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


Returned Datatypes

The returned interface Action has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: Action

ParameterTypeRequired[a]DefaultDescription
namestringyes The name of the action.
displayNamestringyes The display name of the action.
idstringyes The unique identifier of the action.
xYAMLyes A template that can be used to recreate the action.
packagePackageInstallationyes The package, if any, of which the action is part (see PackageInstallation Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.