sites
Creates, updates, deletes, gets or lists a sites resource.
Overview
| Name | sites |
| Type | Resource |
| Id | aws.networkmanager.sites |
Fields
The following fields are returned by SELECT queries:
- get_sites
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time that the site was created. |
description | string | The description of the site. (pattern: <code>[\s\S]*</code>) |
global_network_id | string | The ID of the global network. (pattern: <code>[\s\S]*</code>) |
location | object | Describes a location. |
site_arn | string | The Amazon Resource Name (ARN) of the site. (pattern: <code>[\s\S]*</code>) |
site_id | string | The ID of the site. (pattern: <code>[\s\S]*</code>) |
state | string | The state of the site. (PENDING, AVAILABLE, DELETING, UPDATING) |
tags | array | The tags for the site. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_sites | select | global_network_id, region | siteIds, maxResults, nextToken | Gets information about one or more of your sites in a global network. |
create_site | insert | global_network_id, region | Creates a new site in a global network. | |
update_site | update | global_network_id, site_id, region | Updates the information for an existing site. To remove information for any of the parameters, specify an empty string. | |
delete_site | delete | global_network_id, site_id, region | Deletes an existing site. The site cannot be associated with any device or link. |
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 |
|---|---|---|
global_network_id | string | The ID of the global network. |
region | string | AWS region (default: us-east-1) |
site_id | string | The ID of the site. |
maxResults | integer | The maximum number of results to return. |
nextToken | string | The token for the next page of results. |
siteIds | array | One or more site IDs. The maximum is 10. |
SELECT examples
- get_sites
Gets information about one or more of your sites in a global network.
SELECT
created_at,
description,
global_network_id,
location,
site_arn,
site_id,
state,
tags
FROM aws.networkmanager.sites
WHERE global_network_id = '{{ global_network_id }}' -- required
AND region = '{{ region }}' -- required
AND siteIds = '{{ siteIds }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_site
- Manifest
Creates a new site in a global network.
INSERT INTO aws.networkmanager.sites (
Description,
Location,
Tags,
global_network_id,
region
)
SELECT
'{{ Description }}',
'{{ Location }}',
'{{ Tags }}',
'{{ global_network_id }}',
'{{ region }}'
RETURNING
site
;
# Description fields are for documentation purposes
- name: sites
props:
- name: global_network_id
value: "{{ global_network_id }}"
description: Required parameter for the sites resource.
- name: region
value: "{{ region }}"
description: Required parameter for the sites resource.
- name: Description
value: "{{ Description }}"
- name: Location
description: |
Describes a location.
value:
Address: "{{ Address }}"
Latitude: "{{ Latitude }}"
Longitude: "{{ Longitude }}"
- name: Tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_site
Updates the information for an existing site. To remove information for any of the parameters, specify an empty string.
UPDATE aws.networkmanager.sites
SET
Description = '{{ Description }}',
Location = '{{ Location }}'
WHERE
global_network_id = '{{ global_network_id }}' --required
AND site_id = '{{ site_id }}' --required
AND region = '{{ region }}' --required
RETURNING
site;
DELETE examples
- delete_site
Deletes an existing site. The site cannot be associated with any device or link.
DELETE FROM aws.networkmanager.sites
WHERE global_network_id = '{{ global_network_id }}' --required
AND site_id = '{{ site_id }}' --required
AND region = '{{ region }}' --required
;