1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. privatelink
  5. getVpcEndpointServices
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.privatelink.getVpcEndpointServices

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

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

    NOTE: Available since v1.109.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const exampleVpcEndpointService = new alicloud.privatelink.VpcEndpointService("example", {
        serviceDescription: "terraform-example",
        connectBandwidth: 103,
        autoAcceptConnection: false,
    });
    const example = alicloud.privatelink.getVpcEndpointServicesOutput({
        ids: [exampleVpcEndpointService.id],
    });
    export const firstPrivatelinkVpcEndpointServiceId = example.apply(example => example.services?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example_vpc_endpoint_service = alicloud.privatelink.VpcEndpointService("example",
        service_description="terraform-example",
        connect_bandwidth=103,
        auto_accept_connection=False)
    example = alicloud.privatelink.get_vpc_endpoint_services_output(ids=[example_vpc_endpoint_service.id])
    pulumi.export("firstPrivatelinkVpcEndpointServiceId", example.services[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 {
    		exampleVpcEndpointService, err := privatelink.NewVpcEndpointService(ctx, "example", &privatelink.VpcEndpointServiceArgs{
    			ServiceDescription:   pulumi.String("terraform-example"),
    			ConnectBandwidth:     pulumi.Int(103),
    			AutoAcceptConnection: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		example := privatelink.GetVpcEndpointServicesOutput(ctx, privatelink.GetVpcEndpointServicesOutputArgs{
    			Ids: pulumi.StringArray{
    				exampleVpcEndpointService.ID(),
    			},
    		}, nil)
    		ctx.Export("firstPrivatelinkVpcEndpointServiceId", example.ApplyT(func(example privatelink.GetVpcEndpointServicesResult) (*string, error) {
    			return &example.Services[0].Id, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleVpcEndpointService = new AliCloud.PrivateLink.VpcEndpointService("example", new()
        {
            ServiceDescription = "terraform-example",
            ConnectBandwidth = 103,
            AutoAcceptConnection = false,
        });
    
        var example = AliCloud.PrivateLink.GetVpcEndpointServices.Invoke(new()
        {
            Ids = new[]
            {
                exampleVpcEndpointService.Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["firstPrivatelinkVpcEndpointServiceId"] = example.Apply(getVpcEndpointServicesResult => getVpcEndpointServicesResult.Services[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.privatelink.VpcEndpointService;
    import com.pulumi.alicloud.privatelink.VpcEndpointServiceArgs;
    import com.pulumi.alicloud.privatelink.PrivatelinkFunctions;
    import com.pulumi.alicloud.privatelink.inputs.GetVpcEndpointServicesArgs;
    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) {
            var exampleVpcEndpointService = new VpcEndpointService("exampleVpcEndpointService", VpcEndpointServiceArgs.builder()
                .serviceDescription("terraform-example")
                .connectBandwidth(103)
                .autoAcceptConnection(false)
                .build());
    
            final var example = PrivatelinkFunctions.getVpcEndpointServices(GetVpcEndpointServicesArgs.builder()
                .ids(exampleVpcEndpointService.id())
                .build());
    
            ctx.export("firstPrivatelinkVpcEndpointServiceId", example.applyValue(getVpcEndpointServicesResult -> getVpcEndpointServicesResult).applyValue(example -> example.applyValue(getVpcEndpointServicesResult -> getVpcEndpointServicesResult.services()[0].id())));
        }
    }
    
    resources:
      exampleVpcEndpointService:
        type: alicloud:privatelink:VpcEndpointService
        name: example
        properties:
          serviceDescription: terraform-example
          connectBandwidth: 103
          autoAcceptConnection: false
    variables:
      example:
        fn::invoke:
          Function: alicloud:privatelink:getVpcEndpointServices
          Arguments:
            ids:
              - ${exampleVpcEndpointService.id}
    outputs:
      firstPrivatelinkVpcEndpointServiceId: ${example.services[0].id}
    

    Using getVpcEndpointServices

    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 getVpcEndpointServices(args: GetVpcEndpointServicesArgs, opts?: InvokeOptions): Promise<GetVpcEndpointServicesResult>
    function getVpcEndpointServicesOutput(args: GetVpcEndpointServicesOutputArgs, opts?: InvokeOptions): Output<GetVpcEndpointServicesResult>
    def get_vpc_endpoint_services(auto_accept_connection: Optional[bool] = None,
                                  ids: Optional[Sequence[str]] = None,
                                  name_regex: Optional[str] = None,
                                  output_file: Optional[str] = None,
                                  service_business_status: Optional[str] = None,
                                  status: Optional[str] = None,
                                  tags: Optional[Mapping[str, str]] = None,
                                  vpc_endpoint_service_name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetVpcEndpointServicesResult
    def get_vpc_endpoint_services_output(auto_accept_connection: Optional[pulumi.Input[bool]] = None,
                                  ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                  name_regex: Optional[pulumi.Input[str]] = None,
                                  output_file: Optional[pulumi.Input[str]] = None,
                                  service_business_status: Optional[pulumi.Input[str]] = None,
                                  status: Optional[pulumi.Input[str]] = None,
                                  tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                  vpc_endpoint_service_name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetVpcEndpointServicesResult]
    func GetVpcEndpointServices(ctx *Context, args *GetVpcEndpointServicesArgs, opts ...InvokeOption) (*GetVpcEndpointServicesResult, error)
    func GetVpcEndpointServicesOutput(ctx *Context, args *GetVpcEndpointServicesOutputArgs, opts ...InvokeOption) GetVpcEndpointServicesResultOutput

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

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

    The following arguments are supported:

    AutoAcceptConnection bool
    Whether to automatically accept terminal node connections.
    Ids List<string>
    A list of Vpc Endpoint Service IDs.
    NameRegex string
    A regex string to filter results by Vpc Endpoint Service name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ServiceBusinessStatus string
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    Status string
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    Tags Dictionary<string, string>
    The tags of Vpc Endpoint Service.
    VpcEndpointServiceName string
    The name of Vpc Endpoint Service.
    AutoAcceptConnection bool
    Whether to automatically accept terminal node connections.
    Ids []string
    A list of Vpc Endpoint Service IDs.
    NameRegex string
    A regex string to filter results by Vpc Endpoint Service name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ServiceBusinessStatus string
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    Status string
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    Tags map[string]string
    The tags of Vpc Endpoint Service.
    VpcEndpointServiceName string
    The name of Vpc Endpoint Service.
    autoAcceptConnection Boolean
    Whether to automatically accept terminal node connections.
    ids List<String>
    A list of Vpc Endpoint Service IDs.
    nameRegex String
    A regex string to filter results by Vpc Endpoint Service name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    serviceBusinessStatus String
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    status String
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    tags Map<String,String>
    The tags of Vpc Endpoint Service.
    vpcEndpointServiceName String
    The name of Vpc Endpoint Service.
    autoAcceptConnection boolean
    Whether to automatically accept terminal node connections.
    ids string[]
    A list of Vpc Endpoint Service IDs.
    nameRegex string
    A regex string to filter results by Vpc Endpoint Service name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    serviceBusinessStatus string
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    status string
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    tags {[key: string]: string}
    The tags of Vpc Endpoint Service.
    vpcEndpointServiceName string
    The name of Vpc Endpoint Service.
    auto_accept_connection bool
    Whether to automatically accept terminal node connections.
    ids Sequence[str]
    A list of Vpc Endpoint Service IDs.
    name_regex str
    A regex string to filter results by Vpc Endpoint Service name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    service_business_status str
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    status str
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    tags Mapping[str, str]
    The tags of Vpc Endpoint Service.
    vpc_endpoint_service_name str
    The name of Vpc Endpoint Service.
    autoAcceptConnection Boolean
    Whether to automatically accept terminal node connections.
    ids List<String>
    A list of Vpc Endpoint Service IDs.
    nameRegex String
    A regex string to filter results by Vpc Endpoint Service name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    serviceBusinessStatus String
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    status String
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    tags Map<String>
    The tags of Vpc Endpoint Service.
    vpcEndpointServiceName String
    The name of Vpc Endpoint Service.

    getVpcEndpointServices Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    A list of Vpc Endpoint Service names.
    Services List<Pulumi.AliCloud.PrivateLink.Outputs.GetVpcEndpointServicesService>
    A list of Privatelink Vpc Endpoint Services. Each element contains the following attributes:
    AutoAcceptConnection bool
    Whether to automatically accept terminal node connections..
    NameRegex string
    OutputFile string
    ServiceBusinessStatus string
    The business status of the terminal node service..
    Status string
    The Status of Vpc Endpoint Service.
    Tags Dictionary<string, string>
    The tags of Vpc Endpoint Service.
    VpcEndpointServiceName string
    The name of Vpc Endpoint Service.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    A list of Vpc Endpoint Service names.
    Services []GetVpcEndpointServicesService
    A list of Privatelink Vpc Endpoint Services. Each element contains the following attributes:
    AutoAcceptConnection bool
    Whether to automatically accept terminal node connections..
    NameRegex string
    OutputFile string
    ServiceBusinessStatus string
    The business status of the terminal node service..
    Status string
    The Status of Vpc Endpoint Service.
    Tags map[string]string
    The tags of Vpc Endpoint Service.
    VpcEndpointServiceName string
    The name of Vpc Endpoint Service.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Vpc Endpoint Service names.
    services List<GetVpcEndpointServicesService>
    A list of Privatelink Vpc Endpoint Services. Each element contains the following attributes:
    autoAcceptConnection Boolean
    Whether to automatically accept terminal node connections..
    nameRegex String
    outputFile String
    serviceBusinessStatus String
    The business status of the terminal node service..
    status String
    The Status of Vpc Endpoint Service.
    tags Map<String,String>
    The tags of Vpc Endpoint Service.
    vpcEndpointServiceName String
    The name of Vpc Endpoint Service.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    A list of Vpc Endpoint Service names.
    services GetVpcEndpointServicesService[]
    A list of Privatelink Vpc Endpoint Services. Each element contains the following attributes:
    autoAcceptConnection boolean
    Whether to automatically accept terminal node connections..
    nameRegex string
    outputFile string
    serviceBusinessStatus string
    The business status of the terminal node service..
    status string
    The Status of Vpc Endpoint Service.
    tags {[key: string]: string}
    The tags of Vpc Endpoint Service.
    vpcEndpointServiceName string
    The name of Vpc Endpoint Service.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    A list of Vpc Endpoint Service names.
    services Sequence[GetVpcEndpointServicesService]
    A list of Privatelink Vpc Endpoint Services. Each element contains the following attributes:
    auto_accept_connection bool
    Whether to automatically accept terminal node connections..
    name_regex str
    output_file str
    service_business_status str
    The business status of the terminal node service..
    status str
    The Status of Vpc Endpoint Service.
    tags Mapping[str, str]
    The tags of Vpc Endpoint Service.
    vpc_endpoint_service_name str
    The name of Vpc Endpoint Service.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Vpc Endpoint Service names.
    services List<Property Map>
    A list of Privatelink Vpc Endpoint Services. Each element contains the following attributes:
    autoAcceptConnection Boolean
    Whether to automatically accept terminal node connections..
    nameRegex String
    outputFile String
    serviceBusinessStatus String
    The business status of the terminal node service..
    status String
    The Status of Vpc Endpoint Service.
    tags Map<String>
    The tags of Vpc Endpoint Service.
    vpcEndpointServiceName String
    The name of Vpc Endpoint Service.

    Supporting Types

    GetVpcEndpointServicesService

    AutoAcceptConnection bool
    Whether to automatically accept terminal node connections.
    ConnectBandwidth int
    The connection bandwidth.
    Id string
    The ID of the Vpc Endpoint Service.
    ServiceBusinessStatus string
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    ServiceDescription string
    The description of the terminal node service.
    ServiceDomain string
    The domain of service.
    ServiceId string
    The ID of the Vpc Endpoint Service.
    Status string
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    Tags Dictionary<string, string>
    The tags of Vpc Endpoint Service.
    VpcEndpointServiceName string
    The name of Vpc Endpoint Service.
    AutoAcceptConnection bool
    Whether to automatically accept terminal node connections.
    ConnectBandwidth int
    The connection bandwidth.
    Id string
    The ID of the Vpc Endpoint Service.
    ServiceBusinessStatus string
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    ServiceDescription string
    The description of the terminal node service.
    ServiceDomain string
    The domain of service.
    ServiceId string
    The ID of the Vpc Endpoint Service.
    Status string
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    Tags map[string]string
    The tags of Vpc Endpoint Service.
    VpcEndpointServiceName string
    The name of Vpc Endpoint Service.
    autoAcceptConnection Boolean
    Whether to automatically accept terminal node connections.
    connectBandwidth Integer
    The connection bandwidth.
    id String
    The ID of the Vpc Endpoint Service.
    serviceBusinessStatus String
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    serviceDescription String
    The description of the terminal node service.
    serviceDomain String
    The domain of service.
    serviceId String
    The ID of the Vpc Endpoint Service.
    status String
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    tags Map<String,String>
    The tags of Vpc Endpoint Service.
    vpcEndpointServiceName String
    The name of Vpc Endpoint Service.
    autoAcceptConnection boolean
    Whether to automatically accept terminal node connections.
    connectBandwidth number
    The connection bandwidth.
    id string
    The ID of the Vpc Endpoint Service.
    serviceBusinessStatus string
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    serviceDescription string
    The description of the terminal node service.
    serviceDomain string
    The domain of service.
    serviceId string
    The ID of the Vpc Endpoint Service.
    status string
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    tags {[key: string]: string}
    The tags of Vpc Endpoint Service.
    vpcEndpointServiceName string
    The name of Vpc Endpoint Service.
    auto_accept_connection bool
    Whether to automatically accept terminal node connections.
    connect_bandwidth int
    The connection bandwidth.
    id str
    The ID of the Vpc Endpoint Service.
    service_business_status str
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    service_description str
    The description of the terminal node service.
    service_domain str
    The domain of service.
    service_id str
    The ID of the Vpc Endpoint Service.
    status str
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    tags Mapping[str, str]
    The tags of Vpc Endpoint Service.
    vpc_endpoint_service_name str
    The name of Vpc Endpoint Service.
    autoAcceptConnection Boolean
    Whether to automatically accept terminal node connections.
    connectBandwidth Number
    The connection bandwidth.
    id String
    The ID of the Vpc Endpoint Service.
    serviceBusinessStatus String
    The business status of the terminal node service. Valid Value: Normal, FinancialLocked and SecurityLocked.
    serviceDescription String
    The description of the terminal node service.
    serviceDomain String
    The domain of service.
    serviceId String
    The ID of the Vpc Endpoint Service.
    status String
    The Status of Vpc Endpoint Service. Valid Value: Active, Creating, Deleted, Deleting and Pending.
    tags Map<String>
    The tags of Vpc Endpoint Service.
    vpcEndpointServiceName String
    The name of Vpc Endpoint Service.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi