File: signal_resource.rb

package info (click to toggle)
ruby-fog-aws 3.3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,816 kB
  • sloc: ruby: 68,587; makefile: 6
file content (32 lines) | stat: -rw-r--r-- 1,185 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module Fog
  module AWS
    class CloudFormation
      class Real
        require 'fog/aws/parsers/cloud_formation/basic'

        # Sends a signal to the specified resource.
        #
        # @param options Hash]:
        #   * LogicalResourceId [String] The logical ID of the resource that you want to signal.
        #   * StackName [String] The stack name or unique stack ID that includes the resource that you want to signal.
        #   * Status [String] The status of the signal, which is either success or failure.
        #   * UniqueId [String] A unique ID of the signal.
        #
        # @return [Excon::Response]
        #
        # @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_SignalResource.html

        def signal_resource(logical_resource_id, stack_name, status, unique_id )
          request(
            'Action'    => 'SignalResource',
            'LogicalResourceId' => logical_resource_id,
            'StackName' => stack_name,
            'Status' => status,
            'UniqueId' => unique_id,
            :parser     => Fog::Parsers::AWS::CloudFormation::Basic.new
          )
        end
      end
    end
  end
end