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

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

Viewing docs for AWS Cloud Control v1.83.1
published on Thursday, Oct 22, 2026 by Pulumi
aws-native logo aws-native logo AWS Cloud Control

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

Viewing docs for AWS Cloud Control v1.83.1
published on Thursday, Oct 22, 2026 by Pulumi

    Resource Type definition for AWS::IoT::PolicyPrincipalAttachment

    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 myPolicyPrincipalAttachment = new AwsNative.IoT.PolicyPrincipalAttachment("myPolicyPrincipalAttachment", new()
        {
            PolicyName = 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.NewPolicyPrincipalAttachment(ctx, "myPolicyPrincipalAttachment", &iot.PolicyPrincipalAttachmentArgs{
    			PolicyName: 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 myPolicyPrincipalAttachment = new aws_native.iot.PolicyPrincipalAttachment("myPolicyPrincipalAttachment", {
        policyName: 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_policy_principal_attachment = aws_native.iot.PolicyPrincipalAttachment("myPolicyPrincipalAttachment",
        policy_name=name_parameter,
        principal="arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2")
    

    Example coming soon!

    Create PolicyPrincipalAttachment Resource

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

    Constructor syntax

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

    Parameters

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

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

    PolicyName string
    The name of the AWS IoT policy
    Principal string
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID
    PolicyName string
    The name of the AWS IoT policy
    Principal string
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID
    policy_name string
    The name of the AWS IoT policy
    principal string
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID
    policyName String
    The name of the AWS IoT policy
    principal String
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID
    policyName string
    The name of the AWS IoT policy
    principal string
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID
    policy_name str
    The name of the AWS IoT policy
    principal str
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID
    policyName String
    The name of the AWS IoT policy
    principal String
    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID

    Outputs

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

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

    Viewing docs for AWS Cloud Control v1.83.1
    published on Thursday, Oct 22, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial