# Path: awscfncli2/config/config.py
# class ConfigError(Exception):
#     pass
# 
# Path: awscfncli2/config/formats.py
# CANNED_STACK_POLICIES = {
#     'ALLOW_ALL': '{"Statement":[{"Effect":"Allow","Action":"Update:*","Principal":"*","Resource":"*"}]}',
#     'ALLOW_MODIFY': '{"Statement":[{"Effect":"Allow","Action":["Update:Modify"],"Principal":"*","Resource":"*"}]}',
#     'DENY_DELETE': '{"Statement":[{"Effect":"Allow","NotAction":"Update:Delete","Principal":"*","Resource":"*"}]}',
#     'DENY_ALL': '{"Statement":[{"Effect":"Deny","Action":"Update:*","Principal":"*","Resource":"*"}]}',
# }


import os
import six
from collections import OrderedDict
from awscfncli2.config import CANNED_STACK_POLICIES, ConfigError
    elif isinstance(v, int):
        return str(v)
    else:
        return v


def make_boto3_parameters(parameters, is_packaging):
    # inject parameters
    StackName = parameters['StackName']

    Template = parameters['Template']
    if Template is None:
        raise ConfigError('No template found, specify Template as a local file or S3 url.')
    elif Template.startswith('https') or Template.startswith('http'):
        # s3 template
        TemplateURL, TemplateBody = Template, None
    elif is_packaging:
        # local template with package=on
        TemplateURL = Template
        TemplateBody = None
    else:
        # local template
        TemplateURL = None
        with open(Template) as fp:
            TemplateBody = fp.read()

    # lookup canned policy
    StackPolicy = parameters['StackPolicy']
    if StackPolicy is not None:
        try:

# Path: awscfncli2/config/config.py
# class ConfigError(Exception):
#     pass
# 
# Path: awscfncli2/config/formats.py
# CANNED_STACK_POLICIES = {
#     'ALLOW_ALL': '{"Statement":[{"Effect":"Allow","Action":"Update:*","Principal":"*","Resource":"*"}]}',
#     'ALLOW_MODIFY': '{"Statement":[{"Effect":"Allow","Action":["Update:Modify"],"Principal":"*","Resource":"*"}]}',
#     'DENY_DELETE': '{"Statement":[{"Effect":"Allow","NotAction":"Update:Delete","Principal":"*","Resource":"*"}]}',
#     'DENY_ALL': '{"Statement":[{"Effect":"Deny","Action":"Update:*","Principal":"*","Resource":"*"}]}',
# }


# Path: awscfncli2/runner/runbook/boto3_params.py
import os
import six
from collections import OrderedDict
from awscfncli2.config import CANNED_STACK_POLICIES, ConfigError

    elif isinstance(v, int):
        return str(v)
    else:
        return v


def make_boto3_parameters(parameters, is_packaging):
    # inject parameters
    StackName = parameters['StackName']

    Template = parameters['Template']
    if Template is None:
        raise ConfigError('No template found, specify Template as a local file or S3 url.')
    elif Template.startswith('https') or Template.startswith('http'):
        # s3 template
        TemplateURL, TemplateBody = Template, None
    elif is_packaging:
        # local template with package=on
        TemplateURL = Template
        TemplateBody = None
    else:
        # local template
        TemplateURL = None
        with open(Template) as fp:
            TemplateBody = fp.read()

    # lookup canned policy
    StackPolicy = parameters['StackPolicy']
    if StackPolicy is not None:
        try:

            StackPolicyBody = CANNED_STACK_POLICIES[StackPolicy]