AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

ThingGroup

Manages an AWS IoT Thing Group.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var parent = new Aws.Iot.ThingGroup("parent", new Aws.Iot.ThingGroupArgs
        {
        });
        var example = new Aws.Iot.ThingGroup("example", new Aws.Iot.ThingGroupArgs
        {
            ParentGroupName = parent.Name,
            Properties = new Aws.Iot.Inputs.ThingGroupPropertiesArgs
            {
                AttributePayload = new Aws.Iot.Inputs.ThingGroupPropertiesAttributePayloadArgs
                {
                    Attributes = 
                    {
                        { "One", "11111" },
                        { "Two", "TwoTwo" },
                    },
                },
                Description = "This is my thing group",
            },
            Tags = 
            {
                { "terraform", "true" },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iot"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		parent, err := iot.NewThingGroup(ctx, "parent", nil)
		if err != nil {
			return err
		}
		_, err = iot.NewThingGroup(ctx, "example", &iot.ThingGroupArgs{
			ParentGroupName: parent.Name,
			Properties: &iot.ThingGroupPropertiesArgs{
				AttributePayload: &iot.ThingGroupPropertiesAttributePayloadArgs{
					Attributes: pulumi.StringMap{
						"One": pulumi.String("11111"),
						"Two": pulumi.String("TwoTwo"),
					},
				},
				Description: pulumi.String("This is my thing group"),
			},
			Tags: pulumi.StringMap{
				"terraform": pulumi.String("true"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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

    public static void stack(Context ctx) {
        var parent = new ThingGroup("parent");

        var example = new ThingGroup("example", ThingGroupArgs.builder()        
            .parentGroupName(parent.name())
            .properties(ThingGroupPropertiesArgs.builder()
                .attributePayload(ThingGroupPropertiesAttributePayloadArgs.builder()
                    .attributes(Map.ofEntries(
                        Map.entry("One", "11111"),
                        Map.entry("Two", "TwoTwo")
                    ))
                    .build())
                .description("This is my thing group")
                .build())
            .tags(Map.of("terraform", "true"))
            .build());

    }
}
import pulumi
import pulumi_aws as aws

parent = aws.iot.ThingGroup("parent")
example = aws.iot.ThingGroup("example",
    parent_group_name=parent.name,
    properties=aws.iot.ThingGroupPropertiesArgs(
        attribute_payload=aws.iot.ThingGroupPropertiesAttributePayloadArgs(
            attributes={
                "One": "11111",
                "Two": "TwoTwo",
            },
        ),
        description="This is my thing group",
    ),
    tags={
        "terraform": "true",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const parent = new aws.iot.ThingGroup("parent", {});
const example = new aws.iot.ThingGroup("example", {
    parentGroupName: parent.name,
    properties: {
        attributePayload: {
            attributes: {
                One: "11111",
                Two: "TwoTwo",
            },
        },
        description: "This is my thing group",
    },
    tags: {
        terraform: "true",
    },
});
resources:
  parent:
    type: aws:iot:ThingGroup
  example:
    type: aws:iot:ThingGroup
    properties:
      parentGroupName: ${parent.name}
      properties:
        attributePayload:
          attributes:
            One: 11111
            Two: TwoTwo
        description: This is my thing group
      tags:
        terraform: true

Create a ThingGroup Resource

new ThingGroup(name: string, args?: ThingGroupArgs, opts?: CustomResourceOptions);
@overload
def ThingGroup(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               name: Optional[str] = None,
               parent_group_name: Optional[str] = None,
               properties: Optional[ThingGroupPropertiesArgs] = None,
               tags: Optional[Mapping[str, str]] = None)
@overload
def ThingGroup(resource_name: str,
               args: Optional[ThingGroupArgs] = None,
               opts: Optional[ResourceOptions] = None)
func NewThingGroup(ctx *Context, name string, args *ThingGroupArgs, opts ...ResourceOption) (*ThingGroup, error)
public ThingGroup(string name, ThingGroupArgs? args = null, CustomResourceOptions? opts = null)
public ThingGroup(String name, ThingGroupArgs args)
public ThingGroup(String name, ThingGroupArgs args, CustomResourceOptions options)
type: aws:iot:ThingGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ThingGroupArgs
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 ThingGroupArgs
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 ThingGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ThingGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ThingGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ThingGroup 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 ThingGroup resource accepts the following input properties:

Name string

The name of the Thing Group.

ParentGroupName string

The name of the parent Thing Group.

Properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

Tags Dictionary<string, string>

Key-value mapping of resource tags

Name string

The name of the Thing Group.

ParentGroupName string

The name of the parent Thing Group.

Properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

Tags map[string]string

Key-value mapping of resource tags

name String

The name of the Thing Group.

parentGroupName String

The name of the parent Thing Group.

properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

tags Map<String,String>

Key-value mapping of resource tags

name string

The name of the Thing Group.

parentGroupName string

The name of the parent Thing Group.

properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

tags {[key: string]: string}

Key-value mapping of resource tags

name str

The name of the Thing Group.

parent_group_name str

The name of the parent Thing Group.

properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

tags Mapping[str, str]

Key-value mapping of resource tags

name String

The name of the Thing Group.

parentGroupName String

The name of the parent Thing Group.

properties Property Map

The Thing Group properties. Defined below.

tags Map<String>

Key-value mapping of resource tags

Outputs

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

Arn string

The ARN of the Thing Group.

Id string

The provider-assigned unique ID for this managed resource.

Metadatas List<ThingGroupMetadata>
TagsAll Dictionary<string, string>
Version int

The current version of the Thing Group record in the registry.

Arn string

The ARN of the Thing Group.

Id string

The provider-assigned unique ID for this managed resource.

Metadatas []ThingGroupMetadata
TagsAll map[string]string
Version int

The current version of the Thing Group record in the registry.

arn String

The ARN of the Thing Group.

id String

The provider-assigned unique ID for this managed resource.

metadatas List<ThingGroupMetadata>
tagsAll Map<String,String>
version Integer

The current version of the Thing Group record in the registry.

arn string

The ARN of the Thing Group.

id string

The provider-assigned unique ID for this managed resource.

metadatas ThingGroupMetadata[]
tagsAll {[key: string]: string}
version number

The current version of the Thing Group record in the registry.

arn str

The ARN of the Thing Group.

id str

The provider-assigned unique ID for this managed resource.

metadatas Sequence[ThingGroupMetadata]
tags_all Mapping[str, str]
version int

The current version of the Thing Group record in the registry.

arn String

The ARN of the Thing Group.

id String

The provider-assigned unique ID for this managed resource.

metadatas List<Property Map>
tagsAll Map<String>
version Number

The current version of the Thing Group record in the registry.

Look up an Existing ThingGroup Resource

Get an existing ThingGroup 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?: ThingGroupState, opts?: CustomResourceOptions): ThingGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        metadatas: Optional[Sequence[ThingGroupMetadataArgs]] = None,
        name: Optional[str] = None,
        parent_group_name: Optional[str] = None,
        properties: Optional[ThingGroupPropertiesArgs] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        version: Optional[int] = None) -> ThingGroup
func GetThingGroup(ctx *Context, name string, id IDInput, state *ThingGroupState, opts ...ResourceOption) (*ThingGroup, error)
public static ThingGroup Get(string name, Input<string> id, ThingGroupState? state, CustomResourceOptions? opts = null)
public static ThingGroup get(String name, Output<String> id, ThingGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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:
Arn string

The ARN of the Thing Group.

Metadatas List<ThingGroupMetadataArgs>
Name string

The name of the Thing Group.

ParentGroupName string

The name of the parent Thing Group.

Properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

Tags Dictionary<string, string>

Key-value mapping of resource tags

TagsAll Dictionary<string, string>
Version int

The current version of the Thing Group record in the registry.

Arn string

The ARN of the Thing Group.

Metadatas []ThingGroupMetadataArgs
Name string

The name of the Thing Group.

ParentGroupName string

The name of the parent Thing Group.

Properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

Tags map[string]string

Key-value mapping of resource tags

TagsAll map[string]string
Version int

The current version of the Thing Group record in the registry.

arn String

The ARN of the Thing Group.

metadatas List<ThingGroupMetadataArgs>
name String

The name of the Thing Group.

parentGroupName String

The name of the parent Thing Group.

properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

tags Map<String,String>

Key-value mapping of resource tags

tagsAll Map<String,String>
version Integer

The current version of the Thing Group record in the registry.

arn string

The ARN of the Thing Group.

metadatas ThingGroupMetadataArgs[]
name string

The name of the Thing Group.

parentGroupName string

The name of the parent Thing Group.

properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

tags {[key: string]: string}

Key-value mapping of resource tags

tagsAll {[key: string]: string}
version number

The current version of the Thing Group record in the registry.

arn str

The ARN of the Thing Group.

metadatas Sequence[ThingGroupMetadataArgs]
name str

The name of the Thing Group.

parent_group_name str

The name of the parent Thing Group.

properties ThingGroupPropertiesArgs

The Thing Group properties. Defined below.

tags Mapping[str, str]

Key-value mapping of resource tags

tags_all Mapping[str, str]
version int

The current version of the Thing Group record in the registry.

arn String

The ARN of the Thing Group.

metadatas List<Property Map>
name String

The name of the Thing Group.

parentGroupName String

The name of the parent Thing Group.

properties Property Map

The Thing Group properties. Defined below.

tags Map<String>

Key-value mapping of resource tags

tagsAll Map<String>
version Number

The current version of the Thing Group record in the registry.

Supporting Types

ThingGroupMetadata

creationDate String
parentGroupName String

The name of the parent Thing Group.

rootToParentGroups List<Property Map>

ThingGroupMetadataRootToParentGroup

GroupArn string
GroupName string
GroupArn string
GroupName string
groupArn String
groupName String
groupArn string
groupName string
groupArn String
groupName String

ThingGroupProperties

AttributePayload ThingGroupPropertiesAttributePayload

The Thing Group attributes. Defined below.

Description string

A description of the Thing Group.

AttributePayload ThingGroupPropertiesAttributePayload

The Thing Group attributes. Defined below.

Description string

A description of the Thing Group.

attributePayload ThingGroupPropertiesAttributePayload

The Thing Group attributes. Defined below.

description String

A description of the Thing Group.

attributePayload ThingGroupPropertiesAttributePayload

The Thing Group attributes. Defined below.

description string

A description of the Thing Group.

attribute_payload ThingGroupPropertiesAttributePayload

The Thing Group attributes. Defined below.

description str

A description of the Thing Group.

attributePayload Property Map

The Thing Group attributes. Defined below.

description String

A description of the Thing Group.

ThingGroupPropertiesAttributePayload

Attributes Dictionary<string, string>

Key-value map.

Attributes map[string]string

Key-value map.

attributes Map<String,String>

Key-value map.

attributes {[key: string]: string}

Key-value map.

attributes Mapping[str, str]

Key-value map.

attributes Map<String>

Key-value map.

Import

IoT Things Groups can be imported using the name, e.g.

 $ pulumi import aws:iot/thingGroup:ThingGroup example example

Package Details

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

This Pulumi package is based on the aws Terraform Provider.