Class: Skywriter::ResourceProperty
- Inherits:
-
Object
- Object
- Skywriter::ResourceProperty
- Defined in:
- lib/skywriter/resource_property.rb,
lib/skywriter/resource_property/ec2/tag.rb,
lib/skywriter/resource_property/ec2/icmp.rb,
lib/skywriter/resource_property/ec2/port_range.rb,
lib/skywriter/resource_property/ec2/mount_point.rb,
lib/skywriter/resource_property/auto_scaling/tag.rb,
lib/skywriter/resource_property/sns/subscription.rb,
lib/skywriter/resource_property/cloud_front/origin.rb,
lib/skywriter/resource_property/redshift/parameter.rb,
lib/skywriter/resource_property/sqs/redrive_policy.rb,
lib/skywriter/resource_property/cloud_front/logging.rb,
lib/skywriter/resource_property/dynamo_db/key_schema.rb,
lib/skywriter/resource_property/dynamo_db/projection.rb,
lib/skywriter/resource_property/ec2/ebs_block_device.rb,
lib/skywriter/resource_property/route53/alias_target.rb,
lib/skywriter/resource_property/cloud_front/s3_origin.rb,
lib/skywriter/resource_property/ec2/network_interface.rb,
lib/skywriter/resource_property/ec2/security_group_rule.rb,
lib/skywriter/resource_property/rds/security_group_rule.rb,
lib/skywriter/resource_property/ec2/block_device_mapping.rb,
lib/skywriter/resource_property/cloud_front/custom_origin.rb,
lib/skywriter/resource_property/cloud_front/cache_behavior.rb,
lib/skywriter/resource_property/cloud_front/forwarded_value.rb,
lib/skywriter/resource_property/cloud_formation/resource_tag.rb,
lib/skywriter/resource_property/cloud_watch/metric_dimension.rb,
lib/skywriter/resource_property/auto_scaling/ebs_block_device.rb,
lib/skywriter/resource_property/elastic_load_balancing/policy.rb,
lib/skywriter/resource_property/dynamo_db/attribute_definition.rb,
lib/skywriter/resource_property/cloud_front/distribution_config.rb,
lib/skywriter/resource_property/dynamo_db/local_secondary_index.rb,
lib/skywriter/resource_property/elastic_beanstalk/source_bundle.rb,
lib/skywriter/resource_property/elastic_load_balancing/listener.rb,
lib/skywriter/resource_property/s3/website_configuration_policy.rb,
lib/skywriter/resource_property/dynamo_db/global_secondary_index.rb,
lib/skywriter/resource_property/dynamo_db/provisioned_throughput.rb,
lib/skywriter/resource_property/ec2/network_interface_attachment.rb,
lib/skywriter/resource_property/ec2/network_interface_group_item.rb,
lib/skywriter/resource_property/elastic_beanstalk/option_setting.rb,
lib/skywriter/resource_property/auto_scaling/block_device_mapping.rb,
lib/skywriter/resource_property/ec2/network_interface_association.rb,
lib/skywriter/resource_property/cloud_front/default_cache_behavior.rb,
lib/skywriter/resource_property/elastic_beanstalk/environment_tier.rb,
lib/skywriter/resource_property/elastic_load_balancing/health_check.rb,
lib/skywriter/resource_property/elastic_beanstalk/source_configuration.rb,
lib/skywriter/resource_property/auto_scaling/notification_configuration.rb,
lib/skywriter/resource_property/elastic_load_balancing/access_logging_policy.rb,
lib/skywriter/resource_property/ec2/network_interface_private_ip_specification.rb,
lib/skywriter/resource_property/elastic_load_balancing/connection_draining_policy.rb,
lib/skywriter/resource_property/elastic_load_balancing/lb_cookie_stickiness_policy.rb,
lib/skywriter/resource_property/elastic_load_balancing/app_cookie_stickiness_policy.rb
Direct Known Subclasses
AutoScaling::BlockDeviceMapping, AutoScaling::EBSBlockDevice, AutoScaling::NotificationConfiguration, AutoScaling::Tag, CloudFormation::ResourceTag, CloudFront::CacheBehavior, CloudFront::CustomOrigin, CloudFront::DefaultCacheBehavior, CloudFront::DistributionConfig, CloudFront::ForwardedValue, CloudFront::Logging, CloudFront::Origin, CloudFront::S3Origin, CloudWatch::MetricDimension, DynamoDB::AttributeDefinition, DynamoDB::GlobalSecondaryIndex, DynamoDB::KeySchema, DynamoDB::LocalSecondaryIndex, DynamoDB::Projection, DynamoDB::ProvisionedThroughput, EC2::BlockDeviceMapping, EC2::EBSBlockDevice, EC2::ICMP, EC2::MountPoint, EC2::NetworkInterface, EC2::NetworkInterfaceAssociation, EC2::NetworkInterfaceAttachment, EC2::NetworkInterfaceGroupItem, EC2::NetworkInterfacePrivateIPSpecification, EC2::PortRange, EC2::SecurityGroupRule, EC2::Tag, ElasticBeanstalk::EnvironmentTier, ElasticBeanstalk::OptionSetting, ElasticBeanstalk::SourceBundle, ElasticBeanstalk::SourceConfiguration, ElasticLoadBalancing::AccessLoggingPolicy, ElasticLoadBalancing::AppCookieStickinessPolicy, ElasticLoadBalancing::ConnectionDrainingPolicy, ElasticLoadBalancing::HealthCheck, ElasticLoadBalancing::LBCookieStickinessPolicy, ElasticLoadBalancing::Listener, ElasticLoadBalancing::Policy, RDS::SecurityGroupRule, Redshift::Parameter, Route53::AliasTarget, S3::WebsiteConfiguration, SNS::Subscription, SQS::RedrivePolicy
Defined Under Namespace
Modules: AutoScaling, CloudFormation, CloudFront, CloudWatch, DynamoDB, EC2, ElasticBeanstalk, ElasticLoadBalancing, RDS, Redshift, Route53, S3, SNS, SQS
Class Method Summary collapse
-
.property(name) ⇒ Object
Declare a ResourceProperty property.
Instance Method Summary collapse
-
#as_json ⇒ Hash
Returns a JSON-able hash representing the Resource.
-
#initialize(options = {}) ⇒ ResourceProperty
constructor
A new instance of ResourceProperty.
Constructor Details
#initialize(options = {}) ⇒ ResourceProperty
Returns a new instance of ResourceProperty.
13 14 15 |
# File 'lib/skywriter/resource_property.rb', line 13 def initialize( = {}) @options = .freeze end |
Class Method Details
.property(name) ⇒ Object
Declare a ResourceProperty property
6 7 8 |
# File 'lib/skywriter/resource_property.rb', line 6 def self.property(name) property_definitions << PropertyDefinition.new(name) end |
Instance Method Details
#as_json ⇒ Hash
Returns a JSON-able hash representing the Resource
21 22 23 24 25 26 27 |
# File 'lib/skywriter/resource_property.rb', line 21 def as_json(*) @as_json ||= property_definitions.each_with_object({}) do |property_definition, hash| if (value = property_value(property_definition)) hash[property_definition.name] = value.as_json end end end |