1. Packages
  2. Aiven Provider
  3. API Docs
  4. getServiceUser
Viewing docs for Aiven v4.5.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
aiven logo
Viewing docs for Aiven v4.5.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    The Service User data source provides information about the existing Aiven Service User.

    Example Usage

    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var myserviceuser = Output.Create(Aiven.GetServiceUser.InvokeAsync(new Aiven.GetServiceUserArgs
            {
                Project = aiven_project.Myproject.Project,
                ServiceName = aiven_service.Myservice.Service_name,
                Username = "<USERNAME>",
            }));
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v4/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.LookupServiceUser(ctx, &GetServiceUserArgs{
    			Project:     aiven_project.Myproject.Project,
    			ServiceName: aiven_service.Myservice.Service_name,
    			Username:    "<USERNAME>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const myserviceuser = aiven.getServiceUser({
        project: aiven_project.myproject.project,
        serviceName: aiven_service.myservice.service_name,
        username: "<USERNAME>",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    myserviceuser = aiven.get_service_user(project=aiven_project["myproject"]["project"],
        service_name=aiven_service["myservice"]["service_name"],
        username="<USERNAME>")
    

    Example coming soon!

    Using getServiceUser

    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 getServiceUser(args: GetServiceUserArgs, opts?: InvokeOptions): Promise<GetServiceUserResult>
    function getServiceUserOutput(args: GetServiceUserOutputArgs, opts?: InvokeOptions): Output<GetServiceUserResult>
    def get_service_user(project: Optional[str] = None,
                         service_name: Optional[str] = None,
                         username: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetServiceUserResult
    def get_service_user_output(project: Optional[pulumi.Input[str]] = None,
                         service_name: Optional[pulumi.Input[str]] = None,
                         username: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetServiceUserResult]
    func LookupServiceUser(ctx *Context, args *LookupServiceUserArgs, opts ...InvokeOption) (*LookupServiceUserResult, error)
    func LookupServiceUserOutput(ctx *Context, args *LookupServiceUserOutputArgs, opts ...InvokeOption) LookupServiceUserResultOutput

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

    public static class GetServiceUser 
    {
        public static Task<GetServiceUserResult> InvokeAsync(GetServiceUserArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceUserResult> Invoke(GetServiceUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServiceUserResult> getServiceUser(GetServiceUserArgs args, InvokeOptions options)
    public static Output<GetServiceUserResult> getServiceUser(GetServiceUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aiven:index/getServiceUser:getServiceUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    ServiceName string
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    Username string
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    Project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    ServiceName string
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    Username string
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    project String
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    serviceName String
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    username String
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    serviceName string
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    username string
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    project str
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    service_name str
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    username str
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    project String
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    serviceName String
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    username String
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    getServiceUser Result

    The following output properties are available:

    AccessCert string
    Access certificate for the user if applicable for the service in question
    AccessKey string
    Access certificate key for the user if applicable for the service in question
    Authentication string
    Authentication details. The possible values are caching_sha2_password and mysql_native_password.
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    The password of the service user ( not applicable for all services ).
    PgAllowReplication bool
    Postgres specific field, defines whether replication is allowed. This property cannot be changed, doing so forces recreation of the resource.
    Project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    RedisAclCategories List<string>
    Redis specific field, defines command category rules. The field is required withredis_acl_commands and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    RedisAclChannels List<string>
    Redis specific field, defines the permitted pub/sub channel patterns. This property cannot be changed, doing so forces recreation of the resource.
    RedisAclCommands List<string>
    Redis specific field, defines rules for individual commands. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    RedisAclKeys List<string>
    Redis specific field, defines key access rules. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    ServiceName string
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    Type string
    Type of the user account. Tells wether the user is the primary account or a regular account.
    Username string
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    AccessCert string
    Access certificate for the user if applicable for the service in question
    AccessKey string
    Access certificate key for the user if applicable for the service in question
    Authentication string
    Authentication details. The possible values are caching_sha2_password and mysql_native_password.
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    The password of the service user ( not applicable for all services ).
    PgAllowReplication bool
    Postgres specific field, defines whether replication is allowed. This property cannot be changed, doing so forces recreation of the resource.
    Project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    RedisAclCategories []string
    Redis specific field, defines command category rules. The field is required withredis_acl_commands and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    RedisAclChannels []string
    Redis specific field, defines the permitted pub/sub channel patterns. This property cannot be changed, doing so forces recreation of the resource.
    RedisAclCommands []string
    Redis specific field, defines rules for individual commands. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    RedisAclKeys []string
    Redis specific field, defines key access rules. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    ServiceName string
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    Type string
    Type of the user account. Tells wether the user is the primary account or a regular account.
    Username string
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    accessCert String
    Access certificate for the user if applicable for the service in question
    accessKey String
    Access certificate key for the user if applicable for the service in question
    authentication String
    Authentication details. The possible values are caching_sha2_password and mysql_native_password.
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    The password of the service user ( not applicable for all services ).
    pgAllowReplication Boolean
    Postgres specific field, defines whether replication is allowed. This property cannot be changed, doing so forces recreation of the resource.
    project String
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    redisAclCategories List<String>
    Redis specific field, defines command category rules. The field is required withredis_acl_commands and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    redisAclChannels List<String>
    Redis specific field, defines the permitted pub/sub channel patterns. This property cannot be changed, doing so forces recreation of the resource.
    redisAclCommands List<String>
    Redis specific field, defines rules for individual commands. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    redisAclKeys List<String>
    Redis specific field, defines key access rules. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    serviceName String
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    type String
    Type of the user account. Tells wether the user is the primary account or a regular account.
    username String
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    accessCert string
    Access certificate for the user if applicable for the service in question
    accessKey string
    Access certificate key for the user if applicable for the service in question
    authentication string
    Authentication details. The possible values are caching_sha2_password and mysql_native_password.
    id string
    The provider-assigned unique ID for this managed resource.
    password string
    The password of the service user ( not applicable for all services ).
    pgAllowReplication boolean
    Postgres specific field, defines whether replication is allowed. This property cannot be changed, doing so forces recreation of the resource.
    project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    redisAclCategories string[]
    Redis specific field, defines command category rules. The field is required withredis_acl_commands and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    redisAclChannels string[]
    Redis specific field, defines the permitted pub/sub channel patterns. This property cannot be changed, doing so forces recreation of the resource.
    redisAclCommands string[]
    Redis specific field, defines rules for individual commands. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    redisAclKeys string[]
    Redis specific field, defines key access rules. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    serviceName string
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    type string
    Type of the user account. Tells wether the user is the primary account or a regular account.
    username string
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    access_cert str
    Access certificate for the user if applicable for the service in question
    access_key str
    Access certificate key for the user if applicable for the service in question
    authentication str
    Authentication details. The possible values are caching_sha2_password and mysql_native_password.
    id str
    The provider-assigned unique ID for this managed resource.
    password str
    The password of the service user ( not applicable for all services ).
    pg_allow_replication bool
    Postgres specific field, defines whether replication is allowed. This property cannot be changed, doing so forces recreation of the resource.
    project str
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    redis_acl_categories Sequence[str]
    Redis specific field, defines command category rules. The field is required withredis_acl_commands and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    redis_acl_channels Sequence[str]
    Redis specific field, defines the permitted pub/sub channel patterns. This property cannot be changed, doing so forces recreation of the resource.
    redis_acl_commands Sequence[str]
    Redis specific field, defines rules for individual commands. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    redis_acl_keys Sequence[str]
    Redis specific field, defines key access rules. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    service_name str
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    type str
    Type of the user account. Tells wether the user is the primary account or a regular account.
    username str
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    accessCert String
    Access certificate for the user if applicable for the service in question
    accessKey String
    Access certificate key for the user if applicable for the service in question
    authentication String
    Authentication details. The possible values are caching_sha2_password and mysql_native_password.
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    The password of the service user ( not applicable for all services ).
    pgAllowReplication Boolean
    Postgres specific field, defines whether replication is allowed. This property cannot be changed, doing so forces recreation of the resource.
    project String
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    redisAclCategories List<String>
    Redis specific field, defines command category rules. The field is required withredis_acl_commands and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    redisAclChannels List<String>
    Redis specific field, defines the permitted pub/sub channel patterns. This property cannot be changed, doing so forces recreation of the resource.
    redisAclCommands List<String>
    Redis specific field, defines rules for individual commands. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    redisAclKeys List<String>
    Redis specific field, defines key access rules. The field is required withredis_acl_categories and redis_acl_keys. This property cannot be changed, doing so forces recreation of the resource.
    serviceName String
    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
    type String
    Type of the user account. Tells wether the user is the primary account or a regular account.
    username String
    The actual name of the service user. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Viewing docs for Aiven v4.5.2 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.