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());
}
Aggregations