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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;
return await Deployment.RunAsync(() =>
{
var paActionExample = new Pagerduty.AutomationActionsAction("paActionExample", new()
{
ActionDataReference = new Pagerduty.Inputs.AutomationActionsActionActionDataReferenceArgs
{
ProcessAutomationJobId = "P123456",
},
ActionType = "process_automation",
Description = "Description of the PA Action created via TF",
});
var scriptActionExample = new Pagerduty.AutomationActionsAction("scriptActionExample", new()
{
ActionDataReference = new Pagerduty.Inputs.AutomationActionsActionActionDataReferenceArgs
{
InvocationCommand = "/usr/local/bin/python3",
Script = "print(\"Hello from a Python script!\")",
},
ActionType = "script",
Description = "Description of the Script Action created via TF",
});
});
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, "paActionExample", &pagerduty.AutomationActionsActionArgs{
ActionDataReference: &pagerduty.AutomationActionsActionActionDataReferenceArgs{
ProcessAutomationJobId: pulumi.String("P123456"),
},
ActionType: pulumi.String("process_automation"),
Description: pulumi.String("Description of the PA Action created via TF"),
})
if err != nil {
return err
}
_, err = pagerduty.NewAutomationActionsAction(ctx, "scriptActionExample", &pagerduty.AutomationActionsActionArgs{
ActionDataReference: &pagerduty.AutomationActionsActionActionDataReferenceArgs{
InvocationCommand: pulumi.String("/usr/local/bin/python3"),
Script: pulumi.String("print(\"Hello from a Python script!\")"),
},
ActionType: pulumi.String("script"),
Description: pulumi.String("Description of the Script Action created via TF"),
})
if err != nil {
return err
}
return nil
})
}
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()
.actionDataReference(AutomationActionsActionActionDataReferenceArgs.builder()
.processAutomationJobId("P123456")
.build())
.actionType("process_automation")
.description("Description of the PA Action created via TF")
.build());
var scriptActionExample = new AutomationActionsAction("scriptActionExample", AutomationActionsActionArgs.builder()
.actionDataReference(AutomationActionsActionActionDataReferenceArgs.builder()
.invocationCommand("/usr/local/bin/python3")
.script("print(\"Hello from a Python script!\")")
.build())
.actionType("script")
.description("Description of the Script Action created via TF")
.build());
}
}
import pulumi
import pulumi_pagerduty as pagerduty
pa_action_example = pagerduty.AutomationActionsAction("paActionExample",
action_data_reference=pagerduty.AutomationActionsActionActionDataReferenceArgs(
process_automation_job_id="P123456",
),
action_type="process_automation",
description="Description of the PA Action created via TF")
script_action_example = pagerduty.AutomationActionsAction("scriptActionExample",
action_data_reference=pagerduty.AutomationActionsActionActionDataReferenceArgs(
invocation_command="/usr/local/bin/python3",
script="print(\"Hello from a Python script!\")",
),
action_type="script",
description="Description of the Script Action created via TF")
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const paActionExample = new pagerduty.AutomationActionsAction("paActionExample", {
actionDataReference: {
processAutomationJobId: "P123456",
},
actionType: "process_automation",
description: "Description of the PA Action created via TF",
});
const scriptActionExample = new pagerduty.AutomationActionsAction("scriptActionExample", {
actionDataReference: {
invocationCommand: "/usr/local/bin/python3",
script: "print(\"Hello from a Python script!\")",
},
actionType: "script",
description: "Description of the Script Action created via TF",
});
resources:
paActionExample:
type: pagerduty:AutomationActionsAction
properties:
actionDataReference:
processAutomationJobId: P123456
actionType: process_automation
description: Description of the PA Action created via TF
scriptActionExample:
type: pagerduty:AutomationActionsAction
properties:
actionDataReference:
invocationCommand: /usr/local/bin/python3
script: print("Hello from a Python script!")
actionType: script
description: Description of the Script Action created via TF
Create AutomationActionsAction Resource
new AutomationActionsAction(name: string, args: AutomationActionsActionArgs, opts?: CustomResourceOptions);
@overload
def AutomationActionsAction(resource_name: 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)
@overload
def AutomationActionsAction(resource_name: str,
args: AutomationActionsActionArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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 Data block. Action Data is documented below.
- Action
Type string The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- Action
Classification string The category of the action. The only allowed values are
diagnostic
andremediation
.- Creation
Time string The time action was created. Represented as an ISO 8601 timestamp.
- Description string
The description of the action. Max length is 1024 characters.
- Modify
Time string (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- Name string
The name of the action. Max length is 255 characters.
- Runner
Id string The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 Data block. Action Data is documented below.
- Action
Type string The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- Action
Classification string The category of the action. The only allowed values are
diagnostic
andremediation
.- Creation
Time string The time action was created. Represented as an ISO 8601 timestamp.
- Description string
The description of the action. Max length is 1024 characters.
- Modify
Time string (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- Name string
The name of the action. Max length is 255 characters.
- Runner
Id string The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 Data block. Action Data is documented below.
- action
Type String The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- action
Classification String The category of the action. The only allowed values are
diagnostic
andremediation
.- creation
Time String The time action was created. Represented as an ISO 8601 timestamp.
- description String
The description of the action. Max length is 1024 characters.
- modify
Time String (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name String
The name of the action. Max length is 255 characters.
- runner
Id String The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 Data block. Action Data is documented below.
- action
Type string The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- action
Classification string The category of the action. The only allowed values are
diagnostic
andremediation
.- creation
Time string The time action was created. Represented as an ISO 8601 timestamp.
- description string
The description of the action. Max length is 1024 characters.
- modify
Time string (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name string
The name of the action. Max length is 255 characters.
- runner
Id string The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 Data block. Action Data is documented below.
- action_
type str The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- action_
classification str The category of the action. The only allowed values are
diagnostic
andremediation
.- creation_
time str The time action was created. Represented as an ISO 8601 timestamp.
- description str
The description of the action. Max length is 1024 characters.
- modify_
time str (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name str
The name of the action. Max length is 255 characters.
- runner_
id str The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 Data block. Action Data is documented below.
- action
Type String The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- action
Classification String The category of the action. The only allowed values are
diagnostic
andremediation
.- creation
Time String The time action was created. Represented as an ISO 8601 timestamp.
- description String
The description of the action. Max length is 1024 characters.
- modify
Time String (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name String
The name of the action. Max length is 255 characters.
- runner
Id String The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 The category of the action. The only allowed values are
diagnostic
andremediation
.- Action
Data AutomationReference Actions Action Action Data Reference Action Data block. Action Data is documented below.
- Action
Type string The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- Creation
Time string The time action was created. Represented as an ISO 8601 timestamp.
- Description string
The description of the action. Max length is 1024 characters.
- Modify
Time string (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- Name string
The name of the action. Max length is 255 characters.
- Runner
Id string The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 The category of the action. The only allowed values are
diagnostic
andremediation
.- Action
Data AutomationReference Actions Action Action Data Reference Args Action Data block. Action Data is documented below.
- Action
Type string The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- Creation
Time string The time action was created. Represented as an ISO 8601 timestamp.
- Description string
The description of the action. Max length is 1024 characters.
- Modify
Time string (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- Name string
The name of the action. Max length is 255 characters.
- Runner
Id string The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 The category of the action. The only allowed values are
diagnostic
andremediation
.- action
Data AutomationReference Actions Action Action Data Reference Action Data block. Action Data is documented below.
- action
Type String The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- creation
Time String The time action was created. Represented as an ISO 8601 timestamp.
- description String
The description of the action. Max length is 1024 characters.
- modify
Time String (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name String
The name of the action. Max length is 255 characters.
- runner
Id String The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 The category of the action. The only allowed values are
diagnostic
andremediation
.- action
Data AutomationReference Actions Action Action Data Reference Action Data block. Action Data is documented below.
- action
Type string The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- creation
Time string The time action was created. Represented as an ISO 8601 timestamp.
- description string
The description of the action. Max length is 1024 characters.
- modify
Time string (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name string
The name of the action. Max length is 255 characters.
- runner
Id string The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 The category of the action. The only allowed values are
diagnostic
andremediation
.- action_
data_ Automationreference Actions Action Action Data Reference Args Action Data block. Action Data is documented below.
- action_
type str The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- creation_
time str The time action was created. Represented as an ISO 8601 timestamp.
- description str
The description of the action. Max length is 1024 characters.
- modify_
time str (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name str
The name of the action. Max length is 255 characters.
- runner_
id str The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 The category of the action. The only allowed values are
diagnostic
andremediation
.- action
Data Property MapReference Action Data block. Action Data is documented below.
- action
Type String The type of the action. The only allowed values are
process_automation
andscript
. Cannot be changed once set.- creation
Time String The time action was created. Represented as an ISO 8601 timestamp.
- description String
The description of the action. Max length is 1024 characters.
- modify
Time String (Optional) The last time action has been modified. Represented as an ISO 8601 timestamp.
- name String
The name of the action. Max length is 255 characters.
- runner
Id String The Process Automation Actions runner to associate the action with. Cannot be changed for the
process_automation
action type once set.- 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 The command to execute the script with.
- Process
Automation stringJob Arguments The arguments to pass to the Process Automation job execution.
- Process
Automation stringJob Id The ID of the Process Automation job to execute.
- Process
Automation stringNode Filter The expression that filters on which nodes a Process Automation Job executes Learn more.
- Script string
Body of the script to be executed on the Runner. Max length is 16777215 characters.
- Invocation
Command string The command to execute the script with.
- Process
Automation stringJob Arguments The arguments to pass to the Process Automation job execution.
- Process
Automation stringJob Id The ID of the Process Automation job to execute.
- Process
Automation stringNode Filter The expression that filters on which nodes a Process Automation Job executes Learn more.
- Script string
Body of the script to be executed on the Runner. Max length is 16777215 characters.
- invocation
Command String The command to execute the script with.
- process
Automation StringJob Arguments The arguments to pass to the Process Automation job execution.
- process
Automation StringJob Id The ID of the Process Automation job to execute.
- process
Automation StringNode Filter The expression that filters on which nodes a Process Automation Job executes Learn more.
- script String
Body of the script to be executed on the Runner. Max length is 16777215 characters.
- invocation
Command string The command to execute the script with.
- process
Automation stringJob Arguments The arguments to pass to the Process Automation job execution.
- process
Automation stringJob Id The ID of the Process Automation job to execute.
- process
Automation stringNode Filter The expression that filters on which nodes a Process Automation Job executes Learn more.
- script string
Body of the script to be executed on the Runner. Max length is 16777215 characters.
- invocation_
command str The command to execute the script with.
- process_
automation_ strjob_ arguments The arguments to pass to the Process Automation job execution.
- process_
automation_ strjob_ id The ID of the Process Automation job to execute.
- process_
automation_ strnode_ filter The expression that filters on which nodes a Process Automation Job executes Learn more.
- script str
Body of the script to be executed on the Runner. Max length is 16777215 characters.
- invocation
Command String The command to execute the script with.
- process
Automation StringJob Arguments The arguments to pass to the Process Automation job execution.
- process
Automation StringJob Id The ID of the Process Automation job to execute.
- process
Automation StringNode Filter The expression that filters on which nodes a Process Automation Job executes Learn more.
- script String
Body of the script to be executed on the Runner. Max length is 16777215 characters.
Import
Actions can be imported using the id
, e.g.
$ pulumi import pagerduty:index/automationActionsAction:AutomationActionsAction example 01DER7CUUBF7TH4116K0M4WKPU
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
pagerduty
Terraform Provider.