1. Packages
  2. Akeyless Provider
  3. API Docs
  4. getAuthMethod
akeyless 1.9.0 published on Monday, Apr 14, 2025 by akeyless-community

akeyless.getAuthMethod

Explore with Pulumi AI

akeyless logo
akeyless 1.9.0 published on Monday, Apr 14, 2025 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/akeyless"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := akeyless.LookupAuthMethod(ctx, &akeyless.LookupAuthMethodArgs{
    			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: Optional[pulumi.Input[str]] = None,
                        path: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetAuthMethodResult]
    func LookupAuthMethod(ctx *Context, args *LookupAuthMethodArgs, opts ...InvokeOption) (*LookupAuthMethodResult, error)
    func LookupAuthMethodOutput(ctx *Context, args *LookupAuthMethodOutputArgs, opts ...InvokeOption) LookupAuthMethodResultOutput

    > Note: This function is named LookupAuthMethod 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 secret is stored. Defaults to the latest version.
    Id string
    The ID of this resource.
    Path string
    The path where the secret is stored. Defaults to the latest version.
    Id string
    The ID of this resource.
    path String
    The path where the secret is stored. Defaults to the latest version.
    id String
    The ID of this resource.
    path string
    The path where the secret is stored. Defaults to the latest version.
    id string
    The ID of this resource.
    path str
    The path where the secret is stored. Defaults to the latest version.
    id str
    The ID of this resource.
    path String
    The path where the secret is stored. Defaults to the latest version.
    id String
    The ID of this resource.

    getAuthMethod Result

    The following output properties are available:

    AccessId string
    The version of the secret.
    AccountId string
    The version of the secret.
    Id string
    The ID of this resource.
    Path string
    The path where the secret is stored. Defaults to the latest version.
    AccessId string
    The version of the secret.
    AccountId string
    The version of the secret.
    Id string
    The ID of this resource.
    Path string
    The path where the secret is stored. Defaults to the latest version.
    accessId String
    The version of the secret.
    accountId String
    The version of the secret.
    id String
    The ID of this resource.
    path String
    The path where the secret is stored. Defaults to the latest version.
    accessId string
    The version of the secret.
    accountId string
    The version of the secret.
    id string
    The ID of this resource.
    path string
    The path where the secret is stored. Defaults to the latest version.
    access_id str
    The version of the secret.
    account_id str
    The version of the secret.
    id str
    The ID of this resource.
    path str
    The path where the secret is stored. Defaults to the latest version.
    accessId String
    The version of the secret.
    accountId String
    The version of the secret.
    id String
    The ID of this resource.
    path String
    The path where the secret is stored. Defaults to the latest version.

    Package Details

    Repository
    akeyless akeyless-community/terraform-provider-akeyless
    License
    Notes
    This Pulumi package is based on the akeyless Terraform Provider.
    akeyless logo
    akeyless 1.9.0 published on Monday, Apr 14, 2025 by akeyless-community