1. Packages
  2. Pagerduty Provider
  3. API Docs
  4. AutomationActionsActionTeamAssociation
PagerDuty v4.17.0 published on Wednesday, Nov 20, 2024 by Pulumi

pagerduty.AutomationActionsActionTeamAssociation

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.17.0 published on Wednesday, Nov 20, 2024 by Pulumi

    An Automation Actions action association with a team configures the relation of a specific Action with a Team.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const example = new pagerduty.Team("example", {
        name: "Engineering",
        description: "All engineering",
    });
    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 foo = new pagerduty.AutomationActionsActionTeamAssociation("foo", {
        actionId: paActionExample.id,
        teamId: example.id,
    });
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    example = pagerduty.Team("example",
        name="Engineering",
        description="All engineering")
    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={
            "process_automation_job_id": "P123456",
        })
    foo = pagerduty.AutomationActionsActionTeamAssociation("foo",
        action_id=pa_action_example.id,
        team_id=example.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 {
    		example, err := pagerduty.NewTeam(ctx, "example", &pagerduty.TeamArgs{
    			Name:        pulumi.String("Engineering"),
    			Description: pulumi.String("All engineering"),
    		})
    		if err != nil {
    			return err
    		}
    		paActionExample, 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.NewAutomationActionsActionTeamAssociation(ctx, "foo", &pagerduty.AutomationActionsActionTeamAssociationArgs{
    			ActionId: paActionExample.ID(),
    			TeamId:   example.ID(),
    		})
    		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 example = new Pagerduty.Team("example", new()
        {
            Name = "Engineering",
            Description = "All engineering",
        });
    
        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 foo = new Pagerduty.AutomationActionsActionTeamAssociation("foo", new()
        {
            ActionId = paActionExample.Id,
            TeamId = example.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.pagerduty.Team;
    import com.pulumi.pagerduty.TeamArgs;
    import com.pulumi.pagerduty.AutomationActionsAction;
    import com.pulumi.pagerduty.AutomationActionsActionArgs;
    import com.pulumi.pagerduty.inputs.AutomationActionsActionActionDataReferenceArgs;
    import com.pulumi.pagerduty.AutomationActionsActionTeamAssociation;
    import com.pulumi.pagerduty.AutomationActionsActionTeamAssociationArgs;
    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 example = new Team("example", TeamArgs.builder()
                .name("Engineering")
                .description("All engineering")
                .build());
    
            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 foo = new AutomationActionsActionTeamAssociation("foo", AutomationActionsActionTeamAssociationArgs.builder()
                .actionId(paActionExample.id())
                .teamId(example.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: pagerduty:Team
        properties:
          name: Engineering
          description: All engineering
      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
      foo:
        type: pagerduty:AutomationActionsActionTeamAssociation
        properties:
          actionId: ${paActionExample.id}
          teamId: ${example.id}
    

    Create AutomationActionsActionTeamAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AutomationActionsActionTeamAssociation(name: string, args: AutomationActionsActionTeamAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def AutomationActionsActionTeamAssociation(resource_name: str,
                                               args: AutomationActionsActionTeamAssociationArgs,
                                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def AutomationActionsActionTeamAssociation(resource_name: str,
                                               opts: Optional[ResourceOptions] = None,
                                               action_id: Optional[str] = None,
                                               team_id: Optional[str] = None)
    func NewAutomationActionsActionTeamAssociation(ctx *Context, name string, args AutomationActionsActionTeamAssociationArgs, opts ...ResourceOption) (*AutomationActionsActionTeamAssociation, error)
    public AutomationActionsActionTeamAssociation(string name, AutomationActionsActionTeamAssociationArgs args, CustomResourceOptions? opts = null)
    public AutomationActionsActionTeamAssociation(String name, AutomationActionsActionTeamAssociationArgs args)
    public AutomationActionsActionTeamAssociation(String name, AutomationActionsActionTeamAssociationArgs args, CustomResourceOptions options)
    
    type: pagerduty:AutomationActionsActionTeamAssociation
    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 AutomationActionsActionTeamAssociationArgs
    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 AutomationActionsActionTeamAssociationArgs
    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 AutomationActionsActionTeamAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AutomationActionsActionTeamAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AutomationActionsActionTeamAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var automationActionsActionTeamAssociationResource = new Pagerduty.AutomationActionsActionTeamAssociation("automationActionsActionTeamAssociationResource", new()
    {
        ActionId = "string",
        TeamId = "string",
    });
    
    example, err := pagerduty.NewAutomationActionsActionTeamAssociation(ctx, "automationActionsActionTeamAssociationResource", &pagerduty.AutomationActionsActionTeamAssociationArgs{
    	ActionId: pulumi.String("string"),
    	TeamId:   pulumi.String("string"),
    })
    
    var automationActionsActionTeamAssociationResource = new AutomationActionsActionTeamAssociation("automationActionsActionTeamAssociationResource", AutomationActionsActionTeamAssociationArgs.builder()
        .actionId("string")
        .teamId("string")
        .build());
    
    automation_actions_action_team_association_resource = pagerduty.AutomationActionsActionTeamAssociation("automationActionsActionTeamAssociationResource",
        action_id="string",
        team_id="string")
    
    const automationActionsActionTeamAssociationResource = new pagerduty.AutomationActionsActionTeamAssociation("automationActionsActionTeamAssociationResource", {
        actionId: "string",
        teamId: "string",
    });
    
    type: pagerduty:AutomationActionsActionTeamAssociation
    properties:
        actionId: string
        teamId: string
    

    AutomationActionsActionTeamAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AutomationActionsActionTeamAssociation resource accepts the following input properties:

    ActionId string
    Id of the action.
    TeamId string
    Id of the team associated to the action.
    ActionId string
    Id of the action.
    TeamId string
    Id of the team associated to the action.
    actionId String
    Id of the action.
    teamId String
    Id of the team associated to the action.
    actionId string
    Id of the action.
    teamId string
    Id of the team associated to the action.
    action_id str
    Id of the action.
    team_id str
    Id of the team associated to the action.
    actionId String
    Id of the action.
    teamId String
    Id of the team associated to the action.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AutomationActionsActionTeamAssociation 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 AutomationActionsActionTeamAssociation Resource

    Get an existing AutomationActionsActionTeamAssociation 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?: AutomationActionsActionTeamAssociationState, opts?: CustomResourceOptions): AutomationActionsActionTeamAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action_id: Optional[str] = None,
            team_id: Optional[str] = None) -> AutomationActionsActionTeamAssociation
    func GetAutomationActionsActionTeamAssociation(ctx *Context, name string, id IDInput, state *AutomationActionsActionTeamAssociationState, opts ...ResourceOption) (*AutomationActionsActionTeamAssociation, error)
    public static AutomationActionsActionTeamAssociation Get(string name, Input<string> id, AutomationActionsActionTeamAssociationState? state, CustomResourceOptions? opts = null)
    public static AutomationActionsActionTeamAssociation get(String name, Output<String> id, AutomationActionsActionTeamAssociationState 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.
    The following state arguments are supported:
    ActionId string
    Id of the action.
    TeamId string
    Id of the team associated to the action.
    ActionId string
    Id of the action.
    TeamId string
    Id of the team associated to the action.
    actionId String
    Id of the action.
    teamId String
    Id of the team associated to the action.
    actionId string
    Id of the action.
    teamId string
    Id of the team associated to the action.
    action_id str
    Id of the action.
    team_id str
    Id of the team associated to the action.
    actionId String
    Id of the action.
    teamId String
    Id of the team associated to the action.

    Import

    Action team association can be imported using the action_id and team_id separated by a colon, e.g.

    $ pulumi import pagerduty:index/automationActionsActionTeamAssociation:AutomationActionsActionTeamAssociation example 01DER7CUUBF7TH4116K0M4WKPU:PLB09Z
    

    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.
    pagerduty logo
    PagerDuty v4.17.0 published on Wednesday, Nov 20, 2024 by Pulumi