1. Packages
  2. AWS
  3. API Docs
  4. athena
  5. CapacityReservation
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.athena.CapacityReservation

Explore with Pulumi AI

Resource for managing an AWS Athena Capacity Reservation.

Destruction of this resource will both cancel and delete the capacity reservation.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.athena.CapacityReservation("example", {
    name: "example-reservation",
    targetDpus: 24,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.athena.CapacityReservation("example",
    name="example-reservation",
    target_dpus=24)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/athena"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := athena.NewCapacityReservation(ctx, "example", &athena.CapacityReservationArgs{
			Name:       pulumi.String("example-reservation"),
			TargetDpus: pulumi.Int(24),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Athena.CapacityReservation("example", new()
    {
        Name = "example-reservation",
        TargetDpus = 24,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.athena.CapacityReservation;
import com.pulumi.aws.athena.CapacityReservationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new CapacityReservation("example", CapacityReservationArgs.builder()
            .name("example-reservation")
            .targetDpus(24)
            .build());

    }
}
Copy
resources:
  example:
    type: aws:athena:CapacityReservation
    properties:
      name: example-reservation
      targetDpus: 24
Copy

Create CapacityReservation Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CapacityReservation(name: string, args: CapacityReservationArgs, opts?: CustomResourceOptions);
@overload
def CapacityReservation(resource_name: str,
                        args: CapacityReservationArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def CapacityReservation(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        target_dpus: Optional[int] = None,
                        name: Optional[str] = None,
                        tags: Optional[Mapping[str, str]] = None,
                        timeouts: Optional[CapacityReservationTimeoutsArgs] = None)
func NewCapacityReservation(ctx *Context, name string, args CapacityReservationArgs, opts ...ResourceOption) (*CapacityReservation, error)
public CapacityReservation(string name, CapacityReservationArgs args, CustomResourceOptions? opts = null)
public CapacityReservation(String name, CapacityReservationArgs args)
public CapacityReservation(String name, CapacityReservationArgs args, CustomResourceOptions options)
type: aws:athena:CapacityReservation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CapacityReservationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CapacityReservationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CapacityReservationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CapacityReservationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CapacityReservationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var capacityReservationResource = new Aws.Athena.CapacityReservation("capacityReservationResource", new()
{
    TargetDpus = 0,
    Name = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Timeouts = new Aws.Athena.Inputs.CapacityReservationTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := athena.NewCapacityReservation(ctx, "capacityReservationResource", &athena.CapacityReservationArgs{
	TargetDpus: pulumi.Int(0),
	Name:       pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Timeouts: &athena.CapacityReservationTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var capacityReservationResource = new CapacityReservation("capacityReservationResource", CapacityReservationArgs.builder()
    .targetDpus(0)
    .name("string")
    .tags(Map.of("string", "string"))
    .timeouts(CapacityReservationTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
capacity_reservation_resource = aws.athena.CapacityReservation("capacityReservationResource",
    target_dpus=0,
    name="string",
    tags={
        "string": "string",
    },
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const capacityReservationResource = new aws.athena.CapacityReservation("capacityReservationResource", {
    targetDpus: 0,
    name: "string",
    tags: {
        string: "string",
    },
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: aws:athena:CapacityReservation
properties:
    name: string
    tags:
        string: string
    targetDpus: 0
    timeouts:
        create: string
        delete: string
        update: string
Copy

CapacityReservation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CapacityReservation resource accepts the following input properties:

TargetDpus This property is required. int

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

Name string
Name of the capacity reservation.
Tags Dictionary<string, string>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeouts CapacityReservationTimeouts
TargetDpus This property is required. int

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

Name string
Name of the capacity reservation.
Tags map[string]string
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeouts CapacityReservationTimeoutsArgs
targetDpus This property is required. Integer

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

name String
Name of the capacity reservation.
tags Map<String,String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts CapacityReservationTimeouts
targetDpus This property is required. number

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

name string
Name of the capacity reservation.
tags {[key: string]: string}
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts CapacityReservationTimeouts
target_dpus This property is required. int

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

name str
Name of the capacity reservation.
tags Mapping[str, str]
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts CapacityReservationTimeoutsArgs
targetDpus This property is required. Number

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

name String
Name of the capacity reservation.
tags Map<String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the CapacityReservation resource produces the following output properties:

AllocatedDpus int
Number of data processing units currently allocated.
Arn string
ARN of the Capacity Reservation.
Id string
The provider-assigned unique ID for this managed resource.
Status string
Status of the capacity reservation.
TagsAll Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

AllocatedDpus int
Number of data processing units currently allocated.
Arn string
ARN of the Capacity Reservation.
Id string
The provider-assigned unique ID for this managed resource.
Status string
Status of the capacity reservation.
TagsAll map[string]string
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

allocatedDpus Integer
Number of data processing units currently allocated.
arn String
ARN of the Capacity Reservation.
id String
The provider-assigned unique ID for this managed resource.
status String
Status of the capacity reservation.
tagsAll Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

allocatedDpus number
Number of data processing units currently allocated.
arn string
ARN of the Capacity Reservation.
id string
The provider-assigned unique ID for this managed resource.
status string
Status of the capacity reservation.
tagsAll {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

allocated_dpus int
Number of data processing units currently allocated.
arn str
ARN of the Capacity Reservation.
id str
The provider-assigned unique ID for this managed resource.
status str
Status of the capacity reservation.
tags_all Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

allocatedDpus Number
Number of data processing units currently allocated.
arn String
ARN of the Capacity Reservation.
id String
The provider-assigned unique ID for this managed resource.
status String
Status of the capacity reservation.
tagsAll Map<String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing CapacityReservation Resource

Get an existing CapacityReservation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CapacityReservationState, opts?: CustomResourceOptions): CapacityReservation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allocated_dpus: Optional[int] = None,
        arn: Optional[str] = None,
        name: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        target_dpus: Optional[int] = None,
        timeouts: Optional[CapacityReservationTimeoutsArgs] = None) -> CapacityReservation
func GetCapacityReservation(ctx *Context, name string, id IDInput, state *CapacityReservationState, opts ...ResourceOption) (*CapacityReservation, error)
public static CapacityReservation Get(string name, Input<string> id, CapacityReservationState? state, CustomResourceOptions? opts = null)
public static CapacityReservation get(String name, Output<String> id, CapacityReservationState state, CustomResourceOptions options)
resources:  _:    type: aws:athena:CapacityReservation    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AllocatedDpus int
Number of data processing units currently allocated.
Arn string
ARN of the Capacity Reservation.
Name string
Name of the capacity reservation.
Status string
Status of the capacity reservation.
Tags Dictionary<string, string>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

TargetDpus int

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

Timeouts CapacityReservationTimeouts
AllocatedDpus int
Number of data processing units currently allocated.
Arn string
ARN of the Capacity Reservation.
Name string
Name of the capacity reservation.
Status string
Status of the capacity reservation.
Tags map[string]string
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

TargetDpus int

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

Timeouts CapacityReservationTimeoutsArgs
allocatedDpus Integer
Number of data processing units currently allocated.
arn String
ARN of the Capacity Reservation.
name String
Name of the capacity reservation.
status String
Status of the capacity reservation.
tags Map<String,String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

targetDpus Integer

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

timeouts CapacityReservationTimeouts
allocatedDpus number
Number of data processing units currently allocated.
arn string
ARN of the Capacity Reservation.
name string
Name of the capacity reservation.
status string
Status of the capacity reservation.
tags {[key: string]: string}
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

targetDpus number

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

timeouts CapacityReservationTimeouts
allocated_dpus int
Number of data processing units currently allocated.
arn str
ARN of the Capacity Reservation.
name str
Name of the capacity reservation.
status str
Status of the capacity reservation.
tags Mapping[str, str]
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

target_dpus int

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

timeouts CapacityReservationTimeoutsArgs
allocatedDpus Number
Number of data processing units currently allocated.
arn String
ARN of the Capacity Reservation.
name String
Name of the capacity reservation.
status String
Status of the capacity reservation.
tags Map<String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

targetDpus Number

Number of data processing units requested. Must be at least 24 units.

The following arguments are optional:

timeouts Property Map

Supporting Types

CapacityReservationTimeouts
, CapacityReservationTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

Using pulumi import, import Athena Capacity Reservation using the name. For example:

$ pulumi import aws:athena/capacityReservation:CapacityReservation example example-reservation
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.