<s> from . import AWSObject , AWSProperty <EOL> from . validators import integer , boolean , status <EOL> from . validators import iam_path , iam_role_name , iam_group_name <EOL> try : <EOL> from awacs . aws import Policy <EOL> policytypes = ( dict , Policy ) <EOL> except ImportError : <EOL> policytypes = dict , <EOL> Active = "<STR_LIT>" <EOL> Inactive = "<STR_LIT>" <EOL> class AccessKey ( AWSObject ) : <EOL> resource_type = "<STR_LIT>" <EOL> props = { <EOL> '<STR_LIT>' : ( integer , False ) , <EOL> '<STR_LIT>' : ( status , True ) , <EOL> '<STR_LIT>' : ( basestring , True ) , <EOL> } <EOL> class PolicyType ( AWSObject ) : <EOL> resource_type = "<STR_LIT>" <EOL> props = { <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> '<STR_LIT>' : ( policytypes , True ) , <EOL> '<STR_LIT>' : ( basestring , True ) , <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> } <EOL> class Policy ( AWSProperty ) : <EOL> props = { <EOL> '<STR_LIT>' : ( policytypes , True ) , <EOL> '<STR_LIT>' : ( basestring , True ) , <EOL> } <EOL> PolicyProperty = Policy <EOL> class Group ( AWSObject ) : <EOL> def validate_title ( self ) : <EOL> iam_group_name ( self . title ) <EOL> resource_type = "<STR_LIT>" <EOL> props = { <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> '<STR_LIT>' : ( iam_path , False ) , <EOL> '<STR_LIT>' : ( [ Policy ] , False ) , <EOL> } <EOL> class InstanceProfile ( AWSObject ) : <EOL> resource_type = "<STR_LIT>" <EOL> props = { <EOL> '<STR_LIT>' : ( iam_path , False ) , <EOL> '<STR_LIT>' : ( list , True ) , <EOL> } <EOL> class Role ( AWSObject ) : <EOL> def validate_title ( self ) : <EOL> iam_role_name ( self . title ) <EOL> resource_type = "<STR_LIT>" <EOL> props = { <EOL> '<STR_LIT>' : ( policytypes , True ) , <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> '<STR_LIT>' : ( iam_path , False ) , <EOL> '<STR_LIT>' : ( [ Policy ] , False ) , <EOL> } <EOL> class LoginProfile ( AWSProperty ) : <EOL> props = { <EOL> '<STR_LIT>' : ( basestring , True ) , <EOL> '<STR_LIT>' : ( boolean , False ) , <EOL> } <EOL> class User ( AWSObject ) : <EOL> resource_type = "<STR_LIT>" <EOL> props = { <EOL> '<STR_LIT>' : ( iam_path , False ) , <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> '<STR_LIT>' : ( LoginProfile , False ) , <EOL> '<STR_LIT>' : ( [ Policy ] , False ) , <EOL> } <EOL> class UserToGroupAddition ( AWSObject ) : <EOL> resource_type = "<STR_LIT>" <EOL> props = { <EOL> '<STR_LIT>' : ( basestring , True ) , <EOL> '<STR_LIT>' : ( list , True ) , <EOL> } <EOL> class ManagedPolicy ( AWSObject ) : <EOL> resource_type = "<STR_LIT>" <EOL> props = { <EOL> '<STR_LIT>' : ( basestring , False ) , <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> '<STR_LIT>' : ( iam_path , False ) , <EOL> '<STR_LIT>' : ( policytypes , True ) , <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> '<STR_LIT>' : ( [ basestring ] , False ) , <EOL> } </s>
