aws ec2 modify-ipam-resource-cidr
Modify a resource CIDR. AWS CLI reference
1 example 7 options Its page in the AWS CLI reference
Examples
To modify the CIDR allocated to a resource
The following modify-ipam-resource-cidr example modifies a resource CIDR.
For Linux, use the following command.
aws ec2 modify-ipam-resource-cidr --current-ipam-scope-id ipam-scope-02fc38cd4c48e7d38 --destination-ipam-scope-id ipam-scope-0da34c61fd189a141 --resource-id vpc-010e1791024eb0af9 --resource-cidr 10.0.1.0/24 --resource-region us-west-2 --monitoredIdentify--current-ipam-scope-idThe ID of the current scope that the resource CIDR is in.--destination-ipam-scope-idThe ID of the scope you want to transfer the resource CIDR to.--resource-idThe ID of the resource you want to modify.--resource-cidrThe CIDR of the resource you want to modify.--resource-regionThe Amazon Web Services Region of the resource you want to modify.--monitoredDetermines if the resource is monitored by IPAM.For Windows, use the following command.
aws ec2 modify-ipam-resource-cidr ^Identify--current-ipam-scope-id ipam-scope-02fc38cd4c48e7d38 ^--destination-ipam-scope-id ipam-scope-0da34c61fd189a141 ^--resource-id vpc-010e1791024eb0af9 ^--resource-cidr 10.0.1.0/24 ^--resource-region us-west-2 ^--monitoredIts output
{
"IpamResourceCidr": {
"IpamId": "ipam-08440e7a3acde3908",
"IpamScopeId": "ipam-scope-0da34c61fd189a141",
"IpamPoolId": "ipam-pool-0533048da7d823723",
"ResourceRegion": "us-west-2",
"ResourceOwnerId": "123456789012",
"ResourceId": "vpc-010e1791024eb0af9",
"ResourceCidr": "10.0.1.0/24",
"ResourceType": "vpc",
"ResourceTags": [
{
"Key": "Environment",
"Value": "Preprod"
},
{
"Key": "Owner",
"Value": "Build Team"
}
],
"IpUsage": 0.0,
"ComplianceStatus": "noncompliant",
"ManagementState": "managed",
"OverlapStatus": "overlapping",
"VpcId": "vpc-010e1791024eb0af9"
}
}For more information on moving resources, see Move resource CIDRs between scopes in the Amazon VPC IPAM User Guide.
For more information on changing monitoring states, see Change the monitoring state of resource CIDRs in the Amazon VPC IPAM User Guide.
Options
--current-ipam-scope-idThe ID of the current scope that the resource CIDR is in.--destination-ipam-scope-idThe ID of the scope you want to transfer the resource CIDR to.--dry-runA check for whether you have the required permissions for the action without actually making the request and provides an error response.--monitoredDetermines if the resource is monitored by IPAM.--resource-cidrThe CIDR of the resource you want to modify.--resource-idThe ID of the resource you want to modify.--resource-regionThe Amazon Web Services Region of the resource you want to modify.