1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpc
  5. getTrafficMirrorFilterIngressRules
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.vpc.getTrafficMirrorFilterIngressRules

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    This data source provides the Vpc Traffic Mirror Filter Ingress Rules of the current Alibaba Cloud user.

    NOTE: Available in v1.141.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.vpc.getTrafficMirrorFilterIngressRules({
        trafficMirrorFilterId: "example_traffic_mirror_filter_id",
        ids: ["example_id"],
    });
    export const vpcTrafficMirrorFilterIngressRuleId1 = ids.then(ids => ids.rules?.[0]?.id);
    const status = alicloud.vpc.getTrafficMirrorFilterIngressRules({
        trafficMirrorFilterId: "example_traffic_mirror_filter_id",
        ids: ["example_id"],
        status: "Created",
    });
    export const vpcTrafficMirrorFilterIngressRuleId2 = status.then(status => status.rules?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.vpc.get_traffic_mirror_filter_ingress_rules(traffic_mirror_filter_id="example_traffic_mirror_filter_id",
        ids=["example_id"])
    pulumi.export("vpcTrafficMirrorFilterIngressRuleId1", ids.rules[0].id)
    status = alicloud.vpc.get_traffic_mirror_filter_ingress_rules(traffic_mirror_filter_id="example_traffic_mirror_filter_id",
        ids=["example_id"],
        status="Created")
    pulumi.export("vpcTrafficMirrorFilterIngressRuleId2", status.rules[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := vpc.GetTrafficMirrorFilterIngressRules(ctx, &vpc.GetTrafficMirrorFilterIngressRulesArgs{
    			TrafficMirrorFilterId: "example_traffic_mirror_filter_id",
    			Ids: []string{
    				"example_id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpcTrafficMirrorFilterIngressRuleId1", ids.Rules[0].Id)
    		status, err := vpc.GetTrafficMirrorFilterIngressRules(ctx, &vpc.GetTrafficMirrorFilterIngressRulesArgs{
    			TrafficMirrorFilterId: "example_traffic_mirror_filter_id",
    			Ids: []string{
    				"example_id",
    			},
    			Status: pulumi.StringRef("Created"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpcTrafficMirrorFilterIngressRuleId2", status.Rules[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Vpc.GetTrafficMirrorFilterIngressRules.Invoke(new()
        {
            TrafficMirrorFilterId = "example_traffic_mirror_filter_id",
            Ids = new[]
            {
                "example_id",
            },
        });
    
        var status = AliCloud.Vpc.GetTrafficMirrorFilterIngressRules.Invoke(new()
        {
            TrafficMirrorFilterId = "example_traffic_mirror_filter_id",
            Ids = new[]
            {
                "example_id",
            },
            Status = "Created",
        });
    
        return new Dictionary<string, object?>
        {
            ["vpcTrafficMirrorFilterIngressRuleId1"] = ids.Apply(getTrafficMirrorFilterIngressRulesResult => getTrafficMirrorFilterIngressRulesResult.Rules[0]?.Id),
            ["vpcTrafficMirrorFilterIngressRuleId2"] = status.Apply(getTrafficMirrorFilterIngressRulesResult => getTrafficMirrorFilterIngressRulesResult.Rules[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetTrafficMirrorFilterIngressRulesArgs;
    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) {
            final var ids = VpcFunctions.getTrafficMirrorFilterIngressRules(GetTrafficMirrorFilterIngressRulesArgs.builder()
                .trafficMirrorFilterId("example_traffic_mirror_filter_id")
                .ids("example_id")
                .build());
    
            ctx.export("vpcTrafficMirrorFilterIngressRuleId1", ids.applyValue(getTrafficMirrorFilterIngressRulesResult -> getTrafficMirrorFilterIngressRulesResult.rules()[0].id()));
            final var status = VpcFunctions.getTrafficMirrorFilterIngressRules(GetTrafficMirrorFilterIngressRulesArgs.builder()
                .trafficMirrorFilterId("example_traffic_mirror_filter_id")
                .ids("example_id")
                .status("Created")
                .build());
    
            ctx.export("vpcTrafficMirrorFilterIngressRuleId2", status.applyValue(getTrafficMirrorFilterIngressRulesResult -> getTrafficMirrorFilterIngressRulesResult.rules()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:vpc:getTrafficMirrorFilterIngressRules
          Arguments:
            trafficMirrorFilterId: example_traffic_mirror_filter_id
            ids:
              - example_id
      status:
        fn::invoke:
          Function: alicloud:vpc:getTrafficMirrorFilterIngressRules
          Arguments:
            trafficMirrorFilterId: example_traffic_mirror_filter_id
            ids:
              - example_id
            status: Created
    outputs:
      vpcTrafficMirrorFilterIngressRuleId1: ${ids.rules[0].id}
      vpcTrafficMirrorFilterIngressRuleId2: ${status.rules[0].id}
    

    Using getTrafficMirrorFilterIngressRules

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTrafficMirrorFilterIngressRules(args: GetTrafficMirrorFilterIngressRulesArgs, opts?: InvokeOptions): Promise<GetTrafficMirrorFilterIngressRulesResult>
    function getTrafficMirrorFilterIngressRulesOutput(args: GetTrafficMirrorFilterIngressRulesOutputArgs, opts?: InvokeOptions): Output<GetTrafficMirrorFilterIngressRulesResult>
    def get_traffic_mirror_filter_ingress_rules(ids: Optional[Sequence[str]] = None,
                                                output_file: Optional[str] = None,
                                                status: Optional[str] = None,
                                                traffic_mirror_filter_id: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetTrafficMirrorFilterIngressRulesResult
    def get_traffic_mirror_filter_ingress_rules_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                                output_file: Optional[pulumi.Input[str]] = None,
                                                status: Optional[pulumi.Input[str]] = None,
                                                traffic_mirror_filter_id: Optional[pulumi.Input[str]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetTrafficMirrorFilterIngressRulesResult]
    func GetTrafficMirrorFilterIngressRules(ctx *Context, args *GetTrafficMirrorFilterIngressRulesArgs, opts ...InvokeOption) (*GetTrafficMirrorFilterIngressRulesResult, error)
    func GetTrafficMirrorFilterIngressRulesOutput(ctx *Context, args *GetTrafficMirrorFilterIngressRulesOutputArgs, opts ...InvokeOption) GetTrafficMirrorFilterIngressRulesResultOutput

    > Note: This function is named GetTrafficMirrorFilterIngressRules in the Go SDK.

    public static class GetTrafficMirrorFilterIngressRules 
    {
        public static Task<GetTrafficMirrorFilterIngressRulesResult> InvokeAsync(GetTrafficMirrorFilterIngressRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetTrafficMirrorFilterIngressRulesResult> Invoke(GetTrafficMirrorFilterIngressRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTrafficMirrorFilterIngressRulesResult> getTrafficMirrorFilterIngressRules(GetTrafficMirrorFilterIngressRulesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:vpc/getTrafficMirrorFilterIngressRules:getTrafficMirrorFilterIngressRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TrafficMirrorFilterId string
    The ID of the filter associated with the inbound rule.
    Ids List<string>
    A list of Traffic Mirror Filter Ingress Rule IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    TrafficMirrorFilterId string
    The ID of the filter associated with the inbound rule.
    Ids []string
    A list of Traffic Mirror Filter Ingress Rule IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId String
    The ID of the filter associated with the inbound rule.
    ids List<String>
    A list of Traffic Mirror Filter Ingress Rule IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId string
    The ID of the filter associated with the inbound rule.
    ids string[]
    A list of Traffic Mirror Filter Ingress Rule IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    traffic_mirror_filter_id str
    The ID of the filter associated with the inbound rule.
    ids Sequence[str]
    A list of Traffic Mirror Filter Ingress Rule IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId String
    The ID of the filter associated with the inbound rule.
    ids List<String>
    A list of Traffic Mirror Filter Ingress Rule IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.

    getTrafficMirrorFilterIngressRules Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Rules List<Pulumi.AliCloud.Vpc.Outputs.GetTrafficMirrorFilterIngressRulesRule>
    TrafficMirrorFilterId string
    OutputFile string
    Status string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Rules []GetTrafficMirrorFilterIngressRulesRule
    TrafficMirrorFilterId string
    OutputFile string
    Status string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    rules List<GetTrafficMirrorFilterIngressRulesRule>
    trafficMirrorFilterId String
    outputFile String
    status String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    rules GetTrafficMirrorFilterIngressRulesRule[]
    trafficMirrorFilterId string
    outputFile string
    status string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    rules Sequence[GetTrafficMirrorFilterIngressRulesRule]
    traffic_mirror_filter_id str
    output_file str
    status str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    rules List<Property Map>
    trafficMirrorFilterId String
    outputFile String
    status String

    Supporting Types

    GetTrafficMirrorFilterIngressRulesRule

    DestinationCidrBlock string
    The destination CIDR block of the inbound traffic.
    DestinationPortRange string
    The destination port range of the inbound traffic.
    Id string
    The ID of the Traffic Mirror Filter Egress Rule.
    Priority int
    The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is 10, which indicates that you can configure at most 10 inbound rules for a filter.
    Protocol string
    The transport protocol used by inbound traffic that needs to be mirrored. Valid values: ALL, ICMP, TCP, UDP.
    RuleAction string
    The collection policy of the inbound rule. Valid values: accept or drop. accept: collects network traffic. drop: does not collect network traffic.
    SourceCidrBlock string
    The source CIDR block of the inbound traffic.
    SourcePortRange string
    The source port range of the inbound traffic.
    Status string
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    TrafficMirrorFilterId string
    The ID of the filter associated with the inbound rule.
    TrafficMirrorFilterRuleId string
    The first ID of the resource.
    DestinationCidrBlock string
    The destination CIDR block of the inbound traffic.
    DestinationPortRange string
    The destination port range of the inbound traffic.
    Id string
    The ID of the Traffic Mirror Filter Egress Rule.
    Priority int
    The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is 10, which indicates that you can configure at most 10 inbound rules for a filter.
    Protocol string
    The transport protocol used by inbound traffic that needs to be mirrored. Valid values: ALL, ICMP, TCP, UDP.
    RuleAction string
    The collection policy of the inbound rule. Valid values: accept or drop. accept: collects network traffic. drop: does not collect network traffic.
    SourceCidrBlock string
    The source CIDR block of the inbound traffic.
    SourcePortRange string
    The source port range of the inbound traffic.
    Status string
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    TrafficMirrorFilterId string
    The ID of the filter associated with the inbound rule.
    TrafficMirrorFilterRuleId string
    The first ID of the resource.
    destinationCidrBlock String
    The destination CIDR block of the inbound traffic.
    destinationPortRange String
    The destination port range of the inbound traffic.
    id String
    The ID of the Traffic Mirror Filter Egress Rule.
    priority Integer
    The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is 10, which indicates that you can configure at most 10 inbound rules for a filter.
    protocol String
    The transport protocol used by inbound traffic that needs to be mirrored. Valid values: ALL, ICMP, TCP, UDP.
    ruleAction String
    The collection policy of the inbound rule. Valid values: accept or drop. accept: collects network traffic. drop: does not collect network traffic.
    sourceCidrBlock String
    The source CIDR block of the inbound traffic.
    sourcePortRange String
    The source port range of the inbound traffic.
    status String
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId String
    The ID of the filter associated with the inbound rule.
    trafficMirrorFilterRuleId String
    The first ID of the resource.
    destinationCidrBlock string
    The destination CIDR block of the inbound traffic.
    destinationPortRange string
    The destination port range of the inbound traffic.
    id string
    The ID of the Traffic Mirror Filter Egress Rule.
    priority number
    The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is 10, which indicates that you can configure at most 10 inbound rules for a filter.
    protocol string
    The transport protocol used by inbound traffic that needs to be mirrored. Valid values: ALL, ICMP, TCP, UDP.
    ruleAction string
    The collection policy of the inbound rule. Valid values: accept or drop. accept: collects network traffic. drop: does not collect network traffic.
    sourceCidrBlock string
    The source CIDR block of the inbound traffic.
    sourcePortRange string
    The source port range of the inbound traffic.
    status string
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId string
    The ID of the filter associated with the inbound rule.
    trafficMirrorFilterRuleId string
    The first ID of the resource.
    destination_cidr_block str
    The destination CIDR block of the inbound traffic.
    destination_port_range str
    The destination port range of the inbound traffic.
    id str
    The ID of the Traffic Mirror Filter Egress Rule.
    priority int
    The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is 10, which indicates that you can configure at most 10 inbound rules for a filter.
    protocol str
    The transport protocol used by inbound traffic that needs to be mirrored. Valid values: ALL, ICMP, TCP, UDP.
    rule_action str
    The collection policy of the inbound rule. Valid values: accept or drop. accept: collects network traffic. drop: does not collect network traffic.
    source_cidr_block str
    The source CIDR block of the inbound traffic.
    source_port_range str
    The source port range of the inbound traffic.
    status str
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    traffic_mirror_filter_id str
    The ID of the filter associated with the inbound rule.
    traffic_mirror_filter_rule_id str
    The first ID of the resource.
    destinationCidrBlock String
    The destination CIDR block of the inbound traffic.
    destinationPortRange String
    The destination port range of the inbound traffic.
    id String
    The ID of the Traffic Mirror Filter Egress Rule.
    priority Number
    The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is 10, which indicates that you can configure at most 10 inbound rules for a filter.
    protocol String
    The transport protocol used by inbound traffic that needs to be mirrored. Valid values: ALL, ICMP, TCP, UDP.
    ruleAction String
    The collection policy of the inbound rule. Valid values: accept or drop. accept: collects network traffic. drop: does not collect network traffic.
    sourceCidrBlock String
    The source CIDR block of the inbound traffic.
    sourcePortRange String
    The source port range of the inbound traffic.
    status String
    The status of the resource. Valid values:Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId String
    The ID of the filter associated with the inbound rule.
    trafficMirrorFilterRuleId String
    The first ID of the resource.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi