Class: CfFactory::CfCustomOriginConfig
- Inherits:
-
Object
- Object
- CfFactory::CfCustomOriginConfig
show all
- Includes:
- CfInner
- Defined in:
- lib/cf_factory/cloudfront/cf_custom_origin_config.rb
Constant Summary
collapse
- PROTOCOL_VALUES =
["http-only","match-viewer"]
Instance Method Summary
collapse
Methods included from CfInner
#generate, #generate_name, #hash_to_string, #set_quotes
Constructor Details
Returns a new instance of CfCustomOriginConfig.
13
14
15
16
17
18
|
# File 'lib/cf_factory/cloudfront/cf_custom_origin_config.rb', line 13
def initialize(protocol, options = {})
@protocol = protocol
@http_port = options[:http_port]
@https_port = options[:https_port]
validate()
end
|
Instance Method Details
#additional_indent ⇒ Object
8
9
10
|
# File 'lib/cf_factory/cloudfront/cf_custom_origin_config.rb', line 8
def additional_indent
6
end
|
#get_cf_attributes ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/cf_factory/cloudfront/cf_custom_origin_config.rb', line 20
def get_cf_attributes
result = {}
result["OriginProtocolPolicy"] = @protocol
result["HTTPPort"] = @http_port unless @http_port.nil?
result["HTTPSPort"] = @https_port unless @https_port.nil?
result
end
|
#is_custom? ⇒ Boolean
28
29
30
|
# File 'lib/cf_factory/cloudfront/cf_custom_origin_config.rb', line 28
def is_custom?
true
end
|