Skip to main content

sites

Creates, updates, deletes, gets or lists a sites resource.

Overview​

Namesites
TypeResource
Idaws.networkmanager.sites

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date and time that the site was created.
descriptionstringThe description of the site. (pattern: <code>[\s\S]*</code>)
global_network_idstringThe ID of the global network. (pattern: <code>[\s\S]*</code>)
locationobjectDescribes a location.
site_arnstringThe Amazon Resource Name (ARN) of the site. (pattern: <code>[\s\S]*</code>)
site_idstringThe ID of the site. (pattern: <code>[\s\S]*</code>)
statestringThe state of the site. (PENDING, AVAILABLE, DELETING, UPDATING)
tagsarrayThe tags for the site.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_sitesselectglobal_network_id, regionsiteIds, maxResults, nextTokenGets information about one or more of your sites in a global network.
create_siteinsertglobal_network_id, regionCreates a new site in a global network.
update_siteupdateglobal_network_id, site_id, regionUpdates the information for an existing site. To remove information for any of the parameters, specify an empty string.
delete_sitedeleteglobal_network_id, site_id, regionDeletes 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.

NameDatatypeDescription
global_network_idstringThe ID of the global network.
regionstringAWS region (default: us-east-1)
site_idstringThe ID of the site.
maxResultsintegerThe maximum number of results to return.
nextTokenstringThe token for the next page of results.
siteIdsarrayOne or more site IDs. The maximum is 10.

SELECT examples​

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​

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
;

UPDATE examples​

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​

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
;