10 10 | public class Placement private constructor(builder: Builder) {
|
11 11 | /**
|
12 12 | * The affinity setting for the instance on the Dedicated Host.
|
13 13 | *
|
14 14 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) or [ImportInstance](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html).
|
15 15 | */
|
16 16 | public val affinity: kotlin.String? = builder.affinity
|
17 17 | /**
|
18 18 | * The Availability Zone of the instance.
|
19 19 | *
|
20 - | * If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.
|
20 + | * On input, you can specify `AvailabilityZone` or `AvailabilityZoneId`, but not both. If you specify neither one, Amazon EC2 automatically selects an Availability Zone for you.
|
21 21 | *
|
22 22 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
|
23 23 | */
|
24 24 | public val availabilityZone: kotlin.String? = builder.availabilityZone
|
25 25 | /**
|
26 - | * The ID of the placement group that the instance is in. If you specify `GroupId`, you can't specify `GroupName`.
|
26 + | * The ID of the Availability Zone of the instance.
|
27 + | *
|
28 + | * On input, you can specify `AvailabilityZone` or `AvailabilityZoneId`, but not both. If you specify neither one, Amazon EC2 automatically selects an Availability Zone for you.
|
29 + | *
|
30 + | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
|
31 + | */
|
32 + | public val availabilityZoneId: kotlin.String? = builder.availabilityZoneId
|
33 + | /**
|
34 + | * The ID of the placement group that the instance is in.
|
35 + | *
|
36 + | * On input, you can specify `GroupId` or `GroupName`, but not both.
|
27 37 | */
|
28 38 | public val groupId: kotlin.String? = builder.groupId
|
29 39 | /**
|
30 - | * The name of the placement group that the instance is in. If you specify `GroupName`, you can't specify `GroupId`.
|
40 + | * The name of the placement group that the instance is in.
|
41 + | *
|
42 + | * On input, you can specify `GroupId` or `GroupName`, but not both.
|
31 43 | */
|
32 44 | public val groupName: kotlin.String? = builder.groupName
|
33 45 | /**
|
34 46 | * The ID of the Dedicated Host on which the instance resides.
|
35 47 | *
|
36 48 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) or [ImportInstance](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html).
|
37 49 | */
|
38 50 | public val hostId: kotlin.String? = builder.hostId
|
39 51 | /**
|
40 52 | * The ARN of the host resource group in which to launch the instances.
|
41 53 | *
|
42 - | * If you specify this parameter, either omit the **Tenancy** parameter or set it to `host`.
|
54 + | * On input, if you specify this parameter, either omit the **Tenancy** parameter or set it to `host`.
|
43 55 | *
|
44 56 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
|
45 57 | */
|
46 58 | public val hostResourceGroupArn: kotlin.String? = builder.hostResourceGroupArn
|
47 59 | /**
|
48 60 | * The number of the partition that the instance is in. Valid only if the placement group strategy is set to `partition`.
|
49 61 | *
|
50 62 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
|
51 63 | */
|
52 64 | public val partitionNumber: kotlin.Int? = builder.partitionNumber
|
53 65 | /**
|
54 66 | * Reserved for future use.
|
55 67 | */
|
56 68 | public val spreadDomain: kotlin.String? = builder.spreadDomain
|
57 69 | /**
|
58 70 | * The tenancy of the instance. An instance with a tenancy of `dedicated` runs on single-tenant hardware.
|
59 71 | *
|
60 72 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). The `host` tenancy is not supported for [ImportInstance](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html) or for T3 instances that are configured for the `unlimited` CPU credit option.
|
61 73 | */
|
62 74 | public val tenancy: aws.sdk.kotlin.services.ec2.model.Tenancy? = builder.tenancy
|
63 75 |
|
64 76 | public companion object {
|
65 77 | public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ec2.model.Placement = Builder().apply(block).build()
|
66 78 | }
|
67 79 |
|
68 80 | override fun toString(): kotlin.String = buildString {
|
69 81 | append("Placement(")
|
70 82 | append("affinity=$affinity,")
|
71 83 | append("availabilityZone=$availabilityZone,")
|
84 + | append("availabilityZoneId=$availabilityZoneId,")
|
72 85 | append("groupId=$groupId,")
|
73 86 | append("groupName=$groupName,")
|
74 87 | append("hostId=$hostId,")
|
75 88 | append("hostResourceGroupArn=$hostResourceGroupArn,")
|
76 89 | append("partitionNumber=$partitionNumber,")
|
77 90 | append("spreadDomain=$spreadDomain,")
|
78 91 | append("tenancy=$tenancy")
|
79 92 | append(")")
|
80 93 | }
|
81 94 |
|
82 95 | override fun hashCode(): kotlin.Int {
|
83 96 | var result = affinity?.hashCode() ?: 0
|
84 97 | result = 31 * result + (this.availabilityZone?.hashCode() ?: 0)
|
98 + | result = 31 * result + (this.availabilityZoneId?.hashCode() ?: 0)
|
85 99 | result = 31 * result + (this.groupId?.hashCode() ?: 0)
|
86 100 | result = 31 * result + (this.groupName?.hashCode() ?: 0)
|
87 101 | result = 31 * result + (this.hostId?.hashCode() ?: 0)
|
88 102 | result = 31 * result + (this.hostResourceGroupArn?.hashCode() ?: 0)
|
89 103 | result = 31 * result + (this.partitionNumber ?: 0)
|
90 104 | result = 31 * result + (this.spreadDomain?.hashCode() ?: 0)
|
91 105 | result = 31 * result + (this.tenancy?.hashCode() ?: 0)
|
92 106 | return result
|
93 107 | }
|
94 108 |
|
95 109 | override fun equals(other: kotlin.Any?): kotlin.Boolean {
|
96 110 | if (this === other) return true
|
97 111 | if (other == null || this::class != other::class) return false
|
98 112 |
|
99 113 | other as Placement
|
100 114 |
|
101 115 | if (affinity != other.affinity) return false
|
102 116 | if (availabilityZone != other.availabilityZone) return false
|
117 + | if (availabilityZoneId != other.availabilityZoneId) return false
|
103 118 | if (groupId != other.groupId) return false
|
104 119 | if (groupName != other.groupName) return false
|
105 120 | if (hostId != other.hostId) return false
|
106 121 | if (hostResourceGroupArn != other.hostResourceGroupArn) return false
|
107 122 | if (partitionNumber != other.partitionNumber) return false
|
108 123 | if (spreadDomain != other.spreadDomain) return false
|
109 124 | if (tenancy != other.tenancy) return false
|
110 125 |
|
111 126 | return true
|
112 127 | }
|
113 128 |
|
114 129 | public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ec2.model.Placement = Builder(this).apply(block).build()
|
115 130 |
|
116 131 | @SdkDsl
|
117 132 | public class Builder {
|
118 133 | /**
|
119 134 | * The affinity setting for the instance on the Dedicated Host.
|
120 135 | *
|
121 136 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) or [ImportInstance](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html).
|
122 137 | */
|
123 138 | public var affinity: kotlin.String? = null
|
124 139 | /**
|
125 140 | * The Availability Zone of the instance.
|
126 141 | *
|
127 - | * If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.
|
142 + | * On input, you can specify `AvailabilityZone` or `AvailabilityZoneId`, but not both. If you specify neither one, Amazon EC2 automatically selects an Availability Zone for you.
|
128 143 | *
|
129 144 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
|
130 145 | */
|
131 146 | public var availabilityZone: kotlin.String? = null
|
132 147 | /**
|
133 - | * The ID of the placement group that the instance is in. If you specify `GroupId`, you can't specify `GroupName`.
|
148 + | * The ID of the Availability Zone of the instance.
|
149 + | *
|
150 + | * On input, you can specify `AvailabilityZone` or `AvailabilityZoneId`, but not both. If you specify neither one, Amazon EC2 automatically selects an Availability Zone for you.
|
151 + | *
|
152 + | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
|
153 + | */
|
154 + | public var availabilityZoneId: kotlin.String? = null
|
155 + | /**
|
156 + | * The ID of the placement group that the instance is in.
|
157 + | *
|
158 + | * On input, you can specify `GroupId` or `GroupName`, but not both.
|
134 159 | */
|
135 160 | public var groupId: kotlin.String? = null
|
136 161 | /**
|
137 - | * The name of the placement group that the instance is in. If you specify `GroupName`, you can't specify `GroupId`.
|
162 + | * The name of the placement group that the instance is in.
|
163 + | *
|
164 + | * On input, you can specify `GroupId` or `GroupName`, but not both.
|
138 165 | */
|
139 166 | public var groupName: kotlin.String? = null
|
140 167 | /**
|
141 168 | * The ID of the Dedicated Host on which the instance resides.
|
142 169 | *
|
143 170 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) or [ImportInstance](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html).
|
144 171 | */
|
145 172 | public var hostId: kotlin.String? = null
|
146 173 | /**
|
147 174 | * The ARN of the host resource group in which to launch the instances.
|
148 175 | *
|
149 - | * If you specify this parameter, either omit the **Tenancy** parameter or set it to `host`.
|
176 + | * On input, if you specify this parameter, either omit the **Tenancy** parameter or set it to `host`.
|
150 177 | *
|
151 178 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
|
152 179 | */
|
153 180 | public var hostResourceGroupArn: kotlin.String? = null
|
154 181 | /**
|
155 182 | * The number of the partition that the instance is in. Valid only if the placement group strategy is set to `partition`.
|
156 183 | *
|
157 184 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
|
158 185 | */
|
159 186 | public var partitionNumber: kotlin.Int? = null
|
160 187 | /**
|
161 188 | * Reserved for future use.
|
162 189 | */
|
163 190 | public var spreadDomain: kotlin.String? = null
|
164 191 | /**
|
165 192 | * The tenancy of the instance. An instance with a tenancy of `dedicated` runs on single-tenant hardware.
|
166 193 | *
|
167 194 | * This parameter is not supported for [CreateFleet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). The `host` tenancy is not supported for [ImportInstance](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html) or for T3 instances that are configured for the `unlimited` CPU credit option.
|
168 195 | */
|
169 196 | public var tenancy: aws.sdk.kotlin.services.ec2.model.Tenancy? = null
|
170 197 |
|
171 198 | @PublishedApi
|
172 199 | internal constructor()
|
173 200 | @PublishedApi
|
174 201 | internal constructor(x: aws.sdk.kotlin.services.ec2.model.Placement) : this() {
|
175 202 | this.affinity = x.affinity
|
176 203 | this.availabilityZone = x.availabilityZone
|
204 + | this.availabilityZoneId = x.availabilityZoneId
|
177 205 | this.groupId = x.groupId
|
178 206 | this.groupName = x.groupName
|
179 207 | this.hostId = x.hostId
|
180 208 | this.hostResourceGroupArn = x.hostResourceGroupArn
|
181 209 | this.partitionNumber = x.partitionNumber
|
182 210 | this.spreadDomain = x.spreadDomain
|
183 211 | this.tenancy = x.tenancy
|
184 212 | }
|
185 213 |
|
186 214 | @PublishedApi
|