Delete a pipeline, its pipeline definition, and its run history. This function is idempotent.

    CLI example:

    .. code-block:: bash

        salt myminion boto_datapipeline.delete_pipeline my_pipeline_id

def delete_pipeline(pipeline_id, region=None, key=None, keyid=None, profile=None):
    '''
    Delete a pipeline, its pipeline definition, and its run history. This function is idempotent.

    CLI example:

    .. code-block:: bash

        salt myminion boto_datapipeline.delete_pipeline my_pipeline_id
    '''
    client = _get_client(region, key, keyid, profile)
    r = {}
    try:
        client.delete_pipeline(pipelineId=pipeline_id)
        r['result'] = True
    except (botocore.exceptions.BotoCoreError, botocore.exceptions.ClientError) as e:
        r['error'] = six.text_type(e)
    return r