Search in sources :

Example 1 with SetQueueAttributesResult

use of com.amazonaws.services.sqs.model.SetQueueAttributesResult in project conductor by Netflix.

the class SQSObservableQueue method addPolicy.

private void addPolicy(List<String> accountsToAuthorize) {
    if (accountsToAuthorize == null || accountsToAuthorize.isEmpty()) {
        logger.info("No additional security policies attached for the queue " + queueName);
        return;
    }
    logger.info("Authorizing " + accountsToAuthorize + " to the queue " + queueName);
    Map<String, String> attributes = new HashMap<>();
    attributes.put("Policy", getPolicy(accountsToAuthorize));
    SetQueueAttributesResult result = client.setQueueAttributes(queueURL, attributes);
    logger.info("policy attachment result: " + result);
    logger.info("policy attachment result: status=" + result.getSdkHttpMetadata().getHttpStatusCode());
}
Also used : SetQueueAttributesResult(com.amazonaws.services.sqs.model.SetQueueAttributesResult) HashMap(java.util.HashMap)

Aggregations

SetQueueAttributesResult (com.amazonaws.services.sqs.model.SetQueueAttributesResult)1 HashMap (java.util.HashMap)1