Skip to main content

ipam_resource_cidrs

Creates, updates, deletes, gets or lists an ipam_resource_cidrs resource.

Overview

Nameipam_resource_cidrs
TypeResource
Idaws.ec2.ipam_resource_cidrs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
availability_zone_idstringThe Availability Zone ID.
compliance_statusstringThe compliance status of the IPAM resource. For more information on compliance statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide.
ip_usagenumberThe percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following: For resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs. For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated. For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs).
ipam_idstringThe IPAM ID for an IPAM resource.
ipam_pool_idstringThe pool ID for an IPAM resource.
ipam_scope_idstringThe scope ID for an IPAM resource.
management_statestringThe management state of the resource. For more information about management states, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide.
overlap_statusstringThe overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide.
resource_cidrstringThe CIDR for an IPAM resource.
resource_idstringThe ID of an IPAM resource.
resource_namestringThe name of an IPAM resource.
resource_owner_idstringThe Amazon Web Services account number of the owner of an IPAM resource.
resource_regionstringThe Amazon Web Services Region for an IPAM resource.
resource_tagsstringThe tags for an IPAM resource.
resource_typestringThe type of IPAM resource.
vpc_idstringThe ID of a VPC.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_ipam_resource_cidrsselectIpamScopeId, regionDryRun, Filter, MaxResults, NextToken, IpamPoolId, ResourceId, ResourceType, ResourceTag, ResourceOwnerReturns resource CIDRs managed by IPAM in a given scope. If an IPAM is associated with more than one resource discovery, the resource CIDRs across all of the resource discoveries is returned. A resource discovery is an IPAM component that enables IPAM to manage and monitor resources that belong to the owning account.
modify_ipam_resource_cidrupdateResourceId, ResourceCidr, ResourceRegion, CurrentIpamScopeId, Monitored, regionDryRun, DestinationIpamScopeIdModify a resource CIDR. You can use this action to transfer resource CIDRs between scopes and ignore resource CIDRs that you do not want to manage. If set to false, the resource will not be tracked for overlap, it cannot be auto-imported into a pool, and it will be removed from any pool it has an allocation in. For more information, see Move resource CIDRs between scopes and Change the monitoring state of resource CIDRs in the Amazon VPC IPAM User Guide.

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
CurrentIpamScopeIdstringThe ID of the current scope that the resource CIDR is in.
IpamScopeIdstringThe ID of the scope that the resource is in.
MonitoredbooleanDetermines if the resource is monitored by IPAM. If a resource is monitored, the resource is discovered by IPAM and you can view details about the resource’s CIDR.
ResourceCidrstringThe CIDR of the resource you want to modify.
ResourceIdstringThe ID of the resource you want to modify.
ResourceRegionstringThe Amazon Web Services Region of the resource you want to modify.
regionstringAWS region (default: us-east-1)
DestinationIpamScopeIdstringThe ID of the scope you want to transfer the resource CIDR to.
DryRunbooleanA check for 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.
FilterarrayOne or more filters for the request. For more information about filtering, see Filtering CLI output.
IpamPoolIdstringThe ID of the IPAM pool that the resource is in.
MaxResultsintegerThe maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
NextTokenstringThe token for the next page of results.
ResourceIdstringThe ID of the resource.
ResourceOwnerstringThe ID of the Amazon Web Services account that owns the resource.
ResourceTagobjectThe resource tag.
ResourceTypestringThe resource type.

SELECT examples

Returns resource CIDRs managed by IPAM in a given scope. If an IPAM is associated with more than one resource discovery, the resource CIDRs across all of the resource discoveries is returned. A resource discovery is an IPAM component that enables IPAM to manage and monitor resources that belong to the owning account.

SELECT
availability_zone_id,
compliance_status,
ip_usage,
ipam_id,
ipam_pool_id,
ipam_scope_id,
management_state,
overlap_status,
resource_cidr,
resource_id,
resource_name,
resource_owner_id,
resource_region,
resource_tags,
resource_type,
vpc_id
FROM aws.ec2.ipam_resource_cidrs
WHERE IpamScopeId = '{{ IpamScopeId }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND IpamPoolId = '{{ IpamPoolId }}'
AND ResourceId = '{{ ResourceId }}'
AND ResourceType = '{{ ResourceType }}'
AND ResourceTag = '{{ ResourceTag }}'
AND ResourceOwner = '{{ ResourceOwner }}'
;

UPDATE examples

Modify a resource CIDR. You can use this action to transfer resource CIDRs between scopes and ignore resource CIDRs that you do not want to manage. If set to false, the resource will not be tracked for overlap, it cannot be auto-imported into a pool, and it will be removed from any pool it has an allocation in. For more information, see Move resource CIDRs between scopes and Change the monitoring state of resource CIDRs in the Amazon VPC IPAM User Guide.

UPDATE aws.ec2.ipam_resource_cidrs
SET
-- No updatable properties
WHERE
ResourceId = '{{ ResourceId }}' --required
AND ResourceCidr = '{{ ResourceCidr }}' --required
AND ResourceRegion = '{{ ResourceRegion }}' --required
AND CurrentIpamScopeId = '{{ CurrentIpamScopeId }}' --required
AND Monitored = '{{ Monitored }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND DestinationIpamScopeId = '{{ DestinationIpamScopeId}}'
RETURNING
availability_zone_id,
compliance_status,
ip_usage,
ipam_id,
ipam_pool_id,
ipam_scope_id,
management_state,
overlap_status,
resource_cidr,
resource_id,
resource_name,
resource_owner_id,
resource_region,
resource_tags,
resource_type,
vpc_id;