1. Packages
  2. Opsgenie Provider
  3. API Docs
  4. Service
Opsgenie v1.3.12 published on Wednesday, Oct 16, 2024 by Pulumi

opsgenie.Service

Explore with Pulumi AI

opsgenie logo
Opsgenie v1.3.12 published on Wednesday, Oct 16, 2024 by Pulumi

    Manages a Service within Opsgenie.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opsgenie from "@pulumi/opsgenie";
    
    const payment = new opsgenie.Team("payment", {
        name: "example",
        description: "This team deals with all the things",
    });
    const _this = new opsgenie.Service("this", {
        name: "Payment",
        teamId: "$opsgenie_team.payment.id",
    });
    
    import pulumi
    import pulumi_opsgenie as opsgenie
    
    payment = opsgenie.Team("payment",
        name="example",
        description="This team deals with all the things")
    this = opsgenie.Service("this",
        name="Payment",
        team_id="$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{
    			Name:        pulumi.String("example"),
    			Description: pulumi.String("This team deals with all the things"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opsgenie.NewService(ctx, "this", &opsgenie.ServiceArgs{
    			Name:   pulumi.String("Payment"),
    			TeamId: pulumi.String("$opsgenie_team.payment.id"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opsgenie = Pulumi.Opsgenie;
    
    return await Deployment.RunAsync(() => 
    {
        var payment = new Opsgenie.Team("payment", new()
        {
            Name = "example",
            Description = "This team deals with all the things",
        });
    
        var @this = new Opsgenie.Service("this", new()
        {
            Name = "Payment",
            TeamId = "$opsgenie_team.payment.id",
        });
    
    });
    
    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()
                .name("example")
                .description("This team deals with all the things")
                .build());
    
            var this_ = new Service("this", ServiceArgs.builder()
                .name("Payment")
                .teamId("$opsgenie_team.payment.id")
                .build());
    
        }
    }
    
    resources:
      payment:
        type: opsgenie:Team
        properties:
          name: example
          description: This team deals with all the things
      this:
        type: opsgenie:Service
        properties:
          name: Payment
          teamId: $opsgenie_team.payment.id
    

    Create Service Resource

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

    Constructor syntax

    new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);
    @overload
    def Service(resource_name: str,
                args: ServiceArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Service(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                team_id: Optional[str] = None,
                description: Optional[str] = None,
                name: Optional[str] = None,
                tags: Optional[Sequence[str]] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var serviceResource = new Opsgenie.Service("serviceResource", new()
    {
        TeamId = "string",
        Description = "string",
        Name = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := opsgenie.NewService(ctx, "serviceResource", &opsgenie.ServiceArgs{
    	TeamId:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var serviceResource = new Service("serviceResource", ServiceArgs.builder()
        .teamId("string")
        .description("string")
        .name("string")
        .tags("string")
        .build());
    
    service_resource = opsgenie.Service("serviceResource",
        team_id="string",
        description="string",
        name="string",
        tags=["string"])
    
    const serviceResource = new opsgenie.Service("serviceResource", {
        teamId: "string",
        description: "string",
        name: "string",
        tags: ["string"],
    });
    
    type: opsgenie:Service
    properties:
        description: string
        name: string
        tags:
            - string
        teamId: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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.
    Tags List<string>
    Tags for the service, with a maximum of 20 tags per service.
    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.
    Tags []string
    Tags for the service, with a maximum of 20 tags per service.
    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.
    tags List<String>
    Tags for the service, with a maximum of 20 tags per service.
    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.
    tags 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.
    tags Sequence[str]
    Tags for the service, with a maximum of 20 tags per service.
    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.
    tags 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.
    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.
    Tags List<string>
    Tags for the service, with a maximum of 20 tags per service.
    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.
    Tags []string
    Tags for the service, with a maximum of 20 tags per service.
    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.
    tags List<String>
    Tags for the service, with a maximum of 20 tags per service.
    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.
    tags string[]
    Tags for the service, with a maximum of 20 tags per service.
    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.
    tags 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.
    tags List<String>
    Tags for the service, with a maximum of 20 tags per service.
    teamId 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`
    

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

    Package Details

    Repository
    Opsgenie pulumi/pulumi-opsgenie
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the opsgenie Terraform Provider.
    opsgenie logo
    Opsgenie v1.3.12 published on Wednesday, Oct 16, 2024 by Pulumi