links
Creates, updates, deletes, gets or lists a links resource.
Overview
| Name | links |
| Type | Resource |
| Id | aws.networkmanager.links |
Fields
The following fields are returned by SELECT queries:
- get_links
| Name | Datatype | Description |
|---|---|---|
bandwidth | object | Describes bandwidth information. |
created_at | string (date-time) | The date and time that the link was created. |
description | string | The description of the link. (pattern: <code>[\s\S]*</code>) |
global_network_id | string | The ID of the global network. (pattern: <code>[\s\S]*</code>) |
link_arn | string | The Amazon Resource Name (ARN) of the link. (pattern: <code>[\s\S]*</code>) |
link_id | string | The ID of the link. (pattern: <code>[\s\S]*</code>) |
provider | string | The provider of the link. (pattern: <code>[\s\S]*</code>) |
site_id | string | The ID of the site. (pattern: <code>[\s\S]*</code>) |
state | string | The state of the link. (PENDING, AVAILABLE, DELETING, UPDATING) |
tags | array | The tags for the link. |
type | string | The type of the link. (pattern: <code>[\s\S]*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_links | select | global_network_id, region | linkIds, siteId, type, provider, maxResults, nextToken | 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. |
create_link | insert | global_network_id, region, SiteId | Creates a new link for a specified site. | |
associate_link | update | global_network_id, region, DeviceId, LinkId | 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_link | update | global_network_id, link_id, region | Updates the details for an existing link. To remove information for any of the parameters, specify an empty string. | |
disassociate_link | update | global_network_id, region | deviceId, linkId | Disassociates an existing device from a link. You must first disassociate any customer gateways that are associated with the link. |
delete_link | delete | global_network_id, link_id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
global_network_id | string | The ID of the global network. |
link_id | string | The ID of the link. |
region | string | AWS region (default: us-east-1) |
deviceId | string | The ID of the device. |
linkId | string | The ID of the link. |
linkIds | array | One or more link IDs. The maximum is 10. |
maxResults | integer | The maximum number of results to return. |
nextToken | string | The token for the next page of results. |
provider | string | The link provider. |
siteId | string | The ID of the site. |
type | string | The link type. |
SELECT examples
- get_links
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
- create_link
- Manifest
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
;
# Description fields are for documentation purposes
- name: links
props:
- name: global_network_id
value: "{{ global_network_id }}"
description: Required parameter for the links resource.
- name: region
value: "{{ region }}"
description: Required parameter for the links resource.
- name: Description
value: "{{ Description }}"
- name: Type
value: "{{ Type }}"
- name: Bandwidth
description: |
Describes bandwidth information.
value:
UploadSpeed: {{ UploadSpeed }}
DownloadSpeed: {{ DownloadSpeed }}
- name: Provider
value: "{{ Provider }}"
- name: SiteId
value: "{{ SiteId }}"
- name: Tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- associate_link
- update_link
- disassociate_link
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;
Updates the details for an existing link. To remove information for any of the parameters, specify an empty string.
UPDATE aws.networkmanager.links
SET
Description = '{{ Description }}',
Type = '{{ Type }}',
Bandwidth = '{{ Bandwidth }}',
Provider = '{{ Provider }}'
WHERE
global_network_id = '{{ global_network_id }}' --required
AND link_id = '{{ link_id }}' --required
AND region = '{{ region }}' --required
RETURNING
link;
Disassociates an existing device from a link. You must first disassociate any customer gateways that are associated with the link.
UPDATE aws.networkmanager.links
SET
-- No updatable properties
WHERE
global_network_id = '{{ global_network_id }}' --required
AND region = '{{ region }}' --required
AND deviceId = '{{ deviceId}}'
AND linkId = '{{ linkId}}'
RETURNING
link_association;
DELETE examples
- delete_link
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
;