/
getHoursOfOperation.go
210 lines (187 loc) · 7.55 KB
/
getHoursOfOperation.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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
// 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 connect
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides details about a specific Amazon Connect Hours of Operation.
//
// ## Example Usage
//
// By `name`
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := connect.LookupHoursOfOperation(ctx, &connect.LookupHoursOfOperationArgs{
// InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
// Name: pulumi.StringRef("Test"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// By `hoursOfOperationId`
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := connect.LookupHoursOfOperation(ctx, &connect.LookupHoursOfOperationArgs{
// InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
// HoursOfOperationId: pulumi.StringRef("cccccccc-bbbb-cccc-dddd-111111111111"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func LookupHoursOfOperation(ctx *pulumi.Context, args *LookupHoursOfOperationArgs, opts ...pulumi.InvokeOption) (*LookupHoursOfOperationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupHoursOfOperationResult
err := ctx.Invoke("aws:connect/getHoursOfOperation:getHoursOfOperation", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getHoursOfOperation.
type LookupHoursOfOperationArgs struct {
// Returns information on a specific Hours of Operation by hours of operation id
HoursOfOperationId *string `pulumi:"hoursOfOperationId"`
// Reference to the hosting Amazon Connect Instance
InstanceId string `pulumi:"instanceId"`
// Returns information on a specific Hours of Operation by name
Name *string `pulumi:"name"`
// Map of tags to assign to the Hours of Operation.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getHoursOfOperation.
type LookupHoursOfOperationResult struct {
// ARN of the Hours of Operation.
Arn string `pulumi:"arn"`
// Configuration information for the hours of operation: day, start time, and end time . Config blocks are documented below. Config blocks are documented below.
Configs []GetHoursOfOperationConfig `pulumi:"configs"`
// Description of the Hours of Operation.
Description string `pulumi:"description"`
// The identifier for the hours of operation.
HoursOfOperationId string `pulumi:"hoursOfOperationId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Identifier of the hosting Amazon Connect Instance.
InstanceId string `pulumi:"instanceId"`
// Name of the Hours of Operation.
Name string `pulumi:"name"`
// Map of tags to assign to the Hours of Operation.
Tags map[string]string `pulumi:"tags"`
// Time zone of the Hours of Operation.
TimeZone string `pulumi:"timeZone"`
}
func LookupHoursOfOperationOutput(ctx *pulumi.Context, args LookupHoursOfOperationOutputArgs, opts ...pulumi.InvokeOption) LookupHoursOfOperationResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupHoursOfOperationResult, error) {
args := v.(LookupHoursOfOperationArgs)
r, err := LookupHoursOfOperation(ctx, &args, opts...)
var s LookupHoursOfOperationResult
if r != nil {
s = *r
}
return s, err
}).(LookupHoursOfOperationResultOutput)
}
// A collection of arguments for invoking getHoursOfOperation.
type LookupHoursOfOperationOutputArgs struct {
// Returns information on a specific Hours of Operation by hours of operation id
HoursOfOperationId pulumi.StringPtrInput `pulumi:"hoursOfOperationId"`
// Reference to the hosting Amazon Connect Instance
InstanceId pulumi.StringInput `pulumi:"instanceId"`
// Returns information on a specific Hours of Operation by name
Name pulumi.StringPtrInput `pulumi:"name"`
// Map of tags to assign to the Hours of Operation.
Tags pulumi.StringMapInput `pulumi:"tags"`
}
func (LookupHoursOfOperationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupHoursOfOperationArgs)(nil)).Elem()
}
// A collection of values returned by getHoursOfOperation.
type LookupHoursOfOperationResultOutput struct{ *pulumi.OutputState }
func (LookupHoursOfOperationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupHoursOfOperationResult)(nil)).Elem()
}
func (o LookupHoursOfOperationResultOutput) ToLookupHoursOfOperationResultOutput() LookupHoursOfOperationResultOutput {
return o
}
func (o LookupHoursOfOperationResultOutput) ToLookupHoursOfOperationResultOutputWithContext(ctx context.Context) LookupHoursOfOperationResultOutput {
return o
}
// ARN of the Hours of Operation.
func (o LookupHoursOfOperationResultOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.Arn }).(pulumi.StringOutput)
}
// Configuration information for the hours of operation: day, start time, and end time . Config blocks are documented below. Config blocks are documented below.
func (o LookupHoursOfOperationResultOutput) Configs() GetHoursOfOperationConfigArrayOutput {
return o.ApplyT(func(v LookupHoursOfOperationResult) []GetHoursOfOperationConfig { return v.Configs }).(GetHoursOfOperationConfigArrayOutput)
}
// Description of the Hours of Operation.
func (o LookupHoursOfOperationResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.Description }).(pulumi.StringOutput)
}
// The identifier for the hours of operation.
func (o LookupHoursOfOperationResultOutput) HoursOfOperationId() pulumi.StringOutput {
return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.HoursOfOperationId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupHoursOfOperationResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.Id }).(pulumi.StringOutput)
}
// Identifier of the hosting Amazon Connect Instance.
func (o LookupHoursOfOperationResultOutput) InstanceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.InstanceId }).(pulumi.StringOutput)
}
// Name of the Hours of Operation.
func (o LookupHoursOfOperationResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.Name }).(pulumi.StringOutput)
}
// Map of tags to assign to the Hours of Operation.
func (o LookupHoursOfOperationResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupHoursOfOperationResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// Time zone of the Hours of Operation.
func (o LookupHoursOfOperationResultOutput) TimeZone() pulumi.StringOutput {
return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.TimeZone }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupHoursOfOperationResultOutput{})
}