runway.cfngin.lookups.handlers.ami module¶
AMI lookup.
- class runway.cfngin.lookups.handlers.ami.AmiLookup[source]¶
Bases:
LookupHandler
[CfnginContext
]AMI lookup.
- classmethod handle(value: str, context: runway.context.CfnginContext, **_kwargs: Any) str [source]¶
Fetch the most recent AMI Id using a filter.
- Parameters:
value – Parameter(s) given to this lookup.
context – Context instance.
Example
The above fetches the most recent AMI where owner is self account or amazon and the ami name matches the regex described, the architecture will be either x64 or i386
You can also optionally specify the region in which to perform the AMI lookup.
- pydantic model runway.cfngin.lookups.handlers.ami.ArgsDataModel[source]¶
Bases:
BaseModel
Arguments data model.
Any other arguments specified are sent as filters to the AWS API. For example,
architecture:x86_64
will add a filter.Show JSON schema
{ "title": "ArgsDataModel", "description": "Arguments data model.\n\nAny other arguments specified are sent as filters to the AWS API.\nFor example, ``architecture:x86_64`` will add a filter.", "type": "object", "properties": { "executable_users": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Executable Users" }, "owners": { "items": { "type": "string" }, "title": "Owners", "type": "array" }, "region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "required": [ "owners" ] }