Class CreateFleetRequest

    • Method Detail

      • dryRun

        public final Boolean dryRun()

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

        Returns:
        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
      • clientToken

        public final String clientToken()

        Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

        Returns:
        Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
      • spotOptions

        public final SpotOptionsRequest spotOptions()

        Describes the configuration of Spot Instances in an EC2 Fleet.

        Returns:
        Describes the configuration of Spot Instances in an EC2 Fleet.
      • onDemandOptions

        public final OnDemandOptionsRequest onDemandOptions()

        Describes the configuration of On-Demand Instances in an EC2 Fleet.

        Returns:
        Describes the configuration of On-Demand Instances in an EC2 Fleet.
      • hasLaunchTemplateConfigs

        public final boolean hasLaunchTemplateConfigs()
        For responses, this returns true if the service returned a value for the LaunchTemplateConfigs property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • launchTemplateConfigs

        public final List<FleetLaunchTemplateConfigRequest> launchTemplateConfigs()

        The configuration for the EC2 Fleet.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasLaunchTemplateConfigs() method.

        Returns:
        The configuration for the EC2 Fleet.
      • targetCapacitySpecification

        public final TargetCapacitySpecificationRequest targetCapacitySpecification()

        The number of units to request.

        Returns:
        The number of units to request.
      • terminateInstancesWithExpiration

        public final Boolean terminateInstancesWithExpiration()

        Indicates whether running instances should be terminated when the EC2 Fleet expires.

        Returns:
        Indicates whether running instances should be terminated when the EC2 Fleet expires.
      • type

        public final FleetType type()

        The fleet type. The default value is maintain.

        • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.

        • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.

        • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

        For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

        If the service returns an enum value that is not available in the current SDK version, type will return FleetType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

        Returns:
        The fleet type. The default value is maintain.

        • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.

        • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.

        • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

        For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

        See Also:
        FleetType
      • typeAsString

        public final String typeAsString()

        The fleet type. The default value is maintain.

        • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.

        • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.

        • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

        For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

        If the service returns an enum value that is not available in the current SDK version, type will return FleetType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

        Returns:
        The fleet type. The default value is maintain.

        • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.

        • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.

        • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

        For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

        See Also:
        FleetType
      • validFrom

        public final Instant validFrom()

        The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.

        Returns:
        The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
      • validUntil

        public final Instant validUntil()

        The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.

        Returns:
        The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.
      • replaceUnhealthyInstances

        public final Boolean replaceUnhealthyInstances()

        Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.

        Returns:
        Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.
      • hasTagSpecifications

        public final boolean hasTagSpecifications()
        For responses, this returns true if the service returned a value for the TagSpecifications property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • tagSpecifications

        public final List<TagSpecification> tagSpecifications()

        The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tag your resources.

        If the fleet type is instant, specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

        If the fleet type is maintain or request, specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance. To tag instances at launch, specify the tags in a launch template.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasTagSpecifications() method.

        Returns:
        The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tag your resources.

        If the fleet type is instant, specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

        If the fleet type is maintain or request, specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance. To tag instances at launch, specify the tags in a launch template.

      • context

        public final String context()

        Reserved.

        Returns:
        Reserved.
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object