ChangeCidrCollection - Amazon Route 53

ChangeCidrCollection

Creates, changes, or deletes CIDR blocks within a collection. Contains authoritative IP information mapping blocks to one or multiple locations.

A change request can update multiple locations in a collection at a time, which is helpful if you want to move one or more CIDR blocks from one location to another in one transaction, without downtime.

Limits

The max number of CIDR blocks included in the request is 1000. As a result, big updates require multiple API calls.

PUT and DELETE_IF_EXISTS

Use ChangeCidrCollection to perform the following actions:

  • PUT: Create a CIDR block within the specified collection.

  • DELETE_IF_EXISTS: Delete an existing CIDR block from the collection.

Request Syntax

POST /2013-04-01/cidrcollection/CidrCollectionId HTTP/1.1 <?xml version="1.0" encoding="UTF-8"?> <ChangeCidrCollectionRequest xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <Changes> <CidrCollectionChange> <Action>string</Action> <CidrList> <Cidr>string</Cidr> </CidrList> <LocationName>string</LocationName> </CidrCollectionChange> </Changes> <CollectionVersion>long</CollectionVersion> </ChangeCidrCollectionRequest>

URI Request Parameters

The request uses the following URI parameters.

CidrCollectionId

The UUID of the CIDR collection to update.

Pattern: [0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}

Required: Yes

Request Body

The request accepts the following data in XML format.

ChangeCidrCollectionRequest

Root level tag for the ChangeCidrCollectionRequest parameters.

Required: Yes

Changes

Information about changes to a CIDR collection.

Type: Array of CidrCollectionChange objects

Array Members: Minimum number of 1 item. Maximum number of 1000 items.

Required: Yes

CollectionVersion

A sequential counter that Amazon Route 53 sets to 1 when you create a collection and increments it by 1 each time you update the collection.

We recommend that you use ListCidrCollection to get the current value of CollectionVersion for the collection that you want to update, and then include that value with the change request. This prevents Route 53 from overwriting an intervening update:

  • If the value in the request matches the value of CollectionVersion in the collection, Route 53 updates the collection.

  • If the value of CollectionVersion in the collection is greater than the value in the request, the collection was changed after you got the version number. Route 53 does not update the collection, and it returns a CidrCollectionVersionMismatch error.

Type: Long

Valid Range: Minimum value of 1.

Required: No

Response Syntax

HTTP/1.1 200 <?xml version="1.0" encoding="UTF-8"?> <ChangeCidrCollectionResponse> <Id>string</Id> </ChangeCidrCollectionResponse>

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

ChangeCidrCollectionResponse

Root level tag for the ChangeCidrCollectionResponse parameters.

Required: Yes

Id

The ID that is returned by ChangeCidrCollection. You can use it as input to GetChange to see if a CIDR collection change has propagated or not.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 6500.

Errors

For information about the errors that are common to all actions, see Common Errors.

CidrBlockInUseException

This CIDR block is already in use.

HTTP Status Code: 400

CidrCollectionVersionMismatchException

The CIDR collection version you provided, doesn't match the one in the ListCidrCollections operation.

HTTP Status Code: 409

ConcurrentModification

Another user submitted a request to create, update, or delete the object at the same time that you did. Retry the request.

HTTP Status Code: 400

InvalidInput

The input is not valid.

HTTP Status Code: 400

LimitsExceeded

This operation can't be completed because the current account has reached the limit on the resource you are trying to create. To request a higher limit, create a case with the AWS Support Center.

HTTP Status Code: 400

NoSuchCidrCollectionException

The CIDR collection you specified, doesn't exist.

HTTP Status Code: 404

Examples

Example request

This example illustrates one usage of ChangeCidrCollection.

POST /2013-04-01/cidrcollection/c8c02a84-aaaa-bbbb-e0d2-d833a2f80106 <?xml version="1.0" encoding="UTF-8"?> <ChangeCidrCollectionRequest xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <Changes> <CidrCollectionChange> <Action>PUT</Action> <CidrList> <Cidr>1.1.1.0/24</Cidr> <Cidr>1.1.2.0/24</Cidr> </CidrList> <LocationName>location-1</LocationName> </CidrCollectionChange> <CidrCollectionChange> <Action>DELETE_IF_EXISTS</Action> <CidrList> <Cidr>2.1.1.0/24</Cidr> <Cidr>2.1.2.0/24</Cidr> </CidrList> <LocationName>location-2</LocationName> </CidrCollectionChange> </Changes> <CollectionVersion>1</CollectionVersion> </ChangeCidrCollectionRequest>

Example response

This example illustrates one usage of ChangeCidrCollection.

HTTP/1.1 200 <?xml version="1.0"?> <ChangeCidrCollectionResponse xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <Id>BAQICAHjlIdQ8CnglM29iyr9Fw_Dl6ubqnG8pAHlAe5xxLiDmTgGl7FQ54tpTXxv-GsVbPT2BAAAAwzCBwAYJKoZIhvcNAQcGoIGyMIGvAgEAMIGpBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHQyia4ugqVBJFynEQIBEIB8yb9oghUN992DstGo6cAf4V6lFSwYeSk8z8lONyRuwbmhGMAXu7NHvn1cXLm18SlTBVvCS03PXUWhVPezQuzIZJMsP9ns1T_I1Eez5zBWMFJr8-4xIpgwRqtD_xhwU5DBL96BxmLCZWGM4iziVu0AZjyiUKONtKTE0GeIKg==</Id> </ChangeCidrCollectionResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: