s3

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 31 Imported by: 53

Documentation

Overview

Package s3 provides the client and types for making API requests to Amazon Simple Storage Service.

See https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01 for more information on this service.

See s3 package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/s3/

Using the Client

To contact Amazon Simple Storage Service with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Amazon Simple Storage Service client S3 for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New

Upload Managers

The s3manager package's Uploader provides concurrent upload of content to S3 by taking advantage of S3's Multipart APIs. The Uploader also supports both io.Reader for streaming uploads, and will also take advantage of io.ReadSeeker for optimizations if the Body satisfies that type. Once the Uploader instance is created you can call Upload concurrently from multiple goroutines safely.

// The session the S3 Uploader will use
sess := session.Must(session.NewSession())

// Create an uploader with the session and default options
uploader := s3manager.NewUploader(sess)

f, err  := os.Open(filename)
if err != nil {
    return fmt.Errorf("failed to open file %q, %v", filename, err)
}

// Upload the file to S3.
result, err := uploader.Upload(&s3manager.UploadInput{
    Bucket: aws.String(myBucket),
    Key:    aws.String(myString),
    Body:   f,
})
if err != nil {
    return fmt.Errorf("failed to upload file, %v", err)
}
fmt.Printf("file uploaded to, %s\n", aws.StringValue(result.Location))

See the s3manager package's Uploader type documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Uploader

Download Manager

The s3manager package's Downloader provides concurrently downloading of Objects from S3. The Downloader will write S3 Object content with an io.WriterAt. Once the Downloader instance is created you can call Download concurrently from multiple goroutines safely.

// The session the S3 Downloader will use
sess := session.Must(session.NewSession())

// Create a downloader with the session and default options
downloader := s3manager.NewDownloader(sess)

// Create a file to write the S3 Object contents to.
f, err := os.Create(filename)
if err != nil {
    return fmt.Errorf("failed to create file %q, %v", filename, err)
}

// Write the contents of S3 Object to the file
n, err := downloader.Download(f, &s3.GetObjectInput{
    Bucket: aws.String(myBucket),
    Key:    aws.String(myString),
})
if err != nil {
    return fmt.Errorf("failed to download file, %v", err)
}
fmt.Printf("file downloaded, %d bytes\n", n)

See the s3manager package's Downloader type documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Downloader

Automatic URI cleaning

Interacting with objects whose keys contain adjacent slashes (e.g. bucketname/foo//bar/objectname) requires setting DisableRestProtocolURICleaning to true in the aws.Config struct used by the service client.

svc := s3.New(sess, &aws.Config{
   	DisableRestProtocolURICleaning: aws.Bool(true),
})
out, err := svc.GetObject(&s3.GetObjectInput {
   	Bucket: aws.String("bucketname"),
    	Key: aws.String("//foo//bar//moo"),
})

Get Bucket Region

GetBucketRegion will attempt to get the region for a bucket using a region hint to determine which AWS partition to perform the query on. Use this utility to determine the region a bucket is in.

sess := session.Must(session.NewSession())

bucket := "my-bucket"
region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2")
if err != nil {
    if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" {
         fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket)
    }
    return err
}
fmt.Printf("Bucket %s is in %s region\n", bucket, region)

See the s3manager package's GetBucketRegion function documentation for more information https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#GetBucketRegion

S3 Crypto Client

The s3crypto package provides the tools to upload and download encrypted content from S3. The Encryption and Decryption clients can be used concurrently once the client is created.

sess := session.Must(session.NewSession())

// Create the decryption client.
svc := s3crypto.NewDecryptionClient(sess)

// The object will be downloaded from S3 and decrypted locally. By metadata
// about the object's encryption will instruct the decryption client how
// decrypt the content of the object. By default KMS is used for keys.
result, err := svc.GetObject(&s3.GetObjectInput {
    Bucket: aws.String(myBucket),
    Key: aws.String(myKey),
})

See the s3crypto package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3crypto/

Index

Examples

Constants

View Source
const (
	// BucketCannedACLPrivate is a BucketCannedACL enum value
	BucketCannedACLPrivate = "private"

	// BucketCannedACLPublicRead is a BucketCannedACL enum value
	BucketCannedACLPublicRead = "public-read"

	// BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
	BucketCannedACLPublicReadWrite = "public-read-write"

	// BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
	BucketCannedACLAuthenticatedRead = "authenticated-read"
)
View Source
const (
	// BucketLocationConstraintEu is a BucketLocationConstraint enum value
	BucketLocationConstraintEu = "EU"

	// BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
	BucketLocationConstraintEuWest1 = "eu-west-1"

	// BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
	BucketLocationConstraintUsWest1 = "us-west-1"

	// BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
	BucketLocationConstraintUsWest2 = "us-west-2"

	// BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
	BucketLocationConstraintApSouth1 = "ap-south-1"

	// BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
	BucketLocationConstraintApSoutheast1 = "ap-southeast-1"

	// BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
	BucketLocationConstraintApSoutheast2 = "ap-southeast-2"

	// BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
	BucketLocationConstraintApNortheast1 = "ap-northeast-1"

	// BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
	BucketLocationConstraintSaEast1 = "sa-east-1"

	// BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
	BucketLocationConstraintCnNorth1 = "cn-north-1"

	// BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
	BucketLocationConstraintEuCentral1 = "eu-central-1"
)
View Source
const (
	// BucketLogsPermissionFullControl is a BucketLogsPermission enum value
	BucketLogsPermissionFullControl = "FULL_CONTROL"

	// BucketLogsPermissionRead is a BucketLogsPermission enum value
	BucketLogsPermissionRead = "READ"

	// BucketLogsPermissionWrite is a BucketLogsPermission enum value
	BucketLogsPermissionWrite = "WRITE"
)
View Source
const (
	// ExpirationStatusEnabled is a ExpirationStatus enum value
	ExpirationStatusEnabled = "Enabled"

	// ExpirationStatusDisabled is a ExpirationStatus enum value
	ExpirationStatusDisabled = "Disabled"
)
View Source
const (
	// MetadataDirectiveCopy is a MetadataDirective enum value
	MetadataDirectiveCopy = "COPY"

	// MetadataDirectiveReplace is a MetadataDirective enum value
	MetadataDirectiveReplace = "REPLACE"
)
View Source
const (
	// ObjectCannedACLPrivate is a ObjectCannedACL enum value
	ObjectCannedACLPrivate = "private"

	// ObjectCannedACLPublicRead is a ObjectCannedACL enum value
	ObjectCannedACLPublicRead = "public-read"

	// ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
	ObjectCannedACLPublicReadWrite = "public-read-write"

	// ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
	ObjectCannedACLAuthenticatedRead = "authenticated-read"

	// ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
	ObjectCannedACLAwsExecRead = "aws-exec-read"

	// ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
	ObjectCannedACLBucketOwnerRead = "bucket-owner-read"

	// ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
	ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
)
View Source
const (
	// ObjectStorageClassStandard is a ObjectStorageClass enum value
	ObjectStorageClassStandard = "STANDARD"

	// ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
	ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"

	// ObjectStorageClassGlacier is a ObjectStorageClass enum value
	ObjectStorageClassGlacier = "GLACIER"

	// ObjectStorageClassStandardIa is a ObjectStorageClass enum value
	ObjectStorageClassStandardIa = "STANDARD_IA"

	// ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
	ObjectStorageClassOnezoneIa = "ONEZONE_IA"

	// ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value
	ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING"

	// ObjectStorageClassDeepArchive is a ObjectStorageClass enum value
	ObjectStorageClassDeepArchive = "DEEP_ARCHIVE"
)
View Source
const (
	// PermissionFullControl is a Permission enum value
	PermissionFullControl = "FULL_CONTROL"

	// PermissionWrite is a Permission enum value
	PermissionWrite = "WRITE"

	// PermissionWriteAcp is a Permission enum value
	PermissionWriteAcp = "WRITE_ACP"

	// PermissionRead is a Permission enum value
	PermissionRead = "READ"

	// PermissionReadAcp is a Permission enum value
	PermissionReadAcp = "READ_ACP"
)
View Source
const (
	// ReplicationStatusComplete is a ReplicationStatus enum value
	ReplicationStatusComplete = "COMPLETE"

	// ReplicationStatusPending is a ReplicationStatus enum value
	ReplicationStatusPending = "PENDING"

	// ReplicationStatusFailed is a ReplicationStatus enum value
	ReplicationStatusFailed = "FAILED"

	// ReplicationStatusReplica is a ReplicationStatus enum value
	ReplicationStatusReplica = "REPLICA"
)
View Source
const (
	// RetentionDirectiveCopy is a RetentionDirective enum value
	RetentionDirectiveCopy = "COPY"

	// RetentionDirectiveReplace is a RetentionDirective enum value
	RetentionDirectiveReplace = "REPLACE"
)
View Source
const (
	// ServerSideEncryptionAes256 is a ServerSideEncryption enum value
	ServerSideEncryptionAes256 = "AES256"

	// ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
	ServerSideEncryptionAwsKms = "aws:kms"
)
View Source
const (
	// StorageClassStandard is a StorageClass enum value
	StorageClassStandard = "STANDARD"

	// StorageClassReducedRedundancy is a StorageClass enum value
	StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"

	// StorageClassStandardIa is a StorageClass enum value
	StorageClassStandardIa = "STANDARD_IA"

	// StorageClassOnezoneIa is a StorageClass enum value
	StorageClassOnezoneIa = "ONEZONE_IA"

	// StorageClassIntelligentTiering is a StorageClass enum value
	StorageClassIntelligentTiering = "INTELLIGENT_TIERING"

	// StorageClassGlacier is a StorageClass enum value
	StorageClassGlacier = "GLACIER"

	// StorageClassDeepArchive is a StorageClass enum value
	StorageClassDeepArchive = "DEEP_ARCHIVE"
)
View Source
const (
	// TaggingDirectiveCopy is a TaggingDirective enum value
	TaggingDirectiveCopy = "COPY"

	// TaggingDirectiveReplace is a TaggingDirective enum value
	TaggingDirectiveReplace = "REPLACE"
)
View Source
const (
	// TypeCanonicalUser is a Type enum value
	TypeCanonicalUser = "CanonicalUser"

	// TypeAmazonCustomerByEmail is a Type enum value
	TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"

	// TypeGroup is a Type enum value
	TypeGroup = "Group"
)
View Source
const (

	// ErrCodeBucketAlreadyExists for service response error code
	// "BucketAlreadyExists".
	//
	// The requested bucket name is not available. The bucket namespace is shared
	// by all users of the system. Please select a different name and try again.
	ErrCodeBucketAlreadyExists = "BucketAlreadyExists"

	// ErrCodeBucketAlreadyOwnedByYou for service response error code
	// "BucketAlreadyOwnedByYou".
	ErrCodeBucketAlreadyOwnedByYou = "BucketAlreadyOwnedByYou"

	// ErrCodeNoSuchBucket for service response error code
	// "NoSuchBucket".
	//
	// The specified bucket does not exist.
	ErrCodeNoSuchBucket = "NoSuchBucket"

	// ErrCodeNoSuchKey for service response error code
	// "NoSuchKey".
	//
	// The specified key does not exist.
	ErrCodeNoSuchKey = "NoSuchKey"

	// ErrCodeNoSuchUpload for service response error code
	// "NoSuchUpload".
	//
	// The specified multipart upload does not exist.
	ErrCodeNoSuchUpload = "NoSuchUpload"

	// ErrCodeObjectAlreadyInActiveTierError for service response error code
	// "ObjectAlreadyInActiveTierError".
	//
	// This operation is not allowed against this storage tier
	ErrCodeObjectAlreadyInActiveTierError = "ObjectAlreadyInActiveTierError"

	// ErrCodeObjectNotInActiveTierError for service response error code
	// "ObjectNotInActiveTierError".
	//
	// The source object of the COPY operation is not in the active tier and is
	// only stored in Amazon Glacier.
	ErrCodeObjectNotInActiveTierError = "ObjectNotInActiveTierError"
)
View Source
const (
	ServiceName = "s3"        // Name of service.
	EndpointsID = ServiceName // ID to lookup a service endpoint with.
	ServiceID   = "S3"        // ServiceID is a unique identifer of a specific service.
)

Service information constants

View Source
const (
	// BucketProtectionStatusRetention is a BucketProtectionStatus enum value
	BucketProtectionStatusRetention = "Retention"
)
View Source
const (
	// EncodingTypeUrl is a EncodingType enum value
	EncodingTypeUrl = "url"
)

Requests Amazon S3 to encode the object keys in the response and specifies the encoding method to use. An object key may contain any Unicode character; however, XML 1.0 parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response.

View Source
const (
	// RequestChargedRequester is a RequestCharged enum value
	RequestChargedRequester = "requester"
)

If present, indicates that the requester was successfully charged for the request.

View Source
const (
	// RequestPayerRequester is a RequestPayer enum value
	RequestPayerRequester = "requester"
)

Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html

View Source
const (
	// TierBulk is a Tier enum value
	TierBulk = "Bulk"
)
View Source
const (
	// TransitionStorageClassGlacier is a TransitionStorageClass enum value
	TransitionStorageClassGlacier = "GLACIER"
)

Variables

View Source
var NormalizeBucketLocationHandler = request.NamedHandler{
	Name: "awssdk.s3.NormalizeBucketLocation",
	Fn: func(req *request.Request) {
		if req.Error != nil {
			return
		}

		out := req.Data.(*GetBucketLocationOutput)
		loc := NormalizeBucketLocation(aws.StringValue(out.LocationConstraint))
		out.LocationConstraint = aws.String(loc)
	},
}

NormalizeBucketLocationHandler is a request handler which will update the GetBucketLocation's result LocationConstraint value to always be a region ID.

Replaces empty string with "us-east-1", and "EU" with "eu-west-1".

See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html for more information on the values that can be returned.

req, result := svc.GetBucketLocationRequest(&s3.GetBucketLocationInput{
    Bucket: aws.String(bucket),
})
req.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler)
err := req.Send()

Functions

func NormalizeBucketLocation

func NormalizeBucketLocation(loc string) string

NormalizeBucketLocation is a utility function which will update the passed in value to always be a region ID. Generally this would be used with GetBucketLocation API operation.

Replaces empty string with "us-east-1", and "EU" with "eu-west-1".

See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html for more information on the values that can be returned.

func WithNormalizeBucketLocation

func WithNormalizeBucketLocation(r *request.Request)

WithNormalizeBucketLocation is a request option which will update the GetBucketLocation's result LocationConstraint value to always be a region ID.

Replaces empty string with "us-east-1", and "EU" with "eu-west-1".

See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html for more information on the values that can be returned.

result, err := svc.GetBucketLocationWithContext(ctx,
    &s3.GetBucketLocationInput{
        Bucket: aws.String(bucket),
    },
    s3.WithNormalizeBucketLocation,
)

Types

type AbortMultipartUploadInput

type AbortMultipartUploadInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// UploadId is a required field
	UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (AbortMultipartUploadInput) GoString

func (s AbortMultipartUploadInput) GoString() string

GoString returns the string representation

func (*AbortMultipartUploadInput) SetBucket

SetBucket sets the Bucket field's value.

func (*AbortMultipartUploadInput) SetKey

SetKey sets the Key field's value.

func (*AbortMultipartUploadInput) SetRequestPayer

SetRequestPayer sets the RequestPayer field's value.

func (*AbortMultipartUploadInput) SetUploadId

SetUploadId sets the UploadId field's value.

func (AbortMultipartUploadInput) String

func (s AbortMultipartUploadInput) String() string

String returns the string representation

func (*AbortMultipartUploadInput) Validate

func (s *AbortMultipartUploadInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type AbortMultipartUploadOutput

type AbortMultipartUploadOutput struct {

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
	// contains filtered or unexported fields
}

func (AbortMultipartUploadOutput) GoString

func (s AbortMultipartUploadOutput) GoString() string

GoString returns the string representation

func (*AbortMultipartUploadOutput) SetRequestCharged

SetRequestCharged sets the RequestCharged field's value.

func (AbortMultipartUploadOutput) String

String returns the string representation

type AccessControlPolicy

type AccessControlPolicy struct {

	// A list of grants.
	Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`

	Owner *Owner `type:"structure"`
	// contains filtered or unexported fields
}

func (AccessControlPolicy) GoString

func (s AccessControlPolicy) GoString() string

GoString returns the string representation

func (*AccessControlPolicy) SetGrants

func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy

SetGrants sets the Grants field's value.

func (*AccessControlPolicy) SetOwner

SetOwner sets the Owner field's value.

func (AccessControlPolicy) String

func (s AccessControlPolicy) String() string

String returns the string representation

func (*AccessControlPolicy) Validate

func (s *AccessControlPolicy) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type AddLegalHoldInput added in v1.2.0

type AddLegalHoldInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// RetentionLegalHoldId is a required field
	RetentionLegalHoldId *string `location:"querystring" locationName:"add" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (AddLegalHoldInput) GoString added in v1.2.0

func (s AddLegalHoldInput) GoString() string

GoString returns the string representation

func (*AddLegalHoldInput) SetBucket added in v1.2.0

func (s *AddLegalHoldInput) SetBucket(v string) *AddLegalHoldInput

SetBucket sets the Bucket field's value.

func (*AddLegalHoldInput) SetKey added in v1.2.0

SetKey sets the Key field's value.

func (*AddLegalHoldInput) SetRetentionLegalHoldId added in v1.2.0

func (s *AddLegalHoldInput) SetRetentionLegalHoldId(v string) *AddLegalHoldInput

SetRetentionLegalHoldId sets the RetentionLegalHoldId field's value.

func (AddLegalHoldInput) String added in v1.2.0

func (s AddLegalHoldInput) String() string

String returns the string representation

func (*AddLegalHoldInput) Validate added in v1.2.0

func (s *AddLegalHoldInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type AddLegalHoldOutput added in v1.2.0

type AddLegalHoldOutput struct {
	// contains filtered or unexported fields
}

func (AddLegalHoldOutput) GoString added in v1.2.0

func (s AddLegalHoldOutput) GoString() string

GoString returns the string representation

func (AddLegalHoldOutput) String added in v1.2.0

func (s AddLegalHoldOutput) String() string

String returns the string representation

type Bucket

type Bucket struct {

	// Date the bucket was created.
	CreationDate *time.Time `type:"timestamp"`

	// The name of the bucket.
	Name *string `type:"string"`
	// contains filtered or unexported fields
}

func (Bucket) GoString

func (s Bucket) GoString() string

GoString returns the string representation

func (*Bucket) SetCreationDate

func (s *Bucket) SetCreationDate(v time.Time) *Bucket

SetCreationDate sets the CreationDate field's value.

func (*Bucket) SetName

func (s *Bucket) SetName(v string) *Bucket

SetName sets the Name field's value.

func (Bucket) String

func (s Bucket) String() string

String returns the string representation

type BucketExtended

type BucketExtended struct {

	// Date the bucket was created.
	CreationDate *time.Time `type:"timestamp"`

	// Specifies the region where the bucket was created.
	LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`

	// The name of the bucket.
	Name *string `type:"string"`
	// contains filtered or unexported fields
}

func (BucketExtended) GoString

func (s BucketExtended) GoString() string

GoString returns the string representation

func (*BucketExtended) SetCreationDate

func (s *BucketExtended) SetCreationDate(v time.Time) *BucketExtended

SetCreationDate sets the CreationDate field's value.

func (*BucketExtended) SetLocationConstraint

func (s *BucketExtended) SetLocationConstraint(v string) *BucketExtended

SetLocationConstraint sets the LocationConstraint field's value.

func (*BucketExtended) SetName

func (s *BucketExtended) SetName(v string) *BucketExtended

SetName sets the Name field's value.

func (BucketExtended) String

func (s BucketExtended) String() string

String returns the string representation

type BucketLoggingStatus

type BucketLoggingStatus struct {

	// Container for logging information. Presence of this element indicates that
	// logging is enabled. Parameters TargetBucket and TargetPrefix are required
	// in this case.
	LoggingEnabled *LoggingEnabled `type:"structure"`
	// contains filtered or unexported fields
}

func (BucketLoggingStatus) GoString

func (s BucketLoggingStatus) GoString() string

GoString returns the string representation

func (*BucketLoggingStatus) SetLoggingEnabled

func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus

SetLoggingEnabled sets the LoggingEnabled field's value.

func (BucketLoggingStatus) String

func (s BucketLoggingStatus) String() string

String returns the string representation

func (*BucketLoggingStatus) Validate

func (s *BucketLoggingStatus) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type BucketProtectionDefaultRetention added in v1.2.0

type BucketProtectionDefaultRetention struct {

	// Days is a required field
	Days *int64 `type:"integer" required:"true"`
	// contains filtered or unexported fields
}

func (BucketProtectionDefaultRetention) GoString added in v1.2.0

GoString returns the string representation

func (*BucketProtectionDefaultRetention) SetDays added in v1.2.0

SetDays sets the Days field's value.

func (BucketProtectionDefaultRetention) String added in v1.2.0

String returns the string representation

func (*BucketProtectionDefaultRetention) Validate added in v1.2.0

Validate inspects the fields of the type to determine if they are valid.

type BucketProtectionMaximumRetention added in v1.2.0

type BucketProtectionMaximumRetention struct {

	// Days is a required field
	Days *int64 `type:"integer" required:"true"`
	// contains filtered or unexported fields
}

func (BucketProtectionMaximumRetention) GoString added in v1.2.0

GoString returns the string representation

func (*BucketProtectionMaximumRetention) SetDays added in v1.2.0

SetDays sets the Days field's value.

func (BucketProtectionMaximumRetention) String added in v1.2.0

String returns the string representation

func (*BucketProtectionMaximumRetention) Validate added in v1.2.0

Validate inspects the fields of the type to determine if they are valid.

type BucketProtectionMinimumRetention added in v1.2.0

type BucketProtectionMinimumRetention struct {

	// Days is a required field
	Days *int64 `type:"integer" required:"true"`
	// contains filtered or unexported fields
}

func (BucketProtectionMinimumRetention) GoString added in v1.2.0

GoString returns the string representation

func (*BucketProtectionMinimumRetention) SetDays added in v1.2.0

SetDays sets the Days field's value.

func (BucketProtectionMinimumRetention) String added in v1.2.0

String returns the string representation

func (*BucketProtectionMinimumRetention) Validate added in v1.2.0

Validate inspects the fields of the type to determine if they are valid.

type CORSConfiguration

type CORSConfiguration struct {

	// CORSRules is a required field
	CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
	// contains filtered or unexported fields
}

func (CORSConfiguration) GoString

func (s CORSConfiguration) GoString() string

GoString returns the string representation

func (*CORSConfiguration) SetCORSRules

func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration

SetCORSRules sets the CORSRules field's value.

func (CORSConfiguration) String

func (s CORSConfiguration) String() string

String returns the string representation

func (*CORSConfiguration) Validate

func (s *CORSConfiguration) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CORSRule

type CORSRule struct {

	// Specifies which headers are allowed in a pre-flight OPTIONS request.
	AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`

	// Identifies HTTP methods that the domain/origin specified in the rule is allowed
	// to execute.
	//
	// AllowedMethods is a required field
	AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`

	// One or more origins you want customers to be able to access the bucket from.
	//
	// AllowedOrigins is a required field
	AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`

	// One or more headers in the response that you want customers to be able to
	// access from their applications (for example, from a JavaScript XMLHttpRequest
	// object).
	ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`

	// The time in seconds that your browser is to cache the preflight response
	// for the specified resource.
	MaxAgeSeconds *int64 `type:"integer"`
	// contains filtered or unexported fields
}

func (CORSRule) GoString

func (s CORSRule) GoString() string

GoString returns the string representation

func (*CORSRule) SetAllowedHeaders

func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule

SetAllowedHeaders sets the AllowedHeaders field's value.

func (*CORSRule) SetAllowedMethods

func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule

SetAllowedMethods sets the AllowedMethods field's value.

func (*CORSRule) SetAllowedOrigins

func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule

SetAllowedOrigins sets the AllowedOrigins field's value.

func (*CORSRule) SetExposeHeaders

func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule

SetExposeHeaders sets the ExposeHeaders field's value.

func (*CORSRule) SetMaxAgeSeconds

func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule

SetMaxAgeSeconds sets the MaxAgeSeconds field's value.

func (CORSRule) String

func (s CORSRule) String() string

String returns the string representation

func (*CORSRule) Validate

func (s *CORSRule) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CommonPrefix

type CommonPrefix struct {
	Prefix *string `type:"string"`
	// contains filtered or unexported fields
}

func (CommonPrefix) GoString

func (s CommonPrefix) GoString() string

GoString returns the string representation

func (*CommonPrefix) SetPrefix

func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix

SetPrefix sets the Prefix field's value.

func (CommonPrefix) String

func (s CommonPrefix) String() string

String returns the string representation

type CompleteMultipartUploadInput

type CompleteMultipartUploadInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// Date on which it will be legal to delete or modify the object. This field
	// can only be specified if Retention-Directive is REPLACE. You can only specify
	// this or the Retention-Period header. If both are specified a 400 error will
	// be returned. If neither is specified the bucket's DefaultRetention period
	// will be used.
	RetentionExpirationDate *time.Time `location:"header" locationName:"Retention-Expiration-Date" type:"timestamp" timestampFormat:"iso8601"`

	// A single legal hold to apply to the object. This field can only be specified
	// if Retention-Directive is REPLACE. A legal hold is a character long string
	// of max length 64. The object cannot be overwritten or deleted until all legal
	// holds associated with the object are removed.
	RetentionLegalHoldId *string `location:"header" locationName:"Retention-Legal-Hold-ID" type:"string"`

	// Retention period to store on the object in seconds. If this field and Retention-Expiration-Date
	// are specified a 400 error is returned. If neither is specified the bucket's
	// DefaultRetention period will be used. 0 is a legal value assuming the bucket's
	// minimum retention period is also 0.
	RetentionPeriod *int64 `location:"header" locationName:"Retention-Period" type:"integer"`

	// UploadId is a required field
	UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (CompleteMultipartUploadInput) GoString

func (s CompleteMultipartUploadInput) GoString() string

GoString returns the string representation

func (*CompleteMultipartUploadInput) SetBucket

SetBucket sets the Bucket field's value.

func (*CompleteMultipartUploadInput) SetKey

SetKey sets the Key field's value.

func (*CompleteMultipartUploadInput) SetMultipartUpload

SetMultipartUpload sets the MultipartUpload field's value.

func (*CompleteMultipartUploadInput) SetRequestPayer

SetRequestPayer sets the RequestPayer field's value.

func (*CompleteMultipartUploadInput) SetRetentionExpirationDate added in v1.2.0

func (s *CompleteMultipartUploadInput) SetRetentionExpirationDate(v time.Time) *CompleteMultipartUploadInput

SetRetentionExpirationDate sets the RetentionExpirationDate field's value.

func (*CompleteMultipartUploadInput) SetRetentionLegalHoldId added in v1.2.0

func (s *CompleteMultipartUploadInput) SetRetentionLegalHoldId(v string) *CompleteMultipartUploadInput

SetRetentionLegalHoldId sets the RetentionLegalHoldId field's value.

func (*CompleteMultipartUploadInput) SetRetentionPeriod added in v1.2.0

SetRetentionPeriod sets the RetentionPeriod field's value.

func (*CompleteMultipartUploadInput) SetUploadId

SetUploadId sets the UploadId field's value.

func (CompleteMultipartUploadInput) String

String returns the string representation

func (*CompleteMultipartUploadInput) Validate

func (s *CompleteMultipartUploadInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CompleteMultipartUploadOutput

type CompleteMultipartUploadOutput struct {
	Bucket *string `type:"string"`

	// Entity tag of the object.
	ETag *string `type:"string"`

	// If the object expiration is configured, this will contain the expiration
	// date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
	Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`

	Key *string `min:"1" type:"string"`

	Location *string `type:"string"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// If present, specifies the ID of the AWS Key Management Service (KMS) master
	// encryption key that was used for the object.
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`

	// Version of the object.
	VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
	// contains filtered or unexported fields
}

func (CompleteMultipartUploadOutput) GoString

GoString returns the string representation

func (*CompleteMultipartUploadOutput) SetBucket

SetBucket sets the Bucket field's value.

func (*CompleteMultipartUploadOutput) SetETag

SetETag sets the ETag field's value.

func (*CompleteMultipartUploadOutput) SetExpiration

SetExpiration sets the Expiration field's value.

func (*CompleteMultipartUploadOutput) SetKey

SetKey sets the Key field's value.

func (*CompleteMultipartUploadOutput) SetLocation

SetLocation sets the Location field's value.

func (*CompleteMultipartUploadOutput) SetRequestCharged

SetRequestCharged sets the RequestCharged field's value.

func (*CompleteMultipartUploadOutput) SetSSEKMSKeyId

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*CompleteMultipartUploadOutput) SetServerSideEncryption

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (*CompleteMultipartUploadOutput) SetVersionId

SetVersionId sets the VersionId field's value.

func (CompleteMultipartUploadOutput) String

String returns the string representation

type CompletedMultipartUpload

type CompletedMultipartUpload struct {
	Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
	// contains filtered or unexported fields
}

func (CompletedMultipartUpload) GoString

func (s CompletedMultipartUpload) GoString() string

GoString returns the string representation

func (*CompletedMultipartUpload) SetParts

SetParts sets the Parts field's value.

func (CompletedMultipartUpload) String

func (s CompletedMultipartUpload) String() string

String returns the string representation

type CompletedPart

type CompletedPart struct {

	// Entity tag returned when the part was uploaded.
	ETag *string `type:"string"`

	// Part number that identifies the part. This is a positive integer between
	// 1 and 10,000.
	PartNumber *int64 `type:"integer"`
	// contains filtered or unexported fields
}

func (CompletedPart) GoString

func (s CompletedPart) GoString() string

GoString returns the string representation

func (*CompletedPart) SetETag

func (s *CompletedPart) SetETag(v string) *CompletedPart

SetETag sets the ETag field's value.

func (*CompletedPart) SetPartNumber

func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart

SetPartNumber sets the PartNumber field's value.

func (CompletedPart) String

func (s CompletedPart) String() string

String returns the string representation

type CopyObjectInput

type CopyObjectInput struct {

	// The canned ACL to apply to the object.
	ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Specifies caching behavior along the request/reply chain.
	CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`

	// Specifies presentational information for the object.
	ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`

	// Specifies what content encodings have been applied to the object and thus
	// what decoding mechanisms must be applied to obtain the media-type referenced
	// by the Content-Type header field.
	ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`

	// The language the content is in.
	ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`

	// A standard MIME type describing the format of the object data.
	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`

	// The name of the source bucket and key name of the source object, separated
	// by a slash (/). Must be URL-encoded.
	//
	// CopySource is a required field
	CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`

	// Copies the object if its entity tag (ETag) matches the specified tag.
	CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`

	// Copies the object if it has been modified since the specified time.
	CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`

	// Copies the object if its entity tag (ETag) is different than the specified
	// ETag.
	CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`

	// Copies the object if it hasn't been modified since the specified time.
	CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`

	// Specifies the algorithm to use when decrypting the source object (e.g., AES256).
	CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`

	// Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
	// the source object. The encryption key provided in this header must be one
	// that was used when the source object was created.
	CopySourceSSECustomerKey *string `` /* 135-byte string literal not displayed */

	// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
	// Amazon S3 uses this header for a message integrity check to ensure the encryption
	// key was transmitted without error.
	CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`

	// The date and time at which the object is no longer cacheable.
	Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`

	// Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
	GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`

	// Allows grantee to read the object data and its metadata.
	GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`

	// Allows grantee to read the object ACL.
	GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`

	// Allows grantee to write the ACL for the applicable object.
	GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// A map of metadata to store with the object in S3.
	Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`

	// Specifies whether the metadata is copied from the source object or replaced
	// with metadata provided in the request.
	MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// This header controls how the Protection state of the source object is copied
	// to the destination object.If copied, the retention period and all legal holds
	// are copied onto the new object. The legal hold date's is set to the date
	// of the copy.
	RetentionDirective *string `location:"header" locationName:"Retention-Directive" type:"string" enum:"RetentionDirective"`

	// Date on which it will be legal to delete or modify the object. This field
	// can only be specified if Retention-Directive is REPLACE. You can only specify
	// this or the Retention-Period header. If both are specified a 400 error will
	// be returned. If neither is specified the bucket's DefaultRetention period
	// will be used.
	RetentionExpirationDate *time.Time `location:"header" locationName:"Retention-Expiration-Date" type:"timestamp" timestampFormat:"iso8601"`

	// A single legal hold to apply to the object. This field can only be specified
	// if Retention-Directive is REPLACE. A legal hold is a character long string
	// of max length 64. The object cannot be overwritten or deleted until all legal
	// holds associated with the object are removed.
	RetentionLegalHoldId *string `location:"header" locationName:"Retention-Legal-Hold-ID" type:"string"`

	// Retention period to store on the object in seconds. The object can be neither
	// overwritten nor deleted until the amount of time specified in the retention
	// period has elapsed. If this field and Retention-Expiration-Date are specified
	// a 400 error is returned. If neither is specified the bucket's DefaultRetention
	// period will be used. 0 is a legal value assuming the bucket's minimum retention
	// period is also 0.
	RetentionPeriod *int64 `location:"header" locationName:"Retention-Period" type:"integer"`

	// Specifies the algorithm to use to when encrypting the object (e.g., AES256).
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
	// data. This value is used to store the object and then it is discarded; Amazon
	// does not store the encryption key. The key must be appropriate for use with
	// the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
	// header.
	SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`

	// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
	// Amazon S3 uses this header for a message integrity check to ensure the encryption
	// key was transmitted without error.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
	// requests for an object protected by AWS KMS will fail if not made via SSL
	// or using SigV4. Documentation on configuring any of the officially supported
	// AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`

	// The type of storage to use for the object. Defaults to 'STANDARD'.
	StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`

	// The tag-set for the object destination object this value must be used in
	// conjunction with the TaggingDirective. The tag-set must be encoded as URL
	// Query parameters
	Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`

	// Specifies whether the object tag-set are copied from the source object or
	// replaced with tag-set provided in the request.
	TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`

	// If the bucket is configured as a website, redirects requests for this object
	// to another object in the same bucket or to an external URL. Amazon S3 stores
	// the value of this header in the object metadata.
	WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
	// contains filtered or unexported fields
}

func (CopyObjectInput) GoString

func (s CopyObjectInput) GoString() string

GoString returns the string representation

func (*CopyObjectInput) SetACL

func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput

SetACL sets the ACL field's value.

func (*CopyObjectInput) SetBucket

func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput

SetBucket sets the Bucket field's value.

func (*CopyObjectInput) SetCacheControl

func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput

SetCacheControl sets the CacheControl field's value.

func (*CopyObjectInput) SetContentDisposition

func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput

SetContentDisposition sets the ContentDisposition field's value.

func (*CopyObjectInput) SetContentEncoding

func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput

SetContentEncoding sets the ContentEncoding field's value.

func (*CopyObjectInput) SetContentLanguage

func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput

SetContentLanguage sets the ContentLanguage field's value.

func (*CopyObjectInput) SetContentType

func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput

SetContentType sets the ContentType field's value.

func (*CopyObjectInput) SetCopySource

func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput

SetCopySource sets the CopySource field's value.

func (*CopyObjectInput) SetCopySourceIfMatch

func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput

SetCopySourceIfMatch sets the CopySourceIfMatch field's value.

func (*CopyObjectInput) SetCopySourceIfModifiedSince

func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput

SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.

func (*CopyObjectInput) SetCopySourceIfNoneMatch

func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput

SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.

func (*CopyObjectInput) SetCopySourceIfUnmodifiedSince

func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput

SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.

func (*CopyObjectInput) SetCopySourceSSECustomerAlgorithm

func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput

SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.

func (*CopyObjectInput) SetCopySourceSSECustomerKey

func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput

SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.

func (*CopyObjectInput) SetCopySourceSSECustomerKeyMD5

func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput

SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.

func (*CopyObjectInput) SetExpires

func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput

SetExpires sets the Expires field's value.

func (*CopyObjectInput) SetGrantFullControl

func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput

SetGrantFullControl sets the GrantFullControl field's value.

func (*CopyObjectInput) SetGrantRead

func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput

SetGrantRead sets the GrantRead field's value.

func (*CopyObjectInput) SetGrantReadACP

func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput

SetGrantReadACP sets the GrantReadACP field's value.

func (*CopyObjectInput) SetGrantWriteACP

func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput

SetGrantWriteACP sets the GrantWriteACP field's value.

func (*CopyObjectInput) SetKey

func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput

SetKey sets the Key field's value.

func (*CopyObjectInput) SetMetadata

func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput

SetMetadata sets the Metadata field's value.

func (*CopyObjectInput) SetMetadataDirective

func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput

SetMetadataDirective sets the MetadataDirective field's value.

func (*CopyObjectInput) SetRequestPayer

func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput

SetRequestPayer sets the RequestPayer field's value.

func (*CopyObjectInput) SetRetentionDirective added in v1.2.0

func (s *CopyObjectInput) SetRetentionDirective(v string) *CopyObjectInput

SetRetentionDirective sets the RetentionDirective field's value.

func (*CopyObjectInput) SetRetentionExpirationDate added in v1.2.0

func (s *CopyObjectInput) SetRetentionExpirationDate(v time.Time) *CopyObjectInput

SetRetentionExpirationDate sets the RetentionExpirationDate field's value.

func (*CopyObjectInput) SetRetentionLegalHoldId added in v1.2.0

func (s *CopyObjectInput) SetRetentionLegalHoldId(v string) *CopyObjectInput

SetRetentionLegalHoldId sets the RetentionLegalHoldId field's value.

func (*CopyObjectInput) SetRetentionPeriod added in v1.2.0

func (s *CopyObjectInput) SetRetentionPeriod(v int64) *CopyObjectInput

SetRetentionPeriod sets the RetentionPeriod field's value.

func (*CopyObjectInput) SetSSECustomerAlgorithm

func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*CopyObjectInput) SetSSECustomerKey

func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput

SetSSECustomerKey sets the SSECustomerKey field's value.

func (*CopyObjectInput) SetSSECustomerKeyMD5

func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*CopyObjectInput) SetSSEKMSKeyId

func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*CopyObjectInput) SetServerSideEncryption

func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (*CopyObjectInput) SetStorageClass

func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput

SetStorageClass sets the StorageClass field's value.

func (*CopyObjectInput) SetTagging

func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput

SetTagging sets the Tagging field's value.

func (*CopyObjectInput) SetTaggingDirective

func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput

SetTaggingDirective sets the TaggingDirective field's value.

func (*CopyObjectInput) SetWebsiteRedirectLocation

func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput

SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.

func (CopyObjectInput) String

func (s CopyObjectInput) String() string

String returns the string representation

func (*CopyObjectInput) Validate

func (s *CopyObjectInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CopyObjectOutput

type CopyObjectOutput struct {
	CopyObjectResult *CopyObjectResult `type:"structure"`

	CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`

	// If the object expiration is configured, the response includes this header.
	Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header confirming the encryption algorithm
	// used.
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header to provide round trip message integrity
	// verification of the customer-provided encryption key.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// If present, specifies the ID of the AWS Key Management Service (KMS) master
	// encryption key that was used for the object.
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`

	// Version ID of the newly created copy.
	VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
	// contains filtered or unexported fields
}

func (CopyObjectOutput) GoString

func (s CopyObjectOutput) GoString() string

GoString returns the string representation

func (*CopyObjectOutput) SetCopyObjectResult

func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput

SetCopyObjectResult sets the CopyObjectResult field's value.

func (*CopyObjectOutput) SetCopySourceVersionId

func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput

SetCopySourceVersionId sets the CopySourceVersionId field's value.

func (*CopyObjectOutput) SetExpiration

func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput

SetExpiration sets the Expiration field's value.

func (*CopyObjectOutput) SetRequestCharged

func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput

SetRequestCharged sets the RequestCharged field's value.

func (*CopyObjectOutput) SetSSECustomerAlgorithm

func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*CopyObjectOutput) SetSSECustomerKeyMD5

func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*CopyObjectOutput) SetSSEKMSKeyId

func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*CopyObjectOutput) SetServerSideEncryption

func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (*CopyObjectOutput) SetVersionId

func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput

SetVersionId sets the VersionId field's value.

func (CopyObjectOutput) String

func (s CopyObjectOutput) String() string

String returns the string representation

type CopyObjectResult

type CopyObjectResult struct {
	ETag *string `type:"string"`

	LastModified *time.Time `type:"timestamp"`
	// contains filtered or unexported fields
}

func (CopyObjectResult) GoString

func (s CopyObjectResult) GoString() string

GoString returns the string representation

func (*CopyObjectResult) SetETag

func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult

SetETag sets the ETag field's value.

func (*CopyObjectResult) SetLastModified

func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult

SetLastModified sets the LastModified field's value.

func (CopyObjectResult) String

func (s CopyObjectResult) String() string

String returns the string representation

type CopyPartResult

type CopyPartResult struct {

	// Entity tag of the object.
	ETag *string `type:"string"`

	// Date and time at which the object was uploaded.
	LastModified *time.Time `type:"timestamp"`
	// contains filtered or unexported fields
}

func (CopyPartResult) GoString

func (s CopyPartResult) GoString() string

GoString returns the string representation

func (*CopyPartResult) SetETag

func (s *CopyPartResult) SetETag(v string) *CopyPartResult

SetETag sets the ETag field's value.

func (*CopyPartResult) SetLastModified

func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult

SetLastModified sets the LastModified field's value.

func (CopyPartResult) String

func (s CopyPartResult) String() string

String returns the string representation

type CreateBucketConfiguration

type CreateBucketConfiguration struct {

	// Specifies the region where the bucket will be created. If you don't specify
	// a region, the bucket is created in US East (N. Virginia) Region (us-east-1).
	LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
	// contains filtered or unexported fields
}

func (CreateBucketConfiguration) GoString

func (s CreateBucketConfiguration) GoString() string

GoString returns the string representation

func (*CreateBucketConfiguration) SetLocationConstraint

func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration

SetLocationConstraint sets the LocationConstraint field's value.

func (CreateBucketConfiguration) String

func (s CreateBucketConfiguration) String() string

String returns the string representation

type CreateBucketInput

type CreateBucketInput struct {

	// The canned ACL to apply to the bucket.
	ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`

	// Allows grantee the read, write, read ACP, and write ACP permissions on the
	// bucket.
	GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`

	// Allows grantee to list the objects in the bucket.
	GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`

	// Allows grantee to read the bucket ACL.
	GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`

	// Allows grantee to create, overwrite, and delete any object in the bucket.
	GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`

	// Allows grantee to write the ACL for the applicable bucket.
	GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`

	// The root key used by Key Protect to encrypt this bucket. This value must
	// be the full CRN of the root key.
	IBMSSEKPCustomerRootKeyCrn *string `location:"header" locationName:"ibm-sse-kp-customer-root-key-crn" type:"string"`

	// The algorithm and key size to use with the encryption key stored by using
	// Key Protect. This value must be set to the string "AES256".
	IBMSSEKPEncryptionAlgorithm *string `location:"header" locationName:"ibm-sse-kp-encryption-algorithm" type:"string"`

	// Sets the IBM Service Instance Id in the request.
	//
	// Only Valid for IBM IAM Authentication
	IBMServiceInstanceId *string `location:"header" locationName:"ibm-service-instance-id" type:"string"`
	// contains filtered or unexported fields
}

func (CreateBucketInput) GoString

func (s CreateBucketInput) GoString() string

GoString returns the string representation

func (*CreateBucketInput) SetACL

SetACL sets the ACL field's value.

func (*CreateBucketInput) SetBucket

func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput

SetBucket sets the Bucket field's value.

func (*CreateBucketInput) SetCreateBucketConfiguration

func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput

SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.

func (*CreateBucketInput) SetGrantFullControl

func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput

SetGrantFullControl sets the GrantFullControl field's value.

func (*CreateBucketInput) SetGrantRead

func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput

SetGrantRead sets the GrantRead field's value.

func (*CreateBucketInput) SetGrantReadACP

func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput

SetGrantReadACP sets the GrantReadACP field's value.

func (*CreateBucketInput) SetGrantWrite

func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput

SetGrantWrite sets the GrantWrite field's value.

func (*CreateBucketInput) SetGrantWriteACP

func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput

SetGrantWriteACP sets the GrantWriteACP field's value.

func (*CreateBucketInput) SetIBMSSEKPCustomerRootKeyCrn

func (s *CreateBucketInput) SetIBMSSEKPCustomerRootKeyCrn(v string) *CreateBucketInput

SetIBMSSEKPCustomerRootKeyCrn sets the IBMSSEKPCustomerRootKeyCrn field's value.

func (*CreateBucketInput) SetIBMSSEKPEncryptionAlgorithm

func (s *CreateBucketInput) SetIBMSSEKPEncryptionAlgorithm(v string) *CreateBucketInput

SetIBMSSEKPEncryptionAlgorithm sets the IBMSSEKPEncryptionAlgorithm field's value.

func (*CreateBucketInput) SetIBMServiceInstanceId

func (s *CreateBucketInput) SetIBMServiceInstanceId(v string) *CreateBucketInput

SetIBMServiceInstanceId sets the IBMServiceInstanceId field's value.

func (CreateBucketInput) String

func (s CreateBucketInput) String() string

String returns the string representation

func (*CreateBucketInput) Validate

func (s *CreateBucketInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateBucketOutput

type CreateBucketOutput struct {
	Location *string `location:"header" locationName:"Location" type:"string"`
	// contains filtered or unexported fields
}

func (CreateBucketOutput) GoString

func (s CreateBucketOutput) GoString() string

GoString returns the string representation

func (*CreateBucketOutput) SetLocation

func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput

SetLocation sets the Location field's value.

func (CreateBucketOutput) String

func (s CreateBucketOutput) String() string

String returns the string representation

type CreateMultipartUploadInput

type CreateMultipartUploadInput struct {

	// The canned ACL to apply to the object.
	ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Specifies caching behavior along the request/reply chain.
	CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`

	// Specifies presentational information for the object.
	ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`

	// Specifies what content encodings have been applied to the object and thus
	// what decoding mechanisms must be applied to obtain the media-type referenced
	// by the Content-Type header field.
	ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`

	// The language the content is in.
	ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`

	// A standard MIME type describing the format of the object data.
	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`

	// The date and time at which the object is no longer cacheable.
	Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`

	// Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
	GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`

	// Allows grantee to read the object data and its metadata.
	GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`

	// Allows grantee to read the object ACL.
	GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`

	// Allows grantee to write the ACL for the applicable object.
	GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// A map of metadata to store with the object in S3.
	Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// Specifies the algorithm to use to when encrypting the object (e.g., AES256).
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
	// data. This value is used to store the object and then it is discarded; Amazon
	// does not store the encryption key. The key must be appropriate for use with
	// the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
	// header.
	SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`

	// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
	// Amazon S3 uses this header for a message integrity check to ensure the encryption
	// key was transmitted without error.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
	// requests for an object protected by AWS KMS will fail if not made via SSL
	// or using SigV4. Documentation on configuring any of the officially supported
	// AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`

	// The type of storage to use for the object. Defaults to 'STANDARD'.
	StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`

	// The tag-set for the object. The tag-set must be encoded as URL Query parameters
	Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`

	// If the bucket is configured as a website, redirects requests for this object
	// to another object in the same bucket or to an external URL. Amazon S3 stores
	// the value of this header in the object metadata.
	WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
	// contains filtered or unexported fields
}

func (CreateMultipartUploadInput) GoString

func (s CreateMultipartUploadInput) GoString() string

GoString returns the string representation

func (*CreateMultipartUploadInput) SetACL

SetACL sets the ACL field's value.

func (*CreateMultipartUploadInput) SetBucket

SetBucket sets the Bucket field's value.

func (*CreateMultipartUploadInput) SetCacheControl

SetCacheControl sets the CacheControl field's value.

func (*CreateMultipartUploadInput) SetContentDisposition

func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput

SetContentDisposition sets the ContentDisposition field's value.

func (*CreateMultipartUploadInput) SetContentEncoding

SetContentEncoding sets the ContentEncoding field's value.

func (*CreateMultipartUploadInput) SetContentLanguage

SetContentLanguage sets the ContentLanguage field's value.

func (*CreateMultipartUploadInput) SetContentType

SetContentType sets the ContentType field's value.

func (*CreateMultipartUploadInput) SetExpires

SetExpires sets the Expires field's value.

func (*CreateMultipartUploadInput) SetGrantFullControl

SetGrantFullControl sets the GrantFullControl field's value.

func (*CreateMultipartUploadInput) SetGrantRead

SetGrantRead sets the GrantRead field's value.

func (*CreateMultipartUploadInput) SetGrantReadACP

SetGrantReadACP sets the GrantReadACP field's value.

func (*CreateMultipartUploadInput) SetGrantWriteACP

SetGrantWriteACP sets the GrantWriteACP field's value.

func (*CreateMultipartUploadInput) SetKey

SetKey sets the Key field's value.

func (*CreateMultipartUploadInput) SetMetadata

SetMetadata sets the Metadata field's value.

func (*CreateMultipartUploadInput) SetRequestPayer

SetRequestPayer sets the RequestPayer field's value.

func (*CreateMultipartUploadInput) SetSSECustomerAlgorithm

func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*CreateMultipartUploadInput) SetSSECustomerKey

SetSSECustomerKey sets the SSECustomerKey field's value.

func (*CreateMultipartUploadInput) SetSSECustomerKeyMD5

func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*CreateMultipartUploadInput) SetSSEKMSKeyId

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*CreateMultipartUploadInput) SetServerSideEncryption

func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (*CreateMultipartUploadInput) SetStorageClass

SetStorageClass sets the StorageClass field's value.

func (*CreateMultipartUploadInput) SetTagging

SetTagging sets the Tagging field's value.

func (*CreateMultipartUploadInput) SetWebsiteRedirectLocation

func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput

SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.

func (CreateMultipartUploadInput) String

String returns the string representation

func (*CreateMultipartUploadInput) Validate

func (s *CreateMultipartUploadInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateMultipartUploadOutput

type CreateMultipartUploadOutput struct {

	// Date when multipart upload will become eligible for abort operation by lifecycle.
	AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`

	// Id of the lifecycle rule that makes a multipart upload eligible for abort
	// operation.
	AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`

	// Name of the bucket to which the multipart upload was initiated.
	Bucket *string `locationName:"Bucket" type:"string"`

	// Object key for which the multipart upload was initiated.
	Key *string `min:"1" type:"string"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header confirming the encryption algorithm
	// used.
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header to provide round trip message integrity
	// verification of the customer-provided encryption key.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// If present, specifies the ID of the AWS Key Management Service (KMS) master
	// encryption key that was used for the object.
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`

	// ID for the initiated multipart upload.
	UploadId *string `type:"string"`
	// contains filtered or unexported fields
}

func (CreateMultipartUploadOutput) GoString

func (s CreateMultipartUploadOutput) GoString() string

GoString returns the string representation

func (*CreateMultipartUploadOutput) SetAbortDate

SetAbortDate sets the AbortDate field's value.

func (*CreateMultipartUploadOutput) SetAbortRuleId

SetAbortRuleId sets the AbortRuleId field's value.

func (*CreateMultipartUploadOutput) SetBucket

SetBucket sets the Bucket field's value.

func (*CreateMultipartUploadOutput) SetKey

SetKey sets the Key field's value.

func (*CreateMultipartUploadOutput) SetRequestCharged

SetRequestCharged sets the RequestCharged field's value.

func (*CreateMultipartUploadOutput) SetSSECustomerAlgorithm

func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*CreateMultipartUploadOutput) SetSSECustomerKeyMD5

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*CreateMultipartUploadOutput) SetSSEKMSKeyId

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*CreateMultipartUploadOutput) SetServerSideEncryption

func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (*CreateMultipartUploadOutput) SetUploadId

SetUploadId sets the UploadId field's value.

func (CreateMultipartUploadOutput) String

String returns the string representation

type Delete

type Delete struct {

	// Objects is a required field
	Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`

	// Element to enable quiet mode for the request. When you add this element,
	// you must set its value to true.
	Quiet *bool `type:"boolean"`
	// contains filtered or unexported fields
}

func (Delete) GoString

func (s Delete) GoString() string

GoString returns the string representation

func (*Delete) SetObjects

func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete

SetObjects sets the Objects field's value.

func (*Delete) SetQuiet

func (s *Delete) SetQuiet(v bool) *Delete

SetQuiet sets the Quiet field's value.

func (Delete) String

func (s Delete) String() string

String returns the string representation

func (*Delete) Validate

func (s *Delete) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteBucketCorsInput

type DeleteBucketCorsInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteBucketCorsInput) GoString

func (s DeleteBucketCorsInput) GoString() string

GoString returns the string representation

func (*DeleteBucketCorsInput) SetBucket

SetBucket sets the Bucket field's value.

func (DeleteBucketCorsInput) String

func (s DeleteBucketCorsInput) String() string

String returns the string representation

func (*DeleteBucketCorsInput) Validate

func (s *DeleteBucketCorsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteBucketCorsOutput

type DeleteBucketCorsOutput struct {
	// contains filtered or unexported fields
}

func (DeleteBucketCorsOutput) GoString

func (s DeleteBucketCorsOutput) GoString() string

GoString returns the string representation

func (DeleteBucketCorsOutput) String

func (s DeleteBucketCorsOutput) String() string

String returns the string representation

type DeleteBucketInput

type DeleteBucketInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteBucketInput) GoString

func (s DeleteBucketInput) GoString() string

GoString returns the string representation

func (*DeleteBucketInput) SetBucket

func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput

SetBucket sets the Bucket field's value.

func (DeleteBucketInput) String

func (s DeleteBucketInput) String() string

String returns the string representation

func (*DeleteBucketInput) Validate

func (s *DeleteBucketInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteBucketLifecycleInput added in v1.2.0

type DeleteBucketLifecycleInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteBucketLifecycleInput) GoString added in v1.2.0

func (s DeleteBucketLifecycleInput) GoString() string

GoString returns the string representation

func (*DeleteBucketLifecycleInput) SetBucket added in v1.2.0

SetBucket sets the Bucket field's value.

func (DeleteBucketLifecycleInput) String added in v1.2.0

String returns the string representation

func (*DeleteBucketLifecycleInput) Validate added in v1.2.0

func (s *DeleteBucketLifecycleInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteBucketLifecycleOutput added in v1.2.0

type DeleteBucketLifecycleOutput struct {
	// contains filtered or unexported fields
}

func (DeleteBucketLifecycleOutput) GoString added in v1.2.0

func (s DeleteBucketLifecycleOutput) GoString() string

GoString returns the string representation

func (DeleteBucketLifecycleOutput) String added in v1.2.0

String returns the string representation

type DeleteBucketOutput

type DeleteBucketOutput struct {
	// contains filtered or unexported fields
}

func (DeleteBucketOutput) GoString

func (s DeleteBucketOutput) GoString() string

GoString returns the string representation

func (DeleteBucketOutput) String

func (s DeleteBucketOutput) String() string

String returns the string representation

type DeleteLegalHoldInput added in v1.2.0

type DeleteLegalHoldInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// RetentionLegalHoldId is a required field
	RetentionLegalHoldId *string `location:"querystring" locationName:"remove" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteLegalHoldInput) GoString added in v1.2.0

func (s DeleteLegalHoldInput) GoString() string

GoString returns the string representation

func (*DeleteLegalHoldInput) SetBucket added in v1.2.0

SetBucket sets the Bucket field's value.

func (*DeleteLegalHoldInput) SetKey added in v1.2.0

SetKey sets the Key field's value.

func (*DeleteLegalHoldInput) SetRetentionLegalHoldId added in v1.2.0

func (s *DeleteLegalHoldInput) SetRetentionLegalHoldId(v string) *DeleteLegalHoldInput

SetRetentionLegalHoldId sets the RetentionLegalHoldId field's value.

func (DeleteLegalHoldInput) String added in v1.2.0

func (s DeleteLegalHoldInput) String() string

String returns the string representation

func (*DeleteLegalHoldInput) Validate added in v1.2.0

func (s *DeleteLegalHoldInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteLegalHoldOutput added in v1.2.0

type DeleteLegalHoldOutput struct {
	// contains filtered or unexported fields
}

func (DeleteLegalHoldOutput) GoString added in v1.2.0

func (s DeleteLegalHoldOutput) GoString() string

GoString returns the string representation

func (DeleteLegalHoldOutput) String added in v1.2.0

func (s DeleteLegalHoldOutput) String() string

String returns the string representation

type DeleteObjectInput

type DeleteObjectInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// The concatenation of the authentication device's serial number, a space,
	// and the value that is displayed on your authentication device.
	MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// VersionId used to reference a specific version of the object.
	VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
	// contains filtered or unexported fields
}

func (DeleteObjectInput) GoString

func (s DeleteObjectInput) GoString() string

GoString returns the string representation

func (*DeleteObjectInput) SetBucket

func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput

SetBucket sets the Bucket field's value.

func (*DeleteObjectInput) SetKey

SetKey sets the Key field's value.

func (*DeleteObjectInput) SetMFA

SetMFA sets the MFA field's value.

func (*DeleteObjectInput) SetRequestPayer

func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput

SetRequestPayer sets the RequestPayer field's value.

func (*DeleteObjectInput) SetVersionId

func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput

SetVersionId sets the VersionId field's value.

func (DeleteObjectInput) String

func (s DeleteObjectInput) String() string

String returns the string representation

func (*DeleteObjectInput) Validate

func (s *DeleteObjectInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteObjectOutput

type DeleteObjectOutput struct {

	// Specifies whether the versioned object that was permanently deleted was (true)
	// or was not (false) a delete marker.
	DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// Returns the version ID of the delete marker created as a result of the DELETE
	// operation.
	VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
	// contains filtered or unexported fields
}

func (DeleteObjectOutput) GoString

func (s DeleteObjectOutput) GoString() string

GoString returns the string representation

func (*DeleteObjectOutput) SetDeleteMarker

func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput

SetDeleteMarker sets the DeleteMarker field's value.

func (*DeleteObjectOutput) SetRequestCharged

func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput

SetRequestCharged sets the RequestCharged field's value.

func (*DeleteObjectOutput) SetVersionId

func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput

SetVersionId sets the VersionId field's value.

func (DeleteObjectOutput) String

func (s DeleteObjectOutput) String() string

String returns the string representation

type DeleteObjectsInput

type DeleteObjectsInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Delete is a required field
	Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`

	// The concatenation of the authentication device's serial number, a space,
	// and the value that is displayed on your authentication device.
	MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
	// contains filtered or unexported fields
}

func (DeleteObjectsInput) GoString

func (s DeleteObjectsInput) GoString() string

GoString returns the string representation

func (*DeleteObjectsInput) SetBucket

func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput

SetBucket sets the Bucket field's value.

func (*DeleteObjectsInput) SetDelete

func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput

SetDelete sets the Delete field's value.

func (*DeleteObjectsInput) SetMFA

SetMFA sets the MFA field's value.

func (*DeleteObjectsInput) SetRequestPayer

func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput

SetRequestPayer sets the RequestPayer field's value.

func (DeleteObjectsInput) String

func (s DeleteObjectsInput) String() string

String returns the string representation

func (*DeleteObjectsInput) Validate

func (s *DeleteObjectsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteObjectsOutput

type DeleteObjectsOutput struct {
	Deleted []*DeletedObject `type:"list" flattened:"true"`

	Errors []*Error `locationName:"Error" type:"list" flattened:"true"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
	// contains filtered or unexported fields
}

func (DeleteObjectsOutput) GoString

func (s DeleteObjectsOutput) GoString() string

GoString returns the string representation

func (*DeleteObjectsOutput) SetDeleted

SetDeleted sets the Deleted field's value.

func (*DeleteObjectsOutput) SetErrors

func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput

SetErrors sets the Errors field's value.

func (*DeleteObjectsOutput) SetRequestCharged

func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput

SetRequestCharged sets the RequestCharged field's value.

func (DeleteObjectsOutput) String

func (s DeleteObjectsOutput) String() string

String returns the string representation

type DeletedObject

type DeletedObject struct {
	DeleteMarker *bool `type:"boolean"`

	DeleteMarkerVersionId *string `type:"string"`

	Key *string `min:"1" type:"string"`

	VersionId *string `type:"string"`
	// contains filtered or unexported fields
}

func (DeletedObject) GoString

func (s DeletedObject) GoString() string

GoString returns the string representation

func (*DeletedObject) SetDeleteMarker

func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject

SetDeleteMarker sets the DeleteMarker field's value.

func (*DeletedObject) SetDeleteMarkerVersionId

func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject

SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.

func (*DeletedObject) SetKey

func (s *DeletedObject) SetKey(v string) *DeletedObject

SetKey sets the Key field's value.

func (*DeletedObject) SetVersionId

func (s *DeletedObject) SetVersionId(v string) *DeletedObject

SetVersionId sets the VersionId field's value.

func (DeletedObject) String

func (s DeletedObject) String() string

String returns the string representation

type Error

type Error struct {
	Code *string `type:"string"`

	Key *string `min:"1" type:"string"`

	Message *string `type:"string"`

	VersionId *string `type:"string"`
	// contains filtered or unexported fields
}

func (Error) GoString

func (s Error) GoString() string

GoString returns the string representation

func (*Error) SetCode

func (s *Error) SetCode(v string) *Error

SetCode sets the Code field's value.

func (*Error) SetKey

func (s *Error) SetKey(v string) *Error

SetKey sets the Key field's value.

func (*Error) SetMessage

func (s *Error) SetMessage(v string) *Error

SetMessage sets the Message field's value.

func (*Error) SetVersionId

func (s *Error) SetVersionId(v string) *Error

SetVersionId sets the VersionId field's value.

func (Error) String

func (s Error) String() string

String returns the string representation

type ExtendObjectRetentionInput added in v1.2.0

type ExtendObjectRetentionInput struct {

	// Additional time, in seconds, to add to the existing retention period for
	// the object. If this field and New-Retention-Time and/or New-Retention-Expiration-Date
	// are specified, a 400 error will be returned. If none of the Request Headers
	// are specified, a 400 error will be returned to the user. The retention period
	// of an object may be extended up to bucket maximum retention period from the
	// time of the request.
	AdditionalRetentionPeriod *int64 `location:"header" locationName:"Additional-Retention-Period" type:"integer"`

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Retention Period in seconds for the object. The Retention will be enforced
	// from the current time until current time + the value in this header. This
	// value has to be within the ranges defined for the bucket.
	ExtendRetentionFromCurrentTime *int64 `location:"header" locationName:"Extend-Retention-From-Current-Time" type:"integer"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// A new retention date to use for the object in place of the existing retention
	// date. If this value is less than the existing value stored for the object,
	// a 400 error will be returned. If this field and Additional-Retention-Period
	// and/or New-Retention-Period and/or Extend-Retention-From-Current-Time are
	// specified, a 400 error will be returned. If none of the Request Headers are
	// specified, a 400 error will be returned to the user. The retention period
	// of an object may be extended up to bucket maximum retention period from the
	// time of the request.
	NewRetentionExpirationDate *time.Time `location:"header" locationName:"New-Retention-Expiration-Date" type:"timestamp" timestampFormat:"iso8601"`

	// Retention period, in seconds, to use for the object in place of the existing
	// retention period stored for the object. If this value is less than the existing
	// value stored for the object, a 400 error will be returned. If this field
	// and Additional-Retention-Period and/or New-Retention-Expiration-Date are
	// specified, a 400 error will be returned. If none of the Request Headers are
	// specified, a 400 error will be returned.
	NewRetentionPeriod *int64 `location:"header" locationName:"New-Retention-Period" type:"integer"`
	// contains filtered or unexported fields
}

func (ExtendObjectRetentionInput) GoString added in v1.2.0

func (s ExtendObjectRetentionInput) GoString() string

GoString returns the string representation

func (*ExtendObjectRetentionInput) SetAdditionalRetentionPeriod added in v1.2.0

func (s *ExtendObjectRetentionInput) SetAdditionalRetentionPeriod(v int64) *ExtendObjectRetentionInput

SetAdditionalRetentionPeriod sets the AdditionalRetentionPeriod field's value.

func (*ExtendObjectRetentionInput) SetBucket added in v1.2.0

SetBucket sets the Bucket field's value.

func (*ExtendObjectRetentionInput) SetExtendRetentionFromCurrentTime added in v1.2.0

func (s *ExtendObjectRetentionInput) SetExtendRetentionFromCurrentTime(v int64) *ExtendObjectRetentionInput

SetExtendRetentionFromCurrentTime sets the ExtendRetentionFromCurrentTime field's value.

func (*ExtendObjectRetentionInput) SetKey added in v1.2.0

SetKey sets the Key field's value.

func (*ExtendObjectRetentionInput) SetNewRetentionExpirationDate added in v1.2.0

func (s *ExtendObjectRetentionInput) SetNewRetentionExpirationDate(v time.Time) *ExtendObjectRetentionInput

SetNewRetentionExpirationDate sets the NewRetentionExpirationDate field's value.

func (*ExtendObjectRetentionInput) SetNewRetentionPeriod added in v1.2.0

func (s *ExtendObjectRetentionInput) SetNewRetentionPeriod(v int64) *ExtendObjectRetentionInput

SetNewRetentionPeriod sets the NewRetentionPeriod field's value.

func (ExtendObjectRetentionInput) String added in v1.2.0

String returns the string representation

func (*ExtendObjectRetentionInput) Validate added in v1.2.0

func (s *ExtendObjectRetentionInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ExtendObjectRetentionOutput added in v1.2.0

type ExtendObjectRetentionOutput struct {
	// contains filtered or unexported fields
}

func (ExtendObjectRetentionOutput) GoString added in v1.2.0

func (s ExtendObjectRetentionOutput) GoString() string

GoString returns the string representation

func (ExtendObjectRetentionOutput) String added in v1.2.0

String returns the string representation

type GetBucketAclInput

type GetBucketAclInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetBucketAclInput) GoString

func (s GetBucketAclInput) GoString() string

GoString returns the string representation

func (*GetBucketAclInput) SetBucket

func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput

SetBucket sets the Bucket field's value.

func (GetBucketAclInput) String

func (s GetBucketAclInput) String() string

String returns the string representation

func (*GetBucketAclInput) Validate

func (s *GetBucketAclInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetBucketAclOutput

type GetBucketAclOutput struct {

	// A list of grants.
	Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`

	Owner *Owner `type:"structure"`
	// contains filtered or unexported fields
}

func (GetBucketAclOutput) GoString

func (s GetBucketAclOutput) GoString() string

GoString returns the string representation

func (*GetBucketAclOutput) SetGrants

func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput

SetGrants sets the Grants field's value.

func (*GetBucketAclOutput) SetOwner

func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput

SetOwner sets the Owner field's value.

func (GetBucketAclOutput) String

func (s GetBucketAclOutput) String() string

String returns the string representation

type GetBucketCorsInput

type GetBucketCorsInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetBucketCorsInput) GoString

func (s GetBucketCorsInput) GoString() string

GoString returns the string representation

func (*GetBucketCorsInput) SetBucket

func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput

SetBucket sets the Bucket field's value.

func (GetBucketCorsInput) String

func (s GetBucketCorsInput) String() string

String returns the string representation

func (*GetBucketCorsInput) Validate

func (s *GetBucketCorsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetBucketCorsOutput

type GetBucketCorsOutput struct {
	CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
	// contains filtered or unexported fields
}

func (GetBucketCorsOutput) GoString

func (s GetBucketCorsOutput) GoString() string

GoString returns the string representation

func (*GetBucketCorsOutput) SetCORSRules

func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput

SetCORSRules sets the CORSRules field's value.

func (GetBucketCorsOutput) String

func (s GetBucketCorsOutput) String() string

String returns the string representation

type GetBucketLifecycleConfigurationInput added in v1.2.0

type GetBucketLifecycleConfigurationInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetBucketLifecycleConfigurationInput) GoString added in v1.2.0

GoString returns the string representation

func (*GetBucketLifecycleConfigurationInput) SetBucket added in v1.2.0

SetBucket sets the Bucket field's value.

func (GetBucketLifecycleConfigurationInput) String added in v1.2.0

String returns the string representation

func (*GetBucketLifecycleConfigurationInput) Validate added in v1.2.0

Validate inspects the fields of the type to determine if they are valid.

type GetBucketLifecycleConfigurationOutput added in v1.2.0

type GetBucketLifecycleConfigurationOutput struct {

	// Currently only one Rule allowed.
	Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
	// contains filtered or unexported fields
}

func (GetBucketLifecycleConfigurationOutput) GoString added in v1.2.0

GoString returns the string representation

func (*GetBucketLifecycleConfigurationOutput) SetRules added in v1.2.0

SetRules sets the Rules field's value.

func (GetBucketLifecycleConfigurationOutput) String added in v1.2.0

String returns the string representation

type GetBucketLocationInput

type GetBucketLocationInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetBucketLocationInput) GoString

func (s GetBucketLocationInput) GoString() string

GoString returns the string representation

func (*GetBucketLocationInput) SetBucket

SetBucket sets the Bucket field's value.

func (GetBucketLocationInput) String

func (s GetBucketLocationInput) String() string

String returns the string representation

func (*GetBucketLocationInput) Validate

func (s *GetBucketLocationInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetBucketLocationOutput

type GetBucketLocationOutput struct {
	LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
	// contains filtered or unexported fields
}

func (GetBucketLocationOutput) GoString

func (s GetBucketLocationOutput) GoString() string

GoString returns the string representation

func (*GetBucketLocationOutput) SetLocationConstraint

func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput

SetLocationConstraint sets the LocationConstraint field's value.

func (GetBucketLocationOutput) String

func (s GetBucketLocationOutput) String() string

String returns the string representation

type GetBucketLoggingInput

type GetBucketLoggingInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetBucketLoggingInput) GoString

func (s GetBucketLoggingInput) GoString() string

GoString returns the string representation

func (*GetBucketLoggingInput) SetBucket

SetBucket sets the Bucket field's value.

func (GetBucketLoggingInput) String

func (s GetBucketLoggingInput) String() string

String returns the string representation

func (*GetBucketLoggingInput) Validate

func (s *GetBucketLoggingInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetBucketLoggingOutput

type GetBucketLoggingOutput struct {

	// Container for logging information. Presence of this element indicates that
	// logging is enabled. Parameters TargetBucket and TargetPrefix are required
	// in this case.
	LoggingEnabled *LoggingEnabled `type:"structure"`
	// contains filtered or unexported fields
}

func (GetBucketLoggingOutput) GoString

func (s GetBucketLoggingOutput) GoString() string

GoString returns the string representation

func (*GetBucketLoggingOutput) SetLoggingEnabled

SetLoggingEnabled sets the LoggingEnabled field's value.

func (GetBucketLoggingOutput) String

func (s GetBucketLoggingOutput) String() string

String returns the string representation

type GetBucketProtectionConfigurationInput added in v1.2.0

type GetBucketProtectionConfigurationInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetBucketProtectionConfigurationInput) GoString added in v1.2.0

GoString returns the string representation

func (*GetBucketProtectionConfigurationInput) SetBucket added in v1.2.0

SetBucket sets the Bucket field's value.

func (GetBucketProtectionConfigurationInput) String added in v1.2.0

String returns the string representation

func (*GetBucketProtectionConfigurationInput) Validate added in v1.2.0

Validate inspects the fields of the type to determine if they are valid.

type GetBucketProtectionConfigurationOutput added in v1.2.0

type GetBucketProtectionConfigurationOutput struct {

	// Bucket protection configuration
	ProtectionConfiguration *ProtectionConfiguration `type:"structure"`
	// contains filtered or unexported fields
}

func (GetBucketProtectionConfigurationOutput) GoString added in v1.2.0

GoString returns the string representation

func (*GetBucketProtectionConfigurationOutput) SetProtectionConfiguration added in v1.2.0

SetProtectionConfiguration sets the ProtectionConfiguration field's value.

func (GetBucketProtectionConfigurationOutput) String added in v1.2.0

String returns the string representation

type GetObjectAclInput

type GetObjectAclInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// VersionId used to reference a specific version of the object.
	VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
	// contains filtered or unexported fields
}

func (GetObjectAclInput) GoString

func (s GetObjectAclInput) GoString() string

GoString returns the string representation

func (*GetObjectAclInput) SetBucket

func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput

SetBucket sets the Bucket field's value.

func (*GetObjectAclInput) SetKey

SetKey sets the Key field's value.

func (*GetObjectAclInput) SetRequestPayer

func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput

SetRequestPayer sets the RequestPayer field's value.

func (*GetObjectAclInput) SetVersionId

func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput

SetVersionId sets the VersionId field's value.

func (GetObjectAclInput) String

func (s GetObjectAclInput) String() string

String returns the string representation

func (*GetObjectAclInput) Validate

func (s *GetObjectAclInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetObjectAclOutput

type GetObjectAclOutput struct {

	// A list of grants.
	Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`

	Owner *Owner `type:"structure"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
	// contains filtered or unexported fields
}

func (GetObjectAclOutput) GoString

func (s GetObjectAclOutput) GoString() string

GoString returns the string representation

func (*GetObjectAclOutput) SetGrants

func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput

SetGrants sets the Grants field's value.

func (*GetObjectAclOutput) SetOwner

func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput

SetOwner sets the Owner field's value.

func (*GetObjectAclOutput) SetRequestCharged

func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput

SetRequestCharged sets the RequestCharged field's value.

func (GetObjectAclOutput) String

func (s GetObjectAclOutput) String() string

String returns the string representation

type GetObjectInput

type GetObjectInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Return the object only if its entity tag (ETag) is the same as the one specified,
	// otherwise return a 412 (precondition failed).
	IfMatch *string `location:"header" locationName:"If-Match" type:"string"`

	// Return the object only if it has been modified since the specified time,
	// otherwise return a 304 (not modified).
	IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`

	// Return the object only if its entity tag (ETag) is different from the one
	// specified, otherwise return a 304 (not modified).
	IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`

	// Return the object only if it has not been modified since the specified time,
	// otherwise return a 412 (precondition failed).
	IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// Part number of the object being read. This is a positive integer between
	// 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
	// Useful for downloading just a part of an object.
	PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`

	// Downloads the specified range bytes of an object. For more information about
	// the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
	Range *string `location:"header" locationName:"Range" type:"string"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// Sets the Cache-Control header of the response.
	ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`

	// Sets the Content-Disposition header of the response
	ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`

	// Sets the Content-Encoding header of the response.
	ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`

	// Sets the Content-Language header of the response.
	ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`

	// Sets the Content-Type header of the response.
	ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`

	// Sets the Expires header of the response.
	ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp"`

	// Specifies the algorithm to use to when encrypting the object (e.g., AES256).
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
	// data. This value is used to store the object and then it is discarded; Amazon
	// does not store the encryption key. The key must be appropriate for use with
	// the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
	// header.
	SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`

	// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
	// Amazon S3 uses this header for a message integrity check to ensure the encryption
	// key was transmitted without error.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// VersionId used to reference a specific version of the object.
	VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
	// contains filtered or unexported fields
}

func (GetObjectInput) GoString

func (s GetObjectInput) GoString() string

GoString returns the string representation

func (*GetObjectInput) SetBucket

func (s *GetObjectInput) SetBucket(v string) *GetObjectInput

SetBucket sets the Bucket field's value.

func (*GetObjectInput) SetIfMatch

func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput

SetIfMatch sets the IfMatch field's value.

func (*GetObjectInput) SetIfModifiedSince

func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput

SetIfModifiedSince sets the IfModifiedSince field's value.

func (*GetObjectInput) SetIfNoneMatch

func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput

SetIfNoneMatch sets the IfNoneMatch field's value.

func (*GetObjectInput) SetIfUnmodifiedSince

func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput

SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.

func (*GetObjectInput) SetKey

func (s *GetObjectInput) SetKey(v string) *GetObjectInput

SetKey sets the Key field's value.

func (*GetObjectInput) SetPartNumber

func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput

SetPartNumber sets the PartNumber field's value.

func (*GetObjectInput) SetRange

func (s *GetObjectInput) SetRange(v string) *GetObjectInput

SetRange sets the Range field's value.

func (*GetObjectInput) SetRequestPayer

func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput

SetRequestPayer sets the RequestPayer field's value.

func (*GetObjectInput) SetResponseCacheControl

func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput

SetResponseCacheControl sets the ResponseCacheControl field's value.

func (*GetObjectInput) SetResponseContentDisposition

func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput

SetResponseContentDisposition sets the ResponseContentDisposition field's value.

func (*GetObjectInput) SetResponseContentEncoding

func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput

SetResponseContentEncoding sets the ResponseContentEncoding field's value.

func (*GetObjectInput) SetResponseContentLanguage

func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput

SetResponseContentLanguage sets the ResponseContentLanguage field's value.

func (*GetObjectInput) SetResponseContentType

func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput

SetResponseContentType sets the ResponseContentType field's value.

func (*GetObjectInput) SetResponseExpires

func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput

SetResponseExpires sets the ResponseExpires field's value.

func (*GetObjectInput) SetSSECustomerAlgorithm

func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*GetObjectInput) SetSSECustomerKey

func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput

SetSSECustomerKey sets the SSECustomerKey field's value.

func (*GetObjectInput) SetSSECustomerKeyMD5

func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*GetObjectInput) SetVersionId

func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput

SetVersionId sets the VersionId field's value.

func (GetObjectInput) String

func (s GetObjectInput) String() string

String returns the string representation

func (*GetObjectInput) Validate

func (s *GetObjectInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetObjectOutput

type GetObjectOutput struct {
	AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`

	// Object data.
	Body io.ReadCloser `type:"blob"`

	// Specifies caching behavior along the request/reply chain.
	CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`

	// Specifies presentational information for the object.
	ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`

	// Specifies what content encodings have been applied to the object and thus
	// what decoding mechanisms must be applied to obtain the media-type referenced
	// by the Content-Type header field.
	ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`

	// The language the content is in.
	ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`

	// Size of the body in bytes.
	ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`

	// The portion of the object returned in the response.
	ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`

	// A standard MIME type describing the format of the object data.
	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`

	// Specifies whether the object retrieved was (true) or was not (false) a Delete
	// Marker. If false, this response header does not appear in the response.
	DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`

	// An ETag is an opaque identifier assigned by a web server to a specific version
	// of a resource found at a URL
	ETag *string `location:"header" locationName:"ETag" type:"string"`

	// If the object expiration is configured (see PUT Bucket lifecycle), the response
	// includes this header. It includes the expiry-date and rule-id key value pairs
	// providing object expiration information. The value of the rule-id is URL
	// encoded.
	Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`

	// The date and time at which the object is no longer cacheable.
	Expires *string `location:"header" locationName:"Expires" type:"string"`

	IBMRestoredCopyStorageClass *string `location:"header" locationName:"x-ibm-restored-copy-storage-class" type:"string"`

	// This header is only included if an object has transition metadata. This header
	// will indicate the transition storage class and time of transition. If this
	// header and the x-amz-restore header are both included, this header will indicate
	// the time at which the object was originally archived.
	IBMTransition *string `location:"header" locationName:"x-ibm-transition" type:"string"`

	// Last modified date of the object
	LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`

	// A map of metadata to store with the object in S3.
	Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`

	// This is set to the number of metadata entries not returned in x-amz-meta
	// headers. This can happen if you create metadata using an API like SOAP that
	// supports more flexible metadata than the REST API. For example, using SOAP,
	// you can create metadata whose values are not legal HTTP headers.
	MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`

	// The count of parts this object has.
	PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`

	ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// Provides information about object restoration operation and expiration time
	// of the restored object copy.
	Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`

	// Date on which it will be legal to delete or modify the object. You can only
	// specify this or the Retention-Period header. If both are specified a 400
	// error will be returned. If neither is specified the bucket's DefaultRetention
	// period will be used.
	RetentionExpirationDate *time.Time `location:"header" locationName:"Retention-Expiration-Date" type:"timestamp" timestampFormat:"iso8601"`

	RetentionLegalHoldCount *int64 `location:"header" locationName:"Retention-Legal-Hold-Count" type:"integer"`

	// Retention period to store on the object in seconds. If this field and Retention-Expiration-Date
	// are specified a 400 error is returned. If neither is specified the bucket's
	// DefaultRetention period will be used. 0 is a legal value assuming the bucket's
	// minimum retention period is also 0.
	RetentionPeriod *int64 `location:"header" locationName:"Retention-Period" type:"integer"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header confirming the encryption algorithm
	// used.
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header to provide round trip message integrity
	// verification of the customer-provided encryption key.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// If present, specifies the ID of the AWS Key Management Service (KMS) master
	// encryption key that was used for the object.
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`

	StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`

	// The number of tags, if any, on the object.
	TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`

	// Version of the object.
	VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`

	// If the bucket is configured as a website, redirects requests for this object
	// to another object in the same bucket or to an external URL. Amazon S3 stores
	// the value of this header in the object metadata.
	WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
	// contains filtered or unexported fields
}

func (GetObjectOutput) GoString

func (s GetObjectOutput) GoString() string

GoString returns the string representation

func (*GetObjectOutput) SetAcceptRanges

func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput

SetAcceptRanges sets the AcceptRanges field's value.

func (*GetObjectOutput) SetBody

SetBody sets the Body field's value.

func (*GetObjectOutput) SetCacheControl

func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput

SetCacheControl sets the CacheControl field's value.

func (*GetObjectOutput) SetContentDisposition

func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput

SetContentDisposition sets the ContentDisposition field's value.

func (*GetObjectOutput) SetContentEncoding

func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput

SetContentEncoding sets the ContentEncoding field's value.

func (*GetObjectOutput) SetContentLanguage

func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput

SetContentLanguage sets the ContentLanguage field's value.

func (*GetObjectOutput) SetContentLength

func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput

SetContentLength sets the ContentLength field's value.

func (*GetObjectOutput) SetContentRange

func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput

SetContentRange sets the ContentRange field's value.

func (*GetObjectOutput) SetContentType

func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput

SetContentType sets the ContentType field's value.

func (*GetObjectOutput) SetDeleteMarker

func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput

SetDeleteMarker sets the DeleteMarker field's value.

func (*GetObjectOutput) SetETag

func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput

SetETag sets the ETag field's value.

func (*GetObjectOutput) SetExpiration

func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput

SetExpiration sets the Expiration field's value.

func (*GetObjectOutput) SetExpires

func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput

SetExpires sets the Expires field's value.

func (*GetObjectOutput) SetIBMRestoredCopyStorageClass added in v1.2.0

func (s *GetObjectOutput) SetIBMRestoredCopyStorageClass(v string) *GetObjectOutput

SetIBMRestoredCopyStorageClass sets the IBMRestoredCopyStorageClass field's value.

func (*GetObjectOutput) SetIBMTransition added in v1.2.0

func (s *GetObjectOutput) SetIBMTransition(v string) *GetObjectOutput

SetIBMTransition sets the IBMTransition field's value.

func (*GetObjectOutput) SetLastModified

func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput

SetLastModified sets the LastModified field's value.

func (*GetObjectOutput) SetMetadata

func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput

SetMetadata sets the Metadata field's value.

func (*GetObjectOutput) SetMissingMeta

func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput

SetMissingMeta sets the MissingMeta field's value.

func (*GetObjectOutput) SetPartsCount

func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput

SetPartsCount sets the PartsCount field's value.

func (*GetObjectOutput) SetReplicationStatus

func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput

SetReplicationStatus sets the ReplicationStatus field's value.

func (*GetObjectOutput) SetRequestCharged

func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput

SetRequestCharged sets the RequestCharged field's value.

func (*GetObjectOutput) SetRestore

func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput

SetRestore sets the Restore field's value.

func (*GetObjectOutput) SetRetentionExpirationDate added in v1.2.0

func (s *GetObjectOutput) SetRetentionExpirationDate(v time.Time) *GetObjectOutput

SetRetentionExpirationDate sets the RetentionExpirationDate field's value.

func (*GetObjectOutput) SetRetentionLegalHoldCount added in v1.2.0

func (s *GetObjectOutput) SetRetentionLegalHoldCount(v int64) *GetObjectOutput

SetRetentionLegalHoldCount sets the RetentionLegalHoldCount field's value.

func (*GetObjectOutput) SetRetentionPeriod added in v1.2.0

func (s *GetObjectOutput) SetRetentionPeriod(v int64) *GetObjectOutput

SetRetentionPeriod sets the RetentionPeriod field's value.

func (*GetObjectOutput) SetSSECustomerAlgorithm

func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*GetObjectOutput) SetSSECustomerKeyMD5

func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*GetObjectOutput) SetSSEKMSKeyId

func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*GetObjectOutput) SetServerSideEncryption

func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (*GetObjectOutput) SetStorageClass

func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput

SetStorageClass sets the StorageClass field's value.

func (*GetObjectOutput) SetTagCount

func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput

SetTagCount sets the TagCount field's value.

func (*GetObjectOutput) SetVersionId

func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput

SetVersionId sets the VersionId field's value.

func (*GetObjectOutput) SetWebsiteRedirectLocation

func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput

SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.

func (GetObjectOutput) String

func (s GetObjectOutput) String() string

String returns the string representation

type GlacierJobParameters added in v1.2.0

type GlacierJobParameters struct {

	// Glacier retrieval tier at which the restore will be processed.
	//
	// Tier is a required field
	Tier *string `type:"string" required:"true" enum:"Tier"`
	// contains filtered or unexported fields
}

func (GlacierJobParameters) GoString added in v1.2.0

func (s GlacierJobParameters) GoString() string

GoString returns the string representation

func (*GlacierJobParameters) SetTier added in v1.2.0

SetTier sets the Tier field's value.

func (GlacierJobParameters) String added in v1.2.0

func (s GlacierJobParameters) String() string

String returns the string representation

func (*GlacierJobParameters) Validate added in v1.2.0

func (s *GlacierJobParameters) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Grant

type Grant struct {
	Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`

	// Specifies the permission given to the grantee.
	Permission *string `type:"string" enum:"Permission"`
	// contains filtered or unexported fields
}

func (Grant) GoString

func (s Grant) GoString() string

GoString returns the string representation

func (*Grant) SetGrantee

func (s *Grant) SetGrantee(v *Grantee) *Grant

SetGrantee sets the Grantee field's value.

func (*Grant) SetPermission

func (s *Grant) SetPermission(v string) *Grant

SetPermission sets the Permission field's value.

func (Grant) String

func (s Grant) String() string

String returns the string representation

func (*Grant) Validate

func (s *Grant) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Grantee

type Grantee struct {

	// Screen name of the grantee.
	DisplayName *string `type:"string"`

	// Email address of the grantee.
	EmailAddress *string `type:"string"`

	// The canonical user ID of the grantee.
	ID *string `type:"string"`

	// Type of grantee
	//
	// Type is a required field
	Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`

	// URI of the grantee group.
	URI *string `type:"string"`
	// contains filtered or unexported fields
}

func (Grantee) GoString

func (s Grantee) GoString() string

GoString returns the string representation

func (*Grantee) SetDisplayName

func (s *Grantee) SetDisplayName(v string) *Grantee

SetDisplayName sets the DisplayName field's value.

func (*Grantee) SetEmailAddress

func (s *Grantee) SetEmailAddress(v string) *Grantee

SetEmailAddress sets the EmailAddress field's value.

func (*Grantee) SetID

func (s *Grantee) SetID(v string) *Grantee

SetID sets the ID field's value.

func (*Grantee) SetType

func (s *Grantee) SetType(v string) *Grantee

SetType sets the Type field's value.

func (*Grantee) SetURI

func (s *Grantee) SetURI(v string) *Grantee

SetURI sets the URI field's value.

func (Grantee) String

func (s Grantee) String() string

String returns the string representation

func (*Grantee) Validate

func (s *Grantee) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type HeadBucketInput

type HeadBucketInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (HeadBucketInput) GoString

func (s HeadBucketInput) GoString() string

GoString returns the string representation

func (*HeadBucketInput) SetBucket

func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput

SetBucket sets the Bucket field's value.

func (HeadBucketInput) String

func (s HeadBucketInput) String() string

String returns the string representation

func (*HeadBucketInput) Validate

func (s *HeadBucketInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type HeadBucketOutput

type HeadBucketOutput struct {

	// The root key used by Key Protect to encrypt this bucket. This value must
	// be the full CRN of the root key.
	IBMSSEKPCrkId *string `location:"header" locationName:"ibm-sse-kp-customer-root-key-crn" type:"string"`

	// Specifies whether the Bucket has Key Protect enabled.
	IBMSSEKPEnabled *bool `location:"header" locationName:"ibm-sse-kp-enabled" type:"boolean"`
	// contains filtered or unexported fields
}

func (HeadBucketOutput) GoString

func (s HeadBucketOutput) GoString() string

GoString returns the string representation

func (*HeadBucketOutput) SetIBMSSEKPCrkId

func (s *HeadBucketOutput) SetIBMSSEKPCrkId(v string) *HeadBucketOutput

SetIBMSSEKPCrkId sets the IBMSSEKPCrkId field's value.

func (*HeadBucketOutput) SetIBMSSEKPEnabled

func (s *HeadBucketOutput) SetIBMSSEKPEnabled(v bool) *HeadBucketOutput

SetIBMSSEKPEnabled sets the IBMSSEKPEnabled field's value.

func (HeadBucketOutput) String

func (s HeadBucketOutput) String() string

String returns the string representation

type HeadObjectInput

type HeadObjectInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Return the object only if its entity tag (ETag) is the same as the one specified,
	// otherwise return a 412 (precondition failed).
	IfMatch *string `location:"header" locationName:"If-Match" type:"string"`

	// Return the object only if it has been modified since the specified time,
	// otherwise return a 304 (not modified).
	IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`

	// Return the object only if its entity tag (ETag) is different from the one
	// specified, otherwise return a 304 (not modified).
	IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`

	// Return the object only if it has not been modified since the specified time,
	// otherwise return a 412 (precondition failed).
	IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// Part number of the object being read. This is a positive integer between
	// 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
	// Useful querying about the size of the part and the number of parts in this
	// object.
	PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`

	// Downloads the specified range bytes of an object. For more information about
	// the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
	Range *string `location:"header" locationName:"Range" type:"string"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// Specifies the algorithm to use to when encrypting the object (e.g., AES256).
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
	// data. This value is used to store the object and then it is discarded; Amazon
	// does not store the encryption key. The key must be appropriate for use with
	// the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
	// header.
	SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`

	// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
	// Amazon S3 uses this header for a message integrity check to ensure the encryption
	// key was transmitted without error.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// VersionId used to reference a specific version of the object.
	VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
	// contains filtered or unexported fields
}

func (HeadObjectInput) GoString

func (s HeadObjectInput) GoString() string

GoString returns the string representation

func (*HeadObjectInput) SetBucket

func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput

SetBucket sets the Bucket field's value.

func (*HeadObjectInput) SetIfMatch

func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput

SetIfMatch sets the IfMatch field's value.

func (*HeadObjectInput) SetIfModifiedSince

func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput

SetIfModifiedSince sets the IfModifiedSince field's value.

func (*HeadObjectInput) SetIfNoneMatch

func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput

SetIfNoneMatch sets the IfNoneMatch field's value.

func (*HeadObjectInput) SetIfUnmodifiedSince

func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput

SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.

func (*HeadObjectInput) SetKey

func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput

SetKey sets the Key field's value.

func (*HeadObjectInput) SetPartNumber

func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput

SetPartNumber sets the PartNumber field's value.

func (*HeadObjectInput) SetRange

func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput

SetRange sets the Range field's value.

func (*HeadObjectInput) SetRequestPayer

func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput

SetRequestPayer sets the RequestPayer field's value.

func (*HeadObjectInput) SetSSECustomerAlgorithm

func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*HeadObjectInput) SetSSECustomerKey

func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput

SetSSECustomerKey sets the SSECustomerKey field's value.

func (*HeadObjectInput) SetSSECustomerKeyMD5

func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*HeadObjectInput) SetVersionId

func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput

SetVersionId sets the VersionId field's value.

func (HeadObjectInput) String

func (s HeadObjectInput) String() string

String returns the string representation

func (*HeadObjectInput) Validate

func (s *HeadObjectInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type HeadObjectOutput

type HeadObjectOutput struct {
	AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`

	// Specifies caching behavior along the request/reply chain.
	CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`

	// Specifies presentational information for the object.
	ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`

	// Specifies what content encodings have been applied to the object and thus
	// what decoding mechanisms must be applied to obtain the media-type referenced
	// by the Content-Type header field.
	ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`

	// The language the content is in.
	ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`

	// Size of the body in bytes.
	ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`

	// A standard MIME type describing the format of the object data.
	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`

	// Specifies whether the object retrieved was (true) or was not (false) a Delete
	// Marker. If false, this response header does not appear in the response.
	DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`

	// An ETag is an opaque identifier assigned by a web server to a specific version
	// of a resource found at a URL
	ETag *string `location:"header" locationName:"ETag" type:"string"`

	// If the object expiration is configured (see PUT Bucket lifecycle), the response
	// includes this header. It includes the expiry-date and rule-id key value pairs
	// providing object expiration information. The value of the rule-id is URL
	// encoded.
	Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`

	// The date and time at which the object is no longer cacheable.
	Expires *string `location:"header" locationName:"Expires" type:"string"`

	IBMRestoredCopyStorageClass *string `location:"header" locationName:"x-ibm-restored-copy-storage-class" type:"string"`

	// This header is only included if an object has transition metadata. This header
	// will indicate the transition storage class and time of transition. If this
	// header and the x-amz-restore header are both included, this header will indicate
	// the time at which the object was originally archived.
	IBMTransition *string `location:"header" locationName:"x-ibm-transition" type:"string"`

	// Last modified date of the object
	LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`

	// A map of metadata to store with the object in S3.
	Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`

	// This is set to the number of metadata entries not returned in x-amz-meta
	// headers. This can happen if you create metadata using an API like SOAP that
	// supports more flexible metadata than the REST API. For example, using SOAP,
	// you can create metadata whose values are not legal HTTP headers.
	MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`

	// The count of parts this object has.
	PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`

	ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// Provides information about object restoration operation and expiration time
	// of the restored object copy.
	Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`

	// Date on which it will be legal to delete or modify the object. You can only
	// specify this or the Retention-Period header. If both are specified a 400
	// error will be returned. If neither is specified the bucket's DefaultRetention
	// period will be used.
	RetentionExpirationDate *time.Time `location:"header" locationName:"Retention-Expiration-Date" type:"timestamp" timestampFormat:"iso8601"`

	RetentionLegalHoldCount *int64 `location:"header" locationName:"Retention-Legal-Hold-Count" type:"integer"`

	// Retention period to store on the object in seconds. If this field and Retention-Expiration-Date
	// are specified a 400 error is returned. If neither is specified the bucket's
	// DefaultRetention period will be used. 0 is a legal value assuming the bucket's
	// minimum retention period is also 0.
	RetentionPeriod *int64 `location:"header" locationName:"Retention-Period" type:"integer"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header confirming the encryption algorithm
	// used.
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header to provide round trip message integrity
	// verification of the customer-provided encryption key.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// If present, specifies the ID of the AWS Key Management Service (KMS) master
	// encryption key that was used for the object.
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`

	StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`

	// Version of the object.
	VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`

	// If the bucket is configured as a website, redirects requests for this object
	// to another object in the same bucket or to an external URL. Amazon S3 stores
	// the value of this header in the object metadata.
	WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
	// contains filtered or unexported fields
}

func (HeadObjectOutput) GoString

func (s HeadObjectOutput) GoString() string

GoString returns the string representation

func (*HeadObjectOutput) SetAcceptRanges

func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput

SetAcceptRanges sets the AcceptRanges field's value.

func (*HeadObjectOutput) SetCacheControl

func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput

SetCacheControl sets the CacheControl field's value.

func (*HeadObjectOutput) SetContentDisposition

func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput

SetContentDisposition sets the ContentDisposition field's value.

func (*HeadObjectOutput) SetContentEncoding

func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput

SetContentEncoding sets the ContentEncoding field's value.

func (*HeadObjectOutput) SetContentLanguage

func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput

SetContentLanguage sets the ContentLanguage field's value.

func (*HeadObjectOutput) SetContentLength

func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput

SetContentLength sets the ContentLength field's value.

func (*HeadObjectOutput) SetContentType

func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput

SetContentType sets the ContentType field's value.

func (*HeadObjectOutput) SetDeleteMarker

func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput

SetDeleteMarker sets the DeleteMarker field's value.

func (*HeadObjectOutput) SetETag

func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput

SetETag sets the ETag field's value.

func (*HeadObjectOutput) SetExpiration

func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput

SetExpiration sets the Expiration field's value.

func (*HeadObjectOutput) SetExpires

func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput

SetExpires sets the Expires field's value.

func (*HeadObjectOutput) SetIBMRestoredCopyStorageClass added in v1.2.0

func (s *HeadObjectOutput) SetIBMRestoredCopyStorageClass(v string) *HeadObjectOutput

SetIBMRestoredCopyStorageClass sets the IBMRestoredCopyStorageClass field's value.

func (*HeadObjectOutput) SetIBMTransition added in v1.2.0

func (s *HeadObjectOutput) SetIBMTransition(v string) *HeadObjectOutput

SetIBMTransition sets the IBMTransition field's value.

func (*HeadObjectOutput) SetLastModified

func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput

SetLastModified sets the LastModified field's value.

func (*HeadObjectOutput) SetMetadata

func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput

SetMetadata sets the Metadata field's value.

func (*HeadObjectOutput) SetMissingMeta

func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput

SetMissingMeta sets the MissingMeta field's value.

func (*HeadObjectOutput) SetPartsCount

func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput

SetPartsCount sets the PartsCount field's value.

func (*HeadObjectOutput) SetReplicationStatus

func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput

SetReplicationStatus sets the ReplicationStatus field's value.

func (*HeadObjectOutput) SetRequestCharged

func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput

SetRequestCharged sets the RequestCharged field's value.

func (*HeadObjectOutput) SetRestore

func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput

SetRestore sets the Restore field's value.

func (*HeadObjectOutput) SetRetentionExpirationDate added in v1.2.0

func (s *HeadObjectOutput) SetRetentionExpirationDate(v time.Time) *HeadObjectOutput

SetRetentionExpirationDate sets the RetentionExpirationDate field's value.

func (*HeadObjectOutput) SetRetentionLegalHoldCount added in v1.2.0

func (s *HeadObjectOutput) SetRetentionLegalHoldCount(v int64) *HeadObjectOutput

SetRetentionLegalHoldCount sets the RetentionLegalHoldCount field's value.

func (*HeadObjectOutput) SetRetentionPeriod added in v1.2.0

func (s *HeadObjectOutput) SetRetentionPeriod(v int64) *HeadObjectOutput

SetRetentionPeriod sets the RetentionPeriod field's value.

func (*HeadObjectOutput) SetSSECustomerAlgorithm

func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*HeadObjectOutput) SetSSECustomerKeyMD5

func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*HeadObjectOutput) SetSSEKMSKeyId

func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*HeadObjectOutput) SetServerSideEncryption

func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (*HeadObjectOutput) SetStorageClass

func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput

SetStorageClass sets the StorageClass field's value.

func (*HeadObjectOutput) SetVersionId

func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput

SetVersionId sets the VersionId field's value.

func (*HeadObjectOutput) SetWebsiteRedirectLocation

func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput

SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.

func (HeadObjectOutput) String

func (s HeadObjectOutput) String() string

String returns the string representation

type Initiator

type Initiator struct {

	// Name of the Principal.
	DisplayName *string `type:"string"`

	// If the principal is an AWS account, it provides the Canonical User ID. If
	// the principal is an IAM User, it provides a user ARN value.
	ID *string `type:"string"`
	// contains filtered or unexported fields
}

func (Initiator) GoString

func (s Initiator) GoString() string

GoString returns the string representation

func (*Initiator) SetDisplayName

func (s *Initiator) SetDisplayName(v string) *Initiator

SetDisplayName sets the DisplayName field's value.

func (*Initiator) SetID

func (s *Initiator) SetID(v string) *Initiator

SetID sets the ID field's value.

func (Initiator) String

func (s Initiator) String() string

String returns the string representation

type LegalHold added in v1.2.0

type LegalHold struct {
	Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`

	ID *string `type:"string"`
	// contains filtered or unexported fields
}

func (LegalHold) GoString added in v1.2.0

func (s LegalHold) GoString() string

GoString returns the string representation

func (*LegalHold) SetDate added in v1.2.0

func (s *LegalHold) SetDate(v time.Time) *LegalHold

SetDate sets the Date field's value.

func (*LegalHold) SetID added in v1.2.0

func (s *LegalHold) SetID(v string) *LegalHold

SetID sets the ID field's value.

func (LegalHold) String added in v1.2.0

func (s LegalHold) String() string

String returns the string representation

type LifecycleConfiguration added in v1.2.0

type LifecycleConfiguration struct {

	// Currently only one Rule allowed.
	//
	// Rules is a required field
	Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
	// contains filtered or unexported fields
}

func (LifecycleConfiguration) GoString added in v1.2.0

func (s LifecycleConfiguration) GoString() string

GoString returns the string representation

func (*LifecycleConfiguration) SetRules added in v1.2.0

SetRules sets the Rules field's value.

func (LifecycleConfiguration) String added in v1.2.0

func (s LifecycleConfiguration) String() string

String returns the string representation

func (*LifecycleConfiguration) Validate added in v1.2.0

func (s *LifecycleConfiguration) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type LifecycleExpiration added in v1.2.0

type LifecycleExpiration struct {

	// Indicates at what date the object is to be moved or deleted. Should be in
	// GMT ISO 8601 Format.
	Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`

	// Indicates the lifetime, in days, of the objects that are subject to the rule.
	// The value must be a non-zero positive integer.
	Days *int64 `type:"integer"`
	// contains filtered or unexported fields
}

func (LifecycleExpiration) GoString added in v1.2.0

func (s LifecycleExpiration) GoString() string

GoString returns the string representation

func (*LifecycleExpiration) SetDate added in v1.2.0

SetDate sets the Date field's value.

func (*LifecycleExpiration) SetDays added in v1.2.0

SetDays sets the Days field's value.

func (LifecycleExpiration) String added in v1.2.0

func (s LifecycleExpiration) String() string

String returns the string representation

type LifecycleRule added in v1.2.0

type LifecycleRule struct {
	Expiration *LifecycleExpiration `type:"structure"`

	// The Filter is used to identify objects that a Lifecycle Rule applies to.
	// A Filter must have exactly one of Prefix, Tag, or And specified.
	//
	// Filter is a required field
	Filter *LifecycleRuleFilter `type:"structure" required:"true"`

	// Unique identifier for the rule. The value cannot be longer than 255 characters.
	ID *string `type:"string"`

	// If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
	// is not currently being applied.
	//
	// Status is a required field
	Status *string `type:"string" required:"true" enum:"ExpirationStatus"`

	// Currently only one Transition allowed, also Date and Days fields are mutually
	// exclusive.
	Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
	// contains filtered or unexported fields
}

func (LifecycleRule) GoString added in v1.2.0

func (s LifecycleRule) GoString() string

GoString returns the string representation

func (*LifecycleRule) SetExpiration added in v1.2.0

func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule

SetExpiration sets the Expiration field's value.

func (*LifecycleRule) SetFilter added in v1.2.0

SetFilter sets the Filter field's value.

func (*LifecycleRule) SetID added in v1.2.0

func (s *LifecycleRule) SetID(v string) *LifecycleRule

SetID sets the ID field's value.

func (*LifecycleRule) SetStatus added in v1.2.0

func (s *LifecycleRule) SetStatus(v string) *LifecycleRule

SetStatus sets the Status field's value.

func (*LifecycleRule) SetTransitions added in v1.2.0

func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule

SetTransitions sets the Transitions field's value.

func (LifecycleRule) String added in v1.2.0

func (s LifecycleRule) String() string

String returns the string representation

func (*LifecycleRule) Validate added in v1.2.0

func (s *LifecycleRule) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type LifecycleRuleFilter added in v1.2.0

type LifecycleRuleFilter struct {

	// Empty prefix allowed only.
	Prefix *string `type:"string"`
	// contains filtered or unexported fields
}

The Filter is used to identify objects that a Lifecycle Rule applies to. A Filter must have exactly one of Prefix, Tag, or And specified.

func (LifecycleRuleFilter) GoString added in v1.2.0

func (s LifecycleRuleFilter) GoString() string

GoString returns the string representation

func (*LifecycleRuleFilter) SetPrefix added in v1.2.0

SetPrefix sets the Prefix field's value.

func (LifecycleRuleFilter) String added in v1.2.0

func (s LifecycleRuleFilter) String() string

String returns the string representation

type ListBucketsExtendedInput

type ListBucketsExtendedInput struct {

	// Sets the IBM Service Instance Id in the request.
	//
	// Only Valid for IBM IAM Authentication
	IBMServiceInstanceId *string `location:"header" locationName:"ibm-service-instance-id" type:"string"`

	// Specifies the bucket to start with when listing all buckets.
	Marker *string `location:"querystring" locationName:"marker" type:"string"`

	// Sets the maximum number of keys returned in the response. The response might
	// contain fewer keys but will never contain more.
	MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`

	// Limits the response to buckets that begin with the specified prefix.
	Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
	// contains filtered or unexported fields
}

func (ListBucketsExtendedInput) GoString

func (s ListBucketsExtendedInput) GoString() string

GoString returns the string representation

func (*ListBucketsExtendedInput) SetIBMServiceInstanceId

func (s *ListBucketsExtendedInput) SetIBMServiceInstanceId(v string) *ListBucketsExtendedInput

SetIBMServiceInstanceId sets the IBMServiceInstanceId field's value.

func (*ListBucketsExtendedInput) SetMarker

SetMarker sets the Marker field's value.

func (*ListBucketsExtendedInput) SetMaxKeys

SetMaxKeys sets the MaxKeys field's value.

func (*ListBucketsExtendedInput) SetPrefix

SetPrefix sets the Prefix field's value.

func (ListBucketsExtendedInput) String

func (s ListBucketsExtendedInput) String() string

String returns the string representation

type ListBucketsExtendedOutput

type ListBucketsExtendedOutput struct {
	Buckets []*BucketExtended `locationNameList:"Bucket" type:"list"`

	// Indicates whether the returned list of buckets is truncated.
	IsTruncated *bool `type:"boolean"`

	// The bucket at or after which the listing began.
	Marker *string `type:"string"`

	MaxKeys *int64 `type:"integer"`

	Owner *Owner `type:"structure"`

	// When a prefix is provided in the request, this field contains the specified
	// prefix. The result contains only buckets starting with the specified prefix.
	Prefix *string `type:"string"`
	// contains filtered or unexported fields
}

func (ListBucketsExtendedOutput) GoString

func (s ListBucketsExtendedOutput) GoString() string

GoString returns the string representation

func (*ListBucketsExtendedOutput) SetBuckets

SetBuckets sets the Buckets field's value.

func (*ListBucketsExtendedOutput) SetIsTruncated

SetIsTruncated sets the IsTruncated field's value.

func (*ListBucketsExtendedOutput) SetMarker

SetMarker sets the Marker field's value.

func (*ListBucketsExtendedOutput) SetMaxKeys

SetMaxKeys sets the MaxKeys field's value.

func (*ListBucketsExtendedOutput) SetOwner

SetOwner sets the Owner field's value.

func (*ListBucketsExtendedOutput) SetPrefix

SetPrefix sets the Prefix field's value.

func (ListBucketsExtendedOutput) String

func (s ListBucketsExtendedOutput) String() string

String returns the string representation

type ListBucketsInput

type ListBucketsInput struct {

	// Sets the IBM Service Instance Id in the request.
	//
	// Only Valid for IBM IAM Authentication
	IBMServiceInstanceId *string `location:"header" locationName:"ibm-service-instance-id" type:"string"`
	// contains filtered or unexported fields
}

func (ListBucketsInput) GoString

func (s ListBucketsInput) GoString() string

GoString returns the string representation

func (*ListBucketsInput) SetIBMServiceInstanceId

func (s *ListBucketsInput) SetIBMServiceInstanceId(v string) *ListBucketsInput

SetIBMServiceInstanceId sets the IBMServiceInstanceId field's value.

func (ListBucketsInput) String

func (s ListBucketsInput) String() string

String returns the string representation

type ListBucketsOutput

type ListBucketsOutput struct {
	Buckets []*Bucket `locationNameList:"Bucket" type:"list"`

	Owner *Owner `type:"structure"`
	// contains filtered or unexported fields
}

func (ListBucketsOutput) GoString

func (s ListBucketsOutput) GoString() string

GoString returns the string representation

func (*ListBucketsOutput) SetBuckets

func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput

SetBuckets sets the Buckets field's value.

func (*ListBucketsOutput) SetOwner

func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput

SetOwner sets the Owner field's value.

func (ListBucketsOutput) String

func (s ListBucketsOutput) String() string

String returns the string representation

type ListLegalHoldsInput added in v1.2.0

type ListLegalHoldsInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (ListLegalHoldsInput) GoString added in v1.2.0

func (s ListLegalHoldsInput) GoString() string

GoString returns the string representation

func (*ListLegalHoldsInput) SetBucket added in v1.2.0

SetBucket sets the Bucket field's value.

func (*ListLegalHoldsInput) SetKey added in v1.2.0

SetKey sets the Key field's value.

func (ListLegalHoldsInput) String added in v1.2.0

func (s ListLegalHoldsInput) String() string

String returns the string representation

func (*ListLegalHoldsInput) Validate added in v1.2.0

func (s *ListLegalHoldsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListLegalHoldsOutput added in v1.2.0

type ListLegalHoldsOutput struct {
	CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`

	LegalHolds []*LegalHold `type:"list"`

	// Retention period to store on the object in seconds. The object can be neither
	// overwritten nor deleted until the amount of time specified in the retention
	// period has elapsed. If this field and Retention-Expiration-Date are specified
	// a 400 error is returned. If neither is specified the bucket's DefaultRetention
	// period will be used. 0 is a legal value assuming the bucket's minimum retention
	// period is also 0.
	RetentionPeriod *int64 `type:"integer"`

	RetentionPeriodExpirationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
	// contains filtered or unexported fields
}

func (ListLegalHoldsOutput) GoString added in v1.2.0

func (s ListLegalHoldsOutput) GoString() string

GoString returns the string representation

func (*ListLegalHoldsOutput) SetCreateTime added in v1.2.0

func (s *ListLegalHoldsOutput) SetCreateTime(v time.Time) *ListLegalHoldsOutput

SetCreateTime sets the CreateTime field's value.

func (*ListLegalHoldsOutput) SetLegalHolds added in v1.2.0

func (s *ListLegalHoldsOutput) SetLegalHolds(v []*LegalHold) *ListLegalHoldsOutput

SetLegalHolds sets the LegalHolds field's value.

func (*ListLegalHoldsOutput) SetRetentionPeriod added in v1.2.0

func (s *ListLegalHoldsOutput) SetRetentionPeriod(v int64) *ListLegalHoldsOutput

SetRetentionPeriod sets the RetentionPeriod field's value.

func (*ListLegalHoldsOutput) SetRetentionPeriodExpirationDate added in v1.2.0

func (s *ListLegalHoldsOutput) SetRetentionPeriodExpirationDate(v time.Time) *ListLegalHoldsOutput

SetRetentionPeriodExpirationDate sets the RetentionPeriodExpirationDate field's value.

func (ListLegalHoldsOutput) String added in v1.2.0

func (s ListLegalHoldsOutput) String() string

String returns the string representation

type ListMultipartUploadsInput

type ListMultipartUploadsInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Character you use to group keys.
	Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`

	// Requests Amazon S3 to encode the object keys in the response and specifies
	// the encoding method to use. An object key may contain any Unicode character;
	// however, XML 1.0 parser cannot parse some characters, such as characters
	// with an ASCII value from 0 to 10. For characters that are not supported in
	// XML 1.0, you can add this parameter to request that Amazon S3 encode the
	// keys in the response.
	EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`

	// Together with upload-id-marker, this parameter specifies the multipart upload
	// after which listing should begin.
	KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`

	// Sets the maximum number of multipart uploads, from 1 to 1,000, to return
	// in the response body. 1,000 is the maximum number of uploads that can be
	// returned in a response.
	MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`

	// Lists in-progress uploads only for those keys that begin with the specified
	// prefix.
	Prefix *string `location:"querystring" locationName:"prefix" type:"string"`

	// Together with key-marker, specifies the multipart upload after which listing
	// should begin. If key-marker is not specified, the upload-id-marker parameter
	// is ignored.
	UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
	// contains filtered or unexported fields
}

func (ListMultipartUploadsInput) GoString

func (s ListMultipartUploadsInput) GoString() string

GoString returns the string representation

func (*ListMultipartUploadsInput) SetBucket

SetBucket sets the Bucket field's value.

func (*ListMultipartUploadsInput) SetDelimiter

SetDelimiter sets the Delimiter field's value.

func (*ListMultipartUploadsInput) SetEncodingType

SetEncodingType sets the EncodingType field's value.

func (*ListMultipartUploadsInput) SetKeyMarker

SetKeyMarker sets the KeyMarker field's value.

func (*ListMultipartUploadsInput) SetMaxUploads

SetMaxUploads sets the MaxUploads field's value.

func (*ListMultipartUploadsInput) SetPrefix

SetPrefix sets the Prefix field's value.

func (*ListMultipartUploadsInput) SetUploadIdMarker

SetUploadIdMarker sets the UploadIdMarker field's value.

func (ListMultipartUploadsInput) String

func (s ListMultipartUploadsInput) String() string

String returns the string representation

func (*ListMultipartUploadsInput) Validate

func (s *ListMultipartUploadsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListMultipartUploadsOutput

type ListMultipartUploadsOutput struct {

	// Name of the bucket to which the multipart upload was initiated.
	Bucket *string `type:"string"`

	CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`

	Delimiter *string `type:"string"`

	// Encoding type used by Amazon S3 to encode object keys in the response.
	EncodingType *string `type:"string" enum:"EncodingType"`

	// Indicates whether the returned list of multipart uploads is truncated. A
	// value of true indicates that the list was truncated. The list can be truncated
	// if the number of multipart uploads exceeds the limit allowed or specified
	// by max uploads.
	IsTruncated *bool `type:"boolean"`

	// The key at or after which the listing began.
	KeyMarker *string `type:"string"`

	// Maximum number of multipart uploads that could have been included in the
	// response.
	MaxUploads *int64 `type:"integer"`

	// When a list is truncated, this element specifies the value that should be
	// used for the key-marker request parameter in a subsequent request.
	NextKeyMarker *string `type:"string"`

	// When a list is truncated, this element specifies the value that should be
	// used for the upload-id-marker request parameter in a subsequent request.
	NextUploadIdMarker *string `type:"string"`

	// When a prefix is provided in the request, this field contains the specified
	// prefix. The result contains only keys starting with the specified prefix.
	Prefix *string `type:"string"`

	// Upload ID after which listing began.
	UploadIdMarker *string `type:"string"`

	Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
	// contains filtered or unexported fields
}

func (ListMultipartUploadsOutput) GoString

func (s ListMultipartUploadsOutput) GoString() string

GoString returns the string representation

func (*ListMultipartUploadsOutput) SetBucket

SetBucket sets the Bucket field's value.

func (*ListMultipartUploadsOutput) SetCommonPrefixes

SetCommonPrefixes sets the CommonPrefixes field's value.

func (*ListMultipartUploadsOutput) SetDelimiter

SetDelimiter sets the Delimiter field's value.

func (*ListMultipartUploadsOutput) SetEncodingType

SetEncodingType sets the EncodingType field's value.

func (*ListMultipartUploadsOutput) SetIsTruncated

SetIsTruncated sets the IsTruncated field's value.

func (*ListMultipartUploadsOutput) SetKeyMarker

SetKeyMarker sets the KeyMarker field's value.

func (*ListMultipartUploadsOutput) SetMaxUploads

SetMaxUploads sets the MaxUploads field's value.

func (*ListMultipartUploadsOutput) SetNextKeyMarker

SetNextKeyMarker sets the NextKeyMarker field's value.

func (*ListMultipartUploadsOutput) SetNextUploadIdMarker

func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput

SetNextUploadIdMarker sets the NextUploadIdMarker field's value.

func (*ListMultipartUploadsOutput) SetPrefix

SetPrefix sets the Prefix field's value.

func (*ListMultipartUploadsOutput) SetUploadIdMarker

SetUploadIdMarker sets the UploadIdMarker field's value.

func (*ListMultipartUploadsOutput) SetUploads

SetUploads sets the Uploads field's value.

func (ListMultipartUploadsOutput) String

String returns the string representation

type ListObjectsInput

type ListObjectsInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// A delimiter is a character you use to group keys.
	Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`

	// Requests Amazon S3 to encode the object keys in the response and specifies
	// the encoding method to use. An object key may contain any Unicode character;
	// however, XML 1.0 parser cannot parse some characters, such as characters
	// with an ASCII value from 0 to 10. For characters that are not supported in
	// XML 1.0, you can add this parameter to request that Amazon S3 encode the
	// keys in the response.
	EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`

	// Specifies the key to start with when listing objects in a bucket.
	Marker *string `location:"querystring" locationName:"marker" type:"string"`

	// Sets the maximum number of keys returned in the response. The response might
	// contain fewer keys but will never contain more.
	MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`

	// Limits the response to keys that begin with the specified prefix.
	Prefix *string `location:"querystring" locationName:"prefix" type:"string"`

	// Confirms that the requester knows that she or he will be charged for the
	// list objects request. Bucket owners need not specify this parameter in their
	// requests.
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
	// contains filtered or unexported fields
}

func (ListObjectsInput) GoString

func (s ListObjectsInput) GoString() string

GoString returns the string representation

func (*ListObjectsInput) SetBucket

func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput

SetBucket sets the Bucket field's value.

func (*ListObjectsInput) SetDelimiter

func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput

SetDelimiter sets the Delimiter field's value.

func (*ListObjectsInput) SetEncodingType

func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput

SetEncodingType sets the EncodingType field's value.

func (*ListObjectsInput) SetMarker

func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput

SetMarker sets the Marker field's value.

func (*ListObjectsInput) SetMaxKeys

func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput

SetMaxKeys sets the MaxKeys field's value.

func (*ListObjectsInput) SetPrefix

func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput

SetPrefix sets the Prefix field's value.

func (*ListObjectsInput) SetRequestPayer

func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput

SetRequestPayer sets the RequestPayer field's value.

func (ListObjectsInput) String

func (s ListObjectsInput) String() string

String returns the string representation

func (*ListObjectsInput) Validate

func (s *ListObjectsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListObjectsOutput

type ListObjectsOutput struct {
	CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`

	Contents []*Object `type:"list" flattened:"true"`

	Delimiter *string `type:"string"`

	// Encoding type used by Amazon S3 to encode object keys in the response.
	EncodingType *string `type:"string" enum:"EncodingType"`

	// The root key used by Key Protect to encrypt this bucket. This value must
	// be the full CRN of the root key.
	IBMSSEKPCrkId *string `location:"header" locationName:"ibm-sse-kp-customer-root-key-crn" type:"string"`

	// Specifies whether the Bucket has Key Protect enabled.
	IBMSSEKPEnabled *bool `location:"header" locationName:"ibm-sse-kp-enabled" type:"boolean"`

	// A flag that indicates whether or not Amazon S3 returned all of the results
	// that satisfied the search criteria.
	IsTruncated *bool `type:"boolean"`

	Marker *string `type:"string"`

	MaxKeys *int64 `type:"integer"`

	Name *string `type:"string"`

	// When response is truncated (the IsTruncated element value in the response
	// is true), you can use the key name in this field as marker in the subsequent
	// request to get next set of objects. Amazon S3 lists objects in alphabetical
	// order Note: This element is returned only if you have delimiter request parameter
	// specified. If response does not include the NextMaker and it is truncated,
	// you can use the value of the last Key in the response as the marker in the
	// subsequent request to get the next set of object keys.
	NextMarker *string `type:"string"`

	Prefix *string `type:"string"`
	// contains filtered or unexported fields
}

func (ListObjectsOutput) GoString

func (s ListObjectsOutput) GoString() string

GoString returns the string representation

func (*ListObjectsOutput) SetCommonPrefixes

func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput

SetCommonPrefixes sets the CommonPrefixes field's value.

func (*ListObjectsOutput) SetContents

func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput

SetContents sets the Contents field's value.

func (*ListObjectsOutput) SetDelimiter

func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput

SetDelimiter sets the Delimiter field's value.

func (*ListObjectsOutput) SetEncodingType

func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput

SetEncodingType sets the EncodingType field's value.

func (*ListObjectsOutput) SetIBMSSEKPCrkId

func (s *ListObjectsOutput) SetIBMSSEKPCrkId(v string) *ListObjectsOutput

SetIBMSSEKPCrkId sets the IBMSSEKPCrkId field's value.

func (*ListObjectsOutput) SetIBMSSEKPEnabled

func (s *ListObjectsOutput) SetIBMSSEKPEnabled(v bool) *ListObjectsOutput

SetIBMSSEKPEnabled sets the IBMSSEKPEnabled field's value.

func (*ListObjectsOutput) SetIsTruncated

func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput

SetIsTruncated sets the IsTruncated field's value.

func (*ListObjectsOutput) SetMarker

func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput

SetMarker sets the Marker field's value.

func (*ListObjectsOutput) SetMaxKeys

func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput

SetMaxKeys sets the MaxKeys field's value.

func (*ListObjectsOutput) SetName

SetName sets the Name field's value.

func (*ListObjectsOutput) SetNextMarker

func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput

SetNextMarker sets the NextMarker field's value.

func (*ListObjectsOutput) SetPrefix

func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput

SetPrefix sets the Prefix field's value.

func (ListObjectsOutput) String

func (s ListObjectsOutput) String() string

String returns the string representation

type ListObjectsV2Input added in v1.3.0

type ListObjectsV2Input struct {

	// Name of the bucket to list.
	//
	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// ContinuationToken indicates Amazon S3 that the list is being continued on
	// this bucket with a token. ContinuationToken is obfuscated and is not a real
	// key
	ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`

	// A delimiter is a character you use to group keys.
	Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`

	// Encoding type used by Amazon S3 to encode object keys in the response.
	EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`

	// The owner field is not present in listV2 by default, if you want to return
	// owner field with each key in the result then set the fetch owner field to
	// true
	FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`

	// Sets the maximum number of keys returned in the response. The response might
	// contain fewer keys but will never contain more.
	MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`

	// Limits the response to keys that begin with the specified prefix.
	Prefix *string `location:"querystring" locationName:"prefix" type:"string"`

	// Confirms that the requester knows that she or he will be charged for the
	// list objects request in V2 style. Bucket owners need not specify this parameter
	// in their requests.
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
	// listing after this specified key. StartAfter can be any key in the bucket
	StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
	// contains filtered or unexported fields
}

func (ListObjectsV2Input) GoString added in v1.3.0

func (s ListObjectsV2Input) GoString() string

GoString returns the string representation

func (*ListObjectsV2Input) SetBucket added in v1.3.0

func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input

SetBucket sets the Bucket field's value.

func (*ListObjectsV2Input) SetContinuationToken added in v1.3.0

func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input

SetContinuationToken sets the ContinuationToken field's value.

func (*ListObjectsV2Input) SetDelimiter added in v1.3.0

func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input

SetDelimiter sets the Delimiter field's value.

func (*ListObjectsV2Input) SetEncodingType added in v1.3.0

func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input

SetEncodingType sets the EncodingType field's value.

func (*ListObjectsV2Input) SetFetchOwner added in v1.3.0

func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input

SetFetchOwner sets the FetchOwner field's value.

func (*ListObjectsV2Input) SetMaxKeys added in v1.3.0

func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input

SetMaxKeys sets the MaxKeys field's value.

func (*ListObjectsV2Input) SetPrefix added in v1.3.0

func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input

SetPrefix sets the Prefix field's value.

func (*ListObjectsV2Input) SetRequestPayer added in v1.3.0

func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input

SetRequestPayer sets the RequestPayer field's value.

func (*ListObjectsV2Input) SetStartAfter added in v1.3.0

func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input

SetStartAfter sets the StartAfter field's value.

func (ListObjectsV2Input) String added in v1.3.0

func (s ListObjectsV2Input) String() string

String returns the string representation

func (*ListObjectsV2Input) Validate added in v1.3.0

func (s *ListObjectsV2Input) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListObjectsV2Output added in v1.3.0

type ListObjectsV2Output struct {

	// CommonPrefixes contains all (if there are any) keys between Prefix and the
	// next occurrence of the string specified by delimiter
	CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`

	// Metadata about each object returned.
	Contents []*Object `type:"list" flattened:"true"`

	// ContinuationToken indicates Amazon S3 that the list is being continued on
	// this bucket with a token. ContinuationToken is obfuscated and is not a real
	// key
	ContinuationToken *string `type:"string"`

	// A delimiter is a character you use to group keys.
	Delimiter *string `type:"string"`

	// Encoding type used by Amazon S3 to encode object keys in the response.
	EncodingType *string `type:"string" enum:"EncodingType"`

	// A flag that indicates whether or not Amazon S3 returned all of the results
	// that satisfied the search criteria.
	IsTruncated *bool `type:"boolean"`

	// KeyCount is the number of keys returned with this request. KeyCount will
	// always be less than equals to MaxKeys field. Say you ask for 50 keys, your
	// result will include less than equals 50 keys
	KeyCount *int64 `type:"integer"`

	// Sets the maximum number of keys returned in the response. The response might
	// contain fewer keys but will never contain more.
	MaxKeys *int64 `type:"integer"`

	// Name of the bucket to list.
	Name *string `type:"string"`

	// NextContinuationToken is sent when isTruncated is true which means there
	// are more keys in the bucket that can be listed. The next list requests to
	// Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
	// is obfuscated and is not a real key
	NextContinuationToken *string `type:"string"`

	// Limits the response to keys that begin with the specified prefix.
	Prefix *string `type:"string"`

	// StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
	// listing after this specified key. StartAfter can be any key in the bucket
	StartAfter *string `type:"string"`
	// contains filtered or unexported fields
}

func (ListObjectsV2Output) GoString added in v1.3.0

func (s ListObjectsV2Output) GoString() string

GoString returns the string representation

func (*ListObjectsV2Output) SetCommonPrefixes added in v1.3.0

func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output

SetCommonPrefixes sets the CommonPrefixes field's value.

func (*ListObjectsV2Output) SetContents added in v1.3.0

func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output

SetContents sets the Contents field's value.

func (*ListObjectsV2Output) SetContinuationToken added in v1.3.0

func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output

SetContinuationToken sets the ContinuationToken field's value.

func (*ListObjectsV2Output) SetDelimiter added in v1.3.0

func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output

SetDelimiter sets the Delimiter field's value.

func (*ListObjectsV2Output) SetEncodingType added in v1.3.0

func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output

SetEncodingType sets the EncodingType field's value.

func (*ListObjectsV2Output) SetIsTruncated added in v1.3.0

func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output

SetIsTruncated sets the IsTruncated field's value.

func (*ListObjectsV2Output) SetKeyCount added in v1.3.0

func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output

SetKeyCount sets the KeyCount field's value.

func (*ListObjectsV2Output) SetMaxKeys added in v1.3.0

func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output

SetMaxKeys sets the MaxKeys field's value.

func (*ListObjectsV2Output) SetName added in v1.3.0

SetName sets the Name field's value.

func (*ListObjectsV2Output) SetNextContinuationToken added in v1.3.0

func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output

SetNextContinuationToken sets the NextContinuationToken field's value.

func (*ListObjectsV2Output) SetPrefix added in v1.3.0

SetPrefix sets the Prefix field's value.

func (*ListObjectsV2Output) SetStartAfter added in v1.3.0

func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output

SetStartAfter sets the StartAfter field's value.

func (ListObjectsV2Output) String added in v1.3.0

func (s ListObjectsV2Output) String() string

String returns the string representation

type ListPartsInput

type ListPartsInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// Sets the maximum number of parts to return.
	MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`

	// Specifies the part after which listing should begin. Only parts with higher
	// part numbers will be listed.
	PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// Upload ID identifying the multipart upload whose parts are being listed.
	//
	// UploadId is a required field
	UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (ListPartsInput) GoString

func (s ListPartsInput) GoString() string

GoString returns the string representation

func (*ListPartsInput) SetBucket

func (s *ListPartsInput) SetBucket(v string) *ListPartsInput

SetBucket sets the Bucket field's value.

func (*ListPartsInput) SetKey

func (s *ListPartsInput) SetKey(v string) *ListPartsInput

SetKey sets the Key field's value.

func (*ListPartsInput) SetMaxParts

func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput

SetMaxParts sets the MaxParts field's value.

func (*ListPartsInput) SetPartNumberMarker

func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput

SetPartNumberMarker sets the PartNumberMarker field's value.

func (*ListPartsInput) SetRequestPayer

func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput

SetRequestPayer sets the RequestPayer field's value.

func (*ListPartsInput) SetUploadId

func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput

SetUploadId sets the UploadId field's value.

func (ListPartsInput) String

func (s ListPartsInput) String() string

String returns the string representation

func (*ListPartsInput) Validate

func (s *ListPartsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListPartsOutput

type ListPartsOutput struct {

	// Date when multipart upload will become eligible for abort operation by lifecycle.
	AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`

	// Id of the lifecycle rule that makes a multipart upload eligible for abort
	// operation.
	AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`

	// Name of the bucket to which the multipart upload was initiated.
	Bucket *string `type:"string"`

	// Identifies who initiated the multipart upload.
	Initiator *Initiator `type:"structure"`

	// Indicates whether the returned list of parts is truncated.
	IsTruncated *bool `type:"boolean"`

	// Object key for which the multipart upload was initiated.
	Key *string `min:"1" type:"string"`

	// Maximum number of parts that were allowed in the response.
	MaxParts *int64 `type:"integer"`

	// When a list is truncated, this element specifies the last part in the list,
	// as well as the value to use for the part-number-marker request parameter
	// in a subsequent request.
	NextPartNumberMarker *int64 `type:"integer"`

	Owner *Owner `type:"structure"`

	// Part number after which listing begins.
	PartNumberMarker *int64 `type:"integer"`

	Parts []*Part `locationName:"Part" type:"list" flattened:"true"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// The class of storage used to store the object.
	StorageClass *string `type:"string" enum:"StorageClass"`

	// Upload ID identifying the multipart upload whose parts are being listed.
	UploadId *string `type:"string"`
	// contains filtered or unexported fields
}

func (ListPartsOutput) GoString

func (s ListPartsOutput) GoString() string

GoString returns the string representation

func (*ListPartsOutput) SetAbortDate

func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput

SetAbortDate sets the AbortDate field's value.

func (*ListPartsOutput) SetAbortRuleId

func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput

SetAbortRuleId sets the AbortRuleId field's value.

func (*ListPartsOutput) SetBucket

func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput

SetBucket sets the Bucket field's value.

func (*ListPartsOutput) SetInitiator

func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput

SetInitiator sets the Initiator field's value.

func (*ListPartsOutput) SetIsTruncated

func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput

SetIsTruncated sets the IsTruncated field's value.

func (*ListPartsOutput) SetKey

func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput

SetKey sets the Key field's value.

func (*ListPartsOutput) SetMaxParts

func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput

SetMaxParts sets the MaxParts field's value.

func (*ListPartsOutput) SetNextPartNumberMarker

func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput

SetNextPartNumberMarker sets the NextPartNumberMarker field's value.

func (*ListPartsOutput) SetOwner

func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput

SetOwner sets the Owner field's value.

func (*ListPartsOutput) SetPartNumberMarker

func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput

SetPartNumberMarker sets the PartNumberMarker field's value.

func (*ListPartsOutput) SetParts

func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput

SetParts sets the Parts field's value.

func (*ListPartsOutput) SetRequestCharged

func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput

SetRequestCharged sets the RequestCharged field's value.

func (*ListPartsOutput) SetStorageClass

func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput

SetStorageClass sets the StorageClass field's value.

func (*ListPartsOutput) SetUploadId

func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput

SetUploadId sets the UploadId field's value.

func (ListPartsOutput) String

func (s ListPartsOutput) String() string

String returns the string representation

type LoggingEnabled

type LoggingEnabled struct {

	// Specifies the bucket where you want Amazon S3 to store server access logs.
	// You can have your logs delivered to any bucket that you own, including the
	// same bucket that is being logged. You can also configure multiple buckets
	// to deliver their logs to the same target bucket. In this case you should
	// choose a different TargetPrefix for each source bucket so that the delivered
	// log files can be distinguished by key.
	//
	// TargetBucket is a required field
	TargetBucket *string `type:"string" required:"true"`

	TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`

	// This element lets you specify a prefix for the keys that the log files will
	// be stored under.
	//
	// TargetPrefix is a required field
	TargetPrefix *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Container for logging information. Presence of this element indicates that logging is enabled. Parameters TargetBucket and TargetPrefix are required in this case.

func (LoggingEnabled) GoString

func (s LoggingEnabled) GoString() string

GoString returns the string representation

func (*LoggingEnabled) SetTargetBucket

func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled

SetTargetBucket sets the TargetBucket field's value.

func (*LoggingEnabled) SetTargetGrants

func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled

SetTargetGrants sets the TargetGrants field's value.

func (*LoggingEnabled) SetTargetPrefix

func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled

SetTargetPrefix sets the TargetPrefix field's value.

func (LoggingEnabled) String

func (s LoggingEnabled) String() string

String returns the string representation

func (*LoggingEnabled) Validate

func (s *LoggingEnabled) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type MultipartUpload

type MultipartUpload struct {

	// Date and time at which the multipart upload was initiated.
	Initiated *time.Time `type:"timestamp"`

	// Identifies who initiated the multipart upload.
	Initiator *Initiator `type:"structure"`

	// Key of the object for which the multipart upload was initiated.
	Key *string `min:"1" type:"string"`

	Owner *Owner `type:"structure"`

	// The class of storage used to store the object.
	StorageClass *string `type:"string" enum:"StorageClass"`

	// Upload ID that identifies the multipart upload.
	UploadId *string `type:"string"`
	// contains filtered or unexported fields
}

func (MultipartUpload) GoString

func (s MultipartUpload) GoString() string

GoString returns the string representation

func (*MultipartUpload) SetInitiated

func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload

SetInitiated sets the Initiated field's value.

func (*MultipartUpload) SetInitiator

func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload

SetInitiator sets the Initiator field's value.

func (*MultipartUpload) SetKey

func (s *MultipartUpload) SetKey(v string) *MultipartUpload

SetKey sets the Key field's value.

func (*MultipartUpload) SetOwner

func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload

SetOwner sets the Owner field's value.

func (*MultipartUpload) SetStorageClass

func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload

SetStorageClass sets the StorageClass field's value.

func (*MultipartUpload) SetUploadId

func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload

SetUploadId sets the UploadId field's value.

func (MultipartUpload) String

func (s MultipartUpload) String() string

String returns the string representation

type Object

type Object struct {
	ETag *string `type:"string"`

	Key *string `min:"1" type:"string"`

	LastModified *time.Time `type:"timestamp"`

	Owner *Owner `type:"structure"`

	Size *int64 `type:"integer"`

	// The class of storage used to store the object.
	StorageClass *string `type:"string" enum:"ObjectStorageClass"`
	// contains filtered or unexported fields
}

func (Object) GoString

func (s Object) GoString() string

GoString returns the string representation

func (*Object) SetETag

func (s *Object) SetETag(v string) *Object

SetETag sets the ETag field's value.

func (*Object) SetKey

func (s *Object) SetKey(v string) *Object

SetKey sets the Key field's value.

func (*Object) SetLastModified

func (s *Object) SetLastModified(v time.Time) *Object

SetLastModified sets the LastModified field's value.

func (*Object) SetOwner

func (s *Object) SetOwner(v *Owner) *Object

SetOwner sets the Owner field's value.

func (*Object) SetSize

func (s *Object) SetSize(v int64) *Object

SetSize sets the Size field's value.

func (*Object) SetStorageClass

func (s *Object) SetStorageClass(v string) *Object

SetStorageClass sets the StorageClass field's value.

func (Object) String

func (s Object) String() string

String returns the string representation

type ObjectIdentifier

type ObjectIdentifier struct {

	// Key name of the object to delete.
	//
	// Key is a required field
	Key *string `min:"1" type:"string" required:"true"`

	// VersionId for the specific version of the object to delete.
	VersionId *string `type:"string"`
	// contains filtered or unexported fields
}

func (ObjectIdentifier) GoString

func (s ObjectIdentifier) GoString() string

GoString returns the string representation

func (*ObjectIdentifier) SetKey

SetKey sets the Key field's value.

func (*ObjectIdentifier) SetVersionId

func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier

SetVersionId sets the VersionId field's value.

func (ObjectIdentifier) String

func (s ObjectIdentifier) String() string

String returns the string representation

func (*ObjectIdentifier) Validate

func (s *ObjectIdentifier) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Owner

type Owner struct {
	DisplayName *string `type:"string"`

	ID *string `type:"string"`
	// contains filtered or unexported fields
}

func (Owner) GoString

func (s Owner) GoString() string

GoString returns the string representation

func (*Owner) SetDisplayName

func (s *Owner) SetDisplayName(v string) *Owner

SetDisplayName sets the DisplayName field's value.

func (*Owner) SetID

func (s *Owner) SetID(v string) *Owner

SetID sets the ID field's value.

func (Owner) String

func (s Owner) String() string

String returns the string representation

type Part

type Part struct {

	// Entity tag returned when the part was uploaded.
	ETag *string `type:"string"`

	// Date and time at which the part was uploaded.
	LastModified *time.Time `type:"timestamp"`

	// Part number identifying the part. This is a positive integer between 1 and
	// 10,000.
	PartNumber *int64 `type:"integer"`

	// Size in bytes of the uploaded part data.
	Size *int64 `type:"integer"`
	// contains filtered or unexported fields
}

func (Part) GoString

func (s Part) GoString() string

GoString returns the string representation

func (*Part) SetETag

func (s *Part) SetETag(v string) *Part

SetETag sets the ETag field's value.

func (*Part) SetLastModified

func (s *Part) SetLastModified(v time.Time) *Part

SetLastModified sets the LastModified field's value.

func (*Part) SetPartNumber

func (s *Part) SetPartNumber(v int64) *Part

SetPartNumber sets the PartNumber field's value.

func (*Part) SetSize

func (s *Part) SetSize(v int64) *Part

SetSize sets the Size field's value.

func (Part) String

func (s Part) String() string

String returns the string representation

type ProtectionConfiguration added in v1.2.0

type ProtectionConfiguration struct {

	// Default retention period for an object, if a PUT of an object does not specify
	// a retention period this value will be converted to seconds and used.
	//
	// DefaultRetention is a required field
	DefaultRetention *BucketProtectionDefaultRetention `type:"structure" required:"true"`

	// Enable permanent retention for an object.
	EnablePermanentRetention *bool `type:"boolean"`

	// Maximum retention period for an object, if a PUT of an object specifies a
	// longer retention period the PUT object will fail.
	//
	// MaximumRetention is a required field
	MaximumRetention *BucketProtectionMaximumRetention `type:"structure" required:"true"`

	// Minimum retention period for an object, if a PUT of an object specifies a
	// shorter retention period the PUT object will fail.
	//
	// MinimumRetention is a required field
	MinimumRetention *BucketProtectionMinimumRetention `type:"structure" required:"true"`

	// Retention status of a bucket.
	//
	// Status is a required field
	Status *string `type:"string" required:"true" enum:"BucketProtectionStatus"`
	// contains filtered or unexported fields
}

func (ProtectionConfiguration) GoString added in v1.2.0

func (s ProtectionConfiguration) GoString() string

GoString returns the string representation

func (*ProtectionConfiguration) SetDefaultRetention added in v1.2.0

SetDefaultRetention sets the DefaultRetention field's value.

func (*ProtectionConfiguration) SetEnablePermanentRetention added in v1.2.0

func (s *ProtectionConfiguration) SetEnablePermanentRetention(v bool) *ProtectionConfiguration

SetEnablePermanentRetention sets the EnablePermanentRetention field's value.

func (*ProtectionConfiguration) SetMaximumRetention added in v1.2.0

SetMaximumRetention sets the MaximumRetention field's value.

func (*ProtectionConfiguration) SetMinimumRetention added in v1.2.0

SetMinimumRetention sets the MinimumRetention field's value.

func (*ProtectionConfiguration) SetStatus added in v1.2.0

SetStatus sets the Status field's value.

func (ProtectionConfiguration) String added in v1.2.0

func (s ProtectionConfiguration) String() string

String returns the string representation

func (*ProtectionConfiguration) Validate added in v1.2.0

func (s *ProtectionConfiguration) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutBucketAclInput

type PutBucketAclInput struct {

	// The canned ACL to apply to the bucket.
	ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`

	AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Allows grantee the read, write, read ACP, and write ACP permissions on the
	// bucket.
	GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`

	// Allows grantee to list the objects in the bucket.
	GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`

	// Allows grantee to read the bucket ACL.
	GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`

	// Allows grantee to create, overwrite, and delete any object in the bucket.
	GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`

	// Allows grantee to write the ACL for the applicable bucket.
	GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
	// contains filtered or unexported fields
}

func (PutBucketAclInput) GoString

func (s PutBucketAclInput) GoString() string

GoString returns the string representation

func (*PutBucketAclInput) SetACL

SetACL sets the ACL field's value.

func (*PutBucketAclInput) SetAccessControlPolicy

func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput

SetAccessControlPolicy sets the AccessControlPolicy field's value.

func (*PutBucketAclInput) SetBucket

func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput

SetBucket sets the Bucket field's value.

func (*PutBucketAclInput) SetGrantFullControl

func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput

SetGrantFullControl sets the GrantFullControl field's value.

func (*PutBucketAclInput) SetGrantRead

func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput

SetGrantRead sets the GrantRead field's value.

func (*PutBucketAclInput) SetGrantReadACP

func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput

SetGrantReadACP sets the GrantReadACP field's value.

func (*PutBucketAclInput) SetGrantWrite

func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput

SetGrantWrite sets the GrantWrite field's value.

func (*PutBucketAclInput) SetGrantWriteACP

func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput

SetGrantWriteACP sets the GrantWriteACP field's value.

func (PutBucketAclInput) String

func (s PutBucketAclInput) String() string

String returns the string representation

func (*PutBucketAclInput) Validate

func (s *PutBucketAclInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutBucketAclOutput

type PutBucketAclOutput struct {
	// contains filtered or unexported fields
}

func (PutBucketAclOutput) GoString

func (s PutBucketAclOutput) GoString() string

GoString returns the string representation

func (PutBucketAclOutput) String

func (s PutBucketAclOutput) String() string

String returns the string representation

type PutBucketCorsInput

type PutBucketCorsInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// CORSConfiguration is a required field
	CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
	// contains filtered or unexported fields
}

func (PutBucketCorsInput) GoString

func (s PutBucketCorsInput) GoString() string

GoString returns the string representation

func (*PutBucketCorsInput) SetBucket

func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput

SetBucket sets the Bucket field's value.

func (*PutBucketCorsInput) SetCORSConfiguration

func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput

SetCORSConfiguration sets the CORSConfiguration field's value.

func (PutBucketCorsInput) String

func (s PutBucketCorsInput) String() string

String returns the string representation

func (*PutBucketCorsInput) Validate

func (s *PutBucketCorsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutBucketCorsOutput

type PutBucketCorsOutput struct {
	// contains filtered or unexported fields
}

func (PutBucketCorsOutput) GoString

func (s PutBucketCorsOutput) GoString() string

GoString returns the string representation

func (PutBucketCorsOutput) String

func (s PutBucketCorsOutput) String() string

String returns the string representation

type PutBucketLifecycleConfigurationInput added in v1.2.0

type PutBucketLifecycleConfigurationInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// LifecycleConfiguration is a required field
	LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
	// contains filtered or unexported fields
}

func (PutBucketLifecycleConfigurationInput) GoString added in v1.2.0

GoString returns the string representation

func (*PutBucketLifecycleConfigurationInput) SetBucket added in v1.2.0

SetBucket sets the Bucket field's value.

func (*PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration added in v1.2.0

SetLifecycleConfiguration sets the LifecycleConfiguration field's value.

func (PutBucketLifecycleConfigurationInput) String added in v1.2.0

String returns the string representation

func (*PutBucketLifecycleConfigurationInput) Validate added in v1.2.0

Validate inspects the fields of the type to determine if they are valid.

type PutBucketLifecycleConfigurationOutput added in v1.2.0

type PutBucketLifecycleConfigurationOutput struct {
	// contains filtered or unexported fields
}

func (PutBucketLifecycleConfigurationOutput) GoString added in v1.2.0

GoString returns the string representation

func (PutBucketLifecycleConfigurationOutput) String added in v1.2.0

String returns the string representation

type PutBucketLoggingInput

type PutBucketLoggingInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// BucketLoggingStatus is a required field
	BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
	// contains filtered or unexported fields
}

func (PutBucketLoggingInput) GoString

func (s PutBucketLoggingInput) GoString() string

GoString returns the string representation

func (*PutBucketLoggingInput) SetBucket

SetBucket sets the Bucket field's value.

func (*PutBucketLoggingInput) SetBucketLoggingStatus

func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput

SetBucketLoggingStatus sets the BucketLoggingStatus field's value.

func (PutBucketLoggingInput) String

func (s PutBucketLoggingInput) String() string

String returns the string representation

func (*PutBucketLoggingInput) Validate

func (s *PutBucketLoggingInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutBucketLoggingOutput

type PutBucketLoggingOutput struct {
	// contains filtered or unexported fields
}

func (PutBucketLoggingOutput) GoString

func (s PutBucketLoggingOutput) GoString() string

GoString returns the string representation

func (PutBucketLoggingOutput) String

func (s PutBucketLoggingOutput) String() string

String returns the string representation

type PutBucketProtectionConfigurationInput added in v1.2.0

type PutBucketProtectionConfigurationInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// ProtectionConfiguration is a required field
	ProtectionConfiguration *ProtectionConfiguration `locationName:"ProtectionConfiguration" type:"structure" required:"true"`
	// contains filtered or unexported fields
}

func (PutBucketProtectionConfigurationInput) GoString added in v1.2.0

GoString returns the string representation

func (*PutBucketProtectionConfigurationInput) SetBucket added in v1.2.0

SetBucket sets the Bucket field's value.

func (*PutBucketProtectionConfigurationInput) SetProtectionConfiguration added in v1.2.0

SetProtectionConfiguration sets the ProtectionConfiguration field's value.

func (PutBucketProtectionConfigurationInput) String added in v1.2.0

String returns the string representation

func (*PutBucketProtectionConfigurationInput) Validate added in v1.2.0

Validate inspects the fields of the type to determine if they are valid.

type PutBucketProtectionConfigurationOutput added in v1.2.0

type PutBucketProtectionConfigurationOutput struct {
	// contains filtered or unexported fields
}

func (PutBucketProtectionConfigurationOutput) GoString added in v1.2.0

GoString returns the string representation

func (PutBucketProtectionConfigurationOutput) String added in v1.2.0

String returns the string representation

type PutObjectAclInput

type PutObjectAclInput struct {

	// The canned ACL to apply to the object.
	ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`

	AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Allows grantee the read, write, read ACP, and write ACP permissions on the
	// bucket.
	GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`

	// Allows grantee to list the objects in the bucket.
	GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`

	// Allows grantee to read the bucket ACL.
	GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`

	// Allows grantee to create, overwrite, and delete any object in the bucket.
	GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`

	// Allows grantee to write the ACL for the applicable bucket.
	GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// VersionId used to reference a specific version of the object.
	VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
	// contains filtered or unexported fields
}

func (PutObjectAclInput) GoString

func (s PutObjectAclInput) GoString() string

GoString returns the string representation

func (*PutObjectAclInput) SetACL

SetACL sets the ACL field's value.

func (*PutObjectAclInput) SetAccessControlPolicy

func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput

SetAccessControlPolicy sets the AccessControlPolicy field's value.

func (*PutObjectAclInput) SetBucket

func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput

SetBucket sets the Bucket field's value.

func (*PutObjectAclInput) SetGrantFullControl

func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput

SetGrantFullControl sets the GrantFullControl field's value.

func (*PutObjectAclInput) SetGrantRead

func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput

SetGrantRead sets the GrantRead field's value.

func (*PutObjectAclInput) SetGrantReadACP

func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput

SetGrantReadACP sets the GrantReadACP field's value.

func (*PutObjectAclInput) SetGrantWrite

func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput

SetGrantWrite sets the GrantWrite field's value.

func (*PutObjectAclInput) SetGrantWriteACP

func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput

SetGrantWriteACP sets the GrantWriteACP field's value.

func (*PutObjectAclInput) SetKey

SetKey sets the Key field's value.

func (*PutObjectAclInput) SetRequestPayer

func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput

SetRequestPayer sets the RequestPayer field's value.

func (*PutObjectAclInput) SetVersionId

func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput

SetVersionId sets the VersionId field's value.

func (PutObjectAclInput) String

func (s PutObjectAclInput) String() string

String returns the string representation

func (*PutObjectAclInput) Validate

func (s *PutObjectAclInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutObjectAclOutput

type PutObjectAclOutput struct {

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
	// contains filtered or unexported fields
}

func (PutObjectAclOutput) GoString

func (s PutObjectAclOutput) GoString() string

GoString returns the string representation

func (*PutObjectAclOutput) SetRequestCharged

func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput

SetRequestCharged sets the RequestCharged field's value.

func (PutObjectAclOutput) String

func (s PutObjectAclOutput) String() string

String returns the string representation

type PutObjectInput

type PutObjectInput struct {

	// The canned ACL to apply to the object.
	ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`

	// Object data.
	Body io.ReadSeeker `type:"blob"`

	// Name of the bucket to which the PUT operation was initiated.
	//
	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Specifies caching behavior along the request/reply chain.
	CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`

	// Specifies presentational information for the object.
	ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`

	// Specifies what content encodings have been applied to the object and thus
	// what decoding mechanisms must be applied to obtain the media-type referenced
	// by the Content-Type header field.
	ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`

	// The language the content is in.
	ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`

	// Size of the body in bytes. This parameter is useful when the size of the
	// body cannot be determined automatically.
	ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`

	// The base64-encoded 128-bit MD5 digest of the part data. This parameter is
	// auto-populated when using the command from the CLI
	ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`

	// A standard MIME type describing the format of the object data.
	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`

	// The date and time at which the object is no longer cacheable.
	Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`

	// Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
	GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`

	// Allows grantee to read the object data and its metadata.
	GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`

	// Allows grantee to read the object ACL.
	GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`

	// Allows grantee to write the ACL for the applicable object.
	GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`

	// Object key for which the PUT operation was initiated.
	//
	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// A map of metadata to store with the object in S3.
	Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// Date on which it will be legal to delete or modify the object. This field
	// can only be specified if Retention-Directive is REPLACE. You can only specify
	// this or the Retention-Period header. If both are specified a 400 error will
	// be returned. If neither is specified the bucket's DefaultRetention period
	// will be used.
	RetentionExpirationDate *time.Time `location:"header" locationName:"Retention-Expiration-Date" type:"timestamp" timestampFormat:"iso8601"`

	// A single legal hold to apply to the object. This field can only be specified
	// if Retention-Directive is REPLACE. A legal hold is a character long string
	// of max length 64. The object cannot be overwritten or deleted until all legal
	// holds associated with the object are removed.
	RetentionLegalHoldId *string `location:"header" locationName:"Retention-Legal-Hold-ID" type:"string"`

	// Retention period to store on the object in seconds. If this field and Retention-Expiration-Date
	// are specified a 400 error is returned. If neither is specified the bucket's
	// DefaultRetention period will be used. 0 is a legal value assuming the bucket's
	// minimum retention period is also 0.
	RetentionPeriod *int64 `location:"header" locationName:"Retention-Period" type:"integer"`

	// Specifies the algorithm to use to when encrypting the object (e.g., AES256).
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
	// data. This value is used to store the object and then it is discarded; Amazon
	// does not store the encryption key. The key must be appropriate for use with
	// the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
	// header.
	SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`

	// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
	// Amazon S3 uses this header for a message integrity check to ensure the encryption
	// key was transmitted without error.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
	// requests for an object protected by AWS KMS will fail if not made via SSL
	// or using SigV4. Documentation on configuring any of the officially supported
	// AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`

	// The type of storage to use for the object. Defaults to 'STANDARD'.
	StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`

	// The tag-set for the object. The tag-set must be encoded as URL Query parameters.
	// (For example, "Key1=Value1")
	Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`

	// If the bucket is configured as a website, redirects requests for this object
	// to another object in the same bucket or to an external URL. Amazon S3 stores
	// the value of this header in the object metadata.
	WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
	// contains filtered or unexported fields
}

func (PutObjectInput) GoString

func (s PutObjectInput) GoString() string

GoString returns the string representation

func (*PutObjectInput) SetACL

func (s *PutObjectInput) SetACL(v string) *PutObjectInput

SetACL sets the ACL field's value.

func (*PutObjectInput) SetBody

func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput

SetBody sets the Body field's value.

func (*PutObjectInput) SetBucket

func (s *PutObjectInput) SetBucket(v string) *PutObjectInput

SetBucket sets the Bucket field's value.

func (*PutObjectInput) SetCacheControl

func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput

SetCacheControl sets the CacheControl field's value.

func (*PutObjectInput) SetContentDisposition

func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput

SetContentDisposition sets the ContentDisposition field's value.

func (*PutObjectInput) SetContentEncoding

func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput

SetContentEncoding sets the ContentEncoding field's value.

func (*PutObjectInput) SetContentLanguage

func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput

SetContentLanguage sets the ContentLanguage field's value.

func (*PutObjectInput) SetContentLength

func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput

SetContentLength sets the ContentLength field's value.

func (*PutObjectInput) SetContentMD5

func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput

SetContentMD5 sets the ContentMD5 field's value.

func (*PutObjectInput) SetContentType

func (s *PutObjectInput) SetContentType(v string) *PutObjectInput

SetContentType sets the ContentType field's value.

func (*PutObjectInput) SetExpires

func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput

SetExpires sets the Expires field's value.

func (*PutObjectInput) SetGrantFullControl

func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput

SetGrantFullControl sets the GrantFullControl field's value.

func (*PutObjectInput) SetGrantRead

func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput

SetGrantRead sets the GrantRead field's value.

func (*PutObjectInput) SetGrantReadACP

func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput

SetGrantReadACP sets the GrantReadACP field's value.

func (*PutObjectInput) SetGrantWriteACP

func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput

SetGrantWriteACP sets the GrantWriteACP field's value.

func (*PutObjectInput) SetKey

func (s *PutObjectInput) SetKey(v string) *PutObjectInput

SetKey sets the Key field's value.

func (*PutObjectInput) SetMetadata

func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput

SetMetadata sets the Metadata field's value.

func (*PutObjectInput) SetRequestPayer

func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput

SetRequestPayer sets the RequestPayer field's value.

func (*PutObjectInput) SetRetentionExpirationDate added in v1.2.0

func (s *PutObjectInput) SetRetentionExpirationDate(v time.Time) *PutObjectInput

SetRetentionExpirationDate sets the RetentionExpirationDate field's value.

func (*PutObjectInput) SetRetentionLegalHoldId added in v1.2.0

func (s *PutObjectInput) SetRetentionLegalHoldId(v string) *PutObjectInput

SetRetentionLegalHoldId sets the RetentionLegalHoldId field's value.

func (*PutObjectInput) SetRetentionPeriod added in v1.2.0

func (s *PutObjectInput) SetRetentionPeriod(v int64) *PutObjectInput

SetRetentionPeriod sets the RetentionPeriod field's value.

func (*PutObjectInput) SetSSECustomerAlgorithm

func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*PutObjectInput) SetSSECustomerKey

func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput

SetSSECustomerKey sets the SSECustomerKey field's value.

func (*PutObjectInput) SetSSECustomerKeyMD5

func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*PutObjectInput) SetSSEKMSKeyId

func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*PutObjectInput) SetServerSideEncryption

func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (*PutObjectInput) SetStorageClass

func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput

SetStorageClass sets the StorageClass field's value.

func (*PutObjectInput) SetTagging

func (s *PutObjectInput) SetTagging(v string) *PutObjectInput

SetTagging sets the Tagging field's value.

func (*PutObjectInput) SetWebsiteRedirectLocation

func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput

SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.

func (PutObjectInput) String

func (s PutObjectInput) String() string

String returns the string representation

func (*PutObjectInput) Validate

func (s *PutObjectInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutObjectOutput

type PutObjectOutput struct {

	// Entity tag for the uploaded object.
	ETag *string `location:"header" locationName:"ETag" type:"string"`

	// If the object expiration is configured, this will contain the expiration
	// date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
	Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header confirming the encryption algorithm
	// used.
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header to provide round trip message integrity
	// verification of the customer-provided encryption key.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// If present, specifies the ID of the AWS Key Management Service (KMS) master
	// encryption key that was used for the object.
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`

	// Version of the object.
	VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
	// contains filtered or unexported fields
}

func (PutObjectOutput) GoString

func (s PutObjectOutput) GoString() string

GoString returns the string representation

func (*PutObjectOutput) SetETag

func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput

SetETag sets the ETag field's value.

func (*PutObjectOutput) SetExpiration

func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput

SetExpiration sets the Expiration field's value.

func (*PutObjectOutput) SetRequestCharged

func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput

SetRequestCharged sets the RequestCharged field's value.

func (*PutObjectOutput) SetSSECustomerAlgorithm

func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*PutObjectOutput) SetSSECustomerKeyMD5

func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*PutObjectOutput) SetSSEKMSKeyId

func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*PutObjectOutput) SetServerSideEncryption

func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (*PutObjectOutput) SetVersionId

func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput

SetVersionId sets the VersionId field's value.

func (PutObjectOutput) String

func (s PutObjectOutput) String() string

String returns the string representation

type RequestFailure

type RequestFailure interface {
	awserr.RequestFailure

	// Host ID is the S3 Host ID needed for debug, and contacting support
	HostID() string
}

A RequestFailure provides access to the S3 Request ID and Host ID values returned from API operation errors. Getting the error as a string will return the formated error with the same information as awserr.RequestFailure, while also adding the HostID value from the response.

type RestoreObjectInput added in v1.2.0

type RestoreObjectInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// Container for restore job parameters.
	RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
	// contains filtered or unexported fields
}

func (RestoreObjectInput) GoString added in v1.2.0

func (s RestoreObjectInput) GoString() string

GoString returns the string representation

func (*RestoreObjectInput) SetBucket added in v1.2.0

func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput

SetBucket sets the Bucket field's value.

func (*RestoreObjectInput) SetKey added in v1.2.0

SetKey sets the Key field's value.

func (*RestoreObjectInput) SetRestoreRequest added in v1.2.0

func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput

SetRestoreRequest sets the RestoreRequest field's value.

func (RestoreObjectInput) String added in v1.2.0

func (s RestoreObjectInput) String() string

String returns the string representation

func (*RestoreObjectInput) Validate added in v1.2.0

func (s *RestoreObjectInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type RestoreObjectOutput added in v1.2.0

type RestoreObjectOutput struct {
	// contains filtered or unexported fields
}

func (RestoreObjectOutput) GoString added in v1.2.0

func (s RestoreObjectOutput) GoString() string

GoString returns the string representation

func (RestoreObjectOutput) String added in v1.2.0

func (s RestoreObjectOutput) String() string

String returns the string representation

type RestoreRequest added in v1.2.0

type RestoreRequest struct {

	// Lifetime of the active copy in days. Do not use with restores that specify
	// OutputLocation.
	//
	// Days is a required field
	Days *int64 `type:"integer" required:"true"`

	GlacierJobParameters *GlacierJobParameters `type:"structure"`
	// contains filtered or unexported fields
}

Container for restore job parameters.

func (RestoreRequest) GoString added in v1.2.0

func (s RestoreRequest) GoString() string

GoString returns the string representation

func (*RestoreRequest) SetDays added in v1.2.0

func (s *RestoreRequest) SetDays(v int64) *RestoreRequest

SetDays sets the Days field's value.

func (*RestoreRequest) SetGlacierJobParameters added in v1.2.0

func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest

SetGlacierJobParameters sets the GlacierJobParameters field's value.

func (RestoreRequest) String added in v1.2.0

func (s RestoreRequest) String() string

String returns the string representation

func (*RestoreRequest) Validate added in v1.2.0

func (s *RestoreRequest) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type S3

type S3 struct {
	*client.Client
}

S3 provides the API operation methods for making requests to Amazon Simple Storage Service. See this package's package overview docs for details on the service.

S3 methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

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"))

func (*S3) AbortMultipartUpload

func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error)

AbortMultipartUpload API operation for Amazon Simple Storage Service.

Aborts a multipart upload.

To verify that all parts have been removed, so you don't get charged for the part storage, you should call the List Parts operation and ensure the parts list is empty.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload

Example (Shared00)

To abort a multipart upload

The following example aborts a multipart upload.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.AbortMultipartUploadInput{
		Bucket:   aws.String("examplebucket"),
		Key:      aws.String("bigobject"),
		UploadId: aws.String("xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--"),
	}

	result, err := svc.AbortMultipartUpload(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeNoSuchUpload:
				fmt.Println(s3.ErrCodeNoSuchUpload, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) AbortMultipartUploadRequest

func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput)

AbortMultipartUploadRequest generates a "aws/request.Request" representing the client's request for the AbortMultipartUpload operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See AbortMultipartUpload for more information on using the AbortMultipartUpload API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the AbortMultipartUploadRequest method.
req, resp := client.AbortMultipartUploadRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload

func (*S3) AbortMultipartUploadWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) AddLegalHold added in v1.2.0

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AddLegalHold

func (*S3) AddLegalHoldRequest added in v1.2.0

func (c *S3) AddLegalHoldRequest(input *AddLegalHoldInput) (req *request.Request, output *AddLegalHoldOutput)

AddLegalHoldRequest generates a "aws/request.Request" representing the client's request for the AddLegalHold operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See AddLegalHold for more information on using the AddLegalHold API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the AddLegalHoldRequest method.
req, resp := client.AddLegalHoldRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AddLegalHold

func (*S3) AddLegalHoldWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) CompleteMultipartUpload

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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload

Example (Shared00)

To complete multipart upload

The following example completes a multipart upload.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.CompleteMultipartUploadInput{
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("bigobject"),
		MultipartUpload: &s3.CompletedMultipartUpload{
			Parts: []*s3.CompletedPart{
				{
					ETag:       aws.String("\"d8c2eafd90c266e19ab9dcacc479f8af\""),
					PartNumber: aws.Int64(1),
				},
				{
					ETag:       aws.String("\"d8c2eafd90c266e19ab9dcacc479f8af\""),
					PartNumber: aws.Int64(2),
				},
			},
		},
		UploadId: aws.String("7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--"),
	}

	result, err := svc.CompleteMultipartUpload(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) CompleteMultipartUploadRequest

func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput)

CompleteMultipartUploadRequest generates a "aws/request.Request" representing the client's request for the CompleteMultipartUpload operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CompleteMultipartUpload for more information on using the CompleteMultipartUpload API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CompleteMultipartUploadRequest method.
req, resp := client.CompleteMultipartUploadRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload

func (*S3) CompleteMultipartUploadWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) CopyObject

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.

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 operation is not in the active tier and is only stored in Amazon Glacier.

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject

Example (Shared00)

To copy an object

The following example copies an object from one bucket to another.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.CopyObjectInput{
		Bucket:     aws.String("destinationbucket"),
		CopySource: aws.String("/sourcebucket/HappyFacejpg"),
		Key:        aws.String("HappyFaceCopyjpg"),
	}

	result, err := svc.CopyObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeObjectNotInActiveTierError:
				fmt.Println(s3.ErrCodeObjectNotInActiveTierError, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) CopyObjectRequest

func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput)

CopyObjectRequest generates a "aws/request.Request" representing the client's request for the CopyObject operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CopyObject for more information on using the CopyObject API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CopyObjectRequest method.
req, resp := client.CopyObjectRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject

func (*S3) CopyObjectWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) CreateBucket

func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error)

CreateBucket API operation for Amazon Simple Storage Service.

Creates a new 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 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. Please select a different name and try again.

  • ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket

Example (Shared00)

To create a bucket in a specific region

The following example creates a bucket. The request specifies an AWS region where to create the bucket.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.CreateBucketInput{
		Bucket: aws.String("examplebucket"),
		CreateBucketConfiguration: &s3.CreateBucketConfiguration{
			LocationConstraint: aws.String("eu-west-1"),
		},
	}

	result, err := svc.CreateBucket(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeBucketAlreadyExists:
				fmt.Println(s3.ErrCodeBucketAlreadyExists, aerr.Error())
			case s3.ErrCodeBucketAlreadyOwnedByYou:
				fmt.Println(s3.ErrCodeBucketAlreadyOwnedByYou, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To create a bucket

The following example creates a bucket.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.CreateBucketInput{
		Bucket: aws.String("examplebucket"),
	}

	result, err := svc.CreateBucket(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeBucketAlreadyExists:
				fmt.Println(s3.ErrCodeBucketAlreadyExists, aerr.Error())
			case s3.ErrCodeBucketAlreadyOwnedByYou:
				fmt.Println(s3.ErrCodeBucketAlreadyOwnedByYou, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) CreateBucketRequest

func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput)

CreateBucketRequest generates a "aws/request.Request" representing the client's request for the CreateBucket operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateBucket for more information on using the CreateBucket API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateBucketRequest method.
req, resp := client.CreateBucketRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket

func (*S3) CreateBucketWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) CreateMultipartUpload

func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error)

CreateMultipartUpload API operation for Amazon Simple Storage Service.

Initiates a multipart upload and returns an upload ID.

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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload

Example (Shared00)

To initiate a multipart upload

The following example initiates a multipart upload.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.CreateMultipartUploadInput{
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("largeobject"),
	}

	result, err := svc.CreateMultipartUpload(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) CreateMultipartUploadRequest

func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput)

CreateMultipartUploadRequest generates a "aws/request.Request" representing the client's request for the CreateMultipartUpload operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateMultipartUpload for more information on using the CreateMultipartUpload API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateMultipartUploadRequest method.
req, resp := client.CreateMultipartUploadRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload

func (*S3) CreateMultipartUploadWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) DeleteBucket

func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error)

DeleteBucket API operation for Amazon Simple Storage Service.

Deletes the bucket. All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket

Example (Shared00)

To delete a bucket

The following example deletes the specified bucket.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.DeleteBucketInput{
		Bucket: aws.String("forrandall2"),
	}

	result, err := svc.DeleteBucket(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) DeleteBucketCors

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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors

Example (Shared00)

To delete cors configuration on a bucket.

The following example deletes CORS configuration on a bucket.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.DeleteBucketCorsInput{
		Bucket: aws.String("examplebucket"),
	}

	result, err := svc.DeleteBucketCors(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) DeleteBucketCorsRequest

func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput)

DeleteBucketCorsRequest generates a "aws/request.Request" representing the client's request for the DeleteBucketCors operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteBucketCors for more information on using the DeleteBucketCors API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteBucketCorsRequest method.
req, resp := client.DeleteBucketCorsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors

func (*S3) DeleteBucketCorsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) DeleteBucketLifecycle added in v1.2.0

func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error)

DeleteBucketLifecycle API operation for Amazon Simple Storage Service.

Deletes the lifecycle configuration from the 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 DeleteBucketLifecycle for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle

func (*S3) DeleteBucketLifecycleRequest added in v1.2.0

func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput)

DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the client's request for the DeleteBucketLifecycle operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteBucketLifecycleRequest method.
req, resp := client.DeleteBucketLifecycleRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle

func (*S3) DeleteBucketLifecycleWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) DeleteBucketRequest

func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput)

DeleteBucketRequest generates a "aws/request.Request" representing the client's request for the DeleteBucket operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteBucket for more information on using the DeleteBucket API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteBucketRequest method.
req, resp := client.DeleteBucketRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket

func (*S3) DeleteBucketWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) DeleteLegalHold added in v1.2.0

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteLegalHold

func (*S3) DeleteLegalHoldRequest added in v1.2.0

func (c *S3) DeleteLegalHoldRequest(input *DeleteLegalHoldInput) (req *request.Request, output *DeleteLegalHoldOutput)

DeleteLegalHoldRequest generates a "aws/request.Request" representing the client's request for the DeleteLegalHold operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteLegalHold for more information on using the DeleteLegalHold API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteLegalHoldRequest method.
req, resp := client.DeleteLegalHoldRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteLegalHold

func (*S3) DeleteLegalHoldWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) DeleteObject

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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject

Example (Shared00)

To delete an object (from a non-versioned bucket)

The following example deletes an object from a non-versioned bucket.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.DeleteObjectInput{
		Bucket: aws.String("ExampleBucket"),
		Key:    aws.String("HappyFace.jpg"),
	}

	result, err := svc.DeleteObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) DeleteObjectRequest

func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput)

DeleteObjectRequest generates a "aws/request.Request" representing the client's request for the DeleteObject operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteObject for more information on using the DeleteObject API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteObjectRequest method.
req, resp := client.DeleteObjectRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject

func (*S3) DeleteObjectWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) DeleteObjects

func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error)

DeleteObjects API operation for Amazon Simple Storage Service.

This operation enables you to delete multiple objects from a bucket using a single HTTP request. You may specify up to 1000 keys.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects

Example (Shared00)

To delete multiple objects from a versioned bucket

The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.DeleteObjectsInput{
		Bucket: aws.String("examplebucket"),
		Delete: &s3.Delete{
			Objects: []*s3.ObjectIdentifier{
				{
					Key: aws.String("objectkey1"),
				},
				{
					Key: aws.String("objectkey2"),
				},
			},
			Quiet: aws.Bool(false),
		},
	}

	result, err := svc.DeleteObjects(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To delete multiple object versions from a versioned bucket

The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.DeleteObjectsInput{
		Bucket: aws.String("examplebucket"),
		Delete: &s3.Delete{
			Objects: []*s3.ObjectIdentifier{
				{
					Key:       aws.String("HappyFace.jpg"),
					VersionId: aws.String("2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"),
				},
				{
					Key:       aws.String("HappyFace.jpg"),
					VersionId: aws.String("yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"),
				},
			},
			Quiet: aws.Bool(false),
		},
	}

	result, err := svc.DeleteObjects(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) DeleteObjectsRequest

func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput)

DeleteObjectsRequest generates a "aws/request.Request" representing the client's request for the DeleteObjects operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteObjects for more information on using the DeleteObjects API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteObjectsRequest method.
req, resp := client.DeleteObjectsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects

func (*S3) DeleteObjectsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ExtendObjectRetention added in v1.2.0

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ExtendObjectRetention

func (*S3) ExtendObjectRetentionRequest added in v1.2.0

func (c *S3) ExtendObjectRetentionRequest(input *ExtendObjectRetentionInput) (req *request.Request, output *ExtendObjectRetentionOutput)

ExtendObjectRetentionRequest generates a "aws/request.Request" representing the client's request for the ExtendObjectRetention operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ExtendObjectRetention for more information on using the ExtendObjectRetention API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ExtendObjectRetentionRequest method.
req, resp := client.ExtendObjectRetentionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ExtendObjectRetention

func (*S3) ExtendObjectRetentionWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) GetBucketAcl

func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error)

GetBucketAcl API operation for Amazon Simple Storage Service.

Gets the access control policy for the 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 GetBucketAcl for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl

func (*S3) GetBucketAclRequest

func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput)

GetBucketAclRequest generates a "aws/request.Request" representing the client's request for the GetBucketAcl operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBucketAcl for more information on using the GetBucketAcl API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBucketAclRequest method.
req, resp := client.GetBucketAclRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl

func (*S3) GetBucketAclWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) GetBucketCors

func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error)

GetBucketCors API operation for Amazon Simple Storage Service.

Returns the cors configuration for the 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 GetBucketCors for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors

Example (Shared00)

To get cors configuration set on a bucket

The following example returns cross-origin resource sharing (CORS) configuration set on a bucket.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.GetBucketCorsInput{
		Bucket: aws.String("examplebucket"),
	}

	result, err := svc.GetBucketCors(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) GetBucketCorsRequest

func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput)

GetBucketCorsRequest generates a "aws/request.Request" representing the client's request for the GetBucketCors operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBucketCors for more information on using the GetBucketCors API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBucketCorsRequest method.
req, resp := client.GetBucketCorsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors

func (*S3) GetBucketCorsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) GetBucketLifecycleConfiguration added in v1.2.0

func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error)

GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.

Returns the lifecycle configuration for the 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 GetBucketLifecycleConfiguration for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration

func (*S3) GetBucketLifecycleConfigurationRequest added in v1.2.0

func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput)

GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the client's request for the GetBucketLifecycleConfiguration operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBucketLifecycleConfigurationRequest method.
req, resp := client.GetBucketLifecycleConfigurationRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration

func (*S3) GetBucketLifecycleConfigurationWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) GetBucketLocation

func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error)

GetBucketLocation API operation for Amazon Simple Storage Service.

Returns the region the bucket resides in.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation

Example (Shared00)

To get bucket location

The following example returns bucket location.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.GetBucketLocationInput{
		Bucket: aws.String("examplebucket"),
	}

	result, err := svc.GetBucketLocation(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) GetBucketLocationRequest

func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput)

GetBucketLocationRequest generates a "aws/request.Request" representing the client's request for the GetBucketLocation operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBucketLocation for more information on using the GetBucketLocation API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBucketLocationRequest method.
req, resp := client.GetBucketLocationRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation

func (*S3) GetBucketLocationWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) GetBucketLogging

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging

func (*S3) GetBucketLoggingRequest

func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput)

GetBucketLoggingRequest generates a "aws/request.Request" representing the client's request for the GetBucketLogging operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBucketLogging for more information on using the GetBucketLogging API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBucketLoggingRequest method.
req, resp := client.GetBucketLoggingRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging

func (*S3) GetBucketLoggingWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) GetBucketProtectionConfiguration added in v1.2.0

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketProtectionConfiguration

func (*S3) GetBucketProtectionConfigurationRequest added in v1.2.0

func (c *S3) GetBucketProtectionConfigurationRequest(input *GetBucketProtectionConfigurationInput) (req *request.Request, output *GetBucketProtectionConfigurationOutput)

GetBucketProtectionConfigurationRequest generates a "aws/request.Request" representing the client's request for the GetBucketProtectionConfiguration operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBucketProtectionConfiguration for more information on using the GetBucketProtectionConfiguration API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBucketProtectionConfigurationRequest method.
req, resp := client.GetBucketProtectionConfigurationRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketProtectionConfiguration

func (*S3) GetBucketProtectionConfigurationWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) GetObject

func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error)

GetObject API operation for Amazon Simple Storage Service.

Retrieves objects from Amazon S3.

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.

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject

Example (Shared00)

To retrieve an object

The following example retrieves an object for an S3 bucket.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.GetObjectInput{
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("HappyFace.jpg"),
	}

	result, err := svc.GetObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeNoSuchKey:
				fmt.Println(s3.ErrCodeNoSuchKey, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To retrieve a byte range of an object

The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.GetObjectInput{
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("SampleFile.txt"),
		Range:  aws.String("bytes=0-9"),
	}

	result, err := svc.GetObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeNoSuchKey:
				fmt.Println(s3.ErrCodeNoSuchKey, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) GetObjectAcl

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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl

Example (Shared00)

To retrieve object ACL

The following example retrieves access control list (ACL) of an object.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.GetObjectAclInput{
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("HappyFace.jpg"),
	}

	result, err := svc.GetObjectAcl(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeNoSuchKey:
				fmt.Println(s3.ErrCodeNoSuchKey, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) GetObjectAclRequest

func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput)

GetObjectAclRequest generates a "aws/request.Request" representing the client's request for the GetObjectAcl operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetObjectAcl for more information on using the GetObjectAcl API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetObjectAclRequest method.
req, resp := client.GetObjectAclRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl

func (*S3) GetObjectAclWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) GetObjectRequest

func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput)

GetObjectRequest generates a "aws/request.Request" representing the client's request for the GetObject operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetObject for more information on using the GetObject API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetObjectRequest method.
req, resp := client.GetObjectRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject

func (*S3) GetObjectWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) HeadBucket

func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error)

HeadBucket API operation for Amazon Simple Storage Service.

This operation is useful to determine if a bucket exists and you have permission to access it.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket

Example (Shared00)

To determine if bucket exists

This operation checks to see if a bucket exists.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.HeadBucketInput{
		Bucket: aws.String("acl1"),
	}

	result, err := svc.HeadBucket(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeNoSuchBucket:
				fmt.Println(s3.ErrCodeNoSuchBucket, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) HeadBucketRequest

func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput)

HeadBucketRequest generates a "aws/request.Request" representing the client's request for the HeadBucket operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See HeadBucket for more information on using the HeadBucket API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the HeadBucketRequest method.
req, resp := client.HeadBucketRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket

func (*S3) HeadBucketWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) HeadObject

func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error)

HeadObject API operation for Amazon Simple Storage Service.

The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.

See http://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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject

Example (Shared00)

To retrieve metadata of an object without returning the object itself

The following example retrieves an object metadata.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.HeadObjectInput{
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("HappyFace.jpg"),
	}

	result, err := svc.HeadObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) HeadObjectRequest

func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput)

HeadObjectRequest generates a "aws/request.Request" representing the client's request for the HeadObject operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See HeadObject for more information on using the HeadObject API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the HeadObjectRequest method.
req, resp := client.HeadObjectRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject

func (*S3) HeadObjectWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListBuckets

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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets

Example (Shared00)

To list object versions

The following example return versions of an object with specific key name prefix. The request limits the number of items returned to two. If there are are more than two object version, S3 returns NextToken in the response. You can specify this token value in your next request to fetch next set of object versions.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.ListBucketsInput{}

	result, err := svc.ListBuckets(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) ListBucketsExtended

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsExtended

func (*S3) ListBucketsExtendedPages

func (c *S3) ListBucketsExtendedPages(input *ListBucketsExtendedInput, fn func(*ListBucketsExtendedOutput, bool) bool) error

ListBucketsExtendedPages iterates over the pages of a ListBucketsExtended operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListBucketsExtended method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListBucketsExtended operation.
pageNum := 0
err := client.ListBucketsExtendedPages(params,
    func(page *s3.ListBucketsExtendedOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*S3) ListBucketsExtendedPagesWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListBucketsExtendedRequest

func (c *S3) ListBucketsExtendedRequest(input *ListBucketsExtendedInput) (req *request.Request, output *ListBucketsExtendedOutput)

ListBucketsExtendedRequest generates a "aws/request.Request" representing the client's request for the ListBucketsExtended operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListBucketsExtended for more information on using the ListBucketsExtended API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListBucketsExtendedRequest method.
req, resp := client.ListBucketsExtendedRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsExtended

func (*S3) ListBucketsExtendedWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListBucketsRequest

func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput)

ListBucketsRequest generates a "aws/request.Request" representing the client's request for the ListBuckets operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListBuckets for more information on using the ListBuckets API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListBucketsRequest method.
req, resp := client.ListBucketsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets

func (*S3) ListBucketsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListLegalHolds added in v1.2.0

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListLegalHolds

func (*S3) ListLegalHoldsRequest added in v1.2.0

func (c *S3) ListLegalHoldsRequest(input *ListLegalHoldsInput) (req *request.Request, output *ListLegalHoldsOutput)

ListLegalHoldsRequest generates a "aws/request.Request" representing the client's request for the ListLegalHolds operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListLegalHolds for more information on using the ListLegalHolds API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListLegalHoldsRequest method.
req, resp := client.ListLegalHoldsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListLegalHolds

func (*S3) ListLegalHoldsWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListMultipartUploads

func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error)

ListMultipartUploads API operation for Amazon Simple Storage Service.

This operation lists in-progress multipart uploads.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads

Example (Shared00)

To list in-progress multipart uploads on a bucket

The following example lists in-progress multipart uploads on a specific bucket.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.ListMultipartUploadsInput{
		Bucket: aws.String("examplebucket"),
	}

	result, err := svc.ListMultipartUploads(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

List next set of multipart uploads when previous result is truncated

The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.ListMultipartUploadsInput{
		Bucket:         aws.String("examplebucket"),
		KeyMarker:      aws.String("nextkeyfrompreviousresponse"),
		MaxUploads:     aws.Int64(2),
		UploadIdMarker: aws.String("valuefrompreviousresponse"),
	}

	result, err := svc.ListMultipartUploads(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) ListMultipartUploadsPages

func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error

ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListMultipartUploads method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListMultipartUploads operation.
pageNum := 0
err := client.ListMultipartUploadsPages(params,
    func(page *s3.ListMultipartUploadsOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*S3) ListMultipartUploadsPagesWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListMultipartUploadsRequest

func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput)

ListMultipartUploadsRequest generates a "aws/request.Request" representing the client's request for the ListMultipartUploads operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListMultipartUploads for more information on using the ListMultipartUploads API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListMultipartUploadsRequest method.
req, resp := client.ListMultipartUploadsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads

func (*S3) ListMultipartUploadsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListObjects

func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error)

ListObjects API operation for Amazon Simple Storage Service.

Returns some or all (up to 1000) 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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects

Example (Shared00)

To list objects in a bucket

The following example list two objects in a bucket.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.ListObjectsInput{
		Bucket:  aws.String("examplebucket"),
		MaxKeys: aws.Int64(2),
	}

	result, err := svc.ListObjects(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeNoSuchBucket:
				fmt.Println(s3.ErrCodeNoSuchBucket, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) ListObjectsPages

func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error

ListObjectsPages iterates over the pages of a ListObjects operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListObjects method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListObjects operation.
pageNum := 0
err := client.ListObjectsPages(params,
    func(page *s3.ListObjectsOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*S3) ListObjectsPagesWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListObjectsRequest

func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput)

ListObjectsRequest generates a "aws/request.Request" representing the client's request for the ListObjects operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListObjects for more information on using the ListObjects API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListObjectsRequest method.
req, resp := client.ListObjectsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects

func (*S3) ListObjectsV2 added in v1.3.0

func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error)

ListObjectsV2 API operation for Amazon Simple Storage Service.

Returns some or all (up to 1000) 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. Note: ListObjectsV2 is the revised List Objects API and we recommend you use this revised API for new application development.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2

Example (Shared00)

To get object list

The following example retrieves object list. The request specifies max keys to limit response to include only 2 object keys.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.ListObjectsV2Input{
		Bucket:  aws.String("examplebucket"),
		MaxKeys: aws.Int64(2),
	}

	result, err := svc.ListObjectsV2(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeNoSuchBucket:
				fmt.Println(s3.ErrCodeNoSuchBucket, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) ListObjectsV2Pages added in v1.3.0

func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error

ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListObjectsV2 method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListObjectsV2 operation.
pageNum := 0
err := client.ListObjectsV2Pages(params,
    func(page *s3.ListObjectsV2Output, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*S3) ListObjectsV2PagesWithContext added in v1.3.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListObjectsV2Request added in v1.3.0

func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output)

ListObjectsV2Request generates a "aws/request.Request" representing the client's request for the ListObjectsV2 operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListObjectsV2 for more information on using the ListObjectsV2 API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListObjectsV2Request method.
req, resp := client.ListObjectsV2Request(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2

func (*S3) ListObjectsV2WithContext added in v1.3.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListObjectsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListParts

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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts

Example (Shared00)

To list parts of a multipart upload.

The following example lists parts uploaded for a specific multipart upload.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.ListPartsInput{
		Bucket:   aws.String("examplebucket"),
		Key:      aws.String("bigobject"),
		UploadId: aws.String("example7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--"),
	}

	result, err := svc.ListParts(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) ListPartsPages

func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error

ListPartsPages iterates over the pages of a ListParts operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListParts method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListParts operation.
pageNum := 0
err := client.ListPartsPages(params,
    func(page *s3.ListPartsOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*S3) ListPartsPagesWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) ListPartsRequest

func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput)

ListPartsRequest generates a "aws/request.Request" representing the client's request for the ListParts operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListParts for more information on using the ListParts API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListPartsRequest method.
req, resp := client.ListPartsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts

func (*S3) ListPartsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) PutBucketAcl

func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error)

PutBucketAcl API operation for Amazon Simple Storage Service.

Sets the permissions on a bucket using access control lists (ACL).

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl

Example (Shared00)

Put bucket acl

The following example replaces existing ACL on a bucket. The ACL grants the bucket owner (specified using the owner ID) and write permission to the LogDelivery group. Because this is a replace operation, you must specify all the grants in your request. To incrementally add or remove ACL grants, you might use the console.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.PutBucketAclInput{
		Bucket:           aws.String("examplebucket"),
		GrantFullControl: aws.String("id=examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484"),
		GrantWrite:       aws.String("uri=http://acs.amazonaws.com/groups/s3/LogDelivery"),
	}

	result, err := svc.PutBucketAcl(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) PutBucketAclRequest

func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput)

PutBucketAclRequest generates a "aws/request.Request" representing the client's request for the PutBucketAcl operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutBucketAcl for more information on using the PutBucketAcl API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutBucketAclRequest method.
req, resp := client.PutBucketAclRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl

func (*S3) PutBucketAclWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) PutBucketCors

func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error)

PutBucketCors API operation for Amazon Simple Storage Service.

Sets the cors configuration 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 PutBucketCors for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors

Example (Shared00)

To set cors configuration on a bucket.

The following example enables PUT, POST, and DELETE requests from www.example.com, and enables GET requests from any domain.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.PutBucketCorsInput{
		Bucket: aws.String(""),
		CORSConfiguration: &s3.CORSConfiguration{
			CORSRules: []*s3.CORSRule{
				{
					AllowedHeaders: []*string{
						aws.String("*"),
					},
					AllowedMethods: []*string{
						aws.String("PUT"),
						aws.String("POST"),
						aws.String("DELETE"),
					},
					AllowedOrigins: []*string{
						aws.String("http://www.example.com"),
					},
					ExposeHeaders: []*string{
						aws.String("x-amz-server-side-encryption"),
					},
					MaxAgeSeconds: aws.Int64(3000),
				},
				{
					AllowedHeaders: []*string{
						aws.String("Authorization"),
					},
					AllowedMethods: []*string{
						aws.String("GET"),
					},
					AllowedOrigins: []*string{
						aws.String("*"),
					},
					MaxAgeSeconds: aws.Int64(3000),
				},
			},
		},
	}

	result, err := svc.PutBucketCors(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) PutBucketCorsRequest

func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput)

PutBucketCorsRequest generates a "aws/request.Request" representing the client's request for the PutBucketCors operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutBucketCors for more information on using the PutBucketCors API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutBucketCorsRequest method.
req, resp := client.PutBucketCorsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors

func (*S3) PutBucketCorsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) PutBucketLifecycleConfiguration added in v1.2.0

func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error)

PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.

Sets the lifecycle configuration 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 PutBucketLifecycleConfiguration for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration

func (*S3) PutBucketLifecycleConfigurationRequest added in v1.2.0

func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput)

PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the client's request for the PutBucketLifecycleConfiguration operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutBucketLifecycleConfigurationRequest method.
req, resp := client.PutBucketLifecycleConfigurationRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration

func (*S3) PutBucketLifecycleConfigurationWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) PutBucketLogging

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging

func (*S3) PutBucketLoggingRequest

func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput)

PutBucketLoggingRequest generates a "aws/request.Request" representing the client's request for the PutBucketLogging operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutBucketLogging for more information on using the PutBucketLogging API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutBucketLoggingRequest method.
req, resp := client.PutBucketLoggingRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging

func (*S3) PutBucketLoggingWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) PutBucketProtectionConfiguration added in v1.2.0

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketProtectionConfiguration

func (*S3) PutBucketProtectionConfigurationRequest added in v1.2.0

func (c *S3) PutBucketProtectionConfigurationRequest(input *PutBucketProtectionConfigurationInput) (req *request.Request, output *PutBucketProtectionConfigurationOutput)

PutBucketProtectionConfigurationRequest generates a "aws/request.Request" representing the client's request for the PutBucketProtectionConfiguration operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutBucketProtectionConfiguration for more information on using the PutBucketProtectionConfiguration API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutBucketProtectionConfigurationRequest method.
req, resp := client.PutBucketProtectionConfigurationRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketProtectionConfiguration

func (*S3) PutBucketProtectionConfigurationWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) PutObject

func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error)

PutObject API operation for Amazon Simple Storage Service.

Adds an object to 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 PutObject for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject

Example (Shared00)

To upload an object and specify canned ACL.

The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.

package main

import (
	"fmt"
	"strings"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.PutObjectInput{
		ACL:    aws.String("authenticated-read"),
		Body:   aws.ReadSeekCloser(strings.NewReader("filetoupload")),
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("exampleobject"),
	}

	result, err := svc.PutObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To create an object.

The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.

package main

import (
	"fmt"
	"strings"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.PutObjectInput{
		Body:   aws.ReadSeekCloser(strings.NewReader("filetoupload")),
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("objectkey"),
	}

	result, err := svc.PutObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared02)

To upload an object (specify optional headers)

The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.

package main

import (
	"fmt"
	"strings"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.PutObjectInput{
		Body:                 aws.ReadSeekCloser(strings.NewReader("HappyFace.jpg")),
		Bucket:               aws.String("examplebucket"),
		Key:                  aws.String("HappyFace.jpg"),
		ServerSideEncryption: aws.String("AES256"),
		StorageClass:         aws.String("STANDARD_IA"),
	}

	result, err := svc.PutObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared03)

To upload an object

The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.

package main

import (
	"fmt"
	"strings"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.PutObjectInput{
		Body:   aws.ReadSeekCloser(strings.NewReader("HappyFace.jpg")),
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("HappyFace.jpg"),
	}

	result, err := svc.PutObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared04)

To upload object and specify user-defined metadata

The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.

package main

import (
	"fmt"
	"strings"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.PutObjectInput{
		Body:   aws.ReadSeekCloser(strings.NewReader("filetoupload")),
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("exampleobject"),
		Metadata: map[string]*string{
			"metadata1": aws.String("value1"),
			"metadata2": aws.String("value2"),
		},
	}

	result, err := svc.PutObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared05)

To upload an object and specify server-side encryption and object tags

The following example uploads and object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.

package main

import (
	"fmt"
	"strings"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.PutObjectInput{
		Body:                 aws.ReadSeekCloser(strings.NewReader("filetoupload")),
		Bucket:               aws.String("examplebucket"),
		Key:                  aws.String("exampleobject"),
		ServerSideEncryption: aws.String("AES256"),
		Tagging:              aws.String("key1=value1&key2=value2"),
	}

	result, err := svc.PutObject(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) PutObjectAcl

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 an object that already exists in 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 PutObjectAcl for usage and error information.

Returned Error Codes:

  • ErrCodeNoSuchKey "NoSuchKey" The specified key does not exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl

Example (Shared00)

To grant permissions using object ACL

The following example adds grants to an object ACL. The first permission grants user1 and user2 FULL_CONTROL and the AllUsers group READ permission.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.PutObjectAclInput{
		AccessControlPolicy: &s3.AccessControlPolicy{},
		Bucket:              aws.String("examplebucket"),
		GrantFullControl:    aws.String("[email protected],[email protected]"),
		GrantRead:           aws.String("uri=http://acs.amazonaws.com/groups/global/AllUsers"),
		Key:                 aws.String("HappyFace.jpg"),
	}

	result, err := svc.PutObjectAcl(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case s3.ErrCodeNoSuchKey:
				fmt.Println(s3.ErrCodeNoSuchKey, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) PutObjectAclRequest

func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput)

PutObjectAclRequest generates a "aws/request.Request" representing the client's request for the PutObjectAcl operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutObjectAcl for more information on using the PutObjectAcl API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutObjectAclRequest method.
req, resp := client.PutObjectAclRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl

func (*S3) PutObjectAclWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) PutObjectRequest

func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput)

PutObjectRequest generates a "aws/request.Request" representing the client's request for the PutObject operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutObject for more information on using the PutObject API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutObjectRequest method.
req, resp := client.PutObjectRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject

func (*S3) PutObjectWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) RestoreObject added in v1.2.0

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

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 operation is not allowed against this storage tier

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject

func (*S3) RestoreObjectRequest added in v1.2.0

func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput)

RestoreObjectRequest generates a "aws/request.Request" representing the client's request for the RestoreObject operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See RestoreObject for more information on using the RestoreObject API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the RestoreObjectRequest method.
req, resp := client.RestoreObjectRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject

func (*S3) RestoreObjectWithContext added in v1.2.0

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) UploadPart

func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error)

UploadPart API operation for Amazon Simple Storage Service.

Uploads a part in a multipart upload.

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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart

Example (Shared00)

To upload a part

The following example uploads part 1 of a multipart upload. The example specifies a file name for the part data. The Upload ID is same that is returned by the initiate multipart upload.

package main

import (
	"fmt"
	"strings"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.UploadPartInput{
		Body:       aws.ReadSeekCloser(strings.NewReader("fileToUpload")),
		Bucket:     aws.String("examplebucket"),
		Key:        aws.String("examplelargeobject"),
		PartNumber: aws.Int64(1),
		UploadId:   aws.String("xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--"),
	}

	result, err := svc.UploadPart(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) UploadPartCopy

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.

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, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy

Example (Shared00)

To upload a part by copying byte range from an existing object as data source

The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.UploadPartCopyInput{
		Bucket:          aws.String("examplebucket"),
		CopySource:      aws.String("/bucketname/sourceobjectkey"),
		CopySourceRange: aws.String("bytes=1-100000"),
		Key:             aws.String("examplelargeobject"),
		PartNumber:      aws.Int64(2),
		UploadId:        aws.String("exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"),
	}

	result, err := svc.UploadPartCopy(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To upload a part by copying data from an existing object as data source

The following example uploads a part of a multipart upload by copying data from an existing object as data source.

package main

import (
	"fmt"

	"github.com/IBM/ibm-cos-sdk-go/aws"
	"github.com/IBM/ibm-cos-sdk-go/aws/awserr"
	"github.com/IBM/ibm-cos-sdk-go/aws/session"
	"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

func main() {
	svc := s3.New(session.Must(session.NewSession()))
	input := &s3.UploadPartCopyInput{
		Bucket:     aws.String("examplebucket"),
		CopySource: aws.String("/bucketname/sourceobjectkey"),
		Key:        aws.String("examplelargeobject"),
		PartNumber: aws.Int64(1),
		UploadId:   aws.String("exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"),
	}

	result, err := svc.UploadPartCopy(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*S3) UploadPartCopyRequest

func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput)

UploadPartCopyRequest generates a "aws/request.Request" representing the client's request for the UploadPartCopy operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UploadPartCopy for more information on using the UploadPartCopy API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UploadPartCopyRequest method.
req, resp := client.UploadPartCopyRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy

func (*S3) UploadPartCopyWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) UploadPartRequest

func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput)

UploadPartRequest generates a "aws/request.Request" representing the client's request for the UploadPart operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UploadPart for more information on using the UploadPart API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UploadPartRequest method.
req, resp := client.UploadPartRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart

func (*S3) UploadPartWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) WaitUntilBucketExists

func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error

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.

func (*S3) WaitUntilBucketExistsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) WaitUntilBucketNotExists

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.

func (*S3) WaitUntilBucketNotExistsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) WaitUntilObjectExists

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.

func (*S3) WaitUntilObjectExistsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

func (*S3) WaitUntilObjectNotExists

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.

func (*S3) WaitUntilObjectNotExistsWithContext

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 https://golang.ir/pkg/context/ for more information on using Contexts.

type TargetGrant

type TargetGrant struct {
	Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`

	// Logging permissions assigned to the Grantee for the bucket.
	Permission *string `type:"string" enum:"BucketLogsPermission"`
	// contains filtered or unexported fields
}

func (TargetGrant) GoString

func (s TargetGrant) GoString() string

GoString returns the string representation

func (*TargetGrant) SetGrantee

func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant

SetGrantee sets the Grantee field's value.

func (*TargetGrant) SetPermission

func (s *TargetGrant) SetPermission(v string) *TargetGrant

SetPermission sets the Permission field's value.

func (TargetGrant) String

func (s TargetGrant) String() string

String returns the string representation

func (*TargetGrant) Validate

func (s *TargetGrant) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Transition added in v1.2.0

type Transition struct {

	// Indicates at what date the object is to be moved or deleted. Should be in
	// GMT ISO 8601 Format.
	Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`

	// Indicates the lifetime, in days, of the objects that are subject to the rule.
	// The value must be a non-zero positive integer.
	Days *int64 `type:"integer"`

	// The class of storage used to store the object.
	StorageClass *string `type:"string" enum:"TransitionStorageClass"`
	// contains filtered or unexported fields
}

func (Transition) GoString added in v1.2.0

func (s Transition) GoString() string

GoString returns the string representation

func (*Transition) SetDate added in v1.2.0

func (s *Transition) SetDate(v time.Time) *Transition

SetDate sets the Date field's value.

func (*Transition) SetDays added in v1.2.0

func (s *Transition) SetDays(v int64) *Transition

SetDays sets the Days field's value.

func (*Transition) SetStorageClass added in v1.2.0

func (s *Transition) SetStorageClass(v string) *Transition

SetStorageClass sets the StorageClass field's value.

func (Transition) String added in v1.2.0

func (s Transition) String() string

String returns the string representation

type UploadPartCopyInput

type UploadPartCopyInput struct {

	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// The name of the source bucket and key name of the source object, separated
	// by a slash (/). Must be URL-encoded.
	//
	// CopySource is a required field
	CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`

	// Copies the object if its entity tag (ETag) matches the specified tag.
	CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`

	// Copies the object if it has been modified since the specified time.
	CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`

	// Copies the object if its entity tag (ETag) is different than the specified
	// ETag.
	CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`

	// Copies the object if it hasn't been modified since the specified time.
	CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`

	// The range of bytes to copy from the source object. The range value must use
	// the form bytes=first-last, where the first and last are the zero-based byte
	// offsets to copy. For example, bytes=0-9 indicates that you want to copy the
	// first ten bytes of the source. You can copy a range only if the source object
	// is greater than 5 MB.
	CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`

	// Specifies the algorithm to use when decrypting the source object (e.g., AES256).
	CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`

	// Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
	// the source object. The encryption key provided in this header must be one
	// that was used when the source object was created.
	CopySourceSSECustomerKey *string `` /* 135-byte string literal not displayed */

	// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
	// Amazon S3 uses this header for a message integrity check to ensure the encryption
	// key was transmitted without error.
	CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`

	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// Part number of part being copied. This is a positive integer between 1 and
	// 10,000.
	//
	// PartNumber is a required field
	PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// Specifies the algorithm to use to when encrypting the object (e.g., AES256).
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
	// data. This value is used to store the object and then it is discarded; Amazon
	// does not store the encryption key. The key must be appropriate for use with
	// the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
	// header. This must be the same encryption key specified in the initiate multipart
	// upload request.
	SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`

	// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
	// Amazon S3 uses this header for a message integrity check to ensure the encryption
	// key was transmitted without error.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// Upload ID identifying the multipart upload whose part is being copied.
	//
	// UploadId is a required field
	UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (UploadPartCopyInput) GoString

func (s UploadPartCopyInput) GoString() string

GoString returns the string representation

func (*UploadPartCopyInput) SetBucket

SetBucket sets the Bucket field's value.

func (*UploadPartCopyInput) SetCopySource

func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput

SetCopySource sets the CopySource field's value.

func (*UploadPartCopyInput) SetCopySourceIfMatch

func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput

SetCopySourceIfMatch sets the CopySourceIfMatch field's value.

func (*UploadPartCopyInput) SetCopySourceIfModifiedSince

func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput

SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.

func (*UploadPartCopyInput) SetCopySourceIfNoneMatch

func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput

SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.

func (*UploadPartCopyInput) SetCopySourceIfUnmodifiedSince

func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput

SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.

func (*UploadPartCopyInput) SetCopySourceRange

func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput

SetCopySourceRange sets the CopySourceRange field's value.

func (*UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm

func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput

SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.

func (*UploadPartCopyInput) SetCopySourceSSECustomerKey

func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput

SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.

func (*UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5

func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput

SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.

func (*UploadPartCopyInput) SetKey

SetKey sets the Key field's value.

func (*UploadPartCopyInput) SetPartNumber

func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput

SetPartNumber sets the PartNumber field's value.

func (*UploadPartCopyInput) SetRequestPayer

func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput

SetRequestPayer sets the RequestPayer field's value.

func (*UploadPartCopyInput) SetSSECustomerAlgorithm

func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*UploadPartCopyInput) SetSSECustomerKey

func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput

SetSSECustomerKey sets the SSECustomerKey field's value.

func (*UploadPartCopyInput) SetSSECustomerKeyMD5

func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*UploadPartCopyInput) SetUploadId

func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput

SetUploadId sets the UploadId field's value.

func (UploadPartCopyInput) String

func (s UploadPartCopyInput) String() string

String returns the string representation

func (*UploadPartCopyInput) Validate

func (s *UploadPartCopyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type UploadPartCopyOutput

type UploadPartCopyOutput struct {
	CopyPartResult *CopyPartResult `type:"structure"`

	// The version of the source object that was copied, if you have enabled versioning
	// on the source bucket.
	CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header confirming the encryption algorithm
	// used.
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header to provide round trip message integrity
	// verification of the customer-provided encryption key.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// If present, specifies the ID of the AWS Key Management Service (KMS) master
	// encryption key that was used for the object.
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
	// contains filtered or unexported fields
}

func (UploadPartCopyOutput) GoString

func (s UploadPartCopyOutput) GoString() string

GoString returns the string representation

func (*UploadPartCopyOutput) SetCopyPartResult

func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput

SetCopyPartResult sets the CopyPartResult field's value.

func (*UploadPartCopyOutput) SetCopySourceVersionId

func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput

SetCopySourceVersionId sets the CopySourceVersionId field's value.

func (*UploadPartCopyOutput) SetRequestCharged

func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput

SetRequestCharged sets the RequestCharged field's value.

func (*UploadPartCopyOutput) SetSSECustomerAlgorithm

func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*UploadPartCopyOutput) SetSSECustomerKeyMD5

func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*UploadPartCopyOutput) SetSSEKMSKeyId

func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*UploadPartCopyOutput) SetServerSideEncryption

func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (UploadPartCopyOutput) String

func (s UploadPartCopyOutput) String() string

String returns the string representation

type UploadPartInput

type UploadPartInput struct {

	// Object data.
	Body io.ReadSeeker `type:"blob"`

	// Name of the bucket to which the multipart upload was initiated.
	//
	// Bucket is a required field
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

	// Size of the body in bytes. This parameter is useful when the size of the
	// body cannot be determined automatically.
	ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`

	// The base64-encoded 128-bit MD5 digest of the part data.
	ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`

	// Object key for which the multipart upload was initiated.
	//
	// Key is a required field
	Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

	// Part number of part being uploaded. This is a positive integer between 1
	// and 10,000.
	//
	// PartNumber is a required field
	PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`

	// Confirms that the requester knows that she or he will be charged for the
	// request. Bucket owners need not specify this parameter in their requests.
	// Documentation on downloading objects from requester pays buckets can be found
	// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
	RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

	// Specifies the algorithm to use to when encrypting the object (e.g., AES256).
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
	// data. This value is used to store the object and then it is discarded; Amazon
	// does not store the encryption key. The key must be appropriate for use with
	// the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
	// header. This must be the same encryption key specified in the initiate multipart
	// upload request.
	SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`

	// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
	// Amazon S3 uses this header for a message integrity check to ensure the encryption
	// key was transmitted without error.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// Upload ID identifying the multipart upload whose part is being uploaded.
	//
	// UploadId is a required field
	UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (UploadPartInput) GoString

func (s UploadPartInput) GoString() string

GoString returns the string representation

func (*UploadPartInput) SetBody

SetBody sets the Body field's value.

func (*UploadPartInput) SetBucket

func (s *UploadPartInput) SetBucket(v string) *UploadPartInput

SetBucket sets the Bucket field's value.

func (*UploadPartInput) SetContentLength

func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput

SetContentLength sets the ContentLength field's value.

func (*UploadPartInput) SetContentMD5

func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput

SetContentMD5 sets the ContentMD5 field's value.

func (*UploadPartInput) SetKey

func (s *UploadPartInput) SetKey(v string) *UploadPartInput

SetKey sets the Key field's value.

func (*UploadPartInput) SetPartNumber

func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput

SetPartNumber sets the PartNumber field's value.

func (*UploadPartInput) SetRequestPayer

func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput

SetRequestPayer sets the RequestPayer field's value.

func (*UploadPartInput) SetSSECustomerAlgorithm

func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*UploadPartInput) SetSSECustomerKey

func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput

SetSSECustomerKey sets the SSECustomerKey field's value.

func (*UploadPartInput) SetSSECustomerKeyMD5

func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*UploadPartInput) SetUploadId

func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput

SetUploadId sets the UploadId field's value.

func (UploadPartInput) String

func (s UploadPartInput) String() string

String returns the string representation

func (*UploadPartInput) Validate

func (s *UploadPartInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type UploadPartOutput

type UploadPartOutput struct {

	// Entity tag for the uploaded object.
	ETag *string `location:"header" locationName:"ETag" type:"string"`

	// If present, indicates that the requester was successfully charged for the
	// request.
	RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header confirming the encryption algorithm
	// used.
	SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

	// If server-side encryption with a customer-provided encryption key was requested,
	// the response will include this header to provide round trip message integrity
	// verification of the customer-provided encryption key.
	SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

	// If present, specifies the ID of the AWS Key Management Service (KMS) master
	// encryption key that was used for the object.
	SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`

	// The Server-side encryption algorithm used when storing this object in S3
	// (e.g., AES256, aws:kms).
	ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
	// contains filtered or unexported fields
}

func (UploadPartOutput) GoString

func (s UploadPartOutput) GoString() string

GoString returns the string representation

func (*UploadPartOutput) SetETag

func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput

SetETag sets the ETag field's value.

func (*UploadPartOutput) SetRequestCharged

func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput

SetRequestCharged sets the RequestCharged field's value.

func (*UploadPartOutput) SetSSECustomerAlgorithm

func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.

func (*UploadPartOutput) SetSSECustomerKeyMD5

func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.

func (*UploadPartOutput) SetSSEKMSKeyId

func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput

SetSSEKMSKeyId sets the SSEKMSKeyId field's value.

func (*UploadPartOutput) SetServerSideEncryption

func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput

SetServerSideEncryption sets the ServerSideEncryption field's value.

func (UploadPartOutput) String

func (s UploadPartOutput) String() string

String returns the string representation

Directories

Path Synopsis
internal
arn
Package s3crypto provides encryption to S3 using KMS and AES GCM.
Package s3crypto provides encryption to S3 using KMS and AES GCM.
Package s3iface provides an interface to enable mocking the Amazon Simple Storage Service service client for testing your code.
Package s3iface provides an interface to enable mocking the Amazon Simple Storage Service service client for testing your code.
Package s3manager provides utilities to upload and download objects from S3 concurrently.
Package s3manager provides utilities to upload and download objects from S3 concurrently.
s3manageriface
Package s3manageriface provides an interface for the s3manager package
Package s3manageriface provides an interface for the s3manager package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL