Class: AWSCDK::SQS::QueueAttributes

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sqs/queue_attributes.rb

Overview

Reference to a queue.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(queue_arn:, fifo: nil, key_arn: nil, queue_name: nil, queue_url: nil) ⇒ QueueAttributes

Returns a new instance of QueueAttributes.

Parameters:

  • queue_arn (String)

    The ARN of the queue.

  • fifo (Boolean, nil) (defaults to: nil)

    Whether this queue is an Amazon SQS FIFO queue. If false, this is a standard queue.

  • key_arn (String, nil) (defaults to: nil)

    KMS encryption key, if this queue is server-side encrypted by a KMS key.

  • queue_name (String, nil) (defaults to: nil)

    The name of the queue.

  • queue_url (String, nil) (defaults to: nil)

    The URL of the queue.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'sqs/queue_attributes.rb', line 12

def initialize(queue_arn:, fifo: nil, key_arn: nil, queue_name: nil, queue_url: nil)
  @queue_arn = queue_arn
  Jsii::Type.check_type(@queue_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queueArn")
  @fifo = fifo
  Jsii::Type.check_type(@fifo, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "fifo") unless @fifo.nil?
  @key_arn = key_arn
  Jsii::Type.check_type(@key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyArn") unless @key_arn.nil?
  @queue_name = queue_name
  Jsii::Type.check_type(@queue_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queueName") unless @queue_name.nil?
  @queue_url = queue_url
  Jsii::Type.check_type(@queue_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queueUrl") unless @queue_url.nil?
end

Instance Attribute Details

#fifoBoolean? (readonly)

Note:

Default: - if fifo is not specified, the property will be determined based on the queue name (not possible for FIFO queues imported from a token)

Whether this queue is an Amazon SQS FIFO queue. If false, this is a standard queue.

In case of a FIFO queue which is imported from a token, this value has to be explicitly set to true.

Returns:

  • (Boolean, nil)


35
36
37
# File 'sqs/queue_attributes.rb', line 35

def fifo
  @fifo
end

#key_arnString? (readonly)

Note:

Default: - None

KMS encryption key, if this queue is server-side encrypted by a KMS key.

Returns:

  • (String, nil)


40
41
42
# File 'sqs/queue_attributes.rb', line 40

def key_arn
  @key_arn
end

#queue_arnString (readonly)

The ARN of the queue.

Returns:

  • (String)


28
29
30
# File 'sqs/queue_attributes.rb', line 28

def queue_arn
  @queue_arn
end

#queue_nameString? (readonly)

Note:

Default: if queue name is not specified, the name will be derived from the queue ARN

The name of the queue.

Returns:

  • (String, nil)


45
46
47
# File 'sqs/queue_attributes.rb', line 45

def queue_name
  @queue_name
end

#queue_urlString? (readonly)

Note:

Default: - 'https://sqs.//'

The URL of the queue.



51
52
53
# File 'sqs/queue_attributes.rb', line 51

def queue_url
  @queue_url
end

Class Method Details

.jsii_propertiesObject



53
54
55
56
57
58
59
60
61
# File 'sqs/queue_attributes.rb', line 53

def self.jsii_properties
  {
    :queue_arn => "queueArn",
    :fifo => "fifo",
    :key_arn => "keyArn",
    :queue_name => "queueName",
    :queue_url => "queueUrl",
  }
end

Instance Method Details

#to_jsiiObject



63
64
65
66
67
68
69
70
71
72
73
# File 'sqs/queue_attributes.rb', line 63

def to_jsii
  result = {}
  result.merge!({
    "queueArn" => @queue_arn,
    "fifo" => @fifo,
    "keyArn" => @key_arn,
    "queueName" => @queue_name,
    "queueUrl" => @queue_url,
  })
  result.compact
end