1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. privatelink
  5. getVpcEndpointConnections
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.privatelink.getVpcEndpointConnections

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    This data source provides the Privatelink Vpc Endpoint Connections of the current Alibaba Cloud user.

    NOTE: Available in v1.110.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.privatelink.getVpcEndpointConnections({
        serviceId: "example_value",
        status: "Connected",
    });
    export const firstPrivatelinkVpcEndpointConnectionId = example.then(example => example.connections?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.privatelink.get_vpc_endpoint_connections(service_id="example_value",
        status="Connected")
    pulumi.export("firstPrivatelinkVpcEndpointConnectionId", example.connections[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/privatelink"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := privatelink.GetVpcEndpointConnections(ctx, &privatelink.GetVpcEndpointConnectionsArgs{
    			ServiceId: "example_value",
    			Status:    pulumi.StringRef("Connected"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstPrivatelinkVpcEndpointConnectionId", example.Connections[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.PrivateLink.GetVpcEndpointConnections.Invoke(new()
        {
            ServiceId = "example_value",
            Status = "Connected",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstPrivatelinkVpcEndpointConnectionId"] = example.Apply(getVpcEndpointConnectionsResult => getVpcEndpointConnectionsResult.Connections[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.privatelink.PrivatelinkFunctions;
    import com.pulumi.alicloud.privatelink.inputs.GetVpcEndpointConnectionsArgs;
    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 example = PrivatelinkFunctions.getVpcEndpointConnections(GetVpcEndpointConnectionsArgs.builder()
                .serviceId("example_value")
                .status("Connected")
                .build());
    
            ctx.export("firstPrivatelinkVpcEndpointConnectionId", example.applyValue(getVpcEndpointConnectionsResult -> getVpcEndpointConnectionsResult.connections()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:privatelink:getVpcEndpointConnections
          Arguments:
            serviceId: example_value
            status: Connected
    outputs:
      firstPrivatelinkVpcEndpointConnectionId: ${example.connections[0].id}
    

    Using getVpcEndpointConnections

    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 getVpcEndpointConnections(args: GetVpcEndpointConnectionsArgs, opts?: InvokeOptions): Promise<GetVpcEndpointConnectionsResult>
    function getVpcEndpointConnectionsOutput(args: GetVpcEndpointConnectionsOutputArgs, opts?: InvokeOptions): Output<GetVpcEndpointConnectionsResult>
    def get_vpc_endpoint_connections(endpoint_id: Optional[str] = None,
                                     endpoint_owner_id: Optional[int] = None,
                                     output_file: Optional[str] = None,
                                     service_id: Optional[str] = None,
                                     status: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetVpcEndpointConnectionsResult
    def get_vpc_endpoint_connections_output(endpoint_id: Optional[pulumi.Input[str]] = None,
                                     endpoint_owner_id: Optional[pulumi.Input[int]] = None,
                                     output_file: Optional[pulumi.Input[str]] = None,
                                     service_id: Optional[pulumi.Input[str]] = None,
                                     status: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetVpcEndpointConnectionsResult]
    func GetVpcEndpointConnections(ctx *Context, args *GetVpcEndpointConnectionsArgs, opts ...InvokeOption) (*GetVpcEndpointConnectionsResult, error)
    func GetVpcEndpointConnectionsOutput(ctx *Context, args *GetVpcEndpointConnectionsOutputArgs, opts ...InvokeOption) GetVpcEndpointConnectionsResultOutput

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

    public static class GetVpcEndpointConnections 
    {
        public static Task<GetVpcEndpointConnectionsResult> InvokeAsync(GetVpcEndpointConnectionsArgs args, InvokeOptions? opts = null)
        public static Output<GetVpcEndpointConnectionsResult> Invoke(GetVpcEndpointConnectionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpcEndpointConnectionsResult> getVpcEndpointConnections(GetVpcEndpointConnectionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:privatelink/getVpcEndpointConnections:getVpcEndpointConnections
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ServiceId string
    The ID of the Vpc Endpoint Service.
    EndpointId string
    The ID of the Vpc Endpoint.
    EndpointOwnerId int
    The endpoint owner id.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of Vpc Endpoint Connection.
    ServiceId string
    The ID of the Vpc Endpoint Service.
    EndpointId string
    The ID of the Vpc Endpoint.
    EndpointOwnerId int
    The endpoint owner id.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of Vpc Endpoint Connection.
    serviceId String
    The ID of the Vpc Endpoint Service.
    endpointId String
    The ID of the Vpc Endpoint.
    endpointOwnerId Integer
    The endpoint owner id.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of Vpc Endpoint Connection.
    serviceId string
    The ID of the Vpc Endpoint Service.
    endpointId string
    The ID of the Vpc Endpoint.
    endpointOwnerId number
    The endpoint owner id.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of Vpc Endpoint Connection.
    service_id str
    The ID of the Vpc Endpoint Service.
    endpoint_id str
    The ID of the Vpc Endpoint.
    endpoint_owner_id int
    The endpoint owner id.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of Vpc Endpoint Connection.
    serviceId String
    The ID of the Vpc Endpoint Service.
    endpointId String
    The ID of the Vpc Endpoint.
    endpointOwnerId Number
    The endpoint owner id.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of Vpc Endpoint Connection.

    getVpcEndpointConnections Result

    The following output properties are available:

    Connections List<Pulumi.AliCloud.PrivateLink.Outputs.GetVpcEndpointConnectionsConnection>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    ServiceId string
    EndpointId string
    EndpointOwnerId int
    OutputFile string
    Status string
    Connections []GetVpcEndpointConnectionsConnection
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    ServiceId string
    EndpointId string
    EndpointOwnerId int
    OutputFile string
    Status string
    connections List<GetVpcEndpointConnectionsConnection>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    serviceId String
    endpointId String
    endpointOwnerId Integer
    outputFile String
    status String
    connections GetVpcEndpointConnectionsConnection[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    serviceId string
    endpointId string
    endpointOwnerId number
    outputFile string
    status string
    connections Sequence[GetVpcEndpointConnectionsConnection]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    service_id str
    endpoint_id str
    endpoint_owner_id int
    output_file str
    status str
    connections List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    serviceId String
    endpointId String
    endpointOwnerId Number
    outputFile String
    status String

    Supporting Types

    GetVpcEndpointConnectionsConnection

    Bandwidth int
    The Bandwidth.
    EndpointId string
    The ID of the Vpc Endpoint.
    Id string
    The ID of the Vpc Endpoint Connection.
    Status string
    The status of Vpc Endpoint Connection.
    Bandwidth int
    The Bandwidth.
    EndpointId string
    The ID of the Vpc Endpoint.
    Id string
    The ID of the Vpc Endpoint Connection.
    Status string
    The status of Vpc Endpoint Connection.
    bandwidth Integer
    The Bandwidth.
    endpointId String
    The ID of the Vpc Endpoint.
    id String
    The ID of the Vpc Endpoint Connection.
    status String
    The status of Vpc Endpoint Connection.
    bandwidth number
    The Bandwidth.
    endpointId string
    The ID of the Vpc Endpoint.
    id string
    The ID of the Vpc Endpoint Connection.
    status string
    The status of Vpc Endpoint Connection.
    bandwidth int
    The Bandwidth.
    endpoint_id str
    The ID of the Vpc Endpoint.
    id str
    The ID of the Vpc Endpoint Connection.
    status str
    The status of Vpc Endpoint Connection.
    bandwidth Number
    The Bandwidth.
    endpointId String
    The ID of the Vpc Endpoint.
    id String
    The ID of the Vpc Endpoint Connection.
    status String
    The status of Vpc Endpoint Connection.

    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.54.0 published on Wednesday, Apr 24, 2024 by Pulumi