#NEWLINE# def main( client , hierarchy_level_one_key_id , hierarchy_level_two_key_id ) : #NEWLINE# #INDENT# content_metadata_key_hierarchy_service = client . GetService ( 'ContentMetadataKeyHierarchyService' , version = 'v201508' ) #NEWLINE# hierarchy_level_1 = { #NEWLINE# #INDENT# 'customTargetingKeyId' : hierarchy_level_one_key_id , #NEWLINE# 'hierarchyLevel' : '1' , #NEWLINE# #UNINDENT# } #NEWLINE# hierarchy_level_2 = { #NEWLINE# #INDENT# 'customTargetingKeyId' : hierarchy_level_two_key_id , #NEWLINE# 'hierarchyLevel' : '2' , #NEWLINE# #UNINDENT# } #NEWLINE# hierarchy_levels = [ hierarchy_level_1 , hierarchy_level_2 ] #NEWLINE# content_metadata_key_hierarchy = { #NEWLINE# #INDENT# 'name' : ( 'Content Metadata Key Hierarchy #%s' % uuid . uuid4 ( ) ) , #NEWLINE# 'hierarchyLevels' : hierarchy_levels , #NEWLINE# #UNINDENT# } #NEWLINE# content_metadata_key_hierarchies = content_metadata_key_hierarchy_service . createContentMetadataKeyHierarchies ( [ content_metadata_key_hierarchy ] ) #NEWLINE# for content_metadata_key_hierarchy in content_metadata_key_hierarchies : #NEWLINE# #INDENT# print ( ( "Content metadata key hierarchy with id '%s' and name '%s' was created." % ( content_metadata_key_hierarchy [ 'id' ] , content_metadata_key_hierarchy [ 'name' ] ) ) )