Class: SparkleFormation::SparkleStruct::Aws

Inherits:
SparkleFormation::SparkleStruct show all
Includes:
SparkleFormation::SparkleAttribute, SparkleFormation::SparkleAttribute::Aws
Defined in:
lib/sparkle_formation/sparkle_struct.rb

Overview

AWS specific struct

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from SparkleFormation::SparkleStruct

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class SparkleFormation::SparkleStruct

Instance Method Details

#__attribute_key(key) ⇒ String Originally defined in module SparkleFormation::SparkleAttribute

Format the provided key. If symbol type is provided formatting is forced. Otherwise the default formatting is applied

Parameters:

  • key (String, Symbol)

    given key

Returns:

  • (String)

    formatted key

#_cf_account_idHash Also known as: _account_id, account_id! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Account ID generator

Returns:

  • (Hash)

#_cf_and(*args) ⇒ Hash Also known as: _and, and! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Note:

symbols will be processed and set as condition. strings will be set as condition directly. procs will be evaluated

Fn::And generator

Parameters:

  • args (Object)

    items to be AND'ed together

Returns:

  • (Hash)

#_cf_attr(logical_id, attribute_name) ⇒ Hash Also known as: _cf_get_att, get_att!, attr! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::GetAtt generator

Parameters:

  • logical_id (String, Symbol)

    logical resource name

  • attribute_name (String, Symbol)

    name of desired resource attribute

Returns:

  • (Hash)

#_cf_base64(arg) ⇒ Hash Also known as: base64! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::Base64 generator

Parameters:

  • arg (Object)

    argument to be encoded

Returns:

  • (Hash)

#_cf_cidr(ipblock, count, cidrbits) ⇒ Hash Also known as: _cidr, cidr! Originally defined in module SparkleFormation::SparkleAttribute::Aws

CIDR generator

Parameters:

  • ipblock (String)

    CIDR address block

  • count (Integer)

    Number of CIDRs to generate

  • cidrbits (Integer)

    Number of subnet bits for the CIDR

Returns:

  • (Hash)

#_cf_condition(name) ⇒ Hash Also known as: _condition, condition! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Condition generator

Parameters:

  • name (String, Symbol)

    symbol will be processed

Returns:

  • (Hash)

#_depends_on(resource_name) ⇒ Array<String> #_depends_on(resource_names) ⇒ Array<String> #_depends_on(*resource_names) ⇒ Array<String> Also known as: _depends_on, depends_on! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Note:

this will directly modify the struct at its current context to inject depends on structure

Resource dependency generator

Overloads:

  • #_depends_on(resource_name) ⇒ Array<String>

    Parameters:

    • resource_name (String, Symbol)

      logical resource name

  • #_depends_on(resource_names) ⇒ Array<String>

    Parameters:

    • resource_names (Array<String, Symbol>)

      list of logical resource names

  • #_depends_on(*resource_names) ⇒ Array<String>

    Parameters:

    • resource_names (Array<String, Symbol>)

      list of logical resource names

Returns:

  • (Array<String>)

#_cf_equals(v1, v2) ⇒ Hash Also known as: _equals, equals! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::Equals generator

Parameters:

  • v1 (Object)
  • v2 (Object)

Returns:

  • (Hash)

#_cf_get_azs(region = nil) ⇒ Hash Also known as: get_azs!, azs! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::GetAZs generator

Parameters:

  • region (String, Symbol) (defaults to: nil)

    String will pass through. Symbol will be converted to ref

Returns:

  • (Hash)

#_cf_if(cond, true_value, false_value) ⇒ Hash Also known as: _if, if! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::If generator

Parameters:

  • cond (String, Symbol)

    symbol will be case processed

  • true_value (Object)

    item to be used when true

  • false_value (Object)

    item to be used when false

Returns:

  • (Hash)

#_cf_join(*args, opts = {}) ⇒ Hash Also known as: _join, join! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::Join generator

Parameters:

  • args (String, Hash)

    list of items to join

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :options (Hash)

    options for join function

Returns:

  • (Hash)

#_cf_map(map_name, top_level_key, second_level_key) ⇒ Hash Also known as: _cf_find_in_map, find_in_map!, map! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::FindInMap generator

Parameters:

  • map_name (String, Symbol)

    name of map

  • top_level_key (String, Symbol, Hash)

    top level key name

  • second_level_key (String, Symbol, Hash)

    second level key name

Returns:

  • (Hash)

#_cf_no_valueHash Also known as: _no_value, no_value! Originally defined in module SparkleFormation::SparkleAttribute::Aws

No value generator

Returns:

  • (Hash)

#_cf_not(arg) ⇒ Hash Also known as: _not, not! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::Not generator

Parameters:

  • arg (Object)

Returns:

  • (Hash)

#_cf_notification_arnsHash Also known as: _notification_arns, notification_arns! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Notification ARNs generator

Returns:

  • (Hash)

#_cf_on_condition(name) ⇒ SparkleStruct Also known as: _on_condition, on_condition! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Note:

this is used to set a => "Name" into the current context, generally the top level of a resource

Condition setter

Parameters:

  • name (String, Symbol)

    condition name

Returns:

#_cf_or(*args) ⇒ Hash Also known as: _or, or! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::Or generator

Parameters:

  • v1 (Object)
  • v2 (Object)

Returns:

  • (Hash)

#_cf_ref(thing) ⇒ Hash Also known as: _ref, ref! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Note:

Symbol value will force key processing

Ref generator

Parameters:

  • thing (String, Symbol)

    reference name

Returns:

  • (Hash)

#_cf_regionHash Also known as: _region, region! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Region generator

Returns:

  • (Hash)

#_cf_select(index, item) ⇒ Hash Also known as: _select, select! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Fn::Select generator

Parameters:

  • index (String, Symbol, Integer)

    Symbol will be converted to ref

  • item (Object, Symbol)

    Symbol will be converted to ref

Returns:

  • (Hash)

#_cf_split(string, delimiter) ⇒ Hash Also known as: _split, split! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Split generator

Parameters:

  • string (String, Hash)

    string to split

  • delimiter (String)

    delimiter to split string

Returns:

  • (Hash)

#_cf_stack_idHash Also known as: _stack_id, stack_id! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Stack ID generator

Returns:

  • (Hash)

#_cf_stack_nameHash Also known as: _stack_name, stack_name! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Stack name generator

Returns:

  • (Hash)

#_cf_stack_output(stack_name, output_name) ⇒ Object Also known as: _stack_output, stack_output! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Reference output value from nested stack

Parameters:

  • stack_name (String, Symbol)

    logical resource name of stack

  • output_name (String, Symbol)

    stack output name

#_cf_sub(string, variables = nil) ⇒ Hash Also known as: _sub, sub! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Sub generator

Parameters:

  • string (String, Hash)

    string to apply substitution

  • variables (Hash) (defaults to: nil)

    key value mappings for substitution

Returns:

  • (Hash)

#_cf_tags(hash) ⇒ SparkleStruct Also known as: _tags, tags! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Set tags on a resource

Parameters:

  • hash (Hash)

    Key/value pair tags

Returns:

#_cf_transform(name, parameters) ⇒ Hash Also known as: _transform, transform! Originally defined in module SparkleFormation::SparkleAttribute::Aws

Transform generator

Parameters:

  • name (String)

    name of transformation

  • parameters (Hash)

    transformation parameters

Returns:

  • (Hash)

#_cf_value_import(thing) ⇒ Hash Also known as: _import_value, import_value! Originally defined in module SparkleFormation::SparkleAttribute::Aws

ValueImport generator

Parameters:

  • thing (String, Symbol, Hash)

    value import

Returns:

  • (Hash)

#_dynamic(resource_type, custom_name, options = {}) ⇒ self #_dynamic(dynamic_name, custom_name, options = {}) ⇒ self Also known as: dynamic! Originally defined in module SparkleFormation::SparkleAttribute

Overloads:

  • #_dynamic(resource_type, custom_name, options = {}) ⇒ self
    Note:

    All other options are set into the new resource's properties

    Insert builtin resource

    Parameters:

    • resource_type (String, Symbol)

      provider resource type

    • custom_name (String, Symbol)

      custom name used for resource name generation

    • options (Hash) (defaults to: {})

    Options Hash (options):

    • :resource_name_suffix (String, NilClass)

      custom suffix to use for name generation (defaults to resource_type)

  • #_dynamic(dynamic_name, custom_name, options = {}) ⇒ self
    Note:

    All options are passed to dynamic with custom_name

    Call custom dynamic from available sparkle packs

    Parameters:

    • dynamic_name (Symbol)

      name of registered dynamic

    • custom_name (Symbol, String)

      unique name passed directly to registered dynamic

    • options (Hash) (defaults to: {})

    Options Hash (options):

    • :provider (String, Symbol)

      override provider restriction when fetching dynamic

Yields:

  • (new_struct)

    Provides newly inserted structure

Yield Parameters:

  • new_struct (SparkleStruct)

    newly inserted structure which can be modified

Yield Returns:

  • (Object)

    discarded

Returns:

  • (self)

#_method(sym) ⇒ Method Also known as: method! Originally defined in module SparkleFormation::SparkleAttribute

Note:

usually used as puts! method!(:foo).source_location

Lookup a method definition on self

Parameters:

  • sym (Symbol)

    name of method

Returns:

  • (Method)

See Also:

  • Object#method

#_nest(template, *names, options = {}) ⇒ self Also known as: nest! Originally defined in module SparkleFormation::SparkleAttribute

Nest a stack resource

Parameters:

  • template (String, Symbol)

    name of desired template

  • names (String, Symbol)

    list of optional string/symbol values for resource name generation

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :provider (String, Symbol)

    override provider restriction when fetching template

  • :overwrite_name (Truthy, Falsey)

    when set to true, will not include template name in resource name

  • :parameters (Hash)

    compile time parameter values to pass to nested template

Yields:

  • (new_struct)

    Provides newly inserted structure

Yield Parameters:

  • new_struct (SparkleStruct)

    newly inserted structure which can be modified

Yield Returns:

  • (Object)

    discarded

Returns:

  • (self)

#_puts(obj, ...) ⇒ NilClass Also known as: puts! Originally defined in module SparkleFormation::SparkleAttribute

Print to stdout

Parameters:

  • obj (Object)

    object to print

Returns:

  • (NilClass)

See Also:

  • Kernel.puts

#_raise(*args) ⇒ Object Also known as: raise! Originally defined in module SparkleFormation::SparkleAttribute

Raise an exception

See Also:

  • Kernel.raise

#_registry(name) ⇒ Object #_registry(name, *args, options = {}) ⇒ Object Also known as: registry! Originally defined in module SparkleFormation::SparkleAttribute

Return value of registry item

Overloads:

  • #_registry(name) ⇒ Object

    Return value from registry item with given name

    Parameters:

    • name (String, Symbol)

      registry item name

  • #_registry(name, *args, options = {}) ⇒ Object
    Note:

    args and options will be passed directly to registry item when called

    Pass given parameters to registry item with given name and return the value

    Parameters:

    • name (String, Symbol)

      registry item name

    • options (Hash) (defaults to: {})
    • options (Hash) (defaults to: {})

      :provider override provider restriction when fetching registry item

    • args (Object)

      argument list

Returns:

  • (Object)

    return value of registry item

#_resource_nameString Also known as: resource_name! Originally defined in module SparkleFormation::SparkleAttribute

Return current resource name

Returns:

  • (String)

#_system(command) ⇒ String Also known as: system! Originally defined in module SparkleFormation::SparkleAttribute

Execute system command

Parameters:

  • command (String)

Returns:

  • (String)

    result

#taggable?TrueClass, FalseClass Originally defined in module SparkleFormation::SparkleAttribute::Aws

Returns resource can be tagged

Returns:

  • (TrueClass, FalseClass)

    resource can be tagged