Namespace Pulumi.Aws.Iot
Classes
Certificate
Creates and manages an AWS IoT certificate.
Example Usage
With CSR
using System.IO;
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var cert = new Aws.Iot.Certificate("cert", new Aws.Iot.CertificateArgs
{
Active = true,
Csr = File.ReadAllText("/my/csr.pem"),
});
}
}
Without CSR
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var cert = new Aws.Iot.Certificate("cert", new Aws.Iot.CertificateArgs
{
Active = true,
});
}
}
CertificateArgs
CertificateState
GetEndpoint
GetEndpointArgs
GetEndpointResult
Policy
Provides an IoT policy.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var pubsub = new Aws.Iot.Policy("pubsub", new Aws.Iot.PolicyArgs
{
Policy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Action"": [
""iot:*""
],
""Effect"": ""Allow"",
""Resource"": ""*""
}
]
}
",
});
}
}
PolicyArgs
PolicyAttachment
Provides an IoT policy attachment.
Example Usage
using System.IO;
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var pubsub = new Aws.Iot.Policy("pubsub", new Aws.Iot.PolicyArgs
{
Policy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Action"": [
""iot:*""
],
""Effect"": ""Allow"",
""Resource"": ""*""
}
]
}
",
});
var cert = new Aws.Iot.Certificate("cert", new Aws.Iot.CertificateArgs
{
Active = true,
Csr = File.ReadAllText("csr.pem"),
});
var att = new Aws.Iot.PolicyAttachment("att", new Aws.Iot.PolicyAttachmentArgs
{
Policy = pubsub.Name,
Target = cert.Arn,
});
}
}
PolicyAttachmentArgs
PolicyAttachmentState
PolicyState
RoleAlias
Provides an IoT role alias.
RoleAliasArgs
RoleAliasState
Thing
Creates and manages an AWS IoT Thing.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Iot.Thing("example", new Aws.Iot.ThingArgs
{
Attributes =
{
{ "First", "examplevalue" },
},
});
}
}
ThingArgs
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
{
Active = true,
Csr = File.ReadAllText("csr.pem"),
});
var att = new Aws.Iot.ThingPrincipalAttachment("att", new Aws.Iot.ThingPrincipalAttachmentArgs
{
Principal = cert.Arn,
Thing = example.Name,
});
}
}
ThingPrincipalAttachmentArgs
ThingPrincipalAttachmentState
ThingState
ThingType
Creates and manages an AWS IoT Thing Type.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var foo = new Aws.Iot.ThingType("foo", new Aws.Iot.ThingTypeArgs
{
});
}
}
ThingTypeArgs
ThingTypeState
TopicRule
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var mytopic = new Aws.Sns.Topic("mytopic", new Aws.Sns.TopicArgs
{
});
var role = new Aws.Iam.Role("role", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Effect"": ""Allow"",
""Principal"": {
""Service"": ""iot.amazonaws.com""
},
""Action"": ""sts:AssumeRole""
}
]
}
",
});
var rule = new Aws.Iot.TopicRule("rule", new Aws.Iot.TopicRuleArgs
{
Description = "Example rule",
Enabled = true,
Sns = new Aws.Iot.Inputs.TopicRuleSnsArgs
{
Sns = "RAW",
Sns = role.Arn,
Sns = mytopic.Arn,
},
Sql = "SELECT * FROM 'topic/test'",
SqlVersion = "2016-03-23",
});
var iamPolicyForLambda = new Aws.Iam.RolePolicy("iamPolicyForLambda", new Aws.Iam.RolePolicyArgs
{
Policy = mytopic.Arn.Apply(arn => @$"{{
""Version"": ""2012-10-17"",
""Statement"": [
{{
""Effect"": ""Allow"",
""Action"": [
""sns:Publish""
],
""Resource"": ""{arn}""
}}
]
}}
"),
Role = role.Id,
});
}
}