Skip to main content

links

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

Overview

Namelinks
TypeResource
Idaws.networkmanager.links

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bandwidthobjectDescribes bandwidth information.
created_atstring (date-time)The date and time that the link was created.
descriptionstringThe description of the link. (pattern: <code>[\s\S]*</code>)
global_network_idstringThe ID of the global network. (pattern: <code>[\s\S]*</code>)
link_arnstringThe Amazon Resource Name (ARN) of the link. (pattern: <code>[\s\S]*</code>)
link_idstringThe ID of the link. (pattern: <code>[\s\S]*</code>)
providerstringThe provider of the link. (pattern: <code>[\s\S]*</code>)
site_idstringThe ID of the site. (pattern: <code>[\s\S]*</code>)
statestringThe state of the link. (PENDING, AVAILABLE, DELETING, UPDATING)
tagsarrayThe tags for the link.
typestringThe type of the link. (pattern: <code>[\s\S]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_linksselectglobal_network_id, regionlinkIds, siteId, type, provider, maxResults, nextTokenGets information about one or more links in a specified global network. If you specify the site ID, you cannot specify the type or provider in the same request. You can specify the type and provider in the same request.
create_linkinsertglobal_network_id, region, SiteIdCreates a new link for a specified site.
associate_linkupdateglobal_network_id, region, DeviceId, LinkIdAssociates a link to a device. A device can be associated to multiple links and a link can be associated to multiple devices. The device and link must be in the same global network and the same site.
update_linkupdateglobal_network_id, link_id, regionUpdates the details for an existing link. To remove information for any of the parameters, specify an empty string.
disassociate_linkupdateglobal_network_id, regiondeviceId, linkIdDisassociates an existing device from a link. You must first disassociate any customer gateways that are associated with the link.
delete_linkdeleteglobal_network_id, link_id, regionDeletes an existing link. You must first disassociate the link from any devices and customer gateways.

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)
deviceIdstringThe ID of the device.
linkIdstringThe ID of the link.
linkIdsarrayOne or more link IDs. The maximum is 10.
maxResultsintegerThe maximum number of results to return.
nextTokenstringThe token for the next page of results.
providerstringThe link provider.
siteIdstringThe ID of the site.
typestringThe link type.

SELECT examples

Gets information about one or more links in a specified global network. If you specify the site ID, you cannot specify the type or provider in the same request. You can specify the type and provider in the same request.

SELECT
bandwidth,
created_at,
description,
global_network_id,
link_arn,
link_id,
provider,
site_id,
state,
tags,
type
FROM aws.networkmanager.links
WHERE global_network_id = '{{ global_network_id }}' -- required
AND region = '{{ region }}' -- required
AND linkIds = '{{ linkIds }}'
AND siteId = '{{ siteId }}'
AND type = '{{ type }}'
AND provider = '{{ provider }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;

INSERT examples

Creates a new link for a specified site.

INSERT INTO aws.networkmanager.links (
Description,
Type,
Bandwidth,
Provider,
SiteId,
Tags,
global_network_id,
region
)
SELECT
'{{ Description }}',
'{{ Type }}',
'{{ Bandwidth }}',
'{{ Provider }}',
'{{ SiteId }}' /* required */,
'{{ Tags }}',
'{{ global_network_id }}',
'{{ region }}'
RETURNING
link
;

UPDATE examples

Associates a link to a device. A device can be associated to multiple links and a link can be associated to multiple devices. The device and link must be in the same global network and the same site.

UPDATE aws.networkmanager.links
SET
DeviceId = '{{ DeviceId }}',
LinkId = '{{ LinkId }}'
WHERE
global_network_id = '{{ global_network_id }}' --required
AND region = '{{ region }}' --required
AND DeviceId = '{{ DeviceId }}' --required
AND LinkId = '{{ LinkId }}' --required
RETURNING
link_association;

DELETE examples

Deletes an existing link. You must first disassociate the link from any devices and customer gateways.

DELETE FROM aws.networkmanager.links
WHERE global_network_id = '{{ global_network_id }}' --required
AND link_id = '{{ link_id }}' --required
AND region = '{{ region }}' --required
;