Try AWS Native preview for resources not in the classic version.
aws.iot.TopicRuleDestination
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.iot.TopicRuleDestination("example", {vpcConfiguration: {
roleArn: exampleAwsIamRole.arn,
securityGroups: [exampleAwsSecurityGroup.id],
subnetIds: exampleAwsSubnet.map(__item => __item.id),
vpcId: exampleAwsVpc.id,
}});
import pulumi
import pulumi_aws as aws
example = aws.iot.TopicRuleDestination("example", vpc_configuration={
"roleArn": example_aws_iam_role["arn"],
"securityGroups": [example_aws_security_group["id"]],
"subnetIds": [__item["id"] for __item in example_aws_subnet],
"vpcId": example_aws_vpc["id"],
})
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.NewTopicRuleDestination(ctx, "example", &iot.TopicRuleDestinationArgs{
VpcConfiguration: &iot.TopicRuleDestinationVpcConfigurationArgs{
RoleArn: pulumi.Any(exampleAwsIamRole.Arn),
SecurityGroups: pulumi.StringArray{
exampleAwsSecurityGroup.Id,
},
SubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:4,22-44),
VpcId: pulumi.Any(exampleAwsVpc.Id),
},
})
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.TopicRuleDestination("example", new()
{
VpcConfiguration = new Aws.Iot.Inputs.TopicRuleDestinationVpcConfigurationArgs
{
RoleArn = exampleAwsIamRole.Arn,
SecurityGroups = new[]
{
exampleAwsSecurityGroup.Id,
},
SubnetIds = exampleAwsSubnet.Select(__item => __item.Id).ToList(),
VpcId = exampleAwsVpc.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iot.TopicRuleDestination;
import com.pulumi.aws.iot.TopicRuleDestinationArgs;
import com.pulumi.aws.iot.inputs.TopicRuleDestinationVpcConfigurationArgs;
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 TopicRuleDestination("example", TopicRuleDestinationArgs.builder()
.vpcConfiguration(TopicRuleDestinationVpcConfigurationArgs.builder()
.roleArn(exampleAwsIamRole.arn())
.securityGroups(exampleAwsSecurityGroup.id())
.subnetIds(exampleAwsSubnet.stream().map(element -> element.id()).collect(toList()))
.vpcId(exampleAwsVpc.id())
.build())
.build());
}
}
Coming soon!
Create TopicRuleDestination Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TopicRuleDestination(name: string, args: TopicRuleDestinationArgs, opts?: CustomResourceOptions);
@overload
def TopicRuleDestination(resource_name: str,
args: TopicRuleDestinationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TopicRuleDestination(resource_name: str,
opts: Optional[ResourceOptions] = None,
vpc_configuration: Optional[TopicRuleDestinationVpcConfigurationArgs] = None,
enabled: Optional[bool] = None)
func NewTopicRuleDestination(ctx *Context, name string, args TopicRuleDestinationArgs, opts ...ResourceOption) (*TopicRuleDestination, error)
public TopicRuleDestination(string name, TopicRuleDestinationArgs args, CustomResourceOptions? opts = null)
public TopicRuleDestination(String name, TopicRuleDestinationArgs args)
public TopicRuleDestination(String name, TopicRuleDestinationArgs args, CustomResourceOptions options)
type: aws:iot:TopicRuleDestination
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 TopicRuleDestinationArgs
- 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 TopicRuleDestinationArgs
- 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 TopicRuleDestinationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TopicRuleDestinationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TopicRuleDestinationArgs
- 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 topicRuleDestinationResource = new Aws.Iot.TopicRuleDestination("topicRuleDestinationResource", new()
{
VpcConfiguration = new Aws.Iot.Inputs.TopicRuleDestinationVpcConfigurationArgs
{
RoleArn = "string",
SubnetIds = new[]
{
"string",
},
VpcId = "string",
SecurityGroups = new[]
{
"string",
},
},
Enabled = false,
});
example, err := iot.NewTopicRuleDestination(ctx, "topicRuleDestinationResource", &iot.TopicRuleDestinationArgs{
VpcConfiguration: &iot.TopicRuleDestinationVpcConfigurationArgs{
RoleArn: pulumi.String("string"),
SubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
VpcId: pulumi.String("string"),
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
},
Enabled: pulumi.Bool(false),
})
var topicRuleDestinationResource = new TopicRuleDestination("topicRuleDestinationResource", TopicRuleDestinationArgs.builder()
.vpcConfiguration(TopicRuleDestinationVpcConfigurationArgs.builder()
.roleArn("string")
.subnetIds("string")
.vpcId("string")
.securityGroups("string")
.build())
.enabled(false)
.build());
topic_rule_destination_resource = aws.iot.TopicRuleDestination("topicRuleDestinationResource",
vpc_configuration={
"roleArn": "string",
"subnetIds": ["string"],
"vpcId": "string",
"securityGroups": ["string"],
},
enabled=False)
const topicRuleDestinationResource = new aws.iot.TopicRuleDestination("topicRuleDestinationResource", {
vpcConfiguration: {
roleArn: "string",
subnetIds: ["string"],
vpcId: "string",
securityGroups: ["string"],
},
enabled: false,
});
type: aws:iot:TopicRuleDestination
properties:
enabled: false
vpcConfiguration:
roleArn: string
securityGroups:
- string
subnetIds:
- string
vpcId: string
TopicRuleDestination 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 TopicRuleDestination resource accepts the following input properties:
- Vpc
Configuration TopicRule Destination Vpc Configuration - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- Enabled bool
- Whether or not to enable the destination. Default:
true
.
- Vpc
Configuration TopicRule Destination Vpc Configuration Args - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- Enabled bool
- Whether or not to enable the destination. Default:
true
.
- vpc
Configuration TopicRule Destination Vpc Configuration - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- enabled Boolean
- Whether or not to enable the destination. Default:
true
.
- vpc
Configuration TopicRule Destination Vpc Configuration - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- enabled boolean
- Whether or not to enable the destination. Default:
true
.
- vpc_
configuration TopicRule Destination Vpc Configuration Args - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- enabled bool
- Whether or not to enable the destination. Default:
true
.
- vpc
Configuration Property Map - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- enabled Boolean
- Whether or not to enable the destination. Default:
true
.
Outputs
All input properties are implicitly available as output properties. Additionally, the TopicRuleDestination resource produces the following output properties:
Look up Existing TopicRuleDestination Resource
Get an existing TopicRuleDestination 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?: TopicRuleDestinationState, opts?: CustomResourceOptions): TopicRuleDestination
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
enabled: Optional[bool] = None,
vpc_configuration: Optional[TopicRuleDestinationVpcConfigurationArgs] = None) -> TopicRuleDestination
func GetTopicRuleDestination(ctx *Context, name string, id IDInput, state *TopicRuleDestinationState, opts ...ResourceOption) (*TopicRuleDestination, error)
public static TopicRuleDestination Get(string name, Input<string> id, TopicRuleDestinationState? state, CustomResourceOptions? opts = null)
public static TopicRuleDestination get(String name, Output<String> id, TopicRuleDestinationState 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.
- Arn string
- The ARN of the topic rule destination
- Enabled bool
- Whether or not to enable the destination. Default:
true
. - Vpc
Configuration TopicRule Destination Vpc Configuration - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- Arn string
- The ARN of the topic rule destination
- Enabled bool
- Whether or not to enable the destination. Default:
true
. - Vpc
Configuration TopicRule Destination Vpc Configuration Args - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- arn String
- The ARN of the topic rule destination
- enabled Boolean
- Whether or not to enable the destination. Default:
true
. - vpc
Configuration TopicRule Destination Vpc Configuration - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- arn string
- The ARN of the topic rule destination
- enabled boolean
- Whether or not to enable the destination. Default:
true
. - vpc
Configuration TopicRule Destination Vpc Configuration - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- arn str
- The ARN of the topic rule destination
- enabled bool
- Whether or not to enable the destination. Default:
true
. - vpc_
configuration TopicRule Destination Vpc Configuration Args - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
- arn String
- The ARN of the topic rule destination
- enabled Boolean
- Whether or not to enable the destination. Default:
true
. - vpc
Configuration Property Map - Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.
Supporting Types
TopicRuleDestinationVpcConfiguration, TopicRuleDestinationVpcConfigurationArgs
- Role
Arn string - The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
- Subnet
Ids List<string> - The subnet IDs of the VPC destination.
- Vpc
Id string - The ID of the VPC.
- Security
Groups List<string> - The security groups of the VPC destination.
- Role
Arn string - The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
- Subnet
Ids []string - The subnet IDs of the VPC destination.
- Vpc
Id string - The ID of the VPC.
- Security
Groups []string - The security groups of the VPC destination.
- role
Arn String - The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
- subnet
Ids List<String> - The subnet IDs of the VPC destination.
- vpc
Id String - The ID of the VPC.
- security
Groups List<String> - The security groups of the VPC destination.
- role
Arn string - The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
- subnet
Ids string[] - The subnet IDs of the VPC destination.
- vpc
Id string - The ID of the VPC.
- security
Groups string[] - The security groups of the VPC destination.
- role_
arn str - The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
- subnet_
ids Sequence[str] - The subnet IDs of the VPC destination.
- vpc_
id str - The ID of the VPC.
- security_
groups Sequence[str] - The security groups of the VPC destination.
- role
Arn String - The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
- subnet
Ids List<String> - The subnet IDs of the VPC destination.
- vpc
Id String - The ID of the VPC.
- security
Groups List<String> - The security groups of the VPC destination.
Import
Using pulumi import
, import IoT topic rule destinations using the arn
. For example:
$ pulumi import aws:iot/topicRuleDestination:TopicRuleDestination example arn:aws:iot:us-west-2:123456789012:ruledestination/vpc/2ce781c8-68a6-4c52-9c62-63fe489ecc60
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.
Try AWS Native preview for resources not in the classic version.