ElasticCloud (EC) v0.10.6 published on Tuesday, Apr 29, 2025 by Pulumi
ec.getTrafficFilter
Explore with Pulumi AI
Use this data source to filter for an existing traffic filter that has been created via one of the provided filters.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ec from "@pulumi/ec";
const name = ec.getTrafficFilter({
    name: "example-filter",
});
const id = ec.getTrafficFilter({
    id: "41d275439f884ce89359039e53eac516",
});
const region = ec.getTrafficFilter({
    region: "us-east-1",
});
import pulumi
import pulumi_ec as ec
name = ec.get_traffic_filter(name="example-filter")
id = ec.get_traffic_filter(id="41d275439f884ce89359039e53eac516")
region = ec.get_traffic_filter(region="us-east-1")
package main
import (
	"github.com/pulumi/pulumi-ec/sdk/go/ec"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec.GetTrafficFilter(ctx, &ec.GetTrafficFilterArgs{
			Name: pulumi.StringRef("example-filter"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = ec.GetTrafficFilter(ctx, &ec.GetTrafficFilterArgs{
			Id: pulumi.StringRef("41d275439f884ce89359039e53eac516"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = ec.GetTrafficFilter(ctx, &ec.GetTrafficFilterArgs{
			Region: pulumi.StringRef("us-east-1"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ElasticCloud = Pulumi.ElasticCloud;
return await Deployment.RunAsync(() => 
{
    var name = ElasticCloud.GetTrafficFilter.Invoke(new()
    {
        Name = "example-filter",
    });
    var id = ElasticCloud.GetTrafficFilter.Invoke(new()
    {
        Id = "41d275439f884ce89359039e53eac516",
    });
    var region = ElasticCloud.GetTrafficFilter.Invoke(new()
    {
        Region = "us-east-1",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ec.EcFunctions;
import com.pulumi.ec.inputs.GetTrafficFilterArgs;
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 name = EcFunctions.getTrafficFilter(GetTrafficFilterArgs.builder()
            .name("example-filter")
            .build());
        final var id = EcFunctions.getTrafficFilter(GetTrafficFilterArgs.builder()
            .id("41d275439f884ce89359039e53eac516")
            .build());
        final var region = EcFunctions.getTrafficFilter(GetTrafficFilterArgs.builder()
            .region("us-east-1")
            .build());
    }
}
variables:
  name:
    fn::invoke:
      function: ec:getTrafficFilter
      arguments:
        name: example-filter
  id:
    fn::invoke:
      function: ec:getTrafficFilter
      arguments:
        id: 41d275439f884ce89359039e53eac516
  region:
    fn::invoke:
      function: ec:getTrafficFilter
      arguments:
        region: us-east-1
Using getTrafficFilter
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 getTrafficFilter(args: GetTrafficFilterArgs, opts?: InvokeOptions): Promise<GetTrafficFilterResult>
function getTrafficFilterOutput(args: GetTrafficFilterOutputArgs, opts?: InvokeOptions): Output<GetTrafficFilterResult>def get_traffic_filter(id: Optional[str] = None,
                       name: Optional[str] = None,
                       region: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetTrafficFilterResult
def get_traffic_filter_output(id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       region: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetTrafficFilterResult]func GetTrafficFilter(ctx *Context, args *GetTrafficFilterArgs, opts ...InvokeOption) (*GetTrafficFilterResult, error)
func GetTrafficFilterOutput(ctx *Context, args *GetTrafficFilterOutputArgs, opts ...InvokeOption) GetTrafficFilterResultOutput> Note: This function is named GetTrafficFilter in the Go SDK.
public static class GetTrafficFilter 
{
    public static Task<GetTrafficFilterResult> InvokeAsync(GetTrafficFilterArgs args, InvokeOptions? opts = null)
    public static Output<GetTrafficFilterResult> Invoke(GetTrafficFilterInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTrafficFilterResult> getTrafficFilter(GetTrafficFilterArgs args, InvokeOptions options)
public static Output<GetTrafficFilterResult> getTrafficFilter(GetTrafficFilterArgs args, InvokeOptions options)
fn::invoke:
  function: ec:index/getTrafficFilter:getTrafficFilter
  arguments:
    # arguments dictionaryThe following arguments are supported:
getTrafficFilter Result
The following output properties are available:
- Rulesets
List<Pulumi.Elastic Cloud. Outputs. Get Traffic Filter Ruleset> 
- An individual ruleset
- Id string
- The id of the traffic filter to select.
- Name string
- The exact name of the traffic filter to select.
- Region string
- Region where the traffic filter is. For Elastic Cloud Enterprise (ECE) installations, use ece-region
- Rulesets
[]GetTraffic Filter Ruleset 
- An individual ruleset
- Id string
- The id of the traffic filter to select.
- Name string
- The exact name of the traffic filter to select.
- Region string
- Region where the traffic filter is. For Elastic Cloud Enterprise (ECE) installations, use ece-region
- rulesets
List<GetTraffic Filter Ruleset> 
- An individual ruleset
- id String
- The id of the traffic filter to select.
- name String
- The exact name of the traffic filter to select.
- region String
- Region where the traffic filter is. For Elastic Cloud Enterprise (ECE) installations, use ece-region
- rulesets
GetTraffic Filter Ruleset[] 
- An individual ruleset
- id string
- The id of the traffic filter to select.
- name string
- The exact name of the traffic filter to select.
- region string
- Region where the traffic filter is. For Elastic Cloud Enterprise (ECE) installations, use ece-region
- rulesets
Sequence[GetTraffic Filter Ruleset] 
- An individual ruleset
- id str
- The id of the traffic filter to select.
- name str
- The exact name of the traffic filter to select.
- region str
- Region where the traffic filter is. For Elastic Cloud Enterprise (ECE) installations, use ece-region
- rulesets List<Property Map>
- An individual ruleset
- id String
- The id of the traffic filter to select.
- name String
- The exact name of the traffic filter to select.
- region String
- Region where the traffic filter is. For Elastic Cloud Enterprise (ECE) installations, use ece-region
Supporting Types
GetTrafficFilterRuleset   
- Description string
- The description of the ruleset.
- Id string
- The ID of the ruleset
- IncludeBy boolDefault 
- Should the ruleset be automatically included in the new deployments.
- Name string
- The name of the ruleset.
- Region string
- The ruleset can be attached only to deployments in the specific region.
- Rules
List<Pulumi.Elastic Cloud. Inputs. Get Traffic Filter Ruleset Rule> 
- An individual rule
- Description string
- The description of the ruleset.
- Id string
- The ID of the ruleset
- IncludeBy boolDefault 
- Should the ruleset be automatically included in the new deployments.
- Name string
- The name of the ruleset.
- Region string
- The ruleset can be attached only to deployments in the specific region.
- Rules
[]GetTraffic Filter Ruleset Rule 
- An individual rule
- description String
- The description of the ruleset.
- id String
- The ID of the ruleset
- includeBy BooleanDefault 
- Should the ruleset be automatically included in the new deployments.
- name String
- The name of the ruleset.
- region String
- The ruleset can be attached only to deployments in the specific region.
- rules
List<GetTraffic Filter Ruleset Rule> 
- An individual rule
- description string
- The description of the ruleset.
- id string
- The ID of the ruleset
- includeBy booleanDefault 
- Should the ruleset be automatically included in the new deployments.
- name string
- The name of the ruleset.
- region string
- The ruleset can be attached only to deployments in the specific region.
- rules
GetTraffic Filter Ruleset Rule[] 
- An individual rule
- description str
- The description of the ruleset.
- id str
- The ID of the ruleset
- include_by_ booldefault 
- Should the ruleset be automatically included in the new deployments.
- name str
- The name of the ruleset.
- region str
- The ruleset can be attached only to deployments in the specific region.
- rules
Sequence[GetTraffic Filter Ruleset Rule] 
- An individual rule
- description String
- The description of the ruleset.
- id String
- The ID of the ruleset
- includeBy BooleanDefault 
- Should the ruleset be automatically included in the new deployments.
- name String
- The name of the ruleset.
- region String
- The ruleset can be attached only to deployments in the specific region.
- rules List<Property Map>
- An individual rule
GetTrafficFilterRulesetRule    
- Description string
- The description of the rule.
- Id string
- The ID of the rule
- Source string
- Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
- Description string
- The description of the rule.
- Id string
- The ID of the rule
- Source string
- Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
- description String
- The description of the rule.
- id String
- The ID of the rule
- source String
- Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
- description string
- The description of the rule.
- id string
- The ID of the rule
- source string
- Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
- description str
- The description of the rule.
- id str
- The ID of the rule
- source str
- Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
- description String
- The description of the rule.
- id String
- The ID of the rule
- source String
- Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
Package Details
- Repository
- ec pulumi/pulumi-ec
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ecTerraform Provider.