pagerduty.AutomationActionsActionServiceAssociation
Explore with Pulumi AI
An Automation Actions action association with a service configures the relation of a specific Action with a Service.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;
return await Deployment.RunAsync(() =>
{
var exampleUser = new Pagerduty.User("exampleUser", new()
{
Email = "125.greenholt.earline@graham.name",
});
var fooEscalationPolicy = new Pagerduty.EscalationPolicy("fooEscalationPolicy", new()
{
NumLoops = 2,
Rules = new[]
{
new Pagerduty.Inputs.EscalationPolicyRuleArgs
{
EscalationDelayInMinutes = 10,
Targets = new[]
{
new Pagerduty.Inputs.EscalationPolicyRuleTargetArgs
{
Type = "user_reference",
Id = exampleUser.Id,
},
},
},
},
});
var exampleService = new Pagerduty.Service("exampleService", new()
{
AutoResolveTimeout = "14400",
AcknowledgementTimeout = "600",
EscalationPolicy = fooEscalationPolicy.Id,
AlertCreation = "create_alerts_and_incidents",
AutoPauseNotificationsParameters = new Pagerduty.Inputs.ServiceAutoPauseNotificationsParametersArgs
{
Enabled = true,
Timeout = 300,
},
});
var paActionExample = new Pagerduty.AutomationActionsAction("paActionExample", new()
{
Description = "Description of the PA Action created via TF",
ActionType = "process_automation",
ActionDataReference = new Pagerduty.Inputs.AutomationActionsActionActionDataReferenceArgs
{
ProcessAutomationJobId = "P123456",
},
});
var fooAutomationActionsActionServiceAssociation = new Pagerduty.AutomationActionsActionServiceAssociation("fooAutomationActionsActionServiceAssociation", new()
{
ActionId = paActionExample.Id,
ServiceId = exampleService.Id,
});
});
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 {
exampleUser, err := pagerduty.NewUser(ctx, "exampleUser", &pagerduty.UserArgs{
Email: pulumi.String("125.greenholt.earline@graham.name"),
})
if err != nil {
return err
}
fooEscalationPolicy, err := pagerduty.NewEscalationPolicy(ctx, "fooEscalationPolicy", &pagerduty.EscalationPolicyArgs{
NumLoops: pulumi.Int(2),
Rules: pagerduty.EscalationPolicyRuleArray{
&pagerduty.EscalationPolicyRuleArgs{
EscalationDelayInMinutes: pulumi.Int(10),
Targets: pagerduty.EscalationPolicyRuleTargetArray{
&pagerduty.EscalationPolicyRuleTargetArgs{
Type: pulumi.String("user_reference"),
Id: exampleUser.ID(),
},
},
},
},
})
if err != nil {
return err
}
exampleService, err := pagerduty.NewService(ctx, "exampleService", &pagerduty.ServiceArgs{
AutoResolveTimeout: pulumi.String("14400"),
AcknowledgementTimeout: pulumi.String("600"),
EscalationPolicy: fooEscalationPolicy.ID(),
AlertCreation: pulumi.String("create_alerts_and_incidents"),
AutoPauseNotificationsParameters: &pagerduty.ServiceAutoPauseNotificationsParametersArgs{
Enabled: pulumi.Bool(true),
Timeout: pulumi.Int(300),
},
})
if err != nil {
return err
}
paActionExample, err := pagerduty.NewAutomationActionsAction(ctx, "paActionExample", &pagerduty.AutomationActionsActionArgs{
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.NewAutomationActionsActionServiceAssociation(ctx, "fooAutomationActionsActionServiceAssociation", &pagerduty.AutomationActionsActionServiceAssociationArgs{
ActionId: paActionExample.ID(),
ServiceId: exampleService.ID(),
})
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.User;
import com.pulumi.pagerduty.UserArgs;
import com.pulumi.pagerduty.EscalationPolicy;
import com.pulumi.pagerduty.EscalationPolicyArgs;
import com.pulumi.pagerduty.inputs.EscalationPolicyRuleArgs;
import com.pulumi.pagerduty.Service;
import com.pulumi.pagerduty.ServiceArgs;
import com.pulumi.pagerduty.inputs.ServiceAutoPauseNotificationsParametersArgs;
import com.pulumi.pagerduty.AutomationActionsAction;
import com.pulumi.pagerduty.AutomationActionsActionArgs;
import com.pulumi.pagerduty.inputs.AutomationActionsActionActionDataReferenceArgs;
import com.pulumi.pagerduty.AutomationActionsActionServiceAssociation;
import com.pulumi.pagerduty.AutomationActionsActionServiceAssociationArgs;
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 exampleUser = new User("exampleUser", UserArgs.builder()
.email("125.greenholt.earline@graham.name")
.build());
var fooEscalationPolicy = new EscalationPolicy("fooEscalationPolicy", EscalationPolicyArgs.builder()
.numLoops(2)
.rules(EscalationPolicyRuleArgs.builder()
.escalationDelayInMinutes(10)
.targets(EscalationPolicyRuleTargetArgs.builder()
.type("user_reference")
.id(exampleUser.id())
.build())
.build())
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.autoResolveTimeout(14400)
.acknowledgementTimeout(600)
.escalationPolicy(fooEscalationPolicy.id())
.alertCreation("create_alerts_and_incidents")
.autoPauseNotificationsParameters(ServiceAutoPauseNotificationsParametersArgs.builder()
.enabled(true)
.timeout(300)
.build())
.build());
var paActionExample = new AutomationActionsAction("paActionExample", AutomationActionsActionArgs.builder()
.description("Description of the PA Action created via TF")
.actionType("process_automation")
.actionDataReference(AutomationActionsActionActionDataReferenceArgs.builder()
.processAutomationJobId("P123456")
.build())
.build());
var fooAutomationActionsActionServiceAssociation = new AutomationActionsActionServiceAssociation("fooAutomationActionsActionServiceAssociation", AutomationActionsActionServiceAssociationArgs.builder()
.actionId(paActionExample.id())
.serviceId(exampleService.id())
.build());
}
}
import pulumi
import pulumi_pagerduty as pagerduty
example_user = pagerduty.User("exampleUser", email="125.greenholt.earline@graham.name")
foo_escalation_policy = pagerduty.EscalationPolicy("fooEscalationPolicy",
num_loops=2,
rules=[pagerduty.EscalationPolicyRuleArgs(
escalation_delay_in_minutes=10,
targets=[pagerduty.EscalationPolicyRuleTargetArgs(
type="user_reference",
id=example_user.id,
)],
)])
example_service = pagerduty.Service("exampleService",
auto_resolve_timeout="14400",
acknowledgement_timeout="600",
escalation_policy=foo_escalation_policy.id,
alert_creation="create_alerts_and_incidents",
auto_pause_notifications_parameters=pagerduty.ServiceAutoPauseNotificationsParametersArgs(
enabled=True,
timeout=300,
))
pa_action_example = pagerduty.AutomationActionsAction("paActionExample",
description="Description of the PA Action created via TF",
action_type="process_automation",
action_data_reference=pagerduty.AutomationActionsActionActionDataReferenceArgs(
process_automation_job_id="P123456",
))
foo_automation_actions_action_service_association = pagerduty.AutomationActionsActionServiceAssociation("fooAutomationActionsActionServiceAssociation",
action_id=pa_action_example.id,
service_id=example_service.id)
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const exampleUser = new pagerduty.User("exampleUser", {email: "125.greenholt.earline@graham.name"});
const fooEscalationPolicy = new pagerduty.EscalationPolicy("fooEscalationPolicy", {
numLoops: 2,
rules: [{
escalationDelayInMinutes: 10,
targets: [{
type: "user_reference",
id: exampleUser.id,
}],
}],
});
const exampleService = new pagerduty.Service("exampleService", {
autoResolveTimeout: "14400",
acknowledgementTimeout: "600",
escalationPolicy: fooEscalationPolicy.id,
alertCreation: "create_alerts_and_incidents",
autoPauseNotificationsParameters: {
enabled: true,
timeout: 300,
},
});
const paActionExample = new pagerduty.AutomationActionsAction("paActionExample", {
description: "Description of the PA Action created via TF",
actionType: "process_automation",
actionDataReference: {
processAutomationJobId: "P123456",
},
});
const fooAutomationActionsActionServiceAssociation = new pagerduty.AutomationActionsActionServiceAssociation("fooAutomationActionsActionServiceAssociation", {
actionId: paActionExample.id,
serviceId: exampleService.id,
});
resources:
exampleUser:
type: pagerduty:User
properties:
email: 125.greenholt.earline@graham.name
fooEscalationPolicy:
type: pagerduty:EscalationPolicy
properties:
numLoops: 2
rules:
- escalationDelayInMinutes: 10
targets:
- type: user_reference
id: ${exampleUser.id}
exampleService:
type: pagerduty:Service
properties:
autoResolveTimeout: 14400
acknowledgementTimeout: 600
escalationPolicy: ${fooEscalationPolicy.id}
alertCreation: create_alerts_and_incidents
autoPauseNotificationsParameters:
enabled: true
timeout: 300
paActionExample:
type: pagerduty:AutomationActionsAction
properties:
description: Description of the PA Action created via TF
actionType: process_automation
actionDataReference:
processAutomationJobId: P123456
fooAutomationActionsActionServiceAssociation:
type: pagerduty:AutomationActionsActionServiceAssociation
properties:
actionId: ${paActionExample.id}
serviceId: ${exampleService.id}
Create AutomationActionsActionServiceAssociation Resource
new AutomationActionsActionServiceAssociation(name: string, args: AutomationActionsActionServiceAssociationArgs, opts?: CustomResourceOptions);
@overload
def AutomationActionsActionServiceAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
action_id: Optional[str] = None,
service_id: Optional[str] = None)
@overload
def AutomationActionsActionServiceAssociation(resource_name: str,
args: AutomationActionsActionServiceAssociationArgs,
opts: Optional[ResourceOptions] = None)
func NewAutomationActionsActionServiceAssociation(ctx *Context, name string, args AutomationActionsActionServiceAssociationArgs, opts ...ResourceOption) (*AutomationActionsActionServiceAssociation, error)
public AutomationActionsActionServiceAssociation(string name, AutomationActionsActionServiceAssociationArgs args, CustomResourceOptions? opts = null)
public AutomationActionsActionServiceAssociation(String name, AutomationActionsActionServiceAssociationArgs args)
public AutomationActionsActionServiceAssociation(String name, AutomationActionsActionServiceAssociationArgs args, CustomResourceOptions options)
type: pagerduty:AutomationActionsActionServiceAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AutomationActionsActionServiceAssociationArgs
- 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 AutomationActionsActionServiceAssociationArgs
- 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 AutomationActionsActionServiceAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AutomationActionsActionServiceAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AutomationActionsActionServiceAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AutomationActionsActionServiceAssociation 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 AutomationActionsActionServiceAssociation resource accepts the following input properties:
- action_
id str Id of the action.
- service_
id str Id of the service associated to the action.
Outputs
All input properties are implicitly available as output properties. Additionally, the AutomationActionsActionServiceAssociation 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 AutomationActionsActionServiceAssociation Resource
Get an existing AutomationActionsActionServiceAssociation 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?: AutomationActionsActionServiceAssociationState, opts?: CustomResourceOptions): AutomationActionsActionServiceAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action_id: Optional[str] = None,
service_id: Optional[str] = None) -> AutomationActionsActionServiceAssociation
func GetAutomationActionsActionServiceAssociation(ctx *Context, name string, id IDInput, state *AutomationActionsActionServiceAssociationState, opts ...ResourceOption) (*AutomationActionsActionServiceAssociation, error)
public static AutomationActionsActionServiceAssociation Get(string name, Input<string> id, AutomationActionsActionServiceAssociationState? state, CustomResourceOptions? opts = null)
public static AutomationActionsActionServiceAssociation get(String name, Output<String> id, AutomationActionsActionServiceAssociationState 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_
id str Id of the action.
- service_
id str Id of the service associated to the action.
Import
Action service association can be imported using the action_id
and service_id
separated by a colon, e.g.
$ pulumi import pagerduty:index/automationActionsActionServiceAssociation:AutomationActionsActionServiceAssociation example 01DER7CUUBF7TH4116K0M4WKPU:PLB09Z
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
pagerduty
Terraform Provider.