7 7 |
|
8 8 |
|
9 9 | /**
|
10 10 | * Represents dimension values for capacity metrics, including resource identifiers, geographic information, and reservation details used for grouping and filtering capacity data.
|
11 11 | */
|
12 12 | public class CapacityManagerDimension private constructor(builder: Builder) {
|
13 13 | /**
|
14 14 | * The Amazon Web Services account ID that owns the capacity resource.
|
15 15 | */
|
16 16 | public val accountId: kotlin.String? = builder.accountId
|
17 + | /**
|
18 + | * The name of the Amazon Web Services account that owns the capacity resource. This dimension is only available when Organizations access is enabled for Capacity Manager.
|
19 + | */
|
20 + | public val accountName: kotlin.String? = builder.accountName
|
17 21 | /**
|
18 22 | * The unique identifier of the Availability Zone where the capacity resource is located.
|
19 23 | */
|
20 24 | public val availabilityZoneId: kotlin.String? = builder.availabilityZoneId
|
21 25 | /**
|
22 26 | * The EC2 instance family of the capacity resource.
|
23 27 | */
|
24 28 | public val instanceFamily: kotlin.String? = builder.instanceFamily
|
25 29 | /**
|
26 30 | * The platform or operating system of the instance.
|
27 31 | */
|
28 32 | public val instancePlatform: kotlin.String? = builder.instancePlatform
|
29 33 | /**
|
30 34 | * The specific EC2 instance type of the capacity resource.
|
31 35 | */
|
32 36 | public val instanceType: kotlin.String? = builder.instanceType
|
33 37 | /**
|
34 38 | * The Amazon Resource Name (ARN) of the capacity reservation. This provides a unique identifier that can be used across Amazon Web Services services to reference the specific reservation.
|
35 39 | */
|
36 40 | public val reservationArn: kotlin.String? = builder.reservationArn
|
37 41 | /**
|
38 42 | * The timestamp when the capacity reservation was originally created, in milliseconds since epoch. This differs from the start timestamp as reservations can be created before they become active.
|
39 43 | */
|
40 44 | public val reservationCreateTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.reservationCreateTimestamp
|
41 45 | /**
|
42 46 | * The type of end date for the capacity reservation. This indicates whether the reservation has a fixed end date, is open-ended, or follows a specific termination pattern.
|
43 47 | */
|
44 48 | public val reservationEndDateType: aws.sdk.kotlin.services.ec2.model.ReservationEndDateType? = builder.reservationEndDateType
|
45 49 | /**
|
46 50 | * The timestamp when the capacity reservation expires and is no longer available, in milliseconds since epoch. After this time, the reservation will not provide any capacity.
|
47 51 | */
|
48 52 | public val reservationEndTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.reservationEndTimestamp
|
49 53 | /**
|
50 54 | * The unique identifier of the capacity reservation.
|
51 55 | */
|
52 56 | public val reservationId: kotlin.String? = builder.reservationId
|
53 57 | /**
|
54 58 | * The instance matching criteria for the capacity reservation, determining how instances are matched to the reservation.
|
55 59 | */
|
56 60 | public val reservationInstanceMatchCriteria: kotlin.String? = builder.reservationInstanceMatchCriteria
|
57 61 | /**
|
58 62 | * The timestamp when the capacity reservation becomes active and available for use, in milliseconds since epoch. This is when the reservation begins providing capacity.
|
59 63 | */
|
60 64 | public val reservationStartTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.reservationStartTimestamp
|
61 65 | /**
|
62 66 | * The current state of the capacity reservation.
|
63 67 | */
|
64 68 | public val reservationState: aws.sdk.kotlin.services.ec2.model.ReservationState? = builder.reservationState
|
65 69 | /**
|
66 70 | * The type of capacity reservation.
|
67 71 | */
|
68 72 | public val reservationType: aws.sdk.kotlin.services.ec2.model.ReservationType? = builder.reservationType
|
69 73 | /**
|
70 74 | * The Amazon Web Services account ID that is financially responsible for unused capacity reservation costs.
|
71 75 | */
|
72 76 | public val reservationUnusedFinancialOwner: kotlin.String? = builder.reservationUnusedFinancialOwner
|
73 77 | /**
|
74 78 | * The Amazon Web Services Region where the capacity resource is located.
|
75 79 | */
|
76 80 | public val resourceRegion: kotlin.String? = builder.resourceRegion
|
81 + | /**
|
82 + | * The tags associated with the capacity resource, represented as key-value pairs. Only tags that have been activated for monitoring via `UpdateCapacityManagerMonitoredTagKeys` are included.
|
83 + | */
|
84 + | public val tags: List<CapacityManagerTagDimension>? = builder.tags
|
77 85 | /**
|
78 86 | * The tenancy of the EC2 instances associated with this capacity dimension. Valid values are 'default' for shared tenancy, 'dedicated' for dedicated instances, or 'host' for dedicated hosts.
|
79 87 | */
|
80 88 | public val tenancy: aws.sdk.kotlin.services.ec2.model.CapacityTenancy? = builder.tenancy
|
81 89 |
|
82 90 | public companion object {
|
83 91 | public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ec2.model.CapacityManagerDimension = Builder().apply(block).build()
|
84 92 | }
|
85 93 |
|
86 94 | override fun toString(): kotlin.String = buildString {
|
87 95 | append("CapacityManagerDimension(")
|
88 96 | append("accountId=$accountId,")
|
97 + | append("accountName=$accountName,")
|
89 98 | append("availabilityZoneId=$availabilityZoneId,")
|
90 99 | append("instanceFamily=$instanceFamily,")
|
91 100 | append("instancePlatform=$instancePlatform,")
|
92 101 | append("instanceType=$instanceType,")
|
93 102 | append("reservationArn=$reservationArn,")
|
94 103 | append("reservationCreateTimestamp=$reservationCreateTimestamp,")
|
95 104 | append("reservationEndDateType=$reservationEndDateType,")
|
96 105 | append("reservationEndTimestamp=$reservationEndTimestamp,")
|
97 106 | append("reservationId=$reservationId,")
|
98 107 | append("reservationInstanceMatchCriteria=$reservationInstanceMatchCriteria,")
|
99 108 | append("reservationStartTimestamp=$reservationStartTimestamp,")
|
100 109 | append("reservationState=$reservationState,")
|
101 110 | append("reservationType=$reservationType,")
|
102 111 | append("reservationUnusedFinancialOwner=$reservationUnusedFinancialOwner,")
|
103 112 | append("resourceRegion=$resourceRegion,")
|
113 + | append("tags=$tags,")
|
104 114 | append("tenancy=$tenancy")
|
105 115 | append(")")
|
106 116 | }
|
107 117 |
|
108 118 | override fun hashCode(): kotlin.Int {
|
109 119 | var result = accountId?.hashCode() ?: 0
|
120 + | result = 31 * result + (this.accountName?.hashCode() ?: 0)
|
110 121 | result = 31 * result + (this.availabilityZoneId?.hashCode() ?: 0)
|
111 122 | result = 31 * result + (this.instanceFamily?.hashCode() ?: 0)
|
112 123 | result = 31 * result + (this.instancePlatform?.hashCode() ?: 0)
|
113 124 | result = 31 * result + (this.instanceType?.hashCode() ?: 0)
|
114 125 | result = 31 * result + (this.reservationArn?.hashCode() ?: 0)
|
115 126 | result = 31 * result + (this.reservationCreateTimestamp?.hashCode() ?: 0)
|
116 127 | result = 31 * result + (this.reservationEndDateType?.hashCode() ?: 0)
|
117 128 | result = 31 * result + (this.reservationEndTimestamp?.hashCode() ?: 0)
|
118 129 | result = 31 * result + (this.reservationId?.hashCode() ?: 0)
|
119 130 | result = 31 * result + (this.reservationInstanceMatchCriteria?.hashCode() ?: 0)
|
120 131 | result = 31 * result + (this.reservationStartTimestamp?.hashCode() ?: 0)
|
121 132 | result = 31 * result + (this.reservationState?.hashCode() ?: 0)
|
122 133 | result = 31 * result + (this.reservationType?.hashCode() ?: 0)
|
123 134 | result = 31 * result + (this.reservationUnusedFinancialOwner?.hashCode() ?: 0)
|
124 135 | result = 31 * result + (this.resourceRegion?.hashCode() ?: 0)
|
136 + | result = 31 * result + (this.tags?.hashCode() ?: 0)
|
125 137 | result = 31 * result + (this.tenancy?.hashCode() ?: 0)
|
126 138 | return result
|
127 139 | }
|
128 140 |
|
129 141 | override fun equals(other: kotlin.Any?): kotlin.Boolean {
|
130 142 | if (this === other) return true
|
131 143 | if (other == null || this::class != other::class) return false
|
132 144 |
|
133 145 | other as CapacityManagerDimension
|
134 146 |
|
135 147 | if (accountId != other.accountId) return false
|
148 + | if (accountName != other.accountName) return false
|
136 149 | if (availabilityZoneId != other.availabilityZoneId) return false
|
137 150 | if (instanceFamily != other.instanceFamily) return false
|
138 151 | if (instancePlatform != other.instancePlatform) return false
|
139 152 | if (instanceType != other.instanceType) return false
|
140 153 | if (reservationArn != other.reservationArn) return false
|
141 154 | if (reservationCreateTimestamp != other.reservationCreateTimestamp) return false
|
142 155 | if (reservationEndDateType != other.reservationEndDateType) return false
|
143 156 | if (reservationEndTimestamp != other.reservationEndTimestamp) return false
|
144 157 | if (reservationId != other.reservationId) return false
|
145 158 | if (reservationInstanceMatchCriteria != other.reservationInstanceMatchCriteria) return false
|
146 159 | if (reservationStartTimestamp != other.reservationStartTimestamp) return false
|
147 160 | if (reservationState != other.reservationState) return false
|
148 161 | if (reservationType != other.reservationType) return false
|
149 162 | if (reservationUnusedFinancialOwner != other.reservationUnusedFinancialOwner) return false
|
150 163 | if (resourceRegion != other.resourceRegion) return false
|
164 + | if (tags != other.tags) return false
|
151 165 | if (tenancy != other.tenancy) return false
|
152 166 |
|
153 167 | return true
|
154 168 | }
|
155 169 |
|
156 170 | public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ec2.model.CapacityManagerDimension = Builder(this).apply(block).build()
|
157 171 |
|
158 172 | @SdkDsl
|
159 173 | public class Builder {
|
160 174 | /**
|
161 175 | * The Amazon Web Services account ID that owns the capacity resource.
|
162 176 | */
|
163 177 | public var accountId: kotlin.String? = null
|
178 + | /**
|
179 + | * The name of the Amazon Web Services account that owns the capacity resource. This dimension is only available when Organizations access is enabled for Capacity Manager.
|
180 + | */
|
181 + | public var accountName: kotlin.String? = null
|
164 182 | /**
|
165 183 | * The unique identifier of the Availability Zone where the capacity resource is located.
|
166 184 | */
|
167 185 | public var availabilityZoneId: kotlin.String? = null
|
168 186 | /**
|
169 187 | * The EC2 instance family of the capacity resource.
|
170 188 | */
|
171 189 | public var instanceFamily: kotlin.String? = null
|
172 190 | /**
|
173 191 | * The platform or operating system of the instance.
|
174 192 | */
|
175 193 | public var instancePlatform: kotlin.String? = null
|
176 194 | /**
|
177 195 | * The specific EC2 instance type of the capacity resource.
|
178 196 | */
|
179 197 | public var instanceType: kotlin.String? = null
|
180 198 | /**
|
181 199 | * The Amazon Resource Name (ARN) of the capacity reservation. This provides a unique identifier that can be used across Amazon Web Services services to reference the specific reservation.
|
182 200 | */
|
183 201 | public var reservationArn: kotlin.String? = null
|
184 202 | /**
|
185 203 | * The timestamp when the capacity reservation was originally created, in milliseconds since epoch. This differs from the start timestamp as reservations can be created before they become active.
|
186 204 | */
|
187 205 | public var reservationCreateTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
|
188 206 | /**
|
189 207 | * The type of end date for the capacity reservation. This indicates whether the reservation has a fixed end date, is open-ended, or follows a specific termination pattern.
|
190 208 | */
|
191 209 | public var reservationEndDateType: aws.sdk.kotlin.services.ec2.model.ReservationEndDateType? = null
|
192 210 | /**
|
193 211 | * The timestamp when the capacity reservation expires and is no longer available, in milliseconds since epoch. After this time, the reservation will not provide any capacity.
|
194 212 | */
|
195 213 | public var reservationEndTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
|
196 214 | /**
|
197 215 | * The unique identifier of the capacity reservation.
|
198 216 | */
|
199 217 | public var reservationId: kotlin.String? = null
|
200 218 | /**
|
201 219 | * The instance matching criteria for the capacity reservation, determining how instances are matched to the reservation.
|
202 220 | */
|
203 221 | public var reservationInstanceMatchCriteria: kotlin.String? = null
|
204 222 | /**
|
205 223 | * The timestamp when the capacity reservation becomes active and available for use, in milliseconds since epoch. This is when the reservation begins providing capacity.
|
206 224 | */
|
207 225 | public var reservationStartTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
|
208 226 | /**
|
209 227 | * The current state of the capacity reservation.
|
210 228 | */
|
211 229 | public var reservationState: aws.sdk.kotlin.services.ec2.model.ReservationState? = null
|
212 230 | /**
|
213 231 | * The type of capacity reservation.
|
214 232 | */
|
215 233 | public var reservationType: aws.sdk.kotlin.services.ec2.model.ReservationType? = null
|
216 234 | /**
|
217 235 | * The Amazon Web Services account ID that is financially responsible for unused capacity reservation costs.
|
218 236 | */
|
219 237 | public var reservationUnusedFinancialOwner: kotlin.String? = null
|
220 238 | /**
|
221 239 | * The Amazon Web Services Region where the capacity resource is located.
|
222 240 | */
|
223 241 | public var resourceRegion: kotlin.String? = null
|
242 + | /**
|
243 + | * The tags associated with the capacity resource, represented as key-value pairs. Only tags that have been activated for monitoring via `UpdateCapacityManagerMonitoredTagKeys` are included.
|
244 + | */
|
245 + | public var tags: List<CapacityManagerTagDimension>? = null
|
224 246 | /**
|
225 247 | * The tenancy of the EC2 instances associated with this capacity dimension. Valid values are 'default' for shared tenancy, 'dedicated' for dedicated instances, or 'host' for dedicated hosts.
|
226 248 | */
|
227 249 | public var tenancy: aws.sdk.kotlin.services.ec2.model.CapacityTenancy? = null
|
228 250 |
|
229 251 | @PublishedApi
|
230 252 | internal constructor()
|
231 253 | @PublishedApi
|
232 254 | internal constructor(x: aws.sdk.kotlin.services.ec2.model.CapacityManagerDimension) : this() {
|
233 255 | this.accountId = x.accountId
|
256 + | this.accountName = x.accountName
|
234 257 | this.availabilityZoneId = x.availabilityZoneId
|
235 258 | this.instanceFamily = x.instanceFamily
|
236 259 | this.instancePlatform = x.instancePlatform
|
237 260 | this.instanceType = x.instanceType
|
238 261 | this.reservationArn = x.reservationArn
|
239 262 | this.reservationCreateTimestamp = x.reservationCreateTimestamp
|
240 263 | this.reservationEndDateType = x.reservationEndDateType
|
241 264 | this.reservationEndTimestamp = x.reservationEndTimestamp
|
242 265 | this.reservationId = x.reservationId
|
243 266 | this.reservationInstanceMatchCriteria = x.reservationInstanceMatchCriteria
|
244 267 | this.reservationStartTimestamp = x.reservationStartTimestamp
|
245 268 | this.reservationState = x.reservationState
|
246 269 | this.reservationType = x.reservationType
|
247 270 | this.reservationUnusedFinancialOwner = x.reservationUnusedFinancialOwner
|
248 271 | this.resourceRegion = x.resourceRegion
|
272 + | this.tags = x.tags
|
249 273 | this.tenancy = x.tenancy
|
250 274 | }
|
251 275 |
|
252 276 | @PublishedApi
|
253 277 | internal fun build(): aws.sdk.kotlin.services.ec2.model.CapacityManagerDimension = CapacityManagerDimension(this)
|
254 278 |
|
255 279 | internal fun correctErrors(): Builder {
|
256 280 | return this
|
257 281 | }
|
258 282 | }
|