/** * <p> * The AWS account ID of the account that created the queue. * </p> * * @param queueOwnerAWSAccountId * The AWS account ID of the account that created the queue. * @return Returns a reference to this object so that method calls can be chained together. */ public GetQueueUrlRequest withQueueOwnerAWSAccountId(String queueOwnerAWSAccountId) { setQueueOwnerAWSAccountId(queueOwnerAWSAccountId); return this; }
/** * <p> * The AWS account ID of the account that created the queue. * </p> * * @param queueOwnerAWSAccountId * The AWS account ID of the account that created the queue. * @return Returns a reference to this object so that method calls can be chained together. */ public GetQueueUrlRequest withQueueOwnerAWSAccountId(String queueOwnerAWSAccountId) { setQueueOwnerAWSAccountId(queueOwnerAWSAccountId); return this; }
try { GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest(queueName); getQueueUrlRequest.setQueueOwnerAWSAccountId(queueOwnerAccountId); prepareRequest(getQueueUrlRequest); amazonSQSClient.getQueueUrl(getQueueUrlRequest);
/** * Check if the requested queue exists. This function calls * <code>GetQueueUrl</code> for the given queue name with the given owner * accountId, returning true on success, false if it gets * <code>QueueDoesNotExistException</code>. * * @param queueName * the queue to check * @param queueOwnerAccountId * The AWS accountId of the account that created the queue * @return true if the queue exists, false if it doesn't. * @throws JMSException */ public boolean queueExists(String queueName, String queueOwnerAccountId) throws JMSException { try { GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest(queueName); getQueueUrlRequest.setQueueOwnerAWSAccountId(queueOwnerAccountId); prepareRequest(getQueueUrlRequest); amazonSQSClient.getQueueUrl(getQueueUrlRequest); return true; } catch (QueueDoesNotExistException e) { return false; } catch (AmazonClientException e) { throw handleException(e, "getQueueUrl"); } }