554 lines
36 KiB
C
554 lines
36 KiB
C
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#pragma once
|
|||
|
|
#include <aws/s3/S3_EXPORTS.h>
|
|||
|
|
#include <aws/s3/S3Request.h>
|
|||
|
|
#include <aws/core/utils/memory/stl/AWSString.h>
|
|||
|
|
#include <aws/core/utils/DateTime.h>
|
|||
|
|
#include <aws/s3/model/RequestPayer.h>
|
|||
|
|
#include <aws/s3/model/ChecksumMode.h>
|
|||
|
|
#include <aws/core/utils/memory/stl/AWSMap.h>
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
namespace Aws
|
|||
|
|
{
|
|||
|
|
namespace Http
|
|||
|
|
{
|
|||
|
|
class URI;
|
|||
|
|
} //namespace Http
|
|||
|
|
namespace S3
|
|||
|
|
{
|
|||
|
|
namespace Model
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
*/
|
|||
|
|
class GetObjectRequest : public S3Request
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
AWS_S3_API GetObjectRequest();
|
|||
|
|
|
|||
|
|
// Service request name is the Operation name which will send this request out,
|
|||
|
|
// each operation should has unique request name, so that we can get operation's name from this request.
|
|||
|
|
// Note: this is not true for response, multiple operations may have the same response name,
|
|||
|
|
// so we can not get operation's name from response.
|
|||
|
|
inline virtual const char* GetServiceRequestName() const override { return "GetObject"; }
|
|||
|
|
|
|||
|
|
AWS_S3_API Aws::String SerializePayload() const override;
|
|||
|
|
|
|||
|
|
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
|
|||
|
|
|
|||
|
|
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
|
|||
|
|
|
|||
|
|
AWS_S3_API bool ShouldValidateResponseChecksum() const override;
|
|||
|
|
|
|||
|
|
AWS_S3_API Aws::Vector<Aws::String> GetResponseChecksumAlgorithmNames() const override;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Helper function to collect parameters (configurable and static hardcoded) required for endpoint computation.
|
|||
|
|
*/
|
|||
|
|
AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>The bucket name containing the object. </p> <p> <b>Directory buckets</b> -
|
|||
|
|
* When you use this operation with a directory bucket, you must use
|
|||
|
|
* virtual-hosted-style requests in the format <code>
|
|||
|
|
* <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>.
|
|||
|
|
* Path-style requests are not supported. Directory bucket names must be unique in
|
|||
|
|
* the chosen Availability Zone. Bucket names must follow the format <code>
|
|||
|
|
* <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code>
|
|||
|
|
* <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about
|
|||
|
|
* bucket naming restrictions, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory
|
|||
|
|
* bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p> <p> <b>Access
|
|||
|
|
* points</b> - When you use this action with an access point, you must provide the
|
|||
|
|
* alias of the access point in place of the bucket name or specify the access
|
|||
|
|
* point ARN. When using the access point ARN, you must direct requests to the
|
|||
|
|
* access point hostname. The access point hostname takes the form
|
|||
|
|
* <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com.
|
|||
|
|
* When using this action with an access point through the Amazon Web Services
|
|||
|
|
* SDKs, you provide the access point ARN in place of the bucket name. For more
|
|||
|
|
* information about access point ARNs, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using
|
|||
|
|
* access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p> <b>Object Lambda
|
|||
|
|
* access points</b> - When you use this action with an Object Lambda access point,
|
|||
|
|
* you must direct requests to the Object Lambda access point hostname. The Object
|
|||
|
|
* Lambda access point hostname takes the form
|
|||
|
|
* <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p>
|
|||
|
|
* <p>Access points and Object Lambda access points are not supported by
|
|||
|
|
* directory buckets.</p> <p> <b>S3 on Outposts</b> - When you use this
|
|||
|
|
* action with Amazon S3 on Outposts, you must direct requests to the S3 on
|
|||
|
|
* Outposts hostname. The S3 on Outposts hostname takes the form <code>
|
|||
|
|
* <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>.
|
|||
|
|
* When you use this action with S3 on Outposts through the Amazon Web Services
|
|||
|
|
* SDKs, you provide the Outposts access point ARN in place of the bucket name. For
|
|||
|
|
* more information about S3 on Outposts ARNs, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What
|
|||
|
|
* is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetBucket() const{ return m_bucket; }
|
|||
|
|
inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
|
|||
|
|
inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
|
|||
|
|
inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
|
|||
|
|
inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Return the object only if its entity tag (ETag) is the same as the one
|
|||
|
|
* specified in this header; otherwise, return a <code>412 Precondition
|
|||
|
|
* Failed</code> error.</p> <p>If both of the <code>If-Match</code> and
|
|||
|
|
* <code>If-Unmodified-Since</code> headers are present in the request as follows:
|
|||
|
|
* <code>If-Match</code> condition evaluates to <code>true</code>, and;
|
|||
|
|
* <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;
|
|||
|
|
* then, S3 returns <code>200 OK</code> and the data requested. </p> <p>For more
|
|||
|
|
* information about conditional requests, see <a
|
|||
|
|
* href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetIfMatch() const{ return m_ifMatch; }
|
|||
|
|
inline bool IfMatchHasBeenSet() const { return m_ifMatchHasBeenSet; }
|
|||
|
|
inline void SetIfMatch(const Aws::String& value) { m_ifMatchHasBeenSet = true; m_ifMatch = value; }
|
|||
|
|
inline void SetIfMatch(Aws::String&& value) { m_ifMatchHasBeenSet = true; m_ifMatch = std::move(value); }
|
|||
|
|
inline void SetIfMatch(const char* value) { m_ifMatchHasBeenSet = true; m_ifMatch.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithIfMatch(const Aws::String& value) { SetIfMatch(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithIfMatch(Aws::String&& value) { SetIfMatch(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithIfMatch(const char* value) { SetIfMatch(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Return the object only if it has been modified since the specified time;
|
|||
|
|
* otherwise, return a <code>304 Not Modified</code> error.</p> <p>If both of the
|
|||
|
|
* <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are
|
|||
|
|
* present in the request as follows:<code> If-None-Match</code> condition
|
|||
|
|
* evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition
|
|||
|
|
* evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code>
|
|||
|
|
* status code.</p> <p>For more information about conditional requests, see <a
|
|||
|
|
* href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::Utils::DateTime& GetIfModifiedSince() const{ return m_ifModifiedSince; }
|
|||
|
|
inline bool IfModifiedSinceHasBeenSet() const { return m_ifModifiedSinceHasBeenSet; }
|
|||
|
|
inline void SetIfModifiedSince(const Aws::Utils::DateTime& value) { m_ifModifiedSinceHasBeenSet = true; m_ifModifiedSince = value; }
|
|||
|
|
inline void SetIfModifiedSince(Aws::Utils::DateTime&& value) { m_ifModifiedSinceHasBeenSet = true; m_ifModifiedSince = std::move(value); }
|
|||
|
|
inline GetObjectRequest& WithIfModifiedSince(const Aws::Utils::DateTime& value) { SetIfModifiedSince(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithIfModifiedSince(Aws::Utils::DateTime&& value) { SetIfModifiedSince(std::move(value)); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Return the object only if its entity tag (ETag) is different from the one
|
|||
|
|
* specified in this header; otherwise, return a <code>304 Not Modified</code>
|
|||
|
|
* error.</p> <p>If both of the <code>If-None-Match</code> and
|
|||
|
|
* <code>If-Modified-Since</code> headers are present in the request as
|
|||
|
|
* follows:<code> If-None-Match</code> condition evaluates to <code>false</code>,
|
|||
|
|
* and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>;
|
|||
|
|
* then, S3 returns <code>304 Not Modified</code> HTTP status code.</p> <p>For more
|
|||
|
|
* information about conditional requests, see <a
|
|||
|
|
* href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetIfNoneMatch() const{ return m_ifNoneMatch; }
|
|||
|
|
inline bool IfNoneMatchHasBeenSet() const { return m_ifNoneMatchHasBeenSet; }
|
|||
|
|
inline void SetIfNoneMatch(const Aws::String& value) { m_ifNoneMatchHasBeenSet = true; m_ifNoneMatch = value; }
|
|||
|
|
inline void SetIfNoneMatch(Aws::String&& value) { m_ifNoneMatchHasBeenSet = true; m_ifNoneMatch = std::move(value); }
|
|||
|
|
inline void SetIfNoneMatch(const char* value) { m_ifNoneMatchHasBeenSet = true; m_ifNoneMatch.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithIfNoneMatch(const Aws::String& value) { SetIfNoneMatch(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithIfNoneMatch(Aws::String&& value) { SetIfNoneMatch(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithIfNoneMatch(const char* value) { SetIfNoneMatch(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Return the object only if it has not been modified since the specified time;
|
|||
|
|
* otherwise, return a <code>412 Precondition Failed</code> error.</p> <p>If both
|
|||
|
|
* of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are
|
|||
|
|
* present in the request as follows: <code>If-Match</code> condition evaluates to
|
|||
|
|
* <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to
|
|||
|
|
* <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.
|
|||
|
|
* </p> <p>For more information about conditional requests, see <a
|
|||
|
|
* href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::Utils::DateTime& GetIfUnmodifiedSince() const{ return m_ifUnmodifiedSince; }
|
|||
|
|
inline bool IfUnmodifiedSinceHasBeenSet() const { return m_ifUnmodifiedSinceHasBeenSet; }
|
|||
|
|
inline void SetIfUnmodifiedSince(const Aws::Utils::DateTime& value) { m_ifUnmodifiedSinceHasBeenSet = true; m_ifUnmodifiedSince = value; }
|
|||
|
|
inline void SetIfUnmodifiedSince(Aws::Utils::DateTime&& value) { m_ifUnmodifiedSinceHasBeenSet = true; m_ifUnmodifiedSince = std::move(value); }
|
|||
|
|
inline GetObjectRequest& WithIfUnmodifiedSince(const Aws::Utils::DateTime& value) { SetIfUnmodifiedSince(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithIfUnmodifiedSince(Aws::Utils::DateTime&& value) { SetIfUnmodifiedSince(std::move(value)); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Key of the object to get.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetKey() const{ return m_key; }
|
|||
|
|
inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
|
|||
|
|
inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
|
|||
|
|
inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
|
|||
|
|
inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithKey(const char* value) { SetKey(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Downloads the specified byte range of an object. For more information about
|
|||
|
|
* the HTTP Range header, see <a
|
|||
|
|
* href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p>
|
|||
|
|
* <p>Amazon S3 doesn't support retrieving multiple ranges of data per
|
|||
|
|
* <code>GET</code> request.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetRange() const{ return m_range; }
|
|||
|
|
inline bool RangeHasBeenSet() const { return m_rangeHasBeenSet; }
|
|||
|
|
inline void SetRange(const Aws::String& value) { m_rangeHasBeenSet = true; m_range = value; }
|
|||
|
|
inline void SetRange(Aws::String&& value) { m_rangeHasBeenSet = true; m_range = std::move(value); }
|
|||
|
|
inline void SetRange(const char* value) { m_rangeHasBeenSet = true; m_range.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithRange(const Aws::String& value) { SetRange(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithRange(Aws::String&& value) { SetRange(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithRange(const char* value) { SetRange(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Sets the <code>Cache-Control</code> header of the response.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetResponseCacheControl() const{ return m_responseCacheControl; }
|
|||
|
|
inline bool ResponseCacheControlHasBeenSet() const { return m_responseCacheControlHasBeenSet; }
|
|||
|
|
inline void SetResponseCacheControl(const Aws::String& value) { m_responseCacheControlHasBeenSet = true; m_responseCacheControl = value; }
|
|||
|
|
inline void SetResponseCacheControl(Aws::String&& value) { m_responseCacheControlHasBeenSet = true; m_responseCacheControl = std::move(value); }
|
|||
|
|
inline void SetResponseCacheControl(const char* value) { m_responseCacheControlHasBeenSet = true; m_responseCacheControl.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithResponseCacheControl(const Aws::String& value) { SetResponseCacheControl(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseCacheControl(Aws::String&& value) { SetResponseCacheControl(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseCacheControl(const char* value) { SetResponseCacheControl(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Sets the <code>Content-Disposition</code> header of the response.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetResponseContentDisposition() const{ return m_responseContentDisposition; }
|
|||
|
|
inline bool ResponseContentDispositionHasBeenSet() const { return m_responseContentDispositionHasBeenSet; }
|
|||
|
|
inline void SetResponseContentDisposition(const Aws::String& value) { m_responseContentDispositionHasBeenSet = true; m_responseContentDisposition = value; }
|
|||
|
|
inline void SetResponseContentDisposition(Aws::String&& value) { m_responseContentDispositionHasBeenSet = true; m_responseContentDisposition = std::move(value); }
|
|||
|
|
inline void SetResponseContentDisposition(const char* value) { m_responseContentDispositionHasBeenSet = true; m_responseContentDisposition.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithResponseContentDisposition(const Aws::String& value) { SetResponseContentDisposition(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseContentDisposition(Aws::String&& value) { SetResponseContentDisposition(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseContentDisposition(const char* value) { SetResponseContentDisposition(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Sets the <code>Content-Encoding</code> header of the response.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetResponseContentEncoding() const{ return m_responseContentEncoding; }
|
|||
|
|
inline bool ResponseContentEncodingHasBeenSet() const { return m_responseContentEncodingHasBeenSet; }
|
|||
|
|
inline void SetResponseContentEncoding(const Aws::String& value) { m_responseContentEncodingHasBeenSet = true; m_responseContentEncoding = value; }
|
|||
|
|
inline void SetResponseContentEncoding(Aws::String&& value) { m_responseContentEncodingHasBeenSet = true; m_responseContentEncoding = std::move(value); }
|
|||
|
|
inline void SetResponseContentEncoding(const char* value) { m_responseContentEncodingHasBeenSet = true; m_responseContentEncoding.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithResponseContentEncoding(const Aws::String& value) { SetResponseContentEncoding(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseContentEncoding(Aws::String&& value) { SetResponseContentEncoding(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseContentEncoding(const char* value) { SetResponseContentEncoding(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Sets the <code>Content-Language</code> header of the response.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetResponseContentLanguage() const{ return m_responseContentLanguage; }
|
|||
|
|
inline bool ResponseContentLanguageHasBeenSet() const { return m_responseContentLanguageHasBeenSet; }
|
|||
|
|
inline void SetResponseContentLanguage(const Aws::String& value) { m_responseContentLanguageHasBeenSet = true; m_responseContentLanguage = value; }
|
|||
|
|
inline void SetResponseContentLanguage(Aws::String&& value) { m_responseContentLanguageHasBeenSet = true; m_responseContentLanguage = std::move(value); }
|
|||
|
|
inline void SetResponseContentLanguage(const char* value) { m_responseContentLanguageHasBeenSet = true; m_responseContentLanguage.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithResponseContentLanguage(const Aws::String& value) { SetResponseContentLanguage(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseContentLanguage(Aws::String&& value) { SetResponseContentLanguage(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseContentLanguage(const char* value) { SetResponseContentLanguage(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Sets the <code>Content-Type</code> header of the response.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetResponseContentType() const{ return m_responseContentType; }
|
|||
|
|
inline bool ResponseContentTypeHasBeenSet() const { return m_responseContentTypeHasBeenSet; }
|
|||
|
|
inline void SetResponseContentType(const Aws::String& value) { m_responseContentTypeHasBeenSet = true; m_responseContentType = value; }
|
|||
|
|
inline void SetResponseContentType(Aws::String&& value) { m_responseContentTypeHasBeenSet = true; m_responseContentType = std::move(value); }
|
|||
|
|
inline void SetResponseContentType(const char* value) { m_responseContentTypeHasBeenSet = true; m_responseContentType.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithResponseContentType(const Aws::String& value) { SetResponseContentType(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseContentType(Aws::String&& value) { SetResponseContentType(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseContentType(const char* value) { SetResponseContentType(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Sets the <code>Expires</code> header of the response.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::Utils::DateTime& GetResponseExpires() const{ return m_responseExpires; }
|
|||
|
|
inline bool ResponseExpiresHasBeenSet() const { return m_responseExpiresHasBeenSet; }
|
|||
|
|
inline void SetResponseExpires(const Aws::Utils::DateTime& value) { m_responseExpiresHasBeenSet = true; m_responseExpires = value; }
|
|||
|
|
inline void SetResponseExpires(Aws::Utils::DateTime&& value) { m_responseExpiresHasBeenSet = true; m_responseExpires = std::move(value); }
|
|||
|
|
inline GetObjectRequest& WithResponseExpires(const Aws::Utils::DateTime& value) { SetResponseExpires(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithResponseExpires(Aws::Utils::DateTime&& value) { SetResponseExpires(std::move(value)); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Version ID used to reference a specific version of the object.</p> <p>By
|
|||
|
|
* default, the <code>GetObject</code> operation returns the current version of an
|
|||
|
|
* object. To return a different version, use the <code>versionId</code>
|
|||
|
|
* subresource.</p> <ul> <li> <p>If you include a <code>versionId</code> in
|
|||
|
|
* your request header, you must have the <code>s3:GetObjectVersion</code>
|
|||
|
|
* permission to access a specific version of an object. The
|
|||
|
|
* <code>s3:GetObject</code> permission is not required in this scenario.</p> </li>
|
|||
|
|
* <li> <p>If you request the current version of an object without a specific
|
|||
|
|
* <code>versionId</code> in the request header, only the <code>s3:GetObject</code>
|
|||
|
|
* permission is required. The <code>s3:GetObjectVersion</code> permission is not
|
|||
|
|
* required in this scenario.</p> </li> <li> <p> <b>Directory buckets</b> - S3
|
|||
|
|
* Versioning isn't enabled and supported for directory buckets. For this API
|
|||
|
|
* operation, only the <code>null</code> value of the version ID is supported by
|
|||
|
|
* directory buckets. You can only specify <code>null</code> to the
|
|||
|
|
* <code>versionId</code> query parameter in the request.</p> </li> </ul>
|
|||
|
|
* <p>For more information about versioning, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetVersionId() const{ return m_versionId; }
|
|||
|
|
inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
|
|||
|
|
inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
|
|||
|
|
inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
|
|||
|
|
inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Specifies the algorithm to use when decrypting the object (for example,
|
|||
|
|
* <code>AES256</code>).</p> <p>If you encrypt an object by using server-side
|
|||
|
|
* encryption with customer-provided encryption keys (SSE-C) when you store the
|
|||
|
|
* object in Amazon S3, then when you GET the object, you must use the following
|
|||
|
|
* headers:</p> <ul> <li> <p>
|
|||
|
|
* <code>x-amz-server-side-encryption-customer-algorithm</code> </p> </li> <li> <p>
|
|||
|
|
* <code>x-amz-server-side-encryption-customer-key</code> </p> </li> <li> <p>
|
|||
|
|
* <code>x-amz-server-side-encryption-customer-key-MD5</code> </p> </li> </ul>
|
|||
|
|
* <p>For more information about SSE-C, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side
|
|||
|
|
* Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3
|
|||
|
|
* User Guide</i>.</p> <p>This functionality is not supported for directory
|
|||
|
|
* buckets.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetSSECustomerAlgorithm() const{ return m_sSECustomerAlgorithm; }
|
|||
|
|
inline bool SSECustomerAlgorithmHasBeenSet() const { return m_sSECustomerAlgorithmHasBeenSet; }
|
|||
|
|
inline void SetSSECustomerAlgorithm(const Aws::String& value) { m_sSECustomerAlgorithmHasBeenSet = true; m_sSECustomerAlgorithm = value; }
|
|||
|
|
inline void SetSSECustomerAlgorithm(Aws::String&& value) { m_sSECustomerAlgorithmHasBeenSet = true; m_sSECustomerAlgorithm = std::move(value); }
|
|||
|
|
inline void SetSSECustomerAlgorithm(const char* value) { m_sSECustomerAlgorithmHasBeenSet = true; m_sSECustomerAlgorithm.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithSSECustomerAlgorithm(const Aws::String& value) { SetSSECustomerAlgorithm(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithSSECustomerAlgorithm(Aws::String&& value) { SetSSECustomerAlgorithm(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithSSECustomerAlgorithm(const char* value) { SetSSECustomerAlgorithm(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Specifies the customer-provided encryption key that you originally provided
|
|||
|
|
* for Amazon S3 to encrypt the data before storing it. This value is used to
|
|||
|
|
* decrypt the object when recovering it and must match the one used when storing
|
|||
|
|
* the data. The key must be appropriate for use with the algorithm specified in
|
|||
|
|
* the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
|
|||
|
|
* <p>If you encrypt an object by using server-side encryption with
|
|||
|
|
* customer-provided encryption keys (SSE-C) when you store the object in Amazon
|
|||
|
|
* S3, then when you GET the object, you must use the following headers:</p> <ul>
|
|||
|
|
* <li> <p> <code>x-amz-server-side-encryption-customer-algorithm</code> </p> </li>
|
|||
|
|
* <li> <p> <code>x-amz-server-side-encryption-customer-key</code> </p> </li> <li>
|
|||
|
|
* <p> <code>x-amz-server-side-encryption-customer-key-MD5</code> </p> </li> </ul>
|
|||
|
|
* <p>For more information about SSE-C, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side
|
|||
|
|
* Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3
|
|||
|
|
* User Guide</i>.</p> <p>This functionality is not supported for directory
|
|||
|
|
* buckets.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetSSECustomerKey() const{ return m_sSECustomerKey; }
|
|||
|
|
inline bool SSECustomerKeyHasBeenSet() const { return m_sSECustomerKeyHasBeenSet; }
|
|||
|
|
inline void SetSSECustomerKey(const Aws::String& value) { m_sSECustomerKeyHasBeenSet = true; m_sSECustomerKey = value; }
|
|||
|
|
inline void SetSSECustomerKey(Aws::String&& value) { m_sSECustomerKeyHasBeenSet = true; m_sSECustomerKey = std::move(value); }
|
|||
|
|
inline void SetSSECustomerKey(const char* value) { m_sSECustomerKeyHasBeenSet = true; m_sSECustomerKey.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithSSECustomerKey(const Aws::String& value) { SetSSECustomerKey(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithSSECustomerKey(Aws::String&& value) { SetSSECustomerKey(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithSSECustomerKey(const char* value) { SetSSECustomerKey(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Specifies the 128-bit MD5 digest of the customer-provided encryption key
|
|||
|
|
* according to RFC 1321. Amazon S3 uses this header for a message integrity check
|
|||
|
|
* to ensure that the encryption key was transmitted without error.</p> <p>If you
|
|||
|
|
* encrypt an object by using server-side encryption with customer-provided
|
|||
|
|
* encryption keys (SSE-C) when you store the object in Amazon S3, then when you
|
|||
|
|
* GET the object, you must use the following headers:</p> <ul> <li> <p>
|
|||
|
|
* <code>x-amz-server-side-encryption-customer-algorithm</code> </p> </li> <li> <p>
|
|||
|
|
* <code>x-amz-server-side-encryption-customer-key</code> </p> </li> <li> <p>
|
|||
|
|
* <code>x-amz-server-side-encryption-customer-key-MD5</code> </p> </li> </ul>
|
|||
|
|
* <p>For more information about SSE-C, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side
|
|||
|
|
* Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3
|
|||
|
|
* User Guide</i>.</p> <p>This functionality is not supported for directory
|
|||
|
|
* buckets.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetSSECustomerKeyMD5() const{ return m_sSECustomerKeyMD5; }
|
|||
|
|
inline bool SSECustomerKeyMD5HasBeenSet() const { return m_sSECustomerKeyMD5HasBeenSet; }
|
|||
|
|
inline void SetSSECustomerKeyMD5(const Aws::String& value) { m_sSECustomerKeyMD5HasBeenSet = true; m_sSECustomerKeyMD5 = value; }
|
|||
|
|
inline void SetSSECustomerKeyMD5(Aws::String&& value) { m_sSECustomerKeyMD5HasBeenSet = true; m_sSECustomerKeyMD5 = std::move(value); }
|
|||
|
|
inline void SetSSECustomerKeyMD5(const char* value) { m_sSECustomerKeyMD5HasBeenSet = true; m_sSECustomerKeyMD5.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithSSECustomerKeyMD5(const Aws::String& value) { SetSSECustomerKeyMD5(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithSSECustomerKeyMD5(Aws::String&& value) { SetSSECustomerKeyMD5(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithSSECustomerKeyMD5(const char* value) { SetSSECustomerKeyMD5(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
|
|||
|
|
inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
|
|||
|
|
inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
|
|||
|
|
inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
|
|||
|
|
inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = std::move(value); }
|
|||
|
|
inline GetObjectRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(std::move(value)); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>Part number of the object being read. This is a positive integer between 1
|
|||
|
|
* and 10,000. Effectively performs a 'ranged' GET request for the part specified.
|
|||
|
|
* Useful for downloading just a part of an object.</p>
|
|||
|
|
*/
|
|||
|
|
inline int GetPartNumber() const{ return m_partNumber; }
|
|||
|
|
inline bool PartNumberHasBeenSet() const { return m_partNumberHasBeenSet; }
|
|||
|
|
inline void SetPartNumber(int value) { m_partNumberHasBeenSet = true; m_partNumber = value; }
|
|||
|
|
inline GetObjectRequest& WithPartNumber(int value) { SetPartNumber(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>The account ID of the expected bucket owner. If the account ID that you
|
|||
|
|
* provide does not match the actual owner of the bucket, the request fails with
|
|||
|
|
* the HTTP status code <code>403 Forbidden</code> (access denied).</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
|
|||
|
|
inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
|
|||
|
|
inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
|
|||
|
|
inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
|
|||
|
|
inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
|
|||
|
|
inline GetObjectRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
/**
|
|||
|
|
* <p>To retrieve the checksum, this mode must be enabled.</p> <p> <b>General
|
|||
|
|
* purpose buckets</b> - In addition, if you enable checksum mode and the object is
|
|||
|
|
* uploaded with a <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a>
|
|||
|
|
* and encrypted with an Key Management Service (KMS) key, you must have permission
|
|||
|
|
* to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
|
|||
|
|
*/
|
|||
|
|
inline const ChecksumMode& GetChecksumMode() const{ return m_checksumMode; }
|
|||
|
|
inline bool ChecksumModeHasBeenSet() const { return m_checksumModeHasBeenSet; }
|
|||
|
|
inline void SetChecksumMode(const ChecksumMode& value) { m_checksumModeHasBeenSet = true; m_checksumMode = value; }
|
|||
|
|
inline void SetChecksumMode(ChecksumMode&& value) { m_checksumModeHasBeenSet = true; m_checksumMode = std::move(value); }
|
|||
|
|
inline GetObjectRequest& WithChecksumMode(const ChecksumMode& value) { SetChecksumMode(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithChecksumMode(ChecksumMode&& value) { SetChecksumMode(std::move(value)); return *this;}
|
|||
|
|
///@}
|
|||
|
|
|
|||
|
|
///@{
|
|||
|
|
|
|||
|
|
inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
|
|||
|
|
inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
|
|||
|
|
inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
|
|||
|
|
inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
|
|||
|
|
inline GetObjectRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;}
|
|||
|
|
inline GetObjectRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;}
|
|||
|
|
inline GetObjectRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
|
|||
|
|
inline GetObjectRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
|
|||
|
|
inline GetObjectRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
|
|||
|
|
inline GetObjectRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
|
|||
|
|
inline GetObjectRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
|
|||
|
|
inline GetObjectRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
|
|||
|
|
inline GetObjectRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
|
|||
|
|
///@}
|
|||
|
|
private:
|
|||
|
|
|
|||
|
|
Aws::String m_bucket;
|
|||
|
|
bool m_bucketHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_ifMatch;
|
|||
|
|
bool m_ifMatchHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::Utils::DateTime m_ifModifiedSince;
|
|||
|
|
bool m_ifModifiedSinceHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_ifNoneMatch;
|
|||
|
|
bool m_ifNoneMatchHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::Utils::DateTime m_ifUnmodifiedSince;
|
|||
|
|
bool m_ifUnmodifiedSinceHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_key;
|
|||
|
|
bool m_keyHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_range;
|
|||
|
|
bool m_rangeHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_responseCacheControl;
|
|||
|
|
bool m_responseCacheControlHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_responseContentDisposition;
|
|||
|
|
bool m_responseContentDispositionHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_responseContentEncoding;
|
|||
|
|
bool m_responseContentEncodingHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_responseContentLanguage;
|
|||
|
|
bool m_responseContentLanguageHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_responseContentType;
|
|||
|
|
bool m_responseContentTypeHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::Utils::DateTime m_responseExpires;
|
|||
|
|
bool m_responseExpiresHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_versionId;
|
|||
|
|
bool m_versionIdHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_sSECustomerAlgorithm;
|
|||
|
|
bool m_sSECustomerAlgorithmHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_sSECustomerKey;
|
|||
|
|
bool m_sSECustomerKeyHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_sSECustomerKeyMD5;
|
|||
|
|
bool m_sSECustomerKeyMD5HasBeenSet = false;
|
|||
|
|
|
|||
|
|
RequestPayer m_requestPayer;
|
|||
|
|
bool m_requestPayerHasBeenSet = false;
|
|||
|
|
|
|||
|
|
int m_partNumber;
|
|||
|
|
bool m_partNumberHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::String m_expectedBucketOwner;
|
|||
|
|
bool m_expectedBucketOwnerHasBeenSet = false;
|
|||
|
|
|
|||
|
|
ChecksumMode m_checksumMode;
|
|||
|
|
bool m_checksumModeHasBeenSet = false;
|
|||
|
|
|
|||
|
|
Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
|
|||
|
|
bool m_customizedAccessLogTagHasBeenSet = false;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
} // namespace Model
|
|||
|
|
} // namespace S3
|
|||
|
|
} // namespace Aws
|