1. Packages
  2. Vkcs Provider
  3. API Docs
  4. getIamServiceUser
vkcs 0.13.0 published on Tuesday, Oct 14, 2025 by vk-cs

vkcs.getIamServiceUser

Get Started
vkcs logo
vkcs 0.13.0 published on Tuesday, Oct 14, 2025 by vk-cs

    Use this data source to get information about an IAM service user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const serviceUser = vkcs.getIamServiceUser({
        name: vkcs_iam_service_user.service_user.name,
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    service_user = vkcs.get_iam_service_user(name=vkcs_iam_service_user["service_user"]["name"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.LookupIamServiceUser(ctx, &vkcs.LookupIamServiceUserArgs{
    			Name: pulumi.StringRef(vkcs_iam_service_user.Service_user.Name),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var serviceUser = Vkcs.GetIamServiceUser.Invoke(new()
        {
            Name = vkcs_iam_service_user.Service_user.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.VkcsFunctions;
    import com.pulumi.vkcs.inputs.GetIamServiceUserArgs;
    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 serviceUser = VkcsFunctions.getIamServiceUser(GetIamServiceUserArgs.builder()
                .name(vkcs_iam_service_user.service_user().name())
                .build());
    
        }
    }
    
    variables:
      serviceUser:
        fn::invoke:
          function: vkcs:getIamServiceUser
          arguments:
            name: ${vkcs_iam_service_user.service_user.name}
    

    Using getIamServiceUser

    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 getIamServiceUser(args: GetIamServiceUserArgs, opts?: InvokeOptions): Promise<GetIamServiceUserResult>
    function getIamServiceUserOutput(args: GetIamServiceUserOutputArgs, opts?: InvokeOptions): Output<GetIamServiceUserResult>
    def get_iam_service_user(id: Optional[str] = None,
                             name: Optional[str] = None,
                             region: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetIamServiceUserResult
    def get_iam_service_user_output(id: Optional[pulumi.Input[str]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             region: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetIamServiceUserResult]
    func LookupIamServiceUser(ctx *Context, args *LookupIamServiceUserArgs, opts ...InvokeOption) (*LookupIamServiceUserResult, error)
    func LookupIamServiceUserOutput(ctx *Context, args *LookupIamServiceUserOutputArgs, opts ...InvokeOption) LookupIamServiceUserResultOutput

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

    public static class GetIamServiceUser 
    {
        public static Task<GetIamServiceUserResult> InvokeAsync(GetIamServiceUserArgs args, InvokeOptions? opts = null)
        public static Output<GetIamServiceUserResult> Invoke(GetIamServiceUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamServiceUserResult> getIamServiceUser(GetIamServiceUserArgs args, InvokeOptions options)
    public static Output<GetIamServiceUserResult> getIamServiceUser(GetIamServiceUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vkcs:index/getIamServiceUser:getIamServiceUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    optional string → ID of the service user.
    Name string
    optional string → Name of the service user.
    Region string
    optional string → The region in which to obtain the IAM Service Users client. If omitted, the region argument of the provider is used.
    Id string
    optional string → ID of the service user.
    Name string
    optional string → Name of the service user.
    Region string
    optional string → The region in which to obtain the IAM Service Users client. If omitted, the region argument of the provider is used.
    id String
    optional string → ID of the service user.
    name String
    optional string → Name of the service user.
    region String
    optional string → The region in which to obtain the IAM Service Users client. If omitted, the region argument of the provider is used.
    id string
    optional string → ID of the service user.
    name string
    optional string → Name of the service user.
    region string
    optional string → The region in which to obtain the IAM Service Users client. If omitted, the region argument of the provider is used.
    id str
    optional string → ID of the service user.
    name str
    optional string → Name of the service user.
    region str
    optional string → The region in which to obtain the IAM Service Users client. If omitted, the region argument of the provider is used.
    id String
    optional string → ID of the service user.
    name String
    optional string → Name of the service user.
    region String
    optional string → The region in which to obtain the IAM Service Users client. If omitted, the region argument of the provider is used.

    getIamServiceUser Result

    The following output properties are available:

    CreatedAt string
    string → Service user creation timestamp.
    CreatorName string
    string → Name of the user who created the service user.
    Description string
    string → Service user description.
    Id string
    Name string
    Region string
    RoleNames List<string>
    string → Names of roles assigned to the service user.
    CreatedAt string
    string → Service user creation timestamp.
    CreatorName string
    string → Name of the user who created the service user.
    Description string
    string → Service user description.
    Id string
    Name string
    Region string
    RoleNames []string
    string → Names of roles assigned to the service user.
    createdAt String
    string → Service user creation timestamp.
    creatorName String
    string → Name of the user who created the service user.
    description String
    string → Service user description.
    id String
    name String
    region String
    roleNames List<String>
    string → Names of roles assigned to the service user.
    createdAt string
    string → Service user creation timestamp.
    creatorName string
    string → Name of the user who created the service user.
    description string
    string → Service user description.
    id string
    name string
    region string
    roleNames string[]
    string → Names of roles assigned to the service user.
    created_at str
    string → Service user creation timestamp.
    creator_name str
    string → Name of the user who created the service user.
    description str
    string → Service user description.
    id str
    name str
    region str
    role_names Sequence[str]
    string → Names of roles assigned to the service user.
    createdAt String
    string → Service user creation timestamp.
    creatorName String
    string → Name of the user who created the service user.
    description String
    string → Service user description.
    id String
    name String
    region String
    roleNames List<String>
    string → Names of roles assigned to the service user.

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.13.0 published on Tuesday, Oct 14, 2025 by vk-cs
      Meet Neo: Your AI Platform Teammate