1. Packages
  2. AWS Classic
  3. API Docs
  4. iot
  5. ThingGroupMembership

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

aws.iot.ThingGroupMembership

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

    Adds an IoT Thing to an IoT Thing Group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.iot.ThingGroupMembership("example", {
        thingName: "example-thing",
        thingGroupName: "example-group",
        overrideDynamicGroup: true,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.iot.ThingGroupMembership("example",
        thing_name="example-thing",
        thing_group_name="example-group",
        override_dynamic_group=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/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{
    			ThingName:            pulumi.String("example-thing"),
    			ThingGroupName:       pulumi.String("example-group"),
    			OverrideDynamicGroup: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Iot.ThingGroupMembership("example", new()
        {
            ThingName = "example-thing",
            ThingGroupName = "example-group",
            OverrideDynamicGroup = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iot.ThingGroupMembership;
    import com.pulumi.aws.iot.ThingGroupMembershipArgs;
    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) {
            var example = new ThingGroupMembership("example", ThingGroupMembershipArgs.builder()
                .thingName("example-thing")
                .thingGroupName("example-group")
                .overrideDynamicGroup(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:iot:ThingGroupMembership
        properties:
          thingName: example-thing
          thingGroupName: example-group
          overrideDynamicGroup: true
    

    Create ThingGroupMembership Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ThingGroupMembership(name: string, args: ThingGroupMembershipArgs, opts?: CustomResourceOptions);
    @overload
    def ThingGroupMembership(resource_name: str,
                             args: ThingGroupMembershipArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ThingGroupMembership(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             thing_group_name: Optional[str] = None,
                             thing_name: Optional[str] = None,
                             override_dynamic_group: Optional[bool] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var thingGroupMembershipResource = new Aws.Iot.ThingGroupMembership("thingGroupMembershipResource", new()
    {
        ThingGroupName = "string",
        ThingName = "string",
        OverrideDynamicGroup = false,
    });
    
    example, err := iot.NewThingGroupMembership(ctx, "thingGroupMembershipResource", &iot.ThingGroupMembershipArgs{
    	ThingGroupName:       pulumi.String("string"),
    	ThingName:            pulumi.String("string"),
    	OverrideDynamicGroup: pulumi.Bool(false),
    })
    
    var thingGroupMembershipResource = new ThingGroupMembership("thingGroupMembershipResource", ThingGroupMembershipArgs.builder()
        .thingGroupName("string")
        .thingName("string")
        .overrideDynamicGroup(false)
        .build());
    
    thing_group_membership_resource = aws.iot.ThingGroupMembership("thingGroupMembershipResource",
        thing_group_name="string",
        thing_name="string",
        override_dynamic_group=False)
    
    const thingGroupMembershipResource = new aws.iot.ThingGroupMembership("thingGroupMembershipResource", {
        thingGroupName: "string",
        thingName: "string",
        overrideDynamicGroup: false,
    });
    
    type: aws:iot:ThingGroupMembership
    properties:
        overrideDynamicGroup: false
        thingGroupName: string
        thingName: string
    

    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 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

    Using pulumi import, import IoT Thing Group Membership using the thing group name and thing name. For example:

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi