com.amazonaws.services.s3.model

## クラス DeleteVersionRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.s3.model.DeleteVersionRequest

-     public class DeleteVersionRequest
      extends AmazonWebServiceRequest

  Provides options for deleting a specific version of an object in the specified bucket. Once deleted, there is no method to restore or undelete an object version. This is the only way to permanently delete object versions that are protected by versioning.

  Because deleting an object version is permanent and irreversible, it is a privileged operation that only the owner of the bucket containing the version may perform.

  An owner can only delete a version of an object if the owner has enabled versioning for their bucket. For more information about enabling versioning for a bucket, see `AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)`.

  Note: When attempting to delete an object that does not exist, Amazon S3 returns a success message, not an error message.

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `DeleteVersionRequest(java.lang.String bucketName, java.lang.String key, java.lang.String versionId)` Constructs a new `DeleteVersionRequest` object, ready to be executed to delete the version identified by the specified version ID, in the specified bucket and key.
    `DeleteVersionRequest(java.lang.String bucketName, java.lang.String key, java.lang.String versionId, MultiFactorAuthentication mfa)` Constructs a new `DeleteVersionRequest` object, ready to be executed to delete the version identified by the specified version ID, in the specified bucket and key, with the specified Multi-Factor Authentication (MFA) information.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `java.lang.String` | `getBucketName()` Gets the name of the Amazon S3 bucket containing the version to delete.
    `java.lang.String` | `getKey()` Gets the key of the version to delete.
    `MultiFactorAuthentication` | `getMfa()` Gets the optional Multi-Factor Authentication information included with this request.
    `java.lang.String` | `getVersionId()` Gets the version ID uniquely identifying which version of the object to delete.
    `void` | `setBucketName(java.lang.String bucketName)` Sets the name of the Amazon S3 bucket containing the version to delete.
    `void` | `setKey(java.lang.String key)` Sets the key of the version to delete.
    `void` | `setMfa(MultiFactorAuthentication mfa)` Sets the optional Multi-Factor Authentication information to include with this request.
    `void` | `setVersionId(java.lang.String versionId)` Sets the version ID uniquely identifying which version of the object to delete.
    `DeleteVersionRequest` | `withBucketName(java.lang.String bucketName)` Sets the name of the Amazon S3 bucket containing the version to delete.
    `DeleteVersionRequest` | `withKey(java.lang.String key)` Sets the key of the version to delete Returns this `DeleteVersionRequest`, enabling additional method calls to be chained together.
    `DeleteVersionRequest` | `withMfa(MultiFactorAuthentication mfa)` Sets the optional Multi-Factor Authentication information to include with this request Returns this `DeleteVersionRequest`, enabling additional method calls to be chained together.
    `DeleteVersionRequest` | `withVersionId(java.lang.String versionId)` Sets the version ID uniquely identifying which version of the object to delete Returns this `DeleteVersionRequest`, enabling additional method calls to be chained together.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### DeleteVersionRequest

          public DeleteVersionRequest(java.lang.String bucketName,
                              java.lang.String key,
                              java.lang.String versionId)

      Constructs a new `DeleteVersionRequest` object, ready to be executed to delete the version identified by the specified version ID, in the specified bucket and key.
      パラメータ:
        `bucketName` - The name of the bucket containing the version to delete.
        `key` - The key of the object version to delete.
        `versionId` - The version ID identifying the version to delete.
      関連項目:
        `DeleteVersionRequest(String, String, String, MultiFactorAuthentication)`

    - #### DeleteVersionRequest

          public DeleteVersionRequest(java.lang.String bucketName,
                              java.lang.String key,
                              java.lang.String versionId,
                              MultiFactorAuthentication mfa)

      Constructs a new `DeleteVersionRequest` object, ready to be executed to delete the version identified by the specified version ID, in the specified bucket and key, with the specified Multi-Factor Authentication (MFA) information. Multi-Factor Authentication is required when the MFA Delete option has been enabled for a bucket's versioning configuration. See `BucketVersioningConfiguration` for more details on MFA Delete.
      パラメータ:
        `bucketName` - The name of the bucket containing the version to delete.
        `key` - The key of the object version to delete.
        `versionId` - The version ID uniquely identifying the version to delete.
        `mfa` - The Multi-Factor Authentication information to include in this request.
      関連項目:
        `DeleteVersionRequest(String, String, String)`

  - ### メソッドの詳細

    - #### getBucketName

          public java.lang.String getBucketName()

      Gets the name of the Amazon S3 bucket containing the version to delete.
      戻り値:
        The name of the Amazon S3 bucket containing the version to delete.
      関連項目:
        `setBucketName(String)`, `withBucketName(String)`

    - #### setBucketName

          public void setBucketName(java.lang.String bucketName)

      Sets the name of the Amazon S3 bucket containing the version to delete.
      パラメータ:
        `bucketName` - The name of the Amazon S3 bucket containing the version to delete.
      関連項目:
        `getBucketName()`, `withBucketName(String)`

    - #### withBucketName

          public DeleteVersionRequest withBucketName(java.lang.String bucketName)

      Sets the name of the Amazon S3 bucket containing the version to delete. Returns this `DeleteVersionRequest`, enabling additional method calls to be chained together.
      パラメータ:
        `bucketName` - The name of the Amazon S3 bucket containing the version to delete.
      戻り値:
        The updated `DeleteVersionRequest` object, enabling additional method calls to be chained together.
      関連項目:
        `getBucketName()`, `setBucketName(String)`

    - #### getKey

          public java.lang.String getKey()

      Gets the key of the version to delete.
      戻り値:
        The key of the version to delete.
      関連項目:
        `setKey(String)`, `withKey(String)`

    - #### setKey

          public void setKey(java.lang.String key)

      Sets the key of the version to delete.
      パラメータ:
        `key` - The key of the version to delete.
      関連項目:
        `getKey()`, `withKey(String)`

    - #### withKey

          public DeleteVersionRequest withKey(java.lang.String key)

      Sets the key of the version to delete Returns this `DeleteVersionRequest`, enabling additional method calls to be chained together.
      パラメータ:
        `key` - The key of the version to delete.
      戻り値:
        This `DeleteVersionRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getKey()`, `setKey(String)`

    - #### getVersionId

          public java.lang.String getVersionId()

      Gets the version ID uniquely identifying which version of the object to delete.
      戻り値:
        The version ID uniquely identifying which version of the object to delete.
      関連項目:
        `setVersionId(String)`, `withVersionId(String)`

    - #### setVersionId

          public void setVersionId(java.lang.String versionId)

      Sets the version ID uniquely identifying which version of the object to delete.
      パラメータ:
        `versionId` - The version ID uniquely identifying which version of the object to delete.
      関連項目:
        `getVersionId()`, `withVersionId(String)`

    - #### withVersionId

          public DeleteVersionRequest withVersionId(java.lang.String versionId)

      Sets the version ID uniquely identifying which version of the object to delete Returns this `DeleteVersionRequest`, enabling additional method calls to be chained together.
      パラメータ:
        `versionId` - The version ID uniquely identifying which version of the object to delete.
      戻り値:
        This `DeleteVersionRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getVersionId()`, `setVersionId(String)`

    - #### getMfa

          public MultiFactorAuthentication getMfa()

      Gets the optional Multi-Factor Authentication information included with this request.

      Multi-Factor Authentication is required when deleting an object version from a bucket which has MFADelete enabled in its bucket versioning configuration.

      See `BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)` for more information on MFADelete.

      戻り値:
        The optional Multi-Factor Authentication information included with this request.
      関連項目:
        `setMfa(MultiFactorAuthentication)`, `withMfa(MultiFactorAuthentication)`

    - #### setMfa

          public void setMfa(MultiFactorAuthentication mfa)

      Sets the optional Multi-Factor Authentication information to include with this request.

      Multi-Factor Authentication is required when deleting an object version from a bucket which has MFADelete enabled in its bucket versioning configuration.

      See `BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)` for more information on MFADelete.

      パラメータ:
        `mfa` - The optional Multi-Factor Authentication information to include with this request.
      関連項目:
        `getMfa()`, `withMfa(MultiFactorAuthentication)`

    - #### withMfa

          public DeleteVersionRequest withMfa(MultiFactorAuthentication mfa)

      Sets the optional Multi-Factor Authentication information to include with this request Returns this `DeleteVersionRequest`, enabling additional method calls to be chained together.

      Multi-Factor Authentication is required when deleting an object version from a bucket which has MFADelete enabled in its bucket versioning configuration

      See `BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)` for more information on MFADelete.

      パラメータ:
        `mfa` - The optional Multi-Factor Authentication information to include with this request.
      戻り値:
        This `DeleteVersionRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getMfa()`, `withMfa(MultiFactorAuthentication)`