1. Packages
  2. ElasticCloud (EC)
  3. API Docs
  4. getTrafficFilter
ElasticCloud (EC) v0.8.0 published on Thursday, Apr 4, 2024 by Pulumi

ec.getTrafficFilter

Explore with Pulumi AI

ec logo
ElasticCloud (EC) v0.8.0 published on Thursday, Apr 4, 2024 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",
    });
    
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ec:index/getTrafficFilter:getTrafficFilter
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of the ruleset
    Name string
    The name of the ruleset.
    Region string
    The ruleset can be attached only to deployments in the specific region.
    Id string
    The ID of the ruleset
    Name string
    The name of the ruleset.
    Region string
    The ruleset can be attached only to deployments in the specific region.
    id String
    The ID of the ruleset
    name String
    The name of the ruleset.
    region String
    The ruleset can be attached only to deployments in the specific region.
    id string
    The ID of the ruleset
    name string
    The name of the ruleset.
    region string
    The ruleset can be attached only to deployments in the specific region.
    id str
    The ID of the ruleset
    name str
    The name of the ruleset.
    region str
    The ruleset can be attached only to deployments in the specific region.
    id String
    The ID of the ruleset
    name String
    The name of the ruleset.
    region String
    The ruleset can be attached only to deployments in the specific 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 string
    The description of the ruleset.
    Id string
    The ID of the ruleset
    IncludeByDefault bool
    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.ElasticCloud.Inputs.GetTrafficFilterRulesetRule>
    An individual rule
    Description string
    The description of the ruleset.
    Id string
    The ID of the ruleset
    IncludeByDefault bool
    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 []GetTrafficFilterRulesetRule
    An individual rule
    description String
    The description of the ruleset.
    id String
    The ID of the ruleset
    includeByDefault Boolean
    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<GetTrafficFilterRulesetRule>
    An individual rule
    description string
    The description of the ruleset.
    id string
    The ID of the ruleset
    includeByDefault boolean
    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 GetTrafficFilterRulesetRule[]
    An individual rule
    description str
    The description of the ruleset.
    id str
    The ID of the ruleset
    include_by_default bool
    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[GetTrafficFilterRulesetRule]
    An individual rule
    description String
    The description of the ruleset.
    id String
    The ID of the ruleset
    includeByDefault Boolean
    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 ruleset.
    Id string
    The ID of the ruleset
    Source string
    Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
    Description string
    The description of the ruleset.
    Id string
    The ID of the ruleset
    Source string
    Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
    description String
    The description of the ruleset.
    id String
    The ID of the ruleset
    source String
    Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
    description string
    The description of the ruleset.
    id string
    The ID of the ruleset
    source string
    Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
    description str
    The description of the ruleset.
    id str
    The ID of the ruleset
    source str
    Allowed traffic filter source: IP address, CIDR mask, or VPC endpoint ID.
    description String
    The description of the ruleset.
    id String
    The ID of the ruleset
    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 ec Terraform Provider.
    ec logo
    ElasticCloud (EC) v0.8.0 published on Thursday, Apr 4, 2024 by Pulumi