1. Registry
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. getNekiRole
Viewing docs for planetscale 1.11.0
published on Friday, Sep 18, 2026 by planetscale
Viewing docs for planetscale 1.11.0
published on Friday, Sep 18, 2026 by planetscale

    NekiRole DataSource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as planetscale from "@pulumi/planetscale";
    
    const myNekirole = planetscale.getNekiRole({
        branch: "...my_branch...",
        database: "...my_database...",
        id: "...my_id...",
        organization: "...my_organization...",
    });
    
    import pulumi
    import pulumi_planetscale as planetscale
    
    my_nekirole = planetscale.get_neki_role(branch="...my_branch...",
        database="...my_database...",
        id="...my_id...",
        organization="...my_organization...")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/planetscale/planetscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := planetscale.LookupNekiRole(ctx, &planetscale.LookupNekiRoleArgs{
    			Branch:       "...my_branch...",
    			Database:     "...my_database...",
    			Id:           "...my_id...",
    			Organization: "...my_organization...",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Planetscale = Pulumi.Planetscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myNekirole = Planetscale.GetNekiRole.Invoke(new()
        {
            Branch = "...my_branch...",
            Database = "...my_database...",
            Id = "...my_id...",
            Organization = "...my_organization...",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.planetscale.PlanetscaleFunctions;
    import com.pulumi.planetscale.inputs.GetNekiRoleArgs;
    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 myNekirole = PlanetscaleFunctions.getNekiRole(GetNekiRoleArgs.builder()
                .branch("...my_branch...")
                .database("...my_database...")
                .id("...my_id...")
                .organization("...my_organization...")
                .build());
    
        }
    }
    
    variables:
      myNekirole:
        fn::invoke:
          function: planetscale:getNekiRole
          arguments:
            branch: '...my_branch...'
            database: '...my_database...'
            id: '...my_id...'
            organization: '...my_organization...'
    
    Example coming soon!
    

    Using getNekiRole

    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 getNekiRole(args: GetNekiRoleArgs, opts?: InvokeOptions): Promise<GetNekiRoleResult>
    function getNekiRoleOutput(args: GetNekiRoleOutputArgs, opts?: InvokeOutputOptions): Output<GetNekiRoleResult>
    def get_neki_role(branch: Optional[str] = None,
                      database: Optional[str] = None,
                      id: Optional[str] = None,
                      organization: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetNekiRoleResult
    def get_neki_role_output(branch: pulumi.Input[Optional[str]] = None,
                      database: pulumi.Input[Optional[str]] = None,
                      id: pulumi.Input[Optional[str]] = None,
                      organization: pulumi.Input[Optional[str]] = None,
                      opts: Optional[InvokeOutputOptions] = None) -> Output[GetNekiRoleResult]
    func LookupNekiRole(ctx *Context, args *LookupNekiRoleArgs, opts ...InvokeOption) (*LookupNekiRoleResult, error)
    func LookupNekiRoleOutput(ctx *Context, args *LookupNekiRoleOutputArgs, opts ...InvokeOption) LookupNekiRoleResultOutput

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

    public static class GetNekiRole 
    {
        public static Task<GetNekiRoleResult> InvokeAsync(GetNekiRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetNekiRoleResult> Invoke(GetNekiRoleInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetNekiRoleResult> Invoke(GetNekiRoleInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetNekiRoleResult> getNekiRole(GetNekiRoleArgs args, InvokeOptions options)
    public static Output<GetNekiRoleResult> getNekiRole(GetNekiRoleArgs args, InvokeOptions options)
    public static Output<GetNekiRoleResult> getNekiRole(GetNekiRoleArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: planetscale:index/getNekiRole:getNekiRole
      arguments:
        # arguments dictionary
    data "planetscale_get_neki_role" "name" {
        # arguments
    }

    The following arguments are supported:

    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Id string
    The ID of the role
    Organization string
    Organization name slug from list_organizations. Example: acme.
    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Id string
    The ID of the role
    Organization string
    Organization name slug from list_organizations. Example: acme.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    id string
    The ID of the role
    organization string
    Organization name slug from list_organizations. Example: acme.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    id String
    The ID of the role
    organization String
    Organization name slug from list_organizations. Example: acme.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    id string
    The ID of the role
    organization string
    Organization name slug from list_organizations. Example: acme.
    branch str
    Branch name from list_branches. Example: main.
    database str
    Database name slug from list_databases. Example: app-db.
    id str
    The ID of the role
    organization str
    Organization name slug from list_organizations. Example: acme.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    id String
    The ID of the role
    organization String
    Organization name slug from list_organizations. Example: acme.

    getNekiRole Result

    The following output properties are available:

    AccessHostUrl string
    The database connection string
    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    ExpiresAt string
    When the role expires
    Id string
    The ID of the role
    InheritedRoles List<string>
    Database roles these credentials inherit
    Name string
    The name of the role
    Organization string
    Organization name slug from list_organizations. Example: acme.
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    Ttl double
    Number of seconds before the credentials expire
    Username string
    The database user name
    WithReplication bool
    Whether the role has the REPLICATION attribute
    AccessHostUrl string
    The database connection string
    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    ExpiresAt string
    When the role expires
    Id string
    The ID of the role
    InheritedRoles []string
    Database roles these credentials inherit
    Name string
    The name of the role
    Organization string
    Organization name slug from list_organizations. Example: acme.
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    Ttl float64
    Number of seconds before the credentials expire
    Username string
    The database user name
    WithReplication bool
    Whether the role has the REPLICATION attribute
    access_host_url string
    The database connection string
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    expires_at string
    When the role expires
    id string
    The ID of the role
    inherited_roles list(string)
    Database roles these credentials inherit
    name string
    The name of the role
    organization string
    Organization name slug from list_organizations. Example: acme.
    private_access_host_url string
    The database connection string for private connections
    private_connection_service_name string
    The service name to set up private connectivity
    ttl number
    Number of seconds before the credentials expire
    username string
    The database user name
    with_replication bool
    Whether the role has the REPLICATION attribute
    accessHostUrl String
    The database connection string
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    expiresAt String
    When the role expires
    id String
    The ID of the role
    inheritedRoles List<String>
    Database roles these credentials inherit
    name String
    The name of the role
    organization String
    Organization name slug from list_organizations. Example: acme.
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    ttl Double
    Number of seconds before the credentials expire
    username String
    The database user name
    withReplication Boolean
    Whether the role has the REPLICATION attribute
    accessHostUrl string
    The database connection string
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    expiresAt string
    When the role expires
    id string
    The ID of the role
    inheritedRoles string[]
    Database roles these credentials inherit
    name string
    The name of the role
    organization string
    Organization name slug from list_organizations. Example: acme.
    privateAccessHostUrl string
    The database connection string for private connections
    privateConnectionServiceName string
    The service name to set up private connectivity
    ttl number
    Number of seconds before the credentials expire
    username string
    The database user name
    withReplication boolean
    Whether the role has the REPLICATION attribute
    access_host_url str
    The database connection string
    branch str
    Branch name from list_branches. Example: main.
    database str
    Database name slug from list_databases. Example: app-db.
    expires_at str
    When the role expires
    id str
    The ID of the role
    inherited_roles Sequence[str]
    Database roles these credentials inherit
    name str
    The name of the role
    organization str
    Organization name slug from list_organizations. Example: acme.
    private_access_host_url str
    The database connection string for private connections
    private_connection_service_name str
    The service name to set up private connectivity
    ttl float
    Number of seconds before the credentials expire
    username str
    The database user name
    with_replication bool
    Whether the role has the REPLICATION attribute
    accessHostUrl String
    The database connection string
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    expiresAt String
    When the role expires
    id String
    The ID of the role
    inheritedRoles List<String>
    Database roles these credentials inherit
    name String
    The name of the role
    organization String
    Organization name slug from list_organizations. Example: acme.
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    ttl Number
    Number of seconds before the credentials expire
    username String
    The database user name
    withReplication Boolean
    Whether the role has the REPLICATION attribute

    Package Details

    Repository
    planetscale planetscale/terraform-provider-planetscale
    License
    Notes
    This Pulumi package is based on the planetscale Terraform Provider.
    Viewing docs for planetscale 1.11.0
    published on Friday, Sep 18, 2026 by planetscale

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial