1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. privatelink
  5. getVpcEndpointServiceUsers
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.privatelink.getVpcEndpointServiceUsers

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    This data source provides the Privatelink Vpc Endpoint Service Users 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.getVpcEndpointServiceUsers({
        serviceId: "epsrv-gw81c6vxxxxxx",
    });
    export const firstPrivatelinkVpcEndpointServiceUserId = example.then(example => example.users?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.privatelink.get_vpc_endpoint_service_users(service_id="epsrv-gw81c6vxxxxxx")
    pulumi.export("firstPrivatelinkVpcEndpointServiceUserId", example.users[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.GetVpcEndpointServiceUsers(ctx, &privatelink.GetVpcEndpointServiceUsersArgs{
    			ServiceId: "epsrv-gw81c6vxxxxxx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstPrivatelinkVpcEndpointServiceUserId", example.Users[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.GetVpcEndpointServiceUsers.Invoke(new()
        {
            ServiceId = "epsrv-gw81c6vxxxxxx",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstPrivatelinkVpcEndpointServiceUserId"] = example.Apply(getVpcEndpointServiceUsersResult => getVpcEndpointServiceUsersResult.Users[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.GetVpcEndpointServiceUsersArgs;
    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.getVpcEndpointServiceUsers(GetVpcEndpointServiceUsersArgs.builder()
                .serviceId("epsrv-gw81c6vxxxxxx")
                .build());
    
            ctx.export("firstPrivatelinkVpcEndpointServiceUserId", example.applyValue(getVpcEndpointServiceUsersResult -> getVpcEndpointServiceUsersResult.users()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:privatelink:getVpcEndpointServiceUsers
          Arguments:
            serviceId: epsrv-gw81c6vxxxxxx
    outputs:
      firstPrivatelinkVpcEndpointServiceUserId: ${example.users[0].id}
    

    Using getVpcEndpointServiceUsers

    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 getVpcEndpointServiceUsers(args: GetVpcEndpointServiceUsersArgs, opts?: InvokeOptions): Promise<GetVpcEndpointServiceUsersResult>
    function getVpcEndpointServiceUsersOutput(args: GetVpcEndpointServiceUsersOutputArgs, opts?: InvokeOptions): Output<GetVpcEndpointServiceUsersResult>
    def get_vpc_endpoint_service_users(output_file: Optional[str] = None,
                                       service_id: Optional[str] = None,
                                       user_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetVpcEndpointServiceUsersResult
    def get_vpc_endpoint_service_users_output(output_file: Optional[pulumi.Input[str]] = None,
                                       service_id: Optional[pulumi.Input[str]] = None,
                                       user_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetVpcEndpointServiceUsersResult]
    func GetVpcEndpointServiceUsers(ctx *Context, args *GetVpcEndpointServiceUsersArgs, opts ...InvokeOption) (*GetVpcEndpointServiceUsersResult, error)
    func GetVpcEndpointServiceUsersOutput(ctx *Context, args *GetVpcEndpointServiceUsersOutputArgs, opts ...InvokeOption) GetVpcEndpointServiceUsersResultOutput

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

    public static class GetVpcEndpointServiceUsers 
    {
        public static Task<GetVpcEndpointServiceUsersResult> InvokeAsync(GetVpcEndpointServiceUsersArgs args, InvokeOptions? opts = null)
        public static Output<GetVpcEndpointServiceUsersResult> Invoke(GetVpcEndpointServiceUsersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpcEndpointServiceUsersResult> getVpcEndpointServiceUsers(GetVpcEndpointServiceUsersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:privatelink/getVpcEndpointServiceUsers:getVpcEndpointServiceUsers
      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).
    UserId string
    The Id of Ram User.
    ServiceId string
    The Id of Vpc Endpoint Service.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    UserId string
    The Id of Ram User.
    serviceId String
    The Id of Vpc Endpoint Service.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    userId String
    The Id of Ram User.
    serviceId string
    The Id of Vpc Endpoint Service.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    userId string
    The Id of Ram User.
    service_id str
    The Id of Vpc Endpoint Service.
    output_file str
    File name where to save data source results (after running pulumi preview).
    user_id str
    The Id of Ram User.
    serviceId String
    The Id of Vpc Endpoint Service.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    userId String
    The Id of Ram User.

    getVpcEndpointServiceUsers Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    ServiceId string
    Users List<Pulumi.AliCloud.PrivateLink.Outputs.GetVpcEndpointServiceUsersUser>
    OutputFile string
    UserId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    ServiceId string
    Users []GetVpcEndpointServiceUsersUser
    OutputFile string
    UserId string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    serviceId String
    users List<GetVpcEndpointServiceUsersUser>
    outputFile String
    userId String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    serviceId string
    users GetVpcEndpointServiceUsersUser[]
    outputFile string
    userId string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    service_id str
    users Sequence[GetVpcEndpointServiceUsersUser]
    output_file str
    user_id str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    serviceId String
    users List<Property Map>
    outputFile String
    userId String

    Supporting Types

    GetVpcEndpointServiceUsersUser

    Id string
    The ID of the Vpc Endpoint Service User.
    UserId string
    The Id of Ram User.
    Id string
    The ID of the Vpc Endpoint Service User.
    UserId string
    The Id of Ram User.
    id String
    The ID of the Vpc Endpoint Service User.
    userId String
    The Id of Ram User.
    id string
    The ID of the Vpc Endpoint Service User.
    userId string
    The Id of Ram User.
    id str
    The ID of the Vpc Endpoint Service User.
    user_id str
    The Id of Ram User.
    id String
    The ID of the Vpc Endpoint Service User.
    userId String
    The Id of Ram User.

    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.51.0 published on Saturday, Mar 23, 2024 by Pulumi