pagerduty.AutomationActionsAction
Explore with Pulumi AI
An Automation Actions action invokes jobs and workflows that are staged in Runbook Automation or Process Automation. It may also execute a command line script run by a Process Automation runner installed in your infrastructure.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const paActionExample = new pagerduty.AutomationActionsAction("pa_action_example", {
name: "PA Action created via TF",
description: "Description of the PA Action created via TF",
actionType: "process_automation",
actionDataReference: {
processAutomationJobId: "P123456",
},
});
const scriptActionExample = new pagerduty.AutomationActionsAction("script_action_example", {
name: "Script Action created via TF",
description: "Description of the Script Action created via TF",
actionType: "script",
actionDataReference: {
script: "print(\"Hello from a Python script!\")",
invocationCommand: "/usr/local/bin/python3",
},
});
import pulumi
import pulumi_pagerduty as pagerduty
pa_action_example = pagerduty.AutomationActionsAction("pa_action_example",
name="PA Action created via TF",
description="Description of the PA Action created via TF",
action_type="process_automation",
action_data_reference=pagerduty.AutomationActionsActionActionDataReferenceArgs(
process_automation_job_id="P123456",
))
script_action_example = pagerduty.AutomationActionsAction("script_action_example",
name="Script Action created via TF",
description="Description of the Script Action created via TF",
action_type="script",
action_data_reference=pagerduty.AutomationActionsActionActionDataReferenceArgs(
script="print(\"Hello from a Python script!\")",
invocation_command="/usr/local/bin/python3",
))
package main
import (
"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := pagerduty.NewAutomationActionsAction(ctx, "pa_action_example", &pagerduty.AutomationActionsActionArgs{
Name: pulumi.String("PA Action created via TF"),
Description: pulumi.String("Description of the PA Action created via TF"),
ActionType: pulumi.String("process_automation"),
ActionDataReference: &pagerduty.AutomationActionsActionActionDataReferenceArgs{
ProcessAutomationJobId: pulumi.String("P123456"),
},
})
if err != nil {
return err
}
_, err = pagerduty.NewAutomationActionsAction(ctx, "script_action_example", &pagerduty.AutomationActionsActionArgs{
Name: pulumi.String("Script Action created via TF"),
Description: pulumi.String("Description of the Script Action created via TF"),
ActionType: pulumi.String("script"),
ActionDataReference: &pagerduty.AutomationActionsActionActionDataReferenceArgs{
Script: pulumi.String("print(\"Hello from a Python script!\")"),
InvocationCommand: pulumi.String("/usr/local/bin/python3"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;
return await Deployment.RunAsync(() =>
{
var paActionExample = new Pagerduty.AutomationActionsAction("pa_action_example", new()
{
Name = "PA Action created via TF",
Description = "Description of the PA Action created via TF",
ActionType = "process_automation",
ActionDataReference = new Pagerduty.Inputs.AutomationActionsActionActionDataReferenceArgs
{
ProcessAutomationJobId = "P123456",
},
});
var scriptActionExample = new Pagerduty.AutomationActionsAction("script_action_example", new()
{
Name = "Script Action created via TF",
Description = "Description of the Script Action created via TF",
ActionType = "script",
ActionDataReference = new Pagerduty.Inputs.AutomationActionsActionActionDataReferenceArgs
{
Script = "print(\"Hello from a Python script!\")",
InvocationCommand = "/usr/local/bin/python3",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.pagerduty.AutomationActionsAction;
import com.pulumi.pagerduty.AutomationActionsActionArgs;
import com.pulumi.pagerduty.inputs.AutomationActionsActionActionDataReferenceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var paActionExample = new AutomationActionsAction("paActionExample", AutomationActionsActionArgs.builder()
.name("PA Action created via TF")
.description("Description of the PA Action created via TF")
.actionType("process_automation")
.actionDataReference(AutomationActionsActionActionDataReferenceArgs.builder()
.processAutomationJobId("P123456")
.build())
.build());
var scriptActionExample = new AutomationActionsAction("scriptActionExample", AutomationActionsActionArgs.builder()
.name("Script Action created via TF")
.description("Description of the Script Action created via TF")
.actionType("script")
.actionDataReference(AutomationActionsActionActionDataReferenceArgs.builder()
.script("print(\"Hello from a Python script!\")")
.invocationCommand("/usr/local/bin/python3")
.build())
.build());
}
}
resources:
paActionExample:
type: pagerduty:AutomationActionsAction
name: pa_action_example
properties:
name: PA Action created via TF
description: Description of the PA Action created via TF
actionType: process_automation
actionDataReference:
processAutomationJobId: P123456
scriptActionExample:
type: pagerduty:AutomationActionsAction
name: script_action_example
properties:
name: Script Action created via TF
description: Description of the Script Action created via TF
actionType: script
actionDataReference:
script: print("Hello from a Python script!")
invocationCommand: /usr/local/bin/python3
Create AutomationActionsAction Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AutomationActionsAction(name: string, args: AutomationActionsActionArgs, opts?: CustomResourceOptions);
@overload
def AutomationActionsAction(resource_name: str,
args: AutomationActionsActionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AutomationActionsAction(resource_name: str,
opts: Optional[ResourceOptions] = None,
action_data_reference: Optional[AutomationActionsActionActionDataReferenceArgs] = None,
action_type: Optional[str] = None,
action_classification: Optional[str] = None,
creation_time: Optional[str] = None,
description: Optional[str] = None,
modify_time: Optional[str] = None,
name: Optional[str] = None,
runner_id: Optional[str] = None,
runner_type: Optional[str] = None,
type: Optional[str] = None)
func NewAutomationActionsAction(ctx *Context, name string, args AutomationActionsActionArgs, opts ...ResourceOption) (*AutomationActionsAction, error)
public AutomationActionsAction(string name, AutomationActionsActionArgs args, CustomResourceOptions? opts = null)
public AutomationActionsAction(String name, AutomationActionsActionArgs args)
public AutomationActionsAction(String name, AutomationActionsActionArgs args, CustomResourceOptions options)
type: pagerduty:AutomationActionsAction
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AutomationActionsActionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AutomationActionsActionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AutomationActionsActionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AutomationActionsActionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AutomationActionsActionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Example
The following reference example uses placeholder values for all input properties.
var automationActionsActionResource = new Pagerduty.AutomationActionsAction("automationActionsActionResource", new()
{
ActionDataReference = new Pagerduty.Inputs.AutomationActionsActionActionDataReferenceArgs
{
InvocationCommand = "string",
ProcessAutomationJobArguments = "string",
ProcessAutomationJobId = "string",
ProcessAutomationNodeFilter = "string",
Script = "string",
},
ActionType = "string",
ActionClassification = "string",
CreationTime = "string",
Description = "string",
ModifyTime = "string",
Name = "string",
RunnerId = "string",
RunnerType = "string",
Type = "string",
});
example, err := pagerduty.NewAutomationActionsAction(ctx, "automationActionsActionResource", &pagerduty.AutomationActionsActionArgs{
ActionDataReference: &pagerduty.AutomationActionsActionActionDataReferenceArgs{
InvocationCommand: pulumi.String("string"),
ProcessAutomationJobArguments: pulumi.String("string"),
ProcessAutomationJobId: pulumi.String("string"),
ProcessAutomationNodeFilter: pulumi.String("string"),
Script: pulumi.String("string"),
},
ActionType: pulumi.String("string"),
ActionClassification: pulumi.String("string"),
CreationTime: pulumi.String("string"),
Description: pulumi.String("string"),
ModifyTime: pulumi.String("string"),
Name: pulumi.String("string"),
RunnerId: pulumi.String("string"),
RunnerType: pulumi.String("string"),
Type: pulumi.String("string"),
})
var automationActionsActionResource = new AutomationActionsAction("automationActionsActionResource", AutomationActionsActionArgs.builder()
.actionDataReference(AutomationActionsActionActionDataReferenceArgs.builder()
.invocationCommand("string")
.processAutomationJobArguments("string")
.processAutomationJobId("string")
.processAutomationNodeFilter("string")
.script("string")
.build())
.actionType("string")
.actionClassification("string")
.creationTime("string")
.description("string")
.modifyTime("string")
.name("string")
.runnerId("string")
.runnerType("string")
.type("string")
.build());
automation_actions_action_resource = pagerduty.AutomationActionsAction("automationActionsActionResource",
action_data_reference=pagerduty.AutomationActionsActionActionDataReferenceArgs(
invocation_command="string",
process_automation_job_arguments="string",
process_automation_job_id="string",
process_automation_node_filter="string",
script="string",
),
action_type="string",
action_classification="string",
creation_time="string",
description="string",
modify_time="string",
name="string",
runner_id="string",
runner_type="string",
type="string")
const automationActionsActionResource = new pagerduty.AutomationActionsAction("automationActionsActionResource", {
actionDataReference: {
invocationCommand: "string",
processAutomationJobArguments: "string",
processAutomationJobId: "string",
processAutomationNodeFilter: "string",
script: "string",
},
actionType: "string",
actionClassification: "string",
creationTime: "string",
description: "string",
modifyTime: "string",
name: "string",
runnerId: "string",
runnerType: "string",
type: "string",
});
type: pagerduty:AutomationActionsAction
properties:
actionClassification: string
actionDataReference:
invocationCommand: string
processAutomationJobArguments: string
processAutomationJobId: string
processAutomationNodeFilter: string
script: string
actionType: string
creationTime: string
description: string
modifyTime: string
name: string
runnerId: string
runnerType: string
type: string
AutomationActionsAction Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AutomationActionsAction resource accepts the following input properties:
- Action
Data AutomationReference Actions Action Action Data Reference - Action
Type string - Action
Classification string - Creation
Time string - The time action was created. Represented as an ISO 8601 timestamp.
- Description string
- Modify
Time string - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- Name string
- Runner
Id string - Runner
Type string - (Optional) The type of the runner associated with the action.
- Type string
- The type of object. The value returned will be
action
.
- Action
Data AutomationReference Actions Action Action Data Reference Args - Action
Type string - Action
Classification string - Creation
Time string - The time action was created. Represented as an ISO 8601 timestamp.
- Description string
- Modify
Time string - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- Name string
- Runner
Id string - Runner
Type string - (Optional) The type of the runner associated with the action.
- Type string
- The type of object. The value returned will be
action
.
- action
Data AutomationReference Actions Action Action Data Reference - action
Type String - action
Classification String - creation
Time String - The time action was created. Represented as an ISO 8601 timestamp.
- description String
- modify
Time String - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name String
- runner
Id String - runner
Type String - (Optional) The type of the runner associated with the action.
- type String
- The type of object. The value returned will be
action
.
- action
Data AutomationReference Actions Action Action Data Reference - action
Type string - action
Classification string - creation
Time string - The time action was created. Represented as an ISO 8601 timestamp.
- description string
- modify
Time string - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name string
- runner
Id string - runner
Type string - (Optional) The type of the runner associated with the action.
- type string
- The type of object. The value returned will be
action
.
- action_
data_ Automationreference Actions Action Action Data Reference Args - action_
type str - action_
classification str - creation_
time str - The time action was created. Represented as an ISO 8601 timestamp.
- description str
- modify_
time str - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name str
- runner_
id str - runner_
type str - (Optional) The type of the runner associated with the action.
- type str
- The type of object. The value returned will be
action
.
- action
Data Property MapReference - action
Type String - action
Classification String - creation
Time String - The time action was created. Represented as an ISO 8601 timestamp.
- description String
- modify
Time String - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name String
- runner
Id String - runner
Type String - (Optional) The type of the runner associated with the action.
- type String
- The type of object. The value returned will be
action
.
Outputs
All input properties are implicitly available as output properties. Additionally, the AutomationActionsAction resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AutomationActionsAction Resource
Get an existing AutomationActionsAction resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AutomationActionsActionState, opts?: CustomResourceOptions): AutomationActionsAction
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action_classification: Optional[str] = None,
action_data_reference: Optional[AutomationActionsActionActionDataReferenceArgs] = None,
action_type: Optional[str] = None,
creation_time: Optional[str] = None,
description: Optional[str] = None,
modify_time: Optional[str] = None,
name: Optional[str] = None,
runner_id: Optional[str] = None,
runner_type: Optional[str] = None,
type: Optional[str] = None) -> AutomationActionsAction
func GetAutomationActionsAction(ctx *Context, name string, id IDInput, state *AutomationActionsActionState, opts ...ResourceOption) (*AutomationActionsAction, error)
public static AutomationActionsAction Get(string name, Input<string> id, AutomationActionsActionState? state, CustomResourceOptions? opts = null)
public static AutomationActionsAction get(String name, Output<String> id, AutomationActionsActionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Action
Classification string - Action
Data AutomationReference Actions Action Action Data Reference - Action
Type string - Creation
Time string - The time action was created. Represented as an ISO 8601 timestamp.
- Description string
- Modify
Time string - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- Name string
- Runner
Id string - Runner
Type string - (Optional) The type of the runner associated with the action.
- Type string
- The type of object. The value returned will be
action
.
- Action
Classification string - Action
Data AutomationReference Actions Action Action Data Reference Args - Action
Type string - Creation
Time string - The time action was created. Represented as an ISO 8601 timestamp.
- Description string
- Modify
Time string - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- Name string
- Runner
Id string - Runner
Type string - (Optional) The type of the runner associated with the action.
- Type string
- The type of object. The value returned will be
action
.
- action
Classification String - action
Data AutomationReference Actions Action Action Data Reference - action
Type String - creation
Time String - The time action was created. Represented as an ISO 8601 timestamp.
- description String
- modify
Time String - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name String
- runner
Id String - runner
Type String - (Optional) The type of the runner associated with the action.
- type String
- The type of object. The value returned will be
action
.
- action
Classification string - action
Data AutomationReference Actions Action Action Data Reference - action
Type string - creation
Time string - The time action was created. Represented as an ISO 8601 timestamp.
- description string
- modify
Time string - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name string
- runner
Id string - runner
Type string - (Optional) The type of the runner associated with the action.
- type string
- The type of object. The value returned will be
action
.
- action_
classification str - action_
data_ Automationreference Actions Action Action Data Reference Args - action_
type str - creation_
time str - The time action was created. Represented as an ISO 8601 timestamp.
- description str
- modify_
time str - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name str
- runner_
id str - runner_
type str - (Optional) The type of the runner associated with the action.
- type str
- The type of object. The value returned will be
action
.
- action
Classification String - action
Data Property MapReference - action
Type String - creation
Time String - The time action was created. Represented as an ISO 8601 timestamp.
- description String
- modify
Time String - (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name String
- runner
Id String - runner
Type String - (Optional) The type of the runner associated with the action.
- type String
- The type of object. The value returned will be
action
.
Supporting Types
AutomationActionsActionActionDataReference, AutomationActionsActionActionDataReferenceArgs
- Invocation
Command string - Process
Automation stringJob Arguments - Process
Automation stringJob Id - Process
Automation stringNode Filter - Script string
- Invocation
Command string - Process
Automation stringJob Arguments - Process
Automation stringJob Id - Process
Automation stringNode Filter - Script string
- invocation
Command String - process
Automation StringJob Arguments - process
Automation StringJob Id - process
Automation StringNode Filter - script String
- invocation
Command string - process
Automation stringJob Arguments - process
Automation stringJob Id - process
Automation stringNode Filter - script string
- invocation
Command String - process
Automation StringJob Arguments - process
Automation StringJob Id - process
Automation StringNode Filter - script String
Import
Actions can be imported using the id
, e.g.
$ pulumi import pagerduty:index/automationActionsAction:AutomationActionsAction example 01DER7CUUBF7TH4116K0M4WKPU
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
pagerduty
Terraform Provider.