Struct: s3.S3
Overview
WaitUntilBucketExists uses the Amazon S3 API operation HeadBucket to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.
Implemented Interfaces
s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3iface.S3API, s3manager.WriterReadFrom
Constructor Functions collapse
-
func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3
New creates a new instance of the S3 client with a session.
Service Operations collapse
-
AbortMultipartUpload(*AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error)
operation
AbortMultipartUpload API operation for Amazon Simple Storage Service.
-
AbortMultipartUploadWithContext(aws.Context, *AbortMultipartUploadInput, ...request.Option) (*AbortMultipartUploadOutput, error)
operation
AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of the ability to pass a context and additional request options.
-
AddLegalHold(*AddLegalHoldInput) (*AddLegalHoldOutput, error)
operation
AddLegalHold API operation for Amazon Simple Storage Service.
-
AddLegalHoldWithContext(aws.Context, *AddLegalHoldInput, ...request.Option) (*AddLegalHoldOutput, error)
operation
AddLegalHoldWithContext is the same as AddLegalHold with the addition of the ability to pass a context and additional request options.
-
CompleteMultipartUpload(*CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error)
operation
CompleteMultipartUpload API operation for Amazon Simple Storage Service.
-
CompleteMultipartUploadWithContext(aws.Context, *CompleteMultipartUploadInput, ...request.Option) (*CompleteMultipartUploadOutput, error)
operation
CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of the ability to pass a context and additional request options.
-
CopyObject(*CopyObjectInput) (*CopyObjectOutput, error)
operation
CopyObject API operation for Amazon Simple Storage Service.
-
CopyObjectWithContext(aws.Context, *CopyObjectInput, ...request.Option) (*CopyObjectOutput, error)
operation
CopyObjectWithContext is the same as CopyObject with the addition of the ability to pass a context and additional request options.
-
CreateBucket(*CreateBucketInput) (*CreateBucketOutput, error)
operation
CreateBucket API operation for Amazon Simple Storage Service.
-
CreateBucketWithContext(aws.Context, *CreateBucketInput, ...request.Option) (*CreateBucketOutput, error)
operation
CreateBucketWithContext is the same as CreateBucket with the addition of the ability to pass a context and additional request options.
-
CreateMultipartUpload(*CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error)
operation
CreateMultipartUpload API operation for Amazon Simple Storage Service.
-
CreateMultipartUploadWithContext(aws.Context, *CreateMultipartUploadInput, ...request.Option) (*CreateMultipartUploadOutput, error)
operation
CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of the ability to pass a context and additional request options.
-
DeleteBucket(*DeleteBucketInput) (*DeleteBucketOutput, error)
operation
DeleteBucket API operation for Amazon Simple Storage Service.
-
DeleteBucketCors(*DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error)
operation
DeleteBucketCors API operation for Amazon Simple Storage Service.
-
DeleteBucketCorsWithContext(aws.Context, *DeleteBucketCorsInput, ...request.Option) (*DeleteBucketCorsOutput, error)
operation
DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of the ability to pass a context and additional request options.
-
DeleteBucketLifecycle(*DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error)
operation
DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
-
DeleteBucketLifecycleWithContext(aws.Context, *DeleteBucketLifecycleInput, ...request.Option) (*DeleteBucketLifecycleOutput, error)
operation
DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of the ability to pass a context and additional request options.
-
DeleteBucketReplication(*DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error)
operation
DeleteBucketReplication API operation for Amazon Simple Storage Service.
-
DeleteBucketReplicationWithContext(aws.Context, *DeleteBucketReplicationInput, ...request.Option) (*DeleteBucketReplicationOutput, error)
operation
DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of the ability to pass a context and additional request options.
-
DeleteBucketWebsite(*DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error)
operation
DeleteBucketWebsite API operation for Amazon Simple Storage Service.
-
DeleteBucketWebsiteWithContext(aws.Context, *DeleteBucketWebsiteInput, ...request.Option) (*DeleteBucketWebsiteOutput, error)
operation
DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of the ability to pass a context and additional request options.
-
DeleteBucketWithContext(aws.Context, *DeleteBucketInput, ...request.Option) (*DeleteBucketOutput, error)
operation
DeleteBucketWithContext is the same as DeleteBucket with the addition of the ability to pass a context and additional request options.
-
DeleteLegalHold(*DeleteLegalHoldInput) (*DeleteLegalHoldOutput, error)
operation
DeleteLegalHold API operation for Amazon Simple Storage Service.
-
DeleteLegalHoldWithContext(aws.Context, *DeleteLegalHoldInput, ...request.Option) (*DeleteLegalHoldOutput, error)
operation
DeleteLegalHoldWithContext is the same as DeleteLegalHold with the addition of the ability to pass a context and additional request options.
-
DeleteObject(*DeleteObjectInput) (*DeleteObjectOutput, error)
operation
DeleteObject API operation for Amazon Simple Storage Service.
-
DeleteObjects(*DeleteObjectsInput) (*DeleteObjectsOutput, error)
operation
DeleteObjects API operation for Amazon Simple Storage Service.
-
DeleteObjectsWithContext(aws.Context, *DeleteObjectsInput, ...request.Option) (*DeleteObjectsOutput, error)
operation
DeleteObjectsWithContext is the same as DeleteObjects with the addition of the ability to pass a context and additional request options.
-
DeleteObjectTagging(*DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error)
operation
DeleteObjectTagging API operation for Amazon Simple Storage Service.
-
DeleteObjectTaggingWithContext(aws.Context, *DeleteObjectTaggingInput, ...request.Option) (*DeleteObjectTaggingOutput, error)
operation
DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of the ability to pass a context and additional request options.
-
DeleteObjectWithContext(aws.Context, *DeleteObjectInput, ...request.Option) (*DeleteObjectOutput, error)
operation
DeleteObjectWithContext is the same as DeleteObject with the addition of the ability to pass a context and additional request options.
-
DeletePublicAccessBlock(*DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error)
operation
DeletePublicAccessBlock API operation for Amazon Simple Storage Service.
-
DeletePublicAccessBlockWithContext(aws.Context, *DeletePublicAccessBlockInput, ...request.Option) (*DeletePublicAccessBlockOutput, error)
operation
DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of the ability to pass a context and additional request options.
-
ExtendObjectRetention(*ExtendObjectRetentionInput) (*ExtendObjectRetentionOutput, error)
operation
ExtendObjectRetention API operation for Amazon Simple Storage Service.
-
ExtendObjectRetentionWithContext(aws.Context, *ExtendObjectRetentionInput, ...request.Option) (*ExtendObjectRetentionOutput, error)
operation
ExtendObjectRetentionWithContext is the same as ExtendObjectRetention with the addition of the ability to pass a context and additional request options.
-
GetBucketAcl(*GetBucketAclInput) (*GetBucketAclOutput, error)
operation
GetBucketAcl API operation for Amazon Simple Storage Service.
-
GetBucketAclWithContext(aws.Context, *GetBucketAclInput, ...request.Option) (*GetBucketAclOutput, error)
operation
GetBucketAclWithContext is the same as GetBucketAcl with the addition of the ability to pass a context and additional request options.
-
GetBucketCors(*GetBucketCorsInput) (*GetBucketCorsOutput, error)
operation
GetBucketCors API operation for Amazon Simple Storage Service.
-
GetBucketCorsWithContext(aws.Context, *GetBucketCorsInput, ...request.Option) (*GetBucketCorsOutput, error)
operation
GetBucketCorsWithContext is the same as GetBucketCors with the addition of the ability to pass a context and additional request options.
-
GetBucketLifecycleConfiguration(*GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error)
operation
GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
-
GetBucketLifecycleConfigurationWithContext(aws.Context, *GetBucketLifecycleConfigurationInput, ...request.Option) (*GetBucketLifecycleConfigurationOutput, error)
operation
GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of the ability to pass a context and additional request options.
-
GetBucketLocation(*GetBucketLocationInput) (*GetBucketLocationOutput, error)
operation
GetBucketLocation API operation for Amazon Simple Storage Service.
-
GetBucketLocationWithContext(aws.Context, *GetBucketLocationInput, ...request.Option) (*GetBucketLocationOutput, error)
operation
GetBucketLocationWithContext is the same as GetBucketLocation with the addition of the ability to pass a context and additional request options.
-
GetBucketLogging(*GetBucketLoggingInput) (*GetBucketLoggingOutput, error)
operation
GetBucketLogging API operation for Amazon Simple Storage Service.
-
GetBucketLoggingWithContext(aws.Context, *GetBucketLoggingInput, ...request.Option) (*GetBucketLoggingOutput, error)
operation
GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of the ability to pass a context and additional request options.
-
GetBucketProtectionConfiguration(*GetBucketProtectionConfigurationInput) (*GetBucketProtectionConfigurationOutput, error)
operation
GetBucketProtectionConfiguration API operation for Amazon Simple Storage Service.
-
GetBucketProtectionConfigurationWithContext(aws.Context, *GetBucketProtectionConfigurationInput, ...request.Option) (*GetBucketProtectionConfigurationOutput, error)
operation
GetBucketProtectionConfigurationWithContext is the same as GetBucketProtectionConfiguration with the addition of the ability to pass a context and additional request options.
-
GetBucketReplication(*GetBucketReplicationInput) (*GetBucketReplicationOutput, error)
operation
GetBucketReplication API operation for Amazon Simple Storage Service.
-
GetBucketReplicationWithContext(aws.Context, *GetBucketReplicationInput, ...request.Option) (*GetBucketReplicationOutput, error)
operation
GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of the ability to pass a context and additional request options.
-
GetBucketVersioning(*GetBucketVersioningInput) (*GetBucketVersioningOutput, error)
operation
GetBucketVersioning API operation for Amazon Simple Storage Service.
-
GetBucketVersioningWithContext(aws.Context, *GetBucketVersioningInput, ...request.Option) (*GetBucketVersioningOutput, error)
operation
GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of the ability to pass a context and additional request options.
-
GetBucketWebsite(*GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error)
operation
GetBucketWebsite API operation for Amazon Simple Storage Service.
-
GetBucketWebsiteWithContext(aws.Context, *GetBucketWebsiteInput, ...request.Option) (*GetBucketWebsiteOutput, error)
operation
GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of the ability to pass a context and additional request options.
-
GetObject(*GetObjectInput) (*GetObjectOutput, error)
operation
GetObject API operation for Amazon Simple Storage Service.
-
GetObjectAcl(*GetObjectAclInput) (*GetObjectAclOutput, error)
operation
GetObjectAcl API operation for Amazon Simple Storage Service.
-
GetObjectAclWithContext(aws.Context, *GetObjectAclInput, ...request.Option) (*GetObjectAclOutput, error)
operation
GetObjectAclWithContext is the same as GetObjectAcl with the addition of the ability to pass a context and additional request options.
-
GetObjectLegalHold(*GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error)
operation
GetObjectLegalHold API operation for Amazon Simple Storage Service.
-
GetObjectLegalHoldWithContext(aws.Context, *GetObjectLegalHoldInput, ...request.Option) (*GetObjectLegalHoldOutput, error)
operation
GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of the ability to pass a context and additional request options.
-
GetObjectLockConfiguration(*GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error)
operation
GetObjectLockConfiguration API operation for Amazon Simple Storage Service.
-
GetObjectLockConfigurationWithContext(aws.Context, *GetObjectLockConfigurationInput, ...request.Option) (*GetObjectLockConfigurationOutput, error)
operation
GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of the ability to pass a context and additional request options.
-
GetObjectRetention(*GetObjectRetentionInput) (*GetObjectRetentionOutput, error)
operation
GetObjectRetention API operation for Amazon Simple Storage Service.
-
GetObjectRetentionWithContext(aws.Context, *GetObjectRetentionInput, ...request.Option) (*GetObjectRetentionOutput, error)
operation
GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of the ability to pass a context and additional request options.
-
GetObjectTagging(*GetObjectTaggingInput) (*GetObjectTaggingOutput, error)
operation
GetObjectTagging API operation for Amazon Simple Storage Service.
-
GetObjectTaggingWithContext(aws.Context, *GetObjectTaggingInput, ...request.Option) (*GetObjectTaggingOutput, error)
operation
GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of the ability to pass a context and additional request options.
-
GetObjectWithContext(aws.Context, *GetObjectInput, ...request.Option) (*GetObjectOutput, error)
operation
GetObjectWithContext is the same as GetObject with the addition of the ability to pass a context and additional request options.
-
GetPublicAccessBlock(*GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error)
operation
GetPublicAccessBlock API operation for Amazon Simple Storage Service.
-
GetPublicAccessBlockWithContext(aws.Context, *GetPublicAccessBlockInput, ...request.Option) (*GetPublicAccessBlockOutput, error)
operation
GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of the ability to pass a context and additional request options.
-
HeadBucket(*HeadBucketInput) (*HeadBucketOutput, error)
operation
HeadBucket API operation for Amazon Simple Storage Service.
-
HeadBucketWithContext(aws.Context, *HeadBucketInput, ...request.Option) (*HeadBucketOutput, error)
operation
HeadBucketWithContext is the same as HeadBucket with the addition of the ability to pass a context and additional request options.
-
HeadObject(*HeadObjectInput) (*HeadObjectOutput, error)
operation
HeadObject API operation for Amazon Simple Storage Service.
-
HeadObjectWithContext(aws.Context, *HeadObjectInput, ...request.Option) (*HeadObjectOutput, error)
operation
HeadObjectWithContext is the same as HeadObject with the addition of the ability to pass a context and additional request options.
-
ListBuckets(*ListBucketsInput) (*ListBucketsOutput, error)
operation
ListBuckets API operation for Amazon Simple Storage Service.
-
ListBucketsExtended(*ListBucketsExtendedInput) (*ListBucketsExtendedOutput, error)
operation
ListBucketsExtended API operation for Amazon Simple Storage Service.
-
ListBucketsExtendedPagesWithContext(aws.Context, *ListBucketsExtendedInput, func(*ListBucketsExtendedOutput, bool) bool, opts ...request.Option) error
operation
ListBucketsExtendedPagesWithContext same as ListBucketsExtendedPages except it takes a Context and allows setting request options on the pages.
-
ListBucketsExtendedWithContext(aws.Context, *ListBucketsExtendedInput, ...request.Option) (*ListBucketsExtendedOutput, error)
operation
ListBucketsExtendedWithContext is the same as ListBucketsExtended with the addition of the ability to pass a context and additional request options.
-
ListBucketsWithContext(aws.Context, *ListBucketsInput, ...request.Option) (*ListBucketsOutput, error)
operation
ListBucketsWithContext is the same as ListBuckets with the addition of the ability to pass a context and additional request options.
-
ListLegalHolds(*ListLegalHoldsInput) (*ListLegalHoldsOutput, error)
operation
ListLegalHolds API operation for Amazon Simple Storage Service.
-
ListLegalHoldsWithContext(aws.Context, *ListLegalHoldsInput, ...request.Option) (*ListLegalHoldsOutput, error)
operation
ListLegalHoldsWithContext is the same as ListLegalHolds with the addition of the ability to pass a context and additional request options.
-
ListMultipartUploads(*ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error)
operation
ListMultipartUploads API operation for Amazon Simple Storage Service.
-
ListMultipartUploadsPagesWithContext(aws.Context, *ListMultipartUploadsInput, func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error
operation
ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except it takes a Context and allows setting request options on the pages.
-
ListMultipartUploadsWithContext(aws.Context, *ListMultipartUploadsInput, ...request.Option) (*ListMultipartUploadsOutput, error)
operation
ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of the ability to pass a context and additional request options.
-
ListObjects(*ListObjectsInput) (*ListObjectsOutput, error)
operation
ListObjects API operation for Amazon Simple Storage Service.
-
ListObjectsPagesWithContext(aws.Context, *ListObjectsInput, func(*ListObjectsOutput, bool) bool, opts ...request.Option) error
operation
ListObjectsPagesWithContext same as ListObjectsPages except it takes a Context and allows setting request options on the pages.
-
ListObjectsV2(*ListObjectsV2Input) (*ListObjectsV2Output, error)
operation
ListObjectsV2 API operation for Amazon Simple Storage Service.
-
ListObjectsV2PagesWithContext(aws.Context, *ListObjectsV2Input, func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error
operation
ListObjectsV2PagesWithContext same as ListObjectsV2Pages except it takes a Context and allows setting request options on the pages.
-
ListObjectsV2WithContext(aws.Context, *ListObjectsV2Input, ...request.Option) (*ListObjectsV2Output, error)
operation
ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of the ability to pass a context and additional request options.
-
ListObjectsWithContext(aws.Context, *ListObjectsInput, ...request.Option) (*ListObjectsOutput, error)
operation
ListObjectsWithContext is the same as ListObjects with the addition of the ability to pass a context and additional request options.
-
ListObjectVersions(*ListObjectVersionsInput) (*ListObjectVersionsOutput, error)
operation
ListObjectVersions API operation for Amazon Simple Storage Service.
-
ListObjectVersionsPagesWithContext(aws.Context, *ListObjectVersionsInput, func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error
operation
ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except it takes a Context and allows setting request options on the pages.
-
ListObjectVersionsWithContext(aws.Context, *ListObjectVersionsInput, ...request.Option) (*ListObjectVersionsOutput, error)
operation
ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of the ability to pass a context and additional request options.
-
ListParts(*ListPartsInput) (*ListPartsOutput, error)
operation
ListParts API operation for Amazon Simple Storage Service.
-
ListPartsPagesWithContext(aws.Context, *ListPartsInput, func(*ListPartsOutput, bool) bool, opts ...request.Option) error
operation
ListPartsPagesWithContext same as ListPartsPages except it takes a Context and allows setting request options on the pages.
-
ListPartsWithContext(aws.Context, *ListPartsInput, ...request.Option) (*ListPartsOutput, error)
operation
ListPartsWithContext is the same as ListParts with the addition of the ability to pass a context and additional request options.
-
PutBucketAcl(*PutBucketAclInput) (*PutBucketAclOutput, error)
operation
PutBucketAcl API operation for Amazon Simple Storage Service.
-
PutBucketAclWithContext(aws.Context, *PutBucketAclInput, ...request.Option) (*PutBucketAclOutput, error)
operation
PutBucketAclWithContext is the same as PutBucketAcl with the addition of the ability to pass a context and additional request options.
-
PutBucketCors(*PutBucketCorsInput) (*PutBucketCorsOutput, error)
operation
PutBucketCors API operation for Amazon Simple Storage Service.
-
PutBucketCorsWithContext(aws.Context, *PutBucketCorsInput, ...request.Option) (*PutBucketCorsOutput, error)
operation
PutBucketCorsWithContext is the same as PutBucketCors with the addition of the ability to pass a context and additional request options.
-
PutBucketLifecycleConfiguration(*PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error)
operation
PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
-
PutBucketLifecycleConfigurationWithContext(aws.Context, *PutBucketLifecycleConfigurationInput, ...request.Option) (*PutBucketLifecycleConfigurationOutput, error)
operation
PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of the ability to pass a context and additional request options.
-
PutBucketLogging(*PutBucketLoggingInput) (*PutBucketLoggingOutput, error)
operation
PutBucketLogging API operation for Amazon Simple Storage Service.
-
PutBucketLoggingWithContext(aws.Context, *PutBucketLoggingInput, ...request.Option) (*PutBucketLoggingOutput, error)
operation
PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of the ability to pass a context and additional request options.
-
PutBucketProtectionConfiguration(*PutBucketProtectionConfigurationInput) (*PutBucketProtectionConfigurationOutput, error)
operation
PutBucketProtectionConfiguration API operation for Amazon Simple Storage Service.
-
PutBucketProtectionConfigurationWithContext(aws.Context, *PutBucketProtectionConfigurationInput, ...request.Option) (*PutBucketProtectionConfigurationOutput, error)
operation
PutBucketProtectionConfigurationWithContext is the same as PutBucketProtectionConfiguration with the addition of the ability to pass a context and additional request options.
-
PutBucketReplication(*PutBucketReplicationInput) (*PutBucketReplicationOutput, error)
operation
PutBucketReplication API operation for Amazon Simple Storage Service.
-
PutBucketReplicationWithContext(aws.Context, *PutBucketReplicationInput, ...request.Option) (*PutBucketReplicationOutput, error)
operation
PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of the ability to pass a context and additional request options.
-
PutBucketVersioning(*PutBucketVersioningInput) (*PutBucketVersioningOutput, error)
operation
PutBucketVersioning API operation for Amazon Simple Storage Service.
-
PutBucketVersioningWithContext(aws.Context, *PutBucketVersioningInput, ...request.Option) (*PutBucketVersioningOutput, error)
operation
PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of the ability to pass a context and additional request options.
-
PutBucketWebsite(*PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error)
operation
PutBucketWebsite API operation for Amazon Simple Storage Service.
-
PutBucketWebsiteWithContext(aws.Context, *PutBucketWebsiteInput, ...request.Option) (*PutBucketWebsiteOutput, error)
operation
PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of the ability to pass a context and additional request options.
-
PutObject(*PutObjectInput) (*PutObjectOutput, error)
operation
PutObject API operation for Amazon Simple Storage Service.
-
PutObjectAcl(*PutObjectAclInput) (*PutObjectAclOutput, error)
operation
PutObjectAcl API operation for Amazon Simple Storage Service.
-
PutObjectAclWithContext(aws.Context, *PutObjectAclInput, ...request.Option) (*PutObjectAclOutput, error)
operation
PutObjectAclWithContext is the same as PutObjectAcl with the addition of the ability to pass a context and additional request options.
-
PutObjectLegalHold(*PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error)
operation
PutObjectLegalHold API operation for Amazon Simple Storage Service.
-
PutObjectLegalHoldWithContext(aws.Context, *PutObjectLegalHoldInput, ...request.Option) (*PutObjectLegalHoldOutput, error)
operation
PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of the ability to pass a context and additional request options.
-
PutObjectLockConfiguration(*PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error)
operation
PutObjectLockConfiguration API operation for Amazon Simple Storage Service.
-
PutObjectLockConfigurationWithContext(aws.Context, *PutObjectLockConfigurationInput, ...request.Option) (*PutObjectLockConfigurationOutput, error)
operation
PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of the ability to pass a context and additional request options.
-
PutObjectRetention(*PutObjectRetentionInput) (*PutObjectRetentionOutput, error)
operation
PutObjectRetention API operation for Amazon Simple Storage Service.
-
PutObjectRetentionWithContext(aws.Context, *PutObjectRetentionInput, ...request.Option) (*PutObjectRetentionOutput, error)
operation
PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of the ability to pass a context and additional request options.
-
PutObjectTagging(*PutObjectTaggingInput) (*PutObjectTaggingOutput, error)
operation
PutObjectTagging API operation for Amazon Simple Storage Service.
-
PutObjectTaggingWithContext(aws.Context, *PutObjectTaggingInput, ...request.Option) (*PutObjectTaggingOutput, error)
operation
PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of the ability to pass a context and additional request options.
-
PutObjectWithContext(aws.Context, *PutObjectInput, ...request.Option) (*PutObjectOutput, error)
operation
PutObjectWithContext is the same as PutObject with the addition of the ability to pass a context and additional request options.
-
PutPublicAccessBlock(*PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error)
operation
PutPublicAccessBlock API operation for Amazon Simple Storage Service.
-
PutPublicAccessBlockWithContext(aws.Context, *PutPublicAccessBlockInput, ...request.Option) (*PutPublicAccessBlockOutput, error)
operation
PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of the ability to pass a context and additional request options.
-
RestoreObject(*RestoreObjectInput) (*RestoreObjectOutput, error)
operation
RestoreObject API operation for Amazon Simple Storage Service.
-
RestoreObjectWithContext(aws.Context, *RestoreObjectInput, ...request.Option) (*RestoreObjectOutput, error)
operation
RestoreObjectWithContext is the same as RestoreObject with the addition of the ability to pass a context and additional request options.
-
UploadPart(*UploadPartInput) (*UploadPartOutput, error)
operation
UploadPart API operation for Amazon Simple Storage Service.
-
UploadPartCopy(*UploadPartCopyInput) (*UploadPartCopyOutput, error)
operation
UploadPartCopy API operation for Amazon Simple Storage Service.
-
UploadPartCopyWithContext(aws.Context, *UploadPartCopyInput, ...request.Option) (*UploadPartCopyOutput, error)
operation
UploadPartCopyWithContext is the same as UploadPartCopy with the addition of the ability to pass a context and additional request options.
-
UploadPartWithContext(aws.Context, *UploadPartInput, ...request.Option) (*UploadPartOutput, error)
operation
UploadPartWithContext is the same as UploadPart with the addition of the ability to pass a context and additional request options.
Method Summary collapse
- func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error
-
func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error
WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists.
-
func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error
WaitUntilBucketNotExists uses the Amazon S3 API operation HeadBucket to wait for a condition to be met before returning.
-
func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error
WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists.
-
func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error
WaitUntilObjectExists uses the Amazon S3 API operation HeadObject to wait for a condition to be met before returning.
-
func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error
WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists.
-
func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error
WaitUntilObjectNotExists uses the Amazon S3 API operation HeadObject to wait for a condition to be met before returning.
-
func (c *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error
WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists.
Request Methods
AbortMultipartUploadRequest AddLegalHoldRequest CompleteMultipartUploadRequest CopyObjectRequest CreateBucketRequest CreateMultipartUploadRequest DeleteBucketRequest DeleteBucketCorsRequest DeleteBucketLifecycleRequest DeleteBucketReplicationRequest DeleteBucketWebsiteRequest DeleteLegalHoldRequest DeleteObjectRequest DeleteObjectTaggingRequest DeleteObjectsRequest DeletePublicAccessBlockRequest ExtendObjectRetentionRequest GetBucketAclRequest GetBucketCorsRequest GetBucketLifecycleConfigurationRequest GetBucketLocationRequest GetBucketLoggingRequest GetBucketProtectionConfigurationRequest GetBucketReplicationRequest GetBucketVersioningRequest GetBucketWebsiteRequest GetObjectRequest GetObjectAclRequest GetObjectLegalHoldRequest GetObjectLockConfigurationRequest GetObjectRetentionRequest GetObjectTaggingRequest GetPublicAccessBlockRequest HeadBucketRequest HeadObjectRequest ListBucketsRequest ListBucketsExtendedRequest ListLegalHoldsRequest ListMultipartUploadsRequest ListObjectVersionsRequest ListObjectsRequest ListObjectsV2Request ListPartsRequest PutBucketAclRequest PutBucketCorsRequest PutBucketLifecycleConfigurationRequest PutBucketLoggingRequest PutBucketProtectionConfigurationRequest PutBucketReplicationRequest PutBucketVersioningRequest PutBucketWebsiteRequest PutObjectRequest PutObjectAclRequest PutObjectLegalHoldRequest PutObjectLockConfigurationRequest PutObjectRetentionRequest PutObjectTaggingRequest PutPublicAccessBlockRequest RestoreObjectRequest UploadPartRequest UploadPartCopyRequest
Pagination Methods
ListBucketsExtendedPages ListMultipartUploadsPages ListObjectVersionsPages ListObjectsPages ListObjectsV2Pages ListPartsPages
Function Details
func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3
New creates a new instance of the S3 client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.
Example:
mySession := session.Must(session.NewSession())
// Create a S3 client from just a session.
svc := s3.New(mySession)
// Create a S3 client with additional configuration
svc := s3.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
// File 'service/s3/service.go', line 51
|
Method Details
func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error)
AbortMultipartUpload API operation for Amazon Simple Storage Service.
This action aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.
To verify that all parts have been removed, so you don't get charged for the part storage, you should call the ListParts (docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) action and ensure that the parts list is empty.
For information about permissions required to use the multipart upload, see Multipart Upload and Permissions (docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
The following operations are related to AbortMultipartUpload:
-
CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-
UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-
CompleteMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-
ListParts (docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-
ListMultipartUploads (docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation AbortMultipartUpload for usage and error information.
Returned Error Codes: - ErrCodeNoSuchUpload “NoSuchUpload” The specified multipart upload does not exist.
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
98 99 100 101 |
// File 'service/s3/api.go', line 98
|
func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput)
You must call the Send() method on the returned request object in order to execute the request.
AbortMultipartUploadRequest generates a request.Request object representing the client request for the AbortMultipartUpload() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
// File 'service/s3/api.go', line 42
|
func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error)
AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of the ability to pass a context and additional request options.
See AbortMultipartUpload for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
112 113 114 115 116 117 |
// File 'service/s3/api.go', line 112
|
func (c *S3) AddLegalHold(input *AddLegalHoldInput) (*AddLegalHoldOutput, error)
AddLegalHold API operation for Amazon Simple Storage Service.
Add a legal hold on an object. The legal hold identifiers are stored in the object metadata along with the timestamp of when they are POSTed to the object. The presence of any legal hold identifiers prevents the modification or deletion of the object data, even if the retention period has expired. Legal Holds can only be added to objects in a bucket with a protection policy. Otherwise a 400 error will be returned.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation AddLegalHold for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AddLegalHold
177 178 179 180 |
// File 'service/s3/api.go', line 177
|
func (c *S3) AddLegalHoldRequest(input *AddLegalHoldInput) (req *request.Request, output *AddLegalHoldOutput)
You must call the Send() method on the returned request object in order to execute the request.
AddLegalHoldRequest generates a request.Request object representing the client request for the AddLegalHold() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
// File 'service/s3/api.go', line 144
|
func (c *S3) AddLegalHoldWithContext(ctx aws.Context, input *AddLegalHoldInput, opts ...request.Option) (*AddLegalHoldOutput, error)
AddLegalHoldWithContext is the same as AddLegalHold with the addition of the ability to pass a context and additional request options.
See AddLegalHold for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
191 192 193 194 195 196 |
// File 'service/s3/api.go', line 191
|
func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error)
CompleteMultipartUpload API operation for Amazon Simple Storage Service.
Completes a multipart upload by assembling previously uploaded parts.
You first initiate the multipart upload and then upload all parts using the UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) operation. After successfully uploading all relevant parts of an upload, you call this action to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the Complete Multipart Upload request, you must provide the parts list. You must ensure that the parts list is complete. This action concatenates the parts that you provide in the list. For each part in the list, you must provide the part number and the ETag value, returned after that part was uploaded.
Processing of a Complete Multipart Upload request could take several minutes to complete. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. A request could fail after the initial 200 OK response has been sent. This means that a 200 OK response can contain either a success or an error. If you call the S3 API directly, make sure to design your application to parse the contents of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throws an exception (or, for the SDKs that don't use exceptions, they return the error).
Note that if CompleteMultipartUpload fails, applications should be prepared to retry the failed requests. For more information, see Amazon S3 Error Best Practices (docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html).
You cannot use Content-Type: application/x-www-form-urlencoded with Complete Multipart Upload requests. Also, if you do not provide a Content-Type header, CompleteMultipartUpload returns a 200 OK response.
For more information about multipart uploads, see Uploading Objects Using Multipart Upload (docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
For information about permissions required to use the multipart upload API, see Multipart Upload and Permissions (docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
CompleteMultipartUpload has the following special errors:
-
Error code: EntityTooSmall Description: Your proposed upload is smaller than the minimum allowed object size. Each part must be at least 5 MB in size, except the last part. 400 Bad Request
-
Error code: InvalidPart Description: One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. 400 Bad Request
-
Error code: InvalidPartOrder Description: The list of parts was not in ascending order. The parts list must be specified in order by part number. 400 Bad Request
-
Error code: NoSuchUpload Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. 404 Not Found
The following operations are related to CompleteMultipartUpload:
-
CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-
UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-
AbortMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-
ListParts (docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-
ListMultipartUploads (docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation CompleteMultipartUpload for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
323 324 325 326 |
// File 'service/s3/api.go', line 323
|
func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput)
You must call the Send() method on the returned request object in order to execute the request.
CompleteMultipartUploadRequest generates a request.Request object representing the client request for the CompleteMultipartUpload() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
// File 'service/s3/api.go', line 223
|
func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error)
CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of the ability to pass a context and additional request options.
See CompleteMultipartUpload for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
337 338 339 340 341 342 |
// File 'service/s3/api.go', line 337
|
func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error)
CopyObject API operation for Amazon Simple Storage Service.
Creates a copy of an object that is already stored in Amazon S3.
You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic action using this API. However, to copy an object greater than 5 GB, you must use the multipart upload Upload Part - Copy (UploadPartCopy) API. For more information, see Copy Object Using the REST Multipart Upload API (docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html).
All copy requests must be authenticated. Additionally, you must have read access to the source object and write access to the destination bucket. For more information, see REST Authentication (docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account.
A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. If the error occurs before the copy action starts, you receive a standard Amazon S3 error. If the error occurs during the copy operation, the error response is embedded in the 200 OK response. This means that a 200 OK response can contain either a success or an error. If you call the S3 API directly, make sure to design your application to parse the contents of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throws an exception (or, for the SDKs that don't use exceptions, they return the error).
If the copy is successful, you receive a response with information about the copied object.
If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not, it would not contain the content-length, and you would need to read the entire body.
The copy request charge is based on the storage class and Region that you specify for the destination object. The request can also result in a data retrieval charge for the source if the source storage class bills for data retrieval. For pricing information, see Amazon S3 pricing (aws.amazon.com/s3/pricing/).
Amazon S3 transfer acceleration does not support cross-Region copies. If you request a cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad Request error. For more information, see Transfer Acceleration (docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
Metadata
When copying an object, you can preserve all metadata (the default) or specify new metadata. However, the access control list (ACL) is not preserved and is set to private for the user making the request. To override the default ACL setting, specify a new ACL when generating a copy request. For more information, see Using ACLs (docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
To specify whether you want the object metadata copied from the source object or replaced with metadata provided in the request, you can optionally add the x-amz-metadata-directive header. When you grant permissions, you can use the s3:x-amz-metadata-directive condition key to enforce certain metadata behavior when objects are uploaded. For more information, see Specifying Conditions in a Policy (docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html) in the Amazon S3 User Guide. For a complete list of Amazon S3-specific condition keys, see Actions, Resources, and Condition Keys for Amazon S3 (docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html).
x-amz-website-redirect-location is unique to each object and must be specified in the request headers to copy the value.
x-amz-copy-source-if Headers
To only copy an object under certain conditions, such as whether the Etag matches or whether the object was modified before or after a specified date, use the following request parameters:
-
x-amz-copy-source-if-match
-
x-amz-copy-source-if-none-match
-
x-amz-copy-source-if-unmodified-since
-
x-amz-copy-source-if-modified-since
If both the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since headers are present in the request and evaluate as follows, Amazon S3 returns 200 OK and copies the data:
-
x-amz-copy-source-if-match condition evaluates to true
-
x-amz-copy-source-if-unmodified-since condition evaluates to false
If both the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since headers are present in the request and evaluate as follows, Amazon S3 returns the 412 Precondition Failed response code:
-
x-amz-copy-source-if-none-match condition evaluates to false
-
x-amz-copy-source-if-modified-since condition evaluates to true
All headers with the x-amz- prefix, including x-amz-copy-source, must be signed.
Server-side encryption
Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a default encryption configuration that uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with customer-provided encryption keys (SSE-C), Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.
When you perform a CopyObject operation, if you want to use a different type of encryption setting for the target object, you can use other appropriate encryption-related headers to encrypt the target object with a KMS key, an Amazon S3 managed key, or a customer-provided key. With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence. If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying. For more information about server-side encryption, see Using Server-Side Encryption (docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object. For more information, see Amazon S3 Bucket Keys (docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in the Amazon S3 User Guide.
Access Control List (ACL)-Specific Request Headers
When copying an object, you can optionally use headers to grant ACL-based permissions. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups that are defined by Amazon S3. These permissions are then added to the ACL on the object. For more information, see Access Control List (ACL) Overview (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) and Managing ACLs Using the REST API (docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
If the bucket that you're copying objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed in the XML format.
For more information, see Controlling ownership of objects and disabling ACLs (docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) in the Amazon S3 User Guide.
If your bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.
Checksums
When copying an object, if it has a checksum, that checksum will be copied to the new object by default. When you copy the object over, you can optionally specify a different checksum algorithm to use with the x-amz-checksum-algorithm header.
Storage Class Options
You can use the CopyObject action to change the storage class of an object that is already stored in Amazon S3 by using the StorageClass parameter. For more information, see Storage Classes (docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in the Amazon S3 User Guide.
If the source object's storage class is GLACIER or DEEP_ARCHIVE, or the object's storage class is INTELLIGENT_TIERING and it's S3 Intelligent-Tiering access tier (docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition) is Archive Access or Deep Archive Access, you must restore a copy of this object before you can use it as a source object for the copy operation. For more information, see RestoreObject (docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). For more information, see Copying Objects (docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html).
Versioning
By default, x-amz-copy-source header identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the versionId subresource.
If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for the object being copied. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the x-amz-version-id response header in the response.
If you do not enable versioning or suspend it on the target bucket, the version ID that Amazon S3 generates is always null.
The following operations are related to CopyObject:
-
PutObject (docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-
GetObject (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation CopyObject for usage and error information.
Returned Error Codes: - ErrCodeObjectNotInActiveTierError “ObjectNotInActiveTierError” The source object of the COPY action is not in the active tier and is only stored in Amazon S3 Glacier.
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
596 597 598 599 |
// File 'service/s3/api.go', line 596
|
func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput)
You must call the Send() method on the returned request object in order to execute the request.
CopyObjectRequest generates a request.Request object representing the client request for the CopyObject() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
// File 'service/s3/api.go', line 369
|
func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error)
CopyObjectWithContext is the same as CopyObject with the addition of the ability to pass a context and additional request options.
See CopyObject for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
610 611 612 613 614 615 |
// File 'service/s3/api.go', line 610
|
func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error)
CreateBucket API operation for Amazon Simple Storage Service.
Creates a new S3 bucket. To create a bucket, you must register with Amazon S3 and have a valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner.
Not every string is an acceptable bucket name. For information about bucket naming restrictions, see Bucket naming rules (docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
If you want to create an Amazon S3 on Outposts bucket, see Create Bucket (docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html).
By default, the bucket is created in the US East (N. Virginia) Region. You can optionally specify a Region in the request body. To constrain the bucket creation to a specific Region, you can use LocationConstraint (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketConfiguration.html) condition key. You might choose a Region to optimize latency, minimize costs, or address regulatory requirements. For example, if you reside in Europe, you will probably find it advantageous to create buckets in the Europe (Ireland) Region. For more information, see Accessing a bucket (docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
If you send your create bucket request to the s3.amazonaws.com endpoint, the request goes to the us-east-1 Region. Accordingly, the signature calculations in Signature Version 4 must use us-east-1 as the Region, even if the location constraint in the request specifies another Region where the bucket is to be created. If you create a bucket in a Region other than US East (N. Virginia), your application must be able to handle 307 redirect. For more information, see Virtual hosting of buckets (docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html).
Permissions
In addition to s3:CreateBucket, the following permissions are required when your CreateBucket request includes specific headers:
-
Access control lists (ACLs) - If your CreateBucket request specifies access control list (ACL) permissions and the ACL is public-read, public-read-write, authenticated-read, or if you specify access permissions explicitly through any other ACL, both s3:CreateBucket and s3:PutBucketAcl permissions are needed. If the ACL for the CreateBucket request is private or if the request doesn't specify any ACLs, only s3:CreateBucket permission is needed.
-
Object Lock - If ObjectLockEnabledForBucket is set to true in your CreateBucket request, s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning permissions are required.
-
S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership header, then the s3:PutBucketOwnershipControls permission is required. By default, ObjectOwnership is set to BucketOWnerEnforced and ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where you must control access for each object individually. If you want to change the ObjectOwnership setting, you can use the x-amz-object-ownership header in your CreateBucket request to set the ObjectOwnership setting of your choice. For more information about S3 Object Ownership, see Controlling object ownership (docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) in the Amazon S3 User Guide.
-
S3 Block Public Access - If your specific use case requires granting public access to your S3 resources, you can disable Block Public Access. You can create a new bucket with Block Public Access enabled, then separately call the DeletePublicAccessBlock (docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html) API. To use this operation, you must have the s3:PutBucketPublicAccessBlock permission. By default, all Block Public Access settings are enabled for new buckets. To avoid inadvertent exposure of your resources, we recommend keeping the S3 Block Public Access settings enabled. For more information about S3 Block Public Access, see Blocking public access to your Amazon S3 storage (docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) in the Amazon S3 User Guide.
If your CreateBucket request sets BucketOwnerEnforced for Amazon S3 Object Ownership and specifies a bucket ACL that provides access to an external Amazon Web Services account, your request fails with a 400 error and returns the InvalidBucketAcLWithObjectOwnership error code. For more information, see Setting Object Ownership on an existing bucket (docs.aws.amazon.com/AmazonS3/latest/userguide/object-ownership-existing-bucket.html) in the Amazon S3 User Guide.
The following operations are related to CreateBucket:
-
PutObject (docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-
DeleteBucket (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation CreateBucket for usage and error information.
Returned Error Codes:
-
ErrCodeBucketAlreadyExists "BucketAlreadyExists" The requested bucket name is not available. The bucket namespace is shared by all users of the system. Select a different name and try again.
-
ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou" The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all AWS Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs).
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
760 761 762 763 |
// File 'service/s3/api.go', line 760
|
func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput)
You must call the Send() method on the returned request object in order to execute the request.
CreateBucketRequest generates a request.Request object representing the client request for the CreateBucket() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 |
// File 'service/s3/api.go', line 642
|
func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error)
CreateBucketWithContext is the same as CreateBucket with the addition of the ability to pass a context and additional request options.
See CreateBucket for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
774 775 776 777 778 779 |
// File 'service/s3/api.go', line 774
|
func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error)
CreateMultipartUpload API operation for Amazon Simple Storage Service.
This action initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)). You also include this upload ID in the final request to either complete or abort the multipart upload request.
For more information about multipart uploads, see Multipart Upload Overview (docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html).
If you have configured a lifecycle rule to abort incomplete multipart uploads, the upload must complete within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration (docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
For information about the permissions required to use the multipart upload API, see Multipart Upload and Permissions (docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see Authenticating Requests (Amazon Web Services Signature Version 4) (docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stop charging you for storing them only after you either complete or abort a multipart upload.
Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. Amazon S3 automatically encrypts all new objects that are uploaded to an S3 bucket. When doing a multipart upload, if you don't specify encryption information in your request, the encryption setting of the uploaded parts is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a default encryption configuration that uses server-side encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the uploaded parts. When you perform a CreateMultipartUpload operation, if you want to use a different type of encryption setting for the uploaded parts, you can request that Amazon S3 encrypts the object with a KMS key, an Amazon S3 managed key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence. If you choose to provide your own encryption key, the request headers you provide in UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) and UploadPartCopy (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) requests must match the headers you used in the request to initiate the upload by using CreateMultipartUpload. You can request that Amazon S3 save the uploaded parts encrypted with server-side encryption with an Amazon S3 managed key (SSE-S3), an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key (SSE-C).
To perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester must have permission to the kms:Decrypt and kms:GenerateDataKey* actions on the key. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information, see Multipart upload API and permissions (docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions) and Protecting data using server-side encryption with Amazon Web Services KMS (docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) in the Amazon S3 User Guide.
If your Identity and Access Management (IAM) user or role is in the same Amazon Web Services account as the KMS key, then you must have these permissions on the key policy. If your IAM user or role belongs to a different account than the key, then you must have the permissions on both the key policy and your IAM user or role.
For more information, see Protecting Data Using Server-Side Encryption (docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
Access Permissions
When copying an object, you can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:
-
Specify a canned ACL with the x-amz-acl request header. For more information, see Canned ACL (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-
Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
You can use either a canned ACL or specify access permissions explicitly. You cannot do both.
Server-Side- Encryption-Specific Request Headers
Amazon S3 encrypts data by using server-side encryption with an Amazon S3 managed key (SSE-S3) by default. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. You can request that Amazon S3 encrypts data at rest by using server-side encryption with other key options. The option you use depends on whether you want to use KMS keys (SSE-KMS) or provide your own encryption keys (SSE-C).
-
Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key (aws/s3) and KMS customer managed keys stored in Key Management Service (KMS) – If you want Amazon Web Services to manage the keys used to encrypt data, specify the following headers in the request. x-amz-server-side-encryption x-amz-server-side-encryption-aws-kms-key-id x-amz-server-side-encryption-context If you specify x-amz-server-side-encryption:aws:kms, but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key (aws/s3 key) in KMS to protect the data. All GET and PUT requests for an object protected by KMS fail if you don't make them by using Secure Sockets Layer (SSL), Transport Layer Security (TLS), or Signature Version 4. For more information about server-side encryption with KMS keys (SSE-KMS), see Protecting Data Using Server-Side Encryption with KMS keys (docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html).
-
Use customer-provided encryption keys (SSE-C) – If you want to manage your own encryption keys, provide all the following headers in the request. x-amz-server-side-encryption-customer-algorithm x-amz-server-side-encryption-customer-key x-amz-server-side-encryption-customer-key-MD5 For more information about server-side encryption with customer-provided encryption keys (SSE-C), see Protecting data using server-side encryption with customer-provided encryption keys (SSE-C) (docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html).
Access-Control-List (ACL)-Specific Request Headers
You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the object. For more information, see Using ACLs (docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). With this operation, you can grant access permissions using one of the following two methods:
-
Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. For more information, see Canned ACL (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-
Specify access permissions explicitly — To explicitly grant access permissions to specific Amazon Web Services accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly, use: x-amz-grant-read x-amz-grant-write x-amz-grant-read-acp x-amz-grant-write-acp x-amz-grant-full-control You specify each grantee as a type=value pair, where the type is one of the following: id – if the value specified is the canonical user ID of an Amazon Web Services account uri – if you are granting permissions to a predefined group emailAddress – if the value specified is the email address of an Amazon Web Services account Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions: US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints (docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the Amazon Web Services General Reference. For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata: x-amz-grant-read: id=“11112222333”, id=“444455556666”
The following operations are related to CreateMultipartUpload:
-
UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-
CompleteMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-
AbortMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-
ListParts (docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-
ListMultipartUploads (docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation CreateMultipartUpload for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
1007 1008 1009 1010 |
// File 'service/s3/api.go', line 1007
|
func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput)
You must call the Send() method on the returned request object in order to execute the request.
CreateMultipartUploadRequest generates a request.Request object representing the client request for the CreateMultipartUpload() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 |
// File 'service/s3/api.go', line 806
|
func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error)
CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of the ability to pass a context and additional request options.
See CreateMultipartUpload for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1021 1022 1023 1024 1025 1026 |
// File 'service/s3/api.go', line 1021
|
func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error)
DeleteBucket API operation for Amazon Simple Storage Service.
Deletes the S3 bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.
The following operations are related to DeleteBucket:
-
CreateBucket (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-
DeleteObject (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeleteBucket for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
1088 1089 1090 1091 |
// File 'service/s3/api.go', line 1088
|
func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error)
DeleteBucketCors API operation for Amazon Simple Storage Service.
Deletes the cors configuration information set for the bucket.
To use this operation, you must have permission to perform the s3:PutBucketCORS action. The bucket owner has this permission by default and can grant this permission to others.
For information about cors, see Enabling Cross-Origin Resource Sharing (docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3 User Guide.
Related Resources
-
PutBucketCors (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
-
RESTOPTIONSobject (docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeleteBucketCors for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
1175 1176 1177 1178 |
// File 'service/s3/api.go', line 1175
|
func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeleteBucketCorsRequest generates a request.Request object representing the client request for the DeleteBucketCors() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 |
// File 'service/s3/api.go', line 1134
|
func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error)
DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of the ability to pass a context and additional request options.
See DeleteBucketCors for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1189 1190 1191 1192 1193 1194 |
// File 'service/s3/api.go', line 1189
|
func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error)
DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of rules contained in the deleted lifecycle configuration.
To use this operation, you must have permission to perform the s3:PutLifecycleConfiguration action. By default, the bucket owner has this permission and the bucket owner can grant this permission to others.
There is usually some time lag before lifecycle configuration deletion is fully propagated to all the Amazon S3 systems.
For more information about the object expiration, see Elements to Describe Lifecycle Actions (docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions).
Related actions include:
-
PutBucketLifecycleConfiguration (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-
GetBucketLifecycleConfiguration (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeleteBucketLifecycle for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
1269 1270 1271 1272 |
// File 'service/s3/api.go', line 1269
|
func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeleteBucketLifecycleRequest generates a request.Request object representing the client request for the DeleteBucketLifecycle() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 |
// File 'service/s3/api.go', line 1221
|
func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error)
DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of the ability to pass a context and additional request options.
See DeleteBucketLifecycle for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1283 1284 1285 1286 1287 1288 |
// File 'service/s3/api.go', line 1283
|
func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error)
DeleteBucketReplication API operation for Amazon Simple Storage Service.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeleteBucketReplication for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
1341 1342 1343 1344 |
// File 'service/s3/api.go', line 1341
|
func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeleteBucketReplicationRequest generates a request.Request object representing the client request for the DeleteBucketReplication() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 |
// File 'service/s3/api.go', line 1315
|
func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error)
DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of the ability to pass a context and additional request options.
See DeleteBucketReplication for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1355 1356 1357 1358 1359 1360 |
// File 'service/s3/api.go', line 1355
|
func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeleteBucketRequest generates a request.Request object representing the client request for the DeleteBucket() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 |
// File 'service/s3/api.go', line 1053
|
func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error)
DeleteBucketWebsite API operation for Amazon Simple Storage Service.
This action removes the website configuration for a bucket. Amazon S3 returns a 200 OK response upon successfully deleting a website configuration on the specified bucket. You will get a 200 OK response if the website configuration you are trying to delete does not exist on the bucket. Amazon S3 returns a 404 response if the bucket specified in the request does not exist.
This DELETE action requires the S3:DeleteBucketWebsite permission. By default, only the bucket owner can delete the website configuration attached to a bucket. However, bucket owners can grant other users permission to delete the website configuration by writing a bucket policy granting them the S3:DeleteBucketWebsite permission.
For more information about hosting websites, see Hosting Websites on Amazon S3 (docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
The following operations are related to DeleteBucketWebsite:
-
GetBucketWebsite (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html)
-
PutBucketWebsite (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeleteBucketWebsite for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
1434 1435 1436 1437 |
// File 'service/s3/api.go', line 1434
|
func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeleteBucketWebsiteRequest generates a request.Request object representing the client request for the DeleteBucketWebsite() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 |
// File 'service/s3/api.go', line 1387
|
func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error)
DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of the ability to pass a context and additional request options.
See DeleteBucketWebsite for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1448 1449 1450 1451 1452 1453 |
// File 'service/s3/api.go', line 1448
|
func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error)
DeleteBucketWithContext is the same as DeleteBucket with the addition of the ability to pass a context and additional request options.
See DeleteBucket for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1102 1103 1104 1105 1106 1107 |
// File 'service/s3/api.go', line 1102
|
func (c *S3) DeleteLegalHold(input *DeleteLegalHoldInput) (*DeleteLegalHoldOutput, error)
DeleteLegalHold API operation for Amazon Simple Storage Service.
Remove Legal hold on an object. The legal hold identifiers are stored in the object metadata along with the timestamp of when they are POSTed to the object. The presence of any legal hold identifiers prevents the modification or deletion of the object data, even if the retention period has expired.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeleteLegalHold for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteLegalHold
1511 1512 1513 1514 |
// File 'service/s3/api.go', line 1511
|
func (c *S3) DeleteLegalHoldRequest(input *DeleteLegalHoldInput) (req *request.Request, output *DeleteLegalHoldOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeleteLegalHoldRequest generates a request.Request object representing the client request for the DeleteLegalHold() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 |
// File 'service/s3/api.go', line 1480
|
func (c *S3) DeleteLegalHoldWithContext(ctx aws.Context, input *DeleteLegalHoldInput, opts ...request.Option) (*DeleteLegalHoldOutput, error)
DeleteLegalHoldWithContext is the same as DeleteLegalHold with the addition of the ability to pass a context and additional request options.
See DeleteLegalHold for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1525 1526 1527 1528 1529 1530 |
// File 'service/s3/api.go', line 1525
|
func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error)
DeleteObject API operation for Amazon Simple Storage Service.
Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects but will still respond that the command was successful.
To remove a specific version, you must use the version Id subresource. Using this subresource permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header, x-amz-delete-marker, to true.
If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the x-amz-mfa request header in the DELETE versionId request. Requests that include x-amz-mfa must use HTTPS.
For more information about MFA Delete, see Using MFA Delete (docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html). To see sample requests that use versioning, see Sample Request (docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete).
You can delete objects by explicitly calling DELETE Object or configure its lifecycle (PutBucketLifecycle (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)) to enable Amazon S3 to remove them for you. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration actions.
The following action is related to DeleteObject:
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeleteObject for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
1611 1612 1613 1614 |
// File 'service/s3/api.go', line 1611
|
func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeleteObjectRequest generates a request.Request object representing the client request for the DeleteObject() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 |
// File 'service/s3/api.go', line 1557
|
func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error)
DeleteObjects API operation for Amazon Simple Storage Service.
This action enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this action provides a suitable alternative to sending individual delete requests, reducing per-request overhead.
The request contains a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a delete action and returns the result of that delete, success, or failure, in the response. Note that if the object specified in the request is not found, Amazon S3 returns the result as deleted.
The action supports two modes for the response: verbose and quiet. By default, the action uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete action encountered an error. For a successful deletion, the action does not return any information about the delete in the response body.
When performing this action on an MFA Delete enabled bucket, that attempts to delete any versioned objects, you must include an MFA token. If you do not provide one, the entire request will fail, even if there are non-versioned objects you are trying to delete. If you provide an invalid token, whether there are versioned keys in the request or not, the entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA Delete (docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete).
Finally, the Content-MD5 header is required for all Multi-Object Delete requests. Amazon S3 uses the header value to ensure that your request body has not been altered in transit.
The following operations are related to DeleteObjects:
-
CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-
UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-
CompleteMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-
ListParts (docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-
AbortMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeleteObjects for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
1816 1817 1818 1819 |
// File 'service/s3/api.go', line 1816
|
func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeleteObjectsRequest generates a request.Request object representing the client request for the DeleteObjects() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 |
// File 'service/s3/api.go', line 1744
|
func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error)
DeleteObjectsWithContext is the same as DeleteObjects with the addition of the ability to pass a context and additional request options.
See DeleteObjects for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1830 1831 1832 1833 1834 1835 |
// File 'service/s3/api.go', line 1830
|
func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error)
DeleteObjectTagging API operation for Amazon Simple Storage Service.
Removes the entire tag set from the specified object. For more information about managing object tags, see Object Tagging (docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
To use this operation, you must have permission to perform the s3:DeleteObjectTagging action.
To delete tags of a specific object version, add the versionId query parameter in the request. You will need permission for the s3:DeleteObjectVersionTagging action.
The following operations are related to DeleteObjectTagging:
-
PutObjectTagging (docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
-
GetObjectTagging (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeleteObjectTagging for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
1698 1699 1700 1701 |
// File 'service/s3/api.go', line 1698
|
func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeleteObjectTaggingRequest generates a request.Request object representing the client request for the DeleteObjectTagging() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 |
// File 'service/s3/api.go', line 1657
|
func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error)
DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of the ability to pass a context and additional request options.
See DeleteObjectTagging for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1712 1713 1714 1715 1716 1717 |
// File 'service/s3/api.go', line 1712
|
func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error)
DeleteObjectWithContext is the same as DeleteObject with the addition of the ability to pass a context and additional request options.
See DeleteObject for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1625 1626 1627 1628 1629 1630 |
// File 'service/s3/api.go', line 1625
|
func (c *S3) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error)
DeletePublicAccessBlock API operation for Amazon Simple Storage Service.
Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock permission. For more information about permissions, see Permissions Related to Bucket Subresource Operations (docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) and Managing Access Permissions to Your Amazon S3 Resources (docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
The following operations are related to DeletePublicAccessBlock:
-
Using Amazon S3 Block Public Access (docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
-
GetPublicAccessBlock (docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-
PutPublicAccessBlock (docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-
GetBucketPolicyStatus (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation DeletePublicAccessBlock for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
1904 1905 1906 1907 |
// File 'service/s3/api.go', line 1904
|
func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput)
You must call the Send() method on the returned request object in order to execute the request.
DeletePublicAccessBlockRequest generates a request.Request object representing the client request for the DeletePublicAccessBlock() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 |
// File 'service/s3/api.go', line 1862
|
func (c *S3) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error)
DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of the ability to pass a context and additional request options.
See DeletePublicAccessBlock for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1918 1919 1920 1921 1922 1923 |
// File 'service/s3/api.go', line 1918
|
func (c *S3) ExtendObjectRetention(input *ExtendObjectRetentionInput) (*ExtendObjectRetentionOutput, error)
ExtendObjectRetention API operation for Amazon Simple Storage Service.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation ExtendObjectRetention for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ExtendObjectRetention
1976 1977 1978 1979 |
// File 'service/s3/api.go', line 1976
|
func (c *S3) ExtendObjectRetentionRequest(input *ExtendObjectRetentionInput) (req *request.Request, output *ExtendObjectRetentionOutput)
You must call the Send() method on the returned request object in order to execute the request.
ExtendObjectRetentionRequest generates a request.Request object representing the client request for the ExtendObjectRetention() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 |
// File 'service/s3/api.go', line 1950
|
func (c *S3) ExtendObjectRetentionWithContext(ctx aws.Context, input *ExtendObjectRetentionInput, opts ...request.Option) (*ExtendObjectRetentionOutput, error)
ExtendObjectRetentionWithContext is the same as ExtendObjectRetention with the addition of the ability to pass a context and additional request options.
See ExtendObjectRetention for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
1990 1991 1992 1993 1994 1995 |
// File 'service/s3/api.go', line 1990
|
func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error)
GetBucketAcl API operation for Amazon Simple Storage Service.
This implementation of the GET action uses the acl subresource to return the access control list (ACL) of a bucket. To use GET to return the ACL of the bucket, you must have READ_ACP access to the bucket. If READ_ACP permission is granted to the anonymous user, you can return the ACL of the bucket without using an authorization header.
Related Resources
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetBucketAcl for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
2057 2058 2059 2060 |
// File 'service/s3/api.go', line 2057
|
func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetBucketAclRequest generates a request.Request object representing the client request for the GetBucketAcl() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 |
// File 'service/s3/api.go', line 2022
|
func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error)
GetBucketAclWithContext is the same as GetBucketAcl with the addition of the ability to pass a context and additional request options.
See GetBucketAcl for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2071 2072 2073 2074 2075 2076 |
// File 'service/s3/api.go', line 2071
|
func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error)
GetBucketCors API operation for Amazon Simple Storage Service.
Returns the cors configuration information set for the bucket.
To use this operation, you must have permission to perform the s3:GetBucketCORS action. By default, the bucket owner has this permission and can grant it to others.
For more information about cors, see Enabling Cross-Origin Resource Sharing (docs.aws.amazon.com/AmazonS3/latest/dev/cors.html).
The following operations are related to GetBucketCors:
-
PutBucketCors (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
-
DeleteBucketCors (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetBucketCors for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
2143 2144 2145 2146 |
// File 'service/s3/api.go', line 2143
|
func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetBucketCorsRequest generates a request.Request object representing the client request for the GetBucketCors() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 |
// File 'service/s3/api.go', line 2103
|
func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error)
GetBucketCorsWithContext is the same as GetBucketCors with the addition of the ability to pass a context and additional request options.
See GetBucketCors for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2157 2158 2159 2160 2161 2162 |
// File 'service/s3/api.go', line 2157
|
func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error)
GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, or a combination of both. Accordingly, this section describes the latest API. The response describes the new filter element that you can use to specify a filter to select a subset of objects to which the rule applies. If you are using a previous version of the lifecycle configuration, it still works. For the earlier action, see GetBucketLifecycle (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html).
Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see Object Lifecycle Management (docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html).
To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration action. The bucket owner has this permission, by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations (docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) and Managing Access Permissions to Your Amazon S3 Resources (docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
GetBucketLifecycleConfiguration has the following special error:
-
Error code: NoSuchLifecycleConfiguration Description: The lifecycle configuration does not exist. HTTP Status Code: 404 Not Found SOAP Fault Code Prefix: Client
The following operations are related to GetBucketLifecycleConfiguration:
-
GetBucketLifecycle (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)
-
PutBucketLifecycle (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
-
DeleteBucketLifecycle (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetBucketLifecycleConfiguration for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
2245 2246 2247 2248 |
// File 'service/s3/api.go', line 2245
|
func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetBucketLifecycleConfigurationRequest generates a request.Request object representing the client request for the GetBucketLifecycleConfiguration() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 |
// File 'service/s3/api.go', line 2189
|
func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error)
GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of the ability to pass a context and additional request options.
See GetBucketLifecycleConfiguration for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2259 2260 2261 2262 2263 2264 |
// File 'service/s3/api.go', line 2259
|
func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error)
GetBucketLocation API operation for Amazon Simple Storage Service.
Returns the Region the bucket resides in. You set the bucket's Region using the LocationConstraint request parameter in a CreateBucket request. For more information, see CreateBucket (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html).
To use this implementation of the operation, you must be the bucket owner.
The following operations are related to GetBucketLocation:
-
GetObject (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-
CreateBucket (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetBucketLocation for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
2328 2329 2330 2331 |
// File 'service/s3/api.go', line 2328
|
func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetBucketLocationRequest generates a request.Request object representing the client request for the GetBucketLocation() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 |
// File 'service/s3/api.go', line 2291
|
func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error)
GetBucketLocationWithContext is the same as GetBucketLocation with the addition of the ability to pass a context and additional request options.
See GetBucketLocation for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2342 2343 2344 2345 2346 2347 |
// File 'service/s3/api.go', line 2342
|
func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error)
GetBucketLogging API operation for Amazon Simple Storage Service.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetBucketLogging for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
2399 2400 2401 2402 |
// File 'service/s3/api.go', line 2399
|
func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetBucketLoggingRequest generates a request.Request object representing the client request for the GetBucketLogging() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 |
// File 'service/s3/api.go', line 2374
|
func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error)
GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of the ability to pass a context and additional request options.
See GetBucketLogging for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2413 2414 2415 2416 2417 2418 |
// File 'service/s3/api.go', line 2413
|
func (c *S3) GetBucketProtectionConfiguration(input *GetBucketProtectionConfigurationInput) (*GetBucketProtectionConfigurationOutput, error)
GetBucketProtectionConfiguration API operation for Amazon Simple Storage Service.
Returns the protection configuration of a bucket.EnablePermanentRetention flag will only be returned if the flag is set to true for a bucket.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetBucketProtectionConfiguration for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketProtectionConfiguration
2473 2474 2475 2476 |
// File 'service/s3/api.go', line 2473
|
func (c *S3) GetBucketProtectionConfigurationRequest(input *GetBucketProtectionConfigurationInput) (req *request.Request, output *GetBucketProtectionConfigurationOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetBucketProtectionConfigurationRequest generates a request.Request object representing the client request for the GetBucketProtectionConfiguration() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 |
// File 'service/s3/api.go', line 2445
|
func (c *S3) GetBucketProtectionConfigurationWithContext(ctx aws.Context, input *GetBucketProtectionConfigurationInput, opts ...request.Option) (*GetBucketProtectionConfigurationOutput, error)
GetBucketProtectionConfigurationWithContext is the same as GetBucketProtectionConfiguration with the addition of the ability to pass a context and additional request options.
See GetBucketProtectionConfiguration for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2487 2488 2489 2490 2491 2492 |
// File 'service/s3/api.go', line 2487
|
func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error)
GetBucketReplication API operation for Amazon Simple Storage Service.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetBucketReplication for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
2544 2545 2546 2547 |
// File 'service/s3/api.go', line 2544
|
func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetBucketReplicationRequest generates a request.Request object representing the client request for the GetBucketReplication() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 |
// File 'service/s3/api.go', line 2519
|
func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error)
GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of the ability to pass a context and additional request options.
See GetBucketReplication for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2558 2559 2560 2561 2562 2563 |
// File 'service/s3/api.go', line 2558
|
func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error)
GetBucketVersioning API operation for Amazon Simple Storage Service.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetBucketVersioning for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
2615 2616 2617 2618 |
// File 'service/s3/api.go', line 2615
|
func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetBucketVersioningRequest generates a request.Request object representing the client request for the GetBucketVersioning() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 |
// File 'service/s3/api.go', line 2590
|
func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error)
GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of the ability to pass a context and additional request options.
See GetBucketVersioning for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2629 2630 2631 2632 2633 2634 |
// File 'service/s3/api.go', line 2629
|
func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error)
GetBucketWebsite API operation for Amazon Simple Storage Service.
Returns the website configuration for a bucket. To host website on Amazon S3, you can configure a bucket as website by adding a website configuration. For more information about hosting websites, see Hosting Websites on Amazon S3 (docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
This GET action requires the S3:GetBucketWebsite permission. By default, only the bucket owner can read the bucket website configuration. However, bucket owners can allow other users to read the website configuration by writing a bucket policy granting them the S3:GetBucketWebsite permission.
The following operations are related to DeleteBucketWebsite:
-
DeleteBucketWebsite (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html)
-
PutBucketWebsite (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetBucketWebsite for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
2702 2703 2704 2705 |
// File 'service/s3/api.go', line 2702
|
func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetBucketWebsiteRequest generates a request.Request object representing the client request for the GetBucketWebsite() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 |
// File 'service/s3/api.go', line 2661
|
func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error)
GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of the ability to pass a context and additional request options.
See GetBucketWebsite for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2716 2717 2718 2719 2720 2721 |
// File 'service/s3/api.go', line 2716
|
func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error)
GetObject API operation for Amazon Simple Storage Service.
Retrieves objects from Amazon S3. To use GET, you must have READ access to the object. If you grant READ access to the anonymous user, you can return the object without using an authorization header.
An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer file system. You can, however, create a logical hierarchy by using object key names that imply a folder structure. For example, instead of naming an object sample.jpg, you can name it photos/2006/February/sample.jpg.
To get an object from such a logical hierarchy, specify the full key name for the object in the GET operation. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg, specify the resource as /photos/2006/February/sample.jpg. For a path-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named examplebucket, specify the resource as /examplebucket/photos/2006/February/sample.jpg. For more information about request types, see HTTP Host Header Bucket Specification (docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket).
To distribute large files to many people, you can save bandwidth costs by using BitTorrent. For more information, see Amazon S3 Torrent (docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html). For more information about returning the ACL of an object, see GetObjectAcl (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html).
If the object you are retrieving is stored in the S3 Glacier or S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a copy using RestoreObject (docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). Otherwise, this action returns an InvalidObjectStateError error. For information about restoring archived objects, see Restoring Archived Objects (docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html).
Encryption request headers, like x-amz-server-side-encryption, should not be sent for GET requests if your object uses server-side encryption with CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 BadRequest error.
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:
-
x-amz-server-side-encryption-customer-algorithm
-
x-amz-server-side-encryption-customer-key
-
x-amz-server-side-encryption-customer-key-MD5
For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) (docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
Assuming you have permission to read object tags (permission for the s3:GetObjectVersionTagging action), the response also returns the x-amz-tagging-count header that provides the count of number of tags associated with the object. You can use GetObjectTagging (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) to retrieve the tag set associated with an object.
Permissions
You need the s3:GetObject permission for this operation. For more information, see Specifying Permissions in a Policy (docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the s3:ListBucket permission.
-
If you have the s3:ListBucket permission on the bucket, Amazon S3 will return an HTTP status code 404 ("no such key") error.
-
If you don’t have the s3:ListBucket permission, Amazon S3 will return an HTTP status code 403 (“access denied”) error.
Versioning
By default, the GET action returns the current version of an object. To return a different version, use the versionId subresource.
If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes x-amz-delete-marker: true in the response.
For more information about versioning, see PutBucketVersioning (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html).
Overriding Response Header Values
There are times when you want to override certain response header values in a GET response. For example, you might override the Content-Disposition response header value in your GET request.
You can override values for a set of response headers using the following query parameters. These response header values are sent only on a successful request, that is, when status code 200 OK is returned. The set of headers you can override using these parameters is a subset of the headers that Amazon S3 accepts when you create an object. The response headers that you can override for the GET response are Content-Type, Content-Language, Expires, Cache-Control, Content-Disposition, and Content-Encoding. To override these header values in the GET response, you use the following request parameters.
You must sign the request, either using an Authorization header or a presigned URL, when using these parameters. They cannot be used with an unsigned (anonymous) request.
-
response-content-type
-
response-content-language
-
response-expires
-
response-cache-control
-
response-content-disposition
-
response-content-encoding
Additional Considerations about Request Headers
If both of the If-Match and If-Unmodified-Since headers are present in the request as follows: If-Match condition evaluates to true, and; If-Unmodified-Since condition evaluates to false; then, S3 returns 200 OK and the data requested.
If both of the If-None-Match and If-Modified-Since headers are present in the request as follows:If-None-Match condition evaluates to false, and; If-Modified-Since condition evaluates to true; then, S3 returns 304 Not Modified response code.
For more information about conditional requests, see RFC 7232 (tools.ietf.org/html/rfc7232).
The following operations are related to GetObject:
-
ListBuckets (docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
-
GetObjectAcl (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetObject for usage and error information.
Returned Error Codes:
-
ErrCodeNoSuchKey "NoSuchKey" The specified key does not exist.
-
ErrCodeInvalidObjectState "InvalidObjectState" Object is archived and inaccessible until restored.
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
2910 2911 2912 2913 |
// File 'service/s3/api.go', line 2910
|
func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error)
GetObjectAcl API operation for Amazon Simple Storage Service.
Returns the access control list (ACL) of an object. To use this operation, you must have READ_ACP access to the object.
This action is not supported by Amazon S3 on Outposts.
Versioning
By default, GET returns ACL information about the current version of an object. To return ACL information about a different version, use the versionId subresource.
The following operations are related to GetObjectAcl:
-
GetObject (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-
DeleteObject (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-
PutObject (docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetObjectAcl for usage and error information.
Returned Error Codes: - ErrCodeNoSuchKey “NoSuchKey” The specified key does not exist.
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
3004 3005 3006 3007 |
// File 'service/s3/api.go', line 3004
|
func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetObjectAclRequest generates a request.Request object representing the client request for the GetObjectAcl() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 |
// File 'service/s3/api.go', line 2956
|
func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error)
GetObjectAclWithContext is the same as GetObjectAcl with the addition of the ability to pass a context and additional request options.
See GetObjectAcl for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3018 3019 3020 3021 3022 3023 |
// File 'service/s3/api.go', line 3018
|
func (c *S3) GetObjectLegalHold(input *GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error)
GetObjectLegalHold API operation for Amazon Simple Storage Service.
Gets an object's current legal hold status. For more information, see Locking Objects (docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
This action is not supported by Amazon S3 on Outposts.
The following action is related to GetObjectLegalHold:
-
GetObjectAttributes (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetObjectLegalHold for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
3084 3085 3086 3087 |
// File 'service/s3/api.go', line 3084
|
func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetObjectLegalHoldRequest generates a request.Request object representing the client request for the GetObjectLegalHold() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 |
// File 'service/s3/api.go', line 3050
|
func (c *S3) GetObjectLegalHoldWithContext(ctx aws.Context, input *GetObjectLegalHoldInput, opts ...request.Option) (*GetObjectLegalHoldOutput, error)
GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of the ability to pass a context and additional request options.
See GetObjectLegalHold for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3098 3099 3100 3101 3102 3103 |
// File 'service/s3/api.go', line 3098
|
func (c *S3) GetObjectLockConfiguration(input *GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error)
GetObjectLockConfiguration API operation for Amazon Simple Storage Service.
Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects (docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
The following action is related to GetObjectLockConfiguration:
-
GetObjectAttributes (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetObjectLockConfiguration for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
3164 3165 3166 3167 |
// File 'service/s3/api.go', line 3164
|
func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetObjectLockConfigurationRequest generates a request.Request object representing the client request for the GetObjectLockConfiguration() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 |
// File 'service/s3/api.go', line 3130
|
func (c *S3) GetObjectLockConfigurationWithContext(ctx aws.Context, input *GetObjectLockConfigurationInput, opts ...request.Option) (*GetObjectLockConfigurationOutput, error)
GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of the ability to pass a context and additional request options.
See GetObjectLockConfiguration for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3178 3179 3180 3181 3182 3183 |
// File 'service/s3/api.go', line 3178
|
func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetObjectRequest generates a request.Request object representing the client request for the GetObject() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 |
// File 'service/s3/api.go', line 2748
|
func (c *S3) GetObjectRetention(input *GetObjectRetentionInput) (*GetObjectRetentionOutput, error)
GetObjectRetention API operation for Amazon Simple Storage Service.
Retrieves an object's retention settings. For more information, see Locking Objects (docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
This action is not supported by Amazon S3 on Outposts.
The following action is related to GetObjectRetention:
-
GetObjectAttributes (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetObjectRetention for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
3244 3245 3246 3247 |
// File 'service/s3/api.go', line 3244
|
func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetObjectRetentionRequest generates a request.Request object representing the client request for the GetObjectRetention() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 |
// File 'service/s3/api.go', line 3210
|
func (c *S3) GetObjectRetentionWithContext(ctx aws.Context, input *GetObjectRetentionInput, opts ...request.Option) (*GetObjectRetentionOutput, error)
GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of the ability to pass a context and additional request options.
See GetObjectRetention for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3258 3259 3260 3261 3262 3263 |
// File 'service/s3/api.go', line 3258
|
func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error)
GetObjectTagging API operation for Amazon Simple Storage Service.
Returns the tag-set of an object. You send the GET request against the tagging subresource associated with the object.
To use this operation, you must have permission to perform the s3:GetObjectTagging action. By default, the GET action returns information about current version of an object. For a versioned bucket, you can have multiple versions of an object in your bucket. To retrieve tags of any other version, use the versionId query parameter. You also need permission for the s3:GetObjectVersionTagging action.
By default, the bucket owner has this permission and can grant this permission to others.
For information about the Amazon S3 object tagging feature, see Object Tagging (docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
The following action is related to GetObjectTagging:
-
PutObjectTagging (docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
-
DeleteObjectTagging (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetObjectTagging for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
3337 3338 3339 3340 |
// File 'service/s3/api.go', line 3337
|
func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetObjectTaggingRequest generates a request.Request object representing the client request for the GetObjectTagging() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 |
// File 'service/s3/api.go', line 3290
|
func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error)
GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of the ability to pass a context and additional request options.
See GetObjectTagging for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3351 3352 3353 3354 3355 3356 |
// File 'service/s3/api.go', line 3351
|
func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error)
GetObjectWithContext is the same as GetObject with the addition of the ability to pass a context and additional request options.
See GetObject for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
2924 2925 2926 2927 2928 2929 |
// File 'service/s3/api.go', line 2924
|
func (c *S3) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error)
GetPublicAccessBlock API operation for Amazon Simple Storage Service.
Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation, you must have the s3:GetBucketPublicAccessBlock permission. For more information about Amazon S3 permissions, see Specifying Permissions in a Policy (docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or an object, it checks the PublicAccessBlock configuration for both the bucket (or the bucket that contains the object) and the bucket owner's account. If the PublicAccessBlock settings are different between the bucket and the account, Amazon S3 uses the most restrictive combination of the bucket-level and account-level settings.
For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of “Public” (docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
The following operations are related to GetPublicAccessBlock:
-
Using Amazon S3 Block Public Access (docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
-
PutPublicAccessBlock (docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-
GetPublicAccessBlock (docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-
DeletePublicAccessBlock (docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation GetPublicAccessBlock for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
3433 3434 3435 3436 |
// File 'service/s3/api.go', line 3433
|
func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput)
You must call the Send() method on the returned request object in order to execute the request.
GetPublicAccessBlockRequest generates a request.Request object representing the client request for the GetPublicAccessBlock() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 |
// File 'service/s3/api.go', line 3383
|
func (c *S3) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error)
GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of the ability to pass a context and additional request options.
See GetPublicAccessBlock for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3447 3448 3449 3450 3451 3452 |
// File 'service/s3/api.go', line 3447
|
func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error)
HeadBucket API operation for Amazon Simple Storage Service.
This action is useful to determine if a bucket exists and you have permission to access it. The action returns a 200 OK if the bucket exists and you have permission to access it.
If the bucket does not exist or you do not have permission to access it, the HEAD request returns a generic 400 Bad Request, 403 Forbidden or 404 Not Found code. A message body is not included, so you cannot determine the exception beyond these error codes.
To use this operation, you must have permissions to perform the s3:ListBucket action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations (docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) and Managing Access Permissions to Your Amazon S3 Resources (docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
To use this API operation against 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 AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using the Amazon Web Services SDKs, you provide the ARN in place of the bucket name. For more information, see Using access points (docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html).
To use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes (docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList).
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation HeadBucket for usage and error information.
Returned Error Codes: - ErrCodeNoSuchBucket “NoSuchBucket” The specified bucket does not exist.
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
3537 3538 3539 3540 |
// File 'service/s3/api.go', line 3537
|
func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput)
You must call the Send() method on the returned request object in order to execute the request.
HeadBucketRequest generates a request.Request object representing the client request for the HeadBucket() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 |
// File 'service/s3/api.go', line 3479
|
func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error)
HeadBucketWithContext is the same as HeadBucket with the addition of the ability to pass a context and additional request options.
See HeadBucket for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3551 3552 3553 3554 3555 3556 |
// File 'service/s3/api.go', line 3551
|
func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error)
HeadObject API operation for Amazon Simple Storage Service.
The HEAD action retrieves metadata from an object without returning the object itself. This action is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.
A HEAD request has the same options as a GET action on an object. The response is identical to the GET response except that there is no response body. Because of this, if the HEAD request generates an error, it returns a generic 400 Bad Request, 403 Forbidden or 404 Not Found code. It is not possible to retrieve the exact exception beyond these error codes.
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 retrieve the metadata from the object, you must use the following headers:
-
x-amz-server-side-encryption-customer-algorithm
-
x-amz-server-side-encryption-customer-key
-
x-amz-server-side-encryption-customer-key-MD5
For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) (docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
-
Encryption request headers, like x-amz-server-side-encryption, should not be sent for GET requests if your object uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3 managed encryption keys (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 Bad Request error.
-
The last modified property in this case is the creation date of the object.
Request headers are limited to 8 KB in size. For more information, see Common Request Headers (docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html).
Consider the following when using request headers:
-
Consideration 1 – If both of the If-Match and If-Unmodified-Since headers are present in the request as follows: If-Match condition evaluates to true, and; If-Unmodified-Since condition evaluates to false; Then Amazon S3 returns 200 OK and the data requested.
-
Consideration 2 – If both of the If-None-Match and If-Modified-Since headers are present in the request as follows: If-None-Match condition evaluates to false, and; If-Modified-Since condition evaluates to true; Then Amazon S3 returns the 304 Not Modified response code.
For more information about conditional requests, see RFC 7232 (tools.ietf.org/html/rfc7232).
Permissions
You need the relevant read object (or version) permission for this operation. For more information, see Actions, resources, and condition keys for Amazon S3 (docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html). If the object you request doesn't exist, the error that Amazon S3 returns depends on whether you also have the s3:ListBucket permission.
-
If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an HTTP status code 404 error.
-
If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP status code 403 error.
The following actions are related to HeadObject:
-
GetObject (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-
GetObjectAttributes (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
See docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses for more information on returned errors.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation HeadObject for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
3681 3682 3683 3684 |
// File 'service/s3/api.go', line 3681
|
func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput)
You must call the Send() method on the returned request object in order to execute the request.
HeadObjectRequest generates a request.Request object representing the client request for the HeadObject() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 |
// File 'service/s3/api.go', line 3583
|
func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error)
HeadObjectWithContext is the same as HeadObject with the addition of the ability to pass a context and additional request options.
See HeadObject for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3695 3696 3697 3698 3699 3700 |
// File 'service/s3/api.go', line 3695
|
func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error)
ListBuckets API operation for Amazon Simple Storage Service.
Returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the s3:ListAllMyBuckets permission.
For information about Amazon S3 buckets, see Creating, configuring, and working with Amazon S3 buckets (docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html).
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation ListBuckets for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
3758 3759 3760 3761 |
// File 'service/s3/api.go', line 3758
|
func (c *S3) ListBucketsExtended(input *ListBucketsExtendedInput) (*ListBucketsExtendedOutput, error)
ListBucketsExtended API operation for Amazon Simple Storage Service.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation ListBucketsExtended for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsExtended
3835 3836 3837 3838 |
// File 'service/s3/api.go', line 3835
|
func (c *S3) ListBucketsExtendedPages(input *ListBucketsExtendedInput, fn func(*ListBucketsExtendedOutput, bool) bool) error
This operation can generate multiple requests to a service.
ListBucketsExtendedPages iterates over the pages of a ListBucketsExtended() operation, calling the fn
function callback with the response data in each page. To stop iterating, return false
from the function callback.
3872 3873 3874 |
// File 'service/s3/api.go', line 3872
|
func (c *S3) ListBucketsExtendedPagesWithContext(ctx aws.Context, input *ListBucketsExtendedInput, fn func(*ListBucketsExtendedOutput, bool) bool, opts ...request.Option) error
ListBucketsExtendedPagesWithContext same as ListBucketsExtendedPages except it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 |
// File 'service/s3/api.go', line 3883
|
func (c *S3) ListBucketsExtendedRequest(input *ListBucketsExtendedInput) (req *request.Request, output *ListBucketsExtendedOutput)
You must call the Send() method on the returned request object in order to execute the request.
ListBucketsExtendedRequest generates a request.Request object representing the client request for the ListBucketsExtended() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 |
// File 'service/s3/api.go', line 3804
|
func (c *S3) ListBucketsExtendedWithContext(ctx aws.Context, input *ListBucketsExtendedInput, opts ...request.Option) (*ListBucketsExtendedOutput, error)
ListBucketsExtendedWithContext is the same as ListBucketsExtended with the addition of the ability to pass a context and additional request options.
See ListBucketsExtended for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3849 3850 3851 3852 3853 3854 |
// File 'service/s3/api.go', line 3849
|
func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput)
You must call the Send() method on the returned request object in order to execute the request.
ListBucketsRequest generates a request.Request object representing the client request for the ListBuckets() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 |
// File 'service/s3/api.go', line 3727
|
func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error)
ListBucketsWithContext is the same as ListBuckets with the addition of the ability to pass a context and additional request options.
See ListBuckets for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3772 3773 3774 3775 3776 3777 |
// File 'service/s3/api.go', line 3772
|
func (c *S3) ListLegalHolds(input *ListLegalHoldsInput) (*ListLegalHoldsOutput, error)
ListLegalHolds API operation for Amazon Simple Storage Service.
Returns a list of legal holds on an object.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation ListLegalHolds for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListLegalHolds
3959 3960 3961 3962 |
// File 'service/s3/api.go', line 3959
|
func (c *S3) ListLegalHoldsRequest(input *ListLegalHoldsInput) (req *request.Request, output *ListLegalHoldsOutput)
You must call the Send() method on the returned request object in order to execute the request.
ListLegalHoldsRequest generates a request.Request object representing the client request for the ListLegalHolds() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 |
// File 'service/s3/api.go', line 3932
|
func (c *S3) ListLegalHoldsWithContext(ctx aws.Context, input *ListLegalHoldsInput, opts ...request.Option) (*ListLegalHoldsOutput, error)
ListLegalHoldsWithContext is the same as ListLegalHolds with the addition of the ability to pass a context and additional request options.
See ListLegalHolds for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
3973 3974 3975 3976 3977 3978 |
// File 'service/s3/api.go', line 3973
|
func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error)
ListMultipartUploads API operation for Amazon Simple Storage Service.
This action lists in-progress multipart uploads. An in-progress multipart upload is a multipart upload that has been initiated using the Initiate Multipart Upload request, but has not yet been completed or aborted.
This action returns at most 1,000 multipart uploads in the response. 1,000 multipart uploads is the maximum number of uploads a response can include, which is also the default value. You can further limit the number of uploads in a response by specifying the max-uploads parameter in the response. If additional multipart uploads satisfy the list criteria, the response will contain an IsTruncated element with the value true. To list the additional multipart uploads, use the key-marker and upload-id-marker request parameters.
In the response, the uploads are sorted by key. If your application has initiated more than one multipart upload using the same object key, then uploads in the response are first sorted by key. Additionally, uploads are sorted in ascending order within each key by the upload initiation time.
For more information on multipart uploads, see Uploading Objects Using Multipart Upload (docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
For information on permissions required to use the multipart upload API, see Multipart Upload and Permissions (docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
The following operations are related to ListMultipartUploads:
-
CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-
UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-
CompleteMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-
ListParts (docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-
AbortMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation ListMultipartUploads for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
4071 4072 4073 4074 |
// File 'service/s3/api.go', line 4071
|
func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error
This operation can generate multiple requests to a service.
ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads() operation, calling the fn
function callback with the response data in each page. To stop iterating, return false
from the function callback.
4108 4109 4110 |
// File 'service/s3/api.go', line 4108
|
func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error
ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 |
// File 'service/s3/api.go', line 4119
|
func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput)
You must call the Send() method on the returned request object in order to execute the request.
ListMultipartUploadsRequest generates a request.Request object representing the client request for the ListMultipartUploads() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 |
// File 'service/s3/api.go', line 4005
|
func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error)
ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of the ability to pass a context and additional request options.
See ListMultipartUploads for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4085 4086 4087 4088 4089 4090 |
// File 'service/s3/api.go', line 4085
|
func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error)
ListObjects API operation for Amazon Simple Storage Service.
Returns some or all (up to 1,000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Be sure to design your application to parse the contents of the response and handle it appropriately.
This action has been revised. We recommend that you use the newer version, ListObjectsV2 (docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html), when developing applications. For backward compatibility, Amazon S3 continues to support ListObjects.
The following operations are related to ListObjects:
-
ListObjectsV2 (docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
-
GetObject (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-
PutObject (docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-
CreateBucket (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-
ListBuckets (docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation ListObjects for usage and error information.
Returned Error Codes: - ErrCodeNoSuchBucket “NoSuchBucket” The specified bucket does not exist.
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
4379 4380 4381 4382 |
// File 'service/s3/api.go', line 4379
|
func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error
This operation can generate multiple requests to a service.
ListObjectsPages iterates over the pages of a ListObjects() operation, calling the fn
function callback with the response data in each page. To stop iterating, return false
from the function callback.
4416 4417 4418 |
// File 'service/s3/api.go', line 4416
|
func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error
ListObjectsPagesWithContext same as ListObjectsPages except it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 |
// File 'service/s3/api.go', line 4427
|
func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput)
You must call the Send() method on the returned request object in order to execute the request.
ListObjectsRequest generates a request.Request object representing the client request for the ListObjects() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 |
// File 'service/s3/api.go', line 4320
|
func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error)
ListObjectsV2 API operation for Amazon Simple Storage Service.
Returns some or all (up to 1,000) of the objects in a bucket with each request. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. Objects are returned sorted in an ascending order of the respective key names in the list. For more information about listing objects, see Listing object keys programmatically (docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html) in the Amazon S3 User Guide.
To use this operation, you must have READ access to the bucket.
To use this action in an Identity and Access Management (IAM) policy, you must have permission to perform the s3:ListBucket action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations (docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) and Managing Access Permissions to Your Amazon S3 Resources (docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) in the Amazon S3 User Guide.
This section describes the latest revision of this action. We recommend that you use this revised API operation for application development. For backward compatibility, Amazon S3 continues to support the prior version of this API operation, ListObjects (docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html).
To get a list of your buckets, see ListBuckets (docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html).
The following operations are related to ListObjectsV2:
-
GetObject (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-
PutObject (docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-
CreateBucket (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation ListObjectsV2 for usage and error information.
Returned Error Codes: - ErrCodeNoSuchBucket “NoSuchBucket” The specified bucket does not exist.
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
4546 4547 4548 4549 |
// File 'service/s3/api.go', line 4546
|
func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error
This operation can generate multiple requests to a service.
ListObjectsV2Pages iterates over the pages of a ListObjectsV2() operation, calling the fn
function callback with the response data in each page. To stop iterating, return false
from the function callback.
4583 4584 4585 |
// File 'service/s3/api.go', line 4583
|
func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error
ListObjectsV2PagesWithContext same as ListObjectsV2Pages except it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 |
// File 'service/s3/api.go', line 4594
|
func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output)
You must call the Send() method on the returned request object in order to execute the request.
ListObjectsV2Request generates a request.Request object representing the client request for the ListObjectsV2() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 |
// File 'service/s3/api.go', line 4476
|
func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error)
ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of the ability to pass a context and additional request options.
See ListObjectsV2 for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4560 4561 4562 4563 4564 4565 |
// File 'service/s3/api.go', line 4560
|
func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error)
ListObjectsWithContext is the same as ListObjects with the addition of the ability to pass a context and additional request options.
See ListObjects for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4393 4394 4395 4396 4397 4398 |
// File 'service/s3/api.go', line 4393
|
func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error)
ListObjectVersions API operation for Amazon Simple Storage Service.
Returns metadata about all versions of the objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions.
To use this operation, you must have permission to perform the s3:ListBucketVersions action. Be aware of the name difference.
A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.
To use this operation, you must have READ access to the bucket.
This action is not supported by Amazon S3 on Outposts.
The following operations are related to ListObjectVersions:
-
ListObjectsV2 (docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
-
GetObject (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-
PutObject (docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-
DeleteObject (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation ListObjectVersions for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
4223 4224 4225 4226 |
// File 'service/s3/api.go', line 4223
|
func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error
This operation can generate multiple requests to a service.
ListObjectVersionsPages iterates over the pages of a ListObjectVersions() operation, calling the fn
function callback with the response data in each page. To stop iterating, return false
from the function callback.
4260 4261 4262 |
// File 'service/s3/api.go', line 4260
|
func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error
ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 |
// File 'service/s3/api.go', line 4271
|
func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput)
You must call the Send() method on the returned request object in order to execute the request.
ListObjectVersionsRequest generates a request.Request object representing the client request for the ListObjectVersions() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 |
// File 'service/s3/api.go', line 4168
|
func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error)
ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of the ability to pass a context and additional request options.
See ListObjectVersions for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4237 4238 4239 4240 4241 4242 |
// File 'service/s3/api.go', line 4237
|
func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error)
ListParts API operation for Amazon Simple Storage Service.
Lists the parts that have been uploaded for a specific multipart upload. This operation must include the upload ID, which you obtain by sending the initiate multipart upload request (see CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)). This request returns a maximum of 1,000 uploaded parts. The default number of parts returned is 1,000 parts. You can restrict the number of parts returned by specifying the max-parts request parameter. If your multipart upload consists of more than 1,000 parts, the response returns an IsTruncated field with the value of true, and a NextPartNumberMarker element. In subsequent ListParts requests you can include the part-number-marker query string parameter and set its value to the NextPartNumberMarker field value from the previous response.
If the upload was created using a checksum algorithm, you will need to have permission to the kms:Decrypt action for the request to succeed.
For more information on multipart uploads, see Uploading Objects Using Multipart Upload (docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
For information on permissions required to use the multipart upload API, see Multipart Upload and Permissions (docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
The following operations are related to ListParts:
-
CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-
UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-
CompleteMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-
AbortMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-
GetObjectAttributes (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-
ListMultipartUploads (docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation ListParts for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
4708 4709 4710 4711 |
// File 'service/s3/api.go', line 4708
|
func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error
This operation can generate multiple requests to a service.
ListPartsPages iterates over the pages of a ListParts() operation, calling the fn
function callback with the response data in each page. To stop iterating, return false
from the function callback.
4745 4746 4747 |
// File 'service/s3/api.go', line 4745
|
func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error
ListPartsPagesWithContext same as ListPartsPages except it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 |
// File 'service/s3/api.go', line 4756
|
func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput)
You must call the Send() method on the returned request object in order to execute the request.
ListPartsRequest generates a request.Request object representing the client request for the ListParts() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 |
// File 'service/s3/api.go', line 4643
|
func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error)
ListPartsWithContext is the same as ListParts with the addition of the ability to pass a context and additional request options.
See ListParts for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4722 4723 4724 4725 4726 4727 |
// File 'service/s3/api.go', line 4722
|
func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error)
PutBucketAcl API operation for Amazon Simple Storage Service.
Sets the permissions on an existing bucket using access control lists (ACL). For more information, see Using ACLs (docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). To set the ACL of a bucket, you must have WRITE_ACP permission.
You can use one of the following two ways to set a bucket's permissions:
-
Specify the ACL in the request body
-
Specify permissions using request headers
You cannot specify access permission using both the body and the request headers.
Depending on your application needs, you may choose to set the ACL on a bucket using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, then you can continue to use that approach.
If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. You must use policies to grant access to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return the AccessControlListNotSupported error code. Requests to read ACLs are still supported. For more information, see Controlling object ownership (docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) in the Amazon S3 User Guide.
Permissions
You can set access permissions by using one of the following methods:
-
Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. If you use this header, you cannot use other access control-specific headers in your request. For more information, see Canned ACL (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-
Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using these headers, you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). You specify each grantee as a type=value pair, where the type is one of the following: id – if the value specified is the canonical user ID of an Amazon Web Services account uri – if you are granting permissions to a predefined group emailAddress – if the value specified is the email address of an Amazon Web Services account Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions: US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints (docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the Amazon Web Services General Reference. For example, the following x-amz-grant-write header grants create, overwrite, and delete objects permission to LogDelivery group predefined by Amazon S3 and two Amazon Web Services accounts identified by their email addresses. x-amz-grant-write: uri=“acs.amazonaws.com/groups/s3/LogDelivery”, id=“111122223333”, id=“555566667777”
You can use either a canned ACL or specify access permissions explicitly. You cannot do both.
Grantee Values
You can specify the person (grantee) to whom you're assigning access rights (using request elements) in the following ways:
-
By the person's ID: <Grantee xmlns:xsi="www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> </Grantee> DisplayName is optional and ignored in the request
-
By URI: <Grantee xmlns:xsi="www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>acs.amazonaws.com/groups/global/AuthenticatedUsers<>>
-
By Email address: <Grantee xmlns:xsi=“www.w3.org/2001/XMLSchema-instance” xsi:type=“AmazonCustomerByEmail”><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser. Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions: US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints (docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the Amazon Web Services General Reference.
The following operations are related to PutBucketAcl:
-
CreateBucket (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-
DeleteBucket (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-
GetObjectAcl (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutBucketAcl for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
4931 4932 4933 4934 |
// File 'service/s3/api.go', line 4931
|
func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutBucketAclRequest generates a request.Request object representing the client request for the PutBucketAcl() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 |
// File 'service/s3/api.go', line 4805
|
func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error)
PutBucketAclWithContext is the same as PutBucketAcl with the addition of the ability to pass a context and additional request options.
See PutBucketAcl for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
4945 4946 4947 4948 4949 4950 |
// File 'service/s3/api.go', line 4945
|
func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error)
PutBucketCors API operation for Amazon Simple Storage Service.
Sets the cors configuration for your bucket. If the configuration exists, Amazon S3 replaces it.
To use this operation, you must be allowed to perform the s3:PutBucketCORS action. By default, the bucket owner has this permission and can grant it to others.
You set this configuration on a bucket so that the bucket can service cross-origin requests. For example, you might want to enable a request whose origin is www.example.com to access your Amazon S3 bucket at my.example.bucket.com by using the browser's XMLHttpRequest capability.
To enable cross-origin resource sharing (CORS) on a bucket, you add the cors subresource to the bucket. The cors subresource is an XML document in which you configure rules that identify origins and the HTTP methods that can be executed on your bucket. The document is limited to 64 KB in size.
When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a bucket, it evaluates the cors configuration on the bucket and uses the first CORSRule rule that matches the incoming browser request to enable a cross-origin request. For a rule to match, the following conditions must be met:
-
The request's Origin header must match AllowedOrigin elements.
-
The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method header in case of a pre-flight OPTIONS request must be one of the AllowedMethod elements.
-
Every header specified in the Access-Control-Request-Headers request header of a pre-flight request must match an AllowedHeader element.
For more information about CORS, go to Enabling Cross-Origin Resource Sharing (docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3 User Guide.
The following operations are related to PutBucketCors:
-
GetBucketCors (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html)
-
DeleteBucketCors (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
-
RESTOPTIONSobject (docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutBucketCors for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
5051 5052 5053 5054 |
// File 'service/s3/api.go', line 5051
|
func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutBucketCorsRequest generates a request.Request object representing the client request for the PutBucketCors() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 |
// File 'service/s3/api.go', line 4977
|
func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error)
PutBucketCorsWithContext is the same as PutBucketCors with the addition of the ability to pass a context and additional request options.
See PutBucketCors for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
5065 5066 5067 5068 5069 5070 |
// File 'service/s3/api.go', line 5065
|
func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error)
PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. Keep in mind that this will overwrite an existing lifecycle configuration, so if you want to retain any configuration details, they must be included in the new lifecycle configuration. For information about lifecycle configuration, see Managing your storage lifecycle (docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html).
Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, or a combination of both. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. For the related API description, see PutBucketLifecycle (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html).
Rules
You specify the lifecycle configuration in your request body. The lifecycle configuration is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the following:
-
A filter identifying a subset of objects to which the rule applies. The filter can be based on a key name prefix, object tags, or a combination of both.
-
A status indicating whether the rule is in effect.
-
One or more lifecycle transition and expiration actions that you want Amazon S3 to perform on the objects identified by the filter. If the state of your bucket is versioning-enabled or versioning-suspended, you can have many versions of the same object (one current version and zero or more noncurrent versions). Amazon S3 provides predefined actions that you can specify for current and noncurrent object versions.
For more information, see Object Lifecycle Management (docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) and Lifecycle Configuration Elements (docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html).
Permissions
By default, all Amazon S3 resources are private, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration). Only the resource owner (that is, the Amazon Web Services account that created it) can access the resource. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration permission.
You can also explicitly deny permissions. An explicit deny also supersedes any other permissions. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions:
-
s3:DeleteObject
-
s3:DeleteObjectVersion
-
s3:PutLifecycleConfiguration
For more information about permissions, see Managing Access Permissions to Your Amazon S3 Resources (docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
The following operations are related to PutBucketLifecycleConfiguration:
-
Examples of Lifecycle Configuration (docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html)
-
GetBucketLifecycleConfiguration (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-
DeleteBucketLifecycle (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutBucketLifecycleConfiguration for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
5194 5195 5196 5197 |
// File 'service/s3/api.go', line 5194
|
func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutBucketLifecycleConfigurationRequest generates a request.Request object representing the client request for the PutBucketLifecycleConfiguration() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 |
// File 'service/s3/api.go', line 5097
|
func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error)
PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of the ability to pass a context and additional request options.
See PutBucketLifecycleConfiguration for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
5208 5209 5210 5211 5212 5213 |
// File 'service/s3/api.go', line 5208
|
func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error)
PutBucketLogging API operation for Amazon Simple Storage Service.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutBucketLogging for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
5270 5271 5272 5273 |
// File 'service/s3/api.go', line 5270
|
func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutBucketLoggingRequest generates a request.Request object representing the client request for the PutBucketLogging() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 |
// File 'service/s3/api.go', line 5240
|
func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error)
PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of the ability to pass a context and additional request options.
See PutBucketLogging for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
5284 5285 5286 5287 5288 5289 |
// File 'service/s3/api.go', line 5284
|
func (c *S3) PutBucketProtectionConfiguration(input *PutBucketProtectionConfigurationInput) (*PutBucketProtectionConfigurationOutput, error)
PutBucketProtectionConfiguration API operation for Amazon Simple Storage Service.
Sets the protection configuration of an existing bucket. EnablePermanentRetention is optional and if not included is considered to be false. Once set to true, must be included in any subsequent PUT Bucket?protection requests for that bucket.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutBucketProtectionConfiguration for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketProtectionConfiguration
5351 5352 5353 5354 |
// File 'service/s3/api.go', line 5351
|
func (c *S3) PutBucketProtectionConfigurationRequest(input *PutBucketProtectionConfigurationInput) (req *request.Request, output *PutBucketProtectionConfigurationOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutBucketProtectionConfigurationRequest generates a request.Request object representing the client request for the PutBucketProtectionConfiguration() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 |
// File 'service/s3/api.go', line 5316
|
func (c *S3) PutBucketProtectionConfigurationWithContext(ctx aws.Context, input *PutBucketProtectionConfigurationInput, opts ...request.Option) (*PutBucketProtectionConfigurationOutput, error)
PutBucketProtectionConfigurationWithContext is the same as PutBucketProtectionConfiguration with the addition of the ability to pass a context and additional request options.
See PutBucketProtectionConfiguration for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
5365 5366 5367 5368 5369 5370 |
// File 'service/s3/api.go', line 5365
|
func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error)
PutBucketReplication API operation for Amazon Simple Storage Service.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutBucketReplication for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
5427 5428 5429 5430 |
// File 'service/s3/api.go', line 5427
|
func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutBucketReplicationRequest generates a request.Request object representing the client request for the PutBucketReplication() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 |
// File 'service/s3/api.go', line 5397
|
func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error)
PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of the ability to pass a context and additional request options.
See PutBucketReplication for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
5441 5442 5443 5444 5445 5446 |
// File 'service/s3/api.go', line 5441
|
func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error)
PutBucketVersioning API operation for Amazon Simple Storage Service.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutBucketVersioning for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
5503 5504 5505 5506 |
// File 'service/s3/api.go', line 5503
|
func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutBucketVersioningRequest generates a request.Request object representing the client request for the PutBucketVersioning() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 |
// File 'service/s3/api.go', line 5473
|
func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error)
PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of the ability to pass a context and additional request options.
See PutBucketVersioning for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
5517 5518 5519 5520 5521 5522 |
// File 'service/s3/api.go', line 5517
|
func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error)
PutBucketWebsite API operation for Amazon Simple Storage Service.
Sets the configuration of the website that is specified in the website subresource. To configure a bucket as a website, you can add this subresource on the bucket with website configuration information such as the file name of the index document and any redirect rules. For more information, see Hosting Websites on Amazon S3 (docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
This PUT action requires the S3:PutBucketWebsite permission. By default, only the bucket owner can configure the website attached to a bucket; however, bucket owners can allow other users to set the website configuration by writing a bucket policy that grants them the S3:PutBucketWebsite permission.
To redirect all website requests sent to the bucket's website endpoint, you add a website configuration with the following elements. Because all requests are sent to another website, you don't need to provide index document name for the bucket.
-
WebsiteConfiguration
-
RedirectAllRequestsTo
-
HostName
-
Protocol
If you want granular control over redirects, you can use the following elements to add routing rules that describe conditions for redirecting requests and information about the redirect destination. In this case, the website configuration must provide an index document for the bucket, because some requests might not be redirected.
-
WebsiteConfiguration
-
IndexDocument
-
Suffix
-
ErrorDocument
-
Key
-
RoutingRules
-
RoutingRule
-
Condition
-
HttpErrorCodeReturnedEquals
-
KeyPrefixEquals
-
Redirect
-
Protocol
-
HostName
-
ReplaceKeyPrefixWith
-
ReplaceKeyWith
-
HttpRedirectCode
Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more than 50 routing rules, you can use object redirect. For more information, see Configuring an Object Redirect (docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html) in the Amazon S3 User Guide.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutBucketWebsite for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
5646 5647 5648 5649 |
// File 'service/s3/api.go', line 5646
|
func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutBucketWebsiteRequest generates a request.Request object representing the client request for the PutBucketWebsite() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 |
// File 'service/s3/api.go', line 5549
|
func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error)
PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of the ability to pass a context and additional request options.
See PutBucketWebsite for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
5660 5661 5662 5663 5664 5665 |
// File 'service/s3/api.go', line 5660
|
func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error)
PutObject API operation for Amazon Simple Storage Service.
Adds an object to a bucket. You must have WRITE permissions on a bucket to add an object to it.
Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket. You cannot use PutObject to only update a single piece of metadata for an existing object. You must put the entire object with updated metadata if you want to update some values.
Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. To prevent objects from being deleted or overwritten, you can use Amazon S3 Object Lock (docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html).
To ensure that data is not corrupted traversing the network, use the Content-MD5 header. When you use this header, Amazon S3 checks the object against the provided MD5 value and, if they do not match, returns an error. Additionally, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.
-
To successfully complete the PutObject request, you must have the s3:PutObject in your IAM permissions.
-
To successfully change the objects acl of your PutObject request, you must have the s3:PutObjectAcl in your IAM permissions.
-
To successfully set the tag-set with your PutObject request, you must have the s3:PutObjectTagging in your IAM permissions.
-
The Content-MD5 header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see Amazon S3 Object Lock Overview (docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html) in the Amazon S3 User Guide.
You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see Using Server-Side Encryption (docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html).
When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see Access Control List (ACL) Overview (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) and Managing ACLs Using the REST API (docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a 400 error with the error code AccessControlListNotSupported. For more information, see Controlling ownership of objects and disabling ACLs (docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) in the Amazon S3 User Guide.
If your bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.
By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see Storage Classes (docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in the Amazon S3 User Guide.
If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see Adding Objects to Versioning-Enabled Buckets (docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html). For information about returning the versioning state of a bucket, see GetBucketVersioning (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html).
For more information about related Amazon S3 APIs, see the following:
-
CopyObject (docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-
DeleteObject (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutObject for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
5805 5806 5807 5808 |
// File 'service/s3/api.go', line 5805
|
func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error)
PutObjectAcl API operation for Amazon Simple Storage Service.
Uses the acl subresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket. You must have WRITE_ACP permission to set the ACL of an object. For more information, see What permissions can I grant? (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions) in the Amazon S3 User Guide.
This action is not supported by Amazon S3 on Outposts.
Depending on your application needs, you can choose to set the ACL on an object using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, you can continue to use that approach. For more information, see Access Control List (ACL) Overview (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) in the Amazon S3 User Guide.
If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. You must use policies to grant access to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return the AccessControlListNotSupported error code. Requests to read ACLs are still supported. For more information, see Controlling object ownership (docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) in the Amazon S3 User Guide.
Permissions
You can set access permissions using one of the following methods:
-
Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. If you use this header, you cannot use other access control-specific headers in your request. For more information, see Canned ACL (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-
Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using these headers, you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific headers, you cannot use x-amz-acl header to set a canned ACL. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). You specify each grantee as a type=value pair, where the type is one of the following: id – if the value specified is the canonical user ID of an Amazon Web Services account uri – if you are granting permissions to a predefined group emailAddress – if the value specified is the email address of an Amazon Web Services account Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions: US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints (docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the Amazon Web Services General Reference. For example, the following x-amz-grant-read header grants list objects permission to the two Amazon Web Services accounts identified by their email addresses. x-amz-grant-read: emailAddress=“xyz@amazon.com”, emailAddress=“abc@amazon.com”
You can use either a canned ACL or specify access permissions explicitly. You cannot do both.
Grantee Values
You can specify the person (grantee) to whom you're assigning access rights (using request elements) in the following ways:
-
By the person's ID: <Grantee xmlns:xsi="www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> </Grantee> DisplayName is optional and ignored in the request.
-
By URI: <Grantee xmlns:xsi="www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>acs.amazonaws.com/groups/global/AuthenticatedUsers<>>
-
By Email address: <Grantee xmlns:xsi=“www.w3.org/2001/XMLSchema-instance” xsi:type=“AmazonCustomerByEmail”><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee> The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser. Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions: US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints (docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the Amazon Web Services General Reference.
Versioning
The ACL of an object is set at the object version level. By default, PUT sets the ACL of the current version of an object. To set the ACL of a different version, use the versionId subresource.
The following operations are related to PutObjectAcl:
-
CopyObject (docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-
GetObject (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutObjectAcl for usage and error information.
Returned Error Codes: - ErrCodeNoSuchKey “NoSuchKey” The specified key does not exist.
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
5980 5981 5982 5983 |
// File 'service/s3/api.go', line 5980
|
func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutObjectAclRequest generates a request.Request object representing the client request for the PutObjectAcl() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 |
// File 'service/s3/api.go', line 5851
|
func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error)
PutObjectAclWithContext is the same as PutObjectAcl with the addition of the ability to pass a context and additional request options.
See PutObjectAcl for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
5994 5995 5996 5997 5998 5999 |
// File 'service/s3/api.go', line 5994
|
func (c *S3) PutObjectLegalHold(input *PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error)
PutObjectLegalHold API operation for Amazon Simple Storage Service.
Applies a legal hold configuration to the specified object. For more information, see Locking Objects (docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
This action is not supported by Amazon S3 on Outposts.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutObjectLegalHold for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
6060 6061 6062 6063 |
// File 'service/s3/api.go', line 6060
|
func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *request.Request, output *PutObjectLegalHoldOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutObjectLegalHoldRequest generates a request.Request object representing the client request for the PutObjectLegalHold() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 |
// File 'service/s3/api.go', line 6026
|
func (c *S3) PutObjectLegalHoldWithContext(ctx aws.Context, input *PutObjectLegalHoldInput, opts ...request.Option) (*PutObjectLegalHoldOutput, error)
PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of the ability to pass a context and additional request options.
See PutObjectLegalHold for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
6074 6075 6076 6077 6078 6079 |
// File 'service/s3/api.go', line 6074
|
func (c *S3) PutObjectLockConfiguration(input *PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error)
PutObjectLockConfiguration API operation for Amazon Simple Storage Service.
Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects (docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-
The DefaultRetention settings require both a mode and a period.
-
The DefaultRetention period can be either Days or Years but you must select one. You cannot specify Days and Years at the same time.
-
You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact Amazon Web Services Support.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutObjectLockConfiguration for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
6148 6149 6150 6151 |
// File 'service/s3/api.go', line 6148
|
func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfigurationInput) (req *request.Request, output *PutObjectLockConfigurationOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutObjectLockConfigurationRequest generates a request.Request object representing the client request for the PutObjectLockConfiguration() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 |
// File 'service/s3/api.go', line 6106
|
func (c *S3) PutObjectLockConfigurationWithContext(ctx aws.Context, input *PutObjectLockConfigurationInput, opts ...request.Option) (*PutObjectLockConfigurationOutput, error)
PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of the ability to pass a context and additional request options.
See PutObjectLockConfiguration for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
6162 6163 6164 6165 6166 6167 |
// File 'service/s3/api.go', line 6162
|
func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutObjectRequest generates a request.Request object representing the client request for the PutObject() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 |
// File 'service/s3/api.go', line 5692
|
func (c *S3) PutObjectRetention(input *PutObjectRetentionInput) (*PutObjectRetentionOutput, error)
PutObjectRetention API operation for Amazon Simple Storage Service.
Places an Object Retention configuration on an object. For more information, see Locking Objects (docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). Users or accounts require the s3:PutObjectRetention permission in order to place an Object Retention configuration on objects. Bypassing a Governance Retention configuration requires the s3:BypassGovernanceRetention permission.
This action is not supported by Amazon S3 on Outposts.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutObjectRetention for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
6231 6232 6233 6234 |
// File 'service/s3/api.go', line 6231
|
func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *request.Request, output *PutObjectRetentionOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutObjectRetentionRequest generates a request.Request object representing the client request for the PutObjectRetention() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 |
// File 'service/s3/api.go', line 6194
|
func (c *S3) PutObjectRetentionWithContext(ctx aws.Context, input *PutObjectRetentionInput, opts ...request.Option) (*PutObjectRetentionOutput, error)
PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of the ability to pass a context and additional request options.
See PutObjectRetention for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
6245 6246 6247 6248 6249 6250 |
// File 'service/s3/api.go', line 6245
|
func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error)
PutObjectTagging API operation for Amazon Simple Storage Service.
Sets the supplied tag-set to an object that already exists in a bucket. A tag is a key-value pair. For more information, see Object Tagging (docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html).
You can associate tags with an object by sending a PUT request against the tagging subresource that is associated with the object. You can retrieve tags by sending a GET request. For more information, see GetObjectTagging (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html).
For tagging-related restrictions related to characters and encodings, see Tag Restrictions (docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html). Note that Amazon S3 limits the maximum number of tags to 10 tags per object.
To use this operation, you must have permission to perform the s3:PutObjectTagging action. By default, the bucket owner has this permission and can grant this permission to others.
To put tags of any other version, use the versionId query parameter. You also need permission for the s3:PutObjectVersionTagging action.
PutObjectTagging has the following special errors. For more Amazon S3 errors see, Error Responses (docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html).
-
InvalidTag - The tag provided was not a valid tag. This error can occur if the tag did not pass input validation. For more information, see Object Tagging (docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html).
-
MalformedXML - The XML provided does not match the schema.
-
OperationAborted - A conflicting conditional action is currently in progress against this resource. Please try again.
-
InternalError - The service was unable to apply the provided tag to the object.
The following operations are related to PutObjectTagging:
-
GetObjectTagging (docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-
DeleteObjectTagging (docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutObjectTagging for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
6346 6347 6348 6349 |
// File 'service/s3/api.go', line 6346
|
func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutObjectTaggingRequest generates a request.Request object representing the client request for the PutObjectTagging() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 |
// File 'service/s3/api.go', line 6277
|
func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error)
PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of the ability to pass a context and additional request options.
See PutObjectTagging for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
6360 6361 6362 6363 6364 6365 |
// File 'service/s3/api.go', line 6360
|
func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error)
PutObjectWithContext is the same as PutObject with the addition of the ability to pass a context and additional request options.
See PutObject for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
5819 5820 5821 5822 5823 5824 |
// File 'service/s3/api.go', line 5819
|
func (c *S3) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error)
PutPublicAccessBlock API operation for Amazon Simple Storage Service.
Creates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock permission. For more information about Amazon S3 permissions, see Specifying Permissions in a Policy (docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or an object, it checks the PublicAccessBlock configuration for both the bucket (or the bucket that contains the object) and the bucket owner's account. If the PublicAccessBlock configurations are different between the bucket and the account, S3 uses the most restrictive combination of the bucket-level and account-level settings.
For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of “Public” (docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
The following operations are related to PutPublicAccessBlock:
-
GetPublicAccessBlock (docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-
DeletePublicAccessBlock (docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
-
GetBucketPolicyStatus (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
-
Using Amazon S3 Block Public Access (docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation PutPublicAccessBlock for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
6447 6448 6449 6450 |
// File 'service/s3/api.go', line 6447
|
func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput)
You must call the Send() method on the returned request object in order to execute the request.
PutPublicAccessBlockRequest generates a request.Request object representing the client request for the PutPublicAccessBlock() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 |
// File 'service/s3/api.go', line 6392
|
func (c *S3) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error)
PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of the ability to pass a context and additional request options.
See PutPublicAccessBlock for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
6461 6462 6463 6464 6465 6466 |
// File 'service/s3/api.go', line 6461
|
func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error)
RestoreObject API operation for Amazon Simple Storage Service.
Restores an archived copy of an object back into Amazon S3
This action is not supported by Amazon S3 on Outposts.
This action performs the following types of requests:
-
select - Perform a select query on an archived object
-
restore an archive - Restore an archived object
For more information about the S3 structure in the request body, see the following:
-
PutObject (docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-
Managing Access with ACLs (docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html) in the Amazon S3 User Guide
-
Protecting Data Using Server-Side Encryption (docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) in the Amazon S3 User Guide
Define the SQL expression for the SELECT type of restoration for your query in the request body's SelectParameters structure. You can use expressions like the following examples.
-
The following expression returns all records from the specified object. SELECT * FROM Object
-
Assuming that you are not using any headers for data stored in the object, you can specify columns with positional headers. SELECT s._1, s._2 FROM Object s WHERE s._3 > 100
-
If you have headers and you set the fileHeaderInfo in the CSV structure in the request body to USE, you can specify headers in the query. (If you set the fileHeaderInfo field to IGNORE, the first row is skipped for the query.) You cannot mix ordinal positions with header column names. SELECT s.Id, s.FirstName, s.SSN FROM S3Object s
When making a select request, you can also do the following:
-
To expedite your queries, specify the Expedited tier. For more information about tiers, see "Restoring Archives," later in this topic.
-
Specify details about the data serialization format of both the input object that is being queried and the serialization of the CSV-encoded query results.
The following are additional important facts about the select feature:
-
The output results are new Amazon S3 objects. Unlike archive retrievals, they are stored until explicitly deleted-manually or through a lifecycle configuration.
-
You can issue more than one select request on the same Amazon S3 object. Amazon S3 doesn't duplicate requests, so avoid issuing duplicate requests.
-
Amazon S3 accepts a select request even if the object has already been restored. A select request doesn’t return error response 409.
Permissions
To use this operation, you must have permissions to perform the s3:RestoreObject action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations (docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) and Managing Access Permissions to Your Amazon S3 Resources (docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) in the Amazon S3 User Guide.
Restoring objects
Objects that you archive to the S3 Glacier Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers, are not accessible in real time. For objects in the S3 Glacier Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive storage classes, you must first initiate a restore request, and then wait until a temporary copy of the object is available. If you want a permanent copy of the object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket. To access an archived object, you must restore the object for the duration (number of days) that you specify. For objects in the Archive Access or Deep Archive Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request, and then wait until the object is moved into the Frequent Access tier.
To restore a specific object version, you can provide a version ID. If you don't provide a version ID, Amazon S3 restores the current version.
When restoring an archived object, you can specify one of the following data access tier options in the Tier element of the request body:
-
Expedited - Expedited retrievals allow you to quickly access your data stored in the S3 Glacier Flexible Retrieval Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests for restoring archives are required. For all but the largest archived objects (250 MB+), data accessed using Expedited retrievals is typically made available within 1–5 minutes. Provisioned capacity ensures that retrieval capacity for Expedited retrievals is available when you need it. Expedited retrievals and provisioned capacity are not available for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.
-
Standard - Standard retrievals allow you to access any of your archived objects within several hours. This is the default option for retrieval requests that do not specify the retrieval option. Standard retrievals typically finish within 3–5 hours for objects stored in the S3 Glacier Flexible Retrieval Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored in S3 Intelligent-Tiering.
-
Bulk - Bulk retrievals free for objects stored in the S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes, enabling you to retrieve large amounts, even petabytes, of data at no cost. Bulk retrievals typically finish within 5–12 hours for objects stored in the S3 Glacier Flexible Retrieval Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost retrieval option when restoring objects from S3 Glacier Deep Archive. They typically finish within 48 hours for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.
For more information about archive retrieval options and provisioned capacity for Expedited data access, see Restoring Archived Objects (docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) in the Amazon S3 User Guide.
You can use Amazon S3 restore speed upgrade to change the restore speed to a faster speed while it is in progress. For more information, see Upgrading the speed of an in-progress restore (docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html) in the Amazon S3 User Guide.
To get the status of object restoration, you can send a HEAD request. Operations return the x-amz-restore header, which provides information about the restoration status, in the response. You can use Amazon S3 event notifications to notify you when a restore is initiated or completed. For more information, see Configuring Amazon S3 Event Notifications (docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the Amazon S3 User Guide.
After restoring an archived object, you can update the restoration period by reissuing the request with a new period. Amazon S3 updates the restoration period relative to the current time and charges only for the request-there are no data transfer charges. You cannot update the restoration period when Amazon S3 is actively processing your current restore request for the object.
If your bucket has a lifecycle configuration with a rule that includes an expiration action, the object expiration overrides the life span that you specify in a restore request. For example, if you restore an object copy for 10 days, but the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. For more information about lifecycle configuration, see PutBucketLifecycleConfiguration (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html) and Object Lifecycle Management (docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) in Amazon S3 User Guide.
Responses
A successful action returns either the 200 OK or 202 Accepted status code.
-
If the object is not previously restored, then Amazon S3 returns 202 Accepted in the response.
-
If the object is previously restored, Amazon S3 returns 200 OK in the response.
-
Special errors: Code: RestoreAlreadyInProgress Cause: Object restore is already in progress. (This error does not apply to SELECT type requests.) HTTP Status Code: 409 Conflict SOAP Fault Code Prefix: Client
-
Code: GlacierExpeditedRetrievalNotAvailable Cause: expedited retrievals are currently not available. Try again later. (Returned if there is insufficient capacity to process the Expedited request. This error applies only to Expedited retrievals and not to S3 Standard or Bulk retrievals.) HTTP Status Code: 503 SOAP Fault Code Prefix: N/A
The following operations are related to RestoreObject:
-
PutBucketLifecycleConfiguration (docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-
GetBucketNotificationConfiguration (docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation RestoreObject for usage and error information.
Returned Error Codes: - ErrCodeObjectAlreadyInActiveTierError “ObjectAlreadyInActiveTierError” This action is not allowed against this storage tier.
See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
6701 6702 6703 6704 |
// File 'service/s3/api.go', line 6701
|
func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput)
You must call the Send() method on the returned request object in order to execute the request.
RestoreObjectRequest generates a request.Request object representing the client request for the RestoreObject() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 |
// File 'service/s3/api.go', line 6493
|
func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error)
RestoreObjectWithContext is the same as RestoreObject with the addition of the ability to pass a context and additional request options.
See RestoreObject for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
6715 6716 6717 6718 6719 6720 |
// File 'service/s3/api.go', line 6715
|
func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error)
UploadPart API operation for Amazon Simple Storage Service.
Uploads a part in a multipart upload.
In this operation, you provide part data in your request. However, you have an option to specify your existing Amazon S3 object as a data source for the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) operation.
You must initiate a multipart upload (see CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)) before you can upload any part. In response to your initiate request, Amazon S3 returns an upload ID, a unique identifier, that you must include in your upload part request.
Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created. If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten.
For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits (docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html) in the Amazon S3 User Guide.
To ensure that data is not corrupted when traversing the network, specify the Content-MD5 header in the upload part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error.
If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the x-amz-content-sha256 header as a checksum instead of Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version 4) (docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html).
Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
For more information on multipart uploads, go to Multipart Upload Overview (docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in the Amazon S3 User Guide .
For information on the permissions required to use the multipart upload API, go to Multipart Upload and Permissions (docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the Amazon S3 User Guide.
Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. You have three mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C). Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption with other key options. The option you use depends on whether you want to use KMS keys (SSE-KMS) or provide your own encryption key (SSE-C). If you choose to provide your own encryption key, the request headers you provide in the request must match the headers you used in the request to initiate the upload by using CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html). For more information, go to Using Server-Side Encryption (docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) in the Amazon S3 User Guide.
Server-side encryption is supported by the S3 Multipart Upload actions. Unless you are using a customer-provided encryption key (SSE-C), you don't need to specify the encryption parameters in each UploadPart request. Instead, you only need to specify the server-side encryption parameters in the initial Initiate Multipart request. For more information, see CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
If you requested server-side encryption using a customer-provided encryption key (SSE-C) in your initiate multipart upload request, you must provide identical encryption information in each part upload using the following headers.
-
x-amz-server-side-encryption-customer-algorithm
-
x-amz-server-side-encryption-customer-key
-
x-amz-server-side-encryption-customer-key-MD5
UploadPart has the following special errors:
-
Code: NoSuchUpload Cause: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. HTTP Status Code: 404 Not Found SOAP Fault Code Prefix: Client
The following operations are related to UploadPart:
-
CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-
CompleteMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-
AbortMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-
ListParts (docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-
ListMultipartUploads (docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation UploadPart for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
6871 6872 6873 6874 |
// File 'service/s3/api.go', line 6871
|
func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error)
UploadPartCopy API operation for Amazon Simple Storage Service.
Uploads a part by copying data from an existing object as data source. You specify the data source by adding the request header x-amz-copy-source in your request and a byte range by adding the request header x-amz-copy-source-range in your request.
For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits (docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html) in the Amazon S3 User Guide.
Instead of using an existing object as part data, you might use the UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) action and provide data in your request.
You must initiate a multipart upload before you can upload any part. In response to your initiate request. Amazon S3 returns a unique identifier, the upload ID, that you must include in your upload part request.
For more information about using the UploadPartCopy operation, see the following:
-
For conceptual information about multipart uploads, see Uploading Objects Using Multipart Upload (docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) in the Amazon S3 User Guide.
-
For information about permissions required to use the multipart upload API, see Multipart Upload and Permissions (docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the Amazon S3 User Guide.
-
For information about copying objects using a single atomic action vs. a multipart upload, see Operations on Objects (docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html) in the Amazon S3 User Guide.
-
For information about using server-side encryption with customer-provided encryption keys with the UploadPartCopy operation, see CopyObject (docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) and UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html).
Note the following additional considerations about the request headers x-amz-copy-source-if-match, x-amz-copy-source-if-none-match, x-amz-copy-source-if-unmodified-since, and x-amz-copy-source-if-modified-since:
-
Consideration 1 - If both of the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since headers are present in the request as follows: x-amz-copy-source-if-match condition evaluates to true, and; x-amz-copy-source-if-unmodified-since condition evaluates to false; Amazon S3 returns 200 OK and copies the data.
-
Consideration 2 - If both of the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since headers are present in the request as follows: x-amz-copy-source-if-none-match condition evaluates to false, and; x-amz-copy-source-if-modified-since condition evaluates to true; Amazon S3 returns 412 Precondition Failed response code.
Versioning
If your bucket has versioning enabled, you could have multiple versions of the same object. By default, x-amz-copy-source identifies the current version of the object to copy. If the current version is a delete marker and you don't specify a versionId in the x-amz-copy-source, Amazon S3 returns a 404 error, because the object does not exist. If you specify versionId in the x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an HTTP 400 error, because you are not allowed to specify a delete marker as a version for the x-amz-copy-source.
You can optionally specify a specific version of the source object to copy by adding the versionId subresource as shown in the following example:
x-amz-copy-source: /bucket/object?versionId=version id
Special errors
-
Code: NoSuchUpload Cause: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. HTTP Status Code: 404 Not Found
-
Code: InvalidRequest Cause: The specified copy source is not supported as a byte-range copy source. HTTP Status Code: 400 Bad Request
The following operations are related to UploadPartCopy:
-
CreateMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-
UploadPart (docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-
CompleteMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-
AbortMultipartUpload (docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-
ListParts (docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-
ListMultipartUploads (docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Simple Storage Service's API operation UploadPartCopy for usage and error information. See also, docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
7032 7033 7034 7035 |
// File 'service/s3/api.go', line 7032
|
func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput)
You must call the Send() method on the returned request object in order to execute the request.
UploadPartCopyRequest generates a request.Request object representing the client request for the UploadPartCopy() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 |
// File 'service/s3/api.go', line 6917
|
func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error)
UploadPartCopyWithContext is the same as UploadPartCopy with the addition of the ability to pass a context and additional request options.
See UploadPartCopy for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
7046 7047 7048 7049 7050 7051 |
// File 'service/s3/api.go', line 7046
|
func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput)
You must call the Send() method on the returned request object in order to execute the request.
UploadPartRequest generates a request.Request object representing the client request for the UploadPart() operation. The output
return value can be used to capture response data after Request.Send() is called.
Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.
6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 |
// File 'service/s3/api.go', line 6747
|
func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error)
UploadPartWithContext is the same as UploadPart with the addition of the ability to pass a context and additional request options.
See UploadPart for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
6885 6886 6887 6888 6889 6890 |
// File 'service/s3/api.go', line 6885
|
func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error
15 16 17 |
// File 'service/s3/waiters.go', line 15
|
func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error
WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists. With the support for passing in a context and options to configure the Waiter and the underlying request options.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
// File 'service/s3/waiters.go', line 27
|
func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error
WaitUntilBucketNotExists uses the Amazon S3 API operation HeadBucket to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.
76 77 78 |
// File 'service/s3/waiters.go', line 76
|
func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error
WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists. With the support for passing in a context and options to configure the Waiter and the underlying request options.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
// File 'service/s3/waiters.go', line 88
|
func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error
WaitUntilObjectExists uses the Amazon S3 API operation HeadObject to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.
122 123 124 |
// File 'service/s3/waiters.go', line 122
|
func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error
WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists. With the support for passing in a context and options to configure the Waiter and the underlying request options.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
// File 'service/s3/waiters.go', line 134
|
func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error
WaitUntilObjectNotExists uses the Amazon S3 API operation HeadObject to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.
173 174 175 |
// File 'service/s3/waiters.go', line 173
|
func (c *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error
WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists. With the support for passing in a context and options to configure the Waiter and the underlying request options.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See golang.org/pkg/context/ for more information on using Contexts.
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
// File 'service/s3/waiters.go', line 185
|