AWS Classic

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

ThingGroupMembership

Adds an IoT Thing to an IoT Thing Group.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Iot.ThingGroupMembership("example", new Aws.Iot.ThingGroupMembershipArgs
        {
            OverrideDynamicGroup = true,
            ThingGroupName = "example-group",
            ThingName = "example-thing",
        });
    }

}
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 {
		_, err := iot.NewThingGroupMembership(ctx, "example", &iot.ThingGroupMembershipArgs{
			OverrideDynamicGroup: pulumi.Bool(true),
			ThingGroupName:       pulumi.String("example-group"),
			ThingName:            pulumi.String("example-thing"),
		})
		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 example = new ThingGroupMembership("example", ThingGroupMembershipArgs.builder()        
            .overrideDynamicGroup(true)
            .thingGroupName("example-group")
            .thingName("example-thing")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.iot.ThingGroupMembership("example",
    override_dynamic_group=True,
    thing_group_name="example-group",
    thing_name="example-thing")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.iot.ThingGroupMembership("example", {
    overrideDynamicGroup: true,
    thingGroupName: "example-group",
    thingName: "example-thing",
});
resources:
  example:
    type: aws:iot:ThingGroupMembership
    properties:
      overrideDynamicGroup: true
      thingGroupName: example-group
      thingName: example-thing

Create a ThingGroupMembership Resource

new ThingGroupMembership(name: string, args: ThingGroupMembershipArgs, opts?: CustomResourceOptions);
@overload
def ThingGroupMembership(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         override_dynamic_group: Optional[bool] = None,
                         thing_group_name: Optional[str] = None,
                         thing_name: Optional[str] = None)
@overload
def ThingGroupMembership(resource_name: str,
                         args: ThingGroupMembershipArgs,
                         opts: Optional[ResourceOptions] = None)
func NewThingGroupMembership(ctx *Context, name string, args ThingGroupMembershipArgs, opts ...ResourceOption) (*ThingGroupMembership, error)
public ThingGroupMembership(string name, ThingGroupMembershipArgs args, CustomResourceOptions? opts = null)
public ThingGroupMembership(String name, ThingGroupMembershipArgs args)
public ThingGroupMembership(String name, ThingGroupMembershipArgs args, CustomResourceOptions options)
type: aws:iot:ThingGroupMembership
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

ThingGroupName string

The name of the group to which you are adding a thing.

ThingName string

The name of the thing to add to a group.

OverrideDynamicGroup bool

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

ThingGroupName string

The name of the group to which you are adding a thing.

ThingName string

The name of the thing to add to a group.

OverrideDynamicGroup bool

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

thingGroupName String

The name of the group to which you are adding a thing.

thingName String

The name of the thing to add to a group.

overrideDynamicGroup Boolean

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

thingGroupName string

The name of the group to which you are adding a thing.

thingName string

The name of the thing to add to a group.

overrideDynamicGroup boolean

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

thing_group_name str

The name of the group to which you are adding a thing.

thing_name str

The name of the thing to add to a group.

override_dynamic_group bool

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

thingGroupName String

The name of the group to which you are adding a thing.

thingName String

The name of the thing to add to a group.

overrideDynamicGroup Boolean

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing ThingGroupMembership Resource

Get an existing ThingGroupMembership 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?: ThingGroupMembershipState, opts?: CustomResourceOptions): ThingGroupMembership
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        override_dynamic_group: Optional[bool] = None,
        thing_group_name: Optional[str] = None,
        thing_name: Optional[str] = None) -> ThingGroupMembership
func GetThingGroupMembership(ctx *Context, name string, id IDInput, state *ThingGroupMembershipState, opts ...ResourceOption) (*ThingGroupMembership, error)
public static ThingGroupMembership Get(string name, Input<string> id, ThingGroupMembershipState? state, CustomResourceOptions? opts = null)
public static ThingGroupMembership get(String name, Output<String> id, ThingGroupMembershipState 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:
OverrideDynamicGroup bool

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

ThingGroupName string

The name of the group to which you are adding a thing.

ThingName string

The name of the thing to add to a group.

OverrideDynamicGroup bool

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

ThingGroupName string

The name of the group to which you are adding a thing.

ThingName string

The name of the thing to add to a group.

overrideDynamicGroup Boolean

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

thingGroupName String

The name of the group to which you are adding a thing.

thingName String

The name of the thing to add to a group.

overrideDynamicGroup boolean

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

thingGroupName string

The name of the group to which you are adding a thing.

thingName string

The name of the thing to add to a group.

override_dynamic_group bool

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

thing_group_name str

The name of the group to which you are adding a thing.

thing_name str

The name of the thing to add to a group.

overrideDynamicGroup Boolean

Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

thingGroupName String

The name of the group to which you are adding a thing.

thingName String

The name of the thing to add to a group.

Import

IoT Thing Group Membership can be imported using the thing group name and thing name.

 $ pulumi import aws:iot/thingGroupMembership:ThingGroupMembership example thing_group_name/thing_name

Package Details

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

This Pulumi package is based on the aws Terraform Provider.