aws-sdk-cloudformation 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,23 +1,14 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module CloudFormation
10
- module Errors
8
+ module Aws::CloudFormation
9
+ module Errors
11
10
 
12
- extend Aws::Errors::DynamicErrors
11
+ extend Aws::Errors::DynamicErrors
13
12
 
14
- # Raised when calling #load or #data on a resource class that can not be
15
- # loaded. This can happen when:
16
- #
17
- # * A resource class has identifiers, but no data attributes.
18
- # * Resource data is only available when making an API call that
19
- # enumerates all resources of that type.
20
- class ResourceNotLoadable < RuntimeError; end
21
- end
22
13
  end
23
14
  end
@@ -1,148 +1,146 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module CloudFormation
10
- class Event
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(id, options = {})
15
- # @param [String] id
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :id
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @id = extract_id(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
25
- end
8
+ module Aws::CloudFormation
9
+ class Event
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(id, options = {})
14
+ # @param [String] id
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :id
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @id = extract_id(args, options)
22
+ @data = options.delete(:data)
23
+ @client = options.delete(:client) || Client.new(options)
24
+ end
26
25
 
27
- # @!group Read-Only Attributes
26
+ # @!group Read-Only Attributes
28
27
 
29
- # @return [String]
30
- def id
31
- @id
32
- end
33
- alias :event_id :id
28
+ # @return [String]
29
+ def id
30
+ @id
31
+ end
32
+ alias :event_id :id
34
33
 
35
- # The unique ID name of the instance of the stack.
36
- # @return [String]
37
- def stack_id
38
- data.stack_id
39
- end
34
+ # The unique ID name of the instance of the stack.
35
+ # @return [String]
36
+ def stack_id
37
+ data.stack_id
38
+ end
40
39
 
41
- # The name associated with a stack.
42
- # @return [String]
43
- def stack_name
44
- data.stack_name
45
- end
40
+ # The name associated with a stack.
41
+ # @return [String]
42
+ def stack_name
43
+ data.stack_name
44
+ end
46
45
 
47
- # The logical name of the resource specified in the template.
48
- # @return [String]
49
- def logical_resource_id
50
- data.logical_resource_id
51
- end
46
+ # The logical name of the resource specified in the template.
47
+ # @return [String]
48
+ def logical_resource_id
49
+ data.logical_resource_id
50
+ end
52
51
 
53
- # The name or unique identifier associated with the physical instance of
54
- # the resource.
55
- # @return [String]
56
- def physical_resource_id
57
- data.physical_resource_id
58
- end
52
+ # The name or unique identifier associated with the physical instance of
53
+ # the resource.
54
+ # @return [String]
55
+ def physical_resource_id
56
+ data.physical_resource_id
57
+ end
59
58
 
60
- # Type of resource. (For more information, go to [ AWS Resource Types
61
- # Reference][1] in the AWS CloudFormation User Guide.)
62
- #
63
- #
64
- #
65
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
66
- # @return [String]
67
- def resource_type
68
- data.resource_type
69
- end
59
+ # Type of resource. (For more information, go to [ AWS Resource Types
60
+ # Reference][1] in the AWS CloudFormation User Guide.)
61
+ #
62
+ #
63
+ #
64
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
65
+ # @return [String]
66
+ def resource_type
67
+ data.resource_type
68
+ end
70
69
 
71
- # Time the status was updated.
72
- # @return [Time]
73
- def timestamp
74
- data.timestamp
75
- end
70
+ # Time the status was updated.
71
+ # @return [Time]
72
+ def timestamp
73
+ data.timestamp
74
+ end
76
75
 
77
- # Current status of the resource.
78
- # @return [String]
79
- def resource_status
80
- data.resource_status
81
- end
76
+ # Current status of the resource.
77
+ # @return [String]
78
+ def resource_status
79
+ data.resource_status
80
+ end
82
81
 
83
- # Success/failure message associated with the resource.
84
- # @return [String]
85
- def resource_status_reason
86
- data.resource_status_reason
87
- end
82
+ # Success/failure message associated with the resource.
83
+ # @return [String]
84
+ def resource_status_reason
85
+ data.resource_status_reason
86
+ end
88
87
 
89
- # BLOB of the properties used to create the resource.
90
- # @return [String]
91
- def resource_properties
92
- data.resource_properties
93
- end
88
+ # BLOB of the properties used to create the resource.
89
+ # @return [String]
90
+ def resource_properties
91
+ data.resource_properties
92
+ end
94
93
 
95
- # @!endgroup
94
+ # @!endgroup
96
95
 
97
- # @return [Client]
98
- def client
99
- @client
100
- end
96
+ # @return [Client]
97
+ def client
98
+ @client
99
+ end
101
100
 
102
- # @raise [Errors::ResourceNotLoadable]
103
- # @api private
104
- def load
105
- msg = "#load is not implemented, data only available via enumeration"
106
- raise Errors::ResourceNotLoadable, msg
107
- end
108
- alias :reload :load
109
-
110
- # @raise [Errors::ResourceNotLoadableError] Raises when {#data_loaded?} is `false`.
111
- # @return [Types::StackEvent]
112
- # Returns the data for this {Event}.
113
- def data
114
- load unless @data
115
- @data
116
- end
101
+ # @raise [NotImplementedError]
102
+ # @api private
103
+ def load
104
+ msg = "#load is not implemented, data only available via enumeration"
105
+ raise NotImplementedError, msg
106
+ end
107
+ alias :reload :load
108
+
109
+ # @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
110
+ # @return [Types::StackEvent]
111
+ # Returns the data for this {Event}.
112
+ def data
113
+ load unless @data
114
+ @data
115
+ end
117
116
 
118
- # @return [Boolean]
119
- # Returns `true` if this resource is loaded. Accessing attributes or
120
- # {#data} on an unloaded resource will trigger a call to {#load}.
121
- def data_loaded?
122
- !!@data
123
- end
117
+ # @return [Boolean]
118
+ # Returns `true` if this resource is loaded. Accessing attributes or
119
+ # {#data} on an unloaded resource will trigger a call to {#load}.
120
+ def data_loaded?
121
+ !!@data
122
+ end
124
123
 
125
- # @deprecated
126
- # @api private
127
- def identifiers
128
- { id: @id }
129
- end
130
- deprecated(:identifiers)
131
-
132
- private
133
-
134
- def extract_id(args, options)
135
- value = args[0] || options.delete(:id)
136
- case value
137
- when String then value
138
- when nil then raise ArgumentError, "missing required option :id"
139
- else
140
- msg = "expected :id to be a String, got #{value.class}"
141
- raise ArgumentError, msg
142
- end
143
- end
124
+ # @deprecated
125
+ # @api private
126
+ def identifiers
127
+ { id: @id }
128
+ end
129
+ deprecated(:identifiers)
130
+
131
+ private
144
132
 
145
- class Collection < Aws::Resources::Collection; end
133
+ def extract_id(args, options)
134
+ value = args[0] || options.delete(:id)
135
+ case value
136
+ when String then value
137
+ when nil then raise ArgumentError, "missing required option :id"
138
+ else
139
+ msg = "expected :id to be a String, got #{value.class}"
140
+ raise ArgumentError, msg
141
+ end
146
142
  end
143
+
144
+ class Collection < Aws::Resources::Collection; end
147
145
  end
148
146
  end
@@ -1,271 +1,269 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module CloudFormation
10
- class Resource
8
+ module Aws::CloudFormation
9
+ class Resource
11
10
 
12
- # @param options ({})
13
- # @option options [Client] :client
14
- def initialize(options = {})
15
- @client = options[:client] || Client.new(options)
16
- end
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
17
16
 
18
- # @return [Client]
19
- def client
20
- @client
21
- end
17
+ # @return [Client]
18
+ def client
19
+ @client
20
+ end
22
21
 
23
- # @!group Actions
22
+ # @!group Actions
24
23
 
25
- # @example Request syntax with placeholder values
26
- #
27
- # stack = cloud_formation.create_stack({
28
- # stack_name: "StackName", # required
29
- # template_body: "TemplateBody",
30
- # template_url: "TemplateURL",
31
- # parameters: [
32
- # {
33
- # parameter_key: "ParameterKey",
34
- # parameter_value: "ParameterValue",
35
- # use_previous_value: false,
36
- # },
37
- # ],
38
- # disable_rollback: false,
39
- # timeout_in_minutes: 1,
40
- # notification_arns: ["NotificationARN"],
41
- # capabilities: ["CAPABILITY_IAM"], # accepts CAPABILITY_IAM, CAPABILITY_NAMED_IAM
42
- # resource_types: ["ResourceType"],
43
- # role_arn: "RoleARN",
44
- # on_failure: "DO_NOTHING", # accepts DO_NOTHING, ROLLBACK, DELETE
45
- # stack_policy_body: "StackPolicyBody",
46
- # stack_policy_url: "StackPolicyURL",
47
- # tags: [
48
- # {
49
- # key: "TagKey",
50
- # value: "TagValue",
51
- # },
52
- # ],
53
- # })
54
- # @param [Hash] options ({})
55
- # @option options [required, String] :stack_name
56
- # The name that is associated with the stack. The name must be unique in
57
- # the region in which you are creating the stack.
58
- #
59
- # <note markdown="1"> A stack name can contain only alphanumeric characters (case sensitive)
60
- # and hyphens. It must start with an alphabetic character and cannot be
61
- # longer than 128 characters.
62
- #
63
- # </note>
64
- # @option options [String] :template_body
65
- # Structure containing the template body with a minimum length of 1 byte
66
- # and a maximum length of 51,200 bytes. For more information, go to
67
- # [Template Anatomy][1] in the AWS CloudFormation User Guide.
68
- #
69
- # Conditional: You must specify either the `TemplateBody` or the
70
- # `TemplateURL` parameter, but not both.
71
- #
72
- #
73
- #
74
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
75
- # @option options [String] :template_url
76
- # Location of file containing the template body. The URL must point to a
77
- # template (max size: 460,800 bytes) that is located in an Amazon S3
78
- # bucket. For more information, go to the [Template Anatomy][1] in the
79
- # AWS CloudFormation User Guide.
80
- #
81
- # Conditional: You must specify either the `TemplateBody` or the
82
- # `TemplateURL` parameter, but not both.
83
- #
84
- #
85
- #
86
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
87
- # @option options [Array<Types::Parameter>] :parameters
88
- # A list of `Parameter` structures that specify input parameters for the
89
- # stack. For more information, see the [Parameter][1] data type.
90
- #
91
- #
92
- #
93
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html
94
- # @option options [Boolean] :disable_rollback
95
- # Set to `true` to disable rollback of the stack if stack creation
96
- # failed. You can specify either `DisableRollback` or `OnFailure`, but
97
- # not both.
98
- #
99
- # Default: `false`
100
- # @option options [Integer] :timeout_in_minutes
101
- # The amount of time that can pass before the stack status becomes
102
- # CREATE\_FAILED; if `DisableRollback` is not set or is set to `false`,
103
- # the stack will be rolled back.
104
- # @option options [Array<String>] :notification_arns
105
- # The Simple Notification Service (SNS) topic ARNs to publish stack
106
- # related events. You can find your SNS topic ARNs using the [SNS
107
- # console][1] or your Command Line Interface (CLI).
108
- #
109
- #
110
- #
111
- # [1]: https://console.aws.amazon.com/sns
112
- # @option options [Array<String>] :capabilities
113
- # A list of values that you must specify before AWS CloudFormation can
114
- # create certain stacks. Some stack templates might include resources
115
- # that can affect permissions in your AWS account, for example, by
116
- # creating new AWS Identity and Access Management (IAM) users. For those
117
- # stacks, you must explicitly acknowledge their capabilities by
118
- # specifying this parameter.
119
- #
120
- # The only valid values are `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`.
121
- # The following resources require you to specify this parameter: [
122
- # AWS::IAM::AccessKey][1], [ AWS::IAM::Group][2], [
123
- # AWS::IAM::InstanceProfile][3], [ AWS::IAM::Policy][4], [
124
- # AWS::IAM::Role][5], [ AWS::IAM::User][6], and [
125
- # AWS::IAM::UserToGroupAddition][7]. If your stack template contains
126
- # these resources, we recommend that you review all permissions
127
- # associated with them and edit their permissions if necessary.
128
- #
129
- # If you have IAM resources, you can specify either capability. If you
130
- # have IAM resources with custom names, you must specify
131
- # `CAPABILITY_NAMED_IAM`. If you don't specify this parameter, this
132
- # action returns an `InsufficientCapabilities` error.
133
- #
134
- # For more information, see [Acknowledging IAM Resources in AWS
135
- # CloudFormation Templates][8].
136
- #
137
- #
138
- #
139
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html
140
- # [2]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html
141
- # [3]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html
142
- # [4]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html
143
- # [5]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
144
- # [6]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html
145
- # [7]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html
146
- # [8]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities
147
- # @option options [Array<String>] :resource_types
148
- # The template resource types that you have permissions to work with for
149
- # this create stack action, such as `AWS::EC2::Instance`, `AWS::EC2::*`,
150
- # or `Custom::MyCustomInstance`. Use the following syntax to describe
151
- # template resource types: `AWS::*` (for all AWS resource), `Custom::*`
152
- # (for all custom resources), `Custom::logical_ID ` (for a specific
153
- # custom resource), `AWS::service_name::*` (for all resources of a
154
- # particular AWS service), and `AWS::service_name::resource_logical_ID `
155
- # (for a specific AWS resource).
156
- #
157
- # If the list of resource types doesn't include a resource that you're
158
- # creating, the stack creation fails. By default, AWS CloudFormation
159
- # grants permissions to all resource types. AWS Identity and Access
160
- # Management (IAM) uses this parameter for AWS CloudFormation-specific
161
- # condition keys in IAM policies. For more information, see [Controlling
162
- # Access with AWS Identity and Access Management][1].
163
- #
164
- #
165
- #
166
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html
167
- # @option options [String] :role_arn
168
- # The Amazon Resource Name (ARN) of an AWS Identity and Access
169
- # Management (IAM) role that AWS CloudFormation assumes to create the
170
- # stack. AWS CloudFormation uses the role's credentials to make calls
171
- # on your behalf. AWS CloudFormation always uses this role for all
172
- # future operations on the stack. As long as users have permission to
173
- # operate on the stack, AWS CloudFormation uses this role even if the
174
- # users don't have permission to pass it. Ensure that the role grants
175
- # least privilege.
176
- #
177
- # If you don't specify a value, AWS CloudFormation uses the role that
178
- # was previously associated with the stack. If no role is available, AWS
179
- # CloudFormation uses a temporary session that is generated from your
180
- # user credentials.
181
- # @option options [String] :on_failure
182
- # Determines what action will be taken if stack creation fails. This
183
- # must be one of: DO\_NOTHING, ROLLBACK, or DELETE. You can specify
184
- # either `OnFailure` or `DisableRollback`, but not both.
185
- #
186
- # Default: `ROLLBACK`
187
- # @option options [String] :stack_policy_body
188
- # Structure containing the stack policy body. For more information, go
189
- # to [ Prevent Updates to Stack Resources][1] in the *AWS CloudFormation
190
- # User Guide*. You can specify either the `StackPolicyBody` or the
191
- # `StackPolicyURL` parameter, but not both.
192
- #
193
- #
194
- #
195
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html
196
- # @option options [String] :stack_policy_url
197
- # Location of a file containing the stack policy. The URL must point to
198
- # a policy (maximum size: 16 KB) located in an S3 bucket in the same
199
- # region as the stack. You can specify either the `StackPolicyBody` or
200
- # the `StackPolicyURL` parameter, but not both.
201
- # @option options [Array<Types::Tag>] :tags
202
- # Key-value pairs to associate with this stack. AWS CloudFormation also
203
- # propagates these tags to the resources created in the stack. A maximum
204
- # number of 10 tags can be specified.
205
- # @return [Stack]
206
- def create_stack(options = {})
207
- resp = @client.create_stack(options)
208
- Stack.new(
209
- name: options[:stack_name],
210
- client: @client
211
- )
212
- end
24
+ # @example Request syntax with placeholder values
25
+ #
26
+ # stack = cloud_formation.create_stack({
27
+ # stack_name: "StackName", # required
28
+ # template_body: "TemplateBody",
29
+ # template_url: "TemplateURL",
30
+ # parameters: [
31
+ # {
32
+ # parameter_key: "ParameterKey",
33
+ # parameter_value: "ParameterValue",
34
+ # use_previous_value: false,
35
+ # },
36
+ # ],
37
+ # disable_rollback: false,
38
+ # timeout_in_minutes: 1,
39
+ # notification_arns: ["NotificationARN"],
40
+ # capabilities: ["CAPABILITY_IAM"], # accepts CAPABILITY_IAM, CAPABILITY_NAMED_IAM
41
+ # resource_types: ["ResourceType"],
42
+ # role_arn: "RoleARN",
43
+ # on_failure: "DO_NOTHING", # accepts DO_NOTHING, ROLLBACK, DELETE
44
+ # stack_policy_body: "StackPolicyBody",
45
+ # stack_policy_url: "StackPolicyURL",
46
+ # tags: [
47
+ # {
48
+ # key: "TagKey",
49
+ # value: "TagValue",
50
+ # },
51
+ # ],
52
+ # })
53
+ # @param [Hash] options ({})
54
+ # @option options [required, String] :stack_name
55
+ # The name that is associated with the stack. The name must be unique in
56
+ # the region in which you are creating the stack.
57
+ #
58
+ # <note markdown="1"> A stack name can contain only alphanumeric characters (case sensitive)
59
+ # and hyphens. It must start with an alphabetic character and cannot be
60
+ # longer than 128 characters.
61
+ #
62
+ # </note>
63
+ # @option options [String] :template_body
64
+ # Structure containing the template body with a minimum length of 1 byte
65
+ # and a maximum length of 51,200 bytes. For more information, go to
66
+ # [Template Anatomy][1] in the AWS CloudFormation User Guide.
67
+ #
68
+ # Conditional: You must specify either the `TemplateBody` or the
69
+ # `TemplateURL` parameter, but not both.
70
+ #
71
+ #
72
+ #
73
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
74
+ # @option options [String] :template_url
75
+ # Location of file containing the template body. The URL must point to a
76
+ # template (max size: 460,800 bytes) that is located in an Amazon S3
77
+ # bucket. For more information, go to the [Template Anatomy][1] in the
78
+ # AWS CloudFormation User Guide.
79
+ #
80
+ # Conditional: You must specify either the `TemplateBody` or the
81
+ # `TemplateURL` parameter, but not both.
82
+ #
83
+ #
84
+ #
85
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
86
+ # @option options [Array<Types::Parameter>] :parameters
87
+ # A list of `Parameter` structures that specify input parameters for the
88
+ # stack. For more information, see the [Parameter][1] data type.
89
+ #
90
+ #
91
+ #
92
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html
93
+ # @option options [Boolean] :disable_rollback
94
+ # Set to `true` to disable rollback of the stack if stack creation
95
+ # failed. You can specify either `DisableRollback` or `OnFailure`, but
96
+ # not both.
97
+ #
98
+ # Default: `false`
99
+ # @option options [Integer] :timeout_in_minutes
100
+ # The amount of time that can pass before the stack status becomes
101
+ # CREATE\_FAILED; if `DisableRollback` is not set or is set to `false`,
102
+ # the stack will be rolled back.
103
+ # @option options [Array<String>] :notification_arns
104
+ # The Simple Notification Service (SNS) topic ARNs to publish stack
105
+ # related events. You can find your SNS topic ARNs using the [SNS
106
+ # console][1] or your Command Line Interface (CLI).
107
+ #
108
+ #
109
+ #
110
+ # [1]: https://console.aws.amazon.com/sns
111
+ # @option options [Array<String>] :capabilities
112
+ # A list of values that you must specify before AWS CloudFormation can
113
+ # create certain stacks. Some stack templates might include resources
114
+ # that can affect permissions in your AWS account, for example, by
115
+ # creating new AWS Identity and Access Management (IAM) users. For those
116
+ # stacks, you must explicitly acknowledge their capabilities by
117
+ # specifying this parameter.
118
+ #
119
+ # The only valid values are `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`.
120
+ # The following resources require you to specify this parameter: [
121
+ # AWS::IAM::AccessKey][1], [ AWS::IAM::Group][2], [
122
+ # AWS::IAM::InstanceProfile][3], [ AWS::IAM::Policy][4], [
123
+ # AWS::IAM::Role][5], [ AWS::IAM::User][6], and [
124
+ # AWS::IAM::UserToGroupAddition][7]. If your stack template contains
125
+ # these resources, we recommend that you review all permissions
126
+ # associated with them and edit their permissions if necessary.
127
+ #
128
+ # If you have IAM resources, you can specify either capability. If you
129
+ # have IAM resources with custom names, you must specify
130
+ # `CAPABILITY_NAMED_IAM`. If you don't specify this parameter, this
131
+ # action returns an `InsufficientCapabilities` error.
132
+ #
133
+ # For more information, see [Acknowledging IAM Resources in AWS
134
+ # CloudFormation Templates][8].
135
+ #
136
+ #
137
+ #
138
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html
139
+ # [2]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html
140
+ # [3]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html
141
+ # [4]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html
142
+ # [5]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
143
+ # [6]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html
144
+ # [7]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html
145
+ # [8]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities
146
+ # @option options [Array<String>] :resource_types
147
+ # The template resource types that you have permissions to work with for
148
+ # this create stack action, such as `AWS::EC2::Instance`, `AWS::EC2::*`,
149
+ # or `Custom::MyCustomInstance`. Use the following syntax to describe
150
+ # template resource types: `AWS::*` (for all AWS resource), `Custom::*`
151
+ # (for all custom resources), `Custom::logical_ID ` (for a specific
152
+ # custom resource), `AWS::service_name::*` (for all resources of a
153
+ # particular AWS service), and `AWS::service_name::resource_logical_ID `
154
+ # (for a specific AWS resource).
155
+ #
156
+ # If the list of resource types doesn't include a resource that you're
157
+ # creating, the stack creation fails. By default, AWS CloudFormation
158
+ # grants permissions to all resource types. AWS Identity and Access
159
+ # Management (IAM) uses this parameter for AWS CloudFormation-specific
160
+ # condition keys in IAM policies. For more information, see [Controlling
161
+ # Access with AWS Identity and Access Management][1].
162
+ #
163
+ #
164
+ #
165
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html
166
+ # @option options [String] :role_arn
167
+ # The Amazon Resource Name (ARN) of an AWS Identity and Access
168
+ # Management (IAM) role that AWS CloudFormation assumes to create the
169
+ # stack. AWS CloudFormation uses the role's credentials to make calls
170
+ # on your behalf. AWS CloudFormation always uses this role for all
171
+ # future operations on the stack. As long as users have permission to
172
+ # operate on the stack, AWS CloudFormation uses this role even if the
173
+ # users don't have permission to pass it. Ensure that the role grants
174
+ # least privilege.
175
+ #
176
+ # If you don't specify a value, AWS CloudFormation uses the role that
177
+ # was previously associated with the stack. If no role is available, AWS
178
+ # CloudFormation uses a temporary session that is generated from your
179
+ # user credentials.
180
+ # @option options [String] :on_failure
181
+ # Determines what action will be taken if stack creation fails. This
182
+ # must be one of: DO\_NOTHING, ROLLBACK, or DELETE. You can specify
183
+ # either `OnFailure` or `DisableRollback`, but not both.
184
+ #
185
+ # Default: `ROLLBACK`
186
+ # @option options [String] :stack_policy_body
187
+ # Structure containing the stack policy body. For more information, go
188
+ # to [ Prevent Updates to Stack Resources][1] in the *AWS CloudFormation
189
+ # User Guide*. You can specify either the `StackPolicyBody` or the
190
+ # `StackPolicyURL` parameter, but not both.
191
+ #
192
+ #
193
+ #
194
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html
195
+ # @option options [String] :stack_policy_url
196
+ # Location of a file containing the stack policy. The URL must point to
197
+ # a policy (maximum size: 16 KB) located in an S3 bucket in the same
198
+ # region as the stack. You can specify either the `StackPolicyBody` or
199
+ # the `StackPolicyURL` parameter, but not both.
200
+ # @option options [Array<Types::Tag>] :tags
201
+ # Key-value pairs to associate with this stack. AWS CloudFormation also
202
+ # propagates these tags to the resources created in the stack. A maximum
203
+ # number of 10 tags can be specified.
204
+ # @return [Stack]
205
+ def create_stack(options = {})
206
+ resp = @client.create_stack(options)
207
+ Stack.new(
208
+ name: options[:stack_name],
209
+ client: @client
210
+ )
211
+ end
213
212
 
214
- # @!group Associations
213
+ # @!group Associations
215
214
 
216
- # @param [String] id
217
- # @return [Event]
218
- def event(id)
219
- Event.new(
220
- id: id,
221
- client: @client
222
- )
223
- end
215
+ # @param [String] id
216
+ # @return [Event]
217
+ def event(id)
218
+ Event.new(
219
+ id: id,
220
+ client: @client
221
+ )
222
+ end
224
223
 
225
- # @param [String] name
226
- # @return [Stack]
227
- def stack(name)
228
- Stack.new(
229
- name: name,
230
- client: @client
231
- )
232
- end
224
+ # @param [String] name
225
+ # @return [Stack]
226
+ def stack(name)
227
+ Stack.new(
228
+ name: name,
229
+ client: @client
230
+ )
231
+ end
233
232
 
234
- # @example Request syntax with placeholder values
235
- #
236
- # stacks = cloud_formation.stacks({
237
- # stack_name: "StackName",
238
- # })
239
- # @param [Hash] options ({})
240
- # @option options [String] :stack_name
241
- # The name or the unique stack ID that is associated with the stack,
242
- # which are not always interchangeable:
243
- #
244
- # * Running stacks: You can specify either the stack's name or its
245
- # unique stack ID.
246
- #
247
- # * Deleted stacks: You must specify the unique stack ID.
248
- #
249
- # Default: There is no default value.
250
- # @return [Stack::Collection]
251
- def stacks(options = {})
252
- batches = Enumerator.new do |y|
253
- resp = @client.describe_stacks(options)
254
- resp.each_page do |page|
255
- batch = []
256
- page.data.stacks.each do |s|
257
- batch << Stack.new(
258
- name: s.stack_name,
259
- data: s,
260
- client: @client
261
- )
262
- end
263
- y.yield(batch)
233
+ # @example Request syntax with placeholder values
234
+ #
235
+ # stacks = cloud_formation.stacks({
236
+ # stack_name: "StackName",
237
+ # })
238
+ # @param [Hash] options ({})
239
+ # @option options [String] :stack_name
240
+ # The name or the unique stack ID that is associated with the stack,
241
+ # which are not always interchangeable:
242
+ #
243
+ # * Running stacks: You can specify either the stack's name or its
244
+ # unique stack ID.
245
+ #
246
+ # * Deleted stacks: You must specify the unique stack ID.
247
+ #
248
+ # Default: There is no default value.
249
+ # @return [Stack::Collection]
250
+ def stacks(options = {})
251
+ batches = Enumerator.new do |y|
252
+ resp = @client.describe_stacks(options)
253
+ resp.each_page do |page|
254
+ batch = []
255
+ page.data.stacks.each do |s|
256
+ batch << Stack.new(
257
+ name: s.stack_name,
258
+ data: s,
259
+ client: @client
260
+ )
264
261
  end
262
+ y.yield(batch)
265
263
  end
266
- Stack::Collection.new(batches)
267
264
  end
268
-
265
+ Stack::Collection.new(batches)
269
266
  end
267
+
270
268
  end
271
269
  end