Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:vpc/getTrafficMirrorFilterIngressRules:getTrafficMirrorFilterIngressRules
arguments:
# arguments dictionary
The following arguments are supported:
- Traffic
Mirror stringFilter Id - The ID of the Traffic Mirror Filter.
- Ids List<string>
- A list of Traffic Mirror Filter Ingress Rule IDs.
- Output
File 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
andDeleting
.
- Traffic
Mirror stringFilter Id - The ID of the Traffic Mirror Filter.
- Ids []string
- A list of Traffic Mirror Filter Ingress Rule IDs.
- Output
File 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
andDeleting
.
- traffic
Mirror StringFilter Id - The ID of the Traffic Mirror Filter.
- ids List<String>
- A list of Traffic Mirror Filter Ingress Rule IDs.
- output
File 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
andDeleting
.
- traffic
Mirror stringFilter Id - The ID of the Traffic Mirror Filter.
- ids string[]
- A list of Traffic Mirror Filter Ingress Rule IDs.
- output
File 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
andDeleting
.
- 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
,Modifying
andDeleting
.
- traffic
Mirror StringFilter Id - The ID of the Traffic Mirror Filter.
- ids List<String>
- A list of Traffic Mirror Filter Ingress Rule IDs.
- output
File 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
andDeleting
.
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> - Traffic
Mirror stringFilter Id - Output
File string - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Rules
[]Get
Traffic Mirror Filter Ingress Rules Rule - Traffic
Mirror stringFilter Id - Output
File string - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- rules
List<Get
Traffic Mirror Filter Ingress Rules Rule> - traffic
Mirror StringFilter Id - output
File String - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- rules
Get
Traffic Mirror Filter Ingress Rules Rule[] - traffic
Mirror stringFilter Id - output
File string - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- rules
Sequence[Get
Traffic 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>
- traffic
Mirror StringFilter Id - output
File String - status String
Supporting Types
GetTrafficMirrorFilterIngressRulesRule
- Destination
Cidr stringBlock - The destination CIDR block of the inbound traffic.
- Destination
Port 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
. - Rule
Action string - The collection policy of the inbound rule. Valid values:
accept
ordrop
.accept
: collects network traffic.drop
: does not collect network traffic. - Source
Cidr stringBlock - The source CIDR block of the inbound traffic.
- Source
Port stringRange - The source port range of the inbound traffic.
- Status string
- The status of the resource. Valid values:
Creating
,Created
,Modifying
andDeleting
. - Traffic
Mirror stringFilter Id - The ID of the filter associated with the inbound rule.
- Traffic
Mirror stringFilter Rule Id - The first ID of the resource.
- Destination
Cidr stringBlock - The destination CIDR block of the inbound traffic.
- Destination
Port 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
. - Rule
Action string - The collection policy of the inbound rule. Valid values:
accept
ordrop
.accept
: collects network traffic.drop
: does not collect network traffic. - Source
Cidr stringBlock - The source CIDR block of the inbound traffic.
- Source
Port stringRange - The source port range of the inbound traffic.
- Status string
- The status of the resource. Valid values:
Creating
,Created
,Modifying
andDeleting
. - Traffic
Mirror stringFilter Id - The ID of the filter associated with the inbound rule.
- Traffic
Mirror stringFilter Rule Id - The first ID of the resource.
- destination
Cidr StringBlock - The destination CIDR block of the inbound traffic.
- destination
Port 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
. - rule
Action String - The collection policy of the inbound rule. Valid values:
accept
ordrop
.accept
: collects network traffic.drop
: does not collect network traffic. - source
Cidr StringBlock - The source CIDR block of the inbound traffic.
- source
Port StringRange - The source port range of the inbound traffic.
- status String
- The status of the resource. Valid values:
Creating
,Created
,Modifying
andDeleting
. - traffic
Mirror StringFilter Id - The ID of the filter associated with the inbound rule.
- traffic
Mirror StringFilter Rule Id - The first ID of the resource.
- destination
Cidr stringBlock - The destination CIDR block of the inbound traffic.
- destination
Port 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
. - rule
Action string - The collection policy of the inbound rule. Valid values:
accept
ordrop
.accept
: collects network traffic.drop
: does not collect network traffic. - source
Cidr stringBlock - The source CIDR block of the inbound traffic.
- source
Port stringRange - The source port range of the inbound traffic.
- status string
- The status of the resource. Valid values:
Creating
,Created
,Modifying
andDeleting
. - traffic
Mirror stringFilter Id - The ID of the filter associated with the inbound rule.
- traffic
Mirror 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:
accept
ordrop
.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
,Modifying
andDeleting
. - 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.
- destination
Cidr StringBlock - The destination CIDR block of the inbound traffic.
- destination
Port 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
. - rule
Action String - The collection policy of the inbound rule. Valid values:
accept
ordrop
.accept
: collects network traffic.drop
: does not collect network traffic. - source
Cidr StringBlock - The source CIDR block of the inbound traffic.
- source
Port StringRange - The source port range of the inbound traffic.
- status String
- The status of the resource. Valid values:
Creating
,Created
,Modifying
andDeleting
. - traffic
Mirror StringFilter Id - The ID of the filter associated with the inbound rule.
- traffic
Mirror 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
alicloud
Terraform Provider.