Skip to main content

sites

Creates, updates, deletes or gets a site resource or lists sites in a region

Overview

Namesites
TypeResource
DescriptionThe AWS::NetworkManager::Site type describes a site.
Idawscc.networkmanager.sites

Fields

NameDatatypeDescription
site_arnstringThe Amazon Resource Name (ARN) of the site.
site_idstringThe ID of the site.
descriptionstringThe description of the site.
tagsarrayThe tags for the site.
global_network_idstringThe ID of the global network.
locationobjectThe location of the site.
created_atstringThe date and time that the device was created.
statestringThe state of the site.
regionstringAWS region.

For more information, see AWS::NetworkManager::Site.

Methods

NameResourceAccessible byRequired Params
create_resourcesitesINSERTGlobalNetworkId, region
delete_resourcesitesDELETEIdentifier, region
update_resourcesitesUPDATEIdentifier, PatchDocument, region
list_resourcessites_list_onlySELECTregion
get_resourcesitesSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new site resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.networkmanager.sites (
GlobalNetworkId,
region
)
SELECT
'{{ global_network_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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:

ParameterDescription
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:

networkmanager:CreateSite,
networkmanager:GetSites,
networkmanager:TagResource