1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. privatelink
  5. getVpcEndpointServiceResources
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.privatelink.getVpcEndpointServiceResources

Explore with Pulumi AI

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

NOTE: Available since v1.110.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = alicloud.privatelink.getVpcEndpointServiceResources({
    serviceId: "epsrv-gw8ii1xxxx",
});
export const firstPrivatelinkVpcEndpointServiceResourceId = example.then(example => example.resources?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.privatelink.get_vpc_endpoint_service_resources(service_id="epsrv-gw8ii1xxxx")
pulumi.export("firstPrivatelinkVpcEndpointServiceResourceId", example.resources[0].id)
Copy
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.GetVpcEndpointServiceResources(ctx, &privatelink.GetVpcEndpointServiceResourcesArgs{
			ServiceId: "epsrv-gw8ii1xxxx",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstPrivatelinkVpcEndpointServiceResourceId", example.Resources[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = AliCloud.PrivateLink.GetVpcEndpointServiceResources.Invoke(new()
    {
        ServiceId = "epsrv-gw8ii1xxxx",
    });

    return new Dictionary<string, object?>
    {
        ["firstPrivatelinkVpcEndpointServiceResourceId"] = example.Apply(getVpcEndpointServiceResourcesResult => getVpcEndpointServiceResourcesResult.Resources[0]?.Id),
    };
});
Copy
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.GetVpcEndpointServiceResourcesArgs;
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.getVpcEndpointServiceResources(GetVpcEndpointServiceResourcesArgs.builder()
            .serviceId("epsrv-gw8ii1xxxx")
            .build());

        ctx.export("firstPrivatelinkVpcEndpointServiceResourceId", example.applyValue(getVpcEndpointServiceResourcesResult -> getVpcEndpointServiceResourcesResult.resources()[0].id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:privatelink:getVpcEndpointServiceResources
      arguments:
        serviceId: epsrv-gw8ii1xxxx
outputs:
  firstPrivatelinkVpcEndpointServiceResourceId: ${example.resources[0].id}
Copy

Using getVpcEndpointServiceResources

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 getVpcEndpointServiceResources(args: GetVpcEndpointServiceResourcesArgs, opts?: InvokeOptions): Promise<GetVpcEndpointServiceResourcesResult>
function getVpcEndpointServiceResourcesOutput(args: GetVpcEndpointServiceResourcesOutputArgs, opts?: InvokeOptions): Output<GetVpcEndpointServiceResourcesResult>
Copy
def get_vpc_endpoint_service_resources(output_file: Optional[str] = None,
                                       service_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetVpcEndpointServiceResourcesResult
def get_vpc_endpoint_service_resources_output(output_file: Optional[pulumi.Input[str]] = None,
                                       service_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetVpcEndpointServiceResourcesResult]
Copy
func GetVpcEndpointServiceResources(ctx *Context, args *GetVpcEndpointServiceResourcesArgs, opts ...InvokeOption) (*GetVpcEndpointServiceResourcesResult, error)
func GetVpcEndpointServiceResourcesOutput(ctx *Context, args *GetVpcEndpointServiceResourcesOutputArgs, opts ...InvokeOption) GetVpcEndpointServiceResourcesResultOutput
Copy

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

public static class GetVpcEndpointServiceResources 
{
    public static Task<GetVpcEndpointServiceResourcesResult> InvokeAsync(GetVpcEndpointServiceResourcesArgs args, InvokeOptions? opts = null)
    public static Output<GetVpcEndpointServiceResourcesResult> Invoke(GetVpcEndpointServiceResourcesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetVpcEndpointServiceResourcesResult> getVpcEndpointServiceResources(GetVpcEndpointServiceResourcesArgs args, InvokeOptions options)
public static Output<GetVpcEndpointServiceResourcesResult> getVpcEndpointServiceResources(GetVpcEndpointServiceResourcesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:privatelink/getVpcEndpointServiceResources:getVpcEndpointServiceResources
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ServiceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of Vpc Endpoint Service.
OutputFile string
File name where to save data source results (after running pulumi preview).
ServiceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of Vpc Endpoint Service.
OutputFile string
File name where to save data source results (after running pulumi preview).
serviceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of Vpc Endpoint Service.
outputFile String
File name where to save data source results (after running pulumi preview).
serviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of Vpc Endpoint Service.
outputFile string
File name where to save data source results (after running pulumi preview).
service_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of Vpc Endpoint Service.
output_file str
File name where to save data source results (after running pulumi preview).
serviceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of Vpc Endpoint Service.
outputFile String
File name where to save data source results (after running pulumi preview).

getVpcEndpointServiceResources Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of Vpc Endpoint Service Resource IDs.
Resources List<Pulumi.AliCloud.PrivateLink.Outputs.GetVpcEndpointServiceResourcesResource>
A list of Privatelink Vpc Endpoint Service Resources. Each element contains the following attributes:
ServiceId string
OutputFile string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of Vpc Endpoint Service Resource IDs.
Resources []GetVpcEndpointServiceResourcesResource
A list of Privatelink Vpc Endpoint Service Resources. Each element contains the following attributes:
ServiceId string
OutputFile string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Vpc Endpoint Service Resource IDs.
resources List<GetVpcEndpointServiceResourcesResource>
A list of Privatelink Vpc Endpoint Service Resources. Each element contains the following attributes:
serviceId String
outputFile String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of Vpc Endpoint Service Resource IDs.
resources GetVpcEndpointServiceResourcesResource[]
A list of Privatelink Vpc Endpoint Service Resources. Each element contains the following attributes:
serviceId string
outputFile string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of Vpc Endpoint Service Resource IDs.
resources Sequence[GetVpcEndpointServiceResourcesResource]
A list of Privatelink Vpc Endpoint Service Resources. Each element contains the following attributes:
service_id str
output_file str
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Vpc Endpoint Service Resource IDs.
resources List<Property Map>
A list of Privatelink Vpc Endpoint Service Resources. Each element contains the following attributes:
serviceId String
outputFile String

Supporting Types

GetVpcEndpointServiceResourcesResource

Id This property is required. string
The ID of the Vpc Endpoint Service Resource.
ResourceId This property is required. string
The ID of Resource.
ResourceType This property is required. string
The type of Resource.
Id This property is required. string
The ID of the Vpc Endpoint Service Resource.
ResourceId This property is required. string
The ID of Resource.
ResourceType This property is required. string
The type of Resource.
id This property is required. String
The ID of the Vpc Endpoint Service Resource.
resourceId This property is required. String
The ID of Resource.
resourceType This property is required. String
The type of Resource.
id This property is required. string
The ID of the Vpc Endpoint Service Resource.
resourceId This property is required. string
The ID of Resource.
resourceType This property is required. string
The type of Resource.
id This property is required. str
The ID of the Vpc Endpoint Service Resource.
resource_id This property is required. str
The ID of Resource.
resource_type This property is required. str
The type of Resource.
id This property is required. String
The ID of the Vpc Endpoint Service Resource.
resourceId This property is required. String
The ID of Resource.
resourceType This property is required. String
The type of Resource.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.