cyral 4.16.3 published on Monday, Apr 14, 2025 by cyralinc
cyral.getAccessTokenSettings
Explore with Pulumi AI
# cyral.AccessTokenSettings (Data Source)
Retrieves the access token settings. See also the resource cyral.AccessTokenSettings
.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cyral from "@pulumi/cyral";
const tokenSettings = cyral.getAccessTokenSettings({});
export const maxValidity = tokenSettings.then(tokenSettings => tokenSettings.maxValidity);
export const defaultValidity = tokenSettings.then(tokenSettings => tokenSettings.defaultValidity);
export const maxNumberOfTokensPerUser = tokenSettings.then(tokenSettings => tokenSettings.maxNumberOfTokensPerUser);
export const offlineTokenValidation = tokenSettings.then(tokenSettings => tokenSettings.offlineTokenValidation);
export const tokenLength = tokenSettings.then(tokenSettings => tokenSettings.tokenLength);
import pulumi
import pulumi_cyral as cyral
token_settings = cyral.get_access_token_settings()
pulumi.export("maxValidity", token_settings.max_validity)
pulumi.export("defaultValidity", token_settings.default_validity)
pulumi.export("maxNumberOfTokensPerUser", token_settings.max_number_of_tokens_per_user)
pulumi.export("offlineTokenValidation", token_settings.offline_token_validation)
pulumi.export("tokenLength", token_settings.token_length)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/cyral/v4/cyral"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tokenSettings, err := cyral.LookupAccessTokenSettings(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
ctx.Export("maxValidity", tokenSettings.MaxValidity)
ctx.Export("defaultValidity", tokenSettings.DefaultValidity)
ctx.Export("maxNumberOfTokensPerUser", tokenSettings.MaxNumberOfTokensPerUser)
ctx.Export("offlineTokenValidation", tokenSettings.OfflineTokenValidation)
ctx.Export("tokenLength", tokenSettings.TokenLength)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cyral = Pulumi.Cyral;
return await Deployment.RunAsync(() =>
{
var tokenSettings = Cyral.GetAccessTokenSettings.Invoke();
return new Dictionary<string, object?>
{
["maxValidity"] = tokenSettings.Apply(getAccessTokenSettingsResult => getAccessTokenSettingsResult.MaxValidity),
["defaultValidity"] = tokenSettings.Apply(getAccessTokenSettingsResult => getAccessTokenSettingsResult.DefaultValidity),
["maxNumberOfTokensPerUser"] = tokenSettings.Apply(getAccessTokenSettingsResult => getAccessTokenSettingsResult.MaxNumberOfTokensPerUser),
["offlineTokenValidation"] = tokenSettings.Apply(getAccessTokenSettingsResult => getAccessTokenSettingsResult.OfflineTokenValidation),
["tokenLength"] = tokenSettings.Apply(getAccessTokenSettingsResult => getAccessTokenSettingsResult.TokenLength),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cyral.CyralFunctions;
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 tokenSettings = CyralFunctions.getAccessTokenSettings();
ctx.export("maxValidity", tokenSettings.applyValue(getAccessTokenSettingsResult -> getAccessTokenSettingsResult.maxValidity()));
ctx.export("defaultValidity", tokenSettings.applyValue(getAccessTokenSettingsResult -> getAccessTokenSettingsResult.defaultValidity()));
ctx.export("maxNumberOfTokensPerUser", tokenSettings.applyValue(getAccessTokenSettingsResult -> getAccessTokenSettingsResult.maxNumberOfTokensPerUser()));
ctx.export("offlineTokenValidation", tokenSettings.applyValue(getAccessTokenSettingsResult -> getAccessTokenSettingsResult.offlineTokenValidation()));
ctx.export("tokenLength", tokenSettings.applyValue(getAccessTokenSettingsResult -> getAccessTokenSettingsResult.tokenLength()));
}
}
variables:
tokenSettings:
fn::invoke:
function: cyral:getAccessTokenSettings
arguments: {}
outputs:
maxValidity: ${tokenSettings.maxValidity}
defaultValidity: ${tokenSettings.defaultValidity}
maxNumberOfTokensPerUser: ${tokenSettings.maxNumberOfTokensPerUser}
offlineTokenValidation: ${tokenSettings.offlineTokenValidation}
tokenLength: ${tokenSettings.tokenLength}
Using getAccessTokenSettings
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 getAccessTokenSettings(opts?: InvokeOptions): Promise<GetAccessTokenSettingsResult>
function getAccessTokenSettingsOutput(opts?: InvokeOptions): Output<GetAccessTokenSettingsResult>
def get_access_token_settings(opts: Optional[InvokeOptions] = None) -> GetAccessTokenSettingsResult
def get_access_token_settings_output(opts: Optional[InvokeOptions] = None) -> Output[GetAccessTokenSettingsResult]
func LookupAccessTokenSettings(ctx *Context, opts ...InvokeOption) (*LookupAccessTokenSettingsResult, error)
func LookupAccessTokenSettingsOutput(ctx *Context, opts ...InvokeOption) LookupAccessTokenSettingsResultOutput
> Note: This function is named LookupAccessTokenSettings
in the Go SDK.
public static class GetAccessTokenSettings
{
public static Task<GetAccessTokenSettingsResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetAccessTokenSettingsResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccessTokenSettingsResult> getAccessTokenSettings(InvokeOptions options)
public static Output<GetAccessTokenSettingsResult> getAccessTokenSettings(InvokeOptions options)
fn::invoke:
function: cyral:index/getAccessTokenSettings:getAccessTokenSettings
arguments:
# arguments dictionary
getAccessTokenSettings Result
The following output properties are available:
- Default
Validity string - The default duration used for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - Id string
- The data source identifier. It's set as
settings/access_token
. - Max
Number doubleOf Tokens Per User - The maximum number of access tokens that a user can have at the same time. Must be between
1
and5
(inclusive). Defaults to3
. - Max
Validity string - The maximum duration that a user can request for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - Offline
Token boolValidation - The configuration that determines if the sidecar should perform access token validation independently using cached token values. If this is
true
, the sidecar will be able to validate and authenticate database access even when it cannot reach the Control Plane. Defaults totrue
. - Token
Length double - The number of characters of the access token plaintext value. Valid values are
8
,12
and16
. Defaults to16
.
- Default
Validity string - The default duration used for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - Id string
- The data source identifier. It's set as
settings/access_token
. - Max
Number float64Of Tokens Per User - The maximum number of access tokens that a user can have at the same time. Must be between
1
and5
(inclusive). Defaults to3
. - Max
Validity string - The maximum duration that a user can request for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - Offline
Token boolValidation - The configuration that determines if the sidecar should perform access token validation independently using cached token values. If this is
true
, the sidecar will be able to validate and authenticate database access even when it cannot reach the Control Plane. Defaults totrue
. - Token
Length float64 - The number of characters of the access token plaintext value. Valid values are
8
,12
and16
. Defaults to16
.
- default
Validity String - The default duration used for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - id String
- The data source identifier. It's set as
settings/access_token
. - max
Number DoubleOf Tokens Per User - The maximum number of access tokens that a user can have at the same time. Must be between
1
and5
(inclusive). Defaults to3
. - max
Validity String - The maximum duration that a user can request for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - offline
Token BooleanValidation - The configuration that determines if the sidecar should perform access token validation independently using cached token values. If this is
true
, the sidecar will be able to validate and authenticate database access even when it cannot reach the Control Plane. Defaults totrue
. - token
Length Double - The number of characters of the access token plaintext value. Valid values are
8
,12
and16
. Defaults to16
.
- default
Validity string - The default duration used for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - id string
- The data source identifier. It's set as
settings/access_token
. - max
Number numberOf Tokens Per User - The maximum number of access tokens that a user can have at the same time. Must be between
1
and5
(inclusive). Defaults to3
. - max
Validity string - The maximum duration that a user can request for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - offline
Token booleanValidation - The configuration that determines if the sidecar should perform access token validation independently using cached token values. If this is
true
, the sidecar will be able to validate and authenticate database access even when it cannot reach the Control Plane. Defaults totrue
. - token
Length number - The number of characters of the access token plaintext value. Valid values are
8
,12
and16
. Defaults to16
.
- default_
validity str - The default duration used for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - id str
- The data source identifier. It's set as
settings/access_token
. - max_
number_ floatof_ tokens_ per_ user - The maximum number of access tokens that a user can have at the same time. Must be between
1
and5
(inclusive). Defaults to3
. - max_
validity str - The maximum duration that a user can request for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - offline_
token_ boolvalidation - The configuration that determines if the sidecar should perform access token validation independently using cached token values. If this is
true
, the sidecar will be able to validate and authenticate database access even when it cannot reach the Control Plane. Defaults totrue
. - token_
length float - The number of characters of the access token plaintext value. Valid values are
8
,12
and16
. Defaults to16
.
- default
Validity String - The default duration used for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - id String
- The data source identifier. It's set as
settings/access_token
. - max
Number NumberOf Tokens Per User - The maximum number of access tokens that a user can have at the same time. Must be between
1
and5
(inclusive). Defaults to3
. - max
Validity String - The maximum duration that a user can request for access token validity. Defaults to
36000s
. Should follow the protobuf duration string format, which corresponds to a sequence of decimal numbers suffixed by a 's' at the end, representing the duration in seconds. For example:300s
,60s
,10.50s
, etc. - offline
Token BooleanValidation - The configuration that determines if the sidecar should perform access token validation independently using cached token values. If this is
true
, the sidecar will be able to validate and authenticate database access even when it cannot reach the Control Plane. Defaults totrue
. - token
Length Number - The number of characters of the access token plaintext value. Valid values are
8
,12
and16
. Defaults to16
.
Package Details
- Repository
- cyral cyralinc/terraform-provider-cyral
- License
- Notes
- This Pulumi package is based on the
cyral
Terraform Provider.