1. Packages
  2. Packages
  3. Akeyless Provider
  4. API Docs
  5. getAuthMethod
Viewing docs for akeyless 2.0.1
published on Monday, Apr 27, 2026 by akeyless-community
Viewing docs for akeyless 2.0.1
published on Monday, Apr 27, 2026 by akeyless-community

    Auth Method data source

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as akeyless from "@pulumi/akeyless";
    
    const apiKey = akeyless.getAuthMethod({
        path: "terraform/auth-method-api-key",
    });
    
    import pulumi
    import pulumi_akeyless as akeyless
    
    api_key = akeyless.get_auth_method(path="terraform/auth-method-api-key")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/akeyless/v2/akeyless"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := akeyless.GetAuthMethod(ctx, &akeyless.GetAuthMethodArgs{
    			Path: "terraform/auth-method-api-key",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Akeyless = Pulumi.Akeyless;
    
    return await Deployment.RunAsync(() => 
    {
        var apiKey = Akeyless.GetAuthMethod.Invoke(new()
        {
            Path = "terraform/auth-method-api-key",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.akeyless.AkeylessFunctions;
    import com.pulumi.akeyless.inputs.GetAuthMethodArgs;
    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 apiKey = AkeylessFunctions.getAuthMethod(GetAuthMethodArgs.builder()
                .path("terraform/auth-method-api-key")
                .build());
    
        }
    }
    
    variables:
      apiKey:
        fn::invoke:
          function: akeyless:getAuthMethod
          arguments:
            path: terraform/auth-method-api-key
    

    Using getAuthMethod

    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 getAuthMethod(args: GetAuthMethodArgs, opts?: InvokeOptions): Promise<GetAuthMethodResult>
    function getAuthMethodOutput(args: GetAuthMethodOutputArgs, opts?: InvokeOptions): Output<GetAuthMethodResult>
    def get_auth_method(id: Optional[str] = None,
                        path: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetAuthMethodResult
    def get_auth_method_output(id: pulumi.Input[Optional[str]] = None,
                        path: pulumi.Input[Optional[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetAuthMethodResult]
    func GetAuthMethod(ctx *Context, args *GetAuthMethodArgs, opts ...InvokeOption) (*GetAuthMethodResult, error)
    func GetAuthMethodOutput(ctx *Context, args *GetAuthMethodOutputArgs, opts ...InvokeOption) GetAuthMethodResultOutput

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

    public static class GetAuthMethod 
    {
        public static Task<GetAuthMethodResult> InvokeAsync(GetAuthMethodArgs args, InvokeOptions? opts = null)
        public static Output<GetAuthMethodResult> Invoke(GetAuthMethodInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAuthMethodResult> getAuthMethod(GetAuthMethodArgs args, InvokeOptions options)
    public static Output<GetAuthMethodResult> getAuthMethod(GetAuthMethodArgs args, InvokeOptions options)
    
    fn::invoke:
      function: akeyless:index/getAuthMethod:getAuthMethod
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Path string
    The path where the auth method is stored.
    Id string
    The ID of this resource.
    Path string
    The path where the auth method is stored.
    Id string
    The ID of this resource.
    path String
    The path where the auth method is stored.
    id String
    The ID of this resource.
    path string
    The path where the auth method is stored.
    id string
    The ID of this resource.
    path str
    The path where the auth method is stored.
    id str
    The ID of this resource.
    path String
    The path where the auth method is stored.
    id String
    The ID of this resource.

    getAuthMethod Result

    The following output properties are available:

    AccessDate string
    The access date of the auth method.
    AccessDateDisplay string
    The display format of the access date.
    AccessId string
    The access ID of the auth method.
    AccountId string
    The account ID associated with the auth method.
    AssociatedGwIds List<double>
    The list of gateway IDs associated with the auth method.
    AuthMethodId double
    The unique identifier of the auth method.
    AuthMethodName string
    The name of the auth method.
    ClientPermissions List<string>
    The list of client permissions.
    CreationDate string
    The creation date of the auth method.
    DeleteProtection bool
    Whether delete protection is enabled.
    Description string
    The description of the auth method.
    Id string
    The ID of this resource.
    IsApproved bool
    Whether the auth method is approved.
    ModificationDate string
    The modification date of the auth method.
    Path string
    The path where the auth method is stored.
    AccessDate string
    The access date of the auth method.
    AccessDateDisplay string
    The display format of the access date.
    AccessId string
    The access ID of the auth method.
    AccountId string
    The account ID associated with the auth method.
    AssociatedGwIds []float64
    The list of gateway IDs associated with the auth method.
    AuthMethodId float64
    The unique identifier of the auth method.
    AuthMethodName string
    The name of the auth method.
    ClientPermissions []string
    The list of client permissions.
    CreationDate string
    The creation date of the auth method.
    DeleteProtection bool
    Whether delete protection is enabled.
    Description string
    The description of the auth method.
    Id string
    The ID of this resource.
    IsApproved bool
    Whether the auth method is approved.
    ModificationDate string
    The modification date of the auth method.
    Path string
    The path where the auth method is stored.
    accessDate String
    The access date of the auth method.
    accessDateDisplay String
    The display format of the access date.
    accessId String
    The access ID of the auth method.
    accountId String
    The account ID associated with the auth method.
    associatedGwIds List<Double>
    The list of gateway IDs associated with the auth method.
    authMethodId Double
    The unique identifier of the auth method.
    authMethodName String
    The name of the auth method.
    clientPermissions List<String>
    The list of client permissions.
    creationDate String
    The creation date of the auth method.
    deleteProtection Boolean
    Whether delete protection is enabled.
    description String
    The description of the auth method.
    id String
    The ID of this resource.
    isApproved Boolean
    Whether the auth method is approved.
    modificationDate String
    The modification date of the auth method.
    path String
    The path where the auth method is stored.
    accessDate string
    The access date of the auth method.
    accessDateDisplay string
    The display format of the access date.
    accessId string
    The access ID of the auth method.
    accountId string
    The account ID associated with the auth method.
    associatedGwIds number[]
    The list of gateway IDs associated with the auth method.
    authMethodId number
    The unique identifier of the auth method.
    authMethodName string
    The name of the auth method.
    clientPermissions string[]
    The list of client permissions.
    creationDate string
    The creation date of the auth method.
    deleteProtection boolean
    Whether delete protection is enabled.
    description string
    The description of the auth method.
    id string
    The ID of this resource.
    isApproved boolean
    Whether the auth method is approved.
    modificationDate string
    The modification date of the auth method.
    path string
    The path where the auth method is stored.
    access_date str
    The access date of the auth method.
    access_date_display str
    The display format of the access date.
    access_id str
    The access ID of the auth method.
    account_id str
    The account ID associated with the auth method.
    associated_gw_ids Sequence[float]
    The list of gateway IDs associated with the auth method.
    auth_method_id float
    The unique identifier of the auth method.
    auth_method_name str
    The name of the auth method.
    client_permissions Sequence[str]
    The list of client permissions.
    creation_date str
    The creation date of the auth method.
    delete_protection bool
    Whether delete protection is enabled.
    description str
    The description of the auth method.
    id str
    The ID of this resource.
    is_approved bool
    Whether the auth method is approved.
    modification_date str
    The modification date of the auth method.
    path str
    The path where the auth method is stored.
    accessDate String
    The access date of the auth method.
    accessDateDisplay String
    The display format of the access date.
    accessId String
    The access ID of the auth method.
    accountId String
    The account ID associated with the auth method.
    associatedGwIds List<Number>
    The list of gateway IDs associated with the auth method.
    authMethodId Number
    The unique identifier of the auth method.
    authMethodName String
    The name of the auth method.
    clientPermissions List<String>
    The list of client permissions.
    creationDate String
    The creation date of the auth method.
    deleteProtection Boolean
    Whether delete protection is enabled.
    description String
    The description of the auth method.
    id String
    The ID of this resource.
    isApproved Boolean
    Whether the auth method is approved.
    modificationDate String
    The modification date of the auth method.
    path String
    The path where the auth method is stored.

    Package Details

    Repository
    akeyless akeyless-community/terraform-provider-akeyless
    License
    Notes
    This Pulumi package is based on the akeyless Terraform Provider.
    Viewing docs for akeyless 2.0.1
    published on Monday, Apr 27, 2026 by akeyless-community
      Try Pulumi Cloud free. Your team will thank you.