cyral.AccessTokenSettings
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cyral from "@pulumi/cyral";
const current = new cyral.AccessTokenSettings("current", {
defaultValidity: "36000s",
maxNumberOfTokensPerUser: 3,
maxValidity: "72000s",
offlineTokenValidation: true,
tokenLength: 16,
});
import pulumi
import pulumi_cyral as cyral
current = cyral.AccessTokenSettings("current",
default_validity="36000s",
max_number_of_tokens_per_user=3,
max_validity="72000s",
offline_token_validation=True,
token_length=16)
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 {
_, err := cyral.NewAccessTokenSettings(ctx, "current", &cyral.AccessTokenSettingsArgs{
DefaultValidity: pulumi.String("36000s"),
MaxNumberOfTokensPerUser: pulumi.Float64(3),
MaxValidity: pulumi.String("72000s"),
OfflineTokenValidation: pulumi.Bool(true),
TokenLength: pulumi.Float64(16),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cyral = Pulumi.Cyral;
return await Deployment.RunAsync(() =>
{
var current = new Cyral.AccessTokenSettings("current", new()
{
DefaultValidity = "36000s",
MaxNumberOfTokensPerUser = 3,
MaxValidity = "72000s",
OfflineTokenValidation = true,
TokenLength = 16,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cyral.AccessTokenSettings;
import com.pulumi.cyral.AccessTokenSettingsArgs;
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) {
var current = new AccessTokenSettings("current", AccessTokenSettingsArgs.builder()
.defaultValidity("36000s")
.maxNumberOfTokensPerUser(3)
.maxValidity("72000s")
.offlineTokenValidation(true)
.tokenLength(16)
.build());
}
}
resources:
current:
type: cyral:AccessTokenSettings
properties:
defaultValidity: 36000s
maxNumberOfTokensPerUser: 3
maxValidity: 72000s
offlineTokenValidation: true
tokenLength: 16
Create AccessTokenSettings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccessTokenSettings(name: string, args?: AccessTokenSettingsArgs, opts?: CustomResourceOptions);
@overload
def AccessTokenSettings(resource_name: str,
args: Optional[AccessTokenSettingsArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def AccessTokenSettings(resource_name: str,
opts: Optional[ResourceOptions] = None,
default_validity: Optional[str] = None,
max_number_of_tokens_per_user: Optional[float] = None,
max_validity: Optional[str] = None,
offline_token_validation: Optional[bool] = None,
token_length: Optional[float] = None)
func NewAccessTokenSettings(ctx *Context, name string, args *AccessTokenSettingsArgs, opts ...ResourceOption) (*AccessTokenSettings, error)
public AccessTokenSettings(string name, AccessTokenSettingsArgs? args = null, CustomResourceOptions? opts = null)
public AccessTokenSettings(String name, AccessTokenSettingsArgs args)
public AccessTokenSettings(String name, AccessTokenSettingsArgs args, CustomResourceOptions options)
type: cyral:AccessTokenSettings
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccessTokenSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AccessTokenSettingsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccessTokenSettingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessTokenSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccessTokenSettingsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var accessTokenSettingsResource = new Cyral.AccessTokenSettings("accessTokenSettingsResource", new()
{
DefaultValidity = "string",
MaxNumberOfTokensPerUser = 0,
MaxValidity = "string",
OfflineTokenValidation = false,
TokenLength = 0,
});
example, err := cyral.NewAccessTokenSettings(ctx, "accessTokenSettingsResource", &cyral.AccessTokenSettingsArgs{
DefaultValidity: pulumi.String("string"),
MaxNumberOfTokensPerUser: pulumi.Float64(0),
MaxValidity: pulumi.String("string"),
OfflineTokenValidation: pulumi.Bool(false),
TokenLength: pulumi.Float64(0),
})
var accessTokenSettingsResource = new AccessTokenSettings("accessTokenSettingsResource", AccessTokenSettingsArgs.builder()
.defaultValidity("string")
.maxNumberOfTokensPerUser(0)
.maxValidity("string")
.offlineTokenValidation(false)
.tokenLength(0)
.build());
access_token_settings_resource = cyral.AccessTokenSettings("accessTokenSettingsResource",
default_validity="string",
max_number_of_tokens_per_user=0,
max_validity="string",
offline_token_validation=False,
token_length=0)
const accessTokenSettingsResource = new cyral.AccessTokenSettings("accessTokenSettingsResource", {
defaultValidity: "string",
maxNumberOfTokensPerUser: 0,
maxValidity: "string",
offlineTokenValidation: false,
tokenLength: 0,
});
type: cyral:AccessTokenSettings
properties:
defaultValidity: string
maxNumberOfTokensPerUser: 0
maxValidity: string
offlineTokenValidation: false
tokenLength: 0
AccessTokenSettings Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AccessTokenSettings resource accepts the following input properties:
- 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. - 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. - 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. - 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. - 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. - 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. - 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
.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessTokenSettings resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AccessTokenSettings Resource
Get an existing AccessTokenSettings resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccessTokenSettingsState, opts?: CustomResourceOptions): AccessTokenSettings
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
default_validity: Optional[str] = None,
max_number_of_tokens_per_user: Optional[float] = None,
max_validity: Optional[str] = None,
offline_token_validation: Optional[bool] = None,
token_length: Optional[float] = None) -> AccessTokenSettings
func GetAccessTokenSettings(ctx *Context, name string, id IDInput, state *AccessTokenSettingsState, opts ...ResourceOption) (*AccessTokenSettings, error)
public static AccessTokenSettings Get(string name, Input<string> id, AccessTokenSettingsState? state, CustomResourceOptions? opts = null)
public static AccessTokenSettings get(String name, Output<String> id, AccessTokenSettingsState state, CustomResourceOptions options)
resources: _: type: cyral:AccessTokenSettings get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- 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. - 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. - 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. - 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. - 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. - 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. - 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.