Skip to main content

access_keys_lifetime

Creates, updates, deletes, gets or lists an access_keys_lifetime resource.

Overview​

Nameaccess_keys_lifetime
TypeResource
Idsumologic.policies.access_keys_lifetime

Fields​

The following fields are returned by SELECT queries:

The Access Key Lifetime Policy.

NameDatatypeDescription
access_keys_lifetime_in_daysstringThe number of days it will take for an access key to expire without being rotated/copied. Setting it to 0 (never) means that access keys will never expire. Valid values are: 0, 30, 45, 60, 90, 180, or 365 (pattern: <code>^(0|30|45|60|90|180|365)$</code>, example: 60, x-pattern-message: must be one of the following: 0, 30, 45, 60, 90, 180, or 365) (wire: accessKeysLifetimeInDays)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregionGet access key lifetime policy. This policy defines the maximum time an access key has once it has been created or rotated before it must be rotated. Otherwise, it will no longer be able to be used. The value 0 represents that the access keys will never expire and the time specified can be configured by the organization.
updateupdateregion, access_keys_lifetime_in_daysSets the access keys lifetime policy. By setting this policy, the time an access key has to live before it is expired or must be rotated is defined based on the period (default = never) configured for the organization. Setting the value to 0 would represent that the access keys never expire.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringSumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT)

SELECT examples​

Get access key lifetime policy. This policy defines the maximum time an access key has once it has been created or rotated before it must be rotated. Otherwise, it will no longer be able to be used. The value 0 represents that the access keys will never expire and the time specified can be configured by the organization.

SELECT
access_keys_lifetime_in_days
FROM sumologic.policies.access_keys_lifetime
WHERE region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;

UPDATE examples​

Sets the access keys lifetime policy. By setting this policy, the time an access key has to live before it is expired or must be rotated is defined based on the period (default = never) configured for the organization. Setting the value to 0 would represent that the access keys never expire.

UPDATE sumologic.policies.access_keys_lifetime
SET
access_keys_lifetime_in_days = '{{ access_keys_lifetime_in_days }}'
WHERE
region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
AND access_keys_lifetime_in_days = '{{ access_keys_lifetime_in_days }}' --required
RETURNING
access_keys_lifetime_in_days;