secondary_networks
Creates, updates, deletes, gets or lists a secondary_networks resource.
Overview
| Name | secondary_networks |
| Type | Resource |
| Id | aws.ec2.secondary_networks |
Fields
The following fields are returned by SELECT queries:
- describe_secondary_networks
| Name | Datatype | Description |
|---|---|---|
ipv_4_cidr_block_associations | string | Information about the IPv4 CIDR blocks associated with the secondary network. |
owner_id | string | The ID of the Amazon Web Services account that owns the secondary network. |
secondary_network_arn | string | The Amazon Resource Name (ARN) of the secondary network. |
secondary_network_id | string | The ID of the secondary network. |
state | string | The state of the secondary network. |
state_reason | string | The reason for the current state of the secondary network. |
tags | string | The tags assigned to the secondary network. |
type | string | The type of the secondary network. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_secondary_networks | select | region | DryRun, Filter, MaxResults, NextToken, SecondaryNetworkId | Describes one or more secondary networks. |
create_secondary_network | insert | Ipv4CidrBlock, NetworkType, region | ClientToken, DryRun, TagSpecification | 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). |
delete_secondary_network | delete | SecondaryNetworkId, region | ClientToken, DryRun | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
Ipv4CidrBlock | string | The IPv4 CIDR block for the secondary network. The CIDR block size must be between /12 and /28. |
NetworkType | string | The type of secondary network. |
SecondaryNetworkId | string | The ID of the secondary network. |
region | string | AWS region (default: us-east-1) |
ClientToken | string | Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency. |
DryRun | boolean | Checks 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. |
Filter | array | The 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). |
MaxResults | integer | The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. |
NextToken | string | The token for the next page of results. |
SecondaryNetworkId | array | The IDs of the secondary networks. |
TagSpecification | array | The tags to assign to the secondary network. |
SELECT examples
- describe_secondary_networks
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
- create_secondary_network
- Manifest
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
;
# Description fields are for documentation purposes
- name: secondary_networks
props:
- name: Ipv4CidrBlock
value: "{{ Ipv4CidrBlock }}"
description: Required parameter for the secondary_networks resource.
- name: NetworkType
value: "{{ NetworkType }}"
description: Required parameter for the secondary_networks resource.
- name: region
value: "{{ region }}"
description: Required parameter for the secondary_networks resource.
- name: ClientToken
value: "{{ ClientToken }}"
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
- name: DryRun
value: {{ DryRun }}
description: Checks 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.
description: Checks 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.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to assign to the secondary network.
description: The tags to assign to the secondary network.
DELETE examples
- delete_secondary_network
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 }}'
;