'auto-scaling-cooldown', 'auto-scaling-grace-period', 'auto-scaling-health-check', 'load-balancers', 'tags', 'termination-policies', 'schedule', 'notification', ] validator = [ dict, tolerant_dict(_instance_dict), one_of( [ validate_keys(in_(_run_instance_keys)), at_most_one_of('count', 'min_count'), at_most_one_of('count', 'max_count'), ], validate_keys(in_(_spot_instance_keys)), validate_keys(in_(_launch_config_keys + _auto_scaling_group_keys)), ), ] _block_device_mapping = { 'source': xl.switch({ 'no-device': xl.set_value('no_device', True), 'ephemeral[0-9]': xl.set_key('ephemeral_name'), 'snap-[a-fA-F0-9]*': xl.set_key('snapshot_id'), }), 'size': xl.set_key('size'),
validate_keys, validate_values _role_policy = one_or_more({ 'action': one_or_more(basestring), 'resource': one_or_more(basestring), 'condition': dict, }) validator = { 'name': basestring, 'path': absolute_path, 'policy': [ dict, validate_values([ dict, validate_keys(in_('allow', 'deny')), validate_values(_role_policy), ]), ], } def _setup_iam_connection(): global iam iam = hc2002.aws.iam.get_connection() _policy_effects = { 'allow': 'Allow', 'deny': 'Deny' } def _translate_role_policy(policy): policy_statements = [] for effect, statements in policy.iteritems(): effect = effect.capitalize()
'auto-scaling-cooldown', 'auto-scaling-grace-period', 'auto-scaling-health-check', 'load-balancers', 'tags', 'termination-policies', 'schedule', 'notification', ] validator = [ dict, tolerant_dict(_instance_dict), one_of( [ validate_keys(in_(_run_instance_keys)), at_most_one_of('count', 'min_count'), at_most_one_of('count', 'max_count'), ], validate_keys(in_(_spot_instance_keys)), validate_keys(in_(_launch_config_keys + _auto_scaling_group_keys)), ), ] _block_device_mapping = { 'source': xl.switch({ 'no-device': xl.set_value('no_device', True), 'ephemeral[0-9]': xl.set_key('ephemeral_name'), 'snap-[a-fA-F0-9]*': xl.set_key('snapshot_id'), }),