iot

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PkgVersion added in v0.0.1

func PkgVersion() (semver.Version, error)

PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.

Types

type DeviceGroup

type DeviceGroup struct {
	pulumi.CustomResourceState

	// The GroupDesc of the device group.
	GroupDesc pulumi.StringPtrOutput `pulumi:"groupDesc"`
	// The GroupName of the device group.
	GroupName pulumi.StringOutput `pulumi:"groupName"`
	// The id of the Iot Instance.
	IotInstanceId pulumi.StringPtrOutput `pulumi:"iotInstanceId"`
	// The id of the SuperGroup.
	SuperGroupId pulumi.StringPtrOutput `pulumi:"superGroupId"`
}

Provides a Iot Device Group resource.

For information about Iot Device Group and how to use it, see [What is Device Group](https://www.alibabacloud.com/help/product/30520.htm).

> **NOTE:** Available in v1.134.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/iot"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iot.NewDeviceGroup(ctx, "example", &iot.DeviceGroupArgs{
			GroupName: pulumi.String("example_value"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Iot Device Group can be imported using the id, e.g.

```sh

$ pulumi import alicloud:iot/deviceGroup:DeviceGroup example <id>

```

func GetDeviceGroup

func GetDeviceGroup(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DeviceGroupState, opts ...pulumi.ResourceOption) (*DeviceGroup, error)

GetDeviceGroup gets an existing DeviceGroup 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 NewDeviceGroup

func NewDeviceGroup(ctx *pulumi.Context,
	name string, args *DeviceGroupArgs, opts ...pulumi.ResourceOption) (*DeviceGroup, error)

NewDeviceGroup registers a new resource with the given unique name, arguments, and options.

func (*DeviceGroup) ElementType

func (*DeviceGroup) ElementType() reflect.Type

func (*DeviceGroup) ToDeviceGroupOutput

func (i *DeviceGroup) ToDeviceGroupOutput() DeviceGroupOutput

func (*DeviceGroup) ToDeviceGroupOutputWithContext

func (i *DeviceGroup) ToDeviceGroupOutputWithContext(ctx context.Context) DeviceGroupOutput

type DeviceGroupArgs

type DeviceGroupArgs struct {
	// The GroupDesc of the device group.
	GroupDesc pulumi.StringPtrInput
	// The GroupName of the device group.
	GroupName pulumi.StringInput
	// The id of the Iot Instance.
	IotInstanceId pulumi.StringPtrInput
	// The id of the SuperGroup.
	SuperGroupId pulumi.StringPtrInput
}

The set of arguments for constructing a DeviceGroup resource.

func (DeviceGroupArgs) ElementType

func (DeviceGroupArgs) ElementType() reflect.Type

type DeviceGroupArray

type DeviceGroupArray []DeviceGroupInput

func (DeviceGroupArray) ElementType

func (DeviceGroupArray) ElementType() reflect.Type

func (DeviceGroupArray) ToDeviceGroupArrayOutput

func (i DeviceGroupArray) ToDeviceGroupArrayOutput() DeviceGroupArrayOutput

func (DeviceGroupArray) ToDeviceGroupArrayOutputWithContext

func (i DeviceGroupArray) ToDeviceGroupArrayOutputWithContext(ctx context.Context) DeviceGroupArrayOutput

type DeviceGroupArrayInput

type DeviceGroupArrayInput interface {
	pulumi.Input

	ToDeviceGroupArrayOutput() DeviceGroupArrayOutput
	ToDeviceGroupArrayOutputWithContext(context.Context) DeviceGroupArrayOutput
}

DeviceGroupArrayInput is an input type that accepts DeviceGroupArray and DeviceGroupArrayOutput values. You can construct a concrete instance of `DeviceGroupArrayInput` via:

DeviceGroupArray{ DeviceGroupArgs{...} }

type DeviceGroupArrayOutput

type DeviceGroupArrayOutput struct{ *pulumi.OutputState }

func (DeviceGroupArrayOutput) ElementType

func (DeviceGroupArrayOutput) ElementType() reflect.Type

func (DeviceGroupArrayOutput) Index

func (DeviceGroupArrayOutput) ToDeviceGroupArrayOutput

func (o DeviceGroupArrayOutput) ToDeviceGroupArrayOutput() DeviceGroupArrayOutput

func (DeviceGroupArrayOutput) ToDeviceGroupArrayOutputWithContext

func (o DeviceGroupArrayOutput) ToDeviceGroupArrayOutputWithContext(ctx context.Context) DeviceGroupArrayOutput

type DeviceGroupInput

type DeviceGroupInput interface {
	pulumi.Input

	ToDeviceGroupOutput() DeviceGroupOutput
	ToDeviceGroupOutputWithContext(ctx context.Context) DeviceGroupOutput
}

type DeviceGroupMap

type DeviceGroupMap map[string]DeviceGroupInput

func (DeviceGroupMap) ElementType

func (DeviceGroupMap) ElementType() reflect.Type

func (DeviceGroupMap) ToDeviceGroupMapOutput

func (i DeviceGroupMap) ToDeviceGroupMapOutput() DeviceGroupMapOutput

func (DeviceGroupMap) ToDeviceGroupMapOutputWithContext

func (i DeviceGroupMap) ToDeviceGroupMapOutputWithContext(ctx context.Context) DeviceGroupMapOutput

type DeviceGroupMapInput

type DeviceGroupMapInput interface {
	pulumi.Input

	ToDeviceGroupMapOutput() DeviceGroupMapOutput
	ToDeviceGroupMapOutputWithContext(context.Context) DeviceGroupMapOutput
}

DeviceGroupMapInput is an input type that accepts DeviceGroupMap and DeviceGroupMapOutput values. You can construct a concrete instance of `DeviceGroupMapInput` via:

DeviceGroupMap{ "key": DeviceGroupArgs{...} }

type DeviceGroupMapOutput

type DeviceGroupMapOutput struct{ *pulumi.OutputState }

func (DeviceGroupMapOutput) ElementType

func (DeviceGroupMapOutput) ElementType() reflect.Type

func (DeviceGroupMapOutput) MapIndex

func (DeviceGroupMapOutput) ToDeviceGroupMapOutput

func (o DeviceGroupMapOutput) ToDeviceGroupMapOutput() DeviceGroupMapOutput

func (DeviceGroupMapOutput) ToDeviceGroupMapOutputWithContext

func (o DeviceGroupMapOutput) ToDeviceGroupMapOutputWithContext(ctx context.Context) DeviceGroupMapOutput

type DeviceGroupOutput

type DeviceGroupOutput struct{ *pulumi.OutputState }

func (DeviceGroupOutput) ElementType

func (DeviceGroupOutput) ElementType() reflect.Type

func (DeviceGroupOutput) GroupDesc

The GroupDesc of the device group.

func (DeviceGroupOutput) GroupName

func (o DeviceGroupOutput) GroupName() pulumi.StringOutput

The GroupName of the device group.

func (DeviceGroupOutput) IotInstanceId

func (o DeviceGroupOutput) IotInstanceId() pulumi.StringPtrOutput

The id of the Iot Instance.

func (DeviceGroupOutput) SuperGroupId

func (o DeviceGroupOutput) SuperGroupId() pulumi.StringPtrOutput

The id of the SuperGroup.

func (DeviceGroupOutput) ToDeviceGroupOutput

func (o DeviceGroupOutput) ToDeviceGroupOutput() DeviceGroupOutput

func (DeviceGroupOutput) ToDeviceGroupOutputWithContext

func (o DeviceGroupOutput) ToDeviceGroupOutputWithContext(ctx context.Context) DeviceGroupOutput

type DeviceGroupState

type DeviceGroupState struct {
	// The GroupDesc of the device group.
	GroupDesc pulumi.StringPtrInput
	// The GroupName of the device group.
	GroupName pulumi.StringPtrInput
	// The id of the Iot Instance.
	IotInstanceId pulumi.StringPtrInput
	// The id of the SuperGroup.
	SuperGroupId pulumi.StringPtrInput
}

func (DeviceGroupState) ElementType

func (DeviceGroupState) ElementType() reflect.Type

type GetDeviceGroupsArgs

type GetDeviceGroupsArgs struct {
	// Default to `false`. Set it to `true` can output more details about resource attributes.
	EnableDetails *bool `pulumi:"enableDetails"`
	// The GroupName of the device group.
	GroupName *string `pulumi:"groupName"`
	// A list of device group IDs.
	Ids []string `pulumi:"ids"`
	// The id of the Iot Instance.
	IotInstanceId *string `pulumi:"iotInstanceId"`
	// A regex string to filter CEN instances by name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// The id of the SuperGroup.
	SuperGroupId *string `pulumi:"superGroupId"`
}

A collection of arguments for invoking getDeviceGroups.

type GetDeviceGroupsGroup

type GetDeviceGroupsGroup struct {
	// The Group CreateTime.
	CreateTime string `pulumi:"createTime"`
	// The Group Number of activated devices.
	DeviceActive string `pulumi:"deviceActive"`
	// The Group Total number of devices.
	DeviceCount string `pulumi:"deviceCount"`
	// The Group Number of online devices.
	DeviceOnline string `pulumi:"deviceOnline"`
	// The Error_Message of the device group.
	ErrorMessage string `pulumi:"errorMessage"`
	// The GroupDesc of the device group.
	GroupDesc string `pulumi:"groupDesc"`
	// The GroupId of the device group.
	GroupId string `pulumi:"groupId"`
	// The GroupName of the device group.
	GroupName string `pulumi:"groupName"`
	// The ID of the device group.
	Id string `pulumi:"id"`
	// Whether the call is successful.
	Success bool `pulumi:"success"`
}

type GetDeviceGroupsGroupArgs

type GetDeviceGroupsGroupArgs struct {
	// The Group CreateTime.
	CreateTime pulumi.StringInput `pulumi:"createTime"`
	// The Group Number of activated devices.
	DeviceActive pulumi.StringInput `pulumi:"deviceActive"`
	// The Group Total number of devices.
	DeviceCount pulumi.StringInput `pulumi:"deviceCount"`
	// The Group Number of online devices.
	DeviceOnline pulumi.StringInput `pulumi:"deviceOnline"`
	// The Error_Message of the device group.
	ErrorMessage pulumi.StringInput `pulumi:"errorMessage"`
	// The GroupDesc of the device group.
	GroupDesc pulumi.StringInput `pulumi:"groupDesc"`
	// The GroupId of the device group.
	GroupId pulumi.StringInput `pulumi:"groupId"`
	// The GroupName of the device group.
	GroupName pulumi.StringInput `pulumi:"groupName"`
	// The ID of the device group.
	Id pulumi.StringInput `pulumi:"id"`
	// Whether the call is successful.
	Success pulumi.BoolInput `pulumi:"success"`
}

func (GetDeviceGroupsGroupArgs) ElementType

func (GetDeviceGroupsGroupArgs) ElementType() reflect.Type

func (GetDeviceGroupsGroupArgs) ToGetDeviceGroupsGroupOutput

func (i GetDeviceGroupsGroupArgs) ToGetDeviceGroupsGroupOutput() GetDeviceGroupsGroupOutput

func (GetDeviceGroupsGroupArgs) ToGetDeviceGroupsGroupOutputWithContext

func (i GetDeviceGroupsGroupArgs) ToGetDeviceGroupsGroupOutputWithContext(ctx context.Context) GetDeviceGroupsGroupOutput

type GetDeviceGroupsGroupArray

type GetDeviceGroupsGroupArray []GetDeviceGroupsGroupInput

func (GetDeviceGroupsGroupArray) ElementType

func (GetDeviceGroupsGroupArray) ElementType() reflect.Type

func (GetDeviceGroupsGroupArray) ToGetDeviceGroupsGroupArrayOutput

func (i GetDeviceGroupsGroupArray) ToGetDeviceGroupsGroupArrayOutput() GetDeviceGroupsGroupArrayOutput

func (GetDeviceGroupsGroupArray) ToGetDeviceGroupsGroupArrayOutputWithContext

func (i GetDeviceGroupsGroupArray) ToGetDeviceGroupsGroupArrayOutputWithContext(ctx context.Context) GetDeviceGroupsGroupArrayOutput

type GetDeviceGroupsGroupArrayInput

type GetDeviceGroupsGroupArrayInput interface {
	pulumi.Input

	ToGetDeviceGroupsGroupArrayOutput() GetDeviceGroupsGroupArrayOutput
	ToGetDeviceGroupsGroupArrayOutputWithContext(context.Context) GetDeviceGroupsGroupArrayOutput
}

GetDeviceGroupsGroupArrayInput is an input type that accepts GetDeviceGroupsGroupArray and GetDeviceGroupsGroupArrayOutput values. You can construct a concrete instance of `GetDeviceGroupsGroupArrayInput` via:

GetDeviceGroupsGroupArray{ GetDeviceGroupsGroupArgs{...} }

type GetDeviceGroupsGroupArrayOutput

type GetDeviceGroupsGroupArrayOutput struct{ *pulumi.OutputState }

func (GetDeviceGroupsGroupArrayOutput) ElementType

func (GetDeviceGroupsGroupArrayOutput) Index

func (GetDeviceGroupsGroupArrayOutput) ToGetDeviceGroupsGroupArrayOutput

func (o GetDeviceGroupsGroupArrayOutput) ToGetDeviceGroupsGroupArrayOutput() GetDeviceGroupsGroupArrayOutput

func (GetDeviceGroupsGroupArrayOutput) ToGetDeviceGroupsGroupArrayOutputWithContext

func (o GetDeviceGroupsGroupArrayOutput) ToGetDeviceGroupsGroupArrayOutputWithContext(ctx context.Context) GetDeviceGroupsGroupArrayOutput

type GetDeviceGroupsGroupInput

type GetDeviceGroupsGroupInput interface {
	pulumi.Input

	ToGetDeviceGroupsGroupOutput() GetDeviceGroupsGroupOutput
	ToGetDeviceGroupsGroupOutputWithContext(context.Context) GetDeviceGroupsGroupOutput
}

GetDeviceGroupsGroupInput is an input type that accepts GetDeviceGroupsGroupArgs and GetDeviceGroupsGroupOutput values. You can construct a concrete instance of `GetDeviceGroupsGroupInput` via:

GetDeviceGroupsGroupArgs{...}

type GetDeviceGroupsGroupOutput

type GetDeviceGroupsGroupOutput struct{ *pulumi.OutputState }

func (GetDeviceGroupsGroupOutput) CreateTime

The Group CreateTime.

func (GetDeviceGroupsGroupOutput) DeviceActive

The Group Number of activated devices.

func (GetDeviceGroupsGroupOutput) DeviceCount

The Group Total number of devices.

func (GetDeviceGroupsGroupOutput) DeviceOnline

The Group Number of online devices.

func (GetDeviceGroupsGroupOutput) ElementType

func (GetDeviceGroupsGroupOutput) ElementType() reflect.Type

func (GetDeviceGroupsGroupOutput) ErrorMessage

The Error_Message of the device group.

func (GetDeviceGroupsGroupOutput) GroupDesc

The GroupDesc of the device group.

func (GetDeviceGroupsGroupOutput) GroupId

The GroupId of the device group.

func (GetDeviceGroupsGroupOutput) GroupName

The GroupName of the device group.

func (GetDeviceGroupsGroupOutput) Id

The ID of the device group.

func (GetDeviceGroupsGroupOutput) Success

Whether the call is successful.

func (GetDeviceGroupsGroupOutput) ToGetDeviceGroupsGroupOutput

func (o GetDeviceGroupsGroupOutput) ToGetDeviceGroupsGroupOutput() GetDeviceGroupsGroupOutput

func (GetDeviceGroupsGroupOutput) ToGetDeviceGroupsGroupOutputWithContext

func (o GetDeviceGroupsGroupOutput) ToGetDeviceGroupsGroupOutputWithContext(ctx context.Context) GetDeviceGroupsGroupOutput

type GetDeviceGroupsOutputArgs

type GetDeviceGroupsOutputArgs struct {
	// Default to `false`. Set it to `true` can output more details about resource attributes.
	EnableDetails pulumi.BoolPtrInput `pulumi:"enableDetails"`
	// The GroupName of the device group.
	GroupName pulumi.StringPtrInput `pulumi:"groupName"`
	// A list of device group IDs.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// The id of the Iot Instance.
	IotInstanceId pulumi.StringPtrInput `pulumi:"iotInstanceId"`
	// A regex string to filter CEN instances by name.
	NameRegex  pulumi.StringPtrInput `pulumi:"nameRegex"`
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
	// The id of the SuperGroup.
	SuperGroupId pulumi.StringPtrInput `pulumi:"superGroupId"`
}

A collection of arguments for invoking getDeviceGroups.

func (GetDeviceGroupsOutputArgs) ElementType

func (GetDeviceGroupsOutputArgs) ElementType() reflect.Type

type GetDeviceGroupsResult

type GetDeviceGroupsResult struct {
	EnableDetails *bool                  `pulumi:"enableDetails"`
	GroupName     *string                `pulumi:"groupName"`
	Groups        []GetDeviceGroupsGroup `pulumi:"groups"`
	// The provider-assigned unique ID for this managed resource.
	Id            string   `pulumi:"id"`
	Ids           []string `pulumi:"ids"`
	IotInstanceId *string  `pulumi:"iotInstanceId"`
	NameRegex     *string  `pulumi:"nameRegex"`
	OutputFile    *string  `pulumi:"outputFile"`
	SuperGroupId  *string  `pulumi:"superGroupId"`
}

A collection of values returned by getDeviceGroups.

func GetDeviceGroups

func GetDeviceGroups(ctx *pulumi.Context, args *GetDeviceGroupsArgs, opts ...pulumi.InvokeOption) (*GetDeviceGroupsResult, error)

This data source provides the Iot Device Groups of the current Alibaba Cloud user.

> **NOTE:** Available in v1.134.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/iot"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/iot"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := iot.GetDeviceGroups(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("iotDeviceGroupId1", ids.Groups[0].Id)
		return nil
	})
}

```

type GetDeviceGroupsResultOutput

type GetDeviceGroupsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getDeviceGroups.

func (GetDeviceGroupsResultOutput) ElementType

func (GetDeviceGroupsResultOutput) EnableDetails

func (GetDeviceGroupsResultOutput) GroupName

func (GetDeviceGroupsResultOutput) Groups

func (GetDeviceGroupsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetDeviceGroupsResultOutput) Ids

func (GetDeviceGroupsResultOutput) IotInstanceId

func (GetDeviceGroupsResultOutput) NameRegex

func (GetDeviceGroupsResultOutput) OutputFile

func (GetDeviceGroupsResultOutput) SuperGroupId

func (GetDeviceGroupsResultOutput) ToGetDeviceGroupsResultOutput

func (o GetDeviceGroupsResultOutput) ToGetDeviceGroupsResultOutput() GetDeviceGroupsResultOutput

func (GetDeviceGroupsResultOutput) ToGetDeviceGroupsResultOutputWithContext

func (o GetDeviceGroupsResultOutput) ToGetDeviceGroupsResultOutputWithContext(ctx context.Context) GetDeviceGroupsResultOutput

type GetServiceArgs

type GetServiceArgs struct {
	// Setting the value to `On` to enable the service. If has been enabled, return the result. Valid values: `On` or `Off`. Default to `Off`.
	Enable *string `pulumi:"enable"`
}

A collection of arguments for invoking getService.

type GetServiceOutputArgs

type GetServiceOutputArgs struct {
	// Setting the value to `On` to enable the service. If has been enabled, return the result. Valid values: `On` or `Off`. Default to `Off`.
	Enable pulumi.StringPtrInput `pulumi:"enable"`
}

A collection of arguments for invoking getService.

func (GetServiceOutputArgs) ElementType

func (GetServiceOutputArgs) ElementType() reflect.Type

type GetServiceResult

type GetServiceResult struct {
	Enable *string `pulumi:"enable"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The current service enable status.
	Status string `pulumi:"status"`
}

A collection of values returned by getService.

func GetService

func GetService(ctx *pulumi.Context, args *GetServiceArgs, opts ...pulumi.InvokeOption) (*GetServiceResult, error)

Using this data source can open IOT service automatically. If the service has been opened, it will return opened.

For information about IOT and how to use it, see [What is IOT](https://www.alibabacloud.com/help/en/product/30520.htm).

> **NOTE:** Available in v1.115.0+

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/iot"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/iot"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iot.GetService(ctx, &iot.GetServiceArgs{
			Enable: pulumi.StringRef("On"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetServiceResultOutput

type GetServiceResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getService.

func (GetServiceResultOutput) ElementType

func (GetServiceResultOutput) ElementType() reflect.Type

func (GetServiceResultOutput) Enable

func (GetServiceResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetServiceResultOutput) Status

The current service enable status.

func (GetServiceResultOutput) ToGetServiceResultOutput

func (o GetServiceResultOutput) ToGetServiceResultOutput() GetServiceResultOutput

func (GetServiceResultOutput) ToGetServiceResultOutputWithContext

func (o GetServiceResultOutput) ToGetServiceResultOutputWithContext(ctx context.Context) GetServiceResultOutput

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL