destinations
Creates, updates, deletes, gets or lists a destinations resource.
Overview
| Name | destinations |
| Type | Resource |
| Id | sumologic.data_archiving.destinations |
Fields
The following fields are returned by SELECT queries:
- get
- list
Data archiving destination object requested.
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for the data archiving destination. (example: 1) |
destination_name | string | Name of the data archiving destination. (example: my-archive-destination) (wire: destinationName) |
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 resource. (example: 0000000006743FDD) (wire: createdBy) |
destination_config | object | (wire: destinationConfig) |
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 last modified the resource. (example: 0000000006743FE8) (wire: modifiedBy) |
List of all data archiving destinations.
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for the data archiving destination. (example: 1) |
destination_name | string | Name of the data archiving destination. (example: my-archive-destination) (wire: destinationName) |
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 resource. (example: 0000000006743FDD) (wire: createdBy) |
destination_config | object | (wire: destinationConfig) |
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 last modified the resource. (example: 0000000006743FE8) (wire: modifiedBy) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, region | Get a data archiving destination by the given identifier. | |
list | select | region | limit, token | Get a list of all data archiving destinations configured for installed collectors. |
create | insert | region, destination_name, destination_config | Create a new data archiving destination. | |
update | update | id, region, destination_config, destination_name | Update a data archiving destination by the given identifier. | |
delete | delete | id, region | Delete an existing data archiving destination with the given identifier. |
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 |
|---|---|---|
id | string | Identifier of the data archiving destination to delete. (example: 1) |
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) |
limit | integer (int32) | Limit the number of destinations returned in the response. The number of destinations returned may be less than the limit. |
token | string | Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. |
SELECT examples
- get
- list
Get a data archiving destination by the given identifier.
SELECT
id,
destination_name,
created_at,
created_by,
destination_config,
modified_at,
modified_by
FROM sumologic.data_archiving.destinations
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;
Get a list of all data archiving destinations configured for installed collectors.
SELECT
id,
destination_name,
created_at,
created_by,
destination_config,
modified_at,
modified_by
FROM sumologic.data_archiving.destinations
WHERE region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;
INSERT examples
- create
- Manifest
Create a new data archiving destination.
INSERT INTO sumologic.data_archiving.destinations (
destination_name,
destination_config,
region
)
SELECT
'{{ destination_name }}' /* required */,
'{{ destination_config }}' /* required */,
'{{ region }}'
RETURNING
id,
destination_name,
created_at,
created_by,
destination_config,
modified_at,
modified_by
;
# Description fields are for documentation purposes
- name: destinations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the destinations resource.
- name: destination_name
value: "{{ destination_name }}"
description: |
Name of the data archiving destination.
- name: destination_config
value:
destinationType: "{{ destinationType }}"
UPDATE examples
- update
Update a data archiving destination by the given identifier.
UPDATE sumologic.data_archiving.destinations
SET
destination_name = '{{ destination_name }}',
destination_config = '{{ destination_config }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
AND destination_config = '{{ destination_config }}' --required
AND destination_name = '{{ destination_name }}' --required
RETURNING
id,
destination_name,
created_at,
created_by,
destination_config,
modified_at,
modified_by;
DELETE examples
- delete
Delete an existing data archiving destination with the given identifier.
DELETE FROM sumologic.data_archiving.destinations
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
;