sites
Creates, updates, deletes or gets a site resource or lists sites in a region
Overview
| Name | sites |
| Type | Resource |
| Description | The AWS::NetworkManager::Site type describes a site. |
| Id | awscc.networkmanager.sites |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
site_arn | string | The Amazon Resource Name (ARN) of the site. |
site_id | string | The ID of the site. |
description | string | The description of the site. |
tags | array | The tags for the site. |
global_network_id | string | The ID of the global network. |
location | object | The location of the site. |
created_at | string | The date and time that the device was created. |
state | string | The state of the site. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
site_id | string | The ID of the site. |
global_network_id | string | The ID of the global network. |
region | string | AWS region. |
For more information, see AWS::NetworkManager::Site.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | sites | INSERT | GlobalNetworkId, region |
delete_resource | sites | DELETE | Identifier, region |
update_resource | sites | UPDATE | Identifier, PatchDocument, region |
list_resources | sites_list_only | SELECT | region |
get_resource | sites | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual site.
SELECT
region,
site_arn,
site_id,
description,
tags,
global_network_id,
location,
created_at,
state
FROM awscc.networkmanager.sites
WHERE
region = 'us-east-1' AND
Identifier = '{{ global_network_id }}|{{ site_id }}';
Lists all sites in a region.
SELECT
region,
global_network_id,
site_id
FROM awscc.networkmanager.sites_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new site resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.networkmanager.sites (
GlobalNetworkId,
region
)
SELECT
'{{ global_network_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.networkmanager.sites (
Description,
Tags,
GlobalNetworkId,
Location,
region
)
SELECT
'{{ description }}',
'{{ tags }}',
'{{ global_network_id }}',
'{{ location }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: site
props:
- name: description
value: '{{ description }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: global_network_id
value: '{{ global_network_id }}'
- name: location
value:
address: '{{ address }}'
latitude: '{{ latitude }}'
longitude: '{{ longitude }}'
UPDATE example
Use the following StackQL query and manifest file to update a site resource, using stack-deploy.
/*+ update */
UPDATE awscc.networkmanager.sites
SET PatchDocument = string('{{ {
"Description": description,
"Tags": tags,
"Location": location
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ global_network_id }}|{{ site_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.networkmanager.sites
WHERE
Identifier = '{{ global_network_id }}|{{ site_id }}' AND
region = 'us-east-1';
Permissions
To operate on the sites resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
networkmanager:CreateSite,
networkmanager:GetSites,
networkmanager:TagResource
networkmanager:GetSites
networkmanager:GetSites,
networkmanager:ListTagsForResource,
networkmanager:TagResource,
networkmanager:UntagResource,
networkmanager:UpdateSite
networkmanager:GetSites,
networkmanager:DeleteSite
networkmanager:GetSites