@pulumi/opsgenie
Version:
A Pulumi package for creating and managing opsgenie cloud resources.
148 lines (147 loc) • 5.87 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Manages a Team within Opsgenie.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as opsgenie from "@pulumi/opsgenie";
*
* const first = new opsgenie.User("first", {
* username: "user@domain.com",
* fullName: "name ",
* role: "User",
* });
* const second = new opsgenie.User("second", {
* username: "test@domain.com",
* fullName: "name ",
* role: "User",
* });
* const test = new opsgenie.Team("test", {
* name: "example",
* description: "This team deals with all the things",
* members: [
* {
* id: first.id,
* role: "admin",
* },
* {
* id: second.id,
* role: "user",
* },
* ],
* });
* const self_service = new opsgenie.Team("self-service", {
* name: "Self Service",
* description: "Membership in this team is managed via OpsGenie web UI only",
* ignoreMembers: true,
* deleteDefaultResources: true,
* });
* ```
*
* ## Import
*
* Teams can be imported using the `team_id`, e.g.
*
* ```sh
* $ pulumi import opsgenie:index/team:Team team1 team_id`
* ```
*/
export declare class Team extends pulumi.CustomResource {
/**
* Get an existing Team resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TeamState, opts?: pulumi.CustomResourceOptions): Team;
/**
* Returns true if the given object is an instance of Team. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Team;
/**
* Set to true to remove default escalation and schedule for newly created team. **Be careful its also changes that team routing rule to None. That means you have to define routing rule as well**
*/
readonly deleteDefaultResources: pulumi.Output<boolean | undefined>;
/**
* A description for this team.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: `false`.
*/
readonly ignoreMembers: pulumi.Output<boolean | undefined>;
/**
* A Member block as documented below.
*/
readonly members: pulumi.Output<outputs.TeamMember[] | undefined>;
/**
* The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.
*/
readonly name: pulumi.Output<string>;
/**
* Create a Team resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: TeamArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Team resources.
*/
export interface TeamState {
/**
* Set to true to remove default escalation and schedule for newly created team. **Be careful its also changes that team routing rule to None. That means you have to define routing rule as well**
*/
deleteDefaultResources?: pulumi.Input<boolean>;
/**
* A description for this team.
*/
description?: pulumi.Input<string>;
/**
* Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: `false`.
*/
ignoreMembers?: pulumi.Input<boolean>;
/**
* A Member block as documented below.
*/
members?: pulumi.Input<pulumi.Input<inputs.TeamMember>[]>;
/**
* The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.
*/
name?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Team resource.
*/
export interface TeamArgs {
/**
* Set to true to remove default escalation and schedule for newly created team. **Be careful its also changes that team routing rule to None. That means you have to define routing rule as well**
*/
deleteDefaultResources?: pulumi.Input<boolean>;
/**
* A description for this team.
*/
description?: pulumi.Input<string>;
/**
* Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: `false`.
*/
ignoreMembers?: pulumi.Input<boolean>;
/**
* A Member block as documented below.
*/
members?: pulumi.Input<pulumi.Input<inputs.TeamMember>[]>;
/**
* The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.
*/
name?: pulumi.Input<string>;
}