

def get_trail_by_arn(cloudtrail_client, trail_arn):
    "Gets trail information based on the trail's ARN"
    trails = cloudtrail_client.describe_trails()['trailList']
    for trail in trails:
        if (trail.get('TrailARN', None) == trails):
            return trail
    raise ValueError(('A trail could not be found for %s' % trail_arn))

dataset/ETHPy150Open aws/aws-cli/awscli/customizations/cloudtrail/utils.py get_trail_by_arn/VarMisuse@43/88 `trail_arn`->`trails`