40 40 | /**
|
41 41 | * The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
|
42 42 | */
|
43 43 | public val launchGroup: kotlin.String? = builder.launchGroup
|
44 44 | /**
|
45 45 | * Additional information for launching instances.
|
46 46 | */
|
47 47 | public val launchSpecification: aws.sdk.kotlin.services.ec2.model.LaunchSpecification? = builder.launchSpecification
|
48 48 | /**
|
49 49 | * The Availability Zone in which the request is launched.
|
50 + | *
|
51 + | * Either `launchedAvailabilityZone` or `launchedAvailabilityZoneId` can be specified, but not both
|
50 52 | */
|
51 53 | public val launchedAvailabilityZone: kotlin.String? = builder.launchedAvailabilityZone
|
54 + | /**
|
55 + | * The ID of the Availability Zone in which the request is launched.
|
56 + | *
|
57 + | * Either `launchedAvailabilityZone` or `launchedAvailabilityZoneId` can be specified, but not both
|
58 + | */
|
59 + | public val launchedAvailabilityZoneId: kotlin.String? = builder.launchedAvailabilityZoneId
|
52 60 | /**
|
53 61 | * The product description associated with the Spot Instance.
|
54 62 | */
|
55 63 | public val productDescription: aws.sdk.kotlin.services.ec2.model.RiProductDescription? = builder.productDescription
|
56 64 | /**
|
57 65 | * The ID of the Spot Instance request.
|
58 66 | */
|
59 67 | public val spotInstanceRequestId: kotlin.String? = builder.spotInstanceRequestId
|
60 68 | /**
|
61 69 | * The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
|
62 70 | *
|
63 71 | * If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
|
64 72 | */
|
65 73 | public val spotPrice: kotlin.String? = builder.spotPrice
|
66 74 | /**
|
67 75 | * The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see [Spot request status](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html) in the *Amazon EC2 User Guide*.
|
68 76 | */
|
69 77 | public val state: aws.sdk.kotlin.services.ec2.model.SpotInstanceState? = builder.state
|
70 78 | /**
|
71 79 | * The status code and status message describing the Spot Instance request.
|
72 80 | */
|
73 81 | public val status: aws.sdk.kotlin.services.ec2.model.SpotInstanceStatus? = builder.status
|
74 82 | /**
|
75 83 | * Any tags assigned to the resource.
|
76 84 | */
|
77 85 | public val tags: List<Tag>? = builder.tags
|
78 86 | /**
|
79 87 | * The Spot Instance request type.
|
80 88 | */
|
81 89 | public val type: aws.sdk.kotlin.services.ec2.model.SpotInstanceType? = builder.type
|
82 90 | /**
|
83 91 | * The start date of the request, in UTC format (for example, *YYYY*-*MM*-*DD*T*HH*:*MM*:*SS*Z). The request becomes active at this date and time.
|
84 92 | */
|
85 93 | public val validFrom: aws.smithy.kotlin.runtime.time.Instant? = builder.validFrom
|
86 94 | /**
|
87 95 | * The end date of the request, in UTC format (*YYYY*-*MM*-*DD*T*HH*:*MM*:*SS*Z).
|
88 96 | * + For a persistent request, the request remains active until the `validUntil` date and time is reached. Otherwise, the request remains active until you cancel it.
|
89 97 | * + For a one-time request, the request remains active until all instances launch, the request is canceled, or the `validUntil` date and time is reached. By default, the request is valid for 7 days from the date the request was created.
|
90 98 | */
|
91 99 | public val validUntil: aws.smithy.kotlin.runtime.time.Instant? = builder.validUntil
|
92 100 |
|
93 101 | public companion object {
|
94 102 | public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ec2.model.SpotInstanceRequest = Builder().apply(block).build()
|
95 103 | }
|
96 104 |
|
97 105 | override fun toString(): kotlin.String = buildString {
|
98 106 | append("SpotInstanceRequest(")
|
99 107 | append("actualBlockHourlyPrice=$actualBlockHourlyPrice,")
|
100 108 | append("availabilityZoneGroup=$availabilityZoneGroup,")
|
101 109 | append("blockDurationMinutes=$blockDurationMinutes,")
|
102 110 | append("createTime=$createTime,")
|
103 111 | append("fault=$fault,")
|
104 112 | append("instanceId=$instanceId,")
|
105 113 | append("instanceInterruptionBehavior=$instanceInterruptionBehavior,")
|
106 114 | append("launchGroup=$launchGroup,")
|
107 115 | append("launchSpecification=$launchSpecification,")
|
108 116 | append("launchedAvailabilityZone=$launchedAvailabilityZone,")
|
117 + | append("launchedAvailabilityZoneId=$launchedAvailabilityZoneId,")
|
109 118 | append("productDescription=$productDescription,")
|
110 119 | append("spotInstanceRequestId=$spotInstanceRequestId,")
|
111 120 | append("spotPrice=$spotPrice,")
|
112 121 | append("state=$state,")
|
113 122 | append("status=$status,")
|
114 123 | append("tags=$tags,")
|
115 124 | append("type=$type,")
|
116 125 | append("validFrom=$validFrom,")
|
117 126 | append("validUntil=$validUntil")
|
118 127 | append(")")
|
119 128 | }
|
120 129 |
|
121 130 | override fun hashCode(): kotlin.Int {
|
122 131 | var result = actualBlockHourlyPrice?.hashCode() ?: 0
|
123 132 | result = 31 * result + (availabilityZoneGroup?.hashCode() ?: 0)
|
124 133 | result = 31 * result + (blockDurationMinutes ?: 0)
|
125 134 | result = 31 * result + (createTime?.hashCode() ?: 0)
|
126 135 | result = 31 * result + (fault?.hashCode() ?: 0)
|
127 136 | result = 31 * result + (instanceId?.hashCode() ?: 0)
|
128 137 | result = 31 * result + (instanceInterruptionBehavior?.hashCode() ?: 0)
|
129 138 | result = 31 * result + (launchGroup?.hashCode() ?: 0)
|
130 139 | result = 31 * result + (launchSpecification?.hashCode() ?: 0)
|
131 140 | result = 31 * result + (launchedAvailabilityZone?.hashCode() ?: 0)
|
141 + | result = 31 * result + (launchedAvailabilityZoneId?.hashCode() ?: 0)
|
132 142 | result = 31 * result + (productDescription?.hashCode() ?: 0)
|
133 143 | result = 31 * result + (spotInstanceRequestId?.hashCode() ?: 0)
|
134 144 | result = 31 * result + (spotPrice?.hashCode() ?: 0)
|
135 145 | result = 31 * result + (state?.hashCode() ?: 0)
|
136 146 | result = 31 * result + (status?.hashCode() ?: 0)
|
137 147 | result = 31 * result + (tags?.hashCode() ?: 0)
|
138 148 | result = 31 * result + (type?.hashCode() ?: 0)
|
139 149 | result = 31 * result + (validFrom?.hashCode() ?: 0)
|
140 150 | result = 31 * result + (validUntil?.hashCode() ?: 0)
|
141 151 | return result
|
142 152 | }
|
143 153 |
|
144 154 | override fun equals(other: kotlin.Any?): kotlin.Boolean {
|
145 155 | if (this === other) return true
|
146 156 | if (other == null || this::class != other::class) return false
|
147 157 |
|
148 158 | other as SpotInstanceRequest
|
149 159 |
|
150 160 | if (actualBlockHourlyPrice != other.actualBlockHourlyPrice) return false
|
151 161 | if (availabilityZoneGroup != other.availabilityZoneGroup) return false
|
152 162 | if (blockDurationMinutes != other.blockDurationMinutes) return false
|
153 163 | if (createTime != other.createTime) return false
|
154 164 | if (fault != other.fault) return false
|
155 165 | if (instanceId != other.instanceId) return false
|
156 166 | if (instanceInterruptionBehavior != other.instanceInterruptionBehavior) return false
|
157 167 | if (launchGroup != other.launchGroup) return false
|
158 168 | if (launchSpecification != other.launchSpecification) return false
|
159 169 | if (launchedAvailabilityZone != other.launchedAvailabilityZone) return false
|
170 + | if (launchedAvailabilityZoneId != other.launchedAvailabilityZoneId) return false
|
160 171 | if (productDescription != other.productDescription) return false
|
161 172 | if (spotInstanceRequestId != other.spotInstanceRequestId) return false
|
162 173 | if (spotPrice != other.spotPrice) return false
|
163 174 | if (state != other.state) return false
|
164 175 | if (status != other.status) return false
|
165 176 | if (tags != other.tags) return false
|
166 177 | if (type != other.type) return false
|
167 178 | if (validFrom != other.validFrom) return false
|
168 179 | if (validUntil != other.validUntil) return false
|
169 180 |
|
170 181 | return true
|
171 182 | }
|
172 183 |
|
173 184 | public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ec2.model.SpotInstanceRequest = Builder(this).apply(block).build()
|
174 185 |
|
175 186 | @SdkDsl
|
176 187 | public class Builder {
|
177 188 | /**
|
178 189 | * Deprecated.
|
179 190 | */
|
180 191 | public var actualBlockHourlyPrice: kotlin.String? = null
|
181 192 | /**
|
182 193 | * The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
|
183 194 | */
|
184 195 | public var availabilityZoneGroup: kotlin.String? = null
|
185 196 | /**
|
186 197 | * Deprecated.
|
187 198 | */
|
188 199 | public var blockDurationMinutes: kotlin.Int? = null
|
189 200 | /**
|
190 201 | * The date and time when the Spot Instance request was created, in UTC format (for example, *YYYY*-*MM*-*DD*T*HH*:*MM*:*SS*Z).
|
191 202 | */
|
192 203 | public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
|
193 204 | /**
|
194 205 | * The fault codes for the Spot Instance request, if any.
|
195 206 | */
|
196 207 | public var fault: aws.sdk.kotlin.services.ec2.model.SpotInstanceStateFault? = null
|
197 208 | /**
|
198 209 | * The instance ID, if an instance has been launched to fulfill the Spot Instance request.
|
199 210 | */
|
200 211 | public var instanceId: kotlin.String? = null
|
201 212 | /**
|
202 213 | * The behavior when a Spot Instance is interrupted.
|
203 214 | */
|
204 215 | public var instanceInterruptionBehavior: aws.sdk.kotlin.services.ec2.model.InstanceInterruptionBehavior? = null
|
205 216 | /**
|
206 217 | * The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
|
207 218 | */
|
208 219 | public var launchGroup: kotlin.String? = null
|
209 220 | /**
|
210 221 | * Additional information for launching instances.
|
211 222 | */
|
212 223 | public var launchSpecification: aws.sdk.kotlin.services.ec2.model.LaunchSpecification? = null
|
213 224 | /**
|
214 225 | * The Availability Zone in which the request is launched.
|
226 + | *
|
227 + | * Either `launchedAvailabilityZone` or `launchedAvailabilityZoneId` can be specified, but not both
|
215 228 | */
|
216 229 | public var launchedAvailabilityZone: kotlin.String? = null
|
230 + | /**
|
231 + | * The ID of the Availability Zone in which the request is launched.
|
232 + | *
|
233 + | * Either `launchedAvailabilityZone` or `launchedAvailabilityZoneId` can be specified, but not both
|
234 + | */
|
235 + | public var launchedAvailabilityZoneId: kotlin.String? = null
|
217 236 | /**
|
218 237 | * The product description associated with the Spot Instance.
|
219 238 | */
|
220 239 | public var productDescription: aws.sdk.kotlin.services.ec2.model.RiProductDescription? = null
|
221 240 | /**
|
222 241 | * The ID of the Spot Instance request.
|
223 242 | */
|
224 243 | public var spotInstanceRequestId: kotlin.String? = null
|
225 244 | /**
|
226 245 | * The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
|
227 246 | *
|
228 247 | * If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
|
229 248 | */
|
230 249 | public var spotPrice: kotlin.String? = null
|
231 250 | /**
|
232 251 | * The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see [Spot request status](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html) in the *Amazon EC2 User Guide*.
|
233 252 | */
|
234 253 | public var state: aws.sdk.kotlin.services.ec2.model.SpotInstanceState? = null
|
235 254 | /**
|
236 255 | * The status code and status message describing the Spot Instance request.
|
237 256 | */
|
238 257 | public var status: aws.sdk.kotlin.services.ec2.model.SpotInstanceStatus? = null
|
239 258 | /**
|
240 259 | * Any tags assigned to the resource.
|
241 260 | */
|
242 261 | public var tags: List<Tag>? = null
|
243 262 | /**
|
244 263 | * The Spot Instance request type.
|
245 264 | */
|
246 265 | public var type: aws.sdk.kotlin.services.ec2.model.SpotInstanceType? = null
|
247 266 | /**
|
248 267 | * The start date of the request, in UTC format (for example, *YYYY*-*MM*-*DD*T*HH*:*MM*:*SS*Z). The request becomes active at this date and time.
|
249 268 | */
|
250 269 | public var validFrom: aws.smithy.kotlin.runtime.time.Instant? = null
|
251 270 | /**
|
252 271 | * The end date of the request, in UTC format (*YYYY*-*MM*-*DD*T*HH*:*MM*:*SS*Z).
|
253 272 | * + For a persistent request, the request remains active until the `validUntil` date and time is reached. Otherwise, the request remains active until you cancel it.
|
254 273 | * + For a one-time request, the request remains active until all instances launch, the request is canceled, or the `validUntil` date and time is reached. By default, the request is valid for 7 days from the date the request was created.
|
255 274 | */
|
256 275 | public var validUntil: aws.smithy.kotlin.runtime.time.Instant? = null
|
257 276 |
|
258 277 | @PublishedApi
|
259 278 | internal constructor()
|
260 279 | @PublishedApi
|
261 280 | internal constructor(x: aws.sdk.kotlin.services.ec2.model.SpotInstanceRequest) : this() {
|
262 281 | this.actualBlockHourlyPrice = x.actualBlockHourlyPrice
|
263 282 | this.availabilityZoneGroup = x.availabilityZoneGroup
|
264 283 | this.blockDurationMinutes = x.blockDurationMinutes
|
265 284 | this.createTime = x.createTime
|
266 285 | this.fault = x.fault
|
267 286 | this.instanceId = x.instanceId
|
268 287 | this.instanceInterruptionBehavior = x.instanceInterruptionBehavior
|
269 288 | this.launchGroup = x.launchGroup
|
270 289 | this.launchSpecification = x.launchSpecification
|
271 290 | this.launchedAvailabilityZone = x.launchedAvailabilityZone
|
291 + | this.launchedAvailabilityZoneId = x.launchedAvailabilityZoneId
|
272 292 | this.productDescription = x.productDescription
|
273 293 | this.spotInstanceRequestId = x.spotInstanceRequestId
|
274 294 | this.spotPrice = x.spotPrice
|
275 295 | this.state = x.state
|
276 296 | this.status = x.status
|
277 297 | this.tags = x.tags
|
278 298 | this.type = x.type
|
279 299 | this.validFrom = x.validFrom
|
280 300 | this.validUntil = x.validUntil
|
281 301 | }
|