github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/capacityReservation.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package ec2 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides an EC2 Capacity Reservation. This allows you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone for any duration. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := ec2.NewCapacityReservation(ctx, "default", &ec2.CapacityReservationArgs{ 33 // InstanceType: pulumi.String(ec2.InstanceType_T2_Micro), 34 // InstancePlatform: pulumi.String(ec2.InstancePlatformLinuxUnix), 35 // AvailabilityZone: pulumi.String("eu-west-1a"), 36 // InstanceCount: pulumi.Int(1), 37 // }) 38 // if err != nil { 39 // return err 40 // } 41 // return nil 42 // }) 43 // } 44 // 45 // ``` 46 // <!--End PulumiCodeChooser --> 47 // 48 // ## Import 49 // 50 // Using `pulumi import`, import Capacity Reservations using the `id`. For example: 51 // 52 // ```sh 53 // $ pulumi import aws:ec2/capacityReservation:CapacityReservation web cr-0123456789abcdef0 54 // ``` 55 type CapacityReservation struct { 56 pulumi.CustomResourceState 57 58 // The ARN of the Capacity Reservation. 59 Arn pulumi.StringOutput `pulumi:"arn"` 60 // The Availability Zone in which to create the Capacity Reservation. 61 AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"` 62 // Indicates whether the Capacity Reservation supports EBS-optimized instances. 63 EbsOptimized pulumi.BoolPtrOutput `pulumi:"ebsOptimized"` 64 // The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 65 EndDate pulumi.StringPtrOutput `pulumi:"endDate"` 66 // Indicates the way in which the Capacity Reservation ends. Specify either `unlimited` or `limited`. 67 EndDateType pulumi.StringPtrOutput `pulumi:"endDateType"` 68 // Indicates whether the Capacity Reservation supports instances with temporary, block-level storage. 69 EphemeralStorage pulumi.BoolPtrOutput `pulumi:"ephemeralStorage"` 70 // The number of instances for which to reserve capacity. 71 InstanceCount pulumi.IntOutput `pulumi:"instanceCount"` 72 // Indicates the type of instance launches that the Capacity Reservation accepts. Specify either `open` or `targeted`. 73 InstanceMatchCriteria pulumi.StringPtrOutput `pulumi:"instanceMatchCriteria"` 74 // The type of operating system for which to reserve capacity. Valid options are `Linux/UNIX`, `Red Hat Enterprise Linux`, `SUSE Linux`, `Windows`, `Windows with SQL Server`, `Windows with SQL Server Enterprise`, `Windows with SQL Server Standard` or `Windows with SQL Server Web`. 75 InstancePlatform pulumi.StringOutput `pulumi:"instancePlatform"` 76 // The instance type for which to reserve capacity. 77 InstanceType pulumi.StringOutput `pulumi:"instanceType"` 78 // The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. 79 OutpostArn pulumi.StringPtrOutput `pulumi:"outpostArn"` 80 // The ID of the AWS account that owns the Capacity Reservation. 81 OwnerId pulumi.StringOutput `pulumi:"ownerId"` 82 // The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. 83 PlacementGroupArn pulumi.StringPtrOutput `pulumi:"placementGroupArn"` 84 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 85 Tags pulumi.StringMapOutput `pulumi:"tags"` 86 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block 87 // 88 // Deprecated: Please use `tags` instead. 89 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 90 // Indicates the tenancy of the Capacity Reservation. Specify either `default` or `dedicated`. 91 Tenancy pulumi.StringPtrOutput `pulumi:"tenancy"` 92 } 93 94 // NewCapacityReservation registers a new resource with the given unique name, arguments, and options. 95 func NewCapacityReservation(ctx *pulumi.Context, 96 name string, args *CapacityReservationArgs, opts ...pulumi.ResourceOption) (*CapacityReservation, error) { 97 if args == nil { 98 return nil, errors.New("missing one or more required arguments") 99 } 100 101 if args.AvailabilityZone == nil { 102 return nil, errors.New("invalid value for required argument 'AvailabilityZone'") 103 } 104 if args.InstanceCount == nil { 105 return nil, errors.New("invalid value for required argument 'InstanceCount'") 106 } 107 if args.InstancePlatform == nil { 108 return nil, errors.New("invalid value for required argument 'InstancePlatform'") 109 } 110 if args.InstanceType == nil { 111 return nil, errors.New("invalid value for required argument 'InstanceType'") 112 } 113 opts = internal.PkgResourceDefaultOpts(opts) 114 var resource CapacityReservation 115 err := ctx.RegisterResource("aws:ec2/capacityReservation:CapacityReservation", name, args, &resource, opts...) 116 if err != nil { 117 return nil, err 118 } 119 return &resource, nil 120 } 121 122 // GetCapacityReservation gets an existing CapacityReservation resource's state with the given name, ID, and optional 123 // state properties that are used to uniquely qualify the lookup (nil if not required). 124 func GetCapacityReservation(ctx *pulumi.Context, 125 name string, id pulumi.IDInput, state *CapacityReservationState, opts ...pulumi.ResourceOption) (*CapacityReservation, error) { 126 var resource CapacityReservation 127 err := ctx.ReadResource("aws:ec2/capacityReservation:CapacityReservation", name, id, state, &resource, opts...) 128 if err != nil { 129 return nil, err 130 } 131 return &resource, nil 132 } 133 134 // Input properties used for looking up and filtering CapacityReservation resources. 135 type capacityReservationState struct { 136 // The ARN of the Capacity Reservation. 137 Arn *string `pulumi:"arn"` 138 // The Availability Zone in which to create the Capacity Reservation. 139 AvailabilityZone *string `pulumi:"availabilityZone"` 140 // Indicates whether the Capacity Reservation supports EBS-optimized instances. 141 EbsOptimized *bool `pulumi:"ebsOptimized"` 142 // The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 143 EndDate *string `pulumi:"endDate"` 144 // Indicates the way in which the Capacity Reservation ends. Specify either `unlimited` or `limited`. 145 EndDateType *string `pulumi:"endDateType"` 146 // Indicates whether the Capacity Reservation supports instances with temporary, block-level storage. 147 EphemeralStorage *bool `pulumi:"ephemeralStorage"` 148 // The number of instances for which to reserve capacity. 149 InstanceCount *int `pulumi:"instanceCount"` 150 // Indicates the type of instance launches that the Capacity Reservation accepts. Specify either `open` or `targeted`. 151 InstanceMatchCriteria *string `pulumi:"instanceMatchCriteria"` 152 // The type of operating system for which to reserve capacity. Valid options are `Linux/UNIX`, `Red Hat Enterprise Linux`, `SUSE Linux`, `Windows`, `Windows with SQL Server`, `Windows with SQL Server Enterprise`, `Windows with SQL Server Standard` or `Windows with SQL Server Web`. 153 InstancePlatform *string `pulumi:"instancePlatform"` 154 // The instance type for which to reserve capacity. 155 InstanceType *string `pulumi:"instanceType"` 156 // The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. 157 OutpostArn *string `pulumi:"outpostArn"` 158 // The ID of the AWS account that owns the Capacity Reservation. 159 OwnerId *string `pulumi:"ownerId"` 160 // The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. 161 PlacementGroupArn *string `pulumi:"placementGroupArn"` 162 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 163 Tags map[string]string `pulumi:"tags"` 164 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block 165 // 166 // Deprecated: Please use `tags` instead. 167 TagsAll map[string]string `pulumi:"tagsAll"` 168 // Indicates the tenancy of the Capacity Reservation. Specify either `default` or `dedicated`. 169 Tenancy *string `pulumi:"tenancy"` 170 } 171 172 type CapacityReservationState struct { 173 // The ARN of the Capacity Reservation. 174 Arn pulumi.StringPtrInput 175 // The Availability Zone in which to create the Capacity Reservation. 176 AvailabilityZone pulumi.StringPtrInput 177 // Indicates whether the Capacity Reservation supports EBS-optimized instances. 178 EbsOptimized pulumi.BoolPtrInput 179 // The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 180 EndDate pulumi.StringPtrInput 181 // Indicates the way in which the Capacity Reservation ends. Specify either `unlimited` or `limited`. 182 EndDateType pulumi.StringPtrInput 183 // Indicates whether the Capacity Reservation supports instances with temporary, block-level storage. 184 EphemeralStorage pulumi.BoolPtrInput 185 // The number of instances for which to reserve capacity. 186 InstanceCount pulumi.IntPtrInput 187 // Indicates the type of instance launches that the Capacity Reservation accepts. Specify either `open` or `targeted`. 188 InstanceMatchCriteria pulumi.StringPtrInput 189 // The type of operating system for which to reserve capacity. Valid options are `Linux/UNIX`, `Red Hat Enterprise Linux`, `SUSE Linux`, `Windows`, `Windows with SQL Server`, `Windows with SQL Server Enterprise`, `Windows with SQL Server Standard` or `Windows with SQL Server Web`. 190 InstancePlatform pulumi.StringPtrInput 191 // The instance type for which to reserve capacity. 192 InstanceType pulumi.StringPtrInput 193 // The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. 194 OutpostArn pulumi.StringPtrInput 195 // The ID of the AWS account that owns the Capacity Reservation. 196 OwnerId pulumi.StringPtrInput 197 // The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. 198 PlacementGroupArn pulumi.StringPtrInput 199 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 200 Tags pulumi.StringMapInput 201 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block 202 // 203 // Deprecated: Please use `tags` instead. 204 TagsAll pulumi.StringMapInput 205 // Indicates the tenancy of the Capacity Reservation. Specify either `default` or `dedicated`. 206 Tenancy pulumi.StringPtrInput 207 } 208 209 func (CapacityReservationState) ElementType() reflect.Type { 210 return reflect.TypeOf((*capacityReservationState)(nil)).Elem() 211 } 212 213 type capacityReservationArgs struct { 214 // The Availability Zone in which to create the Capacity Reservation. 215 AvailabilityZone string `pulumi:"availabilityZone"` 216 // Indicates whether the Capacity Reservation supports EBS-optimized instances. 217 EbsOptimized *bool `pulumi:"ebsOptimized"` 218 // The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 219 EndDate *string `pulumi:"endDate"` 220 // Indicates the way in which the Capacity Reservation ends. Specify either `unlimited` or `limited`. 221 EndDateType *string `pulumi:"endDateType"` 222 // Indicates whether the Capacity Reservation supports instances with temporary, block-level storage. 223 EphemeralStorage *bool `pulumi:"ephemeralStorage"` 224 // The number of instances for which to reserve capacity. 225 InstanceCount int `pulumi:"instanceCount"` 226 // Indicates the type of instance launches that the Capacity Reservation accepts. Specify either `open` or `targeted`. 227 InstanceMatchCriteria *string `pulumi:"instanceMatchCriteria"` 228 // The type of operating system for which to reserve capacity. Valid options are `Linux/UNIX`, `Red Hat Enterprise Linux`, `SUSE Linux`, `Windows`, `Windows with SQL Server`, `Windows with SQL Server Enterprise`, `Windows with SQL Server Standard` or `Windows with SQL Server Web`. 229 InstancePlatform string `pulumi:"instancePlatform"` 230 // The instance type for which to reserve capacity. 231 InstanceType string `pulumi:"instanceType"` 232 // The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. 233 OutpostArn *string `pulumi:"outpostArn"` 234 // The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. 235 PlacementGroupArn *string `pulumi:"placementGroupArn"` 236 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 237 Tags map[string]string `pulumi:"tags"` 238 // Indicates the tenancy of the Capacity Reservation. Specify either `default` or `dedicated`. 239 Tenancy *string `pulumi:"tenancy"` 240 } 241 242 // The set of arguments for constructing a CapacityReservation resource. 243 type CapacityReservationArgs struct { 244 // The Availability Zone in which to create the Capacity Reservation. 245 AvailabilityZone pulumi.StringInput 246 // Indicates whether the Capacity Reservation supports EBS-optimized instances. 247 EbsOptimized pulumi.BoolPtrInput 248 // The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 249 EndDate pulumi.StringPtrInput 250 // Indicates the way in which the Capacity Reservation ends. Specify either `unlimited` or `limited`. 251 EndDateType pulumi.StringPtrInput 252 // Indicates whether the Capacity Reservation supports instances with temporary, block-level storage. 253 EphemeralStorage pulumi.BoolPtrInput 254 // The number of instances for which to reserve capacity. 255 InstanceCount pulumi.IntInput 256 // Indicates the type of instance launches that the Capacity Reservation accepts. Specify either `open` or `targeted`. 257 InstanceMatchCriteria pulumi.StringPtrInput 258 // The type of operating system for which to reserve capacity. Valid options are `Linux/UNIX`, `Red Hat Enterprise Linux`, `SUSE Linux`, `Windows`, `Windows with SQL Server`, `Windows with SQL Server Enterprise`, `Windows with SQL Server Standard` or `Windows with SQL Server Web`. 259 InstancePlatform pulumi.StringInput 260 // The instance type for which to reserve capacity. 261 InstanceType pulumi.StringInput 262 // The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. 263 OutpostArn pulumi.StringPtrInput 264 // The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. 265 PlacementGroupArn pulumi.StringPtrInput 266 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 267 Tags pulumi.StringMapInput 268 // Indicates the tenancy of the Capacity Reservation. Specify either `default` or `dedicated`. 269 Tenancy pulumi.StringPtrInput 270 } 271 272 func (CapacityReservationArgs) ElementType() reflect.Type { 273 return reflect.TypeOf((*capacityReservationArgs)(nil)).Elem() 274 } 275 276 type CapacityReservationInput interface { 277 pulumi.Input 278 279 ToCapacityReservationOutput() CapacityReservationOutput 280 ToCapacityReservationOutputWithContext(ctx context.Context) CapacityReservationOutput 281 } 282 283 func (*CapacityReservation) ElementType() reflect.Type { 284 return reflect.TypeOf((**CapacityReservation)(nil)).Elem() 285 } 286 287 func (i *CapacityReservation) ToCapacityReservationOutput() CapacityReservationOutput { 288 return i.ToCapacityReservationOutputWithContext(context.Background()) 289 } 290 291 func (i *CapacityReservation) ToCapacityReservationOutputWithContext(ctx context.Context) CapacityReservationOutput { 292 return pulumi.ToOutputWithContext(ctx, i).(CapacityReservationOutput) 293 } 294 295 // CapacityReservationArrayInput is an input type that accepts CapacityReservationArray and CapacityReservationArrayOutput values. 296 // You can construct a concrete instance of `CapacityReservationArrayInput` via: 297 // 298 // CapacityReservationArray{ CapacityReservationArgs{...} } 299 type CapacityReservationArrayInput interface { 300 pulumi.Input 301 302 ToCapacityReservationArrayOutput() CapacityReservationArrayOutput 303 ToCapacityReservationArrayOutputWithContext(context.Context) CapacityReservationArrayOutput 304 } 305 306 type CapacityReservationArray []CapacityReservationInput 307 308 func (CapacityReservationArray) ElementType() reflect.Type { 309 return reflect.TypeOf((*[]*CapacityReservation)(nil)).Elem() 310 } 311 312 func (i CapacityReservationArray) ToCapacityReservationArrayOutput() CapacityReservationArrayOutput { 313 return i.ToCapacityReservationArrayOutputWithContext(context.Background()) 314 } 315 316 func (i CapacityReservationArray) ToCapacityReservationArrayOutputWithContext(ctx context.Context) CapacityReservationArrayOutput { 317 return pulumi.ToOutputWithContext(ctx, i).(CapacityReservationArrayOutput) 318 } 319 320 // CapacityReservationMapInput is an input type that accepts CapacityReservationMap and CapacityReservationMapOutput values. 321 // You can construct a concrete instance of `CapacityReservationMapInput` via: 322 // 323 // CapacityReservationMap{ "key": CapacityReservationArgs{...} } 324 type CapacityReservationMapInput interface { 325 pulumi.Input 326 327 ToCapacityReservationMapOutput() CapacityReservationMapOutput 328 ToCapacityReservationMapOutputWithContext(context.Context) CapacityReservationMapOutput 329 } 330 331 type CapacityReservationMap map[string]CapacityReservationInput 332 333 func (CapacityReservationMap) ElementType() reflect.Type { 334 return reflect.TypeOf((*map[string]*CapacityReservation)(nil)).Elem() 335 } 336 337 func (i CapacityReservationMap) ToCapacityReservationMapOutput() CapacityReservationMapOutput { 338 return i.ToCapacityReservationMapOutputWithContext(context.Background()) 339 } 340 341 func (i CapacityReservationMap) ToCapacityReservationMapOutputWithContext(ctx context.Context) CapacityReservationMapOutput { 342 return pulumi.ToOutputWithContext(ctx, i).(CapacityReservationMapOutput) 343 } 344 345 type CapacityReservationOutput struct{ *pulumi.OutputState } 346 347 func (CapacityReservationOutput) ElementType() reflect.Type { 348 return reflect.TypeOf((**CapacityReservation)(nil)).Elem() 349 } 350 351 func (o CapacityReservationOutput) ToCapacityReservationOutput() CapacityReservationOutput { 352 return o 353 } 354 355 func (o CapacityReservationOutput) ToCapacityReservationOutputWithContext(ctx context.Context) CapacityReservationOutput { 356 return o 357 } 358 359 // The ARN of the Capacity Reservation. 360 func (o CapacityReservationOutput) Arn() pulumi.StringOutput { 361 return o.ApplyT(func(v *CapacityReservation) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 362 } 363 364 // The Availability Zone in which to create the Capacity Reservation. 365 func (o CapacityReservationOutput) AvailabilityZone() pulumi.StringOutput { 366 return o.ApplyT(func(v *CapacityReservation) pulumi.StringOutput { return v.AvailabilityZone }).(pulumi.StringOutput) 367 } 368 369 // Indicates whether the Capacity Reservation supports EBS-optimized instances. 370 func (o CapacityReservationOutput) EbsOptimized() pulumi.BoolPtrOutput { 371 return o.ApplyT(func(v *CapacityReservation) pulumi.BoolPtrOutput { return v.EbsOptimized }).(pulumi.BoolPtrOutput) 372 } 373 374 // The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 375 func (o CapacityReservationOutput) EndDate() pulumi.StringPtrOutput { 376 return o.ApplyT(func(v *CapacityReservation) pulumi.StringPtrOutput { return v.EndDate }).(pulumi.StringPtrOutput) 377 } 378 379 // Indicates the way in which the Capacity Reservation ends. Specify either `unlimited` or `limited`. 380 func (o CapacityReservationOutput) EndDateType() pulumi.StringPtrOutput { 381 return o.ApplyT(func(v *CapacityReservation) pulumi.StringPtrOutput { return v.EndDateType }).(pulumi.StringPtrOutput) 382 } 383 384 // Indicates whether the Capacity Reservation supports instances with temporary, block-level storage. 385 func (o CapacityReservationOutput) EphemeralStorage() pulumi.BoolPtrOutput { 386 return o.ApplyT(func(v *CapacityReservation) pulumi.BoolPtrOutput { return v.EphemeralStorage }).(pulumi.BoolPtrOutput) 387 } 388 389 // The number of instances for which to reserve capacity. 390 func (o CapacityReservationOutput) InstanceCount() pulumi.IntOutput { 391 return o.ApplyT(func(v *CapacityReservation) pulumi.IntOutput { return v.InstanceCount }).(pulumi.IntOutput) 392 } 393 394 // Indicates the type of instance launches that the Capacity Reservation accepts. Specify either `open` or `targeted`. 395 func (o CapacityReservationOutput) InstanceMatchCriteria() pulumi.StringPtrOutput { 396 return o.ApplyT(func(v *CapacityReservation) pulumi.StringPtrOutput { return v.InstanceMatchCriteria }).(pulumi.StringPtrOutput) 397 } 398 399 // The type of operating system for which to reserve capacity. Valid options are `Linux/UNIX`, `Red Hat Enterprise Linux`, `SUSE Linux`, `Windows`, `Windows with SQL Server`, `Windows with SQL Server Enterprise`, `Windows with SQL Server Standard` or `Windows with SQL Server Web`. 400 func (o CapacityReservationOutput) InstancePlatform() pulumi.StringOutput { 401 return o.ApplyT(func(v *CapacityReservation) pulumi.StringOutput { return v.InstancePlatform }).(pulumi.StringOutput) 402 } 403 404 // The instance type for which to reserve capacity. 405 func (o CapacityReservationOutput) InstanceType() pulumi.StringOutput { 406 return o.ApplyT(func(v *CapacityReservation) pulumi.StringOutput { return v.InstanceType }).(pulumi.StringOutput) 407 } 408 409 // The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. 410 func (o CapacityReservationOutput) OutpostArn() pulumi.StringPtrOutput { 411 return o.ApplyT(func(v *CapacityReservation) pulumi.StringPtrOutput { return v.OutpostArn }).(pulumi.StringPtrOutput) 412 } 413 414 // The ID of the AWS account that owns the Capacity Reservation. 415 func (o CapacityReservationOutput) OwnerId() pulumi.StringOutput { 416 return o.ApplyT(func(v *CapacityReservation) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput) 417 } 418 419 // The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. 420 func (o CapacityReservationOutput) PlacementGroupArn() pulumi.StringPtrOutput { 421 return o.ApplyT(func(v *CapacityReservation) pulumi.StringPtrOutput { return v.PlacementGroupArn }).(pulumi.StringPtrOutput) 422 } 423 424 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 425 func (o CapacityReservationOutput) Tags() pulumi.StringMapOutput { 426 return o.ApplyT(func(v *CapacityReservation) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 427 } 428 429 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block 430 // 431 // Deprecated: Please use `tags` instead. 432 func (o CapacityReservationOutput) TagsAll() pulumi.StringMapOutput { 433 return o.ApplyT(func(v *CapacityReservation) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 434 } 435 436 // Indicates the tenancy of the Capacity Reservation. Specify either `default` or `dedicated`. 437 func (o CapacityReservationOutput) Tenancy() pulumi.StringPtrOutput { 438 return o.ApplyT(func(v *CapacityReservation) pulumi.StringPtrOutput { return v.Tenancy }).(pulumi.StringPtrOutput) 439 } 440 441 type CapacityReservationArrayOutput struct{ *pulumi.OutputState } 442 443 func (CapacityReservationArrayOutput) ElementType() reflect.Type { 444 return reflect.TypeOf((*[]*CapacityReservation)(nil)).Elem() 445 } 446 447 func (o CapacityReservationArrayOutput) ToCapacityReservationArrayOutput() CapacityReservationArrayOutput { 448 return o 449 } 450 451 func (o CapacityReservationArrayOutput) ToCapacityReservationArrayOutputWithContext(ctx context.Context) CapacityReservationArrayOutput { 452 return o 453 } 454 455 func (o CapacityReservationArrayOutput) Index(i pulumi.IntInput) CapacityReservationOutput { 456 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CapacityReservation { 457 return vs[0].([]*CapacityReservation)[vs[1].(int)] 458 }).(CapacityReservationOutput) 459 } 460 461 type CapacityReservationMapOutput struct{ *pulumi.OutputState } 462 463 func (CapacityReservationMapOutput) ElementType() reflect.Type { 464 return reflect.TypeOf((*map[string]*CapacityReservation)(nil)).Elem() 465 } 466 467 func (o CapacityReservationMapOutput) ToCapacityReservationMapOutput() CapacityReservationMapOutput { 468 return o 469 } 470 471 func (o CapacityReservationMapOutput) ToCapacityReservationMapOutputWithContext(ctx context.Context) CapacityReservationMapOutput { 472 return o 473 } 474 475 func (o CapacityReservationMapOutput) MapIndex(k pulumi.StringInput) CapacityReservationOutput { 476 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CapacityReservation { 477 return vs[0].(map[string]*CapacityReservation)[vs[1].(string)] 478 }).(CapacityReservationOutput) 479 } 480 481 func init() { 482 pulumi.RegisterInputType(reflect.TypeOf((*CapacityReservationInput)(nil)).Elem(), &CapacityReservation{}) 483 pulumi.RegisterInputType(reflect.TypeOf((*CapacityReservationArrayInput)(nil)).Elem(), CapacityReservationArray{}) 484 pulumi.RegisterInputType(reflect.TypeOf((*CapacityReservationMapInput)(nil)).Elem(), CapacityReservationMap{}) 485 pulumi.RegisterOutputType(CapacityReservationOutput{}) 486 pulumi.RegisterOutputType(CapacityReservationArrayOutput{}) 487 pulumi.RegisterOutputType(CapacityReservationMapOutput{}) 488 }