Module Expr Str ImportFrom alias Import alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str BinOpMod Str Call AttributeLoad NameLoad attr NameLoad Dict Str Str Str Dict Str ListLoad Dict Str ListLoad NameLoad Dict Str ListLoad Dict Str Str NameLoad Str Dict Str ListLoad Dict Str Dict Str Str ListLoad Dict Str Str Dict Str Str Str Str ListLoad Dict Str Dict Str Str Str Str Dict Str Dict Str Str Str Str Str Str Str Str Dict Str Str Str Str Str Dict Str Str Str Call NameLoad BinOpAdd AttributeLoad Call AttributeLoad NameLoad attr attr Num Str Str Str Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str Str Str Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Print BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad
N/A N/A This code example creates a new line item to serve to video content.

This feature is only available to DFP premium solution networks. To determine
which line items exist, run get_all_line_items.py. To determine which orders
exist, run get_all_orders.py. To create a video ad unit, run
create_video_ad_unit.py. To create criteria for categories, run
create_custom_targeting_keys_and_values.py datetime date N/A uuid googleads dfp N/A ORDER_ID INSERT_ORDER_ID_HERE N/A TARGETED_VIDEO_AD_UNIT_ID INSERT_TARGETED_VIDEO_AD_UNIT_ID_HERE N/A CONTENT_CUSTOM_TARGETING_VALUE_ID INSERT_CONTENT_CUSTOM_TARGETING_VALUE_ID_HERE main N/A N/A client order_id targeted_video_ad_unit_id content_custom_targeting_value_id N/A N/A N/A line_item_service N/A N/A client GetService LineItemService version v201602 N/A line_item N/A name orderId targeting creativePlaceholders environmentType companionDeliveryOption startDateTimeType lineItemType endDateTime costType costPerUnit primaryGoal contractedUnitsBought creativeRotationType discountType allowOverbook N/A Line item #%s N/A N/A uuid uuid4 order_id N/A contentTargeting inventoryTargeting videoPositionTargeting N/A targetedContentMetadata N/A N/A customTargetingValueIds N/A content_custom_targeting_value_id N/A targetedAdUnits N/A N/A adUnitId includeDescendants targeted_video_ad_unit_id true N/A targetedPositions N/A N/A videoPosition N/A positionType PREROLL N/A N/A size companions N/A width height 400 300 N/A N/A size N/A width height 300 250 N/A size N/A width height 728 90 VIDEO_PLAYER OPTIONAL IMMEDIATELY SPONSORSHIP N/A date hour minute second timeZoneID N/A year month day N/A str N/A N/A N/A N/A date today year 1 9 30 0 0 0 America/Los_Angeles CPM N/A currencyCode microAmount USD 2000000 N/A units unitType goalType 50 IMPRESSIONS DAILY 100 OPTIMIZED PERCENTAGE true N/A line_item N/A N/A line_item_service createLineItem line_item N/A N/A Video line item with id '%s', belonging to order id '%s', and named '%s' was created. N/A N/A line_item N/A id N/A line_item N/A orderId N/A line_item N/A name N/A N/A N/A __name__ __main__ N/A N/A dfp_client N/A N/A N/A dfp DfpClient LoadFromStorage N/A N/A main dfp_client ORDER_ID TARGETED_VIDEO_AD_UNIT_ID CONTENT_CUSTOM_TARGETING_VALUE_ID