GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Paws::EC2::RequestSpotFleet(3) User Contributed Perl Documentation Paws::EC2::RequestSpotFleet(3)

Paws::EC2::RequestSpotFleet - Arguments for method RequestSpotFleet on Paws::EC2

This class represents the parameters used for calling the method RequestSpotFleet on the Amazon Elastic Compute Cloud service. Use the attributes of this class as arguments to method RequestSpotFleet.

You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to RequestSpotFleet.

    my $ec2 = Paws->service('EC2');
 # To request a Spot fleet in the subnet with the lowest price
 # This example creates a Spot fleet request with two launch specifications that
 # differ only by subnet. The Spot fleet launches the instances in the specified
 # subnet with the lowest price. If the instances are launched in a default VPC,
 # they receive a public IP address by default. If the instances are launched in
 # a nondefault VPC, they do not receive a public IP address by default. Note
 # that you can't specify different subnets from the same Availability Zone in a
 # Spot fleet request.
    my $RequestSpotFleetResponse = $ec2->RequestSpotFleet(
      'SpotFleetRequestConfig' => {
        'IamFleetRole' => 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
        'LaunchSpecifications' => [
          {
            'IamInstanceProfile' => {
              'Arn' => 'arn:aws:iam::123456789012:instance-profile/my-iam-role'
            },
            'ImageId'        => 'ami-1a2b3c4d',
            'InstanceType'   => 'm3.medium',
            'KeyName'        => 'my-key-pair',
            'SecurityGroups' => [
              {
                'GroupId' => 'sg-1a2b3c4d'
              }
            ],
            'SubnetId' => 'subnet-1a2b3c4d, subnet-3c4d5e6f'
          }
        ],
        'SpotPrice'      => 0.04,
        'TargetCapacity' => 2
      }
    );
    # Results:
    my $SpotFleetRequestId = $RequestSpotFleetResponse->SpotFleetRequestId;

# Returns a Paws::EC2::RequestSpotFleetResponse object. # To request a Spot fleet in the Availability Zone with the lowest price # This example creates a Spot fleet request with two launch specifications that # differ only by Availability Zone. The Spot fleet launches the instances in the # specified Availability Zone with the lowest price. If your account supports # EC2-VPC only, Amazon EC2 launches the Spot instances in the default subnet of # the Availability Zone. If your account supports EC2-Classic, Amazon EC2 # launches the instances in EC2-Classic in the Availability Zone.
my $RequestSpotFleetResponse = $ec2->RequestSpotFleet(
'SpotFleetRequestConfig' => {
'IamFleetRole' => 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
'LaunchSpecifications' => [

          {
            'IamInstanceProfile' => {
              'Arn' => 'arn:aws:iam::123456789012:instance-profile/my-iam-role'
            },
            'ImageId'      => 'ami-1a2b3c4d',
            'InstanceType' => 'm3.medium',
            'KeyName'      => 'my-key-pair',
            'Placement'    => {
              'AvailabilityZone' => 'us-west-2a, us-west-2b'
            },
            'SecurityGroups' => [
              {
                'GroupId' => 'sg-1a2b3c4d'
              }
            ]
          }
        ],
        'SpotPrice'      => 0.04,
        'TargetCapacity' => 2
      }
    );
    # Results:
    my $SpotFleetRequestId = $RequestSpotFleetResponse->SpotFleetRequestId;
   # Returns a L<Paws::EC2::RequestSpotFleetResponse> object.
   # To launch Spot instances in a subnet and assign them public IP addresses
   # This example assigns public addresses to instances launched in a nondefault
   # VPC. Note that when you specify a network interface, you must include the
   # subnet ID and security group ID using the network interface.
    my $RequestSpotFleetResponse = $ec2->RequestSpotFleet(
      'SpotFleetRequestConfig' => {
        'IamFleetRole' => 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
        'LaunchSpecifications' => [
          {
            'IamInstanceProfile' => {
              'Arn' => 'arn:aws:iam::880185128111:instance-profile/my-iam-role'
            },
            'ImageId'           => 'ami-1a2b3c4d',
            'InstanceType'      => 'm3.medium',
            'KeyName'           => 'my-key-pair',
            'NetworkInterfaces' => [
              {
                'AssociatePublicIpAddress' => 1,
                'DeviceIndex'              => 0,
                'Groups'                   => ['sg-1a2b3c4d'],
                'SubnetId'                 => 'subnet-1a2b3c4d'
              }
            ]
          }
        ],
        'SpotPrice'      => 0.04,
        'TargetCapacity' => 2
      }
    );
    # Results:
    my $SpotFleetRequestId = $RequestSpotFleetResponse->SpotFleetRequestId;

# Returns a Paws::EC2::RequestSpotFleetResponse object. # To request a Spot fleet using the diversified allocation strategy # This example creates a Spot fleet request that launches 30 instances using the # diversified allocation strategy. The launch specifications differ by instance # type. The Spot fleet distributes the instances across the launch # specifications such that there are 10 instances of each type.
my $RequestSpotFleetResponse = $ec2->RequestSpotFleet(
'SpotFleetRequestConfig' => {
'AllocationStrategy' => 'diversified',
'IamFleetRole' => 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
'LaunchSpecifications' => [

          {
            'ImageId'      => 'ami-1a2b3c4d',
            'InstanceType' => 'c4.2xlarge',
            'SubnetId'     => 'subnet-1a2b3c4d'
          },
          {
            'ImageId'      => 'ami-1a2b3c4d',
            'InstanceType' => 'm3.2xlarge',
            'SubnetId'     => 'subnet-1a2b3c4d'
          },
          {
            'ImageId'      => 'ami-1a2b3c4d',
            'InstanceType' => 'r3.2xlarge',
            'SubnetId'     => 'subnet-1a2b3c4d'
          }
        ],
        'SpotPrice'      => 0.70,
        'TargetCapacity' => 30
      }
    );
    # Results:
    my $SpotFleetRequestId = $RequestSpotFleetResponse->SpotFleetRequestId;
    # Returns a L<Paws::EC2::RequestSpotFleetResponse> object.

Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see <https://docs.aws.amazon.com/goto/WebAPI/ec2/RequestSpotFleet>

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".

REQUIRED SpotFleetRequestConfig => Paws::EC2::SpotFleetRequestConfigData

The configuration for the Spot Fleet request.

This class forms part of Paws, documenting arguments for method RequestSpotFleet in Paws::EC2

The source code is located here: <https://github.com/pplu/aws-sdk-perl>

Please report bugs to: <https://github.com/pplu/aws-sdk-perl/issues>

2022-06-01 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.