1. Packages
  2. Datadog
  3. API Docs
  4. pagerduty
  5. Integration
Datadog v4.25.1 published on Wednesday, Feb 14, 2024 by Pulumi

datadog.pagerduty.Integration

Explore with Pulumi AI

datadog logo
Datadog v4.25.1 published on Wednesday, Feb 14, 2024 by Pulumi

    Provides a Datadog - PagerDuty resource. This can be used to create and manage Datadog - PagerDuty integration. See also PagerDuty Integration Guide.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        // Services as Individual Resources
        var pd = new Datadog.PagerDuty.Integration("pd", new()
        {
            ApiToken = "38457822378273432587234242874",
            Schedules = new[]
            {
                "https://ddog.pagerduty.com/schedules/X123VF",
                "https://ddog.pagerduty.com/schedules/X321XX",
            },
            Subdomain = "ddog",
        });
    
        var testingFoo = new Datadog.PagerDuty.ServiceObject("testingFoo", new()
        {
            ServiceKey = "9876543210123456789",
            ServiceName = "testing_foo",
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                "datadog_integration_pagerduty.pd",
            },
        });
    
        var testingBar = new Datadog.PagerDuty.ServiceObject("testingBar", new()
        {
            ServiceKey = "54321098765432109876",
            ServiceName = "testing_bar",
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                "datadog_integration_pagerduty.pd",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog/pagerduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := pagerduty.NewIntegration(ctx, "pd", &pagerduty.IntegrationArgs{
    			ApiToken: pulumi.String("38457822378273432587234242874"),
    			Schedules: pulumi.StringArray{
    				pulumi.String("https://ddog.pagerduty.com/schedules/X123VF"),
    				pulumi.String("https://ddog.pagerduty.com/schedules/X321XX"),
    			},
    			Subdomain: pulumi.String("ddog"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewServiceObject(ctx, "testingFoo", &pagerduty.ServiceObjectArgs{
    			ServiceKey:  pulumi.String("9876543210123456789"),
    			ServiceName: pulumi.String("testing_foo"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			pulumi.Resource("datadog_integration_pagerduty.pd"),
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewServiceObject(ctx, "testingBar", &pagerduty.ServiceObjectArgs{
    			ServiceKey:  pulumi.String("54321098765432109876"),
    			ServiceName: pulumi.String("testing_bar"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			pulumi.Resource("datadog_integration_pagerduty.pd"),
    		}))
    		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.datadog.pagerduty.Integration;
    import com.pulumi.datadog.pagerduty.IntegrationArgs;
    import com.pulumi.datadog.pagerduty.ServiceObject;
    import com.pulumi.datadog.pagerduty.ServiceObjectArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 pd = new Integration("pd", IntegrationArgs.builder()        
                .apiToken("38457822378273432587234242874")
                .schedules(            
                    "https://ddog.pagerduty.com/schedules/X123VF",
                    "https://ddog.pagerduty.com/schedules/X321XX")
                .subdomain("ddog")
                .build());
    
            var testingFoo = new ServiceObject("testingFoo", ServiceObjectArgs.builder()        
                .serviceKey("9876543210123456789")
                .serviceName("testing_foo")
                .build(), CustomResourceOptions.builder()
                    .dependsOn("datadog_integration_pagerduty.pd")
                    .build());
    
            var testingBar = new ServiceObject("testingBar", ServiceObjectArgs.builder()        
                .serviceKey("54321098765432109876")
                .serviceName("testing_bar")
                .build(), CustomResourceOptions.builder()
                    .dependsOn("datadog_integration_pagerduty.pd")
                    .build());
    
        }
    }
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Services as Individual Resources
    pd = datadog.pagerduty.Integration("pd",
        api_token="38457822378273432587234242874",
        schedules=[
            "https://ddog.pagerduty.com/schedules/X123VF",
            "https://ddog.pagerduty.com/schedules/X321XX",
        ],
        subdomain="ddog")
    testing_foo = datadog.pagerduty.ServiceObject("testingFoo",
        service_key="9876543210123456789",
        service_name="testing_foo",
        opts=pulumi.ResourceOptions(depends_on=["datadog_integration_pagerduty.pd"]))
    testing_bar = datadog.pagerduty.ServiceObject("testingBar",
        service_key="54321098765432109876",
        service_name="testing_bar",
        opts=pulumi.ResourceOptions(depends_on=["datadog_integration_pagerduty.pd"]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // Services as Individual Resources
    const pd = new datadog.pagerduty.Integration("pd", {
        apiToken: "38457822378273432587234242874",
        schedules: [
            "https://ddog.pagerduty.com/schedules/X123VF",
            "https://ddog.pagerduty.com/schedules/X321XX",
        ],
        subdomain: "ddog",
    });
    const testingFoo = new datadog.pagerduty.ServiceObject("testingFoo", {
        serviceKey: "9876543210123456789",
        serviceName: "testing_foo",
    }, {
        dependsOn: ["datadog_integration_pagerduty.pd"],
    });
    const testingBar = new datadog.pagerduty.ServiceObject("testingBar", {
        serviceKey: "54321098765432109876",
        serviceName: "testing_bar",
    }, {
        dependsOn: ["datadog_integration_pagerduty.pd"],
    });
    
    resources:
      # Services as Individual Resources
      pd:
        type: datadog:pagerduty:Integration
        properties:
          apiToken: '38457822378273432587234242874'
          schedules:
            - https://ddog.pagerduty.com/schedules/X123VF
            - https://ddog.pagerduty.com/schedules/X321XX
          subdomain: ddog
      testingFoo:
        type: datadog:pagerduty:ServiceObject
        properties:
          serviceKey: '9876543210123456789'
          serviceName: testing_foo
        options:
          dependson:
            - datadog_integration_pagerduty.pd
      testingBar:
        type: datadog:pagerduty:ServiceObject
        properties:
          serviceKey: '54321098765432109876'
          serviceName: testing_bar
        options:
          dependson:
            - datadog_integration_pagerduty.pd
    

    Create Integration Resource

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

    Integration 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 Integration resource accepts the following input properties:

    Subdomain string
    Your PagerDuty account’s personalized subdomain name.
    ApiToken string
    Your PagerDuty API token.
    Schedules List<string>
    Array of your schedule URLs.
    Subdomain string
    Your PagerDuty account’s personalized subdomain name.
    ApiToken string
    Your PagerDuty API token.
    Schedules []string
    Array of your schedule URLs.
    subdomain String
    Your PagerDuty account’s personalized subdomain name.
    apiToken String
    Your PagerDuty API token.
    schedules List<String>
    Array of your schedule URLs.
    subdomain string
    Your PagerDuty account’s personalized subdomain name.
    apiToken string
    Your PagerDuty API token.
    schedules string[]
    Array of your schedule URLs.
    subdomain str
    Your PagerDuty account’s personalized subdomain name.
    api_token str
    Your PagerDuty API token.
    schedules Sequence[str]
    Array of your schedule URLs.
    subdomain String
    Your PagerDuty account’s personalized subdomain name.
    apiToken String
    Your PagerDuty API token.
    schedules List<String>
    Array of your schedule URLs.

    Outputs

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

    Get an existing Integration 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?: IntegrationState, opts?: CustomResourceOptions): Integration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_token: Optional[str] = None,
            schedules: Optional[Sequence[str]] = None,
            subdomain: Optional[str] = None) -> Integration
    func GetIntegration(ctx *Context, name string, id IDInput, state *IntegrationState, opts ...ResourceOption) (*Integration, error)
    public static Integration Get(string name, Input<string> id, IntegrationState? state, CustomResourceOptions? opts = null)
    public static Integration get(String name, Output<String> id, IntegrationState 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:
    ApiToken string
    Your PagerDuty API token.
    Schedules List<string>
    Array of your schedule URLs.
    Subdomain string
    Your PagerDuty account’s personalized subdomain name.
    ApiToken string
    Your PagerDuty API token.
    Schedules []string
    Array of your schedule URLs.
    Subdomain string
    Your PagerDuty account’s personalized subdomain name.
    apiToken String
    Your PagerDuty API token.
    schedules List<String>
    Array of your schedule URLs.
    subdomain String
    Your PagerDuty account’s personalized subdomain name.
    apiToken string
    Your PagerDuty API token.
    schedules string[]
    Array of your schedule URLs.
    subdomain string
    Your PagerDuty account’s personalized subdomain name.
    api_token str
    Your PagerDuty API token.
    schedules Sequence[str]
    Array of your schedule URLs.
    subdomain str
    Your PagerDuty account’s personalized subdomain name.
    apiToken String
    Your PagerDuty API token.
    schedules List<String>
    Array of your schedule URLs.
    subdomain String
    Your PagerDuty account’s personalized subdomain name.

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.25.1 published on Wednesday, Feb 14, 2024 by Pulumi