Class: CfFactory::CfS3Bucket

Inherits:
Object
  • Object
show all
Includes:
CfBase
Defined in:
lib/cf_factory/s3/cf_s3_bucket.rb

Instance Method Summary collapse

Methods included from CfBase

#generate, #generate_ref, #get_deletion_policy, #get_name, #get_update_policy, #hash_to_string, #retrieve_attribute, #set_meta_data, #set_quotes, #set_tags

Constructor Details

#initialize(name, options = {}) ⇒ CfS3Bucket

Returns a new instance of CfS3Bucket.



6
7
8
9
# File 'lib/cf_factory/s3/cf_s3_bucket.rb', line 6

def initialize(name, options = {})
  @name = name
  @access_control = options[:access_control] 
end

Instance Method Details

#get_cf_attributesObject



19
20
21
# File 'lib/cf_factory/s3/cf_s3_bucket.rb', line 19

def get_cf_attributes
  result = super
end

#get_cf_propertiesObject



23
24
25
26
27
# File 'lib/cf_factory/s3/cf_s3_bucket.rb', line 23

def get_cf_properties
  result = {} 
  result["AccessControl"] = @access_control unless @access_control.nil? 
  result
end

#get_cf_typeObject



15
16
17
# File 'lib/cf_factory/s3/cf_s3_bucket.rb', line 15

def get_cf_type
  "AWS::S3::Bucket"
end

#set_deletion_policy(deletion_policy) ⇒ Object



11
12
13
# File 'lib/cf_factory/s3/cf_s3_bucket.rb', line 11

def set_deletion_policy(deletion_policy)
  @deletion_policy = deletion_policy
end

#short_domain_nameObject



29
30
31
# File 'lib/cf_factory/s3/cf_s3_bucket.rb', line 29

def short_domain_name
  CfHelper.join([self.generate_ref, ".s3.amazonaws.com"])
end