1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. privatelink
  5. getVpcEndpointServiceResources
Alibaba Cloud v3.73.0 published on Wednesday, Jan 15, 2025 by Pulumi

alicloud.privatelink.getVpcEndpointServiceResources

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.73.0 published on Wednesday, Jan 15, 2025 by Pulumi

    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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: alicloud:privatelink:getVpcEndpointServiceResources
          arguments:
            serviceId: epsrv-gw8ii1xxxx
    outputs:
      firstPrivatelinkVpcEndpointServiceResourceId: ${example.resources[0].id}
    

    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>
    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]
    func GetVpcEndpointServiceResources(ctx *Context, args *GetVpcEndpointServiceResourcesArgs, opts ...InvokeOption) (*GetVpcEndpointServiceResourcesResult, error)
    func GetVpcEndpointServiceResourcesOutput(ctx *Context, args *GetVpcEndpointServiceResourcesOutputArgs, opts ...InvokeOption) GetVpcEndpointServiceResourcesResultOutput

    > 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)
    }
    public static CompletableFuture<GetVpcEndpointServiceResourcesResult> getVpcEndpointServiceResources(GetVpcEndpointServiceResourcesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:privatelink/getVpcEndpointServiceResources:getVpcEndpointServiceResources
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ServiceId string
    The ID of Vpc Endpoint Service.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ServiceId string
    The ID of Vpc Endpoint Service.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    serviceId String
    The ID of Vpc Endpoint Service.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    serviceId string
    The ID of Vpc Endpoint Service.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    service_id str
    The ID of Vpc Endpoint Service.
    output_file str
    File name where to save data source results (after running pulumi preview).
    serviceId 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 string
    The ID of the Vpc Endpoint Service Resource.
    ResourceId string
    The ID of Resource.
    ResourceType string
    The type of Resource.
    Id string
    The ID of the Vpc Endpoint Service Resource.
    ResourceId string
    The ID of Resource.
    ResourceType string
    The type of Resource.
    id String
    The ID of the Vpc Endpoint Service Resource.
    resourceId String
    The ID of Resource.
    resourceType String
    The type of Resource.
    id string
    The ID of the Vpc Endpoint Service Resource.
    resourceId string
    The ID of Resource.
    resourceType string
    The type of Resource.
    id str
    The ID of the Vpc Endpoint Service Resource.
    resource_id str
    The ID of Resource.
    resource_type str
    The type of Resource.
    id String
    The ID of the Vpc Endpoint Service Resource.
    resourceId String
    The ID of Resource.
    resourceType 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.
    alicloud logo
    Alibaba Cloud v3.73.0 published on Wednesday, Jan 15, 2025 by Pulumi