Class: Stigg::Resources::Internal::Beta::EventQueues

Inherits:
Object
  • Object
show all
Defined in:
lib/stigg/resources/internal/beta/event_queues.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ EventQueues

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of EventQueues.

Parameters:



130
131
132
# File 'lib/stigg/resources/internal/beta/event_queues.rb', line 130

def initialize(client:)
  @client = client
end

Instance Method Details

#delete(queue_name, request_options: {}) ⇒ Stigg::Models::Internal::Beta::EventQueueResponse

Delete an event queue and tear down its infrastructure

Parameters:

  • queue_name (String)

    The queue name identifier

  • request_options (Stigg::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



85
86
87
88
89
90
91
92
# File 'lib/stigg/resources/internal/beta/event_queues.rb', line 85

def delete(queue_name, params = {})
  @client.request(
    method: :delete,
    path: ["internal/beta/event-queues/%1$s", queue_name],
    model: Stigg::Models::Internal::Beta::EventQueueResponse,
    options: params[:request_options]
  )
end

#list(request_options: {}) ⇒ Stigg::Models::Internal::Beta::EventQueueListResponse

List all event queues for the current environment

Parameters:

Returns:

See Also:



65
66
67
68
69
70
71
72
# File 'lib/stigg/resources/internal/beta/event_queues.rb', line 65

def list(params = {})
  @client.request(
    method: :get,
    path: "internal/beta/event-queues",
    model: Stigg::Models::Internal::Beta::EventQueueListResponse,
    options: params[:request_options]
  )
end

#provision(region:, allowed_assume_role_arns: nil, create_low_priority_queues: nil, event_types: nil, suffix: nil, request_options: {}) ⇒ Stigg::Models::Internal::Beta::EventQueueResponse

Some parameter documentations has been truncated, see Models::Internal::Beta::EventQueueProvisionParams for more details.

Provision SQS queue, SNS subscriptions, and IAM role for the current environment

Parameters:

Returns:

See Also:



116
117
118
119
120
121
122
123
124
125
# File 'lib/stigg/resources/internal/beta/event_queues.rb', line 116

def provision(params)
  parsed, options = Stigg::Models::Internal::Beta::EventQueueProvisionParams.dump_request(params)
  @client.request(
    method: :post,
    path: "internal/beta/event-queues/provision",
    body: parsed,
    model: Stigg::Models::Internal::Beta::EventQueueResponse,
    options: options
  )
end

#retrieve(queue_name, request_options: {}) ⇒ Stigg::Models::Internal::Beta::EventQueueResponse

Get event queue by queue name

Parameters:

  • queue_name (String)

    The queue name identifier

  • request_options (Stigg::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



19
20
21
22
23
24
25
26
# File 'lib/stigg/resources/internal/beta/event_queues.rb', line 19

def retrieve(queue_name, params = {})
  @client.request(
    method: :get,
    path: ["internal/beta/event-queues/%1$s", queue_name],
    model: Stigg::Models::Internal::Beta::EventQueueResponse,
    options: params[:request_options]
  )
end

#update(queue_name, allowed_assume_role_arns: nil, create_low_priority_queues: nil, event_types: nil, request_options: {}) ⇒ Stigg::Models::Internal::Beta::EventQueueResponse

Update event queue configuration

Parameters:

Returns:

See Also:



45
46
47
48
49
50
51
52
53
54
# File 'lib/stigg/resources/internal/beta/event_queues.rb', line 45

def update(queue_name, params = {})
  parsed, options = Stigg::Models::Internal::Beta::EventQueueUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["internal/beta/event-queues/%1$s", queue_name],
    body: parsed,
    model: Stigg::Models::Internal::Beta::EventQueueResponse,
    options: options
  )
end