Scaleway

v1.4.0 published on Monday, Nov 28, 2022 by lbrlabs

getIotDevice

Gets information about an IOT Device.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    var myDevice = Scaleway.GetIotDevice.Invoke(new()
    {
        DeviceId = "11111111-1111-1111-1111-111111111111",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = scaleway.LookupIotDevice(ctx, &GetIotDeviceArgs{
			DeviceId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetIotDeviceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var myDevice = ScalewayFunctions.getIotDevice(GetIotDeviceArgs.builder()
            .deviceId("11111111-1111-1111-1111-111111111111")
            .build());

    }
}
import pulumi
import pulumi_scaleway as scaleway

my_device = scaleway.get_iot_device(device_id="11111111-1111-1111-1111-111111111111")
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

// Get info by device ID
const myDevice = pulumi.output(scaleway.getIotDevice({
    deviceId: "11111111-1111-1111-1111-111111111111",
}));
variables:
  myDevice:
    fn::invoke:
      Function: scaleway:getIotDevice
      Arguments:
        deviceId: 11111111-1111-1111-1111-111111111111

Using getIotDevice

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getIotDevice(args: GetIotDeviceArgs, opts?: InvokeOptions): Promise<GetIotDeviceResult>
function getIotDeviceOutput(args: GetIotDeviceOutputArgs, opts?: InvokeOptions): Output<GetIotDeviceResult>
def get_iot_device(device_id: Optional[str] = None,
                   hub_id: Optional[str] = None,
                   name: Optional[str] = None,
                   region: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetIotDeviceResult
def get_iot_device_output(device_id: Optional[pulumi.Input[str]] = None,
                   hub_id: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   region: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetIotDeviceResult]
func LookupIotDevice(ctx *Context, args *LookupIotDeviceArgs, opts ...InvokeOption) (*LookupIotDeviceResult, error)
func LookupIotDeviceOutput(ctx *Context, args *LookupIotDeviceOutputArgs, opts ...InvokeOption) LookupIotDeviceResultOutput

> Note: This function is named LookupIotDevice in the Go SDK.

public static class GetIotDevice 
{
    public static Task<GetIotDeviceResult> InvokeAsync(GetIotDeviceArgs args, InvokeOptions? opts = null)
    public static Output<GetIotDeviceResult> Invoke(GetIotDeviceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIotDeviceResult> getIotDevice(GetIotDeviceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: scaleway:index/getIotDevice:getIotDevice
  arguments:
    # arguments dictionary

The following arguments are supported:

DeviceId string

The device ID. Only one of the name and device_id should be specified.

HubId string

The hub ID.

Name string

The name of the Hub. Only one of the name and device_id should be specified.

Region string

region) The region in which the hub exists.

DeviceId string

The device ID. Only one of the name and device_id should be specified.

HubId string

The hub ID.

Name string

The name of the Hub. Only one of the name and device_id should be specified.

Region string

region) The region in which the hub exists.

deviceId String

The device ID. Only one of the name and device_id should be specified.

hubId String

The hub ID.

name String

The name of the Hub. Only one of the name and device_id should be specified.

region String

region) The region in which the hub exists.

deviceId string

The device ID. Only one of the name and device_id should be specified.

hubId string

The hub ID.

name string

The name of the Hub. Only one of the name and device_id should be specified.

region string

region) The region in which the hub exists.

device_id str

The device ID. Only one of the name and device_id should be specified.

hub_id str

The hub ID.

name str

The name of the Hub. Only one of the name and device_id should be specified.

region str

region) The region in which the hub exists.

deviceId String

The device ID. Only one of the name and device_id should be specified.

hubId String

The hub ID.

name String

The name of the Hub. Only one of the name and device_id should be specified.

region String

region) The region in which the hub exists.

getIotDevice Result

The following output properties are available:

AllowInsecure bool
AllowMultipleConnections bool
Certificates []GetIotDeviceCertificate
CreatedAt string
Description string
HubId string
Id string

The provider-assigned unique ID for this managed resource.

IsConnected bool
LastActivityAt string
MessageFilters []GetIotDeviceMessageFilter
Status string
UpdatedAt string
DeviceId string
Name string
Region string
allowInsecure Boolean
allowMultipleConnections Boolean
certificates List<GetIotDeviceCertificate>
createdAt String
description String
hubId String
id String

The provider-assigned unique ID for this managed resource.

isConnected Boolean
lastActivityAt String
messageFilters List<GetIotDeviceMessageFilter>
status String
updatedAt String
deviceId String
name String
region String
allowInsecure boolean
allowMultipleConnections boolean
certificates GetIotDeviceCertificate[]
createdAt string
description string
hubId string
id string

The provider-assigned unique ID for this managed resource.

isConnected boolean
lastActivityAt string
messageFilters GetIotDeviceMessageFilter[]
status string
updatedAt string
deviceId string
name string
region string
allowInsecure Boolean
allowMultipleConnections Boolean
certificates List<Property Map>
createdAt String
description String
hubId String
id String

The provider-assigned unique ID for this managed resource.

isConnected Boolean
lastActivityAt String
messageFilters List<Property Map>
status String
updatedAt String
deviceId String
name String
region String

Supporting Types

GetIotDeviceCertificate

Crt string
Key string
Crt string
Key string
crt String
key String
crt string
key string
crt str
key str
crt String
key String

GetIotDeviceMessageFilter

GetIotDeviceMessageFilterPublish

Policy string
Topics List<string>
Policy string
Topics []string
policy String
topics List<String>
policy string
topics string[]
policy str
topics Sequence[str]
policy String
topics List<String>

GetIotDeviceMessageFilterSubscribe

Policy string
Topics List<string>
Policy string
Topics []string
policy String
topics List<String>
policy string
topics string[]
policy str
topics Sequence[str]
policy String
topics List<String>

Package Details

Repository
https://github.com/lbrlabs/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.