expect multimethod

Methods

expect(rd:ResDef, e:Int) Source: autoload/Res.ngs:61
Throw an exception unless there is exactly e resources were found. Useful to express assumptions before operating.

Returns

rd

Example

slave_build_server = AWS::Instance(Tags={'env': 'aux', 'role': 'build-slave'}).expect(1)
subnets = AWS::Subnet(my_vpc_anchor).expect(2)
expect(rd:ResDef) Source: autoload/Res.ngs:71
Throw an exception unless the resources were found. Useful to express assumptions before operating.

Returns

rd

Example

instances = AWS::Instance({'env': env, 'role': role}).expect()