ThingPrincipalAttachment

Attaches Principal to AWS IoT Thing.

Example Usage

using System.IO;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Iot.Thing("example", new Aws.Iot.ThingArgs
        {
        });
        var cert = new Aws.Iot.Certificate("cert", new Aws.Iot.CertificateArgs
        {
            Csr = File.ReadAllText("csr.pem"),
            Active = true,
        });
        var att = new Aws.Iot.ThingPrincipalAttachment("att", new Aws.Iot.ThingPrincipalAttachmentArgs
        {
            Principal = cert.Arn,
            Thing = example.Name,
        });
    }

}

Coming soon!

import pulumi
import pulumi_aws as aws

example = aws.iot.Thing("example")
cert = aws.iot.Certificate("cert",
    csr=(lambda path: open(path).read())("csr.pem"),
    active=True)
att = aws.iot.ThingPrincipalAttachment("att",
    principal=cert.arn,
    thing=example.name)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * from "fs";

const example = new aws.iot.Thing("example", {});
const cert = new aws.iot.Certificate("cert", {
    csr: fs.readFileSync("csr.pem"),
    active: true,
});
const att = new aws.iot.ThingPrincipalAttachment("att", {
    principal: cert.arn,
    thing: example.name,
});

Create a ThingPrincipalAttachment Resource

new ThingPrincipalAttachment(name: string, args: ThingPrincipalAttachmentArgs, opts?: CustomResourceOptions);
@overload
def ThingPrincipalAttachment(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             principal: Optional[str] = None,
                             thing: Optional[str] = None)
@overload
def ThingPrincipalAttachment(resource_name: str,
                             args: ThingPrincipalAttachmentArgs,
                             opts: Optional[ResourceOptions] = None)
func NewThingPrincipalAttachment(ctx *Context, name string, args ThingPrincipalAttachmentArgs, opts ...ResourceOption) (*ThingPrincipalAttachment, error)
public ThingPrincipalAttachment(string name, ThingPrincipalAttachmentArgs args, CustomResourceOptions? opts = null)
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.

ThingPrincipalAttachment Resource Properties

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

Inputs

The ThingPrincipalAttachment resource accepts the following input properties:

Principal string
The AWS IoT Certificate ARN or Amazon Cognito Identity ID.
Thing string
The name of the thing.
Principal string
The AWS IoT Certificate ARN or Amazon Cognito Identity ID.
Thing string
The name of the thing.
principal ARN
The AWS IoT Certificate ARN or Amazon Cognito Identity ID.
thing string
The name of the thing.
principal str
The AWS IoT Certificate ARN or Amazon Cognito Identity ID.
thing str
The name of the 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing ThingPrincipalAttachment Resource

Get an existing ThingPrincipalAttachment 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?: ThingPrincipalAttachmentState, opts?: CustomResourceOptions): ThingPrincipalAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        principal: Optional[str] = None,
        thing: Optional[str] = None) -> ThingPrincipalAttachment
func GetThingPrincipalAttachment(ctx *Context, name string, id IDInput, state *ThingPrincipalAttachmentState, opts ...ResourceOption) (*ThingPrincipalAttachment, error)
public static ThingPrincipalAttachment Get(string name, Input<string> id, ThingPrincipalAttachmentState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Principal string
The AWS IoT Certificate ARN or Amazon Cognito Identity ID.
Thing string
The name of the thing.
Principal string
The AWS IoT Certificate ARN or Amazon Cognito Identity ID.
Thing string
The name of the thing.
principal ARN
The AWS IoT Certificate ARN or Amazon Cognito Identity ID.
thing string
The name of the thing.
principal str
The AWS IoT Certificate ARN or Amazon Cognito Identity ID.
thing str
The name of the thing.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.