library/src/main/java/com/kdgregory/aws/utils/cloudwatch/CloudWatchLogsUtil.java
/**
     *  Creates a log group, waiting until it is describable, a timeout elapses, or the
     *  thread is interrupted. No-op if the group exists at time of call.
     *
     *  @param  client          The service client.
     *  @param  groupName       The name of the group to create.
     *  @param  timeout         Milliseconds to wait for group to become available. Will
     *                          return false if unable to describe group before timeout,
     *                          although it may be describable afterward.
     *
     *  @return A retrieved <code>LogGroup</code> object if the group was successfully created
     *          or already exists, <code>null</code> if the timeout expired or the thread was
     *          interrupted before group was verified.
     */
Creates a log group, waiting until it is describable, a timeout elapses, or the
thread is interrupted. No-op if the group exists at time of call.

@param  client          The service client.
@param  groupName       The name of the group to create.
@param  timeout         Milliseconds to wait for group to become available. Will
return false if unable to describe group before timeout,
although it may be describable afterward.

@return A retrieved LogGroup object if the group was successfully created
or already exists, null if the timeout expired or the thread was
interrupted before group was verified.
Creates a log group waiting until it is describable a timeout elapses or the thread is interrupted . No - op if the group exists at time of call . @param client The service client . @param groupName The name of the group to create . @param timeout Milliseconds to wait for group to become available . Will return false if unable to describe group before timeout although it may be describable afterward . @return A retrieved LogGroup object if the group was successfully created or already exists null if the timeout expired or the thread was interrupted before group was verified .
public static LogGroup createLogGroup(AWSLogs client, String groupName, long timeout)
    {
        logger.debug("creating CloudWatch log group: " + groupName);
        try
        {
            CreateLogGroupRequest request = new CreateLogGroupRequest().withLogGroupName(groupName);
            client.createLogGroup(request);
        }
        catch (ResourceAlreadyExistsException ex)
        {
        }
        catch (OperationAbortedException ex)
        {
        }
        return waitUntilCreated(client, groupName, timeout, RESOURCE_TRANSITION_DESCRIBE_INTERVAL);
    }
public static LogGroup createLogGroup ( AWSLogs client , String groupName , long timeout ) { logger . debug ( "creating CloudWatch log group: " + groupName ) ; try { CreateLogGroupRequest request = new CreateLogGroupRequest ( ) . withLogGroupName ( groupName ) ; client . createLogGroup ( request ) ; } catch ( ResourceAlreadyExistsException ex ) { } catch ( OperationAbortedException ex ) { } return waitUntilCreated ( client , groupName , timeout , RESOURCE_TRANSITION_DESCRIBE_INTERVAL ) ; }
Creates a log group, waiting until it is describable, a timeout elapses, or the
  thread is interrupted.
Creates a log group waiting until it is describable a timeout elapses or the thread is interrupted .
// fall through so that we can return the LogGroup object // someone else is trying to create, fall through and wait until they're done