access_keys
Creates, updates, deletes, gets or lists an access_keys resource.
Overview
| Name | access_keys |
| Type | Resource |
| Id | sumologic.service_accounts.access_keys |
Fields
The following fields are returned by SELECT queries:
- get
- list
Access key object that was requested of a service account.
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier of the access key. (example: su0w3Q37CBzHUM) |
service_account_id | string | Identifier of the service account who owns the access key. (example: 0000000006743FDA) (wire: serviceAccountId) |
cors_headers | array | An array of domains for which the access key is valid. Whether Sumo Logic accepts or rejects an API request depends on whether it contains an ORIGIN header and the entries in the allowlist. Sumo Logic will reject: 1. Requests with an ORIGIN header but the allowlist is empty. 2. Requests with an ORIGIN header that don't match any entry in the allowlist. (wire: corsHeaders) |
created_at | string (date-time) | Creation timestamp in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format. (example: 2018-10-16T09:10:00.000Z) (wire: createdAt) |
created_by | string | Identifier of the user who created the access key. (example: 0000000006743FDD) (wire: createdBy) |
disabled | boolean | Indicates whether the access key is disabled or not. |
effective_scopes | array | Effective scopes based on the intersection of the user's RBAC capabilities and the assigned scopes. (wire: effectiveScopes) |
label | string | The name of the access key. (example: collector access key) |
last_used | string (date-time) | Last used timestamp in UTC. <br /> Note: Property not in use, it is part of an upcoming feature. (example: 2018-10-16T09:10:00.000Z) (wire: lastUsed) |
modified_at | string (date-time) | Last modification timestamp in UTC. (example: 2018-10-16T09:10:00.000Z) (wire: modifiedAt) |
modified_by | string | Identifier of the user who modified the access key. (example: 0000000006743FDD) (wire: modifiedBy) |
scopes | array | Scopes assigned to the key. ### Alerting - adminMonitorsV2 - viewMonitorsV2 - manageMonitorsV2 ### Data Management - manageApps - viewCollectors - manageCollectors - viewConnections - manageConnections - contentAdmin - viewFieldExtractionRules - manageFieldExtractionRules - viewFields - manageFields - manageBudgets - viewLibrary - manageLibrary - viewPartitions - managePartitions - manageS3DataForwarding - viewScheduledViews - manageScheduledViews - manageTokens ### Logs - runLogSearch ### Metrics - runMetricsQuery ### Reliability Management - viewSlos - manageSlos ### Security - manageAccessKeys - viewPersonalAccessKeys - managePersonalAccessKeys ### UserManagement - viewUsersAndRoles - manageUsersAndRoles |
A list of all access keys within the organization of a service account.
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier of the access key. (example: su0w3Q37CBzHUM) |
service_account_id | string | Identifier of the service account who owns the access key. (example: 0000000006743FDA) (wire: serviceAccountId) |
cors_headers | array | An array of domains for which the access key is valid. Whether Sumo Logic accepts or rejects an API request depends on whether it contains an ORIGIN header and the entries in the allowlist. Sumo Logic will reject: 1. Requests with an ORIGIN header but the allowlist is empty. 2. Requests with an ORIGIN header that don't match any entry in the allowlist. (wire: corsHeaders) |
created_at | string (date-time) | Creation timestamp in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format. (example: 2018-10-16T09:10:00.000Z) (wire: createdAt) |
created_by | string | Identifier of the user who created the access key. (example: 0000000006743FDD) (wire: createdBy) |
disabled | boolean | Indicates whether the access key is disabled or not. |
effective_scopes | array | Effective scopes based on the intersection of the user's RBAC capabilities and the assigned scopes. (wire: effectiveScopes) |
label | string | The name of the access key. (example: collector access key) |
last_used | string (date-time) | Last used timestamp in UTC. <br /> Note: Property not in use, it is part of an upcoming feature. (example: 2018-10-16T09:10:00.000Z) (wire: lastUsed) |
modified_at | string (date-time) | Last modification timestamp in UTC. (example: 2018-10-16T09:10:00.000Z) (wire: modifiedAt) |
modified_by | string | Identifier of the user who modified the access key. (example: 0000000006743FDD) (wire: modifiedBy) |
scopes | array | Scopes assigned to the key. ### Alerting - adminMonitorsV2 - viewMonitorsV2 - manageMonitorsV2 ### Data Management - manageApps - viewCollectors - manageCollectors - viewConnections - manageConnections - contentAdmin - viewFieldExtractionRules - manageFieldExtractionRules - viewFields - manageFields - manageBudgets - viewLibrary - manageLibrary - viewPartitions - managePartitions - manageS3DataForwarding - viewScheduledViews - manageScheduledViews - manageTokens ### Logs - runLogSearch ### Metrics - runMetricsQuery ### Reliability Management - viewSlos - manageSlos ### Security - manageAccessKeys - viewPersonalAccessKeys - managePersonalAccessKeys ### UserManagement - viewUsersAndRoles - manageUsersAndRoles |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_account_id, access_id, region | Get an access key with the given identifier from the organization of a service account. | |
list | select | service_account_id, region | List all access keys of a service account. | |
create | insert | service_account_id, region, label | Creates a new access ID and key pair for a service account. | |
update | update | service_account_id, access_id, region, disabled | Updates the properties of existing accessKey by Id of a service account. | |
delete | delete | service_account_id, access_id, region | Deletes the access key with the given Id of a service account. |
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 |
|---|---|---|
access_id | string | The Id of the access key to delete of a service account. (wire: accessId) |
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) |
service_account_id | string | Identifier of the service account. (wire: serviceAccountId) |
SELECT examples
- get
- list
Get an access key with the given identifier from the organization of a service account.
SELECT
id,
service_account_id,
cors_headers,
created_at,
created_by,
disabled,
effective_scopes,
label,
last_used,
modified_at,
modified_by,
scopes
FROM sumologic.service_accounts.access_keys
WHERE service_account_id = '{{ service_account_id }}' -- required
AND access_id = '{{ access_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;
List all access keys of a service account.
SELECT
id,
service_account_id,
cors_headers,
created_at,
created_by,
disabled,
effective_scopes,
label,
last_used,
modified_at,
modified_by,
scopes
FROM sumologic.service_accounts.access_keys
WHERE service_account_id = '{{ service_account_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;
INSERT examples
- create
- Manifest
Creates a new access ID and key pair for a service account.
INSERT INTO sumologic.service_accounts.access_keys (
label,
cors_headers,
scopes,
service_account_id,
region
)
SELECT
'{{ label }}' /* required */,
'{{ cors_headers }}',
'{{ scopes }}',
'{{ service_account_id }}',
'{{ region }}'
RETURNING
id,
service_account_id,
cors_headers,
created_at,
created_by,
disabled,
effective_scopes,
key,
label,
last_used,
modified_at,
modified_by,
scopes
;
# Description fields are for documentation purposes
- name: access_keys
props:
- name: service_account_id
value: "{{ service_account_id }}"
description: Required parameter for the access_keys resource.
- name: region
value: "{{ region }}"
description: Required parameter for the access_keys resource.
- name: label
value: "{{ label }}"
description: |
A name for the access key to be created.
- name: cors_headers
value:
- "{{ cors_headers }}"
description: |
An array of domains for which the access key is valid. Whether Sumo Logic accepts or rejects an API request
depends on whether it contains an ORIGIN header and the entries in the allowlist.
Sumo Logic will reject:
1. Requests with an ORIGIN header but the allowlist is empty.
2. Requests with an ORIGIN header that don't match any entry in the allowlist.
- name: scopes
value:
- "{{ scopes }}"
description: |
Scopes assigned to the key.
### Alerting
- adminMonitorsV2
- viewMonitorsV2
- manageMonitorsV2
### Data Management
- manageApps
- viewCollectors
- manageCollectors
- viewConnections
- manageConnections
- contentAdmin
- viewFieldExtractionRules
- manageFieldExtractionRules
- viewFields
- manageFields
- manageBudgets
- viewLibrary
- manageLibrary
- viewPartitions
- managePartitions
- manageS3DataForwarding
- viewScheduledViews
- manageScheduledViews
- manageTokens
### Logs
- runLogSearch
### Metrics
- runMetricsQuery
### Reliability Management
- viewSlos
- manageSlos
### Security
- manageAccessKeys
- viewPersonalAccessKeys
- managePersonalAccessKeys
### UserManagement
- viewUsersAndRoles
- manageUsersAndRoles
UPDATE examples
- update
Updates the properties of existing accessKey by Id of a service account.
UPDATE sumologic.service_accounts.access_keys
SET
disabled = {{ disabled }},
cors_headers = '{{ cors_headers }}',
scopes = '{{ scopes }}'
WHERE
service_account_id = '{{ service_account_id }}' --required
AND access_id = '{{ access_id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
AND disabled = {{ disabled }} --required
RETURNING
id,
service_account_id,
cors_headers,
created_at,
created_by,
disabled,
effective_scopes,
label,
last_used,
modified_at,
modified_by,
scopes;
DELETE examples
- delete
Deletes the access key with the given Id of a service account.
DELETE FROM sumologic.service_accounts.access_keys
WHERE service_account_id = '{{ service_account_id }}' --required
AND access_id = '{{ access_id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
;