Yandex

v0.10.0 published on Thursday, Nov 18, 2021 by Pulumi

IotCoreDevice

Allows management of Yandex.Cloud IoT Device.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var myDevice = new Yandex.IotCoreDevice("myDevice", new Yandex.IotCoreDeviceArgs
        {
            Aliases = 
            {
                { "some_alias1/subtopic", "$devices/{id}/events/somesubtopic" },
                { "some_alias2/subtopic", "$devices/{id}/events/aaa/bbb" },
            },
            Certificates = 
            {
                "public part of certificate1",
                "public part of certificate2",
            },
            Description = "any description",
            Passwords = 
            {
                "my-password1",
                "my-password2",
            },
            RegistryId = "are1sampleregistryid11",
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewIotCoreDevice(ctx, "myDevice", &yandex.IotCoreDeviceArgs{
			Aliases: pulumi.StringMap{
				"some_alias1/subtopic": pulumi.String(fmt.Sprintf("%v%v", "$", "devices/{id}/events/somesubtopic")),
				"some_alias2/subtopic": pulumi.String(fmt.Sprintf("%v%v", "$", "devices/{id}/events/aaa/bbb")),
			},
			Certificates: pulumi.StringArray{
				pulumi.String("public part of certificate1"),
				pulumi.String("public part of certificate2"),
			},
			Description: pulumi.String("any description"),
			Passwords: pulumi.StringArray{
				pulumi.String("my-password1"),
				pulumi.String("my-password2"),
			},
			RegistryId: pulumi.String("are1sampleregistryid11"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_yandex as yandex

my_device = yandex.IotCoreDevice("myDevice",
    aliases={
        "some_alias1/subtopic": "$devices/{id}/events/somesubtopic",
        "some_alias2/subtopic": "$devices/{id}/events/aaa/bbb",
    },
    certificates=[
        "public part of certificate1",
        "public part of certificate2",
    ],
    description="any description",
    passwords=[
        "my-password1",
        "my-password2",
    ],
    registry_id="are1sampleregistryid11")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const myDevice = new yandex.IotCoreDevice("my_device", {
    aliases: {
        "some_alias1/subtopic": "$devices/{id}/events/somesubtopic",
        "some_alias2/subtopic": "$devices/{id}/events/aaa/bbb",
    },
    certificates: [
        "public part of certificate1",
        "public part of certificate2",
    ],
    description: "any description",
    passwords: [
        "my-password1",
        "my-password2",
    ],
    registryId: "are1sampleregistryid11",
});

Create a IotCoreDevice Resource

new IotCoreDevice(name: string, args: IotCoreDeviceArgs, opts?: CustomResourceOptions);
@overload
def IotCoreDevice(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  aliases: Optional[Mapping[str, str]] = None,
                  certificates: Optional[Sequence[str]] = None,
                  description: Optional[str] = None,
                  name: Optional[str] = None,
                  passwords: Optional[Sequence[str]] = None,
                  registry_id: Optional[str] = None)
@overload
def IotCoreDevice(resource_name: str,
                  args: IotCoreDeviceArgs,
                  opts: Optional[ResourceOptions] = None)
func NewIotCoreDevice(ctx *Context, name string, args IotCoreDeviceArgs, opts ...ResourceOption) (*IotCoreDevice, error)
public IotCoreDevice(string name, IotCoreDeviceArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args IotCoreDeviceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args IotCoreDeviceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args IotCoreDeviceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args IotCoreDeviceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

IotCoreDevice Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The IotCoreDevice resource accepts the following input properties:

RegistryId string
IoT Core Registry ID for the IoT Core Device
Aliases Dictionary<string, string>
A set of key/value aliases pairs to assign to the IoT Core Device
Certificates List<string>
A set of certificate’s fingerprints for the IoT Core Device
Description string
Description of the IoT Core Device
Name string
IoT Core Device name used to define device
Passwords List<string>
A set of passwords’s id for the IoT Core Device
RegistryId string
IoT Core Registry ID for the IoT Core Device
Aliases map[string]string
A set of key/value aliases pairs to assign to the IoT Core Device
Certificates []string
A set of certificate’s fingerprints for the IoT Core Device
Description string
Description of the IoT Core Device
Name string
IoT Core Device name used to define device
Passwords []string
A set of passwords’s id for the IoT Core Device
registryId string
IoT Core Registry ID for the IoT Core Device
aliases {[key: string]: string}
A set of key/value aliases pairs to assign to the IoT Core Device
certificates string[]
A set of certificate’s fingerprints for the IoT Core Device
description string
Description of the IoT Core Device
name string
IoT Core Device name used to define device
passwords string[]
A set of passwords’s id for the IoT Core Device
registry_id str
IoT Core Registry ID for the IoT Core Device
aliases Mapping[str, str]
A set of key/value aliases pairs to assign to the IoT Core Device
certificates Sequence[str]
A set of certificate’s fingerprints for the IoT Core Device
description str
Description of the IoT Core Device
name str
IoT Core Device name used to define device
passwords Sequence[str]
A set of passwords’s id for the IoT Core Device

Outputs

All input properties are implicitly available as output properties. Additionally, the IotCoreDevice resource produces the following output properties:

CreatedAt string
Creation timestamp of the IoT Core Device
Id string
The provider-assigned unique ID for this managed resource.
CreatedAt string
Creation timestamp of the IoT Core Device
Id string
The provider-assigned unique ID for this managed resource.
createdAt string
Creation timestamp of the IoT Core Device
id string
The provider-assigned unique ID for this managed resource.
created_at str
Creation timestamp of the IoT Core Device
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing IotCoreDevice Resource

Get an existing IotCoreDevice resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: IotCoreDeviceState, opts?: CustomResourceOptions): IotCoreDevice
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        aliases: Optional[Mapping[str, str]] = None,
        certificates: Optional[Sequence[str]] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        passwords: Optional[Sequence[str]] = None,
        registry_id: Optional[str] = None) -> IotCoreDevice
func GetIotCoreDevice(ctx *Context, name string, id IDInput, state *IotCoreDeviceState, opts ...ResourceOption) (*IotCoreDevice, error)
public static IotCoreDevice Get(string name, Input<string> id, IotCoreDeviceState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Aliases Dictionary<string, string>
A set of key/value aliases pairs to assign to the IoT Core Device
Certificates List<string>
A set of certificate’s fingerprints for the IoT Core Device
CreatedAt string
Creation timestamp of the IoT Core Device
Description string
Description of the IoT Core Device
Name string
IoT Core Device name used to define device
Passwords List<string>
A set of passwords’s id for the IoT Core Device
RegistryId string
IoT Core Registry ID for the IoT Core Device
Aliases map[string]string
A set of key/value aliases pairs to assign to the IoT Core Device
Certificates []string
A set of certificate’s fingerprints for the IoT Core Device
CreatedAt string
Creation timestamp of the IoT Core Device
Description string
Description of the IoT Core Device
Name string
IoT Core Device name used to define device
Passwords []string
A set of passwords’s id for the IoT Core Device
RegistryId string
IoT Core Registry ID for the IoT Core Device
aliases {[key: string]: string}
A set of key/value aliases pairs to assign to the IoT Core Device
certificates string[]
A set of certificate’s fingerprints for the IoT Core Device
createdAt string
Creation timestamp of the IoT Core Device
description string
Description of the IoT Core Device
name string
IoT Core Device name used to define device
passwords string[]
A set of passwords’s id for the IoT Core Device
registryId string
IoT Core Registry ID for the IoT Core Device
aliases Mapping[str, str]
A set of key/value aliases pairs to assign to the IoT Core Device
certificates Sequence[str]
A set of certificate’s fingerprints for the IoT Core Device
created_at str
Creation timestamp of the IoT Core Device
description str
Description of the IoT Core Device
name str
IoT Core Device name used to define device
passwords Sequence[str]
A set of passwords’s id for the IoT Core Device
registry_id str
IoT Core Registry ID for the IoT Core Device

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.