1. Packages
  2. ElasticCloud (EC) Provider
  3. API Docs
  4. getTrafficFilter
ElasticCloud (EC) v0.10.5 published on Wednesday, Feb 12, 2025 by Pulumi

ec.getTrafficFilter

Explore with Pulumi AI

ElasticCloud (EC) v0.10.5 published on Wednesday, Feb 12, 2025 by Pulumi

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

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>
Copy
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]
Copy
func GetTrafficFilter(ctx *Context, args *GetTrafficFilterArgs, opts ...InvokeOption) (*GetTrafficFilterResult, error)
func GetTrafficFilterOutput(ctx *Context, args *GetTrafficFilterOutputArgs, opts ...InvokeOption) GetTrafficFilterResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetTrafficFilterResult> getTrafficFilter(GetTrafficFilterArgs args, InvokeOptions options)
public static Output<GetTrafficFilterResult> getTrafficFilter(GetTrafficFilterArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ec:index/getTrafficFilter:getTrafficFilter
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

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
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
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
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
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
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

getTrafficFilter Result

The following output properties are available:

Rulesets List<Pulumi.ElasticCloud.Outputs.GetTrafficFilterRuleset>
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 []GetTrafficFilterRuleset
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<GetTrafficFilterRuleset>
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 GetTrafficFilterRuleset[]
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[GetTrafficFilterRuleset]
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 This property is required. string
The description of the ruleset.
Id This property is required. string
The ID of the ruleset
IncludeByDefault This property is required. bool
Should the ruleset be automatically included in the new deployments.
Name This property is required. string
The name of the ruleset.
Region This property is required. string
The ruleset can be attached only to deployments in the specific region.
Rules This property is required. List<Pulumi.ElasticCloud.Inputs.GetTrafficFilterRulesetRule>
An individual rule
Description This property is required. string
The description of the ruleset.
Id This property is required. string
The ID of the ruleset
IncludeByDefault This property is required. bool
Should the ruleset be automatically included in the new deployments.
Name This property is required. string
The name of the ruleset.
Region This property is required. string
The ruleset can be attached only to deployments in the specific region.
Rules This property is required. []GetTrafficFilterRulesetRule
An individual rule
description This property is required. String
The description of the ruleset.
id This property is required. String
The ID of the ruleset
includeByDefault This property is required. Boolean
Should the ruleset be automatically included in the new deployments.
name This property is required. String
The name of the ruleset.
region This property is required. String
The ruleset can be attached only to deployments in the specific region.
rules This property is required. List<GetTrafficFilterRulesetRule>
An individual rule
description This property is required. string
The description of the ruleset.
id This property is required. string
The ID of the ruleset
includeByDefault This property is required. boolean
Should the ruleset be automatically included in the new deployments.
name This property is required. string
The name of the ruleset.
region This property is required. string
The ruleset can be attached only to deployments in the specific region.
rules This property is required. GetTrafficFilterRulesetRule[]
An individual rule
description This property is required. str
The description of the ruleset.
id This property is required. str
The ID of the ruleset
include_by_default This property is required. bool
Should the ruleset be automatically included in the new deployments.
name This property is required. str
The name of the ruleset.
region This property is required. str
The ruleset can be attached only to deployments in the specific region.
rules This property is required. Sequence[GetTrafficFilterRulesetRule]
An individual rule
description This property is required. String
The description of the ruleset.
id This property is required. String
The ID of the ruleset
includeByDefault This property is required. Boolean
Should the ruleset be automatically included in the new deployments.
name This property is required. String
The name of the ruleset.
region This property is required. String
The ruleset can be attached only to deployments in the specific region.
rules This property is required. List<Property Map>
An individual rule

GetTrafficFilterRulesetRule

Description This property is required. string
The description of the rule.
Id This property is required. string
The ID of the rule
Source This property is required. string
Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
Description This property is required. string
The description of the rule.
Id This property is required. string
The ID of the rule
Source This property is required. string
Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
description This property is required. String
The description of the rule.
id This property is required. String
The ID of the rule
source This property is required. String
Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
description This property is required. string
The description of the rule.
id This property is required. string
The ID of the rule
source This property is required. string
Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
description This property is required. str
The description of the rule.
id This property is required. str
The ID of the rule
source This property is required. str
Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
description This property is required. String
The description of the rule.
id This property is required. String
The ID of the rule
source This property is required. 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 ec Terraform Provider.
ElasticCloud (EC) v0.10.5 published on Wednesday, Feb 12, 2025 by Pulumi