1. Packages
  2. Datadog
  3. API Docs
  4. pagerduty
  5. ServiceObject
Datadog v4.27.0 published on Thursday, Mar 14, 2024 by Pulumi

datadog.pagerduty.ServiceObject

Explore with Pulumi AI

datadog logo
Datadog v4.27.0 published on Thursday, Mar 14, 2024 by Pulumi

    Provides access to individual Service Objects of Datadog - PagerDuty integrations. Note that the Datadog - PagerDuty integration must be activated in the Datadog UI in order for this resource to be usable.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const testingFoo = new datadog.pagerduty.ServiceObject("testingFoo", {
        serviceKey: "9876543210123456789",
        serviceName: "testing_foo",
    });
    const testingBar = new datadog.pagerduty.ServiceObject("testingBar", {
        serviceKey: "54321098765432109876",
        serviceName: "testing_bar",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    testing_foo = datadog.pagerduty.ServiceObject("testingFoo",
        service_key="9876543210123456789",
        service_name="testing_foo")
    testing_bar = datadog.pagerduty.ServiceObject("testingBar",
        service_key="54321098765432109876",
        service_name="testing_bar")
    
    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.NewServiceObject(ctx, "testingFoo", &pagerduty.ServiceObjectArgs{
    			ServiceKey:  pulumi.String("9876543210123456789"),
    			ServiceName: pulumi.String("testing_foo"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewServiceObject(ctx, "testingBar", &pagerduty.ServiceObjectArgs{
    			ServiceKey:  pulumi.String("54321098765432109876"),
    			ServiceName: pulumi.String("testing_bar"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var testingFoo = new Datadog.PagerDuty.ServiceObject("testingFoo", new()
        {
            ServiceKey = "9876543210123456789",
            ServiceName = "testing_foo",
        });
    
        var testingBar = new Datadog.PagerDuty.ServiceObject("testingBar", new()
        {
            ServiceKey = "54321098765432109876",
            ServiceName = "testing_bar",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.pagerduty.ServiceObject;
    import com.pulumi.datadog.pagerduty.ServiceObjectArgs;
    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 testingFoo = new ServiceObject("testingFoo", ServiceObjectArgs.builder()        
                .serviceKey("9876543210123456789")
                .serviceName("testing_foo")
                .build());
    
            var testingBar = new ServiceObject("testingBar", ServiceObjectArgs.builder()        
                .serviceKey("54321098765432109876")
                .serviceName("testing_bar")
                .build());
    
        }
    }
    
    resources:
      testingFoo:
        type: datadog:pagerduty:ServiceObject
        properties:
          serviceKey: '9876543210123456789'
          serviceName: testing_foo
      testingBar:
        type: datadog:pagerduty:ServiceObject
        properties:
          serviceKey: '54321098765432109876'
          serviceName: testing_bar
    

    Create ServiceObject Resource

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

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

    ServiceKey string
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    ServiceName string
    Your Service name in PagerDuty.
    ServiceKey string
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    ServiceName string
    Your Service name in PagerDuty.
    serviceKey String
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    serviceName String
    Your Service name in PagerDuty.
    serviceKey string
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    serviceName string
    Your Service name in PagerDuty.
    service_key str
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    service_name str
    Your Service name in PagerDuty.
    serviceKey String
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    serviceName String
    Your Service name in PagerDuty.

    Outputs

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

    Get an existing ServiceObject 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?: ServiceObjectState, opts?: CustomResourceOptions): ServiceObject
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            service_key: Optional[str] = None,
            service_name: Optional[str] = None) -> ServiceObject
    func GetServiceObject(ctx *Context, name string, id IDInput, state *ServiceObjectState, opts ...ResourceOption) (*ServiceObject, error)
    public static ServiceObject Get(string name, Input<string> id, ServiceObjectState? state, CustomResourceOptions? opts = null)
    public static ServiceObject get(String name, Output<String> id, ServiceObjectState 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:
    ServiceKey string
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    ServiceName string
    Your Service name in PagerDuty.
    ServiceKey string
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    ServiceName string
    Your Service name in PagerDuty.
    serviceKey String
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    serviceName String
    Your Service name in PagerDuty.
    serviceKey string
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    serviceName string
    Your Service name in PagerDuty.
    service_key str
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    service_name str
    Your Service name in PagerDuty.
    serviceKey String
    Your Service name associated service key in PagerDuty. This key may also be referred to as an Integration Key or Routing Key in the Pagerduty Integration documentation to have it destroyed and recreated.
    serviceName String
    Your Service name in PagerDuty.

    Import

    Pagerduty service object can be imported using the service_name, while the service_key should be passed by setting the environment variable SERVICE_KEY

    $ pulumi import datadog:pagerduty/serviceObject:ServiceObject SERVICE_KEY=${service_key} datadog_integration_pagerduty_service_object.foo ${service_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.27.0 published on Thursday, Mar 14, 2024 by Pulumi