Message Queue

Message Queues are message queuing services, such as AWS SQS. This class inherits from TopLevelResource and has direct access to the resource’s database object. The following attributes are directly accessible:

attr organization_service_id:
 The ID of the parent organization service (cloud)
attr url:The URL of the message queue
attr name:The name of the message queue
attr region_name:
 The region the queue is in
attr message_count:
 The number of messages in the queue
attr messages_delayed_count:
 The number of delayed messages in the queue
attr messages_not_visible_count:
 The number of messages that are not deleted or timed out
attr creation_timestamp:
 The time the queue was created
attr last_modified:
 The most recent time the queue was modified
attr delay:The number of seconds of the default delay of the queue
attr max_size:The maximum size in bytes a message can be
attr retention_period:
 The length of time in seconds that a message is kept
attr policy:The policy of the queue
attr arn:The Amazon Resource Name of the queue
attr redrive_policy:
 The parameters for dead-letter queue functionality
attr server_side_encryption:
 Indicates whether server side encryption is enabled on the queue
attr queue_type:
 Type of queue, example FIFO, standard, etc.
attr deduplication:
 Indicates whether deduplication is enabled for the queue
attr key_resource_id:
 Resource ID of encryption key for the queue
attr key_reuse_period:
 Length of time in seconds that the data key can be reused to encrypt or decrypt messages
attr visibility_timeout:
 Visibility timeout for the queue
attr receive_message_wait_time:
 The length of time in seconds the queue waits for a message to arrive
class DivvyResource.Resources.messagequeue.MessageQueue(resource_id)

Bases: DivvyResource.Resources.toplevelresource.TopLevelResource

Message Queue operations

get_date_created()
static get_db_class()
static get_provider_id_field()
static get_resource_type()
get_supported_actions()
handle_resource_created(user_resource_id=None, project_resource_id=None)

This should be called when a resource is created/discovered after the basic data is added to the database. This gives an opportunity for post-addition hooks (assignment to groups, alerts, etc)

handle_resource_destroyed(user_resource_id=None)

This should be called when a resource is destroyed before the basic data is removed from the database. This gives an opportunity for pre-destruction hooks (removal from groups, alerts, etc)

handle_resource_modified(resource, *args, **kwargs)

This should be called when a resource is modified after the new data has been updated in teh DB session. This gives an opportunity for post-modification hooks

message_queue
message_queue_id
top_level_resource = True