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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.networkmanager.sites (
Description,
Tags,
GlobalNetworkId,
Location,
region
)
SELECT
'{{ description }}',
'{{ tags }}',
'{{ global_network_id }}',
'{{ location }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.networkmanager.sites
WHERE
Identifier = '{{ global_network_id }}|{{ site_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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