runway.module.staticsite.parameters.models module
Runway static site Module parameters.
- class runway.module.staticsite.parameters.models.RunwayStaticSiteCustomErrorResponseDataModel[source]
Bases:
runway.config.models.base.ConfigProperty
Model for Runway stat site Module staticsite_custom_error_responses parameter item.
- class Config[source]
Bases:
runway.config.models.base.ConfigProperty.Config
Model configuration.
- __init__()
- __new__(**kwargs)
- classmethod get_field_info(name: unicode) Dict[str, Any]
Get properties of FieldInfo from the fields property of the config class.
- getter_dict
alias of
pydantic.utils.GetterDict
- json_dumps(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw)
Serialize
obj
to a JSON formattedstr
.If
skipkeys
is true thendict
keys that are not basic types (str
,int
,float
,bool
,None
) will be skipped instead of raising aTypeError
.If
ensure_ascii
is false, then the return value can contain non-ASCII characters if they appear in strings contained inobj
. Otherwise, all such characters are escaped in JSON strings.If
check_circular
is false, then the circular reference check for container types will be skipped and a circular reference will result in anRecursionError
(or worse).If
allow_nan
is false, then it will be aValueError
to serialize out of rangefloat
values (nan
,inf
,-inf
) in strict compliance of the JSON specification, instead of using the JavaScript equivalents (NaN
,Infinity
,-Infinity
).If
indent
is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines.None
is the most compact representation.If specified,
separators
should be an(item_separator, key_separator)
tuple. The default is(', ', ': ')
if indent isNone
and(',', ': ')
otherwise. To get the most compact JSON representation, you should specify(',', ':')
to eliminate whitespace.default(obj)
is a function that should return a serializable version of obj or raise TypeError. The default simply raises TypeError.If sort_keys is true (default:
False
), then the output of dictionaries will be sorted by key.To use a custom
JSONEncoder
subclass (e.g. one that overrides the.default()
method to serialize additional types), specify it with thecls
kwarg; otherwiseJSONEncoder
is used.
- json_loads(*, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
Deserialize
s
(astr
,bytes
orbytearray
instance containing a JSON document) to a Python object.object_hook
is an optional function that will be called with the result of any object literal decode (adict
). The return value ofobject_hook
will be used instead of thedict
. This feature can be used to implement custom decoders (e.g. JSON-RPC class hinting).object_pairs_hook
is an optional function that will be called with the result of any object literal decoded with an ordered list of pairs. The return value ofobject_pairs_hook
will be used instead of thedict
. This feature can be used to implement custom decoders. Ifobject_hook
is also defined, theobject_pairs_hook
takes priority.parse_float
, if specified, will be called with the string of every JSON float to be decoded. By default this is equivalent to float(num_str). This can be used to use another datatype or parser for JSON floats (e.g. decimal.Decimal).parse_int
, if specified, will be called with the string of every JSON int to be decoded. By default this is equivalent to int(num_str). This can be used to use another datatype or parser for JSON integers (e.g. float).parse_constant
, if specified, will be called with one of the following strings: -Infinity, Infinity, NaN. This can be used to raise an exception if invalid JSON numbers are encountered.To use a custom
JSONDecoder
subclass, specify it with thecls
kwarg; otherwiseJSONDecoder
is used.
- __contains__(name: object) bool
Implement evaluation of ‘in’ conditional.
- Parameters
name – The name to check for existence in the model.
- __getitem__(name: str) Any
Implement evaluation of self[name].
- Parameters
name – Attribute name to return the value for.
- Returns
The value associated with the provided name/attribute name.
- Raises
AttributeError – If attribute does not exist on this object.
- __init__(**data: Any) None
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- __iter__() TupleGenerator
so dict(model) works
- __new__(**kwargs)
- __pretty__(fmt: Callable[[Any], Any], **kwargs: Any) Generator[Any, None, None]
Used by devtools (https://python-devtools.helpmanual.io/) to provide a human readable representations of objects
- __repr_name__() unicode
Name of the instance’s class, used in __repr__.
- __rich_repr__() RichReprResult
Get fields for Rich library
- __setitem__(name: str, value: Any) None
Implement item assignment (e.g.
self[name] = value
).- Parameters
name – Attribute name to set.
value – Value to assign to the attribute.
- classmethod __try_update_forward_refs__(**localns: Any) None
Same as update_forward_refs but will not raise exception when forward references are not defined.
- classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) Model
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
- copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) Model
Duplicate a model, optionally choose which fields to include, exclude and change.
- Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data
deep – set to True to make a deep copy of the model
- Returns
new model instance
- dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) DictStrAny
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- get(name: str, default: Optional[Any] = None) Any
Safely get the value of an attribute.
- Parameters
name – Attribute name to return the value for.
default – Value to return if attribute is not found.
- json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Callable[[Any], Any]] = None, models_as_dict: bool = True, **dumps_kwargs: Any) unicode
Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
- class runway.module.staticsite.parameters.models.RunwayStaticSiteLambdaFunctionAssociationDataModel[source]
Bases:
runway.config.models.base.ConfigProperty
Model for Runway stat site Module staticsite_lambda_function_associations parameter item.
- class Config[source]
Bases:
runway.config.models.base.ConfigProperty.Config
Model configuration.
- __init__()
- __new__(**kwargs)
- classmethod get_field_info(name: unicode) Dict[str, Any]
Get properties of FieldInfo from the fields property of the config class.
- getter_dict
alias of
pydantic.utils.GetterDict
- json_dumps(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw)
Serialize
obj
to a JSON formattedstr
.If
skipkeys
is true thendict
keys that are not basic types (str
,int
,float
,bool
,None
) will be skipped instead of raising aTypeError
.If
ensure_ascii
is false, then the return value can contain non-ASCII characters if they appear in strings contained inobj
. Otherwise, all such characters are escaped in JSON strings.If
check_circular
is false, then the circular reference check for container types will be skipped and a circular reference will result in anRecursionError
(or worse).If
allow_nan
is false, then it will be aValueError
to serialize out of rangefloat
values (nan
,inf
,-inf
) in strict compliance of the JSON specification, instead of using the JavaScript equivalents (NaN
,Infinity
,-Infinity
).If
indent
is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines.None
is the most compact representation.If specified,
separators
should be an(item_separator, key_separator)
tuple. The default is(', ', ': ')
if indent isNone
and(',', ': ')
otherwise. To get the most compact JSON representation, you should specify(',', ':')
to eliminate whitespace.default(obj)
is a function that should return a serializable version of obj or raise TypeError. The default simply raises TypeError.If sort_keys is true (default:
False
), then the output of dictionaries will be sorted by key.To use a custom
JSONEncoder
subclass (e.g. one that overrides the.default()
method to serialize additional types), specify it with thecls
kwarg; otherwiseJSONEncoder
is used.
- json_loads(*, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
Deserialize
s
(astr
,bytes
orbytearray
instance containing a JSON document) to a Python object.object_hook
is an optional function that will be called with the result of any object literal decode (adict
). The return value ofobject_hook
will be used instead of thedict
. This feature can be used to implement custom decoders (e.g. JSON-RPC class hinting).object_pairs_hook
is an optional function that will be called with the result of any object literal decoded with an ordered list of pairs. The return value ofobject_pairs_hook
will be used instead of thedict
. This feature can be used to implement custom decoders. Ifobject_hook
is also defined, theobject_pairs_hook
takes priority.parse_float
, if specified, will be called with the string of every JSON float to be decoded. By default this is equivalent to float(num_str). This can be used to use another datatype or parser for JSON floats (e.g. decimal.Decimal).parse_int
, if specified, will be called with the string of every JSON int to be decoded. By default this is equivalent to int(num_str). This can be used to use another datatype or parser for JSON integers (e.g. float).parse_constant
, if specified, will be called with one of the following strings: -Infinity, Infinity, NaN. This can be used to raise an exception if invalid JSON numbers are encountered.To use a custom
JSONDecoder
subclass, specify it with thecls
kwarg; otherwiseJSONDecoder
is used.
- __contains__(name: object) bool
Implement evaluation of ‘in’ conditional.
- Parameters
name – The name to check for existence in the model.
- __getitem__(name: str) Any
Implement evaluation of self[name].
- Parameters
name – Attribute name to return the value for.
- Returns
The value associated with the provided name/attribute name.
- Raises
AttributeError – If attribute does not exist on this object.
- __init__(**data: Any) None
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- __iter__() TupleGenerator
so dict(model) works
- __new__(**kwargs)
- __pretty__(fmt: Callable[[Any], Any], **kwargs: Any) Generator[Any, None, None]
Used by devtools (https://python-devtools.helpmanual.io/) to provide a human readable representations of objects
- __repr_name__() unicode
Name of the instance’s class, used in __repr__.
- __rich_repr__() RichReprResult
Get fields for Rich library
- __setitem__(name: str, value: Any) None
Implement item assignment (e.g.
self[name] = value
).- Parameters
name – Attribute name to set.
value – Value to assign to the attribute.
- classmethod __try_update_forward_refs__(**localns: Any) None
Same as update_forward_refs but will not raise exception when forward references are not defined.
- classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) Model
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
- copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) Model
Duplicate a model, optionally choose which fields to include, exclude and change.
- Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data
deep – set to True to make a deep copy of the model
- Returns
new model instance
- dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) DictStrAny
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- get(name: str, default: Optional[Any] = None) Any
Safely get the value of an attribute.
- Parameters
name – Attribute name to return the value for.
default – Value to return if attribute is not found.
- json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Callable[[Any], Any]] = None, models_as_dict: bool = True, **dumps_kwargs: Any) unicode
Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
- class runway.module.staticsite.parameters.models.RunwayStaticSiteModuleParametersDataModel[source]
Bases:
runway.config.models.base.ConfigProperty
Model for Runway static site Module parameters.
- acmcert_arn
The certificate arn used for any alias domains supplied. This is a requirement when supplying any custom domain.
- Type
Optional[str]
- additional_redirect_domains
Additional domains (beyond the
aliases
domains or the CloudFront URL if no aliases are provided) that will be authorized by the Auth@Edge UserPool AppClient.- Type
List[str]
- auth_at_edge
Auth@Edge make the static site private by placing it behind an authorization wall.
- Type
- compress
Whether the CloudFront default cache behavior will automatically compress certain files.
- Type
- cookie_settings
The default cookie settings for retrieved tokens and generated nonce’s.
- custom_error_responses
Define custom error responses.
- lambda_function_associations
This allows the user to deploy custom Lambda@Edge associations with their pre-build function versions.
- oauth_scopes
Scope is a mechanism in OAuth 2.0 to limit an application’s access to a user’s account.
- Type
List[str]
- redirect_path_auth_refresh
The path that a user is redirected to when their authorization tokens have expired (1 hour).
- Type
- required_group
Name of Cognito User Pool group of which users must be a member to be granted access to the site. If
None
, allows all UserPool users to have access.- Type
Optional[str]
- rewrite_directory_index
Deploy a Lambda@Edge function designed to rewrite directory indexes.
- Type
Optional[str]
- role_boundary_arn
Defines an IAM Managed Policy that will be set as the permissions boundary for any IAM Roles created to support the site.
- Type
Optional[str]
- supported_identity_providers
A comma delimited list of the User Pool client identity providers.
- Type
List[str]
- user_pool_arn
The ARN of a pre-existing Cognito User Pool to use with Auth@Edge.
- Type
Optional[str]
- web_acl
The ARN of a web access control list (web ACL) to associate with the CloudFront Distribution.
- Type
Optional[str]
- class Config[source]
Bases:
runway.config.models.base.ConfigProperty.Config
Model configuration.
- __init__()
- __new__(**kwargs)
- classmethod get_field_info(name: unicode) Dict[str, Any]
Get properties of FieldInfo from the fields property of the config class.
- getter_dict
alias of
pydantic.utils.GetterDict
- json_dumps(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw)
Serialize
obj
to a JSON formattedstr
.If
skipkeys
is true thendict
keys that are not basic types (str
,int
,float
,bool
,None
) will be skipped instead of raising aTypeError
.If
ensure_ascii
is false, then the return value can contain non-ASCII characters if they appear in strings contained inobj
. Otherwise, all such characters are escaped in JSON strings.If
check_circular
is false, then the circular reference check for container types will be skipped and a circular reference will result in anRecursionError
(or worse).If
allow_nan
is false, then it will be aValueError
to serialize out of rangefloat
values (nan
,inf
,-inf
) in strict compliance of the JSON specification, instead of using the JavaScript equivalents (NaN
,Infinity
,-Infinity
).If
indent
is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines.None
is the most compact representation.If specified,
separators
should be an(item_separator, key_separator)
tuple. The default is(', ', ': ')
if indent isNone
and(',', ': ')
otherwise. To get the most compact JSON representation, you should specify(',', ':')
to eliminate whitespace.default(obj)
is a function that should return a serializable version of obj or raise TypeError. The default simply raises TypeError.If sort_keys is true (default:
False
), then the output of dictionaries will be sorted by key.To use a custom
JSONEncoder
subclass (e.g. one that overrides the.default()
method to serialize additional types), specify it with thecls
kwarg; otherwiseJSONEncoder
is used.
- json_loads(*, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
Deserialize
s
(astr
,bytes
orbytearray
instance containing a JSON document) to a Python object.object_hook
is an optional function that will be called with the result of any object literal decode (adict
). The return value ofobject_hook
will be used instead of thedict
. This feature can be used to implement custom decoders (e.g. JSON-RPC class hinting).object_pairs_hook
is an optional function that will be called with the result of any object literal decoded with an ordered list of pairs. The return value ofobject_pairs_hook
will be used instead of thedict
. This feature can be used to implement custom decoders. Ifobject_hook
is also defined, theobject_pairs_hook
takes priority.parse_float
, if specified, will be called with the string of every JSON float to be decoded. By default this is equivalent to float(num_str). This can be used to use another datatype or parser for JSON floats (e.g. decimal.Decimal).parse_int
, if specified, will be called with the string of every JSON int to be decoded. By default this is equivalent to int(num_str). This can be used to use another datatype or parser for JSON integers (e.g. float).parse_constant
, if specified, will be called with one of the following strings: -Infinity, Infinity, NaN. This can be used to raise an exception if invalid JSON numbers are encountered.To use a custom
JSONDecoder
subclass, specify it with thecls
kwarg; otherwiseJSONDecoder
is used.
- __contains__(name: object) bool
Implement evaluation of ‘in’ conditional.
- Parameters
name – The name to check for existence in the model.
- __getitem__(name: str) Any
Implement evaluation of self[name].
- Parameters
name – Attribute name to return the value for.
- Returns
The value associated with the provided name/attribute name.
- Raises
AttributeError – If attribute does not exist on this object.
- __init__(**data: Any) None
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- __iter__() TupleGenerator
so dict(model) works
- __new__(**kwargs)
- __pretty__(fmt: Callable[[Any], Any], **kwargs: Any) Generator[Any, None, None]
Used by devtools (https://python-devtools.helpmanual.io/) to provide a human readable representations of objects
- __repr_name__() unicode
Name of the instance’s class, used in __repr__.
- __rich_repr__() RichReprResult
Get fields for Rich library
- __setitem__(name: str, value: Any) None
Implement item assignment (e.g.
self[name] = value
).- Parameters
name – Attribute name to set.
value – Value to assign to the attribute.
- classmethod __try_update_forward_refs__(**localns: Any) None
Same as update_forward_refs but will not raise exception when forward references are not defined.
- classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) Model
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
- copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) Model
Duplicate a model, optionally choose which fields to include, exclude and change.
- Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data
deep – set to True to make a deep copy of the model
- Returns
new model instance
- dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) DictStrAny
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- get(name: str, default: Optional[Any] = None) Any
Safely get the value of an attribute.
- Parameters
name – Attribute name to return the value for.
default – Value to return if attribute is not found.
- json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Callable[[Any], Any]] = None, models_as_dict: bool = True, **dumps_kwargs: Any) unicode
Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().