def create_ad_parameter(client, resource_name, parameter_index, insertion_text):
    """Creates a new ad parameter create operation and returns it.

    There can be a maximum of two ad parameters per ad group criterion, one
    with "parameter_index" = 1 and another with "parameter_index" = 2.

    Restrictions apply to the value of the "insertion_text". For more
    information, see the field documentation in the AdParameter class located
    here: https://developers.google.com/google-ads/api/fields/v2/ad_parameter#ad_parameterinsertion_text

    Args:
        client: An initialized GoogleAdsClient instance.
        resource_name: The resource name of the ad group criterion.
        parameter_index: The unique index int of this ad parameter..
        insertion_text: A numeric str value to insert into the ad text.

    Returns: A new AdParamterOperation message class instance.
    """
    ad_param_operation = client.get_type('AdParameterOperation', version='v2')
    ad_param = ad_param_operation.create
    ad_param.ad_group_criterion.value = resource_name
    ad_param.parameter_index.value = parameter_index
    ad_param.insertion_text.value = insertion_text
    return ad_param_operation