datadog.pagerduty.Integration
Explore with Pulumi AI
Provides a Datadog - PagerDuty resource. This can be used to create and manage Datadog - PagerDuty integration. See also PagerDuty Integration Guide.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
// Note: Until terraform-provider-datadog version 2.1.0, service objects under the services key were specified inside the datadog_integration_pagerduty resource. This was incompatible with multi-configuration-file setups, where users wanted to have individual service objects controlled from different Terraform configuration files. The recommended approach now is specifying service objects as individual resources using datadog_integration_pagerduty_service_object.
// Services as Individual Resources
const pd = new datadog.pagerduty.Integration("pd", {
schedules: [
"https://ddog.pagerduty.com/schedules/X123VF",
"https://ddog.pagerduty.com/schedules/X321XX",
],
subdomain: "ddog",
apiToken: "38457822378273432587234242874",
});
const testingFoo = new datadog.pagerduty.ServiceObject("testing_foo", {
serviceName: "testing_foo",
serviceKey: "9876543210123456789",
}, {
dependsOn: [pd],
});
const testingBar = new datadog.pagerduty.ServiceObject("testing_bar", {
serviceName: "testing_bar",
serviceKey: "54321098765432109876",
}, {
dependsOn: [pd],
});
import pulumi
import pulumi_datadog as datadog
# Note: Until terraform-provider-datadog version 2.1.0, service objects under the services key were specified inside the datadog_integration_pagerduty resource. This was incompatible with multi-configuration-file setups, where users wanted to have individual service objects controlled from different Terraform configuration files. The recommended approach now is specifying service objects as individual resources using datadog_integration_pagerduty_service_object.
# Services as Individual Resources
pd = datadog.pagerduty.Integration("pd",
schedules=[
"https://ddog.pagerduty.com/schedules/X123VF",
"https://ddog.pagerduty.com/schedules/X321XX",
],
subdomain="ddog",
api_token="38457822378273432587234242874")
testing_foo = datadog.pagerduty.ServiceObject("testing_foo",
service_name="testing_foo",
service_key="9876543210123456789",
opts = pulumi.ResourceOptions(depends_on=[pd]))
testing_bar = datadog.pagerduty.ServiceObject("testing_bar",
service_name="testing_bar",
service_key="54321098765432109876",
opts = pulumi.ResourceOptions(depends_on=[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 {
// Note: Until terraform-provider-datadog version 2.1.0, service objects under the services key were specified inside the datadog_integration_pagerduty resource. This was incompatible with multi-configuration-file setups, where users wanted to have individual service objects controlled from different Terraform configuration files. The recommended approach now is specifying service objects as individual resources using datadog_integration_pagerduty_service_object.
// Services as Individual Resources
pd, err := pagerduty.NewIntegration(ctx, "pd", &pagerduty.IntegrationArgs{
Schedules: pulumi.StringArray{
pulumi.String("https://ddog.pagerduty.com/schedules/X123VF"),
pulumi.String("https://ddog.pagerduty.com/schedules/X321XX"),
},
Subdomain: pulumi.String("ddog"),
ApiToken: pulumi.String("38457822378273432587234242874"),
})
if err != nil {
return err
}
_, err = pagerduty.NewServiceObject(ctx, "testing_foo", &pagerduty.ServiceObjectArgs{
ServiceName: pulumi.String("testing_foo"),
ServiceKey: pulumi.String("9876543210123456789"),
}, pulumi.DependsOn([]pulumi.Resource{
pd,
}))
if err != nil {
return err
}
_, err = pagerduty.NewServiceObject(ctx, "testing_bar", &pagerduty.ServiceObjectArgs{
ServiceName: pulumi.String("testing_bar"),
ServiceKey: pulumi.String("54321098765432109876"),
}, pulumi.DependsOn([]pulumi.Resource{
pd,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
// Note: Until terraform-provider-datadog version 2.1.0, service objects under the services key were specified inside the datadog_integration_pagerduty resource. This was incompatible with multi-configuration-file setups, where users wanted to have individual service objects controlled from different Terraform configuration files. The recommended approach now is specifying service objects as individual resources using datadog_integration_pagerduty_service_object.
// Services as Individual Resources
var pd = new Datadog.PagerDuty.Integration("pd", new()
{
Schedules = new[]
{
"https://ddog.pagerduty.com/schedules/X123VF",
"https://ddog.pagerduty.com/schedules/X321XX",
},
Subdomain = "ddog",
ApiToken = "38457822378273432587234242874",
});
var testingFoo = new Datadog.PagerDuty.ServiceObject("testing_foo", new()
{
ServiceName = "testing_foo",
ServiceKey = "9876543210123456789",
}, new CustomResourceOptions
{
DependsOn =
{
pd,
},
});
var testingBar = new Datadog.PagerDuty.ServiceObject("testing_bar", new()
{
ServiceName = "testing_bar",
ServiceKey = "54321098765432109876",
}, new CustomResourceOptions
{
DependsOn =
{
pd,
},
});
});
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) {
// Note: Until terraform-provider-datadog version 2.1.0, service objects under the services key were specified inside the datadog_integration_pagerduty resource. This was incompatible with multi-configuration-file setups, where users wanted to have individual service objects controlled from different Terraform configuration files. The recommended approach now is specifying service objects as individual resources using datadog_integration_pagerduty_service_object.
// Services as Individual Resources
var pd = new Integration("pd", IntegrationArgs.builder()
.schedules(
"https://ddog.pagerduty.com/schedules/X123VF",
"https://ddog.pagerduty.com/schedules/X321XX")
.subdomain("ddog")
.apiToken("38457822378273432587234242874")
.build());
var testingFoo = new ServiceObject("testingFoo", ServiceObjectArgs.builder()
.serviceName("testing_foo")
.serviceKey("9876543210123456789")
.build(), CustomResourceOptions.builder()
.dependsOn(pd)
.build());
var testingBar = new ServiceObject("testingBar", ServiceObjectArgs.builder()
.serviceName("testing_bar")
.serviceKey("54321098765432109876")
.build(), CustomResourceOptions.builder()
.dependsOn(pd)
.build());
}
}
resources:
# Note: Until terraform-provider-datadog version 2.1.0, service objects under the services key were specified inside the datadog_integration_pagerduty resource. This was incompatible with multi-configuration-file setups, where users wanted to have individual service objects controlled from different Terraform configuration files. The recommended approach now is specifying service objects as individual resources using datadog_integration_pagerduty_service_object.
# Services as Individual Resources
pd:
type: datadog:pagerduty:Integration
properties:
schedules:
- https://ddog.pagerduty.com/schedules/X123VF
- https://ddog.pagerduty.com/schedules/X321XX
subdomain: ddog
apiToken: '38457822378273432587234242874'
testingFoo:
type: datadog:pagerduty:ServiceObject
name: testing_foo
properties:
serviceName: testing_foo
serviceKey: '9876543210123456789'
options:
dependson:
- ${pd}
testingBar:
type: datadog:pagerduty:ServiceObject
name: testing_bar
properties:
serviceName: testing_bar
serviceKey: '54321098765432109876'
options:
dependson:
- ${pd}
Create Integration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Integration(name: string, args: IntegrationArgs, opts?: CustomResourceOptions);
@overload
def Integration(resource_name: str,
args: IntegrationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Integration(resource_name: str,
opts: Optional[ResourceOptions] = None,
subdomain: Optional[str] = None,
api_token: Optional[str] = None,
schedules: Optional[Sequence[str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleintegrationResourceResourceFromPagerdutyintegration = new Datadog.PagerDuty.Integration("exampleintegrationResourceResourceFromPagerdutyintegration", new()
{
Subdomain = "string",
ApiToken = "string",
Schedules = new[]
{
"string",
},
});
example, err := pagerduty.NewIntegration(ctx, "exampleintegrationResourceResourceFromPagerdutyintegration", &pagerduty.IntegrationArgs{
Subdomain: pulumi.String("string"),
ApiToken: pulumi.String("string"),
Schedules: pulumi.StringArray{
pulumi.String("string"),
},
})
var exampleintegrationResourceResourceFromPagerdutyintegration = new Integration("exampleintegrationResourceResourceFromPagerdutyintegration", IntegrationArgs.builder()
.subdomain("string")
.apiToken("string")
.schedules("string")
.build());
exampleintegration_resource_resource_from_pagerdutyintegration = datadog.pagerduty.Integration("exampleintegrationResourceResourceFromPagerdutyintegration",
subdomain="string",
api_token="string",
schedules=["string"])
const exampleintegrationResourceResourceFromPagerdutyintegration = new datadog.pagerduty.Integration("exampleintegrationResourceResourceFromPagerdutyintegration", {
subdomain: "string",
apiToken: "string",
schedules: ["string"],
});
type: datadog:pagerduty:Integration
properties:
apiToken: string
schedules:
- string
subdomain: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Integration resource accepts the following input properties:
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.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.