datadog.opsgenie.ServiceObject
Explore with Pulumi AI
Resource for interacting with Datadog Opsgenie Service API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const fakeServiceName = new datadog.opsgenie.ServiceObject("fake_service_name", {
name: "fake_service_name",
opsgenieApiKey: "00000000-0000-0000-0000-000000000000",
region: "us",
});
const fakeServiceName2 = new datadog.opsgenie.ServiceObject("fake_service_name_2", {
name: "fake_service_name_2",
opsgenieApiKey: "11111111-1111-1111-1111-111111111111",
region: "eu",
});
import pulumi
import pulumi_datadog as datadog
fake_service_name = datadog.opsgenie.ServiceObject("fake_service_name",
name="fake_service_name",
opsgenie_api_key="00000000-0000-0000-0000-000000000000",
region="us")
fake_service_name2 = datadog.opsgenie.ServiceObject("fake_service_name_2",
name="fake_service_name_2",
opsgenie_api_key="11111111-1111-1111-1111-111111111111",
region="eu")
package main
import (
"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog/opsgenie"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opsgenie.NewServiceObject(ctx, "fake_service_name", &opsgenie.ServiceObjectArgs{
Name: pulumi.String("fake_service_name"),
OpsgenieApiKey: pulumi.String("00000000-0000-0000-0000-000000000000"),
Region: pulumi.String("us"),
})
if err != nil {
return err
}
_, err = opsgenie.NewServiceObject(ctx, "fake_service_name_2", &opsgenie.ServiceObjectArgs{
Name: pulumi.String("fake_service_name_2"),
OpsgenieApiKey: pulumi.String("11111111-1111-1111-1111-111111111111"),
Region: pulumi.String("eu"),
})
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 fakeServiceName = new Datadog.OpsGenie.ServiceObject("fake_service_name", new()
{
Name = "fake_service_name",
OpsgenieApiKey = "00000000-0000-0000-0000-000000000000",
Region = "us",
});
var fakeServiceName2 = new Datadog.OpsGenie.ServiceObject("fake_service_name_2", new()
{
Name = "fake_service_name_2",
OpsgenieApiKey = "11111111-1111-1111-1111-111111111111",
Region = "eu",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.opsgenie.ServiceObject;
import com.pulumi.datadog.opsgenie.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 fakeServiceName = new ServiceObject("fakeServiceName", ServiceObjectArgs.builder()
.name("fake_service_name")
.opsgenieApiKey("00000000-0000-0000-0000-000000000000")
.region("us")
.build());
var fakeServiceName2 = new ServiceObject("fakeServiceName2", ServiceObjectArgs.builder()
.name("fake_service_name_2")
.opsgenieApiKey("11111111-1111-1111-1111-111111111111")
.region("eu")
.build());
}
}
resources:
fakeServiceName:
type: datadog:opsgenie:ServiceObject
name: fake_service_name
properties:
name: fake_service_name
opsgenieApiKey: 00000000-0000-0000-0000-000000000000
region: us
fakeServiceName2:
type: datadog:opsgenie:ServiceObject
name: fake_service_name_2
properties:
name: fake_service_name_2
opsgenieApiKey: 11111111-1111-1111-1111-111111111111
region: eu
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,
name: Optional[str] = None,
opsgenie_api_key: Optional[str] = None,
region: Optional[str] = None,
custom_url: 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:opsgenie: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 serviceObjectResource = new Datadog.OpsGenie.ServiceObject("serviceObjectResource", new()
{
Name = "string",
OpsgenieApiKey = "string",
Region = "string",
CustomUrl = "string",
});
example, err := opsgenie.NewServiceObject(ctx, "serviceObjectResource", &opsgenie.ServiceObjectArgs{
Name: pulumi.String("string"),
OpsgenieApiKey: pulumi.String("string"),
Region: pulumi.String("string"),
CustomUrl: pulumi.String("string"),
})
var serviceObjectResource = new ServiceObject("serviceObjectResource", ServiceObjectArgs.builder()
.name("string")
.opsgenieApiKey("string")
.region("string")
.customUrl("string")
.build());
service_object_resource = datadog.opsgenie.ServiceObject("serviceObjectResource",
name="string",
opsgenie_api_key="string",
region="string",
custom_url="string")
const serviceObjectResource = new datadog.opsgenie.ServiceObject("serviceObjectResource", {
name: "string",
opsgenieApiKey: "string",
region: "string",
customUrl: "string",
});
type: datadog:opsgenie:ServiceObject
properties:
customUrl: string
name: string
opsgenieApiKey: string
region: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ServiceObject resource accepts the following input properties:
- Name string
- The name for the Opsgenie service.
- Opsgenie
Api stringKey - Region string
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
. - Custom
Url string - The custom url for a custom region.
- Name string
- The name for the Opsgenie service.
- Opsgenie
Api stringKey - Region string
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
. - Custom
Url string - The custom url for a custom region.
- name String
- The name for the Opsgenie service.
- opsgenie
Api StringKey - region String
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
. - custom
Url String - The custom url for a custom region.
- name string
- The name for the Opsgenie service.
- opsgenie
Api stringKey - region string
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
. - custom
Url string - The custom url for a custom region.
- name str
- The name for the Opsgenie service.
- opsgenie_
api_ strkey - region str
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
. - custom_
url str - The custom url for a custom region.
- name String
- The name for the Opsgenie service.
- opsgenie
Api StringKey - region String
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
. - custom
Url String - The custom url for a custom region.
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,
custom_url: Optional[str] = None,
name: Optional[str] = None,
opsgenie_api_key: Optional[str] = None,
region: 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.
- Custom
Url string - The custom url for a custom region.
- Name string
- The name for the Opsgenie service.
- Opsgenie
Api stringKey - Region string
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
.
- Custom
Url string - The custom url for a custom region.
- Name string
- The name for the Opsgenie service.
- Opsgenie
Api stringKey - Region string
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
.
- custom
Url String - The custom url for a custom region.
- name String
- The name for the Opsgenie service.
- opsgenie
Api StringKey - region String
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
.
- custom
Url string - The custom url for a custom region.
- name string
- The name for the Opsgenie service.
- opsgenie
Api stringKey - region string
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
.
- custom_
url str - The custom url for a custom region.
- name str
- The name for the Opsgenie service.
- opsgenie_
api_ strkey - region str
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
.
- custom
Url String - The custom url for a custom region.
- name String
- The name for the Opsgenie service.
- opsgenie
Api StringKey - region String
- The region for the Opsgenie service. Valid values are
us
,eu
,custom
.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.