access_keys_lifetime
Creates, updates, deletes, gets or lists an access_keys_lifetime resource.
Overview​
| Name | access_keys_lifetime |
| Type | Resource |
| Id | sumologic.policies.access_keys_lifetime |
Fields​
The following fields are returned by SELECT queries:
- get
The Access Key Lifetime Policy.
| Name | Datatype | Description |
|---|---|---|
access_keys_lifetime_in_days | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | region | 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. | |
update | update | region, access_keys_lifetime_in_days | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | Sumo 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
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​
- update
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;