subnet_cidr_reservations
Creates, updates, deletes, gets or lists a subnet_cidr_reservations resource.
Overview
| Name | subnet_cidr_reservations |
| Type | Resource |
| Id | aws.ec2.subnet_cidr_reservations |
Fields
The following fields are returned by SELECT queries:
- get_subnet_cidr_reservations
| Name | Datatype | Description |
|---|---|---|
next_token | string | The token to use to retrieve the next page of results. This value is null when there are no more results to return. |
subnet_ipv_4_cidr_reservations | string | Information about the IPv4 subnet CIDR reservations. |
subnet_ipv_6_cidr_reservations | string | Information about the IPv6 subnet CIDR reservations. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_subnet_cidr_reservations | select | SubnetId, region | Filter, DryRun, NextToken, MaxResults | Gets information about the subnet CIDR reservations. |
create_subnet_cidr_reservation | insert | SubnetId, ReservationType, region | Cidr, Description, DryRun, TagSpecification | Creates a subnet CIDR reservation. For more information, see Subnet CIDR reservations in the Amazon VPC User Guide and Manage prefixes for your network interfaces in the Amazon EC2 User Guide. |
delete_subnet_cidr_reservation | delete | SubnetCidrReservationId, region | DryRun | Deletes a subnet CIDR reservation. |
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 |
|---|---|---|
ReservationType | string | The type of reservation. The reservation type determines how the reserved IP addresses are assigned to resources. prefix - Amazon Web Services assigns the reserved IP addresses to network interfaces. explicit - You assign the reserved IP addresses to network interfaces. |
SubnetCidrReservationId | string | The ID of the subnet CIDR reservation. |
SubnetId | string | The ID of the subnet. |
region | string | AWS region (default: us-east-1) |
Cidr | string | The IPv4 or IPV6 CIDR range to reserve. |
Description | string | The description to assign to the subnet CIDR reservation. |
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 | One or more filters. reservationType - The type of reservation (prefix | explicit). subnet-id - The ID of the subnet. 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. |
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. |
TagSpecification | array | The tags to assign to the subnet CIDR reservation. |
SELECT examples
- get_subnet_cidr_reservations
Gets information about the subnet CIDR reservations.
SELECT
next_token,
subnet_ipv_4_cidr_reservations,
subnet_ipv_6_cidr_reservations
FROM aws.ec2.subnet_cidr_reservations
WHERE SubnetId = '{{ SubnetId }}' -- required
AND region = '{{ region }}' -- required
AND Filter = '{{ Filter }}'
AND DryRun = '{{ DryRun }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;
INSERT examples
- create_subnet_cidr_reservation
- Manifest
Creates a subnet CIDR reservation. For more information, see Subnet CIDR reservations in the Amazon VPC User Guide and Manage prefixes for your network interfaces in the Amazon EC2 User Guide.
INSERT INTO aws.ec2.subnet_cidr_reservations (
SubnetId,
ReservationType,
region,
Cidr,
Description,
DryRun,
TagSpecification
)
SELECT
'{{ SubnetId }}',
'{{ ReservationType }}',
'{{ region }}',
'{{ Cidr }}',
'{{ Description }}',
'{{ DryRun }}',
'{{ TagSpecification }}'
RETURNING
cidr,
description,
owner_id,
reservation_type,
subnet_cidr_reservation_id,
subnet_id,
tags
;
# Description fields are for documentation purposes
- name: subnet_cidr_reservations
props:
- name: SubnetId
value: "{{ SubnetId }}"
description: Required parameter for the subnet_cidr_reservations resource.
- name: ReservationType
value: "{{ ReservationType }}"
description: Required parameter for the subnet_cidr_reservations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the subnet_cidr_reservations resource.
- name: Cidr
value: "{{ Cidr }}"
description: The IPv4 or IPV6 CIDR range to reserve.
description: The IPv4 or IPV6 CIDR range to reserve.
- name: Description
value: "{{ Description }}"
description: The description to assign to the subnet CIDR reservation.
description: The description to assign to the subnet CIDR reservation.
- 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 subnet CIDR reservation.
description: The tags to assign to the subnet CIDR reservation.
DELETE examples
- delete_subnet_cidr_reservation
Deletes a subnet CIDR reservation.
DELETE FROM aws.ec2.subnet_cidr_reservations
WHERE SubnetCidrReservationId = '{{ SubnetCidrReservationId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;