Module: RightScale::CloudApi::AWS::Route53::Wrapper::DEFAULT

Defined in:
lib/cloud/aws/route53/wrappers/default.rb

Overview

Default wrapper

Class Method Summary collapse

Class Method Details

.extended(base) ⇒ void

This method returns an undefined value.

Defines QUERY API like methods for the service

Examples:

# no example


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/cloud/aws/route53/wrappers/default.rb', line 42

def self.extended(base)

  #-----------------
  # Hosted Zones
  #-----------------
  
  
  base.query_api_pattern 'ListHostedZones', :get, 'hostedzone'

  
  base.query_api_pattern 'GetHostedZone', :get, 'hostedzone/{:HostedZoneId}'


  base.query_api_pattern 'CreateHostedZones', :post, 'hostedzone',
    :body => {
      'CreateHostedZoneRequest' => {
        'Name'             => :Name,
        'CallerReference'  => :CallerReference,
        'HostedZoneConfig{!remove-if-blank}' => {
          'Comment' => :Comment
        }
      }
    },
    :defaults => {
      :Comment => Utils::NONE
    }
  
  
  base.query_api_pattern 'DeleteHostedZone', :delete, 'hostedzone/{:HostedZoneId}'
  

  #----------------------
  # Resource Record Sets
  #----------------------

  
  base.query_api_pattern 'ListResourceRecordSets', :get, 'hostedzone/{:HostedZoneId}/rrset'
  

  base.query_api_pattern 'GetChange', :get, 'change/{:ChangeId}'
  
  
  base.query_api_pattern 'ChangeResourceRecordSets', :post, 'hostedzone/{:HostedZoneId}/rrset',
    :body => {
      'ChangeResourceRecordSetsRequest' => {
        '@xmlns'      => 'https://route53.amazonaws.com/doc/2011-05-05/',
        'ChangeBatch' => {
          'Comment' => :Comment,
          'Changes' => {
            'Change[{:Change}]' => {
              'Action'            => :Action,
              'ResourceRecordSet' => {
                'Name' => :Name,
                'Type' => :Type,
                'AliasTarget{!remove-if-blank}' => {
                  'HostedZoneId' => :HostedZoneId,
                  'DNSName'      => :DNSName
                },
                'SetIdentifier' => :SetIdentifier,
                'Weight'        => :Weight,
                'TTL'           => :TTL,
                'ResourceRecords{!remove-if-blank}' => {
                  'ResourceRecord{!remove-if-blank}' => {
                    'Value' => :ResourceRecord
                  }
                }
              }
            }
          }
        }
      }
    },
    :defaults => {
      :Comment        => Utils::NONE,
      :TTL            => Utils::NONE,
      :DNSName        => Utils::NONE,
      :HostedZoneId   => Utils::NONE,
      :SetIdentifier  => Utils::NONE,
      :Weight         => Utils::NONE,
      :ResourceRecord => Utils::NONE
    }
  
  
end