code: def _CreatePerformanceTarget(client, campaign_group_id):
    
    # Get the CampaignGroupPerformanceTargetService.
    cgpt_service = client.GetService('CampaignGroupPerformanceTargetService',
                                     version='v201809')
  
    # Create the operation.
    operations = [{
        'operator': 'ADD',
        # Create the performance target.
        'operand': {
            'campaignGroupId': campaign_group_id,
            'performanceTarget': {
                # Keep the CPC for the campaigns < $3.
                'efficiencyTargetType': 'CPC_LESS_THAN_OR_EQUAL_TO',
                'efficiencyTargetValue': 3000000,
                # Keep the maximum spend under $50.
                'spendTargetType': 'MAXIMUM',
                'spendTarget': {
                    'microAmount': 500000000
                },
                # Aim for at least 3000 clicks.
                'volumeGoalType': 'MAXIMIZE_CLICKS',
                'volumeTargetValue': 3000,
                # Start the performance target today, and run it for the next 90
                # days.
                'startDate': datetime.datetime.now().strftime('%Y%m%d'),
                'endDate': (datetime.datetime.now() +
                            datetime.timedelta(90)).strftime('%Y%m%d')
            }
        }
    }]
  
    cgpt = cgpt_service.mutate(operations)['value'][0]
  
    # Display the results.
    print ('Campaign performance target with ID "%d" was added for campaign '
           'group ID "%d".' % (cgpt['id'], cgpt['campaignGroupId']))
docs: Creates a performance target for the campaign group.
  
    Args:
      client: an AdWordsClient instance.
      campaign_group_id: an integer ID for the campaign group.