1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. expressconnect
  5. getPhysicalConnections
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.expressconnect.getPhysicalConnections

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides the Express Connect Physical Connections of the current Alibaba Cloud user.

    NOTE: Available in v1.132.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.expressconnect.getPhysicalConnections({
        ids: ["pc-2345678"],
    });
    export const expressConnectPhysicalConnectionId1 = ids.then(ids => ids.connections?.[0]?.id);
    const nameRegex = alicloud.expressconnect.getPhysicalConnections({
        nameRegex: "^my-PhysicalConnection",
    });
    export const expressConnectPhysicalConnectionId2 = nameRegex.then(nameRegex => nameRegex.connections?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.expressconnect.get_physical_connections(ids=["pc-2345678"])
    pulumi.export("expressConnectPhysicalConnectionId1", ids.connections[0].id)
    name_regex = alicloud.expressconnect.get_physical_connections(name_regex="^my-PhysicalConnection")
    pulumi.export("expressConnectPhysicalConnectionId2", name_regex.connections[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/expressconnect"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := expressconnect.GetPhysicalConnections(ctx, &expressconnect.GetPhysicalConnectionsArgs{
    			Ids: []string{
    				"pc-2345678",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("expressConnectPhysicalConnectionId1", ids.Connections[0].Id)
    		nameRegex, err := expressconnect.GetPhysicalConnections(ctx, &expressconnect.GetPhysicalConnectionsArgs{
    			NameRegex: pulumi.StringRef("^my-PhysicalConnection"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("expressConnectPhysicalConnectionId2", nameRegex.Connections[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke(new()
        {
            Ids = new[]
            {
                "pc-2345678",
            },
        });
    
        var nameRegex = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke(new()
        {
            NameRegex = "^my-PhysicalConnection",
        });
    
        return new Dictionary<string, object?>
        {
            ["expressConnectPhysicalConnectionId1"] = ids.Apply(getPhysicalConnectionsResult => getPhysicalConnectionsResult.Connections[0]?.Id),
            ["expressConnectPhysicalConnectionId2"] = nameRegex.Apply(getPhysicalConnectionsResult => getPhysicalConnectionsResult.Connections[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.expressconnect.ExpressconnectFunctions;
    import com.pulumi.alicloud.expressconnect.inputs.GetPhysicalConnectionsArgs;
    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 = ExpressconnectFunctions.getPhysicalConnections(GetPhysicalConnectionsArgs.builder()
                .ids("pc-2345678")
                .build());
    
            ctx.export("expressConnectPhysicalConnectionId1", ids.applyValue(getPhysicalConnectionsResult -> getPhysicalConnectionsResult.connections()[0].id()));
            final var nameRegex = ExpressconnectFunctions.getPhysicalConnections(GetPhysicalConnectionsArgs.builder()
                .nameRegex("^my-PhysicalConnection")
                .build());
    
            ctx.export("expressConnectPhysicalConnectionId2", nameRegex.applyValue(getPhysicalConnectionsResult -> getPhysicalConnectionsResult.connections()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:expressconnect:getPhysicalConnections
          Arguments:
            ids:
              - pc-2345678
      nameRegex:
        fn::invoke:
          Function: alicloud:expressconnect:getPhysicalConnections
          Arguments:
            nameRegex: ^my-PhysicalConnection
    outputs:
      expressConnectPhysicalConnectionId1: ${ids.connections[0].id}
      expressConnectPhysicalConnectionId2: ${nameRegex.connections[0].id}
    

    Using getPhysicalConnections

    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 getPhysicalConnections(args: GetPhysicalConnectionsArgs, opts?: InvokeOptions): Promise<GetPhysicalConnectionsResult>
    function getPhysicalConnectionsOutput(args: GetPhysicalConnectionsOutputArgs, opts?: InvokeOptions): Output<GetPhysicalConnectionsResult>
    def get_physical_connections(ids: Optional[Sequence[str]] = None,
                                 include_reservation_data: Optional[bool] = None,
                                 name_regex: Optional[str] = None,
                                 output_file: Optional[str] = None,
                                 status: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetPhysicalConnectionsResult
    def get_physical_connections_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                 include_reservation_data: Optional[pulumi.Input[bool]] = None,
                                 name_regex: Optional[pulumi.Input[str]] = None,
                                 output_file: Optional[pulumi.Input[str]] = None,
                                 status: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetPhysicalConnectionsResult]
    func GetPhysicalConnections(ctx *Context, args *GetPhysicalConnectionsArgs, opts ...InvokeOption) (*GetPhysicalConnectionsResult, error)
    func GetPhysicalConnectionsOutput(ctx *Context, args *GetPhysicalConnectionsOutputArgs, opts ...InvokeOption) GetPhysicalConnectionsResultOutput

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

    public static class GetPhysicalConnections 
    {
        public static Task<GetPhysicalConnectionsResult> InvokeAsync(GetPhysicalConnectionsArgs args, InvokeOptions? opts = null)
        public static Output<GetPhysicalConnectionsResult> Invoke(GetPhysicalConnectionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPhysicalConnectionsResult> getPhysicalConnections(GetPhysicalConnectionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:expressconnect/getPhysicalConnections:getPhysicalConnections
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Physical Connection IDs.
    IncludeReservationData bool
    The include reservation data.
    NameRegex string
    A regex string to filter results by Physical Connection name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    Resources on Behalf of a State of the Resource Attribute Field. Valid values: Canceled, Enabled, Terminated.
    Ids []string
    A list of Physical Connection IDs.
    IncludeReservationData bool
    The include reservation data.
    NameRegex string
    A regex string to filter results by Physical Connection name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    Resources on Behalf of a State of the Resource Attribute Field. Valid values: Canceled, Enabled, Terminated.
    ids List<String>
    A list of Physical Connection IDs.
    includeReservationData Boolean
    The include reservation data.
    nameRegex String
    A regex string to filter results by Physical Connection name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    Resources on Behalf of a State of the Resource Attribute Field. Valid values: Canceled, Enabled, Terminated.
    ids string[]
    A list of Physical Connection IDs.
    includeReservationData boolean
    The include reservation data.
    nameRegex string
    A regex string to filter results by Physical Connection name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    Resources on Behalf of a State of the Resource Attribute Field. Valid values: Canceled, Enabled, Terminated.
    ids Sequence[str]
    A list of Physical Connection IDs.
    include_reservation_data bool
    The include reservation data.
    name_regex str
    A regex string to filter results by Physical Connection name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    Resources on Behalf of a State of the Resource Attribute Field. Valid values: Canceled, Enabled, Terminated.
    ids List<String>
    A list of Physical Connection IDs.
    includeReservationData Boolean
    The include reservation data.
    nameRegex String
    A regex string to filter results by Physical Connection name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    Resources on Behalf of a State of the Resource Attribute Field. Valid values: Canceled, Enabled, Terminated.

    getPhysicalConnections Result

    The following output properties are available:

    Connections List<Pulumi.AliCloud.ExpressConnect.Outputs.GetPhysicalConnectionsConnection>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    IncludeReservationData bool
    NameRegex string
    OutputFile string
    Status string
    Connections []GetPhysicalConnectionsConnection
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    IncludeReservationData bool
    NameRegex string
    OutputFile string
    Status string
    connections List<GetPhysicalConnectionsConnection>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    includeReservationData Boolean
    nameRegex String
    outputFile String
    status String
    connections GetPhysicalConnectionsConnection[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    includeReservationData boolean
    nameRegex string
    outputFile string
    status string
    connections Sequence[GetPhysicalConnectionsConnection]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    include_reservation_data bool
    name_regex str
    output_file str
    status str
    connections List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    includeReservationData Boolean
    nameRegex String
    outputFile String
    status String

    Supporting Types

    GetPhysicalConnectionsConnection

    AccessPointId string
    The Physical Leased Line Access Point ID.
    AdLocation string
    To Connect a Device Physical Location.
    Bandwidth string
    On the Bandwidth of the ECC Service and Physical Connection.
    BusinessStatus string
    The Physical Connection to Which the Payment Status: Normal, financiallocked, securitylocked.
    CircuitCode string
    Operators for Physical Connection Circuit Provided Coding.
    CreateTime string
    The Representative of the Creation Time Resources Attribute Field.
    Description string
    The Physical Connection to Which the Description.
    EnabledTime string
    The Physical Connection to Which the Activation Time.
    EndTime string
    The Expiration Time.
    HasReservationData string
    HasReservationData.
    Id string
    The ID of the Physical Connection.
    LineOperator string
    Provides Access to the Physical Line Operator Value CT: China Telecom, CU: China Unicom, CM: china Mobile, CO: Other Chinese, Equinix:Equinix, Other: Other Overseas.
    LoaStatus string
    Loa State.
    PaymentType string
    on Behalf of the Pay-as-You-Type of Resource Attribute Field.
    PeerLocation string
    and an on-Premises Data Center Location.
    PhysicalConnectionId string
    on Behalf of the Resource Level Id of the Resources Property Fields.
    PhysicalConnectionName string
    on Behalf of the Resource Name of the Resources-Attribute Field.
    PortNumber string
    To Connect a Device Port: The Port Number of.
    PortType string
    The Physical Leased Line Access Port Type Value 100Base-T: Fast Electrical Ports, 1000Base-T (the Default): gigabit Electrical Ports, 1000Base-LX: Gigabit Singlemode Optical Ports (10Km), 10GBase-T: Gigabit Electrical Port, 10GBase-LR: Gigabit Singlemode Optical Ports (10Km).
    RedundantPhysicalConnectionId string
    Redundant Physical Connection to Which the ID.
    ReservationActiveTime string
    The Renewal of the Entry into Force of the Time.
    ReservationInternetChargeType string
    Renewal Type.
    ReservationOrderType string
    Renewal Order Type.
    Spec string
    The Physical Connection to Which the Specifications.
    Status string
    Resources on Behalf of a State of the Resource Attribute Field.
    Type string
    Physical Private Line of Type. Default Value: VPC.
    AccessPointId string
    The Physical Leased Line Access Point ID.
    AdLocation string
    To Connect a Device Physical Location.
    Bandwidth string
    On the Bandwidth of the ECC Service and Physical Connection.
    BusinessStatus string
    The Physical Connection to Which the Payment Status: Normal, financiallocked, securitylocked.
    CircuitCode string
    Operators for Physical Connection Circuit Provided Coding.
    CreateTime string
    The Representative of the Creation Time Resources Attribute Field.
    Description string
    The Physical Connection to Which the Description.
    EnabledTime string
    The Physical Connection to Which the Activation Time.
    EndTime string
    The Expiration Time.
    HasReservationData string
    HasReservationData.
    Id string
    The ID of the Physical Connection.
    LineOperator string
    Provides Access to the Physical Line Operator Value CT: China Telecom, CU: China Unicom, CM: china Mobile, CO: Other Chinese, Equinix:Equinix, Other: Other Overseas.
    LoaStatus string
    Loa State.
    PaymentType string
    on Behalf of the Pay-as-You-Type of Resource Attribute Field.
    PeerLocation string
    and an on-Premises Data Center Location.
    PhysicalConnectionId string
    on Behalf of the Resource Level Id of the Resources Property Fields.
    PhysicalConnectionName string
    on Behalf of the Resource Name of the Resources-Attribute Field.
    PortNumber string
    To Connect a Device Port: The Port Number of.
    PortType string
    The Physical Leased Line Access Port Type Value 100Base-T: Fast Electrical Ports, 1000Base-T (the Default): gigabit Electrical Ports, 1000Base-LX: Gigabit Singlemode Optical Ports (10Km), 10GBase-T: Gigabit Electrical Port, 10GBase-LR: Gigabit Singlemode Optical Ports (10Km).
    RedundantPhysicalConnectionId string
    Redundant Physical Connection to Which the ID.
    ReservationActiveTime string
    The Renewal of the Entry into Force of the Time.
    ReservationInternetChargeType string
    Renewal Type.
    ReservationOrderType string
    Renewal Order Type.
    Spec string
    The Physical Connection to Which the Specifications.
    Status string
    Resources on Behalf of a State of the Resource Attribute Field.
    Type string
    Physical Private Line of Type. Default Value: VPC.
    accessPointId String
    The Physical Leased Line Access Point ID.
    adLocation String
    To Connect a Device Physical Location.
    bandwidth String
    On the Bandwidth of the ECC Service and Physical Connection.
    businessStatus String
    The Physical Connection to Which the Payment Status: Normal, financiallocked, securitylocked.
    circuitCode String
    Operators for Physical Connection Circuit Provided Coding.
    createTime String
    The Representative of the Creation Time Resources Attribute Field.
    description String
    The Physical Connection to Which the Description.
    enabledTime String
    The Physical Connection to Which the Activation Time.
    endTime String
    The Expiration Time.
    hasReservationData String
    HasReservationData.
    id String
    The ID of the Physical Connection.
    lineOperator String
    Provides Access to the Physical Line Operator Value CT: China Telecom, CU: China Unicom, CM: china Mobile, CO: Other Chinese, Equinix:Equinix, Other: Other Overseas.
    loaStatus String
    Loa State.
    paymentType String
    on Behalf of the Pay-as-You-Type of Resource Attribute Field.
    peerLocation String
    and an on-Premises Data Center Location.
    physicalConnectionId String
    on Behalf of the Resource Level Id of the Resources Property Fields.
    physicalConnectionName String
    on Behalf of the Resource Name of the Resources-Attribute Field.
    portNumber String
    To Connect a Device Port: The Port Number of.
    portType String
    The Physical Leased Line Access Port Type Value 100Base-T: Fast Electrical Ports, 1000Base-T (the Default): gigabit Electrical Ports, 1000Base-LX: Gigabit Singlemode Optical Ports (10Km), 10GBase-T: Gigabit Electrical Port, 10GBase-LR: Gigabit Singlemode Optical Ports (10Km).
    redundantPhysicalConnectionId String
    Redundant Physical Connection to Which the ID.
    reservationActiveTime String
    The Renewal of the Entry into Force of the Time.
    reservationInternetChargeType String
    Renewal Type.
    reservationOrderType String
    Renewal Order Type.
    spec String
    The Physical Connection to Which the Specifications.
    status String
    Resources on Behalf of a State of the Resource Attribute Field.
    type String
    Physical Private Line of Type. Default Value: VPC.
    accessPointId string
    The Physical Leased Line Access Point ID.
    adLocation string
    To Connect a Device Physical Location.
    bandwidth string
    On the Bandwidth of the ECC Service and Physical Connection.
    businessStatus string
    The Physical Connection to Which the Payment Status: Normal, financiallocked, securitylocked.
    circuitCode string
    Operators for Physical Connection Circuit Provided Coding.
    createTime string
    The Representative of the Creation Time Resources Attribute Field.
    description string
    The Physical Connection to Which the Description.
    enabledTime string
    The Physical Connection to Which the Activation Time.
    endTime string
    The Expiration Time.
    hasReservationData string
    HasReservationData.
    id string
    The ID of the Physical Connection.
    lineOperator string
    Provides Access to the Physical Line Operator Value CT: China Telecom, CU: China Unicom, CM: china Mobile, CO: Other Chinese, Equinix:Equinix, Other: Other Overseas.
    loaStatus string
    Loa State.
    paymentType string
    on Behalf of the Pay-as-You-Type of Resource Attribute Field.
    peerLocation string
    and an on-Premises Data Center Location.
    physicalConnectionId string
    on Behalf of the Resource Level Id of the Resources Property Fields.
    physicalConnectionName string
    on Behalf of the Resource Name of the Resources-Attribute Field.
    portNumber string
    To Connect a Device Port: The Port Number of.
    portType string
    The Physical Leased Line Access Port Type Value 100Base-T: Fast Electrical Ports, 1000Base-T (the Default): gigabit Electrical Ports, 1000Base-LX: Gigabit Singlemode Optical Ports (10Km), 10GBase-T: Gigabit Electrical Port, 10GBase-LR: Gigabit Singlemode Optical Ports (10Km).
    redundantPhysicalConnectionId string
    Redundant Physical Connection to Which the ID.
    reservationActiveTime string
    The Renewal of the Entry into Force of the Time.
    reservationInternetChargeType string
    Renewal Type.
    reservationOrderType string
    Renewal Order Type.
    spec string
    The Physical Connection to Which the Specifications.
    status string
    Resources on Behalf of a State of the Resource Attribute Field.
    type string
    Physical Private Line of Type. Default Value: VPC.
    access_point_id str
    The Physical Leased Line Access Point ID.
    ad_location str
    To Connect a Device Physical Location.
    bandwidth str
    On the Bandwidth of the ECC Service and Physical Connection.
    business_status str
    The Physical Connection to Which the Payment Status: Normal, financiallocked, securitylocked.
    circuit_code str
    Operators for Physical Connection Circuit Provided Coding.
    create_time str
    The Representative of the Creation Time Resources Attribute Field.
    description str
    The Physical Connection to Which the Description.
    enabled_time str
    The Physical Connection to Which the Activation Time.
    end_time str
    The Expiration Time.
    has_reservation_data str
    HasReservationData.
    id str
    The ID of the Physical Connection.
    line_operator str
    Provides Access to the Physical Line Operator Value CT: China Telecom, CU: China Unicom, CM: china Mobile, CO: Other Chinese, Equinix:Equinix, Other: Other Overseas.
    loa_status str
    Loa State.
    payment_type str
    on Behalf of the Pay-as-You-Type of Resource Attribute Field.
    peer_location str
    and an on-Premises Data Center Location.
    physical_connection_id str
    on Behalf of the Resource Level Id of the Resources Property Fields.
    physical_connection_name str
    on Behalf of the Resource Name of the Resources-Attribute Field.
    port_number str
    To Connect a Device Port: The Port Number of.
    port_type str
    The Physical Leased Line Access Port Type Value 100Base-T: Fast Electrical Ports, 1000Base-T (the Default): gigabit Electrical Ports, 1000Base-LX: Gigabit Singlemode Optical Ports (10Km), 10GBase-T: Gigabit Electrical Port, 10GBase-LR: Gigabit Singlemode Optical Ports (10Km).
    redundant_physical_connection_id str
    Redundant Physical Connection to Which the ID.
    reservation_active_time str
    The Renewal of the Entry into Force of the Time.
    reservation_internet_charge_type str
    Renewal Type.
    reservation_order_type str
    Renewal Order Type.
    spec str
    The Physical Connection to Which the Specifications.
    status str
    Resources on Behalf of a State of the Resource Attribute Field.
    type str
    Physical Private Line of Type. Default Value: VPC.
    accessPointId String
    The Physical Leased Line Access Point ID.
    adLocation String
    To Connect a Device Physical Location.
    bandwidth String
    On the Bandwidth of the ECC Service and Physical Connection.
    businessStatus String
    The Physical Connection to Which the Payment Status: Normal, financiallocked, securitylocked.
    circuitCode String
    Operators for Physical Connection Circuit Provided Coding.
    createTime String
    The Representative of the Creation Time Resources Attribute Field.
    description String
    The Physical Connection to Which the Description.
    enabledTime String
    The Physical Connection to Which the Activation Time.
    endTime String
    The Expiration Time.
    hasReservationData String
    HasReservationData.
    id String
    The ID of the Physical Connection.
    lineOperator String
    Provides Access to the Physical Line Operator Value CT: China Telecom, CU: China Unicom, CM: china Mobile, CO: Other Chinese, Equinix:Equinix, Other: Other Overseas.
    loaStatus String
    Loa State.
    paymentType String
    on Behalf of the Pay-as-You-Type of Resource Attribute Field.
    peerLocation String
    and an on-Premises Data Center Location.
    physicalConnectionId String
    on Behalf of the Resource Level Id of the Resources Property Fields.
    physicalConnectionName String
    on Behalf of the Resource Name of the Resources-Attribute Field.
    portNumber String
    To Connect a Device Port: The Port Number of.
    portType String
    The Physical Leased Line Access Port Type Value 100Base-T: Fast Electrical Ports, 1000Base-T (the Default): gigabit Electrical Ports, 1000Base-LX: Gigabit Singlemode Optical Ports (10Km), 10GBase-T: Gigabit Electrical Port, 10GBase-LR: Gigabit Singlemode Optical Ports (10Km).
    redundantPhysicalConnectionId String
    Redundant Physical Connection to Which the ID.
    reservationActiveTime String
    The Renewal of the Entry into Force of the Time.
    reservationInternetChargeType String
    Renewal Type.
    reservationOrderType String
    Renewal Order Type.
    spec String
    The Physical Connection to Which the Specifications.
    status String
    Resources on Behalf of a State of the Resource Attribute Field.
    type String
    Physical Private Line of Type. Default Value: VPC.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi