View a markdown version of this page

FailoverVolumes - Amazon Elastic Compute Cloud

FailoverVolumes

Initiates a failover for a single Multi-Availability Zone (Multi-AZ) EBS volume, or fails over all Multi-AZ volumes that are attached to an instance and have their active replica in the instance's Availability Zone. During a failover, EBS promotes the standby replica to the active replica. After the failover, the volume's active and standby Availability Zones are swapped.

Specify either a VolumeId or an InstanceId:

  • VolumeId: Fails over the specified volume.

  • InstanceId: Fails over all Multi-AZ volumes that are attached to the instance and have their active replica in the instance's Availability Zone. The following attached volumes are not failed over:

    • Volumes that are not Multi-AZ volumes.

    • Multi-AZ volumes whose standby replica is in the instance's Availability Zone.

    When you specify InstanceId, all of the volumes fail over together, and the failover is crash-consistent across all of the volumes. The failover is atomic: either all of the volumes fail over, or none of them do.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

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.

Type: Boolean

Required: No

InstanceId

The ID of the instance. The instance must be in the Availability Zone specified by SourceActiveAvailabilityZone or SourceActiveAvailabilityZoneId. EBS fails over all Multi-AZ volumes that are attached to the instance and have their active replica in the specified Availability Zone.

Either VolumeId or InstanceId must be specified, but not both.

Type: String

Required: No

SourceActiveAvailabilityZone

The name of the Availability Zone that the volume's active replica is in, or that the instance is in. For example, us-east-1a.

Either SourceActiveAvailabilityZone or SourceActiveAvailabilityZoneId must be specified, but not both.

Type: String

Required: No

SourceActiveAvailabilityZoneId

The ID of the Availability Zone that the volume's active replica is in, or that the instance is in. For example, use1-az1.

Either SourceActiveAvailabilityZone or SourceActiveAvailabilityZoneId must be specified, but not both.

Type: String

Required: No

VolumeId

The ID of the Multi-AZ volume to fail over. The Multi-AZ volume's active replica must be in the Availability Zone specified by SourceActiveAvailabilityZone or SourceActiveAvailabilityZoneId.

Either VolumeId or InstanceId must be specified, but not both.

Type: String

Required: No

Response Elements

The following elements are returned by the service.

requestId

The ID of the request.

Type: String

volumeFailoverSet

The failover details for each volume that was failed over, including its volume ID and the Availability Zones that it failed over from and to.

Type: Array of VolumeFailoverInfo objects

Array Members: Minimum number of 0 items. Maximum number of 64 items.

Errors

For information about the errors that are common to all actions, see Common Error Types.

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: