runway.cfngin.hooks.docker.data_models module

Hook data models.

These are makeshift data models for use until Runway v2 is realeased and pydantic can be used.

class runway.cfngin.hooks.docker.data_models.BaseModel[source]

Bases: object

Base model.


Return object as a dict.

find(query, default=None, **kwargs)[source]

Find a value in the object.

get(name, default=None)[source]

Get a value or return default if it is not found.


name: The value to look for. default: Returned if no other value is found.

classmethod parse_obj(obj, context=None)[source]

Parse object.

class runway.cfngin.hooks.docker.data_models.ElasticContainerRegistry(account_id=None, alias=None, aws_region=None, **kwargs)[source]

Bases: runway.cfngin.hooks.docker.data_models.BaseModel

AWS Elastic Container Registry.

Instantiate class.

PUBLIC_URI_TEMPLATE = '{registry_alias}/'
URI_TEMPLATE = '{aws_account_id}.dkr.ecr.{aws_region}'
property fqn

Fully qualified ECR name.

class runway.cfngin.hooks.docker.data_models.DockerImage(image)[source]

Bases: runway.cfngin.hooks.docker.data_models.BaseModel

Wrapper for docker.models.images.Image.

Instantiate class.

property id

ID of the image.

property repo

Repository URI.

property short_id

`` prefix.


ID of the image truncated to 10 characters plus the ``sha256

property tags

List of image tags.

property uri

Return a mapping of tag to image URI.

class runway.cfngin.hooks.docker.data_models.ElasticContainerRegistryRepository(repo_name, account_id=None, aws_region=None, registry_alias=None, **kwargs)[source]

Bases: runway.cfngin.hooks.docker.data_models.BaseModel

AWS Elastic Container Registry (ECR) Repository.

Instantiace class.

  • account_id – AWS account ID.

  • aws_region – AWS region.

  • registry_alias – Alias of a public ECR registry.

  • repo_name – Name of the ECR repository.

property fqn

Fully qualified ECR repo name.