runway.cfngin.blueprints.variables.types module

CFNgin blueprint variable types.

class runway.cfngin.blueprints.variables.types.TroposphereType(defined_type: Type[_TroposphereType], *, many: bool = False, optional: bool = False, validate: bool = True)[source]

Bases: Generic[runway.cfngin.blueprints.variables.types._TroposphereType]

Represents a Troposphere type.

Troposphere will convert the value provided to the variable to the specified Troposphere type.

Both resource and parameter classes (which are just used to configure other resources) are acceptable as configuration values.

Complete resource definitions must be dictionaries, with the keys identifying the resource titles, and the values being used as the constructor parameters.

Parameter classes can be defined as dictionary or a list of dictionaries. In either case, the keys and values will be used directly as constructor parameters.

Instantiate class.

Parameters
  • defined_type – Troposphere type.

  • many – Whether or not multiple resources can be constructed. If the defined type is a resource, multiple resources can be passed as a dictionary of dictionaries. If it is a parameter class, multiple resources are passed as a list.

  • optional – Whether an undefined/null configured value is acceptable. In that case a value of None will be passed to the template, even if many is enabled.

  • validate – Whether to validate the generated object on creation. Should be left enabled unless the object will be augmented with mandatory parameters in the template code, such that it must be validated at a later point.

property resource_name

Name of the type or resource.

create(value: Dict[str, Any])_TroposphereType[source]
create(value: List[Dict[str, Any]])List[_TroposphereType]
create(value: None)None

Create the troposphere type from the value.

Parameters

value – A dictionary or list of dictionaries (see class documentation for details) to use as parameters to create the Troposphere type instance. Each dictionary will be passed to the from_dict method of the type.

Returns

Returns the value converted to the troposphere type.

class runway.cfngin.blueprints.variables.types.CFNType[source]

Bases: object

Represents a CloudFormation Parameter Type.

CFNType can be used as the type for a Blueprint variable. Unlike other variables, a variable with type: CFNType, will be submitted to CloudFormation as a Parameter.

parameter_type

Name of the CloudFormation Parameter type to specify when submitting as a CloudFormation Parameter.

Type

ClassVar[str]

class runway.cfngin.blueprints.variables.types.CFNString[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A literal string.

class runway.cfngin.blueprints.variables.types.CFNNumber[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An integer or float.

AWS CloudFormation validates the parameter value as a number; however, whenyou use the parameter elsewhere in your template (for example, by using the Ref intrinsic function), the parameter value becomes a string.

class runway.cfngin.blueprints.variables.types.CFNNumberList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of integers or floats that are separated by commas.

AWS CloudFormation validates the parameter value as numbers; however, when you use the parameter elsewhere in your template (for example, by using the Ref intrinsic function), the parameter value becomes a list of strings.

class runway.cfngin.blueprints.variables.types.CFNCommaDelimitedList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of literal strings that are separated by commas.

The total number of strings should be one more than the total number of commas. Also, each member string is space trimmed.

class runway.cfngin.blueprints.variables.types.EC2AvailabilityZoneName[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An Availability Zone, such as us-west-2a.

class runway.cfngin.blueprints.variables.types.EC2ImageId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An Amazon EC2 image ID, such as ami-0ff8a91507f77f867.

Note that the AWS CloudFormation console doesn’t show a drop-down list of values for this parameter type.

class runway.cfngin.blueprints.variables.types.EC2InstanceId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An Amazon EC2 instance ID, such as i-1e731a32.

class runway.cfngin.blueprints.variables.types.EC2KeyPairKeyName[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An Amazon EC2 key pair name.

class runway.cfngin.blueprints.variables.types.EC2SecurityGroupGroupName[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An EC2-Classic or default VPC security group name, such as my-sg-abc.

class runway.cfngin.blueprints.variables.types.EC2SecurityGroupId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A security group ID, such as sg-a123fd85.

class runway.cfngin.blueprints.variables.types.EC2SubnetId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A subnet ID, such as subnet-123a351e.

class runway.cfngin.blueprints.variables.types.EC2VolumeId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An Amazon EBS volume ID, such as vol-3cdd3f56.

class runway.cfngin.blueprints.variables.types.EC2VPCId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A VPC ID, such as vpc-a123baa3.

class runway.cfngin.blueprints.variables.types.Route53HostedZoneId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An Amazon Route 53 hosted zone ID, such as Z23YXV4OVPL04A.

class runway.cfngin.blueprints.variables.types.EC2AvailabilityZoneNameList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of Availability Zones for a region, such as us-west-2a, us-west-2b.

class runway.cfngin.blueprints.variables.types.EC2ImageIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of Amazon EC2 image IDs, such as ami-0ff8a91507f77f867, ami-0a584ac55a7631c0c.

Note that the AWS CloudFormation console doesn’t show a drop-down list of values for this parameter type.

class runway.cfngin.blueprints.variables.types.EC2InstanceIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of Amazon EC2 instance IDs, such as i-1e731a32, i-1e731a34.

class runway.cfngin.blueprints.variables.types.EC2SecurityGroupGroupNameList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of EC2-Classic or default VPC security group names.

class runway.cfngin.blueprints.variables.types.EC2SecurityGroupIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of security group IDs, such as sg-a123fd85, sg-b456fd85.

class runway.cfngin.blueprints.variables.types.EC2SubnetIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of subnet IDs, such as subnet-123a351e, subnet-456b351e.

class runway.cfngin.blueprints.variables.types.EC2VolumeIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of Amazon EBS volume IDs, such as vol-3cdd3f56, vol-4cdd3f56.

class runway.cfngin.blueprints.variables.types.EC2VPCIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of VPC IDs, such as vpc-a123baa3, vpc-b456baa3.

class runway.cfngin.blueprints.variables.types.Route53HostedZoneIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

An array of Amazon Route 53 hosted zone IDs, such as Z23YXV4OVPL04A, Z23YXV4OVPL04B.

class runway.cfngin.blueprints.variables.types.SSMParameterName[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

The name of a Systems Manager parameter key.

Use this parameter when you want to pass the parameter key. For example, you can use this type to validate that the parameter exists.

class runway.cfngin.blueprints.variables.types.SSMParameterValueString[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is a string.

This corresponds to the String parameter type in Parameter Store.

class runway.cfngin.blueprints.variables.types.SSMParameterValueStringList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is a list of strings.

This corresponds to the StringList parameter type in Parameter Store.

class runway.cfngin.blueprints.variables.types.SSMParameterValueCommaDelimitedList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is a list of strings.

This corresponds to the StringList parameter type in Parameter Store.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2AvailabilityZoneName[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2ImageId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2InstanceId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2KeyPairKeyName[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2SecurityGroupGroupName[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2SecurityGroupId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2SubnetId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2VolumeId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2VPCId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueRoute53HostedZoneId[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2AvailabilityZoneNameList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2ImageIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2InstanceIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2SecurityGroupGroupNameList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2SecurityGroupIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2SubnetIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2VolumeIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueEC2VPCIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.

class runway.cfngin.blueprints.variables.types.SSMParameterValueRoute53HostedZoneIdList[source]

Bases: runway.cfngin.blueprints.variables.types.CFNType

A Systems Manager parameter whose value is an AWS-specific parameter type.