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

pagerduty.getEventOrchestrationServiceCacheVariable

Explore with Pulumi AI

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

    Use this data source to get information about a specific Cache Variable for a Service Event Orchestration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const engineering = new pagerduty.Team("engineering", {name: "Engineering"});
    const example = new pagerduty.User("example", {
        name: "Earline Greenholt",
        email: "125.greenholt.earline@graham.name",
        teams: [engineering.id],
    });
    const exampleEscalationPolicy = new pagerduty.EscalationPolicy("example", {
        name: "Engineering Escalation Policy",
        numLoops: 2,
        rules: [{
            escalationDelayInMinutes: 10,
            targets: [{
                type: "user",
                id: example.id,
            }],
        }],
    });
    const service = new pagerduty.Service("service", {
        name: "My Web App",
        autoResolveTimeout: "14400",
        acknowledgementTimeout: "600",
        escalationPolicy: exampleEscalationPolicy.id,
        alertCreation: "create_alerts_and_incidents",
    });
    const cacheVariable = pagerduty.getEventOrchestrationServiceCacheVariableOutput({
        service: service.id,
        name: "example_cache_variable",
    });
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    engineering = pagerduty.Team("engineering", name="Engineering")
    example = pagerduty.User("example",
        name="Earline Greenholt",
        email="125.greenholt.earline@graham.name",
        teams=[engineering.id])
    example_escalation_policy = pagerduty.EscalationPolicy("example",
        name="Engineering Escalation Policy",
        num_loops=2,
        rules=[{
            "escalation_delay_in_minutes": 10,
            "targets": [{
                "type": "user",
                "id": example.id,
            }],
        }])
    service = pagerduty.Service("service",
        name="My Web App",
        auto_resolve_timeout="14400",
        acknowledgement_timeout="600",
        escalation_policy=example_escalation_policy.id,
        alert_creation="create_alerts_and_incidents")
    cache_variable = pagerduty.get_event_orchestration_service_cache_variable_output(service=service.id,
        name="example_cache_variable")
    
    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 {
    		engineering, err := pagerduty.NewTeam(ctx, "engineering", &pagerduty.TeamArgs{
    			Name: pulumi.String("Engineering"),
    		})
    		if err != nil {
    			return err
    		}
    		example, err := pagerduty.NewUser(ctx, "example", &pagerduty.UserArgs{
    			Name:  pulumi.String("Earline Greenholt"),
    			Email: pulumi.String("125.greenholt.earline@graham.name"),
    			Teams: pulumi.StringArray{
    				engineering.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleEscalationPolicy, err := pagerduty.NewEscalationPolicy(ctx, "example", &pagerduty.EscalationPolicyArgs{
    			Name:     pulumi.String("Engineering Escalation Policy"),
    			NumLoops: pulumi.Int(2),
    			Rules: pagerduty.EscalationPolicyRuleArray{
    				&pagerduty.EscalationPolicyRuleArgs{
    					EscalationDelayInMinutes: pulumi.Int(10),
    					Targets: pagerduty.EscalationPolicyRuleTargetArray{
    						&pagerduty.EscalationPolicyRuleTargetArgs{
    							Type: pulumi.String("user"),
    							Id:   example.ID(),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		service, err := pagerduty.NewService(ctx, "service", &pagerduty.ServiceArgs{
    			Name:                   pulumi.String("My Web App"),
    			AutoResolveTimeout:     pulumi.String("14400"),
    			AcknowledgementTimeout: pulumi.String("600"),
    			EscalationPolicy:       exampleEscalationPolicy.ID(),
    			AlertCreation:          pulumi.String("create_alerts_and_incidents"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = pagerduty.LookupEventOrchestrationServiceCacheVariableOutput(ctx, pagerduty.GetEventOrchestrationServiceCacheVariableOutputArgs{
    			Service: service.ID(),
    			Name:    pulumi.String("example_cache_variable"),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pagerduty = Pulumi.Pagerduty;
    
    return await Deployment.RunAsync(() => 
    {
        var engineering = new Pagerduty.Team("engineering", new()
        {
            Name = "Engineering",
        });
    
        var example = new Pagerduty.User("example", new()
        {
            Name = "Earline Greenholt",
            Email = "125.greenholt.earline@graham.name",
            Teams = new[]
            {
                engineering.Id,
            },
        });
    
        var exampleEscalationPolicy = new Pagerduty.EscalationPolicy("example", new()
        {
            Name = "Engineering Escalation Policy",
            NumLoops = 2,
            Rules = new[]
            {
                new Pagerduty.Inputs.EscalationPolicyRuleArgs
                {
                    EscalationDelayInMinutes = 10,
                    Targets = new[]
                    {
                        new Pagerduty.Inputs.EscalationPolicyRuleTargetArgs
                        {
                            Type = "user",
                            Id = example.Id,
                        },
                    },
                },
            },
        });
    
        var service = new Pagerduty.Service("service", new()
        {
            Name = "My Web App",
            AutoResolveTimeout = "14400",
            AcknowledgementTimeout = "600",
            EscalationPolicy = exampleEscalationPolicy.Id,
            AlertCreation = "create_alerts_and_incidents",
        });
    
        var cacheVariable = Pagerduty.GetEventOrchestrationServiceCacheVariable.Invoke(new()
        {
            Service = service.Id,
            Name = "example_cache_variable",
        });
    
    });
    
    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.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.PagerdutyFunctions;
    import com.pulumi.pagerduty.inputs.GetEventOrchestrationServiceCacheVariableArgs;
    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 engineering = new Team("engineering", TeamArgs.builder()
                .name("Engineering")
                .build());
    
            var example = new User("example", UserArgs.builder()
                .name("Earline Greenholt")
                .email("125.greenholt.earline@graham.name")
                .teams(engineering.id())
                .build());
    
            var exampleEscalationPolicy = new EscalationPolicy("exampleEscalationPolicy", EscalationPolicyArgs.builder()
                .name("Engineering Escalation Policy")
                .numLoops(2)
                .rules(EscalationPolicyRuleArgs.builder()
                    .escalationDelayInMinutes(10)
                    .targets(EscalationPolicyRuleTargetArgs.builder()
                        .type("user")
                        .id(example.id())
                        .build())
                    .build())
                .build());
    
            var service = new Service("service", ServiceArgs.builder()
                .name("My Web App")
                .autoResolveTimeout(14400)
                .acknowledgementTimeout(600)
                .escalationPolicy(exampleEscalationPolicy.id())
                .alertCreation("create_alerts_and_incidents")
                .build());
    
            final var cacheVariable = PagerdutyFunctions.getEventOrchestrationServiceCacheVariable(GetEventOrchestrationServiceCacheVariableArgs.builder()
                .service(service.id())
                .name("example_cache_variable")
                .build());
    
        }
    }
    
    resources:
      engineering:
        type: pagerduty:Team
        properties:
          name: Engineering
      example:
        type: pagerduty:User
        properties:
          name: Earline Greenholt
          email: 125.greenholt.earline@graham.name
          teams:
            - ${engineering.id}
      exampleEscalationPolicy:
        type: pagerduty:EscalationPolicy
        name: example
        properties:
          name: Engineering Escalation Policy
          numLoops: 2
          rules:
            - escalationDelayInMinutes: 10
              targets:
                - type: user
                  id: ${example.id}
      service:
        type: pagerduty:Service
        properties:
          name: My Web App
          autoResolveTimeout: 14400
          acknowledgementTimeout: 600
          escalationPolicy: ${exampleEscalationPolicy.id}
          alertCreation: create_alerts_and_incidents
    variables:
      cacheVariable:
        fn::invoke:
          Function: pagerduty:getEventOrchestrationServiceCacheVariable
          Arguments:
            service: ${service.id}
            name: example_cache_variable
    

    Using getEventOrchestrationServiceCacheVariable

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getEventOrchestrationServiceCacheVariable(args: GetEventOrchestrationServiceCacheVariableArgs, opts?: InvokeOptions): Promise<GetEventOrchestrationServiceCacheVariableResult>
    function getEventOrchestrationServiceCacheVariableOutput(args: GetEventOrchestrationServiceCacheVariableOutputArgs, opts?: InvokeOptions): Output<GetEventOrchestrationServiceCacheVariableResult>
    def get_event_orchestration_service_cache_variable(id: Optional[str] = None,
                                                       name: Optional[str] = None,
                                                       service: Optional[str] = None,
                                                       opts: Optional[InvokeOptions] = None) -> GetEventOrchestrationServiceCacheVariableResult
    def get_event_orchestration_service_cache_variable_output(id: Optional[pulumi.Input[str]] = None,
                                                       name: Optional[pulumi.Input[str]] = None,
                                                       service: Optional[pulumi.Input[str]] = None,
                                                       opts: Optional[InvokeOptions] = None) -> Output[GetEventOrchestrationServiceCacheVariableResult]
    func LookupEventOrchestrationServiceCacheVariable(ctx *Context, args *LookupEventOrchestrationServiceCacheVariableArgs, opts ...InvokeOption) (*LookupEventOrchestrationServiceCacheVariableResult, error)
    func LookupEventOrchestrationServiceCacheVariableOutput(ctx *Context, args *LookupEventOrchestrationServiceCacheVariableOutputArgs, opts ...InvokeOption) LookupEventOrchestrationServiceCacheVariableResultOutput

    > Note: This function is named LookupEventOrchestrationServiceCacheVariable in the Go SDK.

    public static class GetEventOrchestrationServiceCacheVariable 
    {
        public static Task<GetEventOrchestrationServiceCacheVariableResult> InvokeAsync(GetEventOrchestrationServiceCacheVariableArgs args, InvokeOptions? opts = null)
        public static Output<GetEventOrchestrationServiceCacheVariableResult> Invoke(GetEventOrchestrationServiceCacheVariableInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEventOrchestrationServiceCacheVariableResult> getEventOrchestrationServiceCacheVariable(GetEventOrchestrationServiceCacheVariableArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: pagerduty:index/getEventOrchestrationServiceCacheVariable:getEventOrchestrationServiceCacheVariable
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Service string
    ID of the Service Event Orchestration to which this Cache Variable belongs.
    Id string
    ID of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    Name string
    Name of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    Service string
    ID of the Service Event Orchestration to which this Cache Variable belongs.
    Id string
    ID of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    Name string
    Name of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    service String
    ID of the Service Event Orchestration to which this Cache Variable belongs.
    id String
    ID of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    name String
    Name of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    service string
    ID of the Service Event Orchestration to which this Cache Variable belongs.
    id string
    ID of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    name string
    Name of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    service str
    ID of the Service Event Orchestration to which this Cache Variable belongs.
    id str
    ID of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    name str
    Name of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    service String
    ID of the Service Event Orchestration to which this Cache Variable belongs.
    id String
    ID of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.
    name String
    Name of the Cache Variable associated with the Service Event Orchestration. Specify either id or name. If both are specified id takes precedence.

    getEventOrchestrationServiceCacheVariable Result

    The following output properties are available:

    Conditions List<GetEventOrchestrationServiceCacheVariableCondition>
    Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value.
    Configurations List<GetEventOrchestrationServiceCacheVariableConfiguration>
    A configuration object to define what and how values will be stored in the Cache Variable.
    Disabled bool
    Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
    Service string
    Id string
    Name string
    Conditions []GetEventOrchestrationServiceCacheVariableCondition
    Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value.
    Configurations []GetEventOrchestrationServiceCacheVariableConfiguration
    A configuration object to define what and how values will be stored in the Cache Variable.
    Disabled bool
    Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
    Service string
    Id string
    Name string
    conditions List<GetEventOrchestrationServiceCacheVariableCondition>
    Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value.
    configurations List<GetEventOrchestrationServiceCacheVariableConfiguration>
    A configuration object to define what and how values will be stored in the Cache Variable.
    disabled Boolean
    Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
    service String
    id String
    name String
    conditions GetEventOrchestrationServiceCacheVariableCondition[]
    Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value.
    configurations GetEventOrchestrationServiceCacheVariableConfiguration[]
    A configuration object to define what and how values will be stored in the Cache Variable.
    disabled boolean
    Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
    service string
    id string
    name string
    conditions Sequence[GetEventOrchestrationServiceCacheVariableCondition]
    Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value.
    configurations Sequence[GetEventOrchestrationServiceCacheVariableConfiguration]
    A configuration object to define what and how values will be stored in the Cache Variable.
    disabled bool
    Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
    service str
    id str
    name str
    conditions List<Property Map>
    Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value.
    configurations List<Property Map>
    A configuration object to define what and how values will be stored in the Cache Variable.
    disabled Boolean
    Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
    service String
    id String
    name String

    Supporting Types

    GetEventOrchestrationServiceCacheVariableCondition

    Expression string
    A PCL condition string.
    Expression string
    A PCL condition string.
    expression String
    A PCL condition string.
    expression string
    A PCL condition string.
    expression String
    A PCL condition string.

    GetEventOrchestrationServiceCacheVariableConfiguration

    Regex string
    A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
    Source string
    The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
    TtlSeconds int
    The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count
    Type string
    The type of value to store into the Cache Variable. Can be one of: recent_value or trigger_event_count.
    Regex string
    A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
    Source string
    The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
    TtlSeconds int
    The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count
    Type string
    The type of value to store into the Cache Variable. Can be one of: recent_value or trigger_event_count.
    regex String
    A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
    source String
    The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
    ttlSeconds Integer
    The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count
    type String
    The type of value to store into the Cache Variable. Can be one of: recent_value or trigger_event_count.
    regex string
    A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
    source string
    The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
    ttlSeconds number
    The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count
    type string
    The type of value to store into the Cache Variable. Can be one of: recent_value or trigger_event_count.
    regex str
    A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
    source str
    The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
    ttl_seconds int
    The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count
    type str
    The type of value to store into the Cache Variable. Can be one of: recent_value or trigger_event_count.
    regex String
    A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
    source String
    The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
    ttlSeconds Number
    The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count
    type String
    The type of value to store into the Cache Variable. Can be one of: recent_value or trigger_event_count.

    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