Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.vpc.getTrafficMirrorFilterIngressRules
Explore with Pulumi AI
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)
public static Output<GetTrafficMirrorFilterIngressRulesResult> getTrafficMirrorFilterIngressRules(GetTrafficMirrorFilterIngressRulesArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:vpc/getTrafficMirrorFilterIngressRules:getTrafficMirrorFilterIngressRules
  arguments:
    # arguments dictionaryThe following arguments are supported:
- TrafficMirror stringFilter Id 
- The ID of the Traffic Mirror Filter.
- 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,ModifyingandDeleting.
- TrafficMirror stringFilter Id 
- The ID of the Traffic Mirror Filter.
- 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,ModifyingandDeleting.
- trafficMirror StringFilter Id 
- The ID of the Traffic Mirror Filter.
- 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,ModifyingandDeleting.
- trafficMirror stringFilter Id 
- The ID of the Traffic Mirror Filter.
- 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,ModifyingandDeleting.
- traffic_mirror_ strfilter_ id 
- The ID of the Traffic Mirror Filter.
- 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,ModifyingandDeleting.
- trafficMirror StringFilter Id 
- The ID of the Traffic Mirror Filter.
- 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,ModifyingandDeleting.
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.Ali Cloud. Vpc. Outputs. Get Traffic Mirror Filter Ingress Rules Rule> 
- TrafficMirror stringFilter Id 
- OutputFile string
- Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Rules
[]GetTraffic Mirror Filter Ingress Rules Rule 
- TrafficMirror stringFilter Id 
- OutputFile string
- Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- rules
List<GetTraffic Mirror Filter Ingress Rules Rule> 
- trafficMirror StringFilter Id 
- outputFile String
- status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- rules
GetTraffic Mirror Filter Ingress Rules Rule[] 
- trafficMirror stringFilter Id 
- outputFile string
- status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- rules
Sequence[GetTraffic Mirror Filter Ingress Rules Rule] 
- traffic_mirror_ strfilter_ id 
- output_file str
- status str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- rules List<Property Map>
- trafficMirror StringFilter Id 
- outputFile String
- status String
Supporting Types
GetTrafficMirrorFilterIngressRulesRule      
- DestinationCidr stringBlock 
- The destination CIDR block of the inbound traffic.
- DestinationPort stringRange 
- 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: acceptordrop.accept: collects network traffic.drop: does not collect network traffic.
- SourceCidr stringBlock 
- The source CIDR block of the inbound traffic.
- SourcePort stringRange 
- The source port range of the inbound traffic.
- Status string
- The status of the resource. Valid values:Creating,Created,ModifyingandDeleting.
- TrafficMirror stringFilter Id 
- The ID of the filter associated with the inbound rule.
- TrafficMirror stringFilter Rule Id 
- The first ID of the resource.
- DestinationCidr stringBlock 
- The destination CIDR block of the inbound traffic.
- DestinationPort stringRange 
- 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: acceptordrop.accept: collects network traffic.drop: does not collect network traffic.
- SourceCidr stringBlock 
- The source CIDR block of the inbound traffic.
- SourcePort stringRange 
- The source port range of the inbound traffic.
- Status string
- The status of the resource. Valid values:Creating,Created,ModifyingandDeleting.
- TrafficMirror stringFilter Id 
- The ID of the filter associated with the inbound rule.
- TrafficMirror stringFilter Rule Id 
- The first ID of the resource.
- destinationCidr StringBlock 
- The destination CIDR block of the inbound traffic.
- destinationPort StringRange 
- 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: acceptordrop.accept: collects network traffic.drop: does not collect network traffic.
- sourceCidr StringBlock 
- The source CIDR block of the inbound traffic.
- sourcePort StringRange 
- The source port range of the inbound traffic.
- status String
- The status of the resource. Valid values:Creating,Created,ModifyingandDeleting.
- trafficMirror StringFilter Id 
- The ID of the filter associated with the inbound rule.
- trafficMirror StringFilter Rule Id 
- The first ID of the resource.
- destinationCidr stringBlock 
- The destination CIDR block of the inbound traffic.
- destinationPort stringRange 
- 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: acceptordrop.accept: collects network traffic.drop: does not collect network traffic.
- sourceCidr stringBlock 
- The source CIDR block of the inbound traffic.
- sourcePort stringRange 
- The source port range of the inbound traffic.
- status string
- The status of the resource. Valid values:Creating,Created,ModifyingandDeleting.
- trafficMirror stringFilter Id 
- The ID of the filter associated with the inbound rule.
- trafficMirror stringFilter Rule Id 
- The first ID of the resource.
- destination_cidr_ strblock 
- The destination CIDR block of the inbound traffic.
- destination_port_ strrange 
- 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: acceptordrop.accept: collects network traffic.drop: does not collect network traffic.
- source_cidr_ strblock 
- The source CIDR block of the inbound traffic.
- source_port_ strrange 
- The source port range of the inbound traffic.
- status str
- The status of the resource. Valid values:Creating,Created,ModifyingandDeleting.
- traffic_mirror_ strfilter_ id 
- The ID of the filter associated with the inbound rule.
- traffic_mirror_ strfilter_ rule_ id 
- The first ID of the resource.
- destinationCidr StringBlock 
- The destination CIDR block of the inbound traffic.
- destinationPort StringRange 
- 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: acceptordrop.accept: collects network traffic.drop: does not collect network traffic.
- sourceCidr StringBlock 
- The source CIDR block of the inbound traffic.
- sourcePort StringRange 
- The source port range of the inbound traffic.
- status String
- The status of the resource. Valid values:Creating,Created,ModifyingandDeleting.
- trafficMirror StringFilter Id 
- The ID of the filter associated with the inbound rule.
- trafficMirror StringFilter Rule Id 
- 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 alicloudTerraform Provider.