1. Packages
  2. Equinix
  3. API Docs
  4. fabric
  5. getConnectionRouteFilter
Equinix v0.19.0 published on Thursday, Oct 24, 2024 by Equinix

equinix.fabric.getConnectionRouteFilter

Explore with Pulumi AI

equinix logo
Equinix v0.19.0 published on Thursday, Oct 24, 2024 by Equinix

    Fabric V4 API compatible data resource that allow user to fetch route filter policy attachment to a fabric connection

    Additional Documentation:

    • Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-route-filters.htm
    • API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#route-filter-rules

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@pulumi/equinix";
    
    const attachedPolicy = equinix.fabric.getConnectionRouteFilter({
        connectionId: "<connection_uuid>",
        routeFilterId: "<route_filter_uuid>",
    });
    export const connectionRouteFilterId = attachedPolicy.then(attachedPolicy => attachedPolicy.id);
    export const connectionRouteFilterConnectionId = attachedPolicy.then(attachedPolicy => attachedPolicy.connectionId);
    export const connectionRouteFilterDirection = attachedPolicy.then(attachedPolicy => attachedPolicy.direction);
    export const connectionRouteFilterType = attachedPolicy.then(attachedPolicy => attachedPolicy.type);
    export const connectionRouteFilterAttachmentStatus = attachedPolicy.then(attachedPolicy => attachedPolicy.attachmentStatus);
    
    import pulumi
    import pulumi_equinix as equinix
    
    attached_policy = equinix.fabric.get_connection_route_filter(connection_id="<connection_uuid>",
        route_filter_id="<route_filter_uuid>")
    pulumi.export("connectionRouteFilterId", attached_policy.id)
    pulumi.export("connectionRouteFilterConnectionId", attached_policy.connection_id)
    pulumi.export("connectionRouteFilterDirection", attached_policy.direction)
    pulumi.export("connectionRouteFilterType", attached_policy.type)
    pulumi.export("connectionRouteFilterAttachmentStatus", attached_policy.attachment_status)
    
    package main
    
    import (
    	"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		attachedPolicy, err := fabric.LookupConnectionRouteFilter(ctx, &fabric.LookupConnectionRouteFilterArgs{
    			ConnectionId:  "<connection_uuid>",
    			RouteFilterId: "<route_filter_uuid>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("connectionRouteFilterId", attachedPolicy.Id)
    		ctx.Export("connectionRouteFilterConnectionId", attachedPolicy.ConnectionId)
    		ctx.Export("connectionRouteFilterDirection", attachedPolicy.Direction)
    		ctx.Export("connectionRouteFilterType", attachedPolicy.Type)
    		ctx.Export("connectionRouteFilterAttachmentStatus", attachedPolicy.AttachmentStatus)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var attachedPolicy = Equinix.Fabric.GetConnectionRouteFilter.Invoke(new()
        {
            ConnectionId = "<connection_uuid>",
            RouteFilterId = "<route_filter_uuid>",
        });
    
        return new Dictionary<string, object?>
        {
            ["connectionRouteFilterId"] = attachedPolicy.Apply(getConnectionRouteFilterResult => getConnectionRouteFilterResult.Id),
            ["connectionRouteFilterConnectionId"] = attachedPolicy.Apply(getConnectionRouteFilterResult => getConnectionRouteFilterResult.ConnectionId),
            ["connectionRouteFilterDirection"] = attachedPolicy.Apply(getConnectionRouteFilterResult => getConnectionRouteFilterResult.Direction),
            ["connectionRouteFilterType"] = attachedPolicy.Apply(getConnectionRouteFilterResult => getConnectionRouteFilterResult.Type),
            ["connectionRouteFilterAttachmentStatus"] = attachedPolicy.Apply(getConnectionRouteFilterResult => getConnectionRouteFilterResult.AttachmentStatus),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.equinix.fabric.FabricFunctions;
    import com.pulumi.equinix.fabric.inputs.GetConnectionRouteFilterArgs;
    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 attachedPolicy = FabricFunctions.getConnectionRouteFilter(GetConnectionRouteFilterArgs.builder()
                .connectionId("<connection_uuid>")
                .routeFilterId("<route_filter_uuid>")
                .build());
    
            ctx.export("connectionRouteFilterId", attachedPolicy.applyValue(getConnectionRouteFilterResult -> getConnectionRouteFilterResult.id()));
            ctx.export("connectionRouteFilterConnectionId", attachedPolicy.applyValue(getConnectionRouteFilterResult -> getConnectionRouteFilterResult.connectionId()));
            ctx.export("connectionRouteFilterDirection", attachedPolicy.applyValue(getConnectionRouteFilterResult -> getConnectionRouteFilterResult.direction()));
            ctx.export("connectionRouteFilterType", attachedPolicy.applyValue(getConnectionRouteFilterResult -> getConnectionRouteFilterResult.type()));
            ctx.export("connectionRouteFilterAttachmentStatus", attachedPolicy.applyValue(getConnectionRouteFilterResult -> getConnectionRouteFilterResult.attachmentStatus()));
        }
    }
    
    variables:
      attachedPolicy:
        fn::invoke:
          Function: equinix:fabric:getConnectionRouteFilter
          Arguments:
            connectionId: <connection_uuid>
            routeFilterId: <route_filter_uuid>
    outputs:
      connectionRouteFilterId: ${attachedPolicy.id}
      connectionRouteFilterConnectionId: ${attachedPolicy.connectionId}
      connectionRouteFilterDirection: ${attachedPolicy.direction}
      connectionRouteFilterType: ${attachedPolicy.type}
      connectionRouteFilterAttachmentStatus: ${attachedPolicy.attachmentStatus}
    

    Using getConnectionRouteFilter

    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 getConnectionRouteFilter(args: GetConnectionRouteFilterArgs, opts?: InvokeOptions): Promise<GetConnectionRouteFilterResult>
    function getConnectionRouteFilterOutput(args: GetConnectionRouteFilterOutputArgs, opts?: InvokeOptions): Output<GetConnectionRouteFilterResult>
    def get_connection_route_filter(connection_id: Optional[str] = None,
                                    route_filter_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetConnectionRouteFilterResult
    def get_connection_route_filter_output(connection_id: Optional[pulumi.Input[str]] = None,
                                    route_filter_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetConnectionRouteFilterResult]
    func LookupConnectionRouteFilter(ctx *Context, args *LookupConnectionRouteFilterArgs, opts ...InvokeOption) (*LookupConnectionRouteFilterResult, error)
    func LookupConnectionRouteFilterOutput(ctx *Context, args *LookupConnectionRouteFilterOutputArgs, opts ...InvokeOption) LookupConnectionRouteFilterResultOutput

    > Note: This function is named LookupConnectionRouteFilter in the Go SDK.

    public static class GetConnectionRouteFilter 
    {
        public static Task<GetConnectionRouteFilterResult> InvokeAsync(GetConnectionRouteFilterArgs args, InvokeOptions? opts = null)
        public static Output<GetConnectionRouteFilterResult> Invoke(GetConnectionRouteFilterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetConnectionRouteFilterResult> getConnectionRouteFilter(GetConnectionRouteFilterArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: equinix:fabric/getConnectionRouteFilter:getConnectionRouteFilter
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ConnectionId string
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    RouteFilterId string
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    ConnectionId string
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    RouteFilterId string
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    connectionId String
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    routeFilterId String
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    connectionId string
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    routeFilterId string
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    connection_id str
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    route_filter_id str
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    connectionId String
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    routeFilterId String
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection

    getConnectionRouteFilter Result

    The following output properties are available:

    AttachmentStatus string
    Status of the Route Filter Policy attachment lifecycle
    ConnectionId string
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    Direction string
    Direction of the filtering of the attached Route Filter Policy
    Href string
    URI to the attached Route Filter Policy on the Connection
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteFilterId string
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    Type string
    Route Filter Type. One of [ "BGPIPv4PREFIXFILTER", "BGPIPv6PREFIXFILTER" ]
    Uuid string
    Equinix Assigned ID for Route Filter Policy
    AttachmentStatus string
    Status of the Route Filter Policy attachment lifecycle
    ConnectionId string
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    Direction string
    Direction of the filtering of the attached Route Filter Policy
    Href string
    URI to the attached Route Filter Policy on the Connection
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteFilterId string
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    Type string
    Route Filter Type. One of [ "BGPIPv4PREFIXFILTER", "BGPIPv6PREFIXFILTER" ]
    Uuid string
    Equinix Assigned ID for Route Filter Policy
    attachmentStatus String
    Status of the Route Filter Policy attachment lifecycle
    connectionId String
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    direction String
    Direction of the filtering of the attached Route Filter Policy
    href String
    URI to the attached Route Filter Policy on the Connection
    id String
    The provider-assigned unique ID for this managed resource.
    routeFilterId String
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    type String
    Route Filter Type. One of [ "BGPIPv4PREFIXFILTER", "BGPIPv6PREFIXFILTER" ]
    uuid String
    Equinix Assigned ID for Route Filter Policy
    attachmentStatus string
    Status of the Route Filter Policy attachment lifecycle
    connectionId string
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    direction string
    Direction of the filtering of the attached Route Filter Policy
    href string
    URI to the attached Route Filter Policy on the Connection
    id string
    The provider-assigned unique ID for this managed resource.
    routeFilterId string
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    type string
    Route Filter Type. One of [ "BGPIPv4PREFIXFILTER", "BGPIPv6PREFIXFILTER" ]
    uuid string
    Equinix Assigned ID for Route Filter Policy
    attachment_status str
    Status of the Route Filter Policy attachment lifecycle
    connection_id str
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    direction str
    Direction of the filtering of the attached Route Filter Policy
    href str
    URI to the attached Route Filter Policy on the Connection
    id str
    The provider-assigned unique ID for this managed resource.
    route_filter_id str
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    type str
    Route Filter Type. One of [ "BGPIPv4PREFIXFILTER", "BGPIPv6PREFIXFILTER" ]
    uuid str
    Equinix Assigned ID for Route Filter Policy
    attachmentStatus String
    Status of the Route Filter Policy attachment lifecycle
    connectionId String
    Equinix Assigned UUID of the Equinix Connection to attach the Route Filter Policy to
    direction String
    Direction of the filtering of the attached Route Filter Policy
    href String
    URI to the attached Route Filter Policy on the Connection
    id String
    The provider-assigned unique ID for this managed resource.
    routeFilterId String
    Equinix Assigned UUID of the Route Filter Policy to attach to the Equinix Connection
    type String
    Route Filter Type. One of [ "BGPIPv4PREFIXFILTER", "BGPIPv6PREFIXFILTER" ]
    uuid String
    Equinix Assigned ID for Route Filter Policy

    Package Details

    Repository
    equinix equinix/pulumi-equinix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the equinix Terraform Provider.
    equinix logo
    Equinix v0.19.0 published on Thursday, Oct 24, 2024 by Equinix