Class: Convection::Model::Template::Resource::S3Bucket

Inherits:
Convection::Model::Template::Resource show all
Includes:
Mixin::Taggable
Defined in:
lib/convection/model/template/resource/aws_s3_bucket.rb

Overview

Examples:

s3_bucket 'BucketWithSNSNotification' do
  bucket_name "my-bucket.blah.com"
  notification_configuration(
    'TopicConfigurations' => [
       {'Event' => 's3:ObjectCreated:*', 'Topic' => "arn:aws:sns:sns-topic-arn...."}
    ])
  with_output
end

See Also:

Instance Attribute Summary

Attributes inherited from Convection::Model::Template::Resource

#exist, #name, #parent, #properties, #resource_attributes, #template

Instance Method Summary collapse

Methods included from Mixin::Taggable

#immutable_metadata, #render_tags, #tag, #tags

Methods inherited from Convection::Model::Template::Resource

#as_attribute, attach_method, #deletion_policy, #depends_on, #initialize, properties, #property, property, #reference, type, #type, #with_output

Methods included from Mixin::Conditional

#condition, #render_condition

Methods included from DSL::Template::Resource

attach_resource

Methods included from DSL::Helpers

#camel_case, included, method_name, #screaming_snake_case, #snake_case

Methods included from DSL::IntrinsicFunctions

#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_not, #fn_or, #fn_ref, #get_att, #get_azs, #join, #select

Constructor Details

This class inherits a constructor from Convection::Model::Template::Resource

Instance Method Details

#access_controlObject #access_control(value) ⇒ Object

Overloads:

  • #access_controlObject

    Returns the value of the 'AccessControl' CloudFormation property.

  • #access_control(value) ⇒ Object

    Sets the 'AccessControl' CloudFormation property.

    Parameters:

    • value

      the value to set the 'AccessControl' CloudFormation property to.



21
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 21

property :access_control, 'AccessControl'

#bucket_nameObject #bucket_name(value) ⇒ Object

Overloads:

  • #bucket_nameObject

    Returns the value of the 'BucketName' CloudFormation property.

  • #bucket_name(value) ⇒ Object

    Sets the 'BucketName' CloudFormation property.

    Parameters:

    • value

      the value to set the 'BucketName' CloudFormation property to.



20
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 20

property :bucket_name, 'BucketName'

#cors_configurationObject #cors_configuration(value) ⇒ Object

Overloads:

  • #cors_configurationObject

    Returns the value of the 'CorsConfiguration' CloudFormation property.

  • #cors_configuration(value) ⇒ Object

    Sets the 'CorsConfiguration' CloudFormation property.

    Parameters:

    • value

      the value to set the 'CorsConfiguration' CloudFormation property to.



22
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 22

property :cors_configuration, 'CorsConfiguration'

#cors_configurationm(*args) ⇒ Object



34
35
36
37
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 34

def cors_configurationm(*args)
  warn 'DEPRECATED: "cors_configurationm" is deprecated. Please use "cors_configuration" instead. https://github.com/rapid7/convection/pull/135'
  cors_configuration(*args)
end

#lifecycle_configurationObject #lifecycle_configuration(value) ⇒ Object

Overloads:

  • #lifecycle_configurationObject

    Returns the value of the 'LifecycleConfiguration' CloudFormation property.

  • #lifecycle_configuration(value) ⇒ Object

    Sets the 'LifecycleConfiguration' CloudFormation property.

    Parameters:

    • value

      the value to set the 'LifecycleConfiguration' CloudFormation property to.



23
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 23

property :lifecycle_configuration, 'LifecycleConfiguration'

#logging_configurationObject #logging_configuration(value) ⇒ Object

Overloads:

  • #logging_configurationObject

    Returns the value of the 'LoggingConfiguration' CloudFormation property.

  • #logging_configuration(value) ⇒ Object

    Sets the 'LoggingConfiguration' CloudFormation property.

    Parameters:

    • value

      the value to set the 'LoggingConfiguration' CloudFormation property to.



24
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 24

property :logging_configuration, 'LoggingConfiguration'

#notification_configurationObject #notification_configuration(value) ⇒ Object

Overloads:

  • #notification_configurationObject

    Returns the value of the 'NotificationConfiguration' CloudFormation property.

  • #notification_configuration(value) ⇒ Object

    Sets the 'NotificationConfiguration' CloudFormation property.

    Parameters:

    • value

      the value to set the 'NotificationConfiguration' CloudFormation property to.



25
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 25

property :notification_configuration, 'NotificationConfiguration'

#render(*args) ⇒ Object



39
40
41
42
43
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 39

def render(*args)
  super.tap do |resource|
    render_tags(resource)
  end
end

#versioning_configurationObject #versioning_configuration(value) ⇒ Object

Overloads:

  • #versioning_configurationObject

    Returns the value of the 'VersioningConfiguration' CloudFormation property.

  • #versioning_configuration(value) ⇒ Object

    Sets the 'VersioningConfiguration' CloudFormation property.

    Parameters:

    • value

      the value to set the 'VersioningConfiguration' CloudFormation property to.



26
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 26

property :versioning_configuration, 'VersioningConfiguration'