Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.vpc.getTrafficMirrorFilterEgressRules
Explore with Pulumi AI
This data source provides the Vpc Traffic Mirror Filter Egress Rules of the current Alibaba Cloud user.
NOTE: Available in v1.140.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.vpc.getTrafficMirrorFilterEgressRules({
trafficMirrorFilterId: "example_traffic_mirror_filter_id",
ids: ["example_id"],
});
export const vpcTrafficMirrorFilterEgressRuleId1 = ids.then(ids => ids.rules?.[0]?.id);
const status = alicloud.vpc.getTrafficMirrorFilterEgressRules({
trafficMirrorFilterId: "example_traffic_mirror_filter_id",
ids: ["example_id"],
status: "Created",
});
export const vpcTrafficMirrorFilterEgressRuleId2 = status.then(status => status.rules?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.vpc.get_traffic_mirror_filter_egress_rules(traffic_mirror_filter_id="example_traffic_mirror_filter_id",
ids=["example_id"])
pulumi.export("vpcTrafficMirrorFilterEgressRuleId1", ids.rules[0].id)
status = alicloud.vpc.get_traffic_mirror_filter_egress_rules(traffic_mirror_filter_id="example_traffic_mirror_filter_id",
ids=["example_id"],
status="Created")
pulumi.export("vpcTrafficMirrorFilterEgressRuleId2", 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.GetTrafficMirrorFilterEgressRules(ctx, &vpc.GetTrafficMirrorFilterEgressRulesArgs{
TrafficMirrorFilterId: "example_traffic_mirror_filter_id",
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("vpcTrafficMirrorFilterEgressRuleId1", ids.Rules[0].Id)
status, err := vpc.GetTrafficMirrorFilterEgressRules(ctx, &vpc.GetTrafficMirrorFilterEgressRulesArgs{
TrafficMirrorFilterId: "example_traffic_mirror_filter_id",
Ids: []string{
"example_id",
},
Status: pulumi.StringRef("Created"),
}, nil)
if err != nil {
return err
}
ctx.Export("vpcTrafficMirrorFilterEgressRuleId2", 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.GetTrafficMirrorFilterEgressRules.Invoke(new()
{
TrafficMirrorFilterId = "example_traffic_mirror_filter_id",
Ids = new[]
{
"example_id",
},
});
var status = AliCloud.Vpc.GetTrafficMirrorFilterEgressRules.Invoke(new()
{
TrafficMirrorFilterId = "example_traffic_mirror_filter_id",
Ids = new[]
{
"example_id",
},
Status = "Created",
});
return new Dictionary<string, object?>
{
["vpcTrafficMirrorFilterEgressRuleId1"] = ids.Apply(getTrafficMirrorFilterEgressRulesResult => getTrafficMirrorFilterEgressRulesResult.Rules[0]?.Id),
["vpcTrafficMirrorFilterEgressRuleId2"] = status.Apply(getTrafficMirrorFilterEgressRulesResult => getTrafficMirrorFilterEgressRulesResult.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.GetTrafficMirrorFilterEgressRulesArgs;
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.getTrafficMirrorFilterEgressRules(GetTrafficMirrorFilterEgressRulesArgs.builder()
.trafficMirrorFilterId("example_traffic_mirror_filter_id")
.ids("example_id")
.build());
ctx.export("vpcTrafficMirrorFilterEgressRuleId1", ids.applyValue(getTrafficMirrorFilterEgressRulesResult -> getTrafficMirrorFilterEgressRulesResult.rules()[0].id()));
final var status = VpcFunctions.getTrafficMirrorFilterEgressRules(GetTrafficMirrorFilterEgressRulesArgs.builder()
.trafficMirrorFilterId("example_traffic_mirror_filter_id")
.ids("example_id")
.status("Created")
.build());
ctx.export("vpcTrafficMirrorFilterEgressRuleId2", status.applyValue(getTrafficMirrorFilterEgressRulesResult -> getTrafficMirrorFilterEgressRulesResult.rules()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:vpc:getTrafficMirrorFilterEgressRules
Arguments:
trafficMirrorFilterId: example_traffic_mirror_filter_id
ids:
- example_id
status:
fn::invoke:
Function: alicloud:vpc:getTrafficMirrorFilterEgressRules
Arguments:
trafficMirrorFilterId: example_traffic_mirror_filter_id
ids:
- example_id
status: Created
outputs:
vpcTrafficMirrorFilterEgressRuleId1: ${ids.rules[0].id}
vpcTrafficMirrorFilterEgressRuleId2: ${status.rules[0].id}
Using getTrafficMirrorFilterEgressRules
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 getTrafficMirrorFilterEgressRules(args: GetTrafficMirrorFilterEgressRulesArgs, opts?: InvokeOptions): Promise<GetTrafficMirrorFilterEgressRulesResult>
function getTrafficMirrorFilterEgressRulesOutput(args: GetTrafficMirrorFilterEgressRulesOutputArgs, opts?: InvokeOptions): Output<GetTrafficMirrorFilterEgressRulesResult>
def get_traffic_mirror_filter_egress_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) -> GetTrafficMirrorFilterEgressRulesResult
def get_traffic_mirror_filter_egress_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[GetTrafficMirrorFilterEgressRulesResult]
func GetTrafficMirrorFilterEgressRules(ctx *Context, args *GetTrafficMirrorFilterEgressRulesArgs, opts ...InvokeOption) (*GetTrafficMirrorFilterEgressRulesResult, error)
func GetTrafficMirrorFilterEgressRulesOutput(ctx *Context, args *GetTrafficMirrorFilterEgressRulesOutputArgs, opts ...InvokeOption) GetTrafficMirrorFilterEgressRulesResultOutput
> Note: This function is named GetTrafficMirrorFilterEgressRules
in the Go SDK.
public static class GetTrafficMirrorFilterEgressRules
{
public static Task<GetTrafficMirrorFilterEgressRulesResult> InvokeAsync(GetTrafficMirrorFilterEgressRulesArgs args, InvokeOptions? opts = null)
public static Output<GetTrafficMirrorFilterEgressRulesResult> Invoke(GetTrafficMirrorFilterEgressRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTrafficMirrorFilterEgressRulesResult> getTrafficMirrorFilterEgressRules(GetTrafficMirrorFilterEgressRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:vpc/getTrafficMirrorFilterEgressRules:getTrafficMirrorFilterEgressRules
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 Egress 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 Egress 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 Egress 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 Egress 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 Egress 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 Egress 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
.
getTrafficMirrorFilterEgressRules 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 Egress 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 Egress 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 Egress 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 Egress 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 Egress 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
GetTrafficMirrorFilterEgressRulesRule
- Destination
Cidr stringBlock - The destination CIDR block of the outbound traffic.
- Destination
Port stringRange - The destination port range of the outbound traffic.
- Id string
- The ID of the Traffic Mirror Filter Egress Rule.
- Priority int
- The priority of the outbound 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 outbound 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 outbound traffic.
- Source
Port stringRange - The source port range of the outbound 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 outbound rule.
- Traffic
Mirror stringFilter Rule Id - The first ID of the resource.
- Destination
Cidr stringBlock - The destination CIDR block of the outbound traffic.
- Destination
Port stringRange - The destination port range of the outbound traffic.
- Id string
- The ID of the Traffic Mirror Filter Egress Rule.
- Priority int
- The priority of the outbound 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 outbound 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 outbound traffic.
- Source
Port stringRange - The source port range of the outbound 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 outbound rule.
- Traffic
Mirror stringFilter Rule Id - The first ID of the resource.
- destination
Cidr StringBlock - The destination CIDR block of the outbound traffic.
- destination
Port StringRange - The destination port range of the outbound traffic.
- id String
- The ID of the Traffic Mirror Filter Egress Rule.
- priority Integer
- The priority of the outbound 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 outbound 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 outbound traffic.
- source
Port StringRange - The source port range of the outbound 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 outbound rule.
- traffic
Mirror StringFilter Rule Id - The first ID of the resource.
- destination
Cidr stringBlock - The destination CIDR block of the outbound traffic.
- destination
Port stringRange - The destination port range of the outbound traffic.
- id string
- The ID of the Traffic Mirror Filter Egress Rule.
- priority number
- The priority of the outbound 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 outbound 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 outbound traffic.
- source
Port stringRange - The source port range of the outbound 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 outbound rule.
- traffic
Mirror stringFilter Rule Id - The first ID of the resource.
- destination_
cidr_ strblock - The destination CIDR block of the outbound traffic.
- destination_
port_ strrange - The destination port range of the outbound traffic.
- id str
- The ID of the Traffic Mirror Filter Egress Rule.
- priority int
- The priority of the outbound 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 outbound 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 outbound traffic.
- source_
port_ strrange - The source port range of the outbound 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 outbound rule.
- traffic_
mirror_ strfilter_ rule_ id - The first ID of the resource.
- destination
Cidr StringBlock - The destination CIDR block of the outbound traffic.
- destination
Port StringRange - The destination port range of the outbound traffic.
- id String
- The ID of the Traffic Mirror Filter Egress Rule.
- priority Number
- The priority of the outbound 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 outbound 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 outbound traffic.
- source
Port StringRange - The source port range of the outbound 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 outbound 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.