| 1 | |||
| 2 | package Paws::EC2::DetachVolume; | ||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | has Device => (is => 'ro', isa => 'Str'); | |
| 5 | 1 | has DryRun => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'dryRun' ); | |
| 6 | 1 | has Force => (is => 'ro', isa => 'Bool'); | |
| 7 | 1 | has InstanceId => (is => 'ro', isa => 'Str'); | |
| 8 | 1 | has VolumeId => (is => 'ro', isa => 'Str', required => 1); | |
| 9 | |||
| 10 | 1 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 1 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'DetachVolume'); | |
| 13 | 1 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::VolumeAttachment'); | |
| 14 | 1 | class_has _result_key => (isa => 'Str', is => 'ro'); | |
| 15 | 1 | 1; | |
| 16 | |||
| 17 | ### main pod documentation begin ### | ||
| 18 | |||
| 19 | =head1 NAME | ||
| 20 | |||
| 21 | Paws::EC2::DetachVolume - Arguments for method DetachVolume on L<Paws::EC2> | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | This class represents the parameters used for calling the method DetachVolume on the | ||
| 26 | L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class | ||
| 27 | as arguments to method DetachVolume. | ||
| 28 | |||
| 29 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DetachVolume. | ||
| 30 | |||
| 31 | =head1 SYNOPSIS | ||
| 32 | |||
| 33 | my $ec2 = Paws->service('EC2'); | ||
| 34 | # To detach a volume from an instance | ||
| 35 | # This example detaches the volume (``vol-049df61146c4d7901``) from the instance | ||
| 36 | # it is attached to. | ||
| 37 | my $VolumeAttachment = | ||
| 38 | $ec2->DetachVolume( 'VolumeId' => 'vol-1234567890abcdef0' ); | ||
| 39 | |||
| 40 | # Results: | ||
| 41 | my $AttachTime = $VolumeAttachment->AttachTime; | ||
| 42 | my $Device = $VolumeAttachment->Device; | ||
| 43 | my $InstanceId = $VolumeAttachment->InstanceId; | ||
| 44 | my $State = $VolumeAttachment->State; | ||
| 45 | my $VolumeId = $VolumeAttachment->VolumeId; | ||
| 46 | |||
| 47 | # Returns a L<Paws::EC2::VolumeAttachment> object. | ||
| 48 | |||
| 49 | 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. | ||
| 50 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/DetachVolume> | ||
| 51 | |||
| 52 | =head1 ATTRIBUTES | ||
| 53 | |||
| 54 | |||
| 55 | =head2 Device => Str | ||
| 56 | |||
| 57 | The device name. | ||
| 58 | |||
| 59 | |||
| 60 | |||
| 61 | =head2 DryRun => Bool | ||
| 62 | |||
| 63 | Checks whether you have the required permissions for the action, | ||
| 64 | without actually making the request, and provides an error response. If | ||
| 65 | you have the required permissions, the error response is | ||
| 66 | C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>. | ||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | =head2 Force => Bool | ||
| 71 | |||
| 72 | Forces detachment if the previous detachment attempt did not occur | ||
| 73 | cleanly (for example, logging into an instance, unmounting the volume, | ||
| 74 | and detaching normally). This option can lead to data loss or a | ||
| 75 | corrupted file system. Use this option only as a last resort to detach | ||
| 76 | a volume from a failed instance. The instance won't have an opportunity | ||
| 77 | to flush file system caches or file system metadata. If you use this | ||
| 78 | option, you must perform file system check and repair procedures. | ||
| 79 | |||
| 80 | |||
| 81 | |||
| 82 | =head2 InstanceId => Str | ||
| 83 | |||
| 84 | The ID of the instance. If you are detaching a Multi-Attach enabled | ||
| 85 | volume, you must specify an instance ID. | ||
| 86 | |||
| 87 | |||
| 88 | |||
| 89 | =head2 B<REQUIRED> VolumeId => Str | ||
| 90 | |||
| 91 | The ID of the volume. | ||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | =head1 SEE ALSO | ||
| 97 | |||
| 98 | This class forms part of L<Paws>, documenting arguments for method DetachVolume in L<Paws::EC2> | ||
| 99 | |||
| 100 | =head1 BUGS and CONTRIBUTIONS | ||
| 101 | |||
| 102 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 103 | |||
| 104 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 105 | |||
| 106 | =cut | ||
| 107 | |||