/
getDevice.go
283 lines (239 loc) · 12 KB
/
getDevice.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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Retrieves the specified device.
func LookupDevice(ctx *pulumi.Context, args *LookupDeviceArgs, opts ...pulumi.InvokeOption) (*LookupDeviceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDeviceResult
err := ctx.Invoke("google-native:cloudidentity/v1:getDevice", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupDeviceArgs struct {
Customer *string `pulumi:"customer"`
DeviceId string `pulumi:"deviceId"`
}
type LookupDeviceResult struct {
// Attributes specific to Android devices.
AndroidSpecificAttributes GoogleAppsCloudidentityDevicesV1AndroidAttributesResponse `pulumi:"androidSpecificAttributes"`
// Asset tag of the device.
AssetTag string `pulumi:"assetTag"`
// Baseband version of the device.
BasebandVersion string `pulumi:"basebandVersion"`
// Device bootloader version. Example: 0.6.7.
BootloaderVersion string `pulumi:"bootloaderVersion"`
// Device brand. Example: Samsung.
Brand string `pulumi:"brand"`
// Build number of the device.
BuildNumber string `pulumi:"buildNumber"`
// Represents whether the Device is compromised.
CompromisedState string `pulumi:"compromisedState"`
// When the Company-Owned device was imported. This field is empty for BYOD devices.
CreateTime string `pulumi:"createTime"`
// Unique identifier for the device.
DeviceId string `pulumi:"deviceId"`
// Type of device.
DeviceType string `pulumi:"deviceType"`
// Whether developer options is enabled on device.
EnabledDeveloperOptions bool `pulumi:"enabledDeveloperOptions"`
// Whether USB debugging is enabled on device.
EnabledUsbDebugging bool `pulumi:"enabledUsbDebugging"`
// Device encryption state.
EncryptionState string `pulumi:"encryptionState"`
// Host name of the device.
Hostname string `pulumi:"hostname"`
// IMEI number of device if GSM device; empty otherwise.
Imei string `pulumi:"imei"`
// Kernel version of the device.
KernelVersion string `pulumi:"kernelVersion"`
// Most recent time when device synced with this service.
LastSyncTime string `pulumi:"lastSyncTime"`
// Management state of the device
ManagementState string `pulumi:"managementState"`
// Device manufacturer. Example: Motorola.
Manufacturer string `pulumi:"manufacturer"`
// MEID number of device if CDMA device; empty otherwise.
Meid string `pulumi:"meid"`
// Model name of device. Example: Pixel 3.
Model string `pulumi:"model"`
// [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device}`, where device is the unique id assigned to the Device.
Name string `pulumi:"name"`
// Mobile or network operator of device, if available.
NetworkOperator string `pulumi:"networkOperator"`
// OS version of the device. Example: Android 8.1.0.
OsVersion string `pulumi:"osVersion"`
// Domain name for Google accounts on device. Type for other accounts on device. On Android, will only be populated if |ownership_privilege| is |PROFILE_OWNER| or |DEVICE_OWNER|. Does not include the account signed in to the device policy app if that account's domain has only one account. Examples: "com.example", "xyz.com".
OtherAccounts []string `pulumi:"otherAccounts"`
// Whether the device is owned by the company or an individual
OwnerType string `pulumi:"ownerType"`
// OS release version. Example: 6.0.
ReleaseVersion string `pulumi:"releaseVersion"`
// OS security patch update time on device.
SecurityPatchTime string `pulumi:"securityPatchTime"`
// Serial Number of device. Example: HT82V1A01076.
SerialNumber string `pulumi:"serialNumber"`
// WiFi MAC addresses of device.
WifiMacAddresses []string `pulumi:"wifiMacAddresses"`
}
func LookupDeviceOutput(ctx *pulumi.Context, args LookupDeviceOutputArgs, opts ...pulumi.InvokeOption) LookupDeviceResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupDeviceResult, error) {
args := v.(LookupDeviceArgs)
r, err := LookupDevice(ctx, &args, opts...)
var s LookupDeviceResult
if r != nil {
s = *r
}
return s, err
}).(LookupDeviceResultOutput)
}
type LookupDeviceOutputArgs struct {
Customer pulumi.StringPtrInput `pulumi:"customer"`
DeviceId pulumi.StringInput `pulumi:"deviceId"`
}
func (LookupDeviceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDeviceArgs)(nil)).Elem()
}
type LookupDeviceResultOutput struct{ *pulumi.OutputState }
func (LookupDeviceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDeviceResult)(nil)).Elem()
}
func (o LookupDeviceResultOutput) ToLookupDeviceResultOutput() LookupDeviceResultOutput {
return o
}
func (o LookupDeviceResultOutput) ToLookupDeviceResultOutputWithContext(ctx context.Context) LookupDeviceResultOutput {
return o
}
// Attributes specific to Android devices.
func (o LookupDeviceResultOutput) AndroidSpecificAttributes() GoogleAppsCloudidentityDevicesV1AndroidAttributesResponseOutput {
return o.ApplyT(func(v LookupDeviceResult) GoogleAppsCloudidentityDevicesV1AndroidAttributesResponse {
return v.AndroidSpecificAttributes
}).(GoogleAppsCloudidentityDevicesV1AndroidAttributesResponseOutput)
}
// Asset tag of the device.
func (o LookupDeviceResultOutput) AssetTag() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.AssetTag }).(pulumi.StringOutput)
}
// Baseband version of the device.
func (o LookupDeviceResultOutput) BasebandVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.BasebandVersion }).(pulumi.StringOutput)
}
// Device bootloader version. Example: 0.6.7.
func (o LookupDeviceResultOutput) BootloaderVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.BootloaderVersion }).(pulumi.StringOutput)
}
// Device brand. Example: Samsung.
func (o LookupDeviceResultOutput) Brand() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Brand }).(pulumi.StringOutput)
}
// Build number of the device.
func (o LookupDeviceResultOutput) BuildNumber() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.BuildNumber }).(pulumi.StringOutput)
}
// Represents whether the Device is compromised.
func (o LookupDeviceResultOutput) CompromisedState() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.CompromisedState }).(pulumi.StringOutput)
}
// When the Company-Owned device was imported. This field is empty for BYOD devices.
func (o LookupDeviceResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// Unique identifier for the device.
func (o LookupDeviceResultOutput) DeviceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.DeviceId }).(pulumi.StringOutput)
}
// Type of device.
func (o LookupDeviceResultOutput) DeviceType() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.DeviceType }).(pulumi.StringOutput)
}
// Whether developer options is enabled on device.
func (o LookupDeviceResultOutput) EnabledDeveloperOptions() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDeviceResult) bool { return v.EnabledDeveloperOptions }).(pulumi.BoolOutput)
}
// Whether USB debugging is enabled on device.
func (o LookupDeviceResultOutput) EnabledUsbDebugging() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDeviceResult) bool { return v.EnabledUsbDebugging }).(pulumi.BoolOutput)
}
// Device encryption state.
func (o LookupDeviceResultOutput) EncryptionState() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.EncryptionState }).(pulumi.StringOutput)
}
// Host name of the device.
func (o LookupDeviceResultOutput) Hostname() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Hostname }).(pulumi.StringOutput)
}
// IMEI number of device if GSM device; empty otherwise.
func (o LookupDeviceResultOutput) Imei() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Imei }).(pulumi.StringOutput)
}
// Kernel version of the device.
func (o LookupDeviceResultOutput) KernelVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.KernelVersion }).(pulumi.StringOutput)
}
// Most recent time when device synced with this service.
func (o LookupDeviceResultOutput) LastSyncTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.LastSyncTime }).(pulumi.StringOutput)
}
// Management state of the device
func (o LookupDeviceResultOutput) ManagementState() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.ManagementState }).(pulumi.StringOutput)
}
// Device manufacturer. Example: Motorola.
func (o LookupDeviceResultOutput) Manufacturer() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Manufacturer }).(pulumi.StringOutput)
}
// MEID number of device if CDMA device; empty otherwise.
func (o LookupDeviceResultOutput) Meid() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Meid }).(pulumi.StringOutput)
}
// Model name of device. Example: Pixel 3.
func (o LookupDeviceResultOutput) Model() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Model }).(pulumi.StringOutput)
}
// [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device}`, where device is the unique id assigned to the Device.
func (o LookupDeviceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Name }).(pulumi.StringOutput)
}
// Mobile or network operator of device, if available.
func (o LookupDeviceResultOutput) NetworkOperator() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.NetworkOperator }).(pulumi.StringOutput)
}
// OS version of the device. Example: Android 8.1.0.
func (o LookupDeviceResultOutput) OsVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.OsVersion }).(pulumi.StringOutput)
}
// Domain name for Google accounts on device. Type for other accounts on device. On Android, will only be populated if |ownership_privilege| is |PROFILE_OWNER| or |DEVICE_OWNER|. Does not include the account signed in to the device policy app if that account's domain has only one account. Examples: "com.example", "xyz.com".
func (o LookupDeviceResultOutput) OtherAccounts() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupDeviceResult) []string { return v.OtherAccounts }).(pulumi.StringArrayOutput)
}
// Whether the device is owned by the company or an individual
func (o LookupDeviceResultOutput) OwnerType() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.OwnerType }).(pulumi.StringOutput)
}
// OS release version. Example: 6.0.
func (o LookupDeviceResultOutput) ReleaseVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.ReleaseVersion }).(pulumi.StringOutput)
}
// OS security patch update time on device.
func (o LookupDeviceResultOutput) SecurityPatchTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.SecurityPatchTime }).(pulumi.StringOutput)
}
// Serial Number of device. Example: HT82V1A01076.
func (o LookupDeviceResultOutput) SerialNumber() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.SerialNumber }).(pulumi.StringOutput)
}
// WiFi MAC addresses of device.
func (o LookupDeviceResultOutput) WifiMacAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupDeviceResult) []string { return v.WifiMacAddresses }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDeviceResultOutput{})
}