Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
aws.ec2.getCapacityBlockOffering
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
Information about a single EC2 Capacity Block Offering.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetCapacityBlockOfferingArgs;
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) {
final var example = Ec2Functions.getCapacityBlockOffering(GetCapacityBlockOfferingArgs.builder()
.capacityDurationHours(24)
.endDateRange("2024-05-30T15:04:05Z")
.instanceCount(1)
.instancePlatform("Linux/UNIX")
.instanceType("p4d.24xlarge")
.startDateRange("2024-04-28T15:04:05Z")
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:ec2:getCapacityBlockOffering
Arguments:
capacityDurationHours: 24
endDateRange: 2024-05-30T15:04:05Z
instanceCount: 1
instancePlatform: Linux/UNIX
instanceType: p4d.24xlarge
startDateRange: 2024-04-28T15:04:05Z
Using getCapacityBlockOffering
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCapacityBlockOffering(args: GetCapacityBlockOfferingArgs, opts?: InvokeOptions): Promise<GetCapacityBlockOfferingResult>
function getCapacityBlockOfferingOutput(args: GetCapacityBlockOfferingOutputArgs, opts?: InvokeOptions): Output<GetCapacityBlockOfferingResult>
def get_capacity_block_offering(capacity_duration_hours: Optional[int] = None,
end_date_range: Optional[str] = None,
instance_count: Optional[int] = None,
instance_type: Optional[str] = None,
start_date_range: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCapacityBlockOfferingResult
def get_capacity_block_offering_output(capacity_duration_hours: Optional[pulumi.Input[int]] = None,
end_date_range: Optional[pulumi.Input[str]] = None,
instance_count: Optional[pulumi.Input[int]] = None,
instance_type: Optional[pulumi.Input[str]] = None,
start_date_range: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCapacityBlockOfferingResult]
func GetCapacityBlockOffering(ctx *Context, args *GetCapacityBlockOfferingArgs, opts ...InvokeOption) (*GetCapacityBlockOfferingResult, error)
func GetCapacityBlockOfferingOutput(ctx *Context, args *GetCapacityBlockOfferingOutputArgs, opts ...InvokeOption) GetCapacityBlockOfferingResultOutput
> Note: This function is named GetCapacityBlockOffering
in the Go SDK.
public static class GetCapacityBlockOffering
{
public static Task<GetCapacityBlockOfferingResult> InvokeAsync(GetCapacityBlockOfferingArgs args, InvokeOptions? opts = null)
public static Output<GetCapacityBlockOfferingResult> Invoke(GetCapacityBlockOfferingInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCapacityBlockOfferingResult> getCapacityBlockOffering(GetCapacityBlockOfferingArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ec2/getCapacityBlockOffering:getCapacityBlockOffering
arguments:
# arguments dictionary
The following arguments are supported:
- Capacity
Duration intHours - The amount of time of the Capacity Block reservation in hours.
- Instance
Count int - The number of instances for which to reserve capacity.
- Instance
Type string - The instance type for which to reserve capacity.
- End
Date stringRange - The date and time at which the Capacity Block 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 (
YYYY-MM-DDTHH:MM:SSZ
) - Start
Date stringRange - The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)
- Capacity
Duration intHours - The amount of time of the Capacity Block reservation in hours.
- Instance
Count int - The number of instances for which to reserve capacity.
- Instance
Type string - The instance type for which to reserve capacity.
- End
Date stringRange - The date and time at which the Capacity Block 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 (
YYYY-MM-DDTHH:MM:SSZ
) - Start
Date stringRange - The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)
- capacity
Duration IntegerHours - The amount of time of the Capacity Block reservation in hours.
- instance
Count Integer - The number of instances for which to reserve capacity.
- instance
Type String - The instance type for which to reserve capacity.
- end
Date StringRange - The date and time at which the Capacity Block 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 (
YYYY-MM-DDTHH:MM:SSZ
) - start
Date StringRange - The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)
- capacity
Duration numberHours - The amount of time of the Capacity Block reservation in hours.
- instance
Count number - The number of instances for which to reserve capacity.
- instance
Type string - The instance type for which to reserve capacity.
- end
Date stringRange - The date and time at which the Capacity Block 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 (
YYYY-MM-DDTHH:MM:SSZ
) - start
Date stringRange - The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)
- capacity_
duration_ inthours - The amount of time of the Capacity Block reservation in hours.
- instance_
count int - The number of instances for which to reserve capacity.
- instance_
type str - The instance type for which to reserve capacity.
- end_
date_ strrange - The date and time at which the Capacity Block 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 (
YYYY-MM-DDTHH:MM:SSZ
) - start_
date_ strrange - The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)
- capacity
Duration NumberHours - The amount of time of the Capacity Block reservation in hours.
- instance
Count Number - The number of instances for which to reserve capacity.
- instance
Type String - The instance type for which to reserve capacity.
- end
Date StringRange - The date and time at which the Capacity Block 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 (
YYYY-MM-DDTHH:MM:SSZ
) - start
Date StringRange - The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)
getCapacityBlockOffering Result
The following output properties are available:
- Availability
Zone string - The Availability Zone in which to create the Capacity Reservation.
- Capacity
Block stringOffering Id - The Capacity Block Reservation ID.
- Capacity
Duration intHours - Currency
Code string - The currency of the payment for the Capacity Block.
- End
Date stringRange - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Count int - Instance
Type string - Start
Date stringRange - Tenancy string
- Indicates the tenancy of the Capacity Reservation. Specify either
default
ordedicated
. - Upfront
Fee string - The total price to be paid up front.
- Availability
Zone string - The Availability Zone in which to create the Capacity Reservation.
- Capacity
Block stringOffering Id - The Capacity Block Reservation ID.
- Capacity
Duration intHours - Currency
Code string - The currency of the payment for the Capacity Block.
- End
Date stringRange - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Count int - Instance
Type string - Start
Date stringRange - Tenancy string
- Indicates the tenancy of the Capacity Reservation. Specify either
default
ordedicated
. - Upfront
Fee string - The total price to be paid up front.
- availability
Zone String - The Availability Zone in which to create the Capacity Reservation.
- capacity
Block StringOffering Id - The Capacity Block Reservation ID.
- capacity
Duration IntegerHours - currency
Code String - The currency of the payment for the Capacity Block.
- end
Date StringRange - id String
- The provider-assigned unique ID for this managed resource.
- instance
Count Integer - instance
Type String - start
Date StringRange - tenancy String
- Indicates the tenancy of the Capacity Reservation. Specify either
default
ordedicated
. - upfront
Fee String - The total price to be paid up front.
- availability
Zone string - The Availability Zone in which to create the Capacity Reservation.
- capacity
Block stringOffering Id - The Capacity Block Reservation ID.
- capacity
Duration numberHours - currency
Code string - The currency of the payment for the Capacity Block.
- end
Date stringRange - id string
- The provider-assigned unique ID for this managed resource.
- instance
Count number - instance
Type string - start
Date stringRange - tenancy string
- Indicates the tenancy of the Capacity Reservation. Specify either
default
ordedicated
. - upfront
Fee string - The total price to be paid up front.
- availability_
zone str - The Availability Zone in which to create the Capacity Reservation.
- capacity_
block_ stroffering_ id - The Capacity Block Reservation ID.
- capacity_
duration_ inthours - currency_
code str - The currency of the payment for the Capacity Block.
- end_
date_ strrange - id str
- The provider-assigned unique ID for this managed resource.
- instance_
count int - instance_
type str - start_
date_ strrange - tenancy str
- Indicates the tenancy of the Capacity Reservation. Specify either
default
ordedicated
. - upfront_
fee str - The total price to be paid up front.
- availability
Zone String - The Availability Zone in which to create the Capacity Reservation.
- capacity
Block StringOffering Id - The Capacity Block Reservation ID.
- capacity
Duration NumberHours - currency
Code String - The currency of the payment for the Capacity Block.
- end
Date StringRange - id String
- The provider-assigned unique ID for this managed resource.
- instance
Count Number - instance
Type String - start
Date StringRange - tenancy String
- Indicates the tenancy of the Capacity Reservation. Specify either
default
ordedicated
. - upfront
Fee String - The total price to be paid up front.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi