pagerduty.ExtensionServiceNow
Explore with Pulumi AI
A special case for extension for ServiceNow.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;
return await Deployment.RunAsync(() =>
{
var servicenow = Pagerduty.GetExtensionSchema.Invoke(new()
{
Name = "ServiceNow (v7)",
});
var exampleUser = new Pagerduty.User("exampleUser", new()
{
Email = "howard.james@example.domain",
});
var exampleEscalationPolicy = new Pagerduty.EscalationPolicy("exampleEscalationPolicy", new()
{
NumLoops = 2,
Rules = new[]
{
new Pagerduty.Inputs.EscalationPolicyRuleArgs
{
EscalationDelayInMinutes = 10,
Targets = new[]
{
new Pagerduty.Inputs.EscalationPolicyRuleTargetArgs
{
Type = "user",
Id = exampleUser.Id,
},
},
},
},
});
var exampleService = new Pagerduty.Service("exampleService", new()
{
AutoResolveTimeout = "14400",
AcknowledgementTimeout = "600",
EscalationPolicy = exampleEscalationPolicy.Id,
});
var snow = new Pagerduty.ExtensionServiceNow("snow", new()
{
ExtensionSchema = servicenow.Apply(getExtensionSchemaResult => getExtensionSchemaResult.Id),
ExtensionObjects = new[]
{
exampleService.Id,
},
SnowUser = "meeps",
SnowPassword = "zorz",
SyncOptions = "manual_sync",
Target = "https://foo.servicenow.com/webhook_foo",
TaskType = "incident",
Referer = "None",
});
});
package main
import (
"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
servicenow, err := pagerduty.GetExtensionSchema(ctx, &pagerduty.GetExtensionSchemaArgs{
Name: "ServiceNow (v7)",
}, nil)
if err != nil {
return err
}
exampleUser, err := pagerduty.NewUser(ctx, "exampleUser", &pagerduty.UserArgs{
Email: pulumi.String("howard.james@example.domain"),
})
if err != nil {
return err
}
exampleEscalationPolicy, err := pagerduty.NewEscalationPolicy(ctx, "exampleEscalationPolicy", &pagerduty.EscalationPolicyArgs{
NumLoops: pulumi.Int(2),
Rules: pagerduty.EscalationPolicyRuleArray{
&pagerduty.EscalationPolicyRuleArgs{
EscalationDelayInMinutes: pulumi.Int(10),
Targets: pagerduty.EscalationPolicyRuleTargetArray{
&pagerduty.EscalationPolicyRuleTargetArgs{
Type: pulumi.String("user"),
Id: exampleUser.ID(),
},
},
},
},
})
if err != nil {
return err
}
exampleService, err := pagerduty.NewService(ctx, "exampleService", &pagerduty.ServiceArgs{
AutoResolveTimeout: pulumi.String("14400"),
AcknowledgementTimeout: pulumi.String("600"),
EscalationPolicy: exampleEscalationPolicy.ID(),
})
if err != nil {
return err
}
_, err = pagerduty.NewExtensionServiceNow(ctx, "snow", &pagerduty.ExtensionServiceNowArgs{
ExtensionSchema: *pulumi.String(servicenow.Id),
ExtensionObjects: pulumi.StringArray{
exampleService.ID(),
},
SnowUser: pulumi.String("meeps"),
SnowPassword: pulumi.String("zorz"),
SyncOptions: pulumi.String("manual_sync"),
Target: pulumi.String("https://foo.servicenow.com/webhook_foo"),
TaskType: pulumi.String("incident"),
Referer: pulumi.String("None"),
})
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.pagerduty.PagerdutyFunctions;
import com.pulumi.pagerduty.inputs.GetExtensionSchemaArgs;
import com.pulumi.pagerduty.User;
import com.pulumi.pagerduty.UserArgs;
import com.pulumi.pagerduty.EscalationPolicy;
import com.pulumi.pagerduty.EscalationPolicyArgs;
import com.pulumi.pagerduty.inputs.EscalationPolicyRuleArgs;
import com.pulumi.pagerduty.Service;
import com.pulumi.pagerduty.ServiceArgs;
import com.pulumi.pagerduty.ExtensionServiceNow;
import com.pulumi.pagerduty.ExtensionServiceNowArgs;
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) {
final var servicenow = PagerdutyFunctions.getExtensionSchema(GetExtensionSchemaArgs.builder()
.name("ServiceNow (v7)")
.build());
var exampleUser = new User("exampleUser", UserArgs.builder()
.email("howard.james@example.domain")
.build());
var exampleEscalationPolicy = new EscalationPolicy("exampleEscalationPolicy", EscalationPolicyArgs.builder()
.numLoops(2)
.rules(EscalationPolicyRuleArgs.builder()
.escalationDelayInMinutes(10)
.targets(EscalationPolicyRuleTargetArgs.builder()
.type("user")
.id(exampleUser.id())
.build())
.build())
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.autoResolveTimeout(14400)
.acknowledgementTimeout(600)
.escalationPolicy(exampleEscalationPolicy.id())
.build());
var snow = new ExtensionServiceNow("snow", ExtensionServiceNowArgs.builder()
.extensionSchema(servicenow.applyValue(getExtensionSchemaResult -> getExtensionSchemaResult.id()))
.extensionObjects(exampleService.id())
.snowUser("meeps")
.snowPassword("zorz")
.syncOptions("manual_sync")
.target("https://foo.servicenow.com/webhook_foo")
.taskType("incident")
.referer("None")
.build());
}
}
import pulumi
import pulumi_pagerduty as pagerduty
servicenow = pagerduty.get_extension_schema(name="ServiceNow (v7)")
example_user = pagerduty.User("exampleUser", email="howard.james@example.domain")
example_escalation_policy = pagerduty.EscalationPolicy("exampleEscalationPolicy",
num_loops=2,
rules=[pagerduty.EscalationPolicyRuleArgs(
escalation_delay_in_minutes=10,
targets=[pagerduty.EscalationPolicyRuleTargetArgs(
type="user",
id=example_user.id,
)],
)])
example_service = pagerduty.Service("exampleService",
auto_resolve_timeout="14400",
acknowledgement_timeout="600",
escalation_policy=example_escalation_policy.id)
snow = pagerduty.ExtensionServiceNow("snow",
extension_schema=servicenow.id,
extension_objects=[example_service.id],
snow_user="meeps",
snow_password="zorz",
sync_options="manual_sync",
target="https://foo.servicenow.com/webhook_foo",
task_type="incident",
referer="None")
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const servicenow = pagerduty.getExtensionSchema({
name: "ServiceNow (v7)",
});
const exampleUser = new pagerduty.User("exampleUser", {email: "howard.james@example.domain"});
const exampleEscalationPolicy = new pagerduty.EscalationPolicy("exampleEscalationPolicy", {
numLoops: 2,
rules: [{
escalationDelayInMinutes: 10,
targets: [{
type: "user",
id: exampleUser.id,
}],
}],
});
const exampleService = new pagerduty.Service("exampleService", {
autoResolveTimeout: "14400",
acknowledgementTimeout: "600",
escalationPolicy: exampleEscalationPolicy.id,
});
const snow = new pagerduty.ExtensionServiceNow("snow", {
extensionSchema: servicenow.then(servicenow => servicenow.id),
extensionObjects: [exampleService.id],
snowUser: "meeps",
snowPassword: "zorz",
syncOptions: "manual_sync",
target: "https://foo.servicenow.com/webhook_foo",
taskType: "incident",
referer: "None",
});
resources:
exampleUser:
type: pagerduty:User
properties:
email: howard.james@example.domain
exampleEscalationPolicy:
type: pagerduty:EscalationPolicy
properties:
numLoops: 2
rules:
- escalationDelayInMinutes: 10
targets:
- type: user
id: ${exampleUser.id}
exampleService:
type: pagerduty:Service
properties:
autoResolveTimeout: 14400
acknowledgementTimeout: 600
escalationPolicy: ${exampleEscalationPolicy.id}
snow:
type: pagerduty:ExtensionServiceNow
properties:
extensionSchema: ${servicenow.id}
extensionObjects:
- ${exampleService.id}
snowUser: meeps
snowPassword: zorz
syncOptions: manual_sync
target: https://foo.servicenow.com/webhook_foo
taskType: incident
referer: None
variables:
servicenow:
fn::invoke:
Function: pagerduty:getExtensionSchema
Arguments:
name: ServiceNow (v7)
Create ExtensionServiceNow Resource
new ExtensionServiceNow(name: string, args: ExtensionServiceNowArgs, opts?: CustomResourceOptions);
@overload
def ExtensionServiceNow(resource_name: str,
opts: Optional[ResourceOptions] = None,
endpoint_url: Optional[str] = None,
extension_objects: Optional[Sequence[str]] = None,
extension_schema: Optional[str] = None,
name: Optional[str] = None,
referer: Optional[str] = None,
snow_password: Optional[str] = None,
snow_user: Optional[str] = None,
summary: Optional[str] = None,
sync_options: Optional[str] = None,
target: Optional[str] = None,
task_type: Optional[str] = None,
type: Optional[str] = None)
@overload
def ExtensionServiceNow(resource_name: str,
args: ExtensionServiceNowArgs,
opts: Optional[ResourceOptions] = None)
func NewExtensionServiceNow(ctx *Context, name string, args ExtensionServiceNowArgs, opts ...ResourceOption) (*ExtensionServiceNow, error)
public ExtensionServiceNow(string name, ExtensionServiceNowArgs args, CustomResourceOptions? opts = null)
public ExtensionServiceNow(String name, ExtensionServiceNowArgs args)
public ExtensionServiceNow(String name, ExtensionServiceNowArgs args, CustomResourceOptions options)
type: pagerduty:ExtensionServiceNow
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ExtensionServiceNowArgs
- 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 ExtensionServiceNowArgs
- 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 ExtensionServiceNowArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ExtensionServiceNowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ExtensionServiceNowArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ExtensionServiceNow 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 ExtensionServiceNow resource accepts the following input properties:
- Extension
Objects List<string> This is the objects for which the extension applies (An array of service ids).
- Extension
Schema string This is the schema for this extension.
- Referer string
The ServiceNow referer.
- Snow
Password string The ServiceNow password.
- Snow
User string The ServiceNow username.
- Sync
Options string The ServiceNow sync option.
- Target string
Target Webhook URL.
- Task
Type string The ServiceNow task type, typically
incident
.- Endpoint
Url string - Name string
The name of the service extension.
- Summary string
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- Type string
- Extension
Objects []string This is the objects for which the extension applies (An array of service ids).
- Extension
Schema string This is the schema for this extension.
- Referer string
The ServiceNow referer.
- Snow
Password string The ServiceNow password.
- Snow
User string The ServiceNow username.
- Sync
Options string The ServiceNow sync option.
- Target string
Target Webhook URL.
- Task
Type string The ServiceNow task type, typically
incident
.- Endpoint
Url string - Name string
The name of the service extension.
- Summary string
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- Type string
- extension
Objects List<String> This is the objects for which the extension applies (An array of service ids).
- extension
Schema String This is the schema for this extension.
- referer String
The ServiceNow referer.
- snow
Password String The ServiceNow password.
- snow
User String The ServiceNow username.
- sync
Options String The ServiceNow sync option.
- target String
Target Webhook URL.
- task
Type String The ServiceNow task type, typically
incident
.- endpoint
Url String - name String
The name of the service extension.
- summary String
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- type String
- extension
Objects string[] This is the objects for which the extension applies (An array of service ids).
- extension
Schema string This is the schema for this extension.
- referer string
The ServiceNow referer.
- snow
Password string The ServiceNow password.
- snow
User string The ServiceNow username.
- sync
Options string The ServiceNow sync option.
- target string
Target Webhook URL.
- task
Type string The ServiceNow task type, typically
incident
.- endpoint
Url string - name string
The name of the service extension.
- summary string
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- type string
- extension_
objects Sequence[str] This is the objects for which the extension applies (An array of service ids).
- extension_
schema str This is the schema for this extension.
- referer str
The ServiceNow referer.
- snow_
password str The ServiceNow password.
- snow_
user str The ServiceNow username.
- sync_
options str The ServiceNow sync option.
- target str
Target Webhook URL.
- task_
type str The ServiceNow task type, typically
incident
.- endpoint_
url str - name str
The name of the service extension.
- summary str
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- type str
- extension
Objects List<String> This is the objects for which the extension applies (An array of service ids).
- extension
Schema String This is the schema for this extension.
- referer String
The ServiceNow referer.
- snow
Password String The ServiceNow password.
- snow
User String The ServiceNow username.
- sync
Options String The ServiceNow sync option.
- target String
Target Webhook URL.
- task
Type String The ServiceNow task type, typically
incident
.- endpoint
Url String - name String
The name of the service extension.
- summary String
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- type String
Outputs
All input properties are implicitly available as output properties. Additionally, the ExtensionServiceNow resource produces the following output properties:
Look up Existing ExtensionServiceNow Resource
Get an existing ExtensionServiceNow 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?: ExtensionServiceNowState, opts?: CustomResourceOptions): ExtensionServiceNow
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
endpoint_url: Optional[str] = None,
extension_objects: Optional[Sequence[str]] = None,
extension_schema: Optional[str] = None,
html_url: Optional[str] = None,
name: Optional[str] = None,
referer: Optional[str] = None,
snow_password: Optional[str] = None,
snow_user: Optional[str] = None,
summary: Optional[str] = None,
sync_options: Optional[str] = None,
target: Optional[str] = None,
task_type: Optional[str] = None,
type: Optional[str] = None) -> ExtensionServiceNow
func GetExtensionServiceNow(ctx *Context, name string, id IDInput, state *ExtensionServiceNowState, opts ...ResourceOption) (*ExtensionServiceNow, error)
public static ExtensionServiceNow Get(string name, Input<string> id, ExtensionServiceNowState? state, CustomResourceOptions? opts = null)
public static ExtensionServiceNow get(String name, Output<String> id, ExtensionServiceNowState 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.
- Endpoint
Url string - Extension
Objects List<string> This is the objects for which the extension applies (An array of service ids).
- Extension
Schema string This is the schema for this extension.
- Html
Url string URL at which the entity is uniquely displayed in the Web app.
- Name string
The name of the service extension.
- Referer string
The ServiceNow referer.
- Snow
Password string The ServiceNow password.
- Snow
User string The ServiceNow username.
- Summary string
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- Sync
Options string The ServiceNow sync option.
- Target string
Target Webhook URL.
- Task
Type string The ServiceNow task type, typically
incident
.- Type string
- Endpoint
Url string - Extension
Objects []string This is the objects for which the extension applies (An array of service ids).
- Extension
Schema string This is the schema for this extension.
- Html
Url string URL at which the entity is uniquely displayed in the Web app.
- Name string
The name of the service extension.
- Referer string
The ServiceNow referer.
- Snow
Password string The ServiceNow password.
- Snow
User string The ServiceNow username.
- Summary string
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- Sync
Options string The ServiceNow sync option.
- Target string
Target Webhook URL.
- Task
Type string The ServiceNow task type, typically
incident
.- Type string
- endpoint
Url String - extension
Objects List<String> This is the objects for which the extension applies (An array of service ids).
- extension
Schema String This is the schema for this extension.
- html
Url String URL at which the entity is uniquely displayed in the Web app.
- name String
The name of the service extension.
- referer String
The ServiceNow referer.
- snow
Password String The ServiceNow password.
- snow
User String The ServiceNow username.
- summary String
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- sync
Options String The ServiceNow sync option.
- target String
Target Webhook URL.
- task
Type String The ServiceNow task type, typically
incident
.- type String
- endpoint
Url string - extension
Objects string[] This is the objects for which the extension applies (An array of service ids).
- extension
Schema string This is the schema for this extension.
- html
Url string URL at which the entity is uniquely displayed in the Web app.
- name string
The name of the service extension.
- referer string
The ServiceNow referer.
- snow
Password string The ServiceNow password.
- snow
User string The ServiceNow username.
- summary string
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- sync
Options string The ServiceNow sync option.
- target string
Target Webhook URL.
- task
Type string The ServiceNow task type, typically
incident
.- type string
- endpoint_
url str - extension_
objects Sequence[str] This is the objects for which the extension applies (An array of service ids).
- extension_
schema str This is the schema for this extension.
- html_
url str URL at which the entity is uniquely displayed in the Web app.
- name str
The name of the service extension.
- referer str
The ServiceNow referer.
- snow_
password str The ServiceNow password.
- snow_
user str The ServiceNow username.
- summary str
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- sync_
options str The ServiceNow sync option.
- target str
Target Webhook URL.
- task_
type str The ServiceNow task type, typically
incident
.- type str
- endpoint
Url String - extension
Objects List<String> This is the objects for which the extension applies (An array of service ids).
- extension
Schema String This is the schema for this extension.
- html
Url String URL at which the entity is uniquely displayed in the Web app.
- name String
The name of the service extension.
- referer String
The ServiceNow referer.
- snow
Password String The ServiceNow password.
- snow
User String The ServiceNow username.
- summary String
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to
name
, though it is not intended to be an identifier.- sync
Options String The ServiceNow sync option.
- target String
Target Webhook URL.
- task
Type String The ServiceNow task type, typically
incident
.- type String
Import
Extensions can be imported using the id.e.g.
$ pulumi import pagerduty:index/extensionServiceNow:ExtensionServiceNow main PLBP09X
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
pagerduty
Terraform Provider.