1. Packages
  2. Datadog
  3. API Docs
  4. pagerduty
  5. ServiceObject
Datadog v4.28.1 published on Monday, Jun 24, 2024 by Pulumi

datadog.pagerduty.ServiceObject

Explore with Pulumi AI

datadog logo
Datadog v4.28.1 published on Monday, Jun 24, 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("testing_foo", {
        serviceName: "testing_foo",
        serviceKey: "9876543210123456789",
    });
    const testingBar = new datadog.pagerduty.ServiceObject("testing_bar", {
        serviceName: "testing_bar",
        serviceKey: "54321098765432109876",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    testing_foo = datadog.pagerduty.ServiceObject("testing_foo",
        service_name="testing_foo",
        service_key="9876543210123456789")
    testing_bar = datadog.pagerduty.ServiceObject("testing_bar",
        service_name="testing_bar",
        service_key="54321098765432109876")
    
    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, "testing_foo", &pagerduty.ServiceObjectArgs{
    			ServiceName: pulumi.String("testing_foo"),
    			ServiceKey:  pulumi.String("9876543210123456789"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewServiceObject(ctx, "testing_bar", &pagerduty.ServiceObjectArgs{
    			ServiceName: pulumi.String("testing_bar"),
    			ServiceKey:  pulumi.String("54321098765432109876"),
    		})
    		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("testing_foo", new()
        {
            ServiceName = "testing_foo",
            ServiceKey = "9876543210123456789",
        });
    
        var testingBar = new Datadog.PagerDuty.ServiceObject("testing_bar", new()
        {
            ServiceName = "testing_bar",
            ServiceKey = "54321098765432109876",
        });
    
    });
    
    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()
                .serviceName("testing_foo")
                .serviceKey("9876543210123456789")
                .build());
    
            var testingBar = new ServiceObject("testingBar", ServiceObjectArgs.builder()
                .serviceName("testing_bar")
                .serviceKey("54321098765432109876")
                .build());
    
        }
    }
    
    resources:
      testingFoo:
        type: datadog:pagerduty:ServiceObject
        name: testing_foo
        properties:
          serviceName: testing_foo
          serviceKey: '9876543210123456789'
      testingBar:
        type: datadog:pagerduty:ServiceObject
        name: testing_bar
        properties:
          serviceName: testing_bar
          serviceKey: '54321098765432109876'
    

    Create ServiceObject Resource

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

    Constructor syntax

    new ServiceObject(name: string, args: ServiceObjectArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceObject(resource_name: str,
                      args: ServiceObjectArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceObject(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      service_key: Optional[str] = None,
                      service_name: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var datadogServiceObjectResource = new Datadog.PagerDuty.ServiceObject("datadogServiceObjectResource", new()
    {
        ServiceKey = "string",
        ServiceName = "string",
    });
    
    example, err := pagerduty.NewServiceObject(ctx, "datadogServiceObjectResource", &pagerduty.ServiceObjectArgs{
    	ServiceKey:  pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    })
    
    var datadogServiceObjectResource = new ServiceObject("datadogServiceObjectResource", ServiceObjectArgs.builder()
        .serviceKey("string")
        .serviceName("string")
        .build());
    
    datadog_service_object_resource = datadog.pagerduty.ServiceObject("datadogServiceObjectResource",
        service_key="string",
        service_name="string")
    
    const datadogServiceObjectResource = new datadog.pagerduty.ServiceObject("datadogServiceObjectResource", {
        serviceKey: "string",
        serviceName: "string",
    });
    
    type: datadog:pagerduty:ServiceObject
    properties:
        serviceKey: string
        serviceName: string
    

    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}
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.28.1 published on Monday, Jun 24, 2024 by Pulumi