1. Registry
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. iot
  6. ThingPrincipalAttachment

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.81.0
published on Monday, Sep 28, 2026 by Pulumi
aws-native logo aws-native logo

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.81.0
published on Monday, Sep 28, 2026 by Pulumi

    Resource Type definition for AWS::IoT::ThingPrincipalAttachment

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var nameParameter = config.Require("nameParameter");
        var myThingPrincipalAttachment = new AwsNative.IoT.ThingPrincipalAttachment("myThingPrincipalAttachment", new()
        {
            ThingName = nameParameter,
            Principal = "arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iot"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		nameParameter := cfg.Require("nameParameter")
    		_, err := iot.NewThingPrincipalAttachment(ctx, "myThingPrincipalAttachment", &iot.ThingPrincipalAttachmentArgs{
    			ThingName: pulumi.String(nameParameter),
    			Principal: pulumi.String("arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const config = new pulumi.Config();
    const nameParameter = config.require("nameParameter");
    const myThingPrincipalAttachment = new aws_native.iot.ThingPrincipalAttachment("myThingPrincipalAttachment", {
        thingName: nameParameter,
        principal: "arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2",
    });
    
    import pulumi
    import pulumi_aws_native as aws_native
    
    config = pulumi.Config()
    name_parameter = config.require("nameParameter")
    my_thing_principal_attachment = aws_native.iot.ThingPrincipalAttachment("myThingPrincipalAttachment",
        thing_name=name_parameter,
        principal="arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2")
    

    Example coming soon!

    Create ThingPrincipalAttachment Resource

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

    Constructor syntax

    new ThingPrincipalAttachment(name: string, args: ThingPrincipalAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def ThingPrincipalAttachment(resource_name: str,
                                 args: ThingPrincipalAttachmentArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ThingPrincipalAttachment(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 principal: Optional[str] = None,
                                 thing_name: Optional[str] = None,
                                 thing_principal_type: Optional[str] = None)
    func NewThingPrincipalAttachment(ctx *Context, name string, args ThingPrincipalAttachmentArgs, opts ...ResourceOption) (*ThingPrincipalAttachment, error)
    public ThingPrincipalAttachment(string name, ThingPrincipalAttachmentArgs args, CustomResourceOptions? opts = null)
    public ThingPrincipalAttachment(String name, ThingPrincipalAttachmentArgs args)
    public ThingPrincipalAttachment(String name, ThingPrincipalAttachmentArgs args, CustomResourceOptions options)
    
    type: aws-native:iot:ThingPrincipalAttachment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws-native_iot_thing_principal_attachment" "name" {
        # resource properties
    }

    Parameters

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

    ThingPrincipalAttachment Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ThingPrincipalAttachment resource accepts the following input properties:

    Principal string
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
    ThingName string
    The name of the AWS IoT thing.
    ThingPrincipalType string
    The type of the relation you want to specify when you attach a principal to a thing.
    Principal string
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
    ThingName string
    The name of the AWS IoT thing.
    ThingPrincipalType string
    The type of the relation you want to specify when you attach a principal to a thing.
    principal string
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
    thing_name string
    The name of the AWS IoT thing.
    thing_principal_type string
    The type of the relation you want to specify when you attach a principal to a thing.
    principal String
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
    thingName String
    The name of the AWS IoT thing.
    thingPrincipalType String
    The type of the relation you want to specify when you attach a principal to a thing.
    principal string
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
    thingName string
    The name of the AWS IoT thing.
    thingPrincipalType string
    The type of the relation you want to specify when you attach a principal to a thing.
    principal str
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
    thing_name str
    The name of the AWS IoT thing.
    thing_principal_type str
    The type of the relation you want to specify when you attach a principal to a thing.
    principal String
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
    thingName String
    The name of the AWS IoT thing.
    thingPrincipalType String
    The type of the relation you want to specify when you attach a principal to a thing.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ThingPrincipalAttachment 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 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.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo aws-native logo

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.81.0
    published on Monday, Sep 28, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial