/
getAutomationActionsRunner.go
169 lines (147 loc) · 7 KB
/
getAutomationActionsRunner.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
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package pagerduty
import (
"context"
"reflect"
"github.com/pulumi/pulumi-pagerduty/sdk/v3/go/pagerduty/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to get information about a specific [automation actions runner](https://developer.pagerduty.com/api-reference/aace61f84cbd0-get-an-automation-action-runner).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-pagerduty/sdk/v3/go/pagerduty"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := pagerduty.LookupAutomationActionsRunner(ctx, &pagerduty.LookupAutomationActionsRunnerArgs{
// Id: "01DBJLIGED17S1DQKQC2AV8XYZ",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupAutomationActionsRunner(ctx *pulumi.Context, args *LookupAutomationActionsRunnerArgs, opts ...pulumi.InvokeOption) (*LookupAutomationActionsRunnerResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAutomationActionsRunnerResult
err := ctx.Invoke("pagerduty:index/getAutomationActionsRunner:getAutomationActionsRunner", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAutomationActionsRunner.
type LookupAutomationActionsRunnerArgs struct {
// (Optional) The description of the runner.
Description *string `pulumi:"description"`
// The id of the automation actions runner in the PagerDuty API.
Id string `pulumi:"id"`
// (Optional) The last time runner has been seen. Represented as an ISO 8601 timestamp.
LastSeen *string `pulumi:"lastSeen"`
// (Optional) The base URI of the Runbook server to connect to. Applicable to `runbook` type runners only.
RunbookBaseUri *string `pulumi:"runbookBaseUri"`
}
// A collection of values returned by getAutomationActionsRunner.
type LookupAutomationActionsRunnerResult struct {
// The time runner was created. Represented as an ISO 8601 timestamp.
CreationTime string `pulumi:"creationTime"`
// (Optional) The description of the runner.
Description string `pulumi:"description"`
// The ID of the found runner.
Id string `pulumi:"id"`
// (Optional) The last time runner has been seen. Represented as an ISO 8601 timestamp.
LastSeen string `pulumi:"lastSeen"`
// The name of the found runner.
Name string `pulumi:"name"`
// (Optional) The base URI of the Runbook server to connect to. Applicable to `runbook` type runners only.
RunbookBaseUri string `pulumi:"runbookBaseUri"`
// The type of runner. Allowed values are `sidecar` and `runbook`.
RunnerType string `pulumi:"runnerType"`
// The type of object. The value returned will be `runner`.
Type string `pulumi:"type"`
}
func LookupAutomationActionsRunnerOutput(ctx *pulumi.Context, args LookupAutomationActionsRunnerOutputArgs, opts ...pulumi.InvokeOption) LookupAutomationActionsRunnerResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupAutomationActionsRunnerResult, error) {
args := v.(LookupAutomationActionsRunnerArgs)
r, err := LookupAutomationActionsRunner(ctx, &args, opts...)
var s LookupAutomationActionsRunnerResult
if r != nil {
s = *r
}
return s, err
}).(LookupAutomationActionsRunnerResultOutput)
}
// A collection of arguments for invoking getAutomationActionsRunner.
type LookupAutomationActionsRunnerOutputArgs struct {
// (Optional) The description of the runner.
Description pulumi.StringPtrInput `pulumi:"description"`
// The id of the automation actions runner in the PagerDuty API.
Id pulumi.StringInput `pulumi:"id"`
// (Optional) The last time runner has been seen. Represented as an ISO 8601 timestamp.
LastSeen pulumi.StringPtrInput `pulumi:"lastSeen"`
// (Optional) The base URI of the Runbook server to connect to. Applicable to `runbook` type runners only.
RunbookBaseUri pulumi.StringPtrInput `pulumi:"runbookBaseUri"`
}
func (LookupAutomationActionsRunnerOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutomationActionsRunnerArgs)(nil)).Elem()
}
// A collection of values returned by getAutomationActionsRunner.
type LookupAutomationActionsRunnerResultOutput struct{ *pulumi.OutputState }
func (LookupAutomationActionsRunnerResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutomationActionsRunnerResult)(nil)).Elem()
}
func (o LookupAutomationActionsRunnerResultOutput) ToLookupAutomationActionsRunnerResultOutput() LookupAutomationActionsRunnerResultOutput {
return o
}
func (o LookupAutomationActionsRunnerResultOutput) ToLookupAutomationActionsRunnerResultOutputWithContext(ctx context.Context) LookupAutomationActionsRunnerResultOutput {
return o
}
// The time runner was created. Represented as an ISO 8601 timestamp.
func (o LookupAutomationActionsRunnerResultOutput) CreationTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutomationActionsRunnerResult) string { return v.CreationTime }).(pulumi.StringOutput)
}
// (Optional) The description of the runner.
func (o LookupAutomationActionsRunnerResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutomationActionsRunnerResult) string { return v.Description }).(pulumi.StringOutput)
}
// The ID of the found runner.
func (o LookupAutomationActionsRunnerResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutomationActionsRunnerResult) string { return v.Id }).(pulumi.StringOutput)
}
// (Optional) The last time runner has been seen. Represented as an ISO 8601 timestamp.
func (o LookupAutomationActionsRunnerResultOutput) LastSeen() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutomationActionsRunnerResult) string { return v.LastSeen }).(pulumi.StringOutput)
}
// The name of the found runner.
func (o LookupAutomationActionsRunnerResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutomationActionsRunnerResult) string { return v.Name }).(pulumi.StringOutput)
}
// (Optional) The base URI of the Runbook server to connect to. Applicable to `runbook` type runners only.
func (o LookupAutomationActionsRunnerResultOutput) RunbookBaseUri() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutomationActionsRunnerResult) string { return v.RunbookBaseUri }).(pulumi.StringOutput)
}
// The type of runner. Allowed values are `sidecar` and `runbook`.
func (o LookupAutomationActionsRunnerResultOutput) RunnerType() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutomationActionsRunnerResult) string { return v.RunnerType }).(pulumi.StringOutput)
}
// The type of object. The value returned will be `runner`.
func (o LookupAutomationActionsRunnerResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutomationActionsRunnerResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAutomationActionsRunnerResultOutput{})
}