-
Notifications
You must be signed in to change notification settings - Fork 2
/
serviceIntegration.go
179 lines (166 loc) · 8.04 KB
/
serviceIntegration.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package pagerduty
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// A [service integration](https://v2.developer.pagerduty.com/v2/page/api-reference#!/Services/post_services_id_integrations) is an integration that belongs to a service.
type ServiceIntegration struct {
pulumi.CustomResourceState
// URL at which the entity is uniquely displayed in the Web app
HtmlUrl pulumi.StringOutput `pulumi:"htmlUrl"`
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail pulumi.StringOutput `pulumi:"integrationEmail"`
// This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey pulumi.StringOutput `pulumi:"integrationKey"`
// The name of the service integration.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the service the integration should belong to.
Service pulumi.StringOutput `pulumi:"service"`
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
Type pulumi.StringOutput `pulumi:"type"`
// The ID of the vendor the integration should integrate with (e.g Datadog or Amazon Cloudwatch).
Vendor pulumi.StringOutput `pulumi:"vendor"`
}
// NewServiceIntegration registers a new resource with the given unique name, arguments, and options.
func NewServiceIntegration(ctx *pulumi.Context,
name string, args *ServiceIntegrationArgs, opts ...pulumi.ResourceOption) (*ServiceIntegration, error) {
if args == nil || args.Service == nil {
return nil, errors.New("missing required argument 'Service'")
}
if args == nil {
args = &ServiceIntegrationArgs{}
}
var resource ServiceIntegration
err := ctx.RegisterResource("pagerduty:index/serviceIntegration:ServiceIntegration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServiceIntegration gets an existing ServiceIntegration resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetServiceIntegration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceIntegrationState, opts ...pulumi.ResourceOption) (*ServiceIntegration, error) {
var resource ServiceIntegration
err := ctx.ReadResource("pagerduty:index/serviceIntegration:ServiceIntegration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServiceIntegration resources.
type serviceIntegrationState struct {
// URL at which the entity is uniquely displayed in the Web app
HtmlUrl *string `pulumi:"htmlUrl"`
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail *string `pulumi:"integrationEmail"`
// This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey *string `pulumi:"integrationKey"`
// The name of the service integration.
Name *string `pulumi:"name"`
// The ID of the service the integration should belong to.
Service *string `pulumi:"service"`
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
Type *string `pulumi:"type"`
// The ID of the vendor the integration should integrate with (e.g Datadog or Amazon Cloudwatch).
Vendor *string `pulumi:"vendor"`
}
type ServiceIntegrationState struct {
// URL at which the entity is uniquely displayed in the Web app
HtmlUrl pulumi.StringPtrInput
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail pulumi.StringPtrInput
// This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey pulumi.StringPtrInput
// The name of the service integration.
Name pulumi.StringPtrInput
// The ID of the service the integration should belong to.
Service pulumi.StringPtrInput
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
Type pulumi.StringPtrInput
// The ID of the vendor the integration should integrate with (e.g Datadog or Amazon Cloudwatch).
Vendor pulumi.StringPtrInput
}
func (ServiceIntegrationState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceIntegrationState)(nil)).Elem()
}
type serviceIntegrationArgs struct {
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail *string `pulumi:"integrationEmail"`
// This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey *string `pulumi:"integrationKey"`
// The name of the service integration.
Name *string `pulumi:"name"`
// The ID of the service the integration should belong to.
Service string `pulumi:"service"`
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
Type *string `pulumi:"type"`
// The ID of the vendor the integration should integrate with (e.g Datadog or Amazon Cloudwatch).
Vendor *string `pulumi:"vendor"`
}
// The set of arguments for constructing a ServiceIntegration resource.
type ServiceIntegrationArgs struct {
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail pulumi.StringPtrInput
// This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey pulumi.StringPtrInput
// The name of the service integration.
Name pulumi.StringPtrInput
// The ID of the service the integration should belong to.
Service pulumi.StringInput
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
Type pulumi.StringPtrInput
// The ID of the vendor the integration should integrate with (e.g Datadog or Amazon Cloudwatch).
Vendor pulumi.StringPtrInput
}
func (ServiceIntegrationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceIntegrationArgs)(nil)).Elem()
}