opsgenie.Service
Explore with Pulumi AI
Manages a Service within Opsgenie.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opsgenie = Pulumi.Opsgenie;
return await Deployment.RunAsync(() =>
{
var payment = new Opsgenie.Team("payment", new()
{
Description = "This team deals with all the things",
});
var @this = new Opsgenie.Service("this", new()
{
TeamId = "$opsgenie_team.payment.id",
});
});
package main
import (
"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("$opsgenie_team.payment.id"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opsgenie.Team;
import com.pulumi.opsgenie.TeamArgs;
import com.pulumi.opsgenie.Service;
import com.pulumi.opsgenie.ServiceArgs;
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 payment = new Team("payment", TeamArgs.builder()
.description("This team deals with all the things")
.build());
var this_ = new Service("this", ServiceArgs.builder()
.teamId("$opsgenie_team.payment.id")
.build());
}
}
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 _this = new opsgenie.Service("this", {teamId: "$opsgenie_team.payment.id"});
resources:
payment:
type: opsgenie:Team
properties:
description: This team deals with all the things
this:
type: opsgenie:Service
properties:
teamId: $opsgenie_team.payment.id
Create 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,
tags: Optional[Sequence[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)
public Service(String name, ServiceArgs args)
public Service(String name, ServiceArgs args, CustomResourceOptions options)
type: opsgenie:Service
properties: # The arguments to resource properties.
options: # 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.
- 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.
- name String
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- options 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:
- Team
Id 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.
- List<string>
Tags for the service, with a maximum of 20 tags per service.
- Team
Id 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.
- []string
Tags for the service, with a maximum of 20 tags per service.
- team
Id 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.
- List<String>
Tags for the service, with a maximum of 20 tags per service.
- team
Id 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.
- string[]
Tags for the service, with a maximum of 20 tags per service.
- 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.
- Sequence[str]
Tags for the service, with a maximum of 20 tags per service.
- team
Id 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.
- List<String>
Tags for the service, with a maximum of 20 tags per service.
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 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 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,
tags: Optional[Sequence[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)
public static Service get(String name, Output<String> id, ServiceState 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.
- 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.
- List<string>
Tags for the service, with a maximum of 20 tags per service.
- Team
Id 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.
- []string
Tags for the service, with a maximum of 20 tags per service.
- Team
Id 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.
- List<String>
Tags for the service, with a maximum of 20 tags per service.
- team
Id 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.
- string[]
Tags for the service, with a maximum of 20 tags per service.
- team
Id 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.
- Sequence[str]
Tags for the service, with a maximum of 20 tags per service.
- team_
id str 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.
- List<String>
Tags for the service, with a maximum of 20 tags per service.
- team
Id String 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
- Opsgenie pulumi/pulumi-opsgenie
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
opsgenie
Terraform Provider.