Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Opsgenie

v1.1.0 published on Thursday, Nov 11, 2021 by Pulumi

Service

Manages a Service within Opsgenie.

Example Usage

using Pulumi;
using Opsgenie = Pulumi.Opsgenie;

class MyStack : Stack
{
    public MyStack()
    {
        var payment = new Opsgenie.Team("payment", new Opsgenie.TeamArgs
        {
            Description = "This team deals with all the things",
        });
        var @this = new Opsgenie.Service("this", new Opsgenie.ServiceArgs
        {
            TeamId = "$opsgenie_team.payment.id",
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-opsgenie/sdk/go/opsgenie"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opsgenie.NewTeam(ctx, "payment", &opsgenie.TeamArgs{
			Description: pulumi.String("This team deals with all the things"),
		})
		if err != nil {
			return err
		}
		_, err = opsgenie.NewService(ctx, "this", &opsgenie.ServiceArgs{
			TeamId: pulumi.String(fmt.Sprintf("%v%v", "$", "opsgenie_team.payment.id")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_opsgenie as opsgenie

payment = opsgenie.Team("payment", description="This team deals with all the things")
this = opsgenie.Service("this", team_id="$opsgenie_team.payment.id")
import * as pulumi from "@pulumi/pulumi";
import * as opsgenie from "@pulumi/opsgenie";

const payment = new opsgenie.Team("payment", {
    description: "This team deals with all the things",
});
const thisService = new opsgenie.Service("this", {
    teamId: "$opsgenie_team.payment.id",
});

Create a Service Resource

new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);
@overload
def Service(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            team_id: Optional[str] = None)
@overload
def Service(resource_name: str,
            args: ServiceArgs,
            opts: Optional[ResourceOptions] = None)
func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)
public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ServiceArgs
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 ServiceArgs
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 ServiceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

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

TeamId string
Team id of the service. This field must not be longer than 512 characters.
Description string
Description field of the service that is generally used to provide a detailed information about the service.
Name string
Name of the service. This field must not be longer than 100 characters.
TeamId string
Team id of the service. This field must not be longer than 512 characters.
Description string
Description field of the service that is generally used to provide a detailed information about the service.
Name string
Name of the service. This field must not be longer than 100 characters.
teamId string
Team id of the service. This field must not be longer than 512 characters.
description string
Description field of the service that is generally used to provide a detailed information about the service.
name string
Name of the service. This field must not be longer than 100 characters.
team_id str
Team id of the service. This field must not be longer than 512 characters.
description str
Description field of the service that is generally used to provide a detailed information about the service.
name str
Name of the service. This field must not be longer than 100 characters.

Outputs

All input properties are implicitly available as output properties. Additionally, the Service 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing Service Resource

Get an existing Service 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?: ServiceState, opts?: CustomResourceOptions): Service
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        team_id: Optional[str] = None) -> Service
func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Description string
Description field of the service that is generally used to provide a detailed information about the service.
Name string
Name of the service. This field must not be longer than 100 characters.
TeamId string
Team id of the service. This field must not be longer than 512 characters.
Description string
Description field of the service that is generally used to provide a detailed information about the service.
Name string
Name of the service. This field must not be longer than 100 characters.
TeamId string
Team id of the service. This field must not be longer than 512 characters.
description string
Description field of the service that is generally used to provide a detailed information about the service.
name string
Name of the service. This field must not be longer than 100 characters.
teamId string
Team id of the service. This field must not be longer than 512 characters.
description str
Description field of the service that is generally used to provide a detailed information about the service.
name str
Name of the service. This field must not be longer than 100 characters.
team_id str
Team id of the service. This field must not be longer than 512 characters.

Import

Teams can be imported using the service_id, e.g.

 $ pulumi import opsgenie:index/service:Service this service_id`

Package Details

Repository
https://github.com/pulumi/pulumi-opsgenie
License
Apache-2.0
Notes
This Pulumi package is based on the opsgenie Terraform Provider.