Base class to abstract blocks used in Amazon States Language https://states-language.net/spec.html.

Methods

Public methods


Method new()

Initialize Block class

Usage

Block$new(...)

Arguments

...

: Field list to added to class


Method is_field_allowed()

Check if field is allowed

Usage

Block$is_field_allowed(field_name)

Arguments

field_name

(str): field name to check with class's allowed field list


Method allowed_fields()

allowed extra fields

Usage

Block$allowed_fields()


Method to_list()

Convert class to named list

Usage

Block$to_list()


Method to_json()

Serialize to a JSON formatted string.

Usage

Block$to_json(pretty = FALSE)

Arguments

pretty

(bool, optional): Boolean flag set to `True` if JSON string should be prettified. `False`, otherwise. (default: False)

Returns

str: JSON formatted string representation of the block.


Method format()

class formatting

Usage

Block$format()


Method clone()

The objects of this class are cloneable with this method.

Usage

Block$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.