Skip to main content

secondary_networks

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

Overview

Namesecondary_networks
TypeResource
Idaws.ec2.secondary_networks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
ipv_4_cidr_block_associationsstringInformation about the IPv4 CIDR blocks associated with the secondary network.
owner_idstringThe ID of the Amazon Web Services account that owns the secondary network.
secondary_network_arnstringThe Amazon Resource Name (ARN) of the secondary network.
secondary_network_idstringThe ID of the secondary network.
statestringThe state of the secondary network.
state_reasonstringThe reason for the current state of the secondary network.
tagsstringThe tags assigned to the secondary network.
typestringThe type of the secondary network.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_secondary_networksselectregionDryRun, Filter, MaxResults, NextToken, SecondaryNetworkIdDescribes one or more secondary networks.
create_secondary_networkinsertIpv4CidrBlock, NetworkType, regionClientToken, DryRun, TagSpecificationCreates a secondary network. The allowed size for a secondary network CIDR block is between /28 netmask (16 IP addresses) and /12 netmask (1,048,576 IP addresses).
delete_secondary_networkdeleteSecondaryNetworkId, regionClientToken, DryRunDeletes a secondary network. You must delete all secondary subnets in the secondary network before you can delete the secondary 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.

NameDatatypeDescription
Ipv4CidrBlockstringThe IPv4 CIDR block for the secondary network. The CIDR block size must be between /12 and /28.
NetworkTypestringThe type of secondary network.
SecondaryNetworkIdstringThe ID of the secondary network.
regionstringAWS region (default: us-east-1)
ClientTokenstringUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
FilterarrayThe filters. The following are the possible values: ipv4-cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the secondary network. ipv4-cidr-block-association.cidr-block - An IPv4 CIDR block associated with the secondary network. ipv4-cidr-block-association.state - The state of an IPv4 CIDR block associated with the secondary network. owner-id - The ID of the Amazon Web Services account that owns the secondary network. secondary-network-id - The ID of the secondary network. secondary-network-arn - The ARN of the secondary network. state - The state of the secondary network (create-in-progress | create-complete | create-failed | delete-in-progress | delete-complete | delete-failed). tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value. tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. type - The type of the secondary network (rdma).
MaxResultsintegerThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
NextTokenstringThe token for the next page of results.
SecondaryNetworkIdarrayThe IDs of the secondary networks.
TagSpecificationarrayThe tags to assign to the secondary network.

SELECT examples

Describes one or more secondary networks.

SELECT
ipv_4_cidr_block_associations,
owner_id,
secondary_network_arn,
secondary_network_id,
state,
state_reason,
tags,
type
FROM aws.ec2.secondary_networks
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND SecondaryNetworkId = '{{ SecondaryNetworkId }}'
;

INSERT examples

Creates a secondary network. The allowed size for a secondary network CIDR block is between /28 netmask (16 IP addresses) and /12 netmask (1,048,576 IP addresses).

INSERT INTO aws.ec2.secondary_networks (
Ipv4CidrBlock,
NetworkType,
region,
ClientToken,
DryRun,
TagSpecification
)
SELECT
'{{ Ipv4CidrBlock }}',
'{{ NetworkType }}',
'{{ region }}',
'{{ ClientToken }}',
'{{ DryRun }}',
'{{ TagSpecification }}'
RETURNING
ipv_4_cidr_block_associations,
owner_id,
secondary_network_arn,
secondary_network_id,
state,
state_reason,
tags,
type
;

DELETE examples

Deletes a secondary network. You must delete all secondary subnets in the secondary network before you can delete the secondary network.

DELETE FROM aws.ec2.secondary_networks
WHERE SecondaryNetworkId = '{{ SecondaryNetworkId }}' --required
AND region = '{{ region }}' --required
AND ClientToken = '{{ ClientToken }}'
AND DryRun = '{{ DryRun }}'
;