get Auth Backend Role Id
suspend fun getAuthBackendRoleId(argument: GetAuthBackendRoleIdPlainArgs): GetAuthBackendRoleIdResult
Reads the Role ID of an AppRole from a Vault server.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
export = async () => {
const role = await vault.appRole.getAuthBackendRoleId({
backend: "my-approle-backend",
roleName: "my-role",
});
return {
"role-id": role.roleId,
};
}
Content copied to clipboard
import pulumi
import pulumi_vault as vault
role = vault.appRole.get_auth_backend_role_id(backend="my-approle-backend",
role_name="my-role")
pulumi.export("role-id", role.role_id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var role = Vault.AppRole.GetAuthBackendRoleId.Invoke(new()
{
Backend = "my-approle-backend",
RoleName = "my-role",
});
return new Dictionary<string, object?>
{
["role-id"] = role.Apply(getAuthBackendRoleIdResult => getAuthBackendRoleIdResult.RoleId),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/approle"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
role, err := approle.GetAuthBackendRoleId(ctx, &approle.GetAuthBackendRoleIdArgs{
Backend: pulumi.StringRef("my-approle-backend"),
RoleName: "my-role",
}, nil)
if err != nil {
return err
}
ctx.Export("role-id", role.RoleId)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.appRole.AppRoleFunctions;
import com.pulumi.vault.appRole.inputs.GetAuthBackendRoleIdArgs;
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 role = AppRoleFunctions.getAuthBackendRoleId(GetAuthBackendRoleIdArgs.builder()
.backend("my-approle-backend")
.roleName("my-role")
.build());
ctx.export("role-id", role.roleId());
}
}
Content copied to clipboard
variables:
role:
fn::invoke:
function: vault:appRole:getAuthBackendRoleId
arguments:
backend: my-approle-backend
roleName: my-role
outputs:
role-id: ${role.roleId}
Content copied to clipboard
Return
A collection of values returned by getAuthBackendRoleId.
Parameters
argument
A collection of arguments for invoking getAuthBackendRoleId.
suspend fun getAuthBackendRoleId(backend: String? = null, namespace: String? = null, roleName: String): GetAuthBackendRoleIdResult
Return
A collection of values returned by getAuthBackendRoleId.
Parameters
backend
The unique name for the AppRole backend the role to retrieve a RoleID for resides in. Defaults to "approle".
namespace
The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.
role Name
The name of the role to retrieve the Role ID for.
See also
suspend fun getAuthBackendRoleId(argument: suspend GetAuthBackendRoleIdPlainArgsBuilder.() -> Unit): GetAuthBackendRoleIdResult
Return
A collection of values returned by getAuthBackendRoleId.
Parameters
argument
Builder for com.pulumi.vault.appRole.kotlin.inputs.GetAuthBackendRoleIdPlainArgs.