Sha256: e143d58252ac87c8aa2af7d01fba4de53a5c836ca74a45e42d2fabb95c1e278c

Contents?: true

Size: 1.17 KB

Versions: 41

Compression:

Stored size: 1.17 KB

Contents

require_relative '../resource'

module Convection
  module Model
    class Template
      class Resource
        ##
        # AWS::ApiGateway::UsagePlan
        ##
        class ApiGatewayUsagePlan < Resource
          type 'AWS::ApiGateway::UsagePlan'
          property :api_stages, 'ApiStages', :type => :list # [ ApiStage, ... ]
          property :description, 'Description'
          property :quota_prop, 'Quota' # QuotaSetting
          property :throttle_prop, 'Throttle' # ThrottleSetting
          property :usage_plan_name, 'UsagePlanName'

          def api_stage(&block)
            r = ResourceProperty::ApiGatewayUsagePlanApiStage.new(self)
            r.instance_exec(&block) if block
            api_stages << r
          end

          def quota(&block)
            i = ResourceProperty::ApiGatewayUsagePlanQuotaSettings.new(self)
            i.instance_exec(&block) if block
            properties['Quota'].set(i)
          end

          def throttle(&block)
            i = ResourceProperty::ApiGatewayUsagePlanThrottleSettings.new(self)
            i.instance_exec(&block) if block
            properties['Throttle'].set(i)
          end
        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
convection-1.1.3 lib/convection/model/template/resource/aws_api_gateway_usage_plan.rb