1. Packages
  2. AWS Classic
  3. API Docs
  4. ec2
  5. getCapacityBlockOffering

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

aws logo

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:

    CapacityDurationHours int
    The amount of time of the Capacity Block reservation in hours.
    InstanceCount int
    The number of instances for which to reserve capacity.
    InstanceType string
    The instance type for which to reserve capacity.
    EndDateRange string
    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)
    StartDateRange string
    The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
    CapacityDurationHours int
    The amount of time of the Capacity Block reservation in hours.
    InstanceCount int
    The number of instances for which to reserve capacity.
    InstanceType string
    The instance type for which to reserve capacity.
    EndDateRange string
    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)
    StartDateRange string
    The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
    capacityDurationHours Integer
    The amount of time of the Capacity Block reservation in hours.
    instanceCount Integer
    The number of instances for which to reserve capacity.
    instanceType String
    The instance type for which to reserve capacity.
    endDateRange String
    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)
    startDateRange String
    The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
    capacityDurationHours number
    The amount of time of the Capacity Block reservation in hours.
    instanceCount number
    The number of instances for which to reserve capacity.
    instanceType string
    The instance type for which to reserve capacity.
    endDateRange string
    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)
    startDateRange string
    The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
    capacity_duration_hours int
    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_range str
    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_range str
    The date and time at which the Capacity Block Reservation starts. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
    capacityDurationHours Number
    The amount of time of the Capacity Block reservation in hours.
    instanceCount Number
    The number of instances for which to reserve capacity.
    instanceType String
    The instance type for which to reserve capacity.
    endDateRange String
    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)
    startDateRange String
    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:

    AvailabilityZone string
    The Availability Zone in which to create the Capacity Reservation.
    CapacityBlockOfferingId string
    The Capacity Block Reservation ID.
    CapacityDurationHours int
    CurrencyCode string
    The currency of the payment for the Capacity Block.
    EndDateRange string
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceCount int
    InstanceType string
    StartDateRange string
    Tenancy string
    Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.
    UpfrontFee string
    The total price to be paid up front.
    AvailabilityZone string
    The Availability Zone in which to create the Capacity Reservation.
    CapacityBlockOfferingId string
    The Capacity Block Reservation ID.
    CapacityDurationHours int
    CurrencyCode string
    The currency of the payment for the Capacity Block.
    EndDateRange string
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceCount int
    InstanceType string
    StartDateRange string
    Tenancy string
    Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.
    UpfrontFee string
    The total price to be paid up front.
    availabilityZone String
    The Availability Zone in which to create the Capacity Reservation.
    capacityBlockOfferingId String
    The Capacity Block Reservation ID.
    capacityDurationHours Integer
    currencyCode String
    The currency of the payment for the Capacity Block.
    endDateRange String
    id String
    The provider-assigned unique ID for this managed resource.
    instanceCount Integer
    instanceType String
    startDateRange String
    tenancy String
    Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.
    upfrontFee String
    The total price to be paid up front.
    availabilityZone string
    The Availability Zone in which to create the Capacity Reservation.
    capacityBlockOfferingId string
    The Capacity Block Reservation ID.
    capacityDurationHours number
    currencyCode string
    The currency of the payment for the Capacity Block.
    endDateRange string
    id string
    The provider-assigned unique ID for this managed resource.
    instanceCount number
    instanceType string
    startDateRange string
    tenancy string
    Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.
    upfrontFee string
    The total price to be paid up front.
    availability_zone str
    The Availability Zone in which to create the Capacity Reservation.
    capacity_block_offering_id str
    The Capacity Block Reservation ID.
    capacity_duration_hours int
    currency_code str
    The currency of the payment for the Capacity Block.
    end_date_range str
    id str
    The provider-assigned unique ID for this managed resource.
    instance_count int
    instance_type str
    start_date_range str
    tenancy str
    Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.
    upfront_fee str
    The total price to be paid up front.
    availabilityZone String
    The Availability Zone in which to create the Capacity Reservation.
    capacityBlockOfferingId String
    The Capacity Block Reservation ID.
    capacityDurationHours Number
    currencyCode String
    The currency of the payment for the Capacity Block.
    endDateRange String
    id String
    The provider-assigned unique ID for this managed resource.
    instanceCount Number
    instanceType String
    startDateRange String
    tenancy String
    Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.
    upfrontFee 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.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi