1. Packages
  2. Alicloud Provider
  3. API Docs
  4. expressconnect
  5. getAccessPoints
Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi

alicloud.expressconnect.getAccessPoints

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi

    This data source provides the Express Connect Access Points 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.getAccessPoints({
        ids: ["ap-cn-hangzhou-yh-C"],
    });
    export const expressConnectAccessPointId1 = ids.then(ids => ids.points?.[0]?.id);
    const nameRegex = alicloud.expressconnect.getAccessPoints({
        nameRegex: "^杭州-",
    });
    export const expressConnectAccessPointId2 = nameRegex.then(nameRegex => nameRegex.points?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.expressconnect.get_access_points(ids=["ap-cn-hangzhou-yh-C"])
    pulumi.export("expressConnectAccessPointId1", ids.points[0].id)
    name_regex = alicloud.expressconnect.get_access_points(name_regex="^杭州-")
    pulumi.export("expressConnectAccessPointId2", name_regex.points[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.GetAccessPoints(ctx, &expressconnect.GetAccessPointsArgs{
    			Ids: []string{
    				"ap-cn-hangzhou-yh-C",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("expressConnectAccessPointId1", ids.Points[0].Id)
    		nameRegex, err := expressconnect.GetAccessPoints(ctx, &expressconnect.GetAccessPointsArgs{
    			NameRegex: pulumi.StringRef("^杭州-"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("expressConnectAccessPointId2", nameRegex.Points[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.GetAccessPoints.Invoke(new()
        {
            Ids = new[]
            {
                "ap-cn-hangzhou-yh-C",
            },
        });
    
        var nameRegex = AliCloud.ExpressConnect.GetAccessPoints.Invoke(new()
        {
            NameRegex = "^杭州-",
        });
    
        return new Dictionary<string, object?>
        {
            ["expressConnectAccessPointId1"] = ids.Apply(getAccessPointsResult => getAccessPointsResult.Points[0]?.Id),
            ["expressConnectAccessPointId2"] = nameRegex.Apply(getAccessPointsResult => getAccessPointsResult.Points[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.GetAccessPointsArgs;
    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.getAccessPoints(GetAccessPointsArgs.builder()
                .ids("ap-cn-hangzhou-yh-C")
                .build());
    
            ctx.export("expressConnectAccessPointId1", ids.applyValue(getAccessPointsResult -> getAccessPointsResult.points()[0].id()));
            final var nameRegex = ExpressconnectFunctions.getAccessPoints(GetAccessPointsArgs.builder()
                .nameRegex("^杭州-")
                .build());
    
            ctx.export("expressConnectAccessPointId2", nameRegex.applyValue(getAccessPointsResult -> getAccessPointsResult.points()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:expressconnect:getAccessPoints
          Arguments:
            ids:
              - ap-cn-hangzhou-yh-C
      nameRegex:
        fn::invoke:
          Function: alicloud:expressconnect:getAccessPoints
          Arguments:
            nameRegex: ^杭州-
    outputs:
      expressConnectAccessPointId1: ${ids.points[0].id}
      expressConnectAccessPointId2: ${nameRegex.points[0].id}
    

    Using getAccessPoints

    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 getAccessPoints(args: GetAccessPointsArgs, opts?: InvokeOptions): Promise<GetAccessPointsResult>
    function getAccessPointsOutput(args: GetAccessPointsOutputArgs, opts?: InvokeOptions): Output<GetAccessPointsResult>
    def get_access_points(ids: Optional[Sequence[str]] = None,
                          name_regex: Optional[str] = None,
                          output_file: Optional[str] = None,
                          status: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetAccessPointsResult
    def get_access_points_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = 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[GetAccessPointsResult]
    func GetAccessPoints(ctx *Context, args *GetAccessPointsArgs, opts ...InvokeOption) (*GetAccessPointsResult, error)
    func GetAccessPointsOutput(ctx *Context, args *GetAccessPointsOutputArgs, opts ...InvokeOption) GetAccessPointsResultOutput

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

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

    The following arguments are supported:

    Ids List<string>
    A list of Access Point IDs.
    NameRegex string
    A regex string to filter results by Access Point name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The Physical Connection to Which the Access Point State. Valid values: disabled, full, hot, recommended.
    Ids []string
    A list of Access Point IDs.
    NameRegex string
    A regex string to filter results by Access Point name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The Physical Connection to Which the Access Point State. Valid values: disabled, full, hot, recommended.
    ids List<String>
    A list of Access Point IDs.
    nameRegex String
    A regex string to filter results by Access Point name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The Physical Connection to Which the Access Point State. Valid values: disabled, full, hot, recommended.
    ids string[]
    A list of Access Point IDs.
    nameRegex string
    A regex string to filter results by Access Point name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The Physical Connection to Which the Access Point State. Valid values: disabled, full, hot, recommended.
    ids Sequence[str]
    A list of Access Point IDs.
    name_regex str
    A regex string to filter results by Access Point name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The Physical Connection to Which the Access Point State. Valid values: disabled, full, hot, recommended.
    ids List<String>
    A list of Access Point IDs.
    nameRegex String
    A regex string to filter results by Access Point name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The Physical Connection to Which the Access Point State. Valid values: disabled, full, hot, recommended.

    getAccessPoints Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Points List<Pulumi.AliCloud.ExpressConnect.Outputs.GetAccessPointsPoint>
    NameRegex string
    OutputFile string
    Status string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Points []GetAccessPointsPoint
    NameRegex string
    OutputFile string
    Status string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    points List<GetAccessPointsPoint>
    nameRegex String
    outputFile String
    status String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    points GetAccessPointsPoint[]
    nameRegex string
    outputFile string
    status string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    points Sequence[GetAccessPointsPoint]
    name_regex str
    output_file str
    status str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    points List<Property Map>
    nameRegex String
    outputFile String
    status String

    Supporting Types

    GetAccessPointsPoint

    AccessPointFeatureModels List<Pulumi.AliCloud.ExpressConnect.Inputs.GetAccessPointsPointAccessPointFeatureModel>
    Query to the Access Point Feature Model.
    AccessPointId string
    The Access Point ID.
    AccessPointName string
    Access Point Name.
    AttachedRegionNo string
    The Access Point Is Located an ID.
    Description string
    The Access Point Description.
    HostOperator string
    The Access Point Belongs to the Operator.
    Id string
    The ID of the Access Point.
    Location string
    The Location of the Access Point.
    Status string
    The Physical Connection to Which the Access Point State.
    Type string
    The Physical Connection to Which the Network Type.
    AccessPointFeatureModels []GetAccessPointsPointAccessPointFeatureModel
    Query to the Access Point Feature Model.
    AccessPointId string
    The Access Point ID.
    AccessPointName string
    Access Point Name.
    AttachedRegionNo string
    The Access Point Is Located an ID.
    Description string
    The Access Point Description.
    HostOperator string
    The Access Point Belongs to the Operator.
    Id string
    The ID of the Access Point.
    Location string
    The Location of the Access Point.
    Status string
    The Physical Connection to Which the Access Point State.
    Type string
    The Physical Connection to Which the Network Type.
    accessPointFeatureModels List<GetAccessPointsPointAccessPointFeatureModel>
    Query to the Access Point Feature Model.
    accessPointId String
    The Access Point ID.
    accessPointName String
    Access Point Name.
    attachedRegionNo String
    The Access Point Is Located an ID.
    description String
    The Access Point Description.
    hostOperator String
    The Access Point Belongs to the Operator.
    id String
    The ID of the Access Point.
    location String
    The Location of the Access Point.
    status String
    The Physical Connection to Which the Access Point State.
    type String
    The Physical Connection to Which the Network Type.
    accessPointFeatureModels GetAccessPointsPointAccessPointFeatureModel[]
    Query to the Access Point Feature Model.
    accessPointId string
    The Access Point ID.
    accessPointName string
    Access Point Name.
    attachedRegionNo string
    The Access Point Is Located an ID.
    description string
    The Access Point Description.
    hostOperator string
    The Access Point Belongs to the Operator.
    id string
    The ID of the Access Point.
    location string
    The Location of the Access Point.
    status string
    The Physical Connection to Which the Access Point State.
    type string
    The Physical Connection to Which the Network Type.
    access_point_feature_models Sequence[GetAccessPointsPointAccessPointFeatureModel]
    Query to the Access Point Feature Model.
    access_point_id str
    The Access Point ID.
    access_point_name str
    Access Point Name.
    attached_region_no str
    The Access Point Is Located an ID.
    description str
    The Access Point Description.
    host_operator str
    The Access Point Belongs to the Operator.
    id str
    The ID of the Access Point.
    location str
    The Location of the Access Point.
    status str
    The Physical Connection to Which the Access Point State.
    type str
    The Physical Connection to Which the Network Type.
    accessPointFeatureModels List<Property Map>
    Query to the Access Point Feature Model.
    accessPointId String
    The Access Point ID.
    accessPointName String
    Access Point Name.
    attachedRegionNo String
    The Access Point Is Located an ID.
    description String
    The Access Point Description.
    hostOperator String
    The Access Point Belongs to the Operator.
    id String
    The ID of the Access Point.
    location String
    The Location of the Access Point.
    status String
    The Physical Connection to Which the Access Point State.
    type String
    The Physical Connection to Which the Network Type.

    GetAccessPointsPointAccessPointFeatureModel

    FeatureKey string
    The Access Point Properties.
    FeatureValue string
    The Access Point Characteristic Value.
    FeatureKey string
    The Access Point Properties.
    FeatureValue string
    The Access Point Characteristic Value.
    featureKey String
    The Access Point Properties.
    featureValue String
    The Access Point Characteristic Value.
    featureKey string
    The Access Point Properties.
    featureValue string
    The Access Point Characteristic Value.
    feature_key str
    The Access Point Properties.
    feature_value str
    The Access Point Characteristic Value.
    featureKey String
    The Access Point Properties.
    featureValue String
    The Access Point Characteristic Value.

    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.63.0 published on Monday, Sep 30, 2024 by Pulumi