github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/networkmanager/getDevice.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package networkmanager 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Retrieve information about a device. 15 func LookupDevice(ctx *pulumi.Context, args *LookupDeviceArgs, opts ...pulumi.InvokeOption) (*LookupDeviceResult, error) { 16 opts = internal.PkgInvokeDefaultOpts(opts) 17 var rv LookupDeviceResult 18 err := ctx.Invoke("aws:networkmanager/getDevice:getDevice", args, &rv, opts...) 19 if err != nil { 20 return nil, err 21 } 22 return &rv, nil 23 } 24 25 // A collection of arguments for invoking getDevice. 26 type LookupDeviceArgs struct { 27 // ID of the device. 28 DeviceId string `pulumi:"deviceId"` 29 // ID of the global network. 30 GlobalNetworkId string `pulumi:"globalNetworkId"` 31 // Key-value tags for the device. 32 Tags map[string]string `pulumi:"tags"` 33 } 34 35 // A collection of values returned by getDevice. 36 type LookupDeviceResult struct { 37 // ARN of the device. 38 Arn string `pulumi:"arn"` 39 // AWS location of the device. Documented below. 40 AwsLocations []GetDeviceAwsLocation `pulumi:"awsLocations"` 41 // Description of the device. 42 Description string `pulumi:"description"` 43 DeviceId string `pulumi:"deviceId"` 44 GlobalNetworkId string `pulumi:"globalNetworkId"` 45 // The provider-assigned unique ID for this managed resource. 46 Id string `pulumi:"id"` 47 // Location of the device. Documented below. 48 Locations []GetDeviceLocation `pulumi:"locations"` 49 // Model of device. 50 Model string `pulumi:"model"` 51 // Serial number of the device. 52 SerialNumber string `pulumi:"serialNumber"` 53 // ID of the site. 54 SiteId string `pulumi:"siteId"` 55 // Key-value tags for the device. 56 Tags map[string]string `pulumi:"tags"` 57 // Type of device. 58 Type string `pulumi:"type"` 59 // Vendor of the device. 60 Vendor string `pulumi:"vendor"` 61 } 62 63 func LookupDeviceOutput(ctx *pulumi.Context, args LookupDeviceOutputArgs, opts ...pulumi.InvokeOption) LookupDeviceResultOutput { 64 return pulumi.ToOutputWithContext(context.Background(), args). 65 ApplyT(func(v interface{}) (LookupDeviceResult, error) { 66 args := v.(LookupDeviceArgs) 67 r, err := LookupDevice(ctx, &args, opts...) 68 var s LookupDeviceResult 69 if r != nil { 70 s = *r 71 } 72 return s, err 73 }).(LookupDeviceResultOutput) 74 } 75 76 // A collection of arguments for invoking getDevice. 77 type LookupDeviceOutputArgs struct { 78 // ID of the device. 79 DeviceId pulumi.StringInput `pulumi:"deviceId"` 80 // ID of the global network. 81 GlobalNetworkId pulumi.StringInput `pulumi:"globalNetworkId"` 82 // Key-value tags for the device. 83 Tags pulumi.StringMapInput `pulumi:"tags"` 84 } 85 86 func (LookupDeviceOutputArgs) ElementType() reflect.Type { 87 return reflect.TypeOf((*LookupDeviceArgs)(nil)).Elem() 88 } 89 90 // A collection of values returned by getDevice. 91 type LookupDeviceResultOutput struct{ *pulumi.OutputState } 92 93 func (LookupDeviceResultOutput) ElementType() reflect.Type { 94 return reflect.TypeOf((*LookupDeviceResult)(nil)).Elem() 95 } 96 97 func (o LookupDeviceResultOutput) ToLookupDeviceResultOutput() LookupDeviceResultOutput { 98 return o 99 } 100 101 func (o LookupDeviceResultOutput) ToLookupDeviceResultOutputWithContext(ctx context.Context) LookupDeviceResultOutput { 102 return o 103 } 104 105 // ARN of the device. 106 func (o LookupDeviceResultOutput) Arn() pulumi.StringOutput { 107 return o.ApplyT(func(v LookupDeviceResult) string { return v.Arn }).(pulumi.StringOutput) 108 } 109 110 // AWS location of the device. Documented below. 111 func (o LookupDeviceResultOutput) AwsLocations() GetDeviceAwsLocationArrayOutput { 112 return o.ApplyT(func(v LookupDeviceResult) []GetDeviceAwsLocation { return v.AwsLocations }).(GetDeviceAwsLocationArrayOutput) 113 } 114 115 // Description of the device. 116 func (o LookupDeviceResultOutput) Description() pulumi.StringOutput { 117 return o.ApplyT(func(v LookupDeviceResult) string { return v.Description }).(pulumi.StringOutput) 118 } 119 120 func (o LookupDeviceResultOutput) DeviceId() pulumi.StringOutput { 121 return o.ApplyT(func(v LookupDeviceResult) string { return v.DeviceId }).(pulumi.StringOutput) 122 } 123 124 func (o LookupDeviceResultOutput) GlobalNetworkId() pulumi.StringOutput { 125 return o.ApplyT(func(v LookupDeviceResult) string { return v.GlobalNetworkId }).(pulumi.StringOutput) 126 } 127 128 // The provider-assigned unique ID for this managed resource. 129 func (o LookupDeviceResultOutput) Id() pulumi.StringOutput { 130 return o.ApplyT(func(v LookupDeviceResult) string { return v.Id }).(pulumi.StringOutput) 131 } 132 133 // Location of the device. Documented below. 134 func (o LookupDeviceResultOutput) Locations() GetDeviceLocationArrayOutput { 135 return o.ApplyT(func(v LookupDeviceResult) []GetDeviceLocation { return v.Locations }).(GetDeviceLocationArrayOutput) 136 } 137 138 // Model of device. 139 func (o LookupDeviceResultOutput) Model() pulumi.StringOutput { 140 return o.ApplyT(func(v LookupDeviceResult) string { return v.Model }).(pulumi.StringOutput) 141 } 142 143 // Serial number of the device. 144 func (o LookupDeviceResultOutput) SerialNumber() pulumi.StringOutput { 145 return o.ApplyT(func(v LookupDeviceResult) string { return v.SerialNumber }).(pulumi.StringOutput) 146 } 147 148 // ID of the site. 149 func (o LookupDeviceResultOutput) SiteId() pulumi.StringOutput { 150 return o.ApplyT(func(v LookupDeviceResult) string { return v.SiteId }).(pulumi.StringOutput) 151 } 152 153 // Key-value tags for the device. 154 func (o LookupDeviceResultOutput) Tags() pulumi.StringMapOutput { 155 return o.ApplyT(func(v LookupDeviceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 156 } 157 158 // Type of device. 159 func (o LookupDeviceResultOutput) Type() pulumi.StringOutput { 160 return o.ApplyT(func(v LookupDeviceResult) string { return v.Type }).(pulumi.StringOutput) 161 } 162 163 // Vendor of the device. 164 func (o LookupDeviceResultOutput) Vendor() pulumi.StringOutput { 165 return o.ApplyT(func(v LookupDeviceResult) string { return v.Vendor }).(pulumi.StringOutput) 166 } 167 168 func init() { 169 pulumi.RegisterOutputType(LookupDeviceResultOutput{}) 170 }