AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Simple Storage Service (S3) WriteGetObjectResponse API operation.

Syntax

Write-S3GetObjectResponse
-AcceptRange <String>
-Body <Object>
-BucketKeyEnabled <Boolean>
-CacheControl <String>
-ChecksumCRC32 <String>
-ChecksumCRC32C <String>
-ChecksumCRC64NVME <String>
-ChecksumSHA1 <String>
-ChecksumSHA256 <String>
-ContentDisposition <String>
-ContentEncoding <String>
-ContentLanguage <String>
-ContentLength <Int64>
-ContentRange <String>
-ContentType <String>
-DeleteMarker <Boolean>
-ErrorCode <String>
-ErrorMessage <String>
-Expiration <String>
-Expire <DateTime>
-LastModified <DateTime>
-MissingMeta <Int32>
-ObjectLockLegalHoldStatus <ObjectLockLegalHoldStatus>
-ObjectLockMode <ObjectLockMode>
-ObjectLockRetainUntilDate <DateTime>
-PartsCount <Int32>
-ReplicationStatus <ReplicationStatus>
-RequestCharged <RequestCharged>
-RequestRoute <String>
-RequestToken <String>
-Restore <String>
-ServerSideEncryptionMethod <ServerSideEncryptionMethod>
-SSECustomerAlgorithm <ServerSideEncryptionCustomerMethod>
-SSECustomerKeyMD5 <String>
-SSEKMSKeyId <String>
-StatusCode <Int32>
-StorageClass <S3StorageClass>
-TagCount <Int32>
-VersionId <String>
-ETag <String>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonS3Config>
-UseAccelerateEndpoint <SwitchParameter>
-UseDualstackEndpoint <SwitchParameter>
-ForcePathStyleAddressing <Boolean>

Description

This operation is not supported for directory buckets. Passes transformed objects to a GetObject operation when using Object Lambda access points. For information about Object Lambda access points, see Transforming objects with Object Lambda access points in the Amazon S3 User Guide. This operation supports metadata that can be returned by GetObject, in addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage. The GetObject response metadata is supported so that the WriteGetObjectResponse caller, typically an Lambda function, can provide the same metadata when it internally invokes GetObject. When WriteGetObjectResponse is called by a customer-owned Lambda function, the metadata returned to the end user GetObject call might differ from what Amazon S3 would normally return. You can include any number of metadata headers. When including a metadata header, it should be prefaced with x-amz-meta. For example, x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this is to forward GetObject metadata. Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to detect and redact personally identifiable information (PII) and decompress S3 objects. These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point. Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically detects personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket. Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically redacts personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket. Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is equipped to decompress objects stored in S3 in one of six compressed file formats including bzip2, gzip, snappy, zlib, zstandard and ZIP. For information on how to view and use these functions, see Using Amazon Web Services built Lambda functions in the Amazon S3 User Guide.

Parameters

-AcceptRange <String>
Indicates that a range of bytes was specified.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAcceptRanges
-Body <Object>
The object data.The cmdlet accepts a parameter of type string, string[], System.IO.FileInfo or System.IO.Stream.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-BucketKeyEnabled <Boolean>
Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side encryption with Amazon Web Services KMS (SSE-KMS).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CacheControl <String>
Specifies caching behavior along the request/reply chain.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ChecksumCRC32 <String>
This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC-32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ChecksumCRC32C <String>
This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC-32C checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ChecksumCRC64NVME <String>
This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC-64NVME checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ChecksumSHA1 <String>
This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA-1 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ChecksumSHA256 <String>
This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA-256 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientConfig <AmazonS3Config>
Amazon.PowerShell.Cmdlets.S3.AmazonS3ClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContentDisposition <String>
Specifies presentational information for the object.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContentEncoding <String>
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContentLanguage <String>
The language the content is in.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContentLength <Int64>
The size of the body in bytes.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContentRange <String>
The portion of the object returned in the response.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContentType <String>
A standard MIME type describing the format of the object data.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DeleteMarker <Boolean>
Specifies whether an object stored in Amazon S3 is (true) or is not (false) a delete marker.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ErrorCode <String>
A string that uniquely identifies an error condition. Returned in <Code> tag of error XML response for corresponding GetObject call. Cannot be used with successful StatusCode header or when transformed object is provided in body.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ErrorMessage <String>
Contains a generic description of the error condition. Returned in <Message> tag of error XML response for corresponding GetObject call. Cannot be used with successful StatusCode header or when transformed object is provided in body.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ETag <String>
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Expiration <String>
If object stored in Amazon S3 expiration is configured (see PUT Bucket lifecycle) it includes expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL encoded.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Expire <DateTime>
The date and time at which the object is no longer cacheable.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesExpires
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ForcePathStyleAddressing <Boolean>
S3 requests can be performed using one of two URI styles: Virtual or Path. When using Virtual style, the bucket is included as part of the hostname. When using Path style the bucket is included as part of the URI path. The default value is $true when the EndpointUrl parameter is specified, $false otherwise.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LastModified <DateTime>
Date and time the object was last modified.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MissingMeta <Int32>
Set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ObjectLockLegalHoldStatus <ObjectLockLegalHoldStatus>
Indicates whether object stored in Amazon S3 has an active legal hold.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ObjectLockMode <ObjectLockMode>
Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information about S3 Object Lock, see Object Lock.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ObjectLockRetainUntilDate <DateTime>
Date and time when Object Lock is configured to expire.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PartsCount <Int32>
The count of parts this object has.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ReplicationStatus <ReplicationStatus>
Indicates if request involves bucket that is either a source or destination in a Replication rule. For more information about S3 Replication, see Replication.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RequestCharged <RequestCharged>
If present, indicates that the requester was successfully charged for the request.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RequestRoute <String>
Route prefix to the HTTP URL generated.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RequestToken <String>
A single use encrypted token that maps WriteGetObjectResponse to the end user GetObject request.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Restore <String>
Provides information about object restoration operation and expiration time of the restored object copy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.S3.Model.WriteGetObjectResponseResponse). Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ServerSideEncryptionMethod <ServerSideEncryptionMethod>
The server-side encryption algorithm used when storing requested object in Amazon S3 or Amazon FSx.When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is aws:fsx.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SSECustomerAlgorithm <ServerSideEncryptionCustomerMethod>
Encryption algorithm used if server-side encryption with a customer-provided encryption key was specified for object stored in Amazon S3.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SSECustomerKeyMD5 <String>
128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data stored in S3. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SSEKMSKeyId <String>
If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in Amazon S3 object.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StatusCode <Int32>
The integer status code for an HTTP response of a corresponding GetObject request. The following is a list of status codes.
  • 200 - OK
  • 206 - Partial Content
  • 304 - Not Modified
  • 400 - Bad Request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Not Found
  • 405 - Method Not Allowed
  • 409 - Conflict
  • 411 - Length Required
  • 412 - Precondition Failed
  • 416 - Range Not Satisfiable
  • 500 - Internal Server Error
  • 503 - Service Unavailable
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageClass <S3StorageClass>
The class of storage used to store object in Amazon S3.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TagCount <Int32>
The number of tags, if any, on the object.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-UseAccelerateEndpoint <SwitchParameter>
Enables S3 accelerate by sending requests to the accelerate endpoint instead of the regular region endpoint. To use this feature, the bucket name must be DNS compliant and must not contain periods (.).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-UseDualstackEndpoint <SwitchParameter>
Configures the request to Amazon S3 to use the dualstack endpoint for a region. S3 supports dualstack endpoints which return both IPv6 and IPv4 values. The dualstack mode of Amazon S3 cannot be used with accelerate mode.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-VersionId <String>
VersionId used to reference a specific version of the object.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet does not generate any output.The service response (type Amazon.S3.Model.WriteGetObjectResponseResponse) be returned by specifying '-Select *'.

Supported Version

AWS Tools for PowerShell: 2.x.y.z