Use this data source to retrieve information about an Okta API token.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = okta.getApiToken({
id: "00T1fxzubpq2epw11d38",
});
import pulumi
import pulumi_okta as okta
example = okta.get_api_token(id="00T1fxzubpq2epw11d38")
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v6/go/okta"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := okta.LookupApiToken(ctx, &okta.LookupApiTokenArgs{
Id: "00T1fxzubpq2epw11d38",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var example = Okta.GetApiToken.Invoke(new()
{
Id = "00T1fxzubpq2epw11d38",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.OktaFunctions;
import com.pulumi.okta.inputs.GetApiTokenArgs;
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 example = OktaFunctions.getApiToken(GetApiTokenArgs.builder()
.id("00T1fxzubpq2epw11d38")
.build());
}
}
variables:
example:
fn::invoke:
function: okta:getApiToken
arguments:
id: 00T1fxzubpq2epw11d38
Using getApiToken
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 getApiToken(args: GetApiTokenArgs, opts?: InvokeOptions): Promise<GetApiTokenResult>
function getApiTokenOutput(args: GetApiTokenOutputArgs, opts?: InvokeOptions): Output<GetApiTokenResult>def get_api_token(id: Optional[str] = None,
network: Optional[GetApiTokenNetwork] = None,
opts: Optional[InvokeOptions] = None) -> GetApiTokenResult
def get_api_token_output(id: Optional[pulumi.Input[str]] = None,
network: Optional[pulumi.Input[GetApiTokenNetworkArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApiTokenResult]func LookupApiToken(ctx *Context, args *LookupApiTokenArgs, opts ...InvokeOption) (*LookupApiTokenResult, error)
func LookupApiTokenOutput(ctx *Context, args *LookupApiTokenOutputArgs, opts ...InvokeOption) LookupApiTokenResultOutput> Note: This function is named LookupApiToken in the Go SDK.
public static class GetApiToken
{
public static Task<GetApiTokenResult> InvokeAsync(GetApiTokenArgs args, InvokeOptions? opts = null)
public static Output<GetApiTokenResult> Invoke(GetApiTokenInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetApiTokenResult> getApiToken(GetApiTokenArgs args, InvokeOptions options)
public static Output<GetApiTokenResult> getApiToken(GetApiTokenArgs args, InvokeOptions options)
fn::invoke:
function: okta:index/getApiToken:getApiToken
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- The unique identifier of the API token.
- Network
Get
Api Token Network - The network configuration of the API token.
- Id string
- The unique identifier of the API token.
- Network
Get
Api Token Network - The network configuration of the API token.
- id String
- The unique identifier of the API token.
- network
Get
Api Token Network - The network configuration of the API token.
- id string
- The unique identifier of the API token.
- network
Get
Api Token Network - The network configuration of the API token.
- id str
- The unique identifier of the API token.
- network
Get
Api Token Network - The network configuration of the API token.
- id String
- The unique identifier of the API token.
- network Property Map
- The network configuration of the API token.
getApiToken Result
The following output properties are available:
- Client
Name string - The name of the API token client.
- Created string
- The date and time the API token was created.
- Id string
- The unique identifier of the API token.
- Name string
- The name of the API token.
- User
Id string - The userId of the user who created the API Token.
- Network
Get
Api Token Network - The network configuration of the API token.
- Client
Name string - The name of the API token client.
- Created string
- The date and time the API token was created.
- Id string
- The unique identifier of the API token.
- Name string
- The name of the API token.
- User
Id string - The userId of the user who created the API Token.
- Network
Get
Api Token Network - The network configuration of the API token.
- client
Name String - The name of the API token client.
- created String
- The date and time the API token was created.
- id String
- The unique identifier of the API token.
- name String
- The name of the API token.
- user
Id String - The userId of the user who created the API Token.
- network
Get
Api Token Network - The network configuration of the API token.
- client
Name string - The name of the API token client.
- created string
- The date and time the API token was created.
- id string
- The unique identifier of the API token.
- name string
- The name of the API token.
- user
Id string - The userId of the user who created the API Token.
- network
Get
Api Token Network - The network configuration of the API token.
- client_
name str - The name of the API token client.
- created str
- The date and time the API token was created.
- id str
- The unique identifier of the API token.
- name str
- The name of the API token.
- user_
id str - The userId of the user who created the API Token.
- network
Get
Api Token Network - The network configuration of the API token.
- client
Name String - The name of the API token client.
- created String
- The date and time the API token was created.
- id String
- The unique identifier of the API token.
- name String
- The name of the API token.
- user
Id String - The userId of the user who created the API Token.
- network Property Map
- The network configuration of the API token.
Supporting Types
GetApiTokenNetwork
- Connection string
- The connection type of the Network Condition.
- Excludes List<string>
- The IP address the excluded zone.
- Includes List<string>
- The IP address the included zone.
- Connection string
- The connection type of the Network Condition.
- Excludes []string
- The IP address the excluded zone.
- Includes []string
- The IP address the included zone.
- connection String
- The connection type of the Network Condition.
- excludes List<String>
- The IP address the excluded zone.
- includes List<String>
- The IP address the included zone.
- connection string
- The connection type of the Network Condition.
- excludes string[]
- The IP address the excluded zone.
- includes string[]
- The IP address the included zone.
- connection str
- The connection type of the Network Condition.
- excludes Sequence[str]
- The IP address the excluded zone.
- includes Sequence[str]
- The IP address the included zone.
- connection String
- The connection type of the Network Condition.
- excludes List<String>
- The IP address the excluded zone.
- includes List<String>
- The IP address the included zone.
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oktaTerraform Provider.
