Oracle Cloud Infrastructure v0.20.0, May 31 23
Oracle Cloud Infrastructure v0.20.0, May 31 23
oci.Identity.getAuthTokens
Explore with Pulumi AI
This data source provides the list of Auth Tokens in Oracle Cloud Infrastructure Identity service.
Lists the auth tokens for the specified user. The returned object contains the token’s OCID, but not the token itself. The actual token is returned only upon creation.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testAuthTokens = Oci.Identity.GetAuthTokens.Invoke(new()
{
UserId = oci_identity_user.Test_user.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Identity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Identity.GetAuthTokens(ctx, &identity.GetAuthTokensArgs{
UserId: oci_identity_user.Test_user.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Identity.IdentityFunctions;
import com.pulumi.oci.Identity.inputs.GetAuthTokensArgs;
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 testAuthTokens = IdentityFunctions.getAuthTokens(GetAuthTokensArgs.builder()
.userId(oci_identity_user.test_user().id())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_auth_tokens = oci.Identity.get_auth_tokens(user_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAuthTokens = oci.Identity.getAuthTokens({
userId: oci_identity_user.test_user.id,
});
variables:
testAuthTokens:
fn::invoke:
Function: oci:Identity:getAuthTokens
Arguments:
userId: ${oci_identity_user.test_user.id}
Using getAuthTokens
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 getAuthTokens(args: GetAuthTokensArgs, opts?: InvokeOptions): Promise<GetAuthTokensResult>
function getAuthTokensOutput(args: GetAuthTokensOutputArgs, opts?: InvokeOptions): Output<GetAuthTokensResult>
def get_auth_tokens(filters: Optional[Sequence[_identity.GetAuthTokensFilter]] = None,
user_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAuthTokensResult
def get_auth_tokens_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_identity.GetAuthTokensFilterArgs]]]] = None,
user_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAuthTokensResult]
func GetAuthTokens(ctx *Context, args *GetAuthTokensArgs, opts ...InvokeOption) (*GetAuthTokensResult, error)
func GetAuthTokensOutput(ctx *Context, args *GetAuthTokensOutputArgs, opts ...InvokeOption) GetAuthTokensResultOutput
> Note: This function is named GetAuthTokens
in the Go SDK.
public static class GetAuthTokens
{
public static Task<GetAuthTokensResult> InvokeAsync(GetAuthTokensArgs args, InvokeOptions? opts = null)
public static Output<GetAuthTokensResult> Invoke(GetAuthTokensInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAuthTokensResult> getAuthTokens(GetAuthTokensArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Identity/getAuthTokens:getAuthTokens
arguments:
# arguments dictionary
The following arguments are supported:
- User
Id string The OCID of the user.
- Filters
List<Get
Auth Tokens Filter>
- User
Id string The OCID of the user.
- Filters
[]Get
Auth Tokens Filter
- user
Id String The OCID of the user.
- filters
List<Get
Auth Tokens Filter>
- user
Id string The OCID of the user.
- filters
Get
Auth Tokens Filter[]
- user_
id str The OCID of the user.
- filters
Get
Auth Tokens Filter]
- user
Id String The OCID of the user.
- filters List<Property Map>
getAuthTokens Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Tokens
List<Get
Auth Tokens Token> The list of tokens.
- User
Id string The OCID of the user the auth token belongs to.
- Filters
List<Get
Auth Tokens Filter>
- Id string
The provider-assigned unique ID for this managed resource.
- Tokens
[]Get
Auth Tokens Token The list of tokens.
- User
Id string The OCID of the user the auth token belongs to.
- Filters
[]Get
Auth Tokens Filter
- id String
The provider-assigned unique ID for this managed resource.
- tokens
List<Get
Auth Tokens Token> The list of tokens.
- user
Id String The OCID of the user the auth token belongs to.
- filters
List<Get
Auth Tokens Filter>
- id string
The provider-assigned unique ID for this managed resource.
- tokens
Get
Auth Tokens Token[] The list of tokens.
- user
Id string The OCID of the user the auth token belongs to.
- filters
Get
Auth Tokens Filter[]
- id str
The provider-assigned unique ID for this managed resource.
- tokens
Get
Auth Tokens Token] The list of tokens.
- user_
id str The OCID of the user the auth token belongs to.
- filters
Get
Auth Tokens Filter]
- id String
The provider-assigned unique ID for this managed resource.
- tokens List<Property Map>
The list of tokens.
- user
Id String The OCID of the user the auth token belongs to.
- filters List<Property Map>
Supporting Types
GetAuthTokensFilter
GetAuthTokensToken
- Description string
The description you assign to the auth token. Does not have to be unique, and it's changeable.
- Id string
The OCID of the auth token.
- Inactive
State string The detailed status of INACTIVE lifecycleState.
- State string
The token's current state.
- Time
Created string Date and time the
AuthToken
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- Time
Expires string Date and time when this auth token will expire, in the format defined by RFC3339. Null if it never expires. Example:
2016-08-25T21:10:29.600Z
- Token string
The auth token. The value is available only in the response for
CreateAuthToken
, and not forListAuthTokens
orUpdateAuthToken
.- User
Id string The OCID of the user.
- Description string
The description you assign to the auth token. Does not have to be unique, and it's changeable.
- Id string
The OCID of the auth token.
- Inactive
State string The detailed status of INACTIVE lifecycleState.
- State string
The token's current state.
- Time
Created string Date and time the
AuthToken
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- Time
Expires string Date and time when this auth token will expire, in the format defined by RFC3339. Null if it never expires. Example:
2016-08-25T21:10:29.600Z
- Token string
The auth token. The value is available only in the response for
CreateAuthToken
, and not forListAuthTokens
orUpdateAuthToken
.- User
Id string The OCID of the user.
- description String
The description you assign to the auth token. Does not have to be unique, and it's changeable.
- id String
The OCID of the auth token.
- inactive
State String The detailed status of INACTIVE lifecycleState.
- state String
The token's current state.
- time
Created String Date and time the
AuthToken
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- time
Expires String Date and time when this auth token will expire, in the format defined by RFC3339. Null if it never expires. Example:
2016-08-25T21:10:29.600Z
- token String
The auth token. The value is available only in the response for
CreateAuthToken
, and not forListAuthTokens
orUpdateAuthToken
.- user
Id String The OCID of the user.
- description string
The description you assign to the auth token. Does not have to be unique, and it's changeable.
- id string
The OCID of the auth token.
- inactive
State string The detailed status of INACTIVE lifecycleState.
- state string
The token's current state.
- time
Created string Date and time the
AuthToken
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- time
Expires string Date and time when this auth token will expire, in the format defined by RFC3339. Null if it never expires. Example:
2016-08-25T21:10:29.600Z
- token string
The auth token. The value is available only in the response for
CreateAuthToken
, and not forListAuthTokens
orUpdateAuthToken
.- user
Id string The OCID of the user.
- description str
The description you assign to the auth token. Does not have to be unique, and it's changeable.
- id str
The OCID of the auth token.
- inactive_
state str The detailed status of INACTIVE lifecycleState.
- state str
The token's current state.
- time_
created str Date and time the
AuthToken
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- time_
expires str Date and time when this auth token will expire, in the format defined by RFC3339. Null if it never expires. Example:
2016-08-25T21:10:29.600Z
- token str
The auth token. The value is available only in the response for
CreateAuthToken
, and not forListAuthTokens
orUpdateAuthToken
.- user_
id str The OCID of the user.
- description String
The description you assign to the auth token. Does not have to be unique, and it's changeable.
- id String
The OCID of the auth token.
- inactive
State String The detailed status of INACTIVE lifecycleState.
- state String
The token's current state.
- time
Created String Date and time the
AuthToken
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- time
Expires String Date and time when this auth token will expire, in the format defined by RFC3339. Null if it never expires. Example:
2016-08-25T21:10:29.600Z
- token String
The auth token. The value is available only in the response for
CreateAuthToken
, and not forListAuthTokens
orUpdateAuthToken
.- user
Id String The OCID of the user.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.