network_resources
Creates, updates, deletes, gets or lists a network_resources resource.
Overview
| Name | network_resources |
| Type | Resource |
| Id | aws.networkmanager.network_resources |
Fields
The following fields are returned by SELECT queries:
- get_network_resources
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Web Services account ID. (pattern: <code>[\s\S]*</code>) |
aws_region | string | The Amazon Web Services Region. (pattern: <code>[\s\S]*</code>) |
core_network_id | string | The ID of a core network. (pattern: <code>^core-network-([0-9a-f]{8,17})$</code>) |
definition | string | Information about the resource, in JSON format. Network Manager gets this information by describing the resource using its Describe API call. (pattern: <code>[\s\S]*</code>) |
definition_timestamp | string (date-time) | The time that the resource definition was retrieved. |
metadata | object | The resource metadata. |
registered_gateway_arn | string | The ARN of the gateway. (pattern: <code>[\s\S]*</code>) |
resource_arn | string | The ARN of the resource. (pattern: <code>[\s\S]*</code>) |
resource_id | string | The ID of the resource. (pattern: <code>[\s\S]*</code>) |
resource_type | string | The resource type. The following are the supported resource types for Direct Connect: dxcon dx-gateway dx-vif The following are the supported resource types for Network Manager: attachment connect-peer connection core-network device link peering site The following are the supported resource types for Amazon VPC: customer-gateway transit-gateway transit-gateway-attachment transit-gateway-connect-peer transit-gateway-route-table vpn-connection (pattern: <code>[\s\S]*</code>) |
tags | array | The tags. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_network_resources | select | global_network_id, region | coreNetworkId, registeredGatewayArn, awsRegion, accountId, resourceType, resourceArn, maxResults, nextToken | Describes the network resources for the specified global network. The results include information from the corresponding Describe call for the resource, minus any sensitive information such as pre-shared keys. |
update_network_resource_metadata | update | global_network_id, resource_arn, region | Updates the resource metadata for the specified global network. |
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. |
region | string | AWS region (default: us-east-1) |
resource_arn | string | The ARN of the resource. |
accountId | string | The Amazon Web Services account ID. |
awsRegion | string | The Amazon Web Services Region. |
coreNetworkId | string | The ID of a core network. |
maxResults | integer | The maximum number of results to return. |
nextToken | string | The token for the next page of results. |
registeredGatewayArn | string | The ARN of the gateway. |
resourceArn | string | The ARN of the resource. |
resourceType | string | The resource type. The following are the supported resource types for Direct Connect: dxcon dx-gateway dx-vif The following are the supported resource types for Network Manager: attachment connect-peer connection core-network device link peering site The following are the supported resource types for Amazon VPC: customer-gateway transit-gateway transit-gateway-attachment transit-gateway-connect-peer transit-gateway-route-table vpn-connection |
SELECT examples
- get_network_resources
Describes the network resources for the specified global network. The results include information from the corresponding Describe call for the resource, minus any sensitive information such as pre-shared keys.
SELECT
account_id,
aws_region,
core_network_id,
definition,
definition_timestamp,
metadata,
registered_gateway_arn,
resource_arn,
resource_id,
resource_type,
tags
FROM aws.networkmanager.network_resources
WHERE global_network_id = '{{ global_network_id }}' -- required
AND region = '{{ region }}' -- required
AND coreNetworkId = '{{ coreNetworkId }}'
AND registeredGatewayArn = '{{ registeredGatewayArn }}'
AND awsRegion = '{{ awsRegion }}'
AND accountId = '{{ accountId }}'
AND resourceType = '{{ resourceType }}'
AND resourceArn = '{{ resourceArn }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
UPDATE examples
- update_network_resource_metadata
Updates the resource metadata for the specified global network.
UPDATE aws.networkmanager.network_resources
SET
Metadata = '{{ Metadata }}'
WHERE
global_network_id = '{{ global_network_id }}' --required
AND resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
RETURNING
metadata,
resource_arn;