1 // Package customizations provides customizations for the Amazon Route53 API client.
2 //
3 // This package provides support for following customizations
4 //
5 // Process Response Middleware: used for custom error deserializing
6 // Sanitize URL Middleware: used for sanitizing url with HostedZoneID member
7 //
8 // # Process Response Middleware
9 //
10 // Route53 operation "ChangeResourceRecordSets" can have an error response returned in
11 // a slightly different format. This customization is only applicable to
12 // ChangeResourceRecordSets operation of Route53.
13 //
14 // Here's a sample error response:
15 //
16 // <?xml version="1.0" encoding="UTF-8"?>
17 // <InvalidChangeBatch xmlns="https://route53.amazonaws.com/doc/2013-04-01/">
18 // <Messages>
19 // <Message>Tried to create resource record set duplicate.example.com. type A, but it already exists</Message>
20 // </Messages>
21 // </InvalidChangeBatch>
22 //
23 // The processResponse middleware customizations enables SDK to check for an error
24 // response starting with "InvalidChangeBatch" tag prior to deserialization.
25 //
26 // As this check in error response needs to be performed earlier than response
27 // deserialization. Since the behavior of Deserialization is in
28 // reverse order to the other stack steps its easier to consider that "after" means
29 // "before".
30 //
31 // Middleware layering:
32 //
33 // HTTP Response -> process response error -> deserialize
34 //
35 // In case the returned error response has `InvalidChangeBatch` format, the error is
36 // deserialized and returned. The operation deserializer does not attempt to deserialize
37 // as an error is returned by the process response error middleware.
38 //
39 // # Sanitize URL Middleware
40 //
41 // Route53 operations may return a response containing an id member value appended with
42 // a string, for example. an id 1234 may be returned as 'foo/1234'. While round-tripping such response
43 // id value into another operation request, SDK must strip out the additional prefix if any.
44 // The Sanitize URL Middleware strips out such additionally prepended string to the id.
45 //
46 // The Id member with such prepended strings target shape 'ResourceId' or 'DelegationSetId'.
47 // This customization thus is applied only for operations with id's targeting those target shapes.
48 // This customization has to be applied before the input is serialized.
49 //
50 // Middleware layering:
51 //
52 // Input -> Sanitize URL Middleware -> serialize -> next
53 package customizations
54