1. Packages
  2. AWS
  3. API Docs
  4. iot
  5. TopicRuleDestination
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.iot.TopicRuleDestination

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    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={
        "role_arn": example_aws_iam_role["arn"],
        "security_groups": [example_aws_security_group["id"]],
        "subnet_ids": [__item["id"] for __item in example_aws_subnet],
        "vpc_id": 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: []pulumi.String(%!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:

    VpcConfiguration TopicRuleDestinationVpcConfiguration
    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.
    VpcConfiguration TopicRuleDestinationVpcConfigurationArgs
    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.
    vpcConfiguration TopicRuleDestinationVpcConfiguration
    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.
    vpcConfiguration TopicRuleDestinationVpcConfiguration
    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 TopicRuleDestinationVpcConfigurationArgs
    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.
    vpcConfiguration 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:

    Arn string
    The ARN of the topic rule destination
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The ARN of the topic rule destination
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the topic rule destination
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The ARN of the topic rule destination
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The ARN of the topic rule destination
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the topic rule destination
    id String
    The provider-assigned unique ID for this managed resource.

    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.
    The following state arguments are supported:
    Arn string
    The ARN of the topic rule destination
    Enabled bool
    Whether or not to enable the destination. Default: true.
    VpcConfiguration TopicRuleDestinationVpcConfiguration
    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.
    VpcConfiguration TopicRuleDestinationVpcConfigurationArgs
    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.
    vpcConfiguration TopicRuleDestinationVpcConfiguration
    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.
    vpcConfiguration TopicRuleDestinationVpcConfiguration
    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 TopicRuleDestinationVpcConfigurationArgs
    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.
    vpcConfiguration Property Map
    Configuration of the virtual private cloud (VPC) connection. For more info, see the AWS documentation.

    Supporting Types

    TopicRuleDestinationVpcConfiguration, TopicRuleDestinationVpcConfigurationArgs

    RoleArn string
    The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
    SubnetIds List<string>
    The subnet IDs of the VPC destination.
    VpcId string
    The ID of the VPC.
    SecurityGroups List<string>
    The security groups of the VPC destination.
    RoleArn string
    The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
    SubnetIds []string
    The subnet IDs of the VPC destination.
    VpcId string
    The ID of the VPC.
    SecurityGroups []string
    The security groups of the VPC destination.
    roleArn String
    The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
    subnetIds List<String>
    The subnet IDs of the VPC destination.
    vpcId String
    The ID of the VPC.
    securityGroups List<String>
    The security groups of the VPC destination.
    roleArn string
    The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
    subnetIds string[]
    The subnet IDs of the VPC destination.
    vpcId string
    The ID of the VPC.
    securityGroups 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.
    roleArn String
    The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
    subnetIds List<String>
    The subnet IDs of the VPC destination.
    vpcId String
    The ID of the VPC.
    securityGroups 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.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi