/
wirelessDevice.go
223 lines (188 loc) · 9.02 KB
/
wirelessDevice.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
211
212
213
214
215
216
217
218
219
220
221
222
223
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package iotwireless
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Create and manage wireless gateways, including LoRa gateways.
type WirelessDevice struct {
pulumi.CustomResourceState
// Wireless device arn. Returned after successful create.
Arn pulumi.StringOutput `pulumi:"arn"`
// Wireless device Id. Returned after successful create.
AwsId pulumi.StringOutput `pulumi:"awsId"`
// Wireless device description
Description pulumi.StringPtrOutput `pulumi:"description"`
// Wireless device destination name
DestinationName pulumi.StringOutput `pulumi:"destinationName"`
// The date and time when the most recent uplink was received.
LastUplinkReceivedAt pulumi.StringPtrOutput `pulumi:"lastUplinkReceivedAt"`
// The combination of Package, Station and Model which represents the version of the LoRaWAN Wireless Device.
LoRaWan WirelessDeviceLoRaWanDevicePtrOutput `pulumi:"loRaWan"`
// Wireless device name
Name pulumi.StringPtrOutput `pulumi:"name"`
// A list of key-value pairs that contain metadata for the device. Currently not supported, will not create if tags are passed.
Tags aws.TagArrayOutput `pulumi:"tags"`
// Thing arn. Passed into update to associate Thing with Wireless device.
ThingArn pulumi.StringPtrOutput `pulumi:"thingArn"`
// Thing Arn. If there is a Thing created, this can be returned with a Get call.
ThingName pulumi.StringOutput `pulumi:"thingName"`
// Wireless device type, currently only Sidewalk and LoRa
Type WirelessDeviceTypeOutput `pulumi:"type"`
}
// NewWirelessDevice registers a new resource with the given unique name, arguments, and options.
func NewWirelessDevice(ctx *pulumi.Context,
name string, args *WirelessDeviceArgs, opts ...pulumi.ResourceOption) (*WirelessDevice, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DestinationName == nil {
return nil, errors.New("invalid value for required argument 'DestinationName'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WirelessDevice
err := ctx.RegisterResource("aws-native:iotwireless:WirelessDevice", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWirelessDevice gets an existing WirelessDevice 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 GetWirelessDevice(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WirelessDeviceState, opts ...pulumi.ResourceOption) (*WirelessDevice, error) {
var resource WirelessDevice
err := ctx.ReadResource("aws-native:iotwireless:WirelessDevice", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WirelessDevice resources.
type wirelessDeviceState struct {
}
type WirelessDeviceState struct {
}
func (WirelessDeviceState) ElementType() reflect.Type {
return reflect.TypeOf((*wirelessDeviceState)(nil)).Elem()
}
type wirelessDeviceArgs struct {
// Wireless device description
Description *string `pulumi:"description"`
// Wireless device destination name
DestinationName string `pulumi:"destinationName"`
// The date and time when the most recent uplink was received.
LastUplinkReceivedAt *string `pulumi:"lastUplinkReceivedAt"`
// The combination of Package, Station and Model which represents the version of the LoRaWAN Wireless Device.
LoRaWan *WirelessDeviceLoRaWanDevice `pulumi:"loRaWan"`
// Wireless device name
Name *string `pulumi:"name"`
// A list of key-value pairs that contain metadata for the device. Currently not supported, will not create if tags are passed.
Tags []aws.Tag `pulumi:"tags"`
// Thing arn. Passed into update to associate Thing with Wireless device.
ThingArn *string `pulumi:"thingArn"`
// Wireless device type, currently only Sidewalk and LoRa
Type WirelessDeviceType `pulumi:"type"`
}
// The set of arguments for constructing a WirelessDevice resource.
type WirelessDeviceArgs struct {
// Wireless device description
Description pulumi.StringPtrInput
// Wireless device destination name
DestinationName pulumi.StringInput
// The date and time when the most recent uplink was received.
LastUplinkReceivedAt pulumi.StringPtrInput
// The combination of Package, Station and Model which represents the version of the LoRaWAN Wireless Device.
LoRaWan WirelessDeviceLoRaWanDevicePtrInput
// Wireless device name
Name pulumi.StringPtrInput
// A list of key-value pairs that contain metadata for the device. Currently not supported, will not create if tags are passed.
Tags aws.TagArrayInput
// Thing arn. Passed into update to associate Thing with Wireless device.
ThingArn pulumi.StringPtrInput
// Wireless device type, currently only Sidewalk and LoRa
Type WirelessDeviceTypeInput
}
func (WirelessDeviceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*wirelessDeviceArgs)(nil)).Elem()
}
type WirelessDeviceInput interface {
pulumi.Input
ToWirelessDeviceOutput() WirelessDeviceOutput
ToWirelessDeviceOutputWithContext(ctx context.Context) WirelessDeviceOutput
}
func (*WirelessDevice) ElementType() reflect.Type {
return reflect.TypeOf((**WirelessDevice)(nil)).Elem()
}
func (i *WirelessDevice) ToWirelessDeviceOutput() WirelessDeviceOutput {
return i.ToWirelessDeviceOutputWithContext(context.Background())
}
func (i *WirelessDevice) ToWirelessDeviceOutputWithContext(ctx context.Context) WirelessDeviceOutput {
return pulumi.ToOutputWithContext(ctx, i).(WirelessDeviceOutput)
}
type WirelessDeviceOutput struct{ *pulumi.OutputState }
func (WirelessDeviceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WirelessDevice)(nil)).Elem()
}
func (o WirelessDeviceOutput) ToWirelessDeviceOutput() WirelessDeviceOutput {
return o
}
func (o WirelessDeviceOutput) ToWirelessDeviceOutputWithContext(ctx context.Context) WirelessDeviceOutput {
return o
}
// Wireless device arn. Returned after successful create.
func (o WirelessDeviceOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *WirelessDevice) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// Wireless device Id. Returned after successful create.
func (o WirelessDeviceOutput) AwsId() pulumi.StringOutput {
return o.ApplyT(func(v *WirelessDevice) pulumi.StringOutput { return v.AwsId }).(pulumi.StringOutput)
}
// Wireless device description
func (o WirelessDeviceOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WirelessDevice) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Wireless device destination name
func (o WirelessDeviceOutput) DestinationName() pulumi.StringOutput {
return o.ApplyT(func(v *WirelessDevice) pulumi.StringOutput { return v.DestinationName }).(pulumi.StringOutput)
}
// The date and time when the most recent uplink was received.
func (o WirelessDeviceOutput) LastUplinkReceivedAt() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WirelessDevice) pulumi.StringPtrOutput { return v.LastUplinkReceivedAt }).(pulumi.StringPtrOutput)
}
// The combination of Package, Station and Model which represents the version of the LoRaWAN Wireless Device.
func (o WirelessDeviceOutput) LoRaWan() WirelessDeviceLoRaWanDevicePtrOutput {
return o.ApplyT(func(v *WirelessDevice) WirelessDeviceLoRaWanDevicePtrOutput { return v.LoRaWan }).(WirelessDeviceLoRaWanDevicePtrOutput)
}
// Wireless device name
func (o WirelessDeviceOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WirelessDevice) pulumi.StringPtrOutput { return v.Name }).(pulumi.StringPtrOutput)
}
// A list of key-value pairs that contain metadata for the device. Currently not supported, will not create if tags are passed.
func (o WirelessDeviceOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *WirelessDevice) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
// Thing arn. Passed into update to associate Thing with Wireless device.
func (o WirelessDeviceOutput) ThingArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WirelessDevice) pulumi.StringPtrOutput { return v.ThingArn }).(pulumi.StringPtrOutput)
}
// Thing Arn. If there is a Thing created, this can be returned with a Get call.
func (o WirelessDeviceOutput) ThingName() pulumi.StringOutput {
return o.ApplyT(func(v *WirelessDevice) pulumi.StringOutput { return v.ThingName }).(pulumi.StringOutput)
}
// Wireless device type, currently only Sidewalk and LoRa
func (o WirelessDeviceOutput) Type() WirelessDeviceTypeOutput {
return o.ApplyT(func(v *WirelessDevice) WirelessDeviceTypeOutput { return v.Type }).(WirelessDeviceTypeOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WirelessDeviceInput)(nil)).Elem(), &WirelessDevice{})
pulumi.RegisterOutputType(WirelessDeviceOutput{})
}