diff --git a/.changelog/51dc2b2349b545baa70246b6e1d54dd9.json b/.changelog/51dc2b2349b545baa70246b6e1d54dd9.json new file mode 100644 index 00000000000..560eca3f957 --- /dev/null +++ b/.changelog/51dc2b2349b545baa70246b6e1d54dd9.json @@ -0,0 +1,9 @@ +{ + "id": "51dc2b23-49b5-45ba-a702-46b6e1d54dd9", + "type": "feature", + "description": "Add S3Express support.", + "modules": [ + "feature/s3/manager", + "service/s3" + ] +} diff --git a/Makefile b/Makefile index ed45b15d337..f41ab33c0e5 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ LINT_IGNORE_S3MANAGER_INPUT='feature/s3/manager/upload.go:.+struct field SSEKMSK # Names of these are tied to endpoint rules and they're internal so ignore them LINT_IGNORE_AWSRULESFN_ARN='internal/endpoints/awsrulesfn/arn.go' LINT_IGNORE_AWSRULESFN_PARTITION='internal/endpoints/awsrulesfn/partition.go' +LINT_IGNORE_PRIVATE_METRICS='aws/middleware/private/metrics' UNIT_TEST_TAGS= BUILD_TAGS=-tags "example,codegen,integration,ec2env,perftest" @@ -472,7 +473,8 @@ lint: -e ${LINT_IGNORE_S3MANAGER_INPUT} \ -e ${LINTIGNORESINGLEFIGHT} \ -e ${LINT_IGNORE_AWSRULESFN_ARN} \ - -e ${LINT_IGNORE_AWSRULESFN_PARTITION}`; \ + -e ${LINT_IGNORE_AWSRULESFN_PARTITION} \ + -e ${LINT_IGNORE_PRIVATE_METRICS}`; \ echo "$$dolint"; \ if [ "$$dolint" != "" ]; then exit 1; fi diff --git a/aws/middleware/private/metrics/emf/emf.go b/aws/middleware/private/metrics/emf/emf.go new file mode 100644 index 00000000000..c9516f3753a --- /dev/null +++ b/aws/middleware/private/metrics/emf/emf.go @@ -0,0 +1,90 @@ +// Package emf implements an EMF metrics publisher. +// +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. +package emf + +import ( + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" +) + +const ( + emfIdentifier = "_aws" + timestampKey = "Timestamp" + cloudWatchMetricsKey = "CloudWatchMetrics" + namespaceKey = "Namespace" + dimensionsKey = "Dimensions" + metricsKey = "Metrics" +) + +// Entry represents a log entry in the EMF format. +type Entry struct { + namespace string + serializer metrics.Serializer + metrics []metric + dimensions [][]string + fields map[string]interface{} +} + +type metric struct { + Name string +} + +// NewEntry creates a new Entry with the specified namespace and serializer. +func NewEntry(namespace string, serializer metrics.Serializer) Entry { + return Entry{ + namespace: namespace, + serializer: serializer, + metrics: []metric{}, + dimensions: [][]string{{}}, + fields: map[string]interface{}{}, + } +} + +// Build constructs the EMF log entry as a JSON string. +func (e *Entry) Build() (string, error) { + + entry := map[string]interface{}{} + + entry[emfIdentifier] = map[string]interface{}{ + timestampKey: sdk.NowTime().UnixNano() / 1e6, + cloudWatchMetricsKey: []map[string]interface{}{ + { + namespaceKey: e.namespace, + dimensionsKey: e.dimensions, + metricsKey: e.metrics, + }, + }, + } + + for k, v := range e.fields { + entry[k] = v + } + + jsonEntry, err := e.serializer.Serialize(entry) + if err != nil { + return "", err + } + return jsonEntry, nil +} + +// AddDimension adds a CW Dimension to the EMF entry. +func (e *Entry) AddDimension(key string, value string) { + // Dimensions are a list of lists. We only support a single list. + e.dimensions[0] = append(e.dimensions[0], key) + e.fields[key] = value +} + +// AddMetric adds a CW Metric to the EMF entry. +func (e *Entry) AddMetric(key string, value float64) { + e.metrics = append(e.metrics, metric{key}) + e.fields[key] = value +} + +// AddProperty adds a CW Property to the EMF entry. +// Properties are not published as metrics, but they are available in logs and in CW insights. +func (e *Entry) AddProperty(key string, value interface{}) { + e.fields[key] = value +} diff --git a/aws/middleware/private/metrics/emf/emf_test.go b/aws/middleware/private/metrics/emf/emf_test.go new file mode 100644 index 00000000000..00deaada5d8 --- /dev/null +++ b/aws/middleware/private/metrics/emf/emf_test.go @@ -0,0 +1,145 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package emf + +import ( + "fmt" + "reflect" + "testing" + "time" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" +) + +type TestSerializerWithError struct{} + +func (TestSerializerWithError) Serialize(obj interface{}) (string, error) { + return "", fmt.Errorf("serialization error") +} + +func TestCreateNewEntry(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + cases := map[string]struct { + Namespace string + ExpectedEntry Entry + }{ + "success": { + Namespace: "testNamespace", + ExpectedEntry: Entry{ + namespace: "testNamespace", + serializer: metrics.DefaultSerializer{}, + metrics: []metric{}, + dimensions: [][]string{{}}, + fields: map[string]interface{}{}, + }, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + actualEntry := NewEntry(c.Namespace, metrics.DefaultSerializer{}) + if !reflect.DeepEqual(actualEntry, c.ExpectedEntry) { + t.Errorf("Entry contained unexpected values") + } + }) + } +} + +func TestBuild(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + cases := map[string]struct { + Namespace string + Configure func(entry *Entry) + Serializer metrics.Serializer + ExpectedError error + ExpectedResult string + }{ + "completeEntry": { + Namespace: "testNamespace", + Serializer: metrics.DefaultSerializer{}, + Configure: func(entry *Entry) { + entry.AddMetric("testMetric1", 1) + entry.AddMetric("testMetric2", 2) + entry.AddDimension("testDimension1", "dim1") + entry.AddDimension("testDimension2", "dim2") + entry.AddProperty("testProperty1", "prop1") + entry.AddProperty("testProperty2", "prop2") + }, + ExpectedError: nil, + ExpectedResult: completeEntry, + }, + "noMetrics": { + Namespace: "testNamespace", + Serializer: metrics.DefaultSerializer{}, + Configure: func(entry *Entry) { + entry.AddDimension("testDimension1", "dim1") + entry.AddDimension("testDimension2", "dim2") + entry.AddProperty("testProperty1", "prop1") + entry.AddProperty("testProperty2", "prop2") + }, + ExpectedError: nil, + ExpectedResult: noMetrics, + }, + "noDimensions": { + Namespace: "testNamespace", + Serializer: metrics.DefaultSerializer{}, + Configure: func(entry *Entry) { + entry.AddMetric("testMetric1", 1) + entry.AddMetric("testMetric2", 2) + entry.AddProperty("testProperty1", "prop1") + entry.AddProperty("testProperty2", "prop2") + }, + ExpectedError: nil, + ExpectedResult: noDimensions, + }, + "noProperties": { + Namespace: "testNamespace", + Serializer: metrics.DefaultSerializer{}, + Configure: func(entry *Entry) { + entry.AddMetric("testMetric1", 1) + entry.AddMetric("testMetric2", 2) + entry.AddDimension("testDimension1", "dim1") + entry.AddDimension("testDimension2", "dim2") + }, + ExpectedError: nil, + ExpectedResult: noProperties, + }, + "serializationError": { + Namespace: "testNamespace", + Serializer: TestSerializerWithError{}, + Configure: func(entry *Entry) { + }, + ExpectedError: fmt.Errorf("serialization error"), + ExpectedResult: "", + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + entry := NewEntry(c.Namespace, c.Serializer) + + c.Configure(&entry) + + result, err := entry.Build() + + if !reflect.DeepEqual(err, c.ExpectedError) { + t.Errorf("Unexpected error, should be '%s' but was '%s'", c.ExpectedError, err) + } + + if !reflect.DeepEqual(result, c.ExpectedResult) { + t.Errorf("Unexpected result, should be '%s' but was '%s'", c.ExpectedResult, result) + } + }) + } +} diff --git a/aws/middleware/private/metrics/emf/emf_test_data.go b/aws/middleware/private/metrics/emf/emf_test_data.go new file mode 100644 index 00000000000..47102e014fd --- /dev/null +++ b/aws/middleware/private/metrics/emf/emf_test_data.go @@ -0,0 +1,104 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package emf + +import "strings" + +func stripString(str string) string { + str = strings.Replace(str, " ", "", -1) + str = strings.Replace(str, "\t", "", -1) + str = strings.Replace(str, "\n", "", -1) + return str +} + +var completeEntry = stripString(` +{ + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + ["testDimension1", "testDimension2"] + ], + "Metrics": [{ + "Name": "testMetric1" + }, { + "Name": "testMetric2" + }], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + }, + "testDimension1": "dim1", + "testDimension2": "dim2", + "testMetric1": 1, + "testMetric2": 2, + "testProperty1": "prop1", + "testProperty2": "prop2" +} +`) + +var noMetrics = stripString(` +{ + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + ["testDimension1", "testDimension2"] + ], + "Metrics": [], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + }, + "testDimension1": "dim1", + "testDimension2": "dim2", + "testProperty1": "prop1", + "testProperty2": "prop2" +} +`) + +var noProperties = stripString(` +{ + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + ["testDimension1", "testDimension2"] + ], + "Metrics": [{ + "Name": "testMetric1" + }, { + "Name": "testMetric2" + }], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + }, + "testDimension1": "dim1", + "testDimension2": "dim2", + "testMetric1": 1, + "testMetric2": 2 +} +`) + +var noDimensions = stripString(` +{ + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + [] + ], + "Metrics": [{ + "Name": "testMetric1" + }, { + "Name": "testMetric2" + }], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + }, + "testMetric1": 1, + "testMetric2": 2, + "testProperty1": "prop1", + "testProperty2": "prop2" +} +`) diff --git a/aws/middleware/private/metrics/metrics.go b/aws/middleware/private/metrics/metrics.go new file mode 100644 index 00000000000..b0133f4c88d --- /dev/null +++ b/aws/middleware/private/metrics/metrics.go @@ -0,0 +1,319 @@ +// Package metrics implements metrics gathering for SDK development purposes. +// +// This package is designated as private and is intended for use only by the +// AWS client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. +package metrics + +import ( + "context" + "encoding/json" + "fmt" + "sync" + "time" + + "github.com/aws/smithy-go/middleware" +) + +const ( + // ServiceIDKey is the key for the service ID metric. + ServiceIDKey = "ServiceId" + // OperationNameKey is the key for the operation name metric. + OperationNameKey = "OperationName" + // ClientRequestIDKey is the key for the client request ID metric. + ClientRequestIDKey = "ClientRequestId" + // APICallDurationKey is the key for the API call duration metric. + APICallDurationKey = "ApiCallDuration" + // APICallSuccessfulKey is the key for the API call successful metric. + APICallSuccessfulKey = "ApiCallSuccessful" + // MarshallingDurationKey is the key for the marshalling duration metric. + MarshallingDurationKey = "MarshallingDuration" + // InThroughputKey is the key for the input throughput metric. + InThroughputKey = "InThroughput" + // OutThroughputKey is the key for the output throughput metric. + OutThroughputKey = "OutThroughput" + // RetryCountKey is the key for the retry count metric. + RetryCountKey = "RetryCount" + // HTTPStatusCodeKey is the key for the HTTP status code metric. + HTTPStatusCodeKey = "HttpStatusCode" + // AWSExtendedRequestIDKey is the key for the AWS extended request ID metric. + AWSExtendedRequestIDKey = "AwsExtendedRequestId" + // AWSRequestIDKey is the key for the AWS request ID metric. + AWSRequestIDKey = "AwsRequestId" + // BackoffDelayDurationKey is the key for the backoff delay duration metric. + BackoffDelayDurationKey = "BackoffDelayDuration" + // StreamThroughputKey is the key for the stream throughput metric. + StreamThroughputKey = "Throughput" + // ConcurrencyAcquireDurationKey is the key for the concurrency acquire duration metric. + ConcurrencyAcquireDurationKey = "ConcurrencyAcquireDuration" + // PendingConcurrencyAcquiresKey is the key for the pending concurrency acquires metric. + PendingConcurrencyAcquiresKey = "PendingConcurrencyAcquires" + // SigningDurationKey is the key for the signing duration metric. + SigningDurationKey = "SigningDuration" + // UnmarshallingDurationKey is the key for the unmarshalling duration metric. + UnmarshallingDurationKey = "UnmarshallingDuration" + // TimeToFirstByteKey is the key for the time to first byte metric. + TimeToFirstByteKey = "TimeToFirstByte" + // ServiceCallDurationKey is the key for the service call duration metric. + ServiceCallDurationKey = "ServiceCallDuration" + // EndpointResolutionDurationKey is the key for the endpoint resolution duration metric. + EndpointResolutionDurationKey = "EndpointResolutionDuration" + // AttemptNumberKey is the key for the attempt number metric. + AttemptNumberKey = "AttemptNumber" + // MaxConcurrencyKey is the key for the max concurrency metric. + MaxConcurrencyKey = "MaxConcurrency" + // AvailableConcurrencyKey is the key for the available concurrency metric. + AvailableConcurrencyKey = "AvailableConcurrency" +) + +// MetricPublisher provides the interface to provide custom MetricPublishers. +// PostRequestMetrics will be invoked by the MetricCollection middleware to post request. +// PostStreamMetrics will be invoked by ReadCloserWithMetrics to post stream metrics. +type MetricPublisher interface { + PostRequestMetrics(*MetricData) error + PostStreamMetrics(*MetricData) error +} + +// Serializer provides the interface to provide custom Serializers. +// Serialize will transform any input object in its corresponding string representation. +type Serializer interface { + Serialize(obj interface{}) (string, error) +} + +// DefaultSerializer is an implementation of the Serializer interface. +type DefaultSerializer struct{} + +// Serialize uses the default JSON serializer to obtain the string representation of an object. +func (DefaultSerializer) Serialize(obj interface{}) (string, error) { + bytes, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(bytes), nil +} + +type metricContextKey struct{} + +// MetricContext contains fields to store metric-related information. +type MetricContext struct { + connectionCounter *SharedConnectionCounter + publisher MetricPublisher + data *MetricData +} + +// MetricData stores the collected metric data. +type MetricData struct { + RequestStartTime time.Time + RequestEndTime time.Time + APICallDuration time.Duration + SerializeStartTime time.Time + SerializeEndTime time.Time + MarshallingDuration time.Duration + ResolveEndpointStartTime time.Time + ResolveEndpointEndTime time.Time + EndpointResolutionDuration time.Duration + InThroughput float64 + OutThroughput float64 + RetryCount int + Success uint8 + StatusCode int + ClientRequestID string + ServiceID string + OperationName string + PartitionID string + Region string + RequestContentLength int64 + Stream StreamMetrics + Attempts []AttemptMetrics +} + +// StreamMetrics stores metrics related to streaming data. +type StreamMetrics struct { + ReadDuration time.Duration + ReadBytes int64 + Throughput float64 +} + +// AttemptMetrics stores metrics related to individual attempts. +type AttemptMetrics struct { + ServiceCallStart time.Time + ServiceCallEnd time.Time + ServiceCallDuration time.Duration + FirstByteTime time.Time + TimeToFirstByte time.Duration + ConnRequestedTime time.Time + ConnObtainedTime time.Time + ConcurrencyAcquireDuration time.Duration + CredentialFetchStartTime time.Time + CredentialFetchEndTime time.Time + SignStartTime time.Time + SignEndTime time.Time + SigningDuration time.Duration + DeserializeStartTime time.Time + DeserializeEndTime time.Time + UnMarshallingDuration time.Duration + RetryDelay time.Duration + ResponseContentLength int64 + StatusCode int + RequestID string + ExtendedRequestID string + HTTPClient string + MaxConcurrency int + PendingConnectionAcquires int + AvailableConcurrency int + ActiveRequests int + ReusedConnection bool +} + +// Data returns the MetricData associated with the MetricContext. +func (mc *MetricContext) Data() *MetricData { + return mc.data +} + +// ConnectionCounter returns the SharedConnectionCounter associated with the MetricContext. +func (mc *MetricContext) ConnectionCounter() *SharedConnectionCounter { + return mc.connectionCounter +} + +// Publisher returns the MetricPublisher associated with the MetricContext. +func (mc *MetricContext) Publisher() MetricPublisher { + return mc.publisher +} + +// ComputeRequestMetrics calculates and populates derived metrics based on the collected data. +func (md *MetricData) ComputeRequestMetrics() { + + for idx := range md.Attempts { + attempt := &md.Attempts[idx] + attempt.ConcurrencyAcquireDuration = attempt.ConnObtainedTime.Sub(attempt.ConnRequestedTime) + attempt.SigningDuration = attempt.SignEndTime.Sub(attempt.SignStartTime) + attempt.UnMarshallingDuration = attempt.DeserializeEndTime.Sub(attempt.DeserializeStartTime) + attempt.TimeToFirstByte = attempt.FirstByteTime.Sub(attempt.ServiceCallStart) + attempt.ServiceCallDuration = attempt.ServiceCallEnd.Sub(attempt.ServiceCallStart) + } + + md.APICallDuration = md.RequestEndTime.Sub(md.RequestStartTime) + md.MarshallingDuration = md.SerializeEndTime.Sub(md.SerializeStartTime) + md.EndpointResolutionDuration = md.ResolveEndpointEndTime.Sub(md.ResolveEndpointStartTime) + + md.RetryCount = len(md.Attempts) - 1 + + latestAttempt, err := md.LatestAttempt() + + if err != nil { + fmt.Printf("error retrieving attempts data due to: %s. Skipping Throughput metrics", err.Error()) + } else { + + md.StatusCode = latestAttempt.StatusCode + + if md.Success == 1 { + if latestAttempt.ResponseContentLength > 0 && latestAttempt.ServiceCallDuration > 0 { + md.InThroughput = float64(latestAttempt.ResponseContentLength) / latestAttempt.ServiceCallDuration.Seconds() + } + if md.RequestContentLength > 0 && latestAttempt.ServiceCallDuration > 0 { + md.OutThroughput = float64(md.RequestContentLength) / latestAttempt.ServiceCallDuration.Seconds() + } + } + } +} + +// LatestAttempt returns the latest attempt metrics. +// It returns an error if no attempts are initialized. +func (md *MetricData) LatestAttempt() (*AttemptMetrics, error) { + if md.Attempts == nil || len(md.Attempts) == 0 { + return nil, fmt.Errorf("no attempts initialized. NewAttempt() should be called first") + } + return &md.Attempts[len(md.Attempts)-1], nil +} + +// NewAttempt initializes new attempt metrics. +func (md *MetricData) NewAttempt() { + if md.Attempts == nil { + md.Attempts = []AttemptMetrics{} + } + md.Attempts = append(md.Attempts, AttemptMetrics{}) +} + +// SharedConnectionCounter is a counter shared across API calls. +type SharedConnectionCounter struct { + mu sync.Mutex + + activeRequests int + pendingConnectionAcquire int +} + +// ActiveRequests returns the count of active requests. +func (cc *SharedConnectionCounter) ActiveRequests() int { + cc.mu.Lock() + defer cc.mu.Unlock() + + return cc.activeRequests +} + +// PendingConnectionAcquire returns the count of pending connection acquires. +func (cc *SharedConnectionCounter) PendingConnectionAcquire() int { + cc.mu.Lock() + defer cc.mu.Unlock() + + return cc.pendingConnectionAcquire +} + +// AddActiveRequest increments the count of active requests. +func (cc *SharedConnectionCounter) AddActiveRequest() { + cc.mu.Lock() + defer cc.mu.Unlock() + + cc.activeRequests++ +} + +// RemoveActiveRequest decrements the count of active requests. +func (cc *SharedConnectionCounter) RemoveActiveRequest() { + cc.mu.Lock() + defer cc.mu.Unlock() + + cc.activeRequests-- +} + +// AddPendingConnectionAcquire increments the count of pending connection acquires. +func (cc *SharedConnectionCounter) AddPendingConnectionAcquire() { + cc.mu.Lock() + defer cc.mu.Unlock() + + cc.pendingConnectionAcquire++ +} + +// RemovePendingConnectionAcquire decrements the count of pending connection acquires. +func (cc *SharedConnectionCounter) RemovePendingConnectionAcquire() { + cc.mu.Lock() + defer cc.mu.Unlock() + + cc.pendingConnectionAcquire-- +} + +// InitMetricContext initializes the metric context with the provided counter and publisher. +// It returns the updated context. +func InitMetricContext( + ctx context.Context, counter *SharedConnectionCounter, publisher MetricPublisher, +) context.Context { + if middleware.GetStackValue(ctx, metricContextKey{}) == nil { + ctx = middleware.WithStackValue(ctx, metricContextKey{}, &MetricContext{ + connectionCounter: counter, + publisher: publisher, + data: &MetricData{ + Attempts: []AttemptMetrics{}, + Stream: StreamMetrics{}, + }, + }) + } + return ctx +} + +// Context returns the metric context from the given context. +// It returns nil if the metric context is not found. +func Context(ctx context.Context) *MetricContext { + mctx := middleware.GetStackValue(ctx, metricContextKey{}) + if mctx == nil { + return nil + } + return mctx.(*MetricContext) +} diff --git a/aws/middleware/private/metrics/metrics_test.go b/aws/middleware/private/metrics/metrics_test.go new file mode 100644 index 00000000000..c8ab1418e58 --- /dev/null +++ b/aws/middleware/private/metrics/metrics_test.go @@ -0,0 +1,218 @@ +// This package is designated as private and is intended for use only by the +// AWS client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package metrics + +import ( + "context" + "testing" + "time" +) + +type TestPublisher struct{} + +func (tp *TestPublisher) PostRequestMetrics(data *MetricData) error { + return nil +} + +func (tp *TestPublisher) PostStreamMetrics(data *MetricData) error { + return nil +} + +func TestInitAndRetrieveMetricContext(t *testing.T) { + ctx := context.Background() + cc := SharedConnectionCounter{} + tp := TestPublisher{} + + ctx = InitMetricContext(ctx, &cc, &tp) + mctx := Context(ctx) + + if mctx == nil { + t.Errorf("Metric context should not be nil") + } + if mctx.publisher != &tp || mctx.Publisher() != &tp { + t.Errorf("Unexpected publisher") + } + if mctx.connectionCounter != &cc || mctx.ConnectionCounter() != &cc { + t.Errorf("Unexpected connection counter") + } +} + +func TestConnectionCounter(t *testing.T) { + cc := SharedConnectionCounter{} + cc.AddPendingConnectionAcquire() + cc.AddPendingConnectionAcquire() + cc.RemovePendingConnectionAcquire() + cc.AddActiveRequest() + cc.AddActiveRequest() + cc.AddActiveRequest() + cc.RemoveActiveRequest() + + if cc.PendingConnectionAcquire() != 1 { + t.Errorf("Unexpected count for PendingConnectionAcquire") + } + + if cc.ActiveRequests() != 2 { + t.Errorf("Unexpected count for ActiveRequests") + } +} + +func TestAttemptCreationAndRetrieval(t *testing.T) { + ctx := context.TODO() + cc := SharedConnectionCounter{} + tp := TestPublisher{} + + ctx = InitMetricContext(ctx, &cc, &tp) + + mctx := Context(ctx) + + _, err := mctx.Data().LatestAttempt() + + if err == nil { + t.Errorf("Expected error for uninitialized attempt") + } + + mctx.Data().NewAttempt() + + if len(mctx.Data().Attempts) != 1 { + t.Errorf("Unexpected number of attempts") + } + + _, err = mctx.Data().LatestAttempt() + + if err != nil { + t.Errorf("Unexpected error for uninitialized attempt") + } +} + +func TestMetricData_ComputeRequestMetrics(t *testing.T) { + + data := MetricData{ + RequestStartTime: time.Unix(1234, 0), + RequestEndTime: time.Unix(1434, 0), + SerializeStartTime: time.Unix(1234, 0), + SerializeEndTime: time.Unix(1434, 0), + ResolveEndpointStartTime: time.Unix(1234, 0), + ResolveEndpointEndTime: time.Unix(1434, 0), + Success: 1, + ClientRequestID: "crid", + ServiceID: "sid", + OperationName: "operationname", + PartitionID: "partitionid", + Region: "region", + RequestContentLength: 100, + Stream: StreamMetrics{}, + Attempts: []AttemptMetrics{{ + ServiceCallStart: time.Unix(1234, 0), + ServiceCallEnd: time.Unix(1434, 0), + FirstByteTime: time.Unix(1334, 0), + ConnRequestedTime: time.Unix(1234, 0), + ConnObtainedTime: time.Unix(1434, 0), + CredentialFetchStartTime: time.Unix(1234, 0), + CredentialFetchEndTime: time.Unix(1434, 0), + SignStartTime: time.Unix(1234, 0), + SignEndTime: time.Unix(1434, 0), + DeserializeStartTime: time.Unix(1234, 0), + DeserializeEndTime: time.Unix(1434, 0), + RetryDelay: 100, + ResponseContentLength: 100, + StatusCode: 200, + RequestID: "reqid", + ExtendedRequestID: "exreqid", + HTTPClient: "Default", + MaxConcurrency: 10, + PendingConnectionAcquires: 1, + AvailableConcurrency: 2, + ActiveRequests: 3, + ReusedConnection: false, + }, + { + ServiceCallStart: time.Unix(1234, 0), + ServiceCallEnd: time.Unix(1434, 0), + FirstByteTime: time.Unix(1334, 0), + ConnRequestedTime: time.Unix(1234, 0), + ConnObtainedTime: time.Unix(1434, 0), + CredentialFetchStartTime: time.Unix(1234, 0), + CredentialFetchEndTime: time.Unix(1434, 0), + SignStartTime: time.Unix(1234, 0), + SignEndTime: time.Unix(1434, 0), + DeserializeStartTime: time.Unix(1234, 0), + DeserializeEndTime: time.Unix(1434, 0), + RetryDelay: 100, + ResponseContentLength: 100, + StatusCode: 200, + RequestID: "reqid", + ExtendedRequestID: "exreqid", + HTTPClient: "Default", + MaxConcurrency: 10, + PendingConnectionAcquires: 1, + AvailableConcurrency: 2, + ActiveRequests: 3, + ReusedConnection: false, + }}, + } + + data.ComputeRequestMetrics() + + expectedAPICallDuration := time.Second * 200 + actualAPICallDuration := data.APICallDuration + + if expectedAPICallDuration != actualAPICallDuration { + t.Errorf("Unexpected ApiCallDuration, should be '%s' but was '%s'", expectedAPICallDuration, actualAPICallDuration) + } + + expectedMarshallingDuration := time.Second * 200 + actualMarshallingDuration := data.MarshallingDuration + + if expectedMarshallingDuration != actualMarshallingDuration { + t.Errorf("Unexpected MarshallingDuration, should be '%s' but was '%s'", expectedMarshallingDuration, actualMarshallingDuration) + } + + expectedEndpointResolutionDuration := time.Second * 200 + actualEndpointResolutionDuration := data.EndpointResolutionDuration + + if expectedEndpointResolutionDuration != actualEndpointResolutionDuration { + t.Errorf("Unexpected EndpointResolutionDuration, should be '%s' but was '%s'", expectedEndpointResolutionDuration, actualEndpointResolutionDuration) + } + + for idx := range data.Attempts { + + attempt := data.Attempts[idx] + + expectedServiceCallDuration := time.Second * 200 + actualServiceCallDuration := attempt.ServiceCallDuration + + if expectedServiceCallDuration != actualServiceCallDuration { + t.Errorf("Unexpected ServiceCallDuration, should be '%s' but was '%s'", expectedServiceCallDuration, actualServiceCallDuration) + } + + expectedTimeToFirstByte := time.Second * 100 + actualTimeToFirstByte := attempt.TimeToFirstByte + + if expectedTimeToFirstByte != actualTimeToFirstByte { + t.Errorf("Unexpected TimeToFirstByte, should be '%s' but was '%s'", expectedTimeToFirstByte, actualTimeToFirstByte) + } + + expectedConcurrencyAcquireDuration := time.Second * 200 + actualConcurrencyAcquireDuration := attempt.ConcurrencyAcquireDuration + + if expectedConcurrencyAcquireDuration != actualConcurrencyAcquireDuration { + t.Errorf("Unexpected ConcurrencyAcquireDuration, should be '%s' but was '%s'", expectedConcurrencyAcquireDuration, actualConcurrencyAcquireDuration) + } + + expectedSigningDuration := time.Second * 200 + actualSigningDuration := attempt.SigningDuration + + if expectedSigningDuration != actualSigningDuration { + t.Errorf("Unexpected SigningDuration, should be '%s' but was '%s'", expectedSigningDuration, actualSigningDuration) + } + + expectedUnMarshallingDuration := time.Second * 200 + actualUnMarshallingDuration := attempt.UnMarshallingDuration + + if expectedUnMarshallingDuration != actualUnMarshallingDuration { + t.Errorf("Unexpected UnMarshallingDuration, should be '%s' but was '%s'", expectedUnMarshallingDuration, actualUnMarshallingDuration) + } + } +} diff --git a/aws/middleware/private/metrics/middleware/configuration.go b/aws/middleware/private/metrics/middleware/configuration.go new file mode 100644 index 00000000000..2bfe2543aa6 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/configuration.go @@ -0,0 +1,52 @@ +package middleware + +import ( + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/smithy-go/middleware" + "net/http" +) + +func WithMetricMiddlewares( + publisher metrics.MetricPublisher, client *http.Client, +) func(stack *middleware.Stack) error { + connectionCounter := &metrics.SharedConnectionCounter{} + return func(stack *middleware.Stack) error { + if err := stack.Initialize.Add(GetSetupMetricCollectionMiddleware(connectionCounter, publisher), middleware.Before); err != nil { + return err + } + if err := stack.Serialize.Add(GetRecordStackSerializeStartMiddleware(), middleware.Before); err != nil { + return err + } + if err := stack.Serialize.Add(GetRecordStackSerializeEndMiddleware(), middleware.After); err != nil { + return err + } + if err := stack.Serialize.Insert(GetRecordEndpointResolutionStartMiddleware(), "ResolveEndpoint", middleware.Before); err != nil { + return err + } + if err := stack.Serialize.Insert(GetRecordEndpointResolutionEndMiddleware(), "ResolveEndpoint", middleware.After); err != nil { + return err + } + if err := stack.Build.Add(GetWrapDataStreamMiddleware(), middleware.After); err != nil { + return err + } + if err := stack.Finalize.Add(GetRegisterRequestMetricContextMiddleware(), middleware.Before); err != nil { + return err + } + if err := stack.Finalize.Insert(GetRegisterAttemptMetricContextMiddleware(), "Retry", middleware.After); err != nil { + return err + } + if err := stack.Finalize.Add(GetHttpMetricMiddleware(client), middleware.After); err != nil { + return err + } + if err := stack.Deserialize.Add(GetRecordStackDeserializeStartMiddleware(), middleware.After); err != nil { + return err + } + if err := stack.Deserialize.Add(GetRecordStackDeserializeEndMiddleware(), middleware.Before); err != nil { + return err + } + if err := stack.Deserialize.Insert(GetTransportMetricsMiddleware(), "StackDeserializeStart", middleware.After); err != nil { + return err + } + return nil + } +} diff --git a/aws/middleware/private/metrics/middleware/endpoint_resolution_end.go b/aws/middleware/private/metrics/middleware/endpoint_resolution_end.go new file mode 100644 index 00000000000..83c1867cfc2 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/endpoint_resolution_end.go @@ -0,0 +1,36 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +type EndpointResolutionEnd struct{} + +func GetRecordEndpointResolutionEndMiddleware() *EndpointResolutionEnd { + return &EndpointResolutionEnd{} +} + +func (m *EndpointResolutionEnd) ID() string { + return "EndpointResolutionEnd" +} + +func (m *EndpointResolutionEnd) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + + mctx := metrics.Context(ctx) + mctx.Data().ResolveEndpointEndTime = sdk.NowTime() + + out, metadata, err = next.HandleSerialize(ctx, in) + + return out, metadata, err +} diff --git a/aws/middleware/private/metrics/middleware/endpoint_resolution_end_test.go b/aws/middleware/private/metrics/middleware/endpoint_resolution_end_test.go new file mode 100644 index 00000000000..6a82b5eda3f --- /dev/null +++ b/aws/middleware/private/metrics/middleware/endpoint_resolution_end_test.go @@ -0,0 +1,32 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" + "testing" + "time" +) + +func TestEndpointResolutionEnd_HandleSerialize(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + ctx := metrics.InitMetricContext(context.TODO(), &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + mw := GetRecordEndpointResolutionEndMiddleware() + _, _, _ = mw.HandleSerialize(ctx, middleware.SerializeInput{}, testutils.NoopSerializeHandler{}) + + actualTime := metrics.Context(ctx).Data().ResolveEndpointEndTime + expectedTime := sdk.NowTime() + if actualTime != expectedTime { + t.Errorf("Unexpected ResolveEndpointEndTime, should be '%s' but was '%s'", expectedTime, actualTime) + } +} diff --git a/aws/middleware/private/metrics/middleware/endpoint_resolution_start.go b/aws/middleware/private/metrics/middleware/endpoint_resolution_start.go new file mode 100644 index 00000000000..54c3edf4fb3 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/endpoint_resolution_start.go @@ -0,0 +1,36 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +type EndpointResolutionStart struct{} + +func GetRecordEndpointResolutionStartMiddleware() *EndpointResolutionStart { + return &EndpointResolutionStart{} +} + +func (m *EndpointResolutionStart) ID() string { + return "EndpointResolutionStart" +} + +func (m *EndpointResolutionStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + + mctx := metrics.Context(ctx) + mctx.Data().ResolveEndpointStartTime = sdk.NowTime() + + out, metadata, err = next.HandleSerialize(ctx, in) + + return out, metadata, err +} diff --git a/aws/middleware/private/metrics/middleware/endpoint_resolution_start_test.go b/aws/middleware/private/metrics/middleware/endpoint_resolution_start_test.go new file mode 100644 index 00000000000..5867825c0b3 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/endpoint_resolution_start_test.go @@ -0,0 +1,51 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" + "testing" + "time" +) + +func TestEndpointResolutionStart_HandleSerialize_Success(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + mw := GetRecordEndpointResolutionStartMiddleware() + _, _, _ = mw.HandleSerialize(ctx, middleware.SerializeInput{}, testutils.NoopSerializeHandler{}) + + actualTime := metrics.Context(ctx).Data().ResolveEndpointStartTime + expectedTime := sdk.NowTime() + if actualTime != expectedTime { + t.Errorf("Unexpected ResolveEndpointStartTime, should be '%s' but was '%s'", expectedTime, actualTime) + } +} + +func TestEndpointResolutionStart_HandleSerialize_Error(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + ctx := metrics.InitMetricContext(context.TODO(), &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + + mw := GetRecordEndpointResolutionStartMiddleware() + _, _, _ = mw.HandleSerialize(ctx, middleware.SerializeInput{}, testutils.NoopSerializeHandler{}) + + actualTime := metrics.Context(ctx).Data().ResolveEndpointStartTime + expectedTime := sdk.NowTime() + if actualTime != expectedTime { + t.Errorf("Unexpected ResolveEndpointStartTime, should be '%s' but was '%s'", expectedTime, actualTime) + } +} diff --git a/aws/middleware/private/metrics/middleware/http.go b/aws/middleware/private/metrics/middleware/http.go new file mode 100644 index 00000000000..95cbffd96dc --- /dev/null +++ b/aws/middleware/private/metrics/middleware/http.go @@ -0,0 +1,154 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "fmt" + "net/http" + "net/http/httptrace" + "reflect" + "time" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +const ( + idleConnFieldName = "idleConn" + addressFieldName = "addr" + unkHttpClientName = "Other" + defaultHttpClientName = "Default" +) + +type HTTPMetrics struct { + client *http.Client +} + +func GetHttpMetricMiddleware(client *http.Client) *HTTPMetrics { + return &HTTPMetrics{ + client: client, + } +} + +func (m *HTTPMetrics) ID() string { + return "HTTPMetrics" +} + +func (m *HTTPMetrics) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, attemptError error, +) { + ctx = m.addTraceContext(ctx) + finalize, metadata, err := next.HandleFinalize(ctx, in) + return finalize, metadata, err +} + +var addClientTrace = func(ctx context.Context, trace *httptrace.ClientTrace) context.Context { + return httptrace.WithClientTrace(ctx, trace) +} + +func (m *HTTPMetrics) addTraceContext(ctx context.Context) context.Context { + mctx := metrics.Context(ctx) + counter := mctx.ConnectionCounter() + + attemptMetrics, attemptErr := mctx.Data().LatestAttempt() + + if attemptErr == nil { + trace := &httptrace.ClientTrace{ + GotFirstResponseByte: func() { + gotFirstResponseByte(attemptMetrics, sdk.NowTime()) + }, + GetConn: func(hostPort string) { + getConn(attemptMetrics, counter, sdk.NowTime(), m.client, hostPort) + }, + GotConn: func(info httptrace.GotConnInfo) { + gotConn(attemptMetrics, counter, info, time.Now()) + }, + } + + ctx = addClientTrace(ctx, trace) + } else { + fmt.Println(attemptErr) + } + return ctx +} + +func gotFirstResponseByte(attemptMetrics *metrics.AttemptMetrics, now time.Time) { + attemptMetrics.FirstByteTime = now +} + +func getConn( + attemptMetrics *metrics.AttemptMetrics, counter *metrics.SharedConnectionCounter, now time.Time, client *http.Client, hostPort string, +) { + attemptMetrics.ConnRequestedTime = now + attemptMetrics.PendingConnectionAcquires = int(counter.PendingConnectionAcquire()) + attemptMetrics.ActiveRequests = int(counter.ActiveRequests()) + + // Adding HTTP client metrics here since we need the hostPort to identify the correct conn queues. + addHTTPClientMetrics(attemptMetrics, client, hostPort) + counter.AddPendingConnectionAcquire() +} + +func gotConn( + attemptMetrics *metrics.AttemptMetrics, counter *metrics.SharedConnectionCounter, info httptrace.GotConnInfo, now time.Time, +) { + attemptMetrics.ReusedConnection = info.Reused + attemptMetrics.ConnObtainedTime = now + counter.RemovePendingConnectionAcquire() +} + +func addHTTPClientMetrics(attemptMetrics *metrics.AttemptMetrics, client *http.Client, hostPort string) { + + maxConnsPerHost := -1 + idleConnCountPerHost := -1 + httpClient := unkHttpClientName + + clientInterface := interface{}(client) + + switch clientInterface.(type) { + // If not a standard HTTP client we cannot retrieve these metrics + case *http.Client: + transport := clientInterface.(*http.Client).Transport + httpClient = defaultHttpClientName + switch transport.(type) { + case *http.Transport: + + maxConnsPerHost = transport.(*http.Transport).MaxConnsPerHost + + transportPtr := reflect.ValueOf(transport.(*http.Transport)) + + if transportPtr.IsValid() && transportPtr.Kind() == reflect.Pointer { + + transportValue := transportPtr.Elem() + idleConn := transportValue.FieldByName(idleConnFieldName) + + if idleConn.IsValid() && idleConn.Kind() == reflect.Map { + + IdleConnMap := idleConn.MapRange() + // We iterate through all the connection queues to look for the target host + for IdleConnMap.Next() { + address := IdleConnMap.Key().FieldByName(addressFieldName) + + if address.IsValid() && address.Kind() == reflect.String { + + if address.String() == hostPort { + // Number of idle connections for the requests host + idleConnCountPerHost = IdleConnMap.Value().Len() + break + } + } + } + } + } + } + } + + attemptMetrics.HTTPClient = httpClient + attemptMetrics.AvailableConcurrency = idleConnCountPerHost + attemptMetrics.MaxConcurrency = maxConnsPerHost +} diff --git a/aws/middleware/private/metrics/middleware/http_test.go b/aws/middleware/private/metrics/middleware/http_test.go new file mode 100644 index 00000000000..15d7caa2036 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/http_test.go @@ -0,0 +1,146 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "net/http" + "net/http/httptrace" + "testing" + "time" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +func TestHTTPMetrics_HandleFinalizes(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + counter := metrics.SharedConnectionCounter{} + + client := http.Client{ + Transport: &http.Transport{ + MaxIdleConnsPerHost: 10, + }, + } + + ctx := metrics.InitMetricContext(context.TODO(), &counter, &testutils.NoopPublisher{}) + + mw := GetHttpMetricMiddleware(&client) + + mctx := metrics.Context(ctx) + mctx.Data().NewAttempt() + + var traceInput *httptrace.ClientTrace + + addClientTrace = func(ctx context.Context, trace *httptrace.ClientTrace) context.Context { + traceInput = trace + return ctx + } + + _, _, _ = mw.HandleFinalize(ctx, middleware.FinalizeInput{}, testutils.NoopFinalizeHandler{}) + + if traceInput == nil { + t.Fatal("trace should be added to context") + } +} + +func TestHTTPMetrics_HandleFinalizes_AttemptErr(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + counter := metrics.SharedConnectionCounter{} + + client := http.Client{ + Transport: &http.Transport{ + MaxIdleConnsPerHost: 10, + }, + } + + ctx := metrics.InitMetricContext(context.TODO(), &counter, &testutils.NoopPublisher{}) + + mw := GetHttpMetricMiddleware(&client) + + var traceInput *httptrace.ClientTrace + + addClientTrace = func(ctx context.Context, trace *httptrace.ClientTrace) context.Context { + traceInput = trace + return ctx + } + + _, _, _ = mw.HandleFinalize(ctx, middleware.FinalizeInput{}, testutils.NoopFinalizeHandler{}) + + if traceInput != nil { + t.Fatal("trace should not be added to context") + } + +} + +func TestHTTPMetrics_callbacks(t *testing.T) { + + counter := metrics.SharedConnectionCounter{} + + client := http.Client{ + Transport: &http.Transport{ + MaxIdleConnsPerHost: 10, + }, + } + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &counter, &testutils.NoopPublisher{}) + mctx := metrics.Context(ctx) + mctx.Data().NewAttempt() + attempt, _ := mctx.Data().LatestAttempt() + + counter.AddPendingConnectionAcquire() + counter.AddActiveRequest() + + gotFirstResponseByte(attempt, sdk.NowTime()) + + getConn(attempt, &counter, sdk.NowTime(), &client, "hostPort") + + gotConn(attempt, &counter, httptrace.GotConnInfo{ + Conn: nil, + Reused: false, + WasIdle: false, + IdleTime: 0, + }, sdk.NowTime()) + + actualConnRequestedTime := attempt.ConnRequestedTime + expectedConnRequestedTime := sdk.NowTime() + + if actualConnRequestedTime != expectedConnRequestedTime { + t.Errorf("Unexpected ConnRequestedTime, should be '%s' but was '%s'", expectedConnRequestedTime, actualConnRequestedTime) + } + + actualPendingConnectionAcquires := attempt.PendingConnectionAcquires + expectedPendingConnectionAcquires := 1 + + if actualPendingConnectionAcquires != expectedPendingConnectionAcquires { + t.Errorf("Unexpected PendingConnectionAcquires, should be '%d' but was '%d'", expectedPendingConnectionAcquires, actualPendingConnectionAcquires) + } + + actualActiveRequests := attempt.ActiveRequests + expectedActiveRequests := 1 + + if actualActiveRequests != expectedActiveRequests { + t.Errorf("Unexpected ActiveRequests, should be '%d' but was '%d'", expectedActiveRequests, actualActiveRequests) + } + + actualConnObtainedTime := attempt.ConnObtainedTime + expectedConnObtainedTime := sdk.NowTime() + + if actualConnObtainedTime != expectedConnObtainedTime { + t.Errorf("Unexpected ConnObtainedTime, should be '%s' but was '%s'", actualConnObtainedTime, expectedConnObtainedTime) + } + +} diff --git a/aws/middleware/private/metrics/middleware/metric_collection.go b/aws/middleware/private/metrics/middleware/metric_collection.go new file mode 100644 index 00000000000..c553d1a114a --- /dev/null +++ b/aws/middleware/private/metrics/middleware/metric_collection.go @@ -0,0 +1,64 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +type MetricCollection struct { + cc *metrics.SharedConnectionCounter + publisher metrics.MetricPublisher +} + +func GetSetupMetricCollectionMiddleware( + counter *metrics.SharedConnectionCounter, publisher metrics.MetricPublisher, +) *MetricCollection { + return &MetricCollection{ + cc: counter, + publisher: publisher, + } +} + +func (m *MetricCollection) ID() string { + return "MetricCollection" +} + +func (m *MetricCollection) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + + ctx = metrics.InitMetricContext(ctx, m.cc, m.publisher) + + mctx := metrics.Context(ctx) + metricData := mctx.Data() + + metricData.RequestStartTime = sdk.NowTime() + + out, metadata, err = next.HandleInitialize(ctx, in) + + metricData.RequestEndTime = sdk.NowTime() + + if err == nil { + metricData.Success = 1 + } else { + metricData.Success = 0 + } + + metricData.ComputeRequestMetrics() + + publishErr := m.publisher.PostRequestMetrics(metrics.Context(ctx).Data()) + if publishErr != nil { + fmt.Println("Failed to post request metrics") + } + + return out, metadata, err +} diff --git a/aws/middleware/private/metrics/middleware/metric_collection_test.go b/aws/middleware/private/metrics/middleware/metric_collection_test.go new file mode 100644 index 00000000000..7f28ad38242 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/metric_collection_test.go @@ -0,0 +1,89 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "testing" + "time" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +func TestGetSetupMetricCollectionMiddleware(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + cases := map[string]struct { + ConnectionCounter *metrics.SharedConnectionCounter + Publisher metrics.MetricPublisher + Input middleware.InitializeInput + Handler middleware.InitializeHandler + ExpectedStartTime time.Time + ExpectedEndTime time.Time + ExpectedSuccess uint8 + }{ + "success": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.NoopPublisher{}, + Input: middleware.InitializeInput{}, + Handler: testutils.NoopInitializeHandler{}, + ExpectedStartTime: time.Unix(1234, 0), + ExpectedEndTime: time.Unix(1234, 0), + ExpectedSuccess: 1, + }, + "!success": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.NoopPublisher{}, + Input: middleware.InitializeInput{}, + Handler: testutils.ErrorInitializeHandler{}, + ExpectedStartTime: time.Unix(1234, 0), + ExpectedEndTime: time.Unix(1234, 0), + ExpectedSuccess: 0, + }, + "publisherFailure": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.ErrorPublisher{}, + Input: middleware.InitializeInput{}, + Handler: testutils.NoopInitializeHandler{}, + ExpectedStartTime: time.Unix(1234, 0), + ExpectedEndTime: time.Unix(1234, 0), + ExpectedSuccess: 1, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + + ctx := metrics.InitMetricContext(context.TODO(), c.ConnectionCounter, c.Publisher) + + mw := GetSetupMetricCollectionMiddleware(c.ConnectionCounter, c.Publisher) + + _, _, _ = mw.HandleInitialize(ctx, c.Input, c.Handler) + + mctx := metrics.Context(ctx) + + actualRequestStartTime := mctx.Data().RequestStartTime + actualRequestEndTime := mctx.Data().RequestEndTime + + if actualRequestStartTime != c.ExpectedStartTime { + t.Errorf("Unexpected RequestStartTime, should be '%s' but was '%s'", c.ExpectedStartTime, actualRequestStartTime) + } + if actualRequestEndTime != c.ExpectedEndTime { + t.Errorf("Unexpected RequestEndTime, should be '%s' but was '%s'", c.ExpectedEndTime, actualRequestEndTime) + } + if mctx.Data().Success != c.ExpectedSuccess { + t.Errorf("Unexpected Success status, should be '%d' but was '%d'", c.ExpectedSuccess, mctx.Data().Success) + } + + }) + } + +} diff --git a/aws/middleware/private/metrics/middleware/request.go b/aws/middleware/private/metrics/middleware/request.go new file mode 100644 index 00000000000..983fa9c5d58 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/request.go @@ -0,0 +1,61 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +const ( + clientRequestIdKey = "Amz-Sdk-Invocation-Id" + unkClientId = "unk" +) + +type RegisterMetricContext struct{} + +func GetRegisterRequestMetricContextMiddleware() *RegisterMetricContext { + return &RegisterMetricContext{} +} + +func (m *RegisterMetricContext) ID() string { + return "RegisterMetricContext" +} + +func (m *RegisterMetricContext) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + + mctx := metrics.Context(ctx) + metricData := mctx.Data() + + metricData.ServiceID = awsmiddleware.GetServiceID(ctx) + metricData.OperationName = awsmiddleware.GetOperationName(ctx) + metricData.PartitionID = awsmiddleware.GetPartitionID(ctx) + metricData.Region = awsmiddleware.GetSigningRegion(ctx) + + switch req := in.Request.(type) { + case *smithyhttp.Request: + crid := req.Header.Get(clientRequestIdKey) + if len(crid) == 0 { + crid = unkClientId + } + metricData.ClientRequestID = crid + metricData.RequestContentLength = req.ContentLength + default: + metricData.ClientRequestID = unkClientId + metricData.RequestContentLength = -1 + } + + out, metadata, err = next.HandleFinalize(ctx, in) + + return out, metadata, err +} diff --git a/aws/middleware/private/metrics/middleware/request_attempt.go b/aws/middleware/private/metrics/middleware/request_attempt.go new file mode 100644 index 00000000000..a8a9e10c14c --- /dev/null +++ b/aws/middleware/private/metrics/middleware/request_attempt.go @@ -0,0 +1,70 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/transport/http" +) + +const ( + amznRequestIdKey = "X-Amz-Request-Id" + amznRequestId2Key = "X-Amz-Id-2" + unkAmznReqId = "unk" + unkAmznReqId2 = "unk" +) + +type RegisterAttemptMetricContext struct{} + +func GetRegisterAttemptMetricContextMiddleware() *RegisterAttemptMetricContext { + return &RegisterAttemptMetricContext{} +} + +func (m *RegisterAttemptMetricContext) ID() string { + return "RegisterAttemptMetricContext" +} + +var getRawResponse = func(metadata middleware.Metadata) *http.Response { + switch res := awsmiddleware.GetRawResponse(metadata).(type) { + case *http.Response: + return res + default: + return nil + } +} + +func (m *RegisterAttemptMetricContext) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + + mctx := metrics.Context(ctx) + mctx.Data().NewAttempt() + + out, metadata, err = next.HandleFinalize(ctx, in) + + res := getRawResponse(metadata) + + attemptMetrics, _ := mctx.Data().LatestAttempt() + + if res != nil { + attemptMetrics.RequestID = res.Header.Get(amznRequestIdKey) + attemptMetrics.ExtendedRequestID = res.Header.Get(amznRequestId2Key) + attemptMetrics.StatusCode = res.StatusCode + attemptMetrics.ResponseContentLength = res.ContentLength + } else { + attemptMetrics.RequestID = unkAmznReqId + attemptMetrics.ExtendedRequestID = unkAmznReqId2 + attemptMetrics.StatusCode = -1 + attemptMetrics.ResponseContentLength = -1 + } + + return out, metadata, err +} diff --git a/aws/middleware/private/metrics/middleware/request_attempt_test.go b/aws/middleware/private/metrics/middleware/request_attempt_test.go new file mode 100644 index 00000000000..96408760a9b --- /dev/null +++ b/aws/middleware/private/metrics/middleware/request_attempt_test.go @@ -0,0 +1,114 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "net/http" + "testing" + "time" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func TestRegisterAttemptMetricContext_HandleFinalize(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + cases := map[string]struct { + ConnectionCounter *metrics.SharedConnectionCounter + Publisher metrics.MetricPublisher + ProvideResponse func(metadata middleware.Metadata) *smithyhttp.Response + Handler middleware.FinalizeHandler + Input middleware.FinalizeInput + ExpectedRequestId string + ExpectedExtendedRequestId string + ExpectedStatusCode int + ExpectedResponseContentLength int64 + }{ + "success": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.NoopPublisher{}, + ProvideResponse: func(metadata middleware.Metadata) *smithyhttp.Response { + res := smithyhttp.Response{} + res.Response = &http.Response{ + StatusCode: 400, + ContentLength: 1234, + Header: map[string][]string{}, + } + res.Header.Set(amznRequestIdKey, "reqId") + res.Header.Set(amznRequestId2Key, "reqId2") + return &res + }, + Handler: testutils.NoopFinalizeHandler{}, + Input: middleware.FinalizeInput{}, + ExpectedRequestId: "reqId", + ExpectedExtendedRequestId: "reqId2", + ExpectedStatusCode: 400, + ExpectedResponseContentLength: 1234, + }, + "noResInfo": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.NoopPublisher{}, + ProvideResponse: func(metadata middleware.Metadata) *smithyhttp.Response { + return nil + }, + Handler: testutils.NoopFinalizeHandler{}, + ExpectedRequestId: unkAmznReqId, + ExpectedExtendedRequestId: unkAmznReqId2, + ExpectedStatusCode: -1, + ExpectedResponseContentLength: -1, + }, + "noMetadata": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.NoopPublisher{}, + ProvideResponse: getRawResponse, + Handler: testutils.NoopFinalizeHandler{}, + ExpectedRequestId: unkAmznReqId, + ExpectedExtendedRequestId: unkAmznReqId2, + ExpectedStatusCode: -1, + ExpectedResponseContentLength: -1, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + + getRawResponse = c.ProvideResponse + + ctx := metrics.InitMetricContext(context.TODO(), c.ConnectionCounter, c.Publisher) + + mw := GetRegisterAttemptMetricContextMiddleware() + + _, _, _ = mw.HandleFinalize(ctx, c.Input, c.Handler) + + latestAttempt, _ := metrics.Context(ctx).Data().LatestAttempt() + actualRequestId := latestAttempt.RequestID + actualExtendedRequestId := latestAttempt.ExtendedRequestID + actualStatusCode := latestAttempt.StatusCode + actualResponseContentLength := latestAttempt.ResponseContentLength + + if actualRequestId != c.ExpectedRequestId { + t.Errorf("Unexpected RequestId, should be '%s' but was '%s'", c.ExpectedRequestId, actualRequestId) + } + if actualExtendedRequestId != c.ExpectedExtendedRequestId { + t.Errorf("Unexpected ExtendedRequestId, should be '%s' but was '%s'", c.ExpectedExtendedRequestId, actualExtendedRequestId) + } + if actualStatusCode != c.ExpectedStatusCode { + t.Errorf("Unexpected StatusCode, should be '%d' but was '%d'", c.ExpectedStatusCode, actualStatusCode) + } + if actualResponseContentLength != c.ExpectedResponseContentLength { + t.Errorf("Unexpected StatusCode, should be '%d' but was '%d'", c.ExpectedResponseContentLength, actualResponseContentLength) + } + }) + } + +} diff --git a/aws/middleware/private/metrics/middleware/request_test.go b/aws/middleware/private/metrics/middleware/request_test.go new file mode 100644 index 00000000000..84dc4eac9ee --- /dev/null +++ b/aws/middleware/private/metrics/middleware/request_test.go @@ -0,0 +1,86 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "testing" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func TestRegisterMetricContext_HandleFinalize(t *testing.T) { + + cases := map[string]struct { + ConnectionCounter *metrics.SharedConnectionCounter + Publisher metrics.MetricPublisher + ProvideInput func() middleware.FinalizeInput + Handler middleware.FinalizeHandler + ExpectedCrId string + }{ + "success": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.NoopPublisher{}, + ProvideInput: func() middleware.FinalizeInput { + req := smithyhttp.NewStackRequest().(*smithyhttp.Request) + req.Header.Set(clientRequestIdKey, "crid") + return middleware.FinalizeInput{Request: req} + }, + Handler: testutils.NoopFinalizeHandler{}, + ExpectedCrId: "crid", + }, + "noCrIdHeader": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.NoopPublisher{}, + ProvideInput: func() middleware.FinalizeInput { + req := smithyhttp.NewStackRequest().(*smithyhttp.Request) + return middleware.FinalizeInput{Request: req} + }, + Handler: testutils.NoopFinalizeHandler{}, + ExpectedCrId: unkClientId, + }, + "nilRequest": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.NoopPublisher{}, + ProvideInput: func() middleware.FinalizeInput { + return middleware.FinalizeInput{Request: nil} + }, + Handler: testutils.NoopFinalizeHandler{}, + ExpectedCrId: unkClientId, + }, + "wrongRequestType": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: &testutils.NoopPublisher{}, + ProvideInput: func() middleware.FinalizeInput { + return middleware.FinalizeInput{Request: "nil"} + }, + Handler: testutils.NoopFinalizeHandler{}, + ExpectedCrId: unkClientId, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + + ctx := metrics.InitMetricContext(context.TODO(), c.ConnectionCounter, c.Publisher) + + mw := GetRegisterRequestMetricContextMiddleware() + + _, _, _ = mw.HandleFinalize(ctx, c.ProvideInput(), c.Handler) + + mctx := metrics.Context(ctx) + actualCrId := mctx.Data().ClientRequestID + + if actualCrId != c.ExpectedCrId { + t.Errorf("Unexpected ClientRequestId, should be '%s' but was '%s'", c.ExpectedCrId, actualCrId) + } + + }) + } + +} diff --git a/aws/middleware/private/metrics/middleware/stack_deserialize_end.go b/aws/middleware/private/metrics/middleware/stack_deserialize_end.go new file mode 100644 index 00000000000..ac9e109f385 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/stack_deserialize_end.go @@ -0,0 +1,45 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +type StackDeserializeEnd struct{} + +func GetRecordStackDeserializeEndMiddleware() *StackDeserializeEnd { + return &StackDeserializeEnd{} +} + +func (m *StackDeserializeEnd) ID() string { + return "StackDeserializeEnd" +} + +func (m *StackDeserializeEnd) HandleDeserialize( + ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, +) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, attemptErr error, +) { + + out, metadata, err := next.HandleDeserialize(ctx, in) + + mctx := metrics.Context(ctx) + + attemptMetrics, attemptErr := mctx.Data().LatestAttempt() + + if attemptErr != nil { + fmt.Println(attemptErr) + } else { + attemptMetrics.DeserializeEndTime = sdk.NowTime() + } + + return out, metadata, err + +} diff --git a/aws/middleware/private/metrics/middleware/stack_deserialize_end_test.go b/aws/middleware/private/metrics/middleware/stack_deserialize_end_test.go new file mode 100644 index 00000000000..a47d922cbeb --- /dev/null +++ b/aws/middleware/private/metrics/middleware/stack_deserialize_end_test.go @@ -0,0 +1,63 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" + "testing" + "time" +) + +func TestStackDeserializeEnd_HandleDeserializeSuccess(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + mw := GetRecordStackDeserializeEndMiddleware() + + data := metrics.Context(ctx).Data() + + data.NewAttempt() + + _, _, _ = mw.HandleDeserialize(ctx, middleware.DeserializeInput{}, testutils.NoopDeserializeHandler{}) + + attempt, _ := data.LatestAttempt() + actualTime := attempt.DeserializeEndTime + expectedTime := sdk.NowTime() + if actualTime != expectedTime { + t.Errorf("Unexpected DeserializeEndTime, should be '%s' but was '%s'", expectedTime, actualTime) + } +} + +func TestStackDeserializeEnd_HandleDeserializeNoAttempt(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + mw := GetRecordStackDeserializeEndMiddleware() + + data := metrics.Context(ctx).Data() + + _, _, _ = mw.HandleDeserialize(ctx, middleware.DeserializeInput{}, testutils.NoopDeserializeHandler{}) + + attempt, err := data.LatestAttempt() + + if attempt != nil { + t.Errorf("Attempt should be nil") + } + if err == nil { + t.Errorf("Err should not be nil") + } +} diff --git a/aws/middleware/private/metrics/middleware/stack_deserialize_start.go b/aws/middleware/private/metrics/middleware/stack_deserialize_start.go new file mode 100644 index 00000000000..c21e79df534 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/stack_deserialize_start.go @@ -0,0 +1,44 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +type StackDeserializeStart struct{} + +func GetRecordStackDeserializeStartMiddleware() *StackDeserializeStart { + return &StackDeserializeStart{} +} + +func (m *StackDeserializeStart) ID() string { + return "StackDeserializeStart" +} + +func (m *StackDeserializeStart) HandleDeserialize( + ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, +) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + + out, metadata, err = next.HandleDeserialize(ctx, in) + + mctx := metrics.Context(ctx) + + attemptMetrics, attemptErr := mctx.Data().LatestAttempt() + + if attemptErr != nil { + fmt.Println(err) + } else { + attemptMetrics.DeserializeStartTime = sdk.NowTime() + } + + return out, metadata, err +} diff --git a/aws/middleware/private/metrics/middleware/stack_deserialize_start_test.go b/aws/middleware/private/metrics/middleware/stack_deserialize_start_test.go new file mode 100644 index 00000000000..a2c5fabec0d --- /dev/null +++ b/aws/middleware/private/metrics/middleware/stack_deserialize_start_test.go @@ -0,0 +1,59 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" + "testing" + "time" +) + +func TestStackDeserializeStart_HandleDeserializeSuccess(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + mw := GetRecordStackDeserializeStartMiddleware() + + data := metrics.Context(ctx).Data() + + data.NewAttempt() + + _, _, _ = mw.HandleDeserialize(ctx, middleware.DeserializeInput{}, testutils.NoopDeserializeHandler{}) + + attempt, _ := data.LatestAttempt() + actualTime := attempt.DeserializeStartTime + expectedTime := sdk.NowTime() + if actualTime != expectedTime { + t.Errorf("Unexpected DeserializeStartTime, should be '%s' but was '%s'", expectedTime, actualTime) + } +} + +func TestStackDeserializeStart_HandleDeserializeNoAttempt(t *testing.T) { + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + mw := GetRecordStackDeserializeStartMiddleware() + + data := metrics.Context(ctx).Data() + + _, _, _ = mw.HandleDeserialize(ctx, middleware.DeserializeInput{}, testutils.NoopDeserializeHandler{}) + + attempt, err := data.LatestAttempt() + + if attempt != nil { + t.Errorf("Attempt should be nil") + } + if err == nil { + t.Errorf("Err should not be nil") + } +} diff --git a/aws/middleware/private/metrics/middleware/stack_serialize_end.go b/aws/middleware/private/metrics/middleware/stack_serialize_end.go new file mode 100644 index 00000000000..c742edcf240 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/stack_serialize_end.go @@ -0,0 +1,33 @@ +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +type StackSerializeEnd struct{} + +func GetRecordStackSerializeEndMiddleware() *StackSerializeEnd { + return &StackSerializeEnd{} +} + +func (m *StackSerializeEnd) ID() string { + return "StackSerializeEnd" +} + +func (m *StackSerializeEnd) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + + mctx := metrics.Context(ctx) + mctx.Data().SerializeEndTime = sdk.NowTime() + + out, metadata, err = next.HandleSerialize(ctx, in) + + return out, metadata, err + +} diff --git a/aws/middleware/private/metrics/middleware/stack_serialize_end_test.go b/aws/middleware/private/metrics/middleware/stack_serialize_end_test.go new file mode 100644 index 00000000000..66e5c349f25 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/stack_serialize_end_test.go @@ -0,0 +1,29 @@ +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" + "testing" + "time" +) + +func TestStartSerializeEnd_HandleSerialize(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + mw := GetRecordStackSerializeEndMiddleware() + _, _, _ = mw.HandleSerialize(ctx, middleware.SerializeInput{}, testutils.NoopSerializeHandler{}) + + actualTime := metrics.Context(ctx).Data().SerializeEndTime + expectedTime := sdk.NowTime() + if actualTime != expectedTime { + t.Errorf("Unexpected SerializeEndTime, should be '%s' but was '%s'", expectedTime, actualTime) + } +} diff --git a/aws/middleware/private/metrics/middleware/stack_serialize_start.go b/aws/middleware/private/metrics/middleware/stack_serialize_start.go new file mode 100644 index 00000000000..996b32fcf6d --- /dev/null +++ b/aws/middleware/private/metrics/middleware/stack_serialize_start.go @@ -0,0 +1,32 @@ +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +type StackSerializeStart struct{} + +func GetRecordStackSerializeStartMiddleware() *StackSerializeStart { + return &StackSerializeStart{} +} + +func (m *StackSerializeStart) ID() string { + return "StackSerializeStart" +} + +func (m *StackSerializeStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + + mctx := metrics.Context(ctx) + mctx.Data().SerializeStartTime = sdk.NowTime() + + out, metadata, err = next.HandleSerialize(ctx, in) + + return out, metadata, err +} diff --git a/aws/middleware/private/metrics/middleware/stack_serialize_start_test.go b/aws/middleware/private/metrics/middleware/stack_serialize_start_test.go new file mode 100644 index 00000000000..c5e536b588e --- /dev/null +++ b/aws/middleware/private/metrics/middleware/stack_serialize_start_test.go @@ -0,0 +1,29 @@ +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" + "testing" + "time" +) + +func TestStartSerializeStart_HandleSerialize(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + mw := GetRecordStackSerializeStartMiddleware() + _, _, _ = mw.HandleSerialize(ctx, middleware.SerializeInput{}, testutils.NoopSerializeHandler{}) + + actualTime := metrics.Context(ctx).Data().SerializeStartTime + expectedTime := sdk.NowTime() + if actualTime != expectedTime { + t.Errorf("Unexpected SerializeStartTime, should be '%s' but was '%s'", expectedTime, actualTime) + } +} diff --git a/aws/middleware/private/metrics/middleware/transport.go b/aws/middleware/private/metrics/middleware/transport.go new file mode 100644 index 00000000000..a43e1f9782f --- /dev/null +++ b/aws/middleware/private/metrics/middleware/transport.go @@ -0,0 +1,46 @@ +// This package is designated as private and is intended for use only by the +// smithy client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" +) + +type TransportMetrics struct{} + +func GetTransportMetricsMiddleware() *TransportMetrics { + return &TransportMetrics{} +} + +func (m *TransportMetrics) ID() string { + return "TransportMetrics" +} + +func (m *TransportMetrics) HandleDeserialize( + ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, +) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, attemptErr error, +) { + + mctx := metrics.Context(ctx) + + if attempt, e := mctx.Data().LatestAttempt(); e == nil { + attempt.ServiceCallStart = sdk.NowTime() + mctx.ConnectionCounter().AddActiveRequest() + } + + out, metadata, err := next.HandleDeserialize(ctx, in) + + if attempt, e := mctx.Data().LatestAttempt(); e == nil { + attempt.ServiceCallEnd = sdk.NowTime() + mctx.ConnectionCounter().RemoveActiveRequest() + } + + return out, metadata, err + +} diff --git a/aws/middleware/private/metrics/middleware/transport_test.go b/aws/middleware/private/metrics/middleware/transport_test.go new file mode 100644 index 00000000000..258952751ed --- /dev/null +++ b/aws/middleware/private/metrics/middleware/transport_test.go @@ -0,0 +1,45 @@ +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/smithy-go/middleware" + "testing" + "time" +) + +func TestTransportMetrics_HandleSerialize(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + + data := metrics.Context(ctx).Data() + + data.NewAttempt() + + mw := GetTransportMetricsMiddleware() + _, _, _ = mw.HandleDeserialize(ctx, middleware.DeserializeInput{}, testutils.NoopDeserializeHandler{}) + + attempt, _ := data.LatestAttempt() + + actualStartTime := attempt.ServiceCallStart + expectedStartTime := sdk.NowTime() + + if actualStartTime != expectedStartTime { + t.Errorf("Unexpected ServiceCallStart, should be '%s' but was '%s'", expectedStartTime, expectedStartTime) + } + + actualEndTime := attempt.ServiceCallEnd + expectedEndTime := sdk.NowTime() + + if actualEndTime != expectedEndTime { + t.Errorf("Unexpected ServiceCallEnd, should be '%s' but was '%s'", expectedEndTime, actualEndTime) + } + +} diff --git a/aws/middleware/private/metrics/middleware/wrap_data_stream.go b/aws/middleware/private/metrics/middleware/wrap_data_stream.go new file mode 100644 index 00000000000..7f7c5d54ebf --- /dev/null +++ b/aws/middleware/private/metrics/middleware/wrap_data_stream.go @@ -0,0 +1,59 @@ +package middleware + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/readcloserwithmetrics" + "github.com/aws/smithy-go/middleware" + "io" + "reflect" +) + +const ( + responseBodyFieldName = "Body" +) + +type WrapDataContext struct{} + +func GetWrapDataStreamMiddleware() *WrapDataContext { + return &WrapDataContext{} +} + +func (m *WrapDataContext) ID() string { + return "BuildWrapDataStream" +} + +func (m *WrapDataContext) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + out middleware.BuildOutput, metadata middleware.Metadata, err error, +) { + + out, metadata, err = next.HandleBuild(ctx, in) + + value := reflect.ValueOf(out.Result) + + if value.Kind() != reflect.Ptr { + return out, metadata, err + } + value = value.Elem() + + if value.Kind() != reflect.Struct { + return out, metadata, err + } + bodyField := value.FieldByName(responseBodyFieldName) + + if !(bodyField.IsValid() && bodyField.CanInterface()) { + return out, metadata, err + } + + body, ok := bodyField.Interface().(io.ReadCloser) + + if !ok { + return out, metadata, err + } + + bodyField.Set(reflect.ValueOf(readcloserwithmetrics.New(metrics.Context(ctx), body))) + + return out, metadata, err +} diff --git a/aws/middleware/private/metrics/middleware/wrap_data_streams_test.go b/aws/middleware/private/metrics/middleware/wrap_data_streams_test.go new file mode 100644 index 00000000000..1c5c477f243 --- /dev/null +++ b/aws/middleware/private/metrics/middleware/wrap_data_streams_test.go @@ -0,0 +1,114 @@ +package middleware + +import ( + "context" + "io" + "reflect" + "testing" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "github.com/aws/smithy-go/middleware" +) + +type TestResult struct { + Body io.ReadCloser +} + +func TestWrapDataStream_HandleBuild(t *testing.T) { + + cases := map[string]struct { + ConnectionCounter *metrics.SharedConnectionCounter + Publisher testutils.MetricDataRecorderPublisher + Result *TestResult + Input middleware.BuildInput + ExpectedStreamData string + ExpectedMetricData metrics.StreamMetrics + }{ + "success": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: testutils.MetricDataRecorderPublisher{}, + Input: middleware.BuildInput{}, + Result: &TestResult{ + Body: &testutils.TestReadCloser{Data: []byte("testString")}, + }, + ExpectedStreamData: "testString", + ExpectedMetricData: metrics.StreamMetrics{ + ReadDuration: 0, + ReadBytes: 10, + }, + }, + "emptyData": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: testutils.MetricDataRecorderPublisher{}, + Input: middleware.BuildInput{}, + Result: &TestResult{ + Body: &testutils.TestReadCloser{Data: []byte("")}, + }, + ExpectedStreamData: "", + ExpectedMetricData: metrics.StreamMetrics{ + ReadDuration: 0, + ReadBytes: 0, + }, + }, + "nilBody": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: testutils.MetricDataRecorderPublisher{}, + Input: middleware.BuildInput{}, + Result: &TestResult{ + Body: nil, + }, + }, + "nilResult": { + ConnectionCounter: &metrics.SharedConnectionCounter{}, + Publisher: testutils.MetricDataRecorderPublisher{}, + Input: middleware.BuildInput{}, + Result: nil, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, c.ConnectionCounter, &c.Publisher) + mw := GetWrapDataStreamMiddleware() + + out, _, _ := mw.HandleBuild(ctx, c.Input, &testutils.StreamingBodyBuildHandler{Result: c.Result}) + + result := out.Result.(*TestResult) + + if result == nil || result.Body == nil { + return + } + + readData, _ := io.ReadAll(result.Body) + actualStreamData := string(readData) + actualMetricData := c.Publisher.Data.Stream + + if actualStreamData != c.ExpectedStreamData { + t.Errorf("Unexpected Data, should be '%s' but was '%s'", c.ExpectedStreamData, actualStreamData) + } + if !reflect.DeepEqual(actualMetricData, c.ExpectedMetricData) { + t.Errorf("Unexpected Metric Data, should be '%+v' but was '%+v'", c.ExpectedMetricData, actualMetricData) + } + + }) + } + +} + +func TestWrapDataStream_WrongResultType(t *testing.T) { + pub := &testutils.NoopPublisher{} + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, pub) + mw := GetWrapDataStreamMiddleware() + + r1 := TestResult{ + Body: &testutils.TestReadCloser{Data: []byte("testString")}, + } + + _, _, _ = mw.HandleBuild(ctx, middleware.BuildInput{}, &testutils.StreamingBodyBuildHandler{Result: r1}) + _, _, _ = mw.HandleBuild(ctx, middleware.BuildInput{}, &testutils.StreamingBodyBuildHandler{Result: pub}) + +} diff --git a/aws/middleware/private/metrics/publisher/emf.go b/aws/middleware/private/metrics/publisher/emf.go new file mode 100644 index 00000000000..d5a0a868595 --- /dev/null +++ b/aws/middleware/private/metrics/publisher/emf.go @@ -0,0 +1,155 @@ +package publisher + +import ( + "fmt" + "strconv" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/emf" +) + +// EMFPublisher is a MetricPublisher implementation that publishes metrics to stdout using EMF format. +type EMFPublisher struct { + namespace string + serializer metrics.Serializer + additionalDimensions map[string]string +} + +var output = func(format string, a ...interface{}) { + fmt.Printf(format, a...) +} + +// NewEMFPublisher creates a new EMFPublisher with the specified namespace and serializer. +func NewEMFPublisher(namespace string, serializer metrics.Serializer) *EMFPublisher { + return &EMFPublisher{ + namespace: namespace, + serializer: serializer, + additionalDimensions: map[string]string{}, + } +} + +func (p *EMFPublisher) SetAdditionalDimension(key string, value string) { + p.additionalDimensions[key] = value +} + +func (p *EMFPublisher) RemoveAdditionalDimension(key string) { + delete(p.additionalDimensions, key) +} + +func (p *EMFPublisher) populateWithAdditionalDimensions(entry *emf.Entry) { + for k := range p.additionalDimensions { + entry.AddDimension(k, p.additionalDimensions[k]) + } +} + +// perRequestMetrics generates and returns the log entry for per-request metrics. +func (p *EMFPublisher) perRequestMetrics(data *metrics.MetricData) (string, error) { + + entry := emf.NewEntry(p.namespace, p.serializer) + + p.populateWithAdditionalDimensions(&entry) + + entry.AddDimension(metrics.ServiceIDKey, data.ServiceID) + entry.AddDimension(metrics.OperationNameKey, data.OperationName) + entry.AddDimension(metrics.HTTPStatusCodeKey, strconv.Itoa(data.StatusCode)) + + entry.AddProperty(metrics.ClientRequestIDKey, data.ClientRequestID) + + entry.AddMetric(metrics.APICallDurationKey, float64(data.APICallDuration.Nanoseconds())) + entry.AddMetric(metrics.APICallSuccessfulKey, float64(data.Success)) + entry.AddMetric(metrics.MarshallingDurationKey, float64(data.MarshallingDuration.Nanoseconds())) + entry.AddMetric(metrics.EndpointResolutionDurationKey, float64(data.EndpointResolutionDuration.Nanoseconds())) + + entry.AddMetric(metrics.RetryCountKey, float64(data.RetryCount)) + + // We only publish throughput if different then 0 to avoid polluting statistics + if data.InThroughput != 0 { + entry.AddMetric(metrics.InThroughputKey, data.InThroughput) + } + if data.OutThroughput != 0 { + entry.AddMetric(metrics.OutThroughputKey, data.OutThroughput) + } + + return entry.Build() +} + +// perAttemptMetrics generates and returns the log entry for per-attempt metrics. +func (p *EMFPublisher) perAttemptMetrics(data *metrics.MetricData, attemptIndex int) (string, error) { + + attempt := data.Attempts[attemptIndex] + + entry := emf.NewEntry(p.namespace, p.serializer) + + p.populateWithAdditionalDimensions(&entry) + + entry.AddDimension(metrics.ServiceIDKey, data.ServiceID) + entry.AddDimension(metrics.OperationNameKey, data.OperationName) + entry.AddDimension(metrics.HTTPStatusCodeKey, strconv.Itoa(attempt.StatusCode)) + + entry.AddProperty(metrics.ClientRequestIDKey, data.ClientRequestID) + entry.AddProperty(metrics.AWSExtendedRequestIDKey, attempt.ExtendedRequestID) + entry.AddProperty(metrics.AWSRequestIDKey, attempt.RequestID) + entry.AddProperty(metrics.AttemptNumberKey, attemptIndex) + + entry.AddMetric(metrics.MaxConcurrencyKey, float64(attempt.MaxConcurrency)) + entry.AddMetric(metrics.AvailableConcurrencyKey, float64(attempt.AvailableConcurrency)) + entry.AddMetric(metrics.ConcurrencyAcquireDurationKey, float64(attempt.ConcurrencyAcquireDuration.Nanoseconds())) + entry.AddMetric(metrics.PendingConcurrencyAcquiresKey, float64(attempt.PendingConnectionAcquires)) + entry.AddMetric(metrics.SigningDurationKey, float64(attempt.SigningDuration.Nanoseconds())) + entry.AddMetric(metrics.UnmarshallingDurationKey, float64(attempt.UnMarshallingDuration.Nanoseconds())) + entry.AddMetric(metrics.TimeToFirstByteKey, float64(attempt.TimeToFirstByte.Nanoseconds())) + entry.AddMetric(metrics.ServiceCallDurationKey, float64(attempt.ServiceCallDuration.Nanoseconds())) + entry.AddMetric(metrics.BackoffDelayDurationKey, float64(attempt.RetryDelay)) + + return entry.Build() +} + +// perStreamMetrics generates and returns the log entry for per-stream metrics. +func (p *EMFPublisher) perStreamMetrics(data *metrics.MetricData) (string, error) { + + entry := emf.NewEntry(p.namespace, p.serializer) + + p.populateWithAdditionalDimensions(&entry) + + entry.AddDimension(metrics.ServiceIDKey, data.ServiceID) + entry.AddDimension(metrics.OperationNameKey, data.OperationName) + entry.AddDimension(metrics.HTTPStatusCodeKey, strconv.Itoa(data.StatusCode)) + + entry.AddProperty(metrics.ClientRequestIDKey, data.ClientRequestID) + + if data.Stream.Throughput > 0 { + entry.AddMetric(metrics.StreamThroughputKey, data.Stream.Throughput) + } + + return entry.Build() +} + +// PostRequestMetrics publishes the request metrics to stdout using EMF format. +func (p *EMFPublisher) PostRequestMetrics(data *metrics.MetricData) error { + requestMetricLogEntry, err := p.perRequestMetrics(data) + if err != nil { + output("error generating log entry for request metrics due to %s", err.Error()) + } else { + output("%s\n", requestMetricLogEntry) + } + for idx := range data.Attempts { + attemptMetricLogEntry, err := p.perAttemptMetrics(data, idx) + if err != nil { + output("error generating log entry for attempt metrics due to %s", err.Error()) + } else { + output("%s\n", attemptMetricLogEntry) + } + } + return nil +} + +// PostStreamMetrics publishes the stream metrics to stdout using EMF format. +func (p *EMFPublisher) PostStreamMetrics(data *metrics.MetricData) error { + streamMetrics, err := p.perStreamMetrics(data) + if err != nil { + output("error generating log entry for stream metrics due to %s", err.Error()) + } else { + output("%s\n", streamMetrics) + } + return nil +} diff --git a/aws/middleware/private/metrics/publisher/emf_test.go b/aws/middleware/private/metrics/publisher/emf_test.go new file mode 100644 index 00000000000..36fb1f08c9f --- /dev/null +++ b/aws/middleware/private/metrics/publisher/emf_test.go @@ -0,0 +1,255 @@ +// This package is designated as private and is intended for use only by the +// AWS client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package publisher + +import ( + "fmt" + "reflect" + "testing" + "time" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" +) + +type TestSerializerWithError struct{} + +func (TestSerializerWithError) Serialize(obj interface{}) (string, error) { + return "", fmt.Errorf("serialization error") +} + +func TestPostRequestMetrics(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + cases := map[string]struct { + Namespace string + Serializer metrics.Serializer + Data metrics.MetricData + ExpectedError error + ExpectedResults []string + }{ + "emptyRequestMetricData": { + Namespace: "testNamespace", + Serializer: metrics.DefaultSerializer{}, + Data: metrics.MetricData{}, + ExpectedError: nil, + ExpectedResults: []string{ + emptyRequestMetricData, + }, + }, + "serializerError": { + Namespace: "testNamespace", + Serializer: TestSerializerWithError{}, + Data: metrics.MetricData{ + Attempts: []metrics.AttemptMetrics{{}}, + }, + ExpectedError: nil, + ExpectedResults: []string{ + "error generating log entry for request metrics due to [serialization error]", + "error generating log entry for attempt metrics due to [serialization error]", + }, + }, + "completeRequestMetricData": { + Namespace: "testNamespace", + Serializer: metrics.DefaultSerializer{}, + Data: metrics.MetricData{ + RequestStartTime: time.Unix(1234, 0), + RequestEndTime: time.Unix(1434, 0), + SerializeStartTime: time.Unix(1234, 0), + SerializeEndTime: time.Unix(1434, 0), + ResolveEndpointStartTime: time.Unix(1234, 0), + ResolveEndpointEndTime: time.Unix(1434, 0), + Success: 1, + ClientRequestID: "crid", + ServiceID: "sid", + OperationName: "operationname", + PartitionID: "partitionid", + Region: "region", + RequestContentLength: 100, + Stream: metrics.StreamMetrics{}, + Attempts: []metrics.AttemptMetrics{{ + ServiceCallStart: time.Unix(1234, 0), + ServiceCallEnd: time.Unix(1434, 0), + FirstByteTime: time.Unix(1234, 0), + ConnRequestedTime: time.Unix(1234, 0), + ConnObtainedTime: time.Unix(1434, 0), + CredentialFetchStartTime: time.Unix(1234, 0), + CredentialFetchEndTime: time.Unix(1434, 0), + SignStartTime: time.Unix(1234, 0), + SignEndTime: time.Unix(1434, 0), + DeserializeStartTime: time.Unix(1234, 0), + DeserializeEndTime: time.Unix(1434, 0), + RetryDelay: 100, + ResponseContentLength: 100, + StatusCode: 200, + RequestID: "reqid", + ExtendedRequestID: "exreqid", + HTTPClient: "Default", + MaxConcurrency: 10, + PendingConnectionAcquires: 1, + AvailableConcurrency: 2, + ActiveRequests: 3, + ReusedConnection: false, + }, + { + ServiceCallStart: time.Unix(1234, 0), + ServiceCallEnd: time.Unix(1434, 0), + FirstByteTime: time.Unix(1234, 0), + ConnRequestedTime: time.Unix(1234, 0), + ConnObtainedTime: time.Unix(1434, 0), + CredentialFetchStartTime: time.Unix(1234, 0), + CredentialFetchEndTime: time.Unix(1434, 0), + SignStartTime: time.Unix(1234, 0), + SignEndTime: time.Unix(1434, 0), + DeserializeStartTime: time.Unix(1234, 0), + DeserializeEndTime: time.Unix(1434, 0), + RetryDelay: 100, + ResponseContentLength: 100, + StatusCode: 200, + RequestID: "reqid", + ExtendedRequestID: "exreqid", + HTTPClient: "Default", + MaxConcurrency: 10, + PendingConnectionAcquires: 1, + AvailableConcurrency: 2, + ActiveRequests: 3, + ReusedConnection: false, + }}, + }, + ExpectedError: nil, + ExpectedResults: []string{ + completeRequestMetricData, + completeMetricDataAttempt1, + completeMetricDataAttempt2, + }, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + + var actualResults []string + + output = func(format string, a ...interface{}) { + actualResults = append(actualResults, fmt.Sprintf(format, a)) + } + + publisher := NewEMFPublisher(c.Namespace, c.Serializer) + + c.Data.ComputeRequestMetrics() + + err := publisher.PostRequestMetrics(&c.Data) + + if !reflect.DeepEqual(err, c.ExpectedError) { + t.Errorf("Unexpected error, should be '%s' but was '%s'", c.ExpectedError, err) + } + + if len(c.ExpectedResults) != len(actualResults) { + t.Errorf("Different number of results. Expected %d but got %d", len(c.ExpectedResults), len(actualResults)) + } + + for i := range c.ExpectedResults { + if !reflect.DeepEqual(actualResults[i], c.ExpectedResults[i]) { + t.Errorf("Unexpected result, should be '%s' but was '%s'", c.ExpectedResults[i], actualResults[i]) + } + } + }) + } +} + +func TestPostStreamMetrics(t *testing.T) { + + sdk.NowTime = func() time.Time { + return time.Unix(1234, 0) + } + + cases := map[string]struct { + Namespace string + Serializer metrics.Serializer + Data metrics.MetricData + ExpectedError error + ExpectedResults []string + }{ + "emptyStreamMetricData": { + Namespace: "testNamespace", + Serializer: metrics.DefaultSerializer{}, + Data: metrics.MetricData{}, + ExpectedError: nil, + ExpectedResults: []string{ + emptyStreamMetricData, + }, + }, + "serializerError": { + Namespace: "testNamespace", + Serializer: TestSerializerWithError{}, + Data: metrics.MetricData{}, + ExpectedError: nil, + ExpectedResults: []string{ + "error generating log entry for stream metrics due to [serialization error]", + }, + }, + "completeStreamMetricData": { + Namespace: "testNamespace", + Serializer: metrics.DefaultSerializer{}, + Data: metrics.MetricData{ + RequestStartTime: time.Unix(1234, 0), + RequestEndTime: time.Unix(1434, 0), + SerializeStartTime: time.Unix(1234, 0), + SerializeEndTime: time.Unix(1434, 0), + ResolveEndpointStartTime: time.Unix(1234, 0), + ResolveEndpointEndTime: time.Unix(1434, 0), + Success: 1, + StatusCode: 200, + ClientRequestID: "crid", + ServiceID: "sid", + OperationName: "operationname", + PartitionID: "partitionid", + Region: "region", + RequestContentLength: 100, + Stream: metrics.StreamMetrics{ + ReadDuration: 150, + ReadBytes: 12, + Throughput: 80000000, + }, + }, + ExpectedError: nil, + ExpectedResults: []string{ + completeStreamMetricData, + }, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + + var actualResults []string + + output = func(format string, a ...interface{}) { + actualResults = append(actualResults, fmt.Sprintf(format, a)) + } + + publisher := NewEMFPublisher(c.Namespace, c.Serializer) + + err := publisher.PostStreamMetrics(&c.Data) + + if !reflect.DeepEqual(err, c.ExpectedError) { + t.Errorf("Unexpected error, should be '%s' but was '%s'", c.ExpectedError, err) + } + + if len(c.ExpectedResults) != len(actualResults) { + t.Errorf("Different number of results. Expected %d but got %d", len(c.ExpectedResults), len(actualResults)) + } + + for i := range c.ExpectedResults { + if !reflect.DeepEqual(actualResults[i], c.ExpectedResults[i]) { + t.Errorf("Unexpected result, should be '%s' but was '%s'", c.ExpectedResults[i], actualResults[i]) + } + } + }) + } +} diff --git a/aws/middleware/private/metrics/publisher/emf_test_data.go b/aws/middleware/private/metrics/publisher/emf_test_data.go new file mode 100644 index 00000000000..73ecd786a3d --- /dev/null +++ b/aws/middleware/private/metrics/publisher/emf_test_data.go @@ -0,0 +1,227 @@ +// This package is designated as private and is intended for use only by the +// AWS client runtime. The exported API therein is not considered stable and +// is subject to breaking changes without notice. + +package publisher + +import "strings" + +func stripString(str string) string { + str = strings.Replace(str, " ", "", -1) + str = strings.Replace(str, "\t", "", -1) + str = strings.Replace(str, "\n", "", -1) + return str + "\n" +} + +var emptyRequestMetricData = stripString(` +[{ + "ApiCallDuration": 0, + "ApiCallSuccessful": 0, + "ClientRequestId": "", + "EndpointResolutionDuration": 0, + "HttpStatusCode":"0", + "MarshallingDuration": 0, + "OperationName": "", + "RetryCount": -1, + "ServiceId": "", + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + ["ServiceId", "OperationName", "HttpStatusCode"] + ], + "Metrics": [{ + "Name": "ApiCallDuration" + }, { + "Name": "ApiCallSuccessful" + }, { + "Name": "MarshallingDuration" + }, { + "Name": "EndpointResolutionDuration" + }, { + "Name": "RetryCount" + }], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + } +}] +`) + +var emptyStreamMetricData = stripString(` +[{ + "ClientRequestId": "", + "HttpStatusCode": "0", + "OperationName": "", + "ServiceId": "", + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + ["ServiceId", "OperationName", "HttpStatusCode"] + ], + "Metrics": [], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + } +}] +`) + +var completeStreamMetricData = stripString(` +[{ + "ClientRequestId": "crid", + "HttpStatusCode": "200", + "OperationName": "operationname", + "ServiceId": "sid", + "Throughput": 80000000, + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + ["ServiceId", "OperationName", "HttpStatusCode"] + ], + "Metrics": [{ + "Name": "Throughput" + }], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + } +}] +`) + +var completeRequestMetricData = stripString(` +[{ + "ApiCallDuration": 200000000000, + "ApiCallSuccessful": 1, + "ClientRequestId": "crid", + "EndpointResolutionDuration": 200000000000, + "HttpStatusCode":"200", + "InThroughput": 0.5, + "MarshallingDuration": 200000000000, + "OperationName": "operationname", + "OutThroughput": 0.5, + "RetryCount": 1, + "ServiceId": "sid", + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + ["ServiceId", "OperationName", "HttpStatusCode"] + ], + "Metrics": [{ + "Name": "ApiCallDuration" + }, { + "Name": "ApiCallSuccessful" + }, { + "Name": "MarshallingDuration" + }, { + "Name": "EndpointResolutionDuration" + }, { + "Name": "RetryCount" + }, { + "Name": "InThroughput" + }, { + "Name": "OutThroughput" + }], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + } +}] +`) + +var completeMetricDataAttempt1 = stripString(` +[{ + "AttemptNumber": 0, + "AvailableConcurrency": 2, + "AwsExtendedRequestId": "exreqid", + "AwsRequestId": "reqid", + "BackoffDelayDuration":100, + "ClientRequestId": "crid", + "ConcurrencyAcquireDuration": 200000000000, + "HttpStatusCode": "200", + "MaxConcurrency":10, + "OperationName": "operationname", + "PendingConcurrencyAcquires": 1, + "ServiceCallDuration": 200000000000, + "ServiceId": "sid", + "SigningDuration": 200000000000, + "TimeToFirstByte": 0, + "UnmarshallingDuration": 200000000000, + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + ["ServiceId", "OperationName", "HttpStatusCode"] + ], + "Metrics": [{ + "Name": "MaxConcurrency" + }, { + "Name": "AvailableConcurrency" + }, { + "Name": "ConcurrencyAcquireDuration" + }, { + "Name": "PendingConcurrencyAcquires" + }, { + "Name": "SigningDuration" + }, { + "Name": "UnmarshallingDuration" + }, { + "Name": "TimeToFirstByte" + }, { + "Name": "ServiceCallDuration" + }, { + "Name":"BackoffDelayDuration" + }], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + } +}] +`) + +var completeMetricDataAttempt2 = stripString(` +[{ + "AttemptNumber": 1, + "AvailableConcurrency": 2, + "AwsExtendedRequestId": "exreqid", + "AwsRequestId": "reqid", + "BackoffDelayDuration":100, + "ClientRequestId": "crid", + "ConcurrencyAcquireDuration": 200000000000, + "HttpStatusCode": "200", + "MaxConcurrency":10, + "OperationName": "operationname", + "PendingConcurrencyAcquires": 1, + "ServiceCallDuration": 200000000000, + "ServiceId": "sid", + "SigningDuration": 200000000000, + "TimeToFirstByte": 0, + "UnmarshallingDuration": 200000000000, + "_aws": { + "CloudWatchMetrics": [{ + "Dimensions": [ + ["ServiceId", "OperationName", "HttpStatusCode"] + ], + "Metrics": [{ + "Name": "MaxConcurrency" + }, { + "Name": "AvailableConcurrency" + }, { + "Name": "ConcurrencyAcquireDuration" + }, { + "Name": "PendingConcurrencyAcquires" + }, { + "Name": "SigningDuration" + }, { + "Name": "UnmarshallingDuration" + }, { + "Name": "TimeToFirstByte" + }, { + "Name": "ServiceCallDuration" + }, { + "Name": "BackoffDelayDuration" + }], + "Namespace": "testNamespace" + }], + "Timestamp": 1234000 + } +}] +`) diff --git a/aws/middleware/private/metrics/readcloserwithmetrics/read_closer_with_metrics.go b/aws/middleware/private/metrics/readcloserwithmetrics/read_closer_with_metrics.go new file mode 100644 index 00000000000..eb234ffa762 --- /dev/null +++ b/aws/middleware/private/metrics/readcloserwithmetrics/read_closer_with_metrics.go @@ -0,0 +1,56 @@ +package readcloserwithmetrics + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "io" +) + +type ReadCloserWithMetrics struct { + data *metrics.MetricData + publisher metrics.MetricPublisher + readCloser io.ReadCloser + readFinished bool +} + +func New( + context *metrics.MetricContext, closer io.ReadCloser, +) (trc *ReadCloserWithMetrics) { + return &ReadCloserWithMetrics{ + data: context.Data(), + publisher: context.Publisher(), + readCloser: closer, + readFinished: false, + } +} + +func (r *ReadCloserWithMetrics) Read(p []byte) (n int, err error) { + readRoundStarted := sdk.NowTime() + read, err := r.readCloser.Read(p) + readRoundEnd := sdk.NowTime() + r.data.Stream.ReadDuration += readRoundEnd.Sub(readRoundStarted) + r.data.Stream.ReadBytes += int64(read) + if err == io.EOF { + r.readFinished = true + r.finalize() + } + return read, err +} + +func (r *ReadCloserWithMetrics) Close() error { + if !r.readFinished { + r.finalize() + } + return r.readCloser.Close() +} + +func (r *ReadCloserWithMetrics) finalize() { + if r.data.Stream.ReadDuration > 0 { + r.data.Stream.Throughput = float64(r.data.Stream.ReadBytes) / r.data.Stream.ReadDuration.Seconds() + } + err := r.publisher.PostStreamMetrics(r.data) + if err != nil { + fmt.Println("Failed to post stream metrics") + } +} diff --git a/aws/middleware/private/metrics/readcloserwithmetrics/read_closer_with_metrics_test.go b/aws/middleware/private/metrics/readcloserwithmetrics/read_closer_with_metrics_test.go new file mode 100644 index 00000000000..97d21b1ecd0 --- /dev/null +++ b/aws/middleware/private/metrics/readcloserwithmetrics/read_closer_with_metrics_test.go @@ -0,0 +1,83 @@ +package readcloserwithmetrics + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/testutils" + "io" + "testing" +) + +func TestNew(t *testing.T) { + + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, &testutils.NoopPublisher{}) + mctx := metrics.Context(ctx) + + expectedData := "testString" + trc := testutils.TestReadCloser{Data: []byte(expectedData)} + + reader := New(mctx, &trc) + readData, _ := io.ReadAll(reader) + actualData := string(readData) + + if actualData != expectedData { + t.Errorf("Unexpected Data, should be '%s' but was '%s'", expectedData, actualData) + } +} + +func TestReadCloserWithMetrics_Close(t *testing.T) { + + mdrp := &testutils.MetricDataRecorderPublisher{} + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, mdrp) + mctx := metrics.Context(ctx) + + expectedData := "testString" + trc := testutils.TestReadCloser{Data: []byte(expectedData)} + + reader := New(mctx, &trc) + + err := reader.Close() + + if err != nil { + t.Errorf("Unexpected Error in Close") + } + + if mdrp.Data == nil { + t.Errorf("Data should be set in publisher") + } + + rb := mdrp.Data.Stream.ReadBytes + if mdrp.Data.Stream.ReadBytes != 0 { + t.Errorf("Unexpected ReadBytes, should be '%d' but was '%d'", 0, rb) + } + +} + +func TestReadCloserWithMetrics_Read(t *testing.T) { + mdrp := &testutils.MetricDataRecorderPublisher{} + ctx := context.TODO() + ctx = metrics.InitMetricContext(ctx, &metrics.SharedConnectionCounter{}, mdrp) + mctx := metrics.Context(ctx) + + expectedData := "testString" + trc := testutils.TestReadCloser{Data: []byte(expectedData)} + + reader := New(mctx, &trc) + + err := reader.Close() + + if err != nil { + t.Errorf("Unexpected Error in Close") + } + + if mdrp.Data == nil { + t.Errorf("Data should be set in publisher") + } + + rb := mdrp.Data.Stream.ReadBytes + if mdrp.Data.Stream.ReadBytes != 0 { + t.Errorf("Unexpected ReadBytes, should be '%d' but was '%d'", 0, rb) + } +} diff --git a/aws/middleware/private/metrics/testutils/test_util.go b/aws/middleware/private/metrics/testutils/test_util.go new file mode 100644 index 00000000000..f19c70298bb --- /dev/null +++ b/aws/middleware/private/metrics/testutils/test_util.go @@ -0,0 +1,107 @@ +package testutils + +import ( + "context" + "fmt" + "io" + + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + "github.com/aws/smithy-go/middleware" +) + +type MetricDataRecorderPublisher struct { + Data *metrics.MetricData +} + +func (mdrp *MetricDataRecorderPublisher) PostRequestMetrics(data *metrics.MetricData) error { + mdrp.Data = data + return nil +} + +func (mdrp *MetricDataRecorderPublisher) PostStreamMetrics(data *metrics.MetricData) error { + mdrp.Data = data + return nil +} + +type NoopPublisher struct{} + +func (np *NoopPublisher) PostRequestMetrics(data *metrics.MetricData) error { + return nil +} + +func (np *NoopPublisher) PostStreamMetrics(data *metrics.MetricData) error { + return nil +} + +type ErrorPublisher struct{} + +func (tp *ErrorPublisher) PostRequestMetrics(data *metrics.MetricData) error { + return fmt.Errorf("publisher error") +} + +func (tp *ErrorPublisher) PostStreamMetrics(data *metrics.MetricData) error { + return fmt.Errorf("publisher error") +} + +type NoopInitializeHandler struct{} +type ErrorInitializeHandler struct{} +type NoopSerializeHandler struct{} +type NoopFinalizeHandler struct{} +type NoopDeserializeHandler struct{} +type StreamingBodyBuildHandler struct { + Result interface{} +} + +func (NoopInitializeHandler) HandleInitialize(ctx context.Context, in middleware.InitializeInput) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + return middleware.InitializeOutput{}, middleware.Metadata{}, nil +} + +func (ErrorInitializeHandler) HandleInitialize(ctx context.Context, in middleware.InitializeInput) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + return middleware.InitializeOutput{}, middleware.Metadata{}, fmt.Errorf("init error") +} + +func (NoopFinalizeHandler) HandleFinalize(ctx context.Context, in middleware.FinalizeInput) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + return middleware.FinalizeOutput{}, middleware.Metadata{}, nil +} + +func (NoopDeserializeHandler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + return middleware.DeserializeOutput{}, middleware.Metadata{}, nil +} + +func (NoopSerializeHandler) HandleSerialize(ctx context.Context, in middleware.SerializeInput) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + return middleware.SerializeOutput{}, middleware.Metadata{}, nil +} + +func (s *StreamingBodyBuildHandler) HandleBuild(ctx context.Context, in middleware.BuildInput) ( + out middleware.BuildOutput, metadata middleware.Metadata, err error, +) { + return middleware.BuildOutput{Result: s.Result}, middleware.Metadata{}, nil +} + +type TestReadCloser struct { + Data []byte + offset int +} + +func (m *TestReadCloser) Read(p []byte) (int, error) { + if m.offset >= len(m.Data) { + return 0, io.EOF + } + n := copy(p, m.Data[m.offset:]) + m.offset += n + return n, nil +} + +func (m *TestReadCloser) Close() error { + return nil +} diff --git a/aws/retry/middleware.go b/aws/retry/middleware.go index 822fc920a75..722ca34c6a0 100644 --- a/aws/retry/middleware.go +++ b/aws/retry/middleware.go @@ -3,6 +3,7 @@ package retry import ( "context" "fmt" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" "strconv" "strings" "time" @@ -225,6 +226,13 @@ func (r *Attempt) handleAttempt( // that time. Potentially early exist if the sleep is canceled via the // context. retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err) + mctx := metrics.Context(ctx) + if mctx != nil { + attempt, err := mctx.Data().LatestAttempt() + if err != nil { + attempt.RetryDelay = retryDelay + } + } if reqErr != nil { return out, attemptResult, releaseRetryToken, reqErr } diff --git a/aws/signer/v4/middleware.go b/aws/signer/v4/middleware.go index f682fb5dce0..f39a369ad84 100644 --- a/aws/signer/v4/middleware.go +++ b/aws/signer/v4/middleware.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/internal/sdk" @@ -300,7 +301,22 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")} } + mctx := metrics.Context(ctx) + + if mctx != nil { + if attempt, err := mctx.Data().LatestAttempt(); err == nil { + attempt.CredentialFetchStartTime = sdk.NowTime() + } + } + credentials, err := s.credentialsProvider.Retrieve(ctx) + + if mctx != nil { + if attempt, err := mctx.Data().LatestAttempt(); err == nil { + attempt.CredentialFetchEndTime = sdk.NowTime() + } + } + if err != nil { return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)} } @@ -321,7 +337,20 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl }) } + if mctx != nil { + if attempt, err := mctx.Data().LatestAttempt(); err == nil { + attempt.SignStartTime = sdk.NowTime() + } + } + err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(), signerOptions...) + + if mctx != nil { + if attempt, err := mctx.Data().LatestAttempt(); err == nil { + attempt.SignEndTime = sdk.NowTime() + } + } + if err != nil { return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)} } diff --git a/aws/signer/v4/v4.go b/aws/signer/v4/v4.go index 4d162556bbf..bb61904e1d8 100644 --- a/aws/signer/v4/v4.go +++ b/aws/signer/v4/v4.go @@ -68,6 +68,9 @@ import ( const ( signingAlgorithm = "AWS4-HMAC-SHA256" authorizationHeader = "Authorization" + + // Version of signing v4 + Version = "SigV4" ) // HTTPSigner is an interface to a SigV4 signer that can sign HTTP requests @@ -103,6 +106,11 @@ type SignerOptions struct { // This will enable logging of the canonical request, the string to sign, and for presigning the subsequent // presigned URL. LogSigning bool + + // Disables setting the session token on the request as part of signing + // through X-Amz-Security-Token. This is needed for variations of v4 that + // present the token elsewhere. + DisableSessionToken bool } // Signer applies AWS v4 signing to given request. Use this to sign requests @@ -136,6 +144,7 @@ type httpSigner struct { DisableHeaderHoisting bool DisableURIPathEscaping bool + DisableSessionToken bool } func (s *httpSigner) Build() (signedRequest, error) { @@ -284,6 +293,7 @@ func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *ht Time: v4Internal.NewSigningTime(signingTime.UTC()), DisableHeaderHoisting: options.DisableHeaderHoisting, DisableURIPathEscaping: options.DisableURIPathEscaping, + DisableSessionToken: options.DisableSessionToken, KeyDerivator: s.keyDerivator, } @@ -360,6 +370,7 @@ func (s *Signer) PresignHTTP( IsPreSign: true, DisableHeaderHoisting: options.DisableHeaderHoisting, DisableURIPathEscaping: options.DisableURIPathEscaping, + DisableSessionToken: options.DisableSessionToken, KeyDerivator: s.keyDerivator, } @@ -502,7 +513,8 @@ func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Val if s.IsPreSign { query.Set(v4Internal.AmzAlgorithmKey, signingAlgorithm) - if sessionToken := s.Credentials.SessionToken; len(sessionToken) > 0 { + sessionToken := s.Credentials.SessionToken + if !s.DisableSessionToken && len(sessionToken) > 0 { query.Set("X-Amz-Security-Token", sessionToken) } @@ -512,7 +524,7 @@ func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Val headers[v4Internal.AmzDateKey] = append(headers[v4Internal.AmzDateKey][:0], amzDate) - if len(s.Credentials.SessionToken) > 0 { + if !s.DisableSessionToken && len(s.Credentials.SessionToken) > 0 { headers[v4Internal.AmzSecurityTokenKey] = append(headers[v4Internal.AmzSecurityTokenKey][:0], s.Credentials.SessionToken) } } diff --git a/codegen/sdk-codegen/aws-models/s3.json b/codegen/sdk-codegen/aws-models/s3.json index e12979d7f67..c168e72a14a 100644 --- a/codegen/sdk-codegen/aws-models/s3.json +++ b/codegen/sdk-codegen/aws-models/s3.json @@ -60,7 +60,7 @@ } ], "traits": { - "smithy.api#documentation": "
This action aborts a multipart upload. After a multipart upload is aborted, no\n additional parts can be uploaded using that upload ID. The storage consumed by any\n previously uploaded parts will be freed. However, if any part uploads are currently in\n progress, those part uploads might or might not succeed. As a result, it might be necessary\n to abort a given multipart upload multiple times in order to completely free all storage\n consumed by all parts.
\nTo verify that all parts have been removed, so you don't get charged for the part\n storage, you should call the ListParts action and ensure that\n the parts list is empty.
\nFor information about permissions required to use the multipart upload, see Multipart Upload\n and Permissions.
\nThe following operations are related to AbortMultipartUpload
:
\n UploadPart\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nThis operation aborts a multipart upload. After a multipart upload is aborted, no\n additional parts can be uploaded using that upload ID. The storage consumed by any\n previously uploaded parts will be freed. However, if any part uploads are currently in\n progress, those part uploads might or might not succeed. As a result, it might be necessary\n to abort a given multipart upload multiple times in order to completely free all storage\n consumed by all parts.
\nTo verify that all parts have been removed and prevent getting charged for the part\n storage, you should call the ListParts API operation and ensure that\n the parts list is empty.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - For information about permissions required to use the multipart upload, see Multipart Upload\n and Permissions in the Amazon S3\n User Guide.
\n\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to AbortMultipartUpload
:
\n UploadPart\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nThe bucket name to which the upload was taking place.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name to which the upload was taking place.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
A container for information about access control for replicas.
" } }, + "com.amazonaws.s3#AccessKeyIdValue": { + "type": "string" + }, + "com.amazonaws.s3#AccessPointAlias": { + "type": "boolean" + }, "com.amazonaws.s3#AccessPointArn": { "type": "string" }, @@ -256,6 +262,9 @@ { "target": "com.amazonaws.s3#CreateMultipartUpload" }, + { + "target": "com.amazonaws.s3#CreateSession" + }, { "target": "com.amazonaws.s3#DeleteBucket" }, @@ -415,6 +424,9 @@ { "target": "com.amazonaws.s3#ListBuckets" }, + { + "target": "com.amazonaws.s3#ListDirectoryBuckets" + }, { "target": "com.amazonaws.s3#ListMultipartUploads" }, @@ -559,6 +571,10 @@ "Accelerate": { "documentation": "Enables this client to use S3 Transfer Acceleration endpoints.", "type": "boolean" + }, + "DisableS3ExpressSessionAuth": { + "documentation": "Disables this client's usage of Session Auth for S3Express buckets and reverts to using conventional SigV4 for those.", + "type": "boolean" } }, "smithy.rules#endpointRuleSet": { @@ -648,6 +664,16 @@ "required": false, "documentation": "When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.", "type": "Boolean" + }, + "UseS3ExpressControlEndpoint": { + "required": false, + "documentation": "Internal parameter to indicate whether S3Express operation should use control plane, (ex. CreateBucket)", + "type": "Boolean" + }, + "DisableS3ExpressSessionAuth": { + "required": false, + "documentation": "Internal parameter to indicate whether S3Express session auth should be disabled", + "type": "Boolean" } }, "rules": [ @@ -811,90 +837,91 @@ { "ref": "Bucket" }, - 49, - 50, - true - ], - "assign": "hardwareType" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 8, - 12, + 0, + 6, true ], - "assign": "regionPrefix" + "assign": "bucketSuffix" }, { - "fn": "substring", + "fn": "stringEquals", "argv": [ { - "ref": "Bucket" + "ref": "bucketSuffix" }, - 0, - 7, - true - ], - "assign": "bucketAliasSuffix" - }, + "--x-s3" + ] + } + ], + "rules": [ { - "fn": "substring", - "argv": [ + "conditions": [ { - "ref": "Bucket" - }, - 32, - 49, - true + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } ], - "assign": "outpostId" + "error": "S3Express does not support Dual-stack.", + "type": "error" }, { - "fn": "aws.partition", - "argv": [ + "conditions": [ { - "ref": "Region" + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] } ], - "assign": "regionPartition" + "error": "S3Express does not support S3 Accelerate.", + "type": "error" }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "bucketAliasSuffix" - }, - "--op-s3" - ] - } - ], - "rules": [ { "conditions": [ { - "fn": "isValidHostLabel", + "fn": "isSet", "argv": [ { - "ref": "outpostId" - }, - false + "ref": "Endpoint" + } ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" } ], "rules": [ { "conditions": [ { - "fn": "stringEquals", + "fn": "isSet", "argv": [ { - "ref": "hardwareType" + "ref": "DisableS3ExpressSessionAuth" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" }, - "e" + true ] } ], @@ -902,12 +929,18 @@ { "conditions": [ { - "fn": "stringEquals", + "fn": "booleanEquals", "argv": [ { - "ref": "regionPrefix" + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] }, - "beta" + true ] } ], @@ -915,50 +948,65 @@ { "conditions": [ { - "fn": "not", + "fn": "uriEncode", "argv": [ { - "fn": "isSet", - "argv": [ + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "ref": "Endpoint" + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } ] - } - ] + }, + "headers": {} + }, + "type": "endpoint" } ], - "error": "Expected a endpoint to be specified but no endpoint was found", - "type": "error" - }, + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ { - "conditions": [ + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] + "ref": "Bucket" }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], + false + ] + } + ], + "rules": [ + { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.ec2.{url#authority}", + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", "properties": { + "backend": "S3Express", "authSchemes": [ { "disableDoubleEncoding": true, "name": "sigv4", - "signingName": "s3-outposts", + "signingName": "s3express", "signingRegion": "{Region}" } ] @@ -972,21 +1020,8 @@ }, { "conditions": [], - "endpoint": { - "url": "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" + "error": "S3Express bucket name is not a valid virtual hostable name.", + "type": "error" } ], "type": "tree" @@ -994,12 +1029,18 @@ { "conditions": [ { - "fn": "stringEquals", + "fn": "booleanEquals", "argv": [ { - "ref": "hardwareType" + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] }, - "o" + true ] } ], @@ -1007,64 +1048,28 @@ { "conditions": [ { - "fn": "stringEquals", + "fn": "uriEncode", "argv": [ { - "ref": "regionPrefix" - }, - "beta" - ] + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" } ], "rules": [ { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - } - ], - "error": "Expected a endpoint to be specified but no endpoint was found", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "endpoint": { - "url": "https://{Bucket}.op-{outpostId}.{url#authority}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "{Region}" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } ] }, @@ -1074,17 +1079,34 @@ } ], "type": "tree" - }, + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] + } + ], + "rules": [ { "conditions": [], "endpoint": { - "url": "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", "properties": { + "backend": "S3Express", "authSchemes": [ { "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-outposts", + "name": "sigv4-s3express", + "signingName": "s3express", "signingRegion": "{Region}" } ] @@ -1098,50 +1120,49 @@ }, { "conditions": [], - "error": "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", + "error": "S3Express bucket name is not a valid virtual hostable name.", "type": "error" } ], "type": "tree" }, - { - "conditions": [], - "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Bucket" - } - ] - } - ], - "rules": [ { "conditions": [ { "fn": "isSet", "argv": [ { - "ref": "Endpoint" + "ref": "UseS3ExpressControlEndpoint" } ] }, { - "fn": "not", + "fn": "booleanEquals", "argv": [ { - "fn": "isSet", + "ref": "UseS3ExpressControlEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "uriEncode", "argv": [ { - "fn": "parseURL", + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", "argv": [ { "ref": "Endpoint" @@ -1150,23 +1171,64 @@ } ] } - ] + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" } ], - "error": "Custom endpoint `{Endpoint}` was not a valid URI", - "type": "error" + "type": "tree" }, { "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "ForcePathStyle" - }, - false - ] - }, { "fn": "aws.isVirtualHostableS3Bucket", "argv": [ @@ -1181,70 +1243,63 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "isSet", "argv": [ { - "ref": "Region" + "ref": "DisableS3ExpressSessionAuth" } - ], - "assign": "partitionResult" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + }, + true + ] } ], "rules": [ { "conditions": [ { - "fn": "isValidHostLabel", + "fn": "substring", "argv": [ { - "ref": "Region" + "ref": "Bucket" }, - false - ] - } - ], - "rules": [ + 6, + 14, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, { - "conditions": [ + "fn": "substring", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] + "ref": "Bucket" }, - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "partitionResult" - }, - "name" - ] - }, - "aws-cn" - ] - } + 14, + 16, + true ], - "error": "S3 Accelerate cannot be used in this region", - "type": "error" + "assign": "s3expressAvailabilityZoneDelim" }, { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] + "ref": "s3expressAvailabilityZoneDelim" }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ { "fn": "booleanEquals", "argv": [ @@ -1253,48 +1308,18 @@ }, true ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] } ], "endpoint": { - "url": "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", "properties": { + "backend": "S3Express", "authSchemes": [ { "disableDoubleEncoding": true, "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" + "signingName": "s3express", + "signingRegion": "{Region}" } ] }, @@ -1303,20 +1328,959 @@ "type": "endpoint" }, { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "ref": "UseDualStack" - }, - true + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } ] }, - { - "fn": "booleanEquals", - "argv": [ - { + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 15, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 15, + 17, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Unrecognized S3Express bucket name format.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 14, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 14, + 16, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 15, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 15, + 17, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Unrecognized S3Express bucket name format.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "S3Express bucket name is not a valid virtual hostable name.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + } + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "UseS3ExpressControlEndpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseS3ExpressControlEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://s3express-control-fips.{Region}.amazonaws.com", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://s3express-control.{Region}.amazonaws.com", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 49, + 50, + true + ], + "assign": "hardwareType" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 8, + 12, + true + ], + "assign": "regionPrefix" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 7, + true + ], + "assign": "bucketAliasSuffix" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 32, + 49, + true + ], + "assign": "outpostId" + }, + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "regionPartition" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "bucketAliasSuffix" + }, + "--op-s3" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "outpostId" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "hardwareType" + }, + "e" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "regionPrefix" + }, + "beta" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + } + ], + "error": "Expected a endpoint to be specified but no endpoint was found", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "https://{Bucket}.ec2.{url#authority}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "hardwareType" + }, + "o" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "regionPrefix" + }, + "beta" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + } + ], + "error": "Expected a endpoint to be specified but no endpoint was found", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "https://{Bucket}.op-{outpostId}.{url#authority}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + } + ] + } + ], + "error": "Custom endpoint `{Endpoint}` was not a valid URI", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "ForcePathStyle" + }, + false + ] + }, + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "partitionResult" + }, + "name" + ] + }, + "aws-cn" + ] + } + ], + "error": "S3 Accelerate cannot be used in this region", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { "ref": "UseFIPS" }, true @@ -12549,18 +13513,256 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "us-west-2", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla path style@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + fips@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "path style + accelerate = error@cn-north-1", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.cn-north-1.amazonaws.com.cn/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "path style + arn is error@cn-north-1", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + invalid DNS name@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "no path style + invalid DNS name@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", "disableDoubleEncoding": true } ] }, - "url": "https://s3.us-west-2.amazonaws.com/99a_b" + "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2" + "AWS::Region": "cn-north-1" }, "operationName": "GetObject", "operationParams": { @@ -12572,13 +13774,13 @@ "params": { "Accelerate": false, "Bucket": "99a_b", - "Region": "us-west-2", + "Region": "cn-north-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "vanilla path style@cn-north-1", + "documentation": "vanilla path style@af-south-1", "expect": { "endpoint": { "properties": { @@ -12586,18 +13788,18 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "cn-north-1", + "signingRegion": "af-south-1", "disableDoubleEncoding": true } ] }, - "url": "https://s3.cn-north-1.amazonaws.com.cn/bucket-name" + "url": "https://s3.af-south-1.amazonaws.com/bucket-name" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", + "AWS::Region": "af-south-1", "AWS::S3::ForcePathStyle": true }, "operationName": "GetObject", @@ -12611,20 +13813,32 @@ "Accelerate": false, "Bucket": "bucket-name", "ForcePathStyle": true, - "Region": "cn-north-1", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "path style + fips@cn-north-1", + "documentation": "path style + fips@af-south-1", "expect": { - "error": "Partition does not support FIPS" + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.af-south-1.amazonaws.com/bucket-name" + } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", + "AWS::Region": "af-south-1", "AWS::UseFIPS": true, "AWS::S3::ForcePathStyle": true }, @@ -12639,20 +13853,20 @@ "Accelerate": false, "Bucket": "bucket-name", "ForcePathStyle": true, - "Region": "cn-north-1", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": true } }, { - "documentation": "path style + accelerate = error@cn-north-1", + "documentation": "path style + accelerate = error@af-south-1", "expect": { "error": "Path-style addressing cannot be used with S3 Accelerate" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", + "AWS::Region": "af-south-1", "AWS::S3::ForcePathStyle": true, "AWS::S3::Accelerate": true }, @@ -12667,13 +13881,13 @@ "Accelerate": true, "Bucket": "bucket-name", "ForcePathStyle": true, - "Region": "cn-north-1", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "path style + dualstack@cn-north-1", + "documentation": "path style + dualstack@af-south-1", "expect": { "endpoint": { "properties": { @@ -12681,18 +13895,18 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "cn-north-1", + "signingRegion": "af-south-1", "disableDoubleEncoding": true } ] }, - "url": "https://s3.dualstack.cn-north-1.amazonaws.com.cn/bucket-name" + "url": "https://s3.dualstack.af-south-1.amazonaws.com/bucket-name" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", + "AWS::Region": "af-south-1", "AWS::UseDualStack": true, "AWS::S3::ForcePathStyle": true }, @@ -12707,20 +13921,20 @@ "Accelerate": false, "Bucket": "bucket-name", "ForcePathStyle": true, - "Region": "cn-north-1", + "Region": "af-south-1", "UseDualStack": true, "UseFIPS": false } }, { - "documentation": "path style + arn is error@cn-north-1", + "documentation": "path style + arn is error@af-south-1", "expect": { "error": "Path-style addressing cannot be used with ARN buckets" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", + "AWS::Region": "af-south-1", "AWS::S3::ForcePathStyle": true }, "operationName": "GetObject", @@ -12734,13 +13948,13 @@ "Accelerate": false, "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", "ForcePathStyle": true, - "Region": "cn-north-1", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "path style + invalid DNS name@cn-north-1", + "documentation": "path style + invalid DNS name@af-south-1", "expect": { "endpoint": { "properties": { @@ -12748,18 +13962,18 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "cn-north-1", + "signingRegion": "af-south-1", "disableDoubleEncoding": true } ] }, - "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" + "url": "https://s3.af-south-1.amazonaws.com/99a_b" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", + "AWS::Region": "af-south-1", "AWS::S3::ForcePathStyle": true }, "operationName": "GetObject", @@ -12773,13 +13987,13 @@ "Accelerate": false, "Bucket": "99a_b", "ForcePathStyle": true, - "Region": "cn-north-1", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "no path style + invalid DNS name@cn-north-1", + "documentation": "no path style + invalid DNS name@af-south-1", "expect": { "endpoint": { "properties": { @@ -12787,18 +14001,18 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "cn-north-1", + "signingRegion": "af-south-1", "disableDoubleEncoding": true } ] }, - "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" + "url": "https://s3.af-south-1.amazonaws.com/99a_b" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1" + "AWS::Region": "af-south-1" }, "operationName": "GetObject", "operationParams": { @@ -12810,13 +14024,13 @@ "params": { "Accelerate": false, "Bucket": "99a_b", - "Region": "cn-north-1", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "vanilla path style@af-south-1", + "documentation": "virtual addressing + private link@us-west-2", "expect": { "endpoint": { "properties": { @@ -12824,19 +14038,19 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "af-south-1", + "signingRegion": "us-west-2", "disableDoubleEncoding": true } ] }, - "url": "https://s3.af-south-1.amazonaws.com/bucket-name" + "url": "http://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::ForcePathStyle": true + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" }, "operationName": "GetObject", "operationParams": { @@ -12848,34 +14062,35 @@ "params": { "Accelerate": false, "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "af-south-1", + "ForcePathStyle": false, + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "path style + fips@af-south-1", + "documentation": "path style + private link@us-west-2", "expect": { "endpoint": { "properties": { "authSchemes": [ { + "name": "sigv4", "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true, - "name": "sigv4" + "signingRegion": "us-west-2", + "disableDoubleEncoding": true } ] }, - "url": "https://s3-fips.af-south-1.amazonaws.com/bucket-name" + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true, + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", "AWS::S3::ForcePathStyle": true }, "operationName": "GetObject", @@ -12889,21 +14104,80 @@ "Accelerate": false, "Bucket": "bucket-name", "ForcePathStyle": true, - "Region": "af-south-1", + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + FIPS@us-west-2", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", "UseDualStack": false, "UseFIPS": true } }, { - "documentation": "path style + accelerate = error@af-south-1", + "documentation": "SDK::Host + DualStack@us-west-2", "expect": { - "error": "Path-style addressing cannot be used with S3 Accelerate" + "error": "Cannot set dual-stack in combination with a custom endpoint." }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::ForcePathStyle": true, + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@us-west-2", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", "AWS::S3::Accelerate": true }, "operationName": "GetObject", @@ -12914,16 +14188,97 @@ } ], "params": { - "Accelerate": true, + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + private link@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "af-south-1", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "path style + dualstack@af-south-1", + "documentation": "path style + private link@cn-north-1", "expect": { "endpoint": { "properties": { @@ -12931,19 +14286,19 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "af-south-1", + "signingRegion": "cn-north-1", "disableDoubleEncoding": true } ] }, - "url": "https://s3.dualstack.af-south-1.amazonaws.com/bucket-name" + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseDualStack": true, + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", "AWS::S3::ForcePathStyle": true }, "operationName": "GetObject", @@ -12957,79 +14312,72 @@ "Accelerate": false, "Bucket": "bucket-name", "ForcePathStyle": true, - "Region": "af-south-1", - "UseDualStack": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "path style + arn is error@af-south-1", + "documentation": "FIPS@cn-north-1", "expect": { - "error": "Path-style addressing cannot be used with ARN buckets" + "error": "Partition does not support FIPS" }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", - "Key": "key" - } - } - ], "params": { "Accelerate": false, - "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", - "ForcePathStyle": true, - "Region": "af-south-1", + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", "UseDualStack": false, - "UseFIPS": false + "UseFIPS": true } }, { - "documentation": "path style + invalid DNS name@af-south-1", + "documentation": "SDK::Host + DualStack@cn-north-1", "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.af-south-1.amazonaws.com/99a_b" - } + "error": "Cannot set dual-stack in combination with a custom endpoint." }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::ForcePathStyle": true + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" }, "operationName": "GetObject", "operationParams": { - "Bucket": "99a_b", + "Bucket": "bucket-name", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "99a_b", - "ForcePathStyle": true, - "Region": "af-south-1", + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@cn-north-1", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "no path style + invalid DNS name@af-south-1", + "documentation": "SDK::Host + access point ARN@cn-north-1", "expect": { "endpoint": { "properties": { @@ -13037,36 +14385,39 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "af-south-1", + "signingRegion": "cn-north-1", "disableDoubleEncoding": true } ] }, - "url": "https://s3.af-south-1.amazonaws.com/99a_b" + "url": "https://myendpoint-123456789012.beta.example.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1" + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://beta.example.com" }, "operationName": "GetObject", "operationParams": { - "Bucket": "99a_b", + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "99a_b", - "Region": "af-south-1", + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "cn-north-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "virtual addressing + private link@us-west-2", + "documentation": "virtual addressing + private link@af-south-1", "expect": { "endpoint": { "properties": { @@ -13074,19 +14425,19 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "us-west-2", + "signingRegion": "af-south-1", "disableDoubleEncoding": true } ] }, - "url": "http://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" }, "operationName": "GetObject", "operationParams": { @@ -13099,14 +14450,14 @@ "Accelerate": false, "Bucket": "bucket-name", "ForcePathStyle": false, - "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "us-west-2", + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "path style + private link@us-west-2", + "documentation": "path style + private link@af-south-1", "expect": { "endpoint": { "properties": { @@ -13114,7 +14465,7 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "us-west-2", + "signingRegion": "af-south-1", "disableDoubleEncoding": true } ] @@ -13125,7 +14476,7 @@ "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2", + "AWS::Region": "af-south-1", "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", "AWS::S3::ForcePathStyle": true }, @@ -13141,20 +14492,20 @@ "Bucket": "bucket-name", "ForcePathStyle": true, "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "us-west-2", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "SDK::Host + FIPS@us-west-2", + "documentation": "SDK::Host + FIPS@af-south-1", "expect": { "error": "A custom endpoint cannot be combined with FIPS" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2", + "AWS::Region": "af-south-1", "AWS::UseFIPS": true, "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" }, @@ -13170,20 +14521,20 @@ "Bucket": "bucket-name", "ForcePathStyle": false, "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "us-west-2", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": true } }, { - "documentation": "SDK::Host + DualStack@us-west-2", + "documentation": "SDK::Host + DualStack@af-south-1", "expect": { "error": "Cannot set dual-stack in combination with a custom endpoint." }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2", + "AWS::Region": "af-south-1", "AWS::UseDualStack": true, "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" }, @@ -13199,21 +14550,21 @@ "Bucket": "bucket-name", "ForcePathStyle": false, "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "us-west-2", + "Region": "af-south-1", "UseDualStack": true, "UseFIPS": false } }, { - "documentation": "SDK::HOST + accelerate@us-west-2", + "documentation": "SDK::HOST + accelerate@af-south-1", "expect": { "error": "A custom endpoint cannot be combined with S3 Accelerate" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", "AWS::S3::Accelerate": true }, "operationName": "GetObject", @@ -13227,14 +14578,92 @@ "Accelerate": true, "Bucket": "bucket-name", "ForcePathStyle": false, - "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, "Region": "us-west-2", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "SDK::Host + access point ARN@us-west-2", + "documentation": "access point arn + FIPS@us-west-2", "expect": { "endpoint": { "properties": { @@ -13247,14 +14676,41 @@ } ] }, - "url": "https://myendpoint-123456789012.beta.example.com" + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "access point arn + accelerate = error@us-west-2", + "expect": { + "error": "Access Points do not support S3 Accelerate" }, "operationInputs": [ { "builtInParams": { "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://beta.example.com" + "AWS::S3::Accelerate": true }, "operationName": "GetObject", "operationParams": { @@ -13264,17 +14720,16 @@ } ], "params": { - "Accelerate": false, + "Accelerate": true, "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", "ForcePathStyle": false, - "Endpoint": "https://beta.example.com", "Region": "us-west-2", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "virtual addressing + private link@cn-north-1", + "documentation": "access point arn + FIPS + DualStack@us-west-2", "expect": { "endpoint": { "properties": { @@ -13282,39 +14737,39 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "cn-north-1", + "signingRegion": "us-west-2", "disableDoubleEncoding": true } ] }, - "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "bucket-name", + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "bucket-name", + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": true } }, { - "documentation": "path style + private link@cn-north-1", + "documentation": "vanilla access point arn@cn-north-1", "expect": { "endpoint": { "properties": { @@ -13327,41 +14782,38 @@ } ] }, - "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + "url": "https://myendpoint-123456789012.s3-accesspoint.cn-north-1.amazonaws.com.cn" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "AWS::S3::ForcePathStyle": true + "AWS::Region": "cn-north-1" }, "operationName": "GetObject", "operationParams": { - "Bucket": "bucket-name", + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, "Region": "cn-north-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "FIPS@cn-north-1", + "documentation": "access point arn + FIPS@cn-north-1", "expect": { "error": "Partition does not support FIPS" }, "params": { "Accelerate": false, - "Bucket": "bucket-name", + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", "ForcePathStyle": false, "Region": "cn-north-1", "UseDualStack": false, @@ -13369,51 +14821,48 @@ } }, { - "documentation": "SDK::Host + DualStack@cn-north-1", + "documentation": "access point arn + accelerate = error@cn-north-1", "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." + "error": "Access Points do not support S3 Accelerate" }, "operationInputs": [ { "builtInParams": { "AWS::Region": "cn-north-1", - "AWS::UseDualStack": true, - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + "AWS::S3::Accelerate": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "bucket-name", + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", "Key": "key" } } ], "params": { - "Accelerate": false, - "Bucket": "bucket-name", + "Accelerate": true, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", "Region": "cn-north-1", - "UseDualStack": true, + "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "SDK::HOST + accelerate@cn-north-1", + "documentation": "access point arn + FIPS + DualStack@cn-north-1", "expect": { - "error": "A custom endpoint cannot be combined with S3 Accelerate" + "error": "Partition does not support FIPS" }, "params": { - "Accelerate": true, - "Bucket": "bucket-name", + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseDualStack": true, + "UseFIPS": true } }, { - "documentation": "SDK::Host + access point ARN@cn-north-1", + "documentation": "vanilla access point arn@af-south-1", "expect": { "endpoint": { "properties": { @@ -13421,39 +14870,37 @@ { "name": "sigv4", "signingName": "s3", - "signingRegion": "cn-north-1", + "signingRegion": "af-south-1", "disableDoubleEncoding": true } ] }, - "url": "https://myendpoint-123456789012.beta.example.com" + "url": "https://myendpoint-123456789012.s3-accesspoint.af-south-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", - "SDK::Endpoint": "https://beta.example.com" + "AWS::Region": "af-south-1" }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", "ForcePathStyle": false, - "Endpoint": "https://beta.example.com", - "Region": "cn-north-1", + "Region": "af-south-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "virtual addressing + private link@af-south-1", + "documentation": "access point arn + FIPS@af-south-1", "expect": { "endpoint": { "properties": { @@ -13466,34 +14913,60 @@ } ] }, - "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.af-south-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + "AWS::UseFIPS": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "bucket-name", + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "bucket-name", + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "access point arn + accelerate = error@af-south-1", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", "Region": "af-south-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "path style + private link@af-south-1", + "documentation": "access point arn + FIPS + DualStack@af-south-1", "expect": { "endpoint": { "properties": { @@ -13506,874 +14979,954 @@ } ] }, - "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.af-south-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "AWS::S3::ForcePathStyle": true + "AWS::UseFIPS": true, + "AWS::UseDualStack": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "bucket-name", + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseDualStack": true, + "UseFIPS": true } }, { - "documentation": "SDK::Host + FIPS@af-south-1", + "documentation": "S3 outposts vanilla test", "expect": { - "error": "A custom endpoint cannot be combined with FIPS" + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com" + } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true, - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + "AWS::Region": "us-west-2" }, "operationName": "GetObject", "operationParams": { - "Bucket": "bucket-name", + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", "Key": "key" } } ], "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", + "Region": "us-west-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": true + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" } }, { - "documentation": "SDK::Host + DualStack@af-south-1", + "documentation": "S3 outposts custom endpoint", "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.example.amazonaws.com" + } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseDualStack": true, - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.amazonaws.com" }, "operationName": "GetObject", "operationParams": { - "Bucket": "bucket-name", + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", "Key": "key" } } ], "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": false + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Endpoint": "https://example.amazonaws.com" } }, { - "documentation": "SDK::HOST + accelerate@af-south-1", + "documentation": "outposts arn with region mismatch and UseArnRegion=false", "expect": { - "error": "A custom endpoint cannot be combined with S3 Accelerate" + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "AWS::S3::Accelerate": true + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false }, "operationName": "GetObject", "operationParams": { - "Bucket": "bucket-name", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", "Key": "key" } } ], "params": { - "Accelerate": true, - "Bucket": "bucket-name", + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", + "UseArnRegion": false, + "Region": "us-west-2", "UseDualStack": false, "UseFIPS": false } - }, - { - "documentation": "SDK::Host + access point ARN@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.beta.example.com" - } + }, + { + "documentation": "outposts arn with region mismatch, custom region and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://beta.example.com" + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseArnRegion": false }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Endpoint": "https://example.com", "ForcePathStyle": false, - "Endpoint": "https://beta.example.com", - "Region": "af-south-1", + "UseArnRegion": false, + "Region": "us-west-2", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "vanilla access point arn@us-west-2", + "documentation": "outposts arn with region mismatch and UseArnRegion=true", "expect": { "endpoint": { "properties": { "authSchemes": [ { "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", "disableDoubleEncoding": true } ] }, - "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2" + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", "ForcePathStyle": false, + "UseArnRegion": true, "Region": "us-west-2", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "access point arn + FIPS@us-west-2", + "documentation": "outposts arn with region mismatch and UseArnRegion unset", "expect": { "endpoint": { "properties": { "authSchemes": [ { "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", "disableDoubleEncoding": true } ] }, - "url": "https://myendpoint-123456789012.s3-accesspoint-fips.us-west-2.amazonaws.com" + "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true + "AWS::Region": "us-west-2" }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", "Key": "key" } } ], "params": { "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", "ForcePathStyle": false, "Region": "us-west-2", "UseDualStack": false, - "UseFIPS": true + "UseFIPS": false } }, { - "documentation": "access point arn + accelerate = error@us-west-2", + "documentation": "outposts arn with partition mismatch and UseArnRegion=true", "expect": { - "error": "Access Points do not support S3 Accelerate" + "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn`" }, "operationInputs": [ { "builtInParams": { "AWS::Region": "us-west-2", - "AWS::S3::Accelerate": true + "AWS::S3::UseArnRegion": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", "Key": "key" } } ], "params": { - "Accelerate": true, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", "ForcePathStyle": false, + "UseArnRegion": true, "Region": "us-west-2", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "access point arn + FIPS + DualStack@us-west-2", + "documentation": "ARN with UseGlobalEndpoint and use-east-1 region uses the regional endpoint", "expect": { "endpoint": { "properties": { "authSchemes": [ { "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", "disableDoubleEncoding": true } ] }, - "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", "Key": "key" } } ], "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "us-west-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts does not support dualstack", + "expect": { + "error": "S3 Outposts does not support Dual-stack" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": true, - "UseFIPS": true + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" } }, { - "documentation": "vanilla access point arn@cn-north-1", + "documentation": "S3 outposts does not support fips", + "expect": { + "error": "S3 Outposts does not support FIPS" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts does not support accelerate", + "expect": { + "error": "S3 Outposts does not support S3 Accelerate" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "validates against subresource", + "expect": { + "error": "Invalid Arn: Outpost Access Point ARN contains sub resources" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:mybucket:object:foo" + } + }, + { + "documentation": "object lambda @us-east-1", "expect": { "endpoint": { "properties": { "authSchemes": [ { "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", "disableDoubleEncoding": true } ] }, - "url": "https://myendpoint-123456789012.s3-accesspoint.cn-north-1.amazonaws.com.cn" + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1" + "AWS::Region": "us-east-1", + "AWS::S3::UseArnRegion": false }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { - "Accelerate": false, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "cn-north-1", + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "access point arn + FIPS@cn-north-1", - "expect": { - "error": "Partition does not support FIPS" - }, - "params": { "Accelerate": false, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" } }, { - "documentation": "access point arn + accelerate = error@cn-north-1", + "documentation": "object lambda @us-west-2", "expect": { - "error": "Access Points do not support S3 Accelerate" + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" + } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::S3::Accelerate": true + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { - "Accelerate": true, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "cn-north-1", + "Region": "us-west-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" } }, { - "documentation": "access point arn + FIPS + DualStack@cn-north-1", + "documentation": "object lambda, colon resource deliminator @us-west-2", "expect": { - "error": "Partition does not support FIPS" + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" + } }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner", + "Key": "key" + } + } + ], "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, "Accelerate": false, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner" } }, { - "documentation": "vanilla access point arn@af-south-1", + "documentation": "object lambda @us-east-1, client region us-west-2, useArnRegion=true", "expect": { "endpoint": { "properties": { "authSchemes": [ { "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", "disableDoubleEncoding": true } ] }, - "url": "https://myendpoint-123456789012.s3-accesspoint.af-south-1.amazonaws.com" + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1" + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "af-south-1", + "Region": "us-west-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" } }, { - "documentation": "access point arn + FIPS@af-south-1", + "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=true", "expect": { "endpoint": { "properties": { "authSchemes": [ { "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", "disableDoubleEncoding": true } ] }, - "url": "https://myendpoint-123456789012.s3-accesspoint-fips.af-south-1.amazonaws.com" + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true + "AWS::Region": "s3-external-1", + "AWS::S3::UseArnRegion": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "af-south-1", + "Region": "s3-external-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": true + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" } }, { - "documentation": "access point arn + accelerate = error@af-south-1", + "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=false", "expect": { - "error": "Access Points do not support S3 Accelerate" + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `s3-external-1` and UseArnRegion is `false`" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::Accelerate": true + "AWS::Region": "s3-external-1", + "AWS::S3::UseArnRegion": false }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { - "Accelerate": true, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "af-south-1", + "Region": "s3-external-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" } }, { - "documentation": "access point arn + FIPS + DualStack@af-south-1", + "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=true", "expect": { "endpoint": { "properties": { "authSchemes": [ { "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", "disableDoubleEncoding": true } ] }, - "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.af-south-1.amazonaws.com" + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" } }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, "Accelerate": false, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": true + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" } }, { - "documentation": "S3 outposts vanilla test", + "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=false", "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com" - } + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `aws-global` and UseArnRegion is `false`" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2" + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": false }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { - "Region": "us-west-2", + "Region": "aws-global", "UseFIPS": false, "UseDualStack": false, "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" } }, { - "documentation": "S3 outposts custom endpoint", + "documentation": "object lambda @cn-north-1, client region us-west-2 (cross partition), useArnRegion=true", "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://reports-123456789012.op-01234567890123456.example.amazonaws.com" - } + "error": "Client was configured for partition `aws` but ARN (`arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner`) has `aws-cn`" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://example.amazonaws.com" + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { - "Region": "us-west-2", + "Region": "aws-global", "UseFIPS": false, "UseDualStack": false, "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", - "Endpoint": "https://example.amazonaws.com" + "UseArnRegion": true, + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" } }, { - "documentation": "outposts arn with region mismatch and UseArnRegion=false", + "documentation": "object lambda with dualstack", "expect": { - "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + "error": "S3 Object Lambda does not support Dual-stack" }, "operationInputs": [ { "builtInParams": { "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, "AWS::S3::UseArnRegion": false }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": true, "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "ForcePathStyle": false, "UseArnRegion": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" } }, { - "documentation": "outposts arn with region mismatch, custom region and UseArnRegion=false", + "documentation": "object lambda @us-gov-east-1", "expect": { - "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://example.com", - "AWS::S3::UseArnRegion": false + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "Key": "key" - } + "url": "https://mybanner-123456789012.s3-object-lambda.us-gov-east-1.amazonaws.com" } - ], + }, "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false, "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "Endpoint": "https://example.com", - "ForcePathStyle": false, "UseArnRegion": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" } }, { - "documentation": "outposts arn with region mismatch and UseArnRegion=true", + "documentation": "object lambda @us-gov-east-1, with fips", "expect": { "endpoint": { "properties": { "authSchemes": [ { "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", + "signingName": "s3-object-lambda", + "signingRegion": "us-gov-east-1", "disableDoubleEncoding": true } ] }, - "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" + "url": "https://mybanner-123456789012.s3-object-lambda-fips.us-gov-east-1.amazonaws.com" } }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @cn-north-1, with fips", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with accelerate", + "expect": { + "error": "S3 Object Lambda does not support S3 Accelerate" + }, "operationInputs": [ { "builtInParams": { "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": true + "AWS::S3::Accelerate": true, + "AWS::S3::UseArnRegion": false }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", "Key": "key" } } ], "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "ForcePathStyle": false, - "UseArnRegion": true, "Region": "us-west-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Accelerate": true, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" } }, { - "documentation": "outposts arn with region mismatch and UseArnRegion unset", + "documentation": "object lambda with invalid arn - bad service and someresource", "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" - } + "error": "Invalid ARN: Unrecognized format: arn:aws:sqs:us-west-2:123456789012:someresource (type: someresource)" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-west-2" + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource", "Key": "key" } } ], "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "ForcePathStyle": false, + "UseArnRegion": false, + "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource" + } + }, + { + "documentation": "object lambda with invalid arn - invalid resource", + "expect": { + "error": "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `bucket_name`" + }, + "params": { "Region": "us-west-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:bucket_name:mybucket" } }, { - "documentation": "outposts arn with partition mismatch and UseArnRegion=true", + "documentation": "object lambda with invalid arn - missing region", "expect": { - "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn`" + "error": "Invalid ARN: bucket ARN is missing a region" }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "Key": "key" - } - } - ], "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "ForcePathStyle": false, - "UseArnRegion": true, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda::123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with invalid arn - missing account-id", + "expect": { + "error": "Invalid ARN: Missing account id" + }, + "params": { "Region": "us-west-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2::accesspoint/mybanner" } }, { - "documentation": "ARN with UseGlobalEndpoint and use-east-1 region uses the regional endpoint", + "documentation": "object lambda with invalid arn - account id contains invalid characters", "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" - } + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123.45678.9012`" }, "operationInputs": [ { "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::UseGlobalEndpoint": true + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true }, "operationName": "GetObject", "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket", "Key": "key" } } ], "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, + "Region": "us-west-2", "UseFIPS": false, "UseDualStack": false, "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket" } }, { - "documentation": "S3 outposts does not support dualstack", + "documentation": "object lambda with invalid arn - missing access point name", "expect": { - "error": "S3 Outposts does not support Dual-stack" + "error": "Invalid ARN: Expected a resource of the format `accesspoint:In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name is globally\n unique, and the namespace is shared by all Amazon Web Services accounts.
" + "smithy.api#documentation": "In terms of implementation, a Bucket is a resource.
" } }, "com.amazonaws.s3#BucketAccelerateStatus": { @@ -15790,7 +17513,8 @@ "members": {}, "traits": { "smithy.api#documentation": "The requested bucket name is not available. The bucket namespace is shared by all users\n of the system. Select a different name and try again.
", - "smithy.api#error": "client" + "smithy.api#error": "client", + "smithy.api#httpError": 409 } }, "com.amazonaws.s3#BucketAlreadyOwnedByYou": { @@ -15798,7 +17522,8 @@ "members": {}, "traits": { "smithy.api#documentation": "The bucket you tried to create already exists, and you own it. Amazon S3 returns this error\n in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you\n re-create an existing bucket that you already own in the North Virginia Region, Amazon S3\n returns 200 OK and resets the bucket access control lists (ACLs).
", - "smithy.api#error": "client" + "smithy.api#error": "client", + "smithy.api#httpError": 409 } }, "com.amazonaws.s3#BucketCannedACL": { @@ -15830,6 +17555,26 @@ } } }, + "com.amazonaws.s3#BucketInfo": { + "type": "structure", + "members": { + "DataRedundancy": { + "target": "com.amazonaws.s3#DataRedundancy", + "traits": { + "smithy.api#documentation": "The number of Availability Zone that's used for redundancy for the bucket.
" + } + }, + "Type": { + "target": "com.amazonaws.s3#BucketType", + "traits": { + "smithy.api#documentation": "The type of bucket.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Specifies the information about the bucket that will be created. For more information about directory buckets, see \n Directory buckets in the Amazon S3 User Guide.
\nThis functionality is only supported by directory buckets.
\nThe base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumCRC32C": { "target": "com.amazonaws.s3#ChecksumCRC32C", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } } }, @@ -16391,7 +18150,7 @@ "target": "com.amazonaws.s3#CompleteMultipartUploadOutput" }, "traits": { - "smithy.api#documentation": "Completes a multipart upload by assembling previously uploaded parts.
\nYou first initiate the multipart upload and then upload all parts using the UploadPart\n operation. After successfully uploading all relevant parts of an upload, you call this\n action to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts\n in ascending order by part number to create a new object. In the Complete Multipart Upload\n request, you must provide the parts list. You must ensure that the parts list is complete.\n This action concatenates the parts that you provide in the list. For each part in the list,\n you must provide the part number and the ETag
value, returned after that part\n was uploaded.
Processing of a Complete Multipart Upload request could take several minutes to\n complete. After Amazon S3 begins processing the request, it sends an HTTP response header that\n specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white\n space characters to keep the connection from timing out. A request could fail after the\n initial 200 OK response has been sent. This means that a 200 OK
response can\n contain either a success or an error. If you call the S3 API directly, make sure to design\n your application to parse the contents of the response and handle it appropriately. If you\n use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply\n error handling per your configuration settings (including automatically retrying the\n request as appropriate). If the condition persists, the SDKs throws an exception (or, for\n the SDKs that don't use exceptions, they return the error).
Note that if CompleteMultipartUpload
fails, applications should be prepared\n to retry the failed requests. For more information, see Amazon S3 Error Best\n Practices.
You cannot use Content-Type: application/x-www-form-urlencoded
with\n Complete Multipart Upload requests. Also, if you do not provide a\n Content-Type
header, CompleteMultipartUpload
returns a 200\n OK response.
For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload.
\nFor information about permissions required to use the multipart upload API, see Multipart Upload\n and Permissions.
\n\n CompleteMultipartUpload
has the following special errors:
Error code: EntityTooSmall
\n
Description: Your proposed upload is smaller than the minimum allowed object\n size. Each part must be at least 5 MB in size, except the last part.
\n400 Bad Request
\nError code: InvalidPart
\n
Description: One or more of the specified parts could not be found. The part\n might not have been uploaded, or the specified entity tag might not have\n matched the part's entity tag.
\n400 Bad Request
\nError code: InvalidPartOrder
\n
Description: The list of parts was not in ascending order. The parts list\n must be specified in order by part number.
\n400 Bad Request
\nError code: NoSuchUpload
\n
Description: The specified multipart upload does not exist. The upload ID\n might be invalid, or the multipart upload might have been aborted or\n completed.
\n404 Not Found
\nThe following operations are related to CompleteMultipartUpload
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nCompletes a multipart upload by assembling previously uploaded parts.
\nYou first initiate the multipart upload and then upload all parts using the UploadPart\n operation or the UploadPartCopy\n operation. After successfully uploading all relevant parts of an upload, you call this\n CompleteMultipartUpload
operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts\n in ascending order by part number to create a new object. In the CompleteMultipartUpload \n request, you must provide the parts list and ensure that the parts list is complete.\n The CompleteMultipartUpload API operation concatenates the parts that you provide in the list. For each part in the list,\n you must provide the PartNumber
value and the ETag
value that are returned after that part\n was uploaded.
The processing of a CompleteMultipartUpload request could take several minutes to\n finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that\n specifies a 200 OK
response. While processing is in progress, Amazon S3 periodically sends white\n space characters to keep the connection from timing out. A request could fail after the\n initial 200 OK
response has been sent. This means that a 200 OK
response can\n contain either a success or an error. The error response might be embedded in the 200 OK
response. \n If you call this API operation directly, make sure to design\n your application to parse the contents of the response and handle it appropriately. If you\n use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply\n error handling per your configuration settings (including automatically retrying the\n request as appropriate). If the condition persists, the SDKs throw an exception (or, for\n the SDKs that don't use exceptions, they return an error).
Note that if CompleteMultipartUpload
fails, applications should be prepared\n to retry the failed requests. For more information, see Amazon S3 Error Best\n Practices.
You can't use Content-Type: application/x-www-form-urlencoded
for the \n CompleteMultipartUpload requests. Also, if you don't provide a\n Content-Type
header, CompleteMultipartUpload
can still return a 200\n OK
response.
For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3\n User Guide.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - For information about permissions required to use the multipart upload API, see Multipart Upload\n and Permissions in the Amazon S3\n User Guide.
\n\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
Error Code: EntityTooSmall
\n
Description: Your proposed upload is smaller than the minimum allowed object\n size. Each part must be at least 5 MB in size, except the last part.
\nHTTP Status Code: 400 Bad Request
\nError Code: InvalidPart
\n
Description: One or more of the specified parts could not be found. The part\n might not have been uploaded, or the specified ETag might not have\n matched the uploaded part's ETag.
\nHTTP Status Code: 400 Bad Request
\nError Code: InvalidPartOrder
\n
Description: The list of parts was not in ascending order. The parts list\n must be specified in order by part number.
\nHTTP Status Code: 400 Bad Request
\nError Code: NoSuchUpload
\n
Description: The specified multipart upload does not exist. The upload ID\n might be invalid, or the multipart upload might have been aborted or\n completed.
\nHTTP Status Code: 404 Not Found
\n\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to CompleteMultipartUpload
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nThe name of the bucket that contains the newly created object. Does not return the access point\n ARN or access point alias if used.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the bucket that contains the newly created object. Does not return the access point\n ARN or access point alias if used.
\nAccess points are not supported by directory buckets.
\nIf the object expiration is configured, this will contain the expiration date\n (expiry-date
) and rule ID (rule-id
). The value of\n rule-id
is URL-encoded.
If the object expiration is configured, this will contain the expiration date\n (expiry-date
) and rule ID (rule-id
). The value of\n rule-id
is URL-encoded.
This functionality is not supported for directory buckets.
\nThe base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumCRC32C": { "target": "com.amazonaws.s3#ChecksumCRC32C", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ServerSideEncryption": { "target": "com.amazonaws.s3#ServerSideEncryption", "traits": { - "smithy.api#documentation": "The server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
).
The server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
).
For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
Version ID of the newly created object, in case the bucket has versioning turned\n on.
", + "smithy.api#documentation": "Version ID of the newly created object, in case the bucket has versioning turned\n on.
\nThis functionality is not supported for directory buckets.
\nIf present, specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
", + "smithy.api#documentation": "If present, indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
\nThis functionality is not supported for directory buckets.
\nIndicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
", + "smithy.api#documentation": "Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
\nThis functionality is not supported for directory buckets.
\nName of the bucket to which the multipart upload was initiated.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Name of the bucket to which the multipart upload was initiated.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is\n required only when the object was created using a checksum algorithm or if\n your bucket policy requires the use of SSE-C. For more information, see Protecting data\n using SSE-C keys in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is\n required only when the object was created using a checksum algorithm or if\n your bucket policy requires the use of SSE-C. For more information, see Protecting data\n using SSE-C keys in the Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nThe server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. \n For more information, see\n Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
", + "smithy.api#documentation": "The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. \n For more information, see\n Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nThe MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum \n algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
", + "smithy.api#documentation": "The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum \n algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nThe base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumCRC32C": { "target": "com.amazonaws.s3#ChecksumCRC32C", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "PartNumber": { "target": "com.amazonaws.s3#PartNumber", "traits": { - "smithy.api#documentation": "Part number that identifies the part. This is a positive integer between 1 and\n 10,000.
" + "smithy.api#documentation": "Part number that identifies the part. This is a positive integer between 1 and\n 10,000.
\n\n General purpose buckets - In CompleteMultipartUpload
, when a additional checksum (including x-amz-checksum-crc32
, x-amz-checksum-crc32c
, x-amz-checksum-sha1
, or \n x-amz-checksum-sha256
) is applied to each part, the PartNumber
must start at 1 and \n the part numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad Request
status code and an InvalidPartOrder
error code.
\n Directory buckets - In CompleteMultipartUpload
, the PartNumber
must start at 1 and \n the part numbers must be consecutive.
Creates a copy of an object that is already stored in Amazon S3.
\nYou can store individual objects of up to 5 TB in Amazon S3. You create a copy of your\n object up to 5 GB in size in a single atomic action using this API. However, to copy an\n object greater than 5 GB, you must use the multipart upload Upload Part - Copy\n (UploadPartCopy) API. For more information, see Copy Object Using the\n REST Multipart Upload API.
\nAll copy requests must be authenticated. Additionally, you must have\n read access to the source object and write\n access to the destination bucket. For more information, see REST Authentication. Both the\n Region that you want to copy the object from and the Region that you want to copy the\n object to must be enabled for your account.
\nA copy request might return an error when Amazon S3 receives the copy request or while Amazon S3\n is copying the files. If the error occurs before the copy action starts, you receive a\n standard Amazon S3 error. If the error occurs during the copy operation, the error response is\n embedded in the 200 OK
response. This means that a 200 OK
\n response can contain either a success or an error. If you call the S3 API directly, make\n sure to design your application to parse the contents of the response and handle it\n appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the\n embedded error and apply error handling per your configuration settings (including\n automatically retrying the request as appropriate). If the condition persists, the SDKs\n throws an exception (or, for the SDKs that don't use exceptions, they return the\n error).
If the copy is successful, you receive a response with information about the copied\n object.
\nIf the request is an HTTP 1.1 request, the response is chunk encoded. If it were not,\n it would not contain the content-length, and you would need to read the entire\n body.
\nThe copy request charge is based on the storage class and Region that you specify for\n the destination object. The request can also result in a data retrieval charge for the\n source if the source storage class bills for data retrieval. For pricing information, see\n Amazon S3 pricing.
\nAmazon S3 transfer acceleration does not support cross-Region copies. If you request a\n cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad\n Request
error. For more information, see Transfer\n Acceleration.
When copying an object, you can preserve all metadata (the default) or specify\n new metadata. However, the access control list (ACL) is not preserved and is set\n to private for the user making the request. To override the default ACL setting,\n specify a new ACL when generating a copy request. For more information, see Using\n ACLs.
\nTo specify whether you want the object metadata copied from the source object\n or replaced with metadata provided in the request, you can optionally add the\n x-amz-metadata-directive
header. When you grant permissions, you\n can use the s3:x-amz-metadata-directive
condition key to enforce\n certain metadata behavior when objects are uploaded. For more information, see\n Specifying Conditions in a\n Policy in the Amazon S3 User Guide. For a complete list\n of Amazon S3-specific condition keys, see Actions, Resources, and Condition\n Keys for Amazon S3.
\n x-amz-website-redirect-location
is unique to each object and\n must be specified in the request headers to copy the value.
To only copy an object under certain conditions, such as whether the\n Etag
matches or whether the object was modified before or after a\n specified date, use the following request parameters:
\n x-amz-copy-source-if-match
\n
\n x-amz-copy-source-if-none-match
\n
\n x-amz-copy-source-if-unmodified-since
\n
\n x-amz-copy-source-if-modified-since
\n
If both the x-amz-copy-source-if-match
and\n x-amz-copy-source-if-unmodified-since
headers are present in the\n request and evaluate as follows, Amazon S3 returns 200 OK
and copies the\n data:
\n x-amz-copy-source-if-match
condition evaluates to\n true
\n x-amz-copy-source-if-unmodified-since
condition evaluates to\n false
If both the x-amz-copy-source-if-none-match
and\n x-amz-copy-source-if-modified-since
headers are present in the\n request and evaluate as follows, Amazon S3 returns the 412 Precondition\n Failed
response code:
\n x-amz-copy-source-if-none-match
condition evaluates to\n false
\n x-amz-copy-source-if-modified-since
condition evaluates to\n true
All headers with the x-amz-
prefix, including\n x-amz-copy-source
, must be signed.
Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket.\n When copying an object, if you don't specify encryption information in your copy\n request, the encryption setting of the target object is set to the default\n encryption configuration of the destination bucket. By default, all buckets have a\n base level of encryption configuration that uses server-side encryption with Amazon S3\n managed keys (SSE-S3). If the destination bucket has a default encryption\n configuration that uses server-side encryption with Key Management Service (KMS) keys\n (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or\n server-side encryption with customer-provided encryption keys (SSE-C), Amazon S3 uses\n the corresponding KMS key, or a customer-provided key to encrypt the target\n object copy.
\nWhen you perform a CopyObject
operation, if you want to use a\n different type of encryption setting for the target object, you can use other\n appropriate encryption-related headers to encrypt the target object with a\n KMS key, an Amazon S3 managed key, or a customer-provided key. With server-side\n encryption, Amazon S3 encrypts your data as it writes your data to disks in its data\n centers and decrypts the data when you access it. If the encryption setting in\n your request is different from the default encryption configuration of the\n destination bucket, the encryption setting in your request takes precedence. If\n the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the\n object for copying. For more information about server-side encryption, see Using\n Server-Side Encryption.
If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the\n object. For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.
\nWhen copying an object, you can optionally use headers to grant ACL-based\n permissions. By default, all objects are private. Only the owner has full access\n control. When adding a new object, you can grant permissions to individual\n Amazon Web Services accounts or to predefined groups that are defined by Amazon S3. These permissions\n are then added to the ACL on the object. For more information, see Access Control\n List (ACL) Overview and Managing ACLs Using the REST\n API.
\nIf the bucket that you're copying objects to uses the bucket owner enforced\n setting for S3 Object Ownership, ACLs are disabled and no longer affect\n permissions. Buckets that use this setting only accept PUT
requests\n that don't specify an ACL or PUT
requests that specify bucket owner\n full control ACLs, such as the bucket-owner-full-control
canned ACL\n or an equivalent form of this ACL expressed in the XML format.
For more information, see Controlling\n ownership of objects and disabling ACLs in the\n Amazon S3 User Guide.
\nIf your bucket uses the bucket owner enforced setting for Object Ownership,\n all objects written to the bucket by any account will be owned by the bucket\n owner.
\nWhen copying an object, if it has a checksum, that checksum will be copied to\n the new object by default. When you copy the object over, you can optionally\n specify a different checksum algorithm to use with the\n x-amz-checksum-algorithm
header.
You can use the CopyObject
action to change the storage class of\n an object that is already stored in Amazon S3 by using the StorageClass
\n parameter. For more information, see Storage Classes in\n the Amazon S3 User Guide.
If the source object's storage class is GLACIER or\n DEEP_ARCHIVE, or the object's storage class is\n INTELLIGENT_TIERING and it's S3 Intelligent-Tiering access tier is\n Archive Access or Deep Archive Access, you must restore a copy of this object\n before you can use it as a source object for the copy operation. For more\n information, see RestoreObject. For\n more information, see Copying\n Objects.
\nBy default, x-amz-copy-source
header identifies the current\n version of an object to copy. If the current version is a delete marker, Amazon S3\n behaves as if the object was deleted. To copy a different version, use the\n versionId
subresource.
If you enable versioning on the target bucket, Amazon S3 generates a unique version\n ID for the object being copied. This version ID is different from the version ID\n of the source object. Amazon S3 returns the version ID of the copied object in the\n x-amz-version-id
response header in the response.
If you do not enable versioning or suspend it on the target bucket, the version\n ID that Amazon S3 generates is always null.
\nThe following operations are related to CopyObject
:
Creates a copy of an object that is already stored in Amazon S3.
\nYou can store individual objects of up to 5 TB in Amazon S3. You create a copy of your\n object up to 5 GB in size in a single atomic action using this API. However, to copy an\n object greater than 5 GB, you must use the multipart upload Upload Part - Copy\n (UploadPartCopy) API. For more information, see Copy Object Using the\n REST Multipart Upload API.
\nYou can copy individual objects between general purpose buckets, between directory buckets, and \n between general purpose buckets and directory buckets.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
Both the\n Region that you want to copy the object from and the Region that you want to copy the\n object to must be enabled for your account.
\nAmazon S3 transfer acceleration does not support cross-Region copies. If you request a\n cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad\n Request
error. For more information, see Transfer\n Acceleration.
All CopyObject
requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz-
prefix, including\n x-amz-copy-source
, must be signed. For more information, see REST Authentication.
\n Directory buckets - You must use the IAM credentials to authenticate and authorize your access to the CopyObject
API operation, instead of using the \n temporary security credentials through the CreateSession
API operation.
Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.
\nYou must have\n read access to the source object and write\n access to the destination bucket.
\n\n General purpose bucket permissions -\n You must have permissions in an IAM policy based on the source and destination\n bucket types in a CopyObject
operation.
If the source object is in a general purpose bucket, you must have\n \n s3:GetObject
\n \n permission to read the source object that is being copied.
If the destination bucket is a general purpose bucket, you must have\n \n s3:PubObject
\n \n permission to write the object copy to the destination bucket.
\n Directory bucket permissions -\n You must have permissions in a bucket policy or an IAM identity-based policy based on the source and destination\n bucket types in a CopyObject
operation.
If the source object that you want to copy is in a\n directory bucket, you must have the \n s3express:CreateSession
\n permission in\n the Action
element of a policy to read the object. By default, the session is in the ReadWrite
mode. If you want to restrict the access, you can explicitly set the s3express:SessionMode
condition key to ReadOnly
on the copy source bucket.
If the copy destination is a directory bucket, you must have the \n s3express:CreateSession
\n permission in the\n Action
element of a policy to write the object\n to the destination. The s3express:SessionMode
condition\n key can't be set to ReadOnly
on the copy destination bucket.
For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone in the\n Amazon S3 User Guide.
\nWhen the request is an HTTP 1.1 request, the response is chunk encoded. \n When the request is not an HTTP 1.1 request, the response would not contain the Content-Length
. \n You always need to read the entire response body to check if the copy succeeds. \n to keep the connection alive while we copy the data.
If the copy is successful, you receive a response with information about the copied\n object.
\nA copy request might return an error when Amazon S3 receives the copy request or while Amazon S3\n is copying the files. A 200 OK
response can contain either a success or an error.
If the error occurs before the copy action starts, you receive a\n standard Amazon S3 error.
\nIf the error occurs during the copy operation, the error response is\n embedded in the 200 OK
response. For example, in a cross-region copy, you \n may encounter throttling and receive a 200 OK
response. \n For more information, see Resolve \n the Error 200 response when copying objects to Amazon S3. \n The 200 OK
status code means the copy was accepted, but \n it doesn't mean the copy is complete. Another example is \n when you disconnect from Amazon S3 before the copy is complete, Amazon S3 might cancel the copy and you may receive a 200 OK
response. \n You must stay connected to Amazon S3 until the entire response is successfully received and processed.
If you call this API operation directly, make\n sure to design your application to parse the content of the response and handle it\n appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the\n embedded error and apply error handling per your configuration settings (including\n automatically retrying the request as appropriate). If the condition persists, the SDKs\n throw an exception (or, for the SDKs that don't use exceptions, they return an \n error).
\nThe copy request charge is based on the storage class and Region that you specify for\n the destination object. The request can also result in a data retrieval charge for the\n source if the source storage class bills for data retrieval. For pricing information, see\n Amazon S3 pricing.
\n\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to CopyObject
:
If the object expiration is configured, the response includes this header.
", + "smithy.api#documentation": "If the object expiration is configured, the response includes this header.
\nThis functionality is not supported for directory buckets.
\nVersion of the copied object in the destination bucket.
", + "smithy.api#documentation": "Version ID of the source object that was copied.
\nThis functionality is not supported when the source object is in a directory bucket.
\nVersion ID of the newly created copy.
", + "smithy.api#documentation": "Version ID of the newly created copy.
\nThis functionality is not supported for directory buckets.
\nThe server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
The server-side encryption algorithm used when you store this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header confirming the encryption algorithm used.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.
\nThis functionality is not supported for directory buckets.
\nIf server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide round-trip message integrity verification of\n the customer-provided encryption key.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification of\n the customer-provided encryption key.
\nThis functionality is not supported for directory buckets.
\nIf present, specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
", + "smithy.api#documentation": "If present, indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
\nThis functionality is not supported for directory buckets.
\nIf present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The\n value of this header is a base64-encoded UTF-8 string holding JSON with the encryption\n context key-value pairs.
", + "smithy.api#documentation": "If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The\n value of this header is a base64-encoded UTF-8 string holding JSON with the encryption\n context key-value pairs.
\nThis functionality is not supported for directory buckets.
\nIndicates whether the copied object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
", + "smithy.api#documentation": "Indicates whether the copied object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
\nThis functionality is not supported for directory buckets.
\nThe canned ACL to apply to the object.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "The canned access control list (ACL) to apply to the object.
\nWhen you copy an object, the ACL metadata is not preserved and is set\n to private
by default. Only the owner has full access\n control. To override the default ACL setting,\n specify a new ACL when you generate a copy request. For more information, see Using\n ACLs.
If the destination bucket that you're copying objects to uses the bucket owner enforced\n setting for S3 Object Ownership, ACLs are disabled and no longer affect\n permissions. Buckets that use this setting only accept PUT
requests\n that don't specify an ACL or PUT
requests that specify bucket owner\n full control ACLs, such as the bucket-owner-full-control
canned ACL\n or an equivalent form of this ACL expressed in the XML format. For more information, see Controlling\n ownership of objects and disabling ACLs in the\n Amazon S3 User Guide.
If your destination bucket uses the bucket owner enforced setting for Object Ownership,\n all objects written to the bucket by any account will be owned by the bucket\n owner.
\nThis functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nThe name of the destination bucket.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the destination bucket.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Specifies caching behavior along the request/reply chain.
", + "smithy.api#documentation": "Specifies the caching behavior along the request/reply chain.
", "smithy.api#httpHeader": "Cache-Control" } }, "ChecksumAlgorithm": { "target": "com.amazonaws.s3#ChecksumAlgorithm", "traits": { - "smithy.api#documentation": "Indicates the algorithm you want Amazon S3 to use to create the checksum for the object. For more information, see\n Checking object integrity in\n the Amazon S3 User Guide.
", + "smithy.api#documentation": "Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see\n Checking object integrity in\n the Amazon S3 User Guide.
\nWhen you copy an object, if the source object has a checksum, that checksum value will be copied to\n the new object by default. If the CopyObject
request does not include this x-amz-checksum-algorithm
header, the checksum algorithm will be copied from the source object to the destination object (if it's present on the source object). You can optionally\n specify a different checksum algorithm to use with the\n x-amz-checksum-algorithm
header. Unrecognized or unsupported values will respond with the HTTP status code 400 Bad Request
.
For directory buckets, when you use Amazon Web Services SDKs, CRC32
is the default checksum algorithm that's used for performance.
Specifies presentational information for the object.
", + "smithy.api#documentation": "Specifies presentational information for the object. Indicates whether an object should be displayed in a web browser or downloaded as a file. It allows specifying the desired filename for the downloaded file.
", "smithy.api#httpHeader": "Content-Disposition" } }, "ContentEncoding": { "target": "com.amazonaws.s3#ContentEncoding", "traits": { - "smithy.api#documentation": "Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.
", + "smithy.api#documentation": "Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.
\nFor directory buckets, only the aws-chunked
value is supported in this header field.
A standard MIME type describing the format of the object data.
", + "smithy.api#documentation": "A standard MIME type that describes the format of the object data.
", "smithy.api#httpHeader": "Content-Type" } }, "CopySource": { "target": "com.amazonaws.s3#CopySource", "traits": { - "smithy.api#documentation": "Specifies the source object for the copy operation. You specify the value in one of two\n formats, depending on whether you want to access the source object through an access point:
\nFor objects not accessed through an access point, specify the name of the source bucket\n and the key of the source object, separated by a slash (/). For example, to copy the\n object reports/january.pdf
from the bucket\n awsexamplebucket
, use awsexamplebucket/reports/january.pdf
.\n The value must be URL-encoded.
For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:
. For example, to copy the object reports/january.pdf
through access point my-access-point
owned by account 123456789012
in Region us-west-2
, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf
. The value must be URL encoded.
Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same Amazon Web Services Region.
\nAlternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:
. For example, to copy the object reports/january.pdf
through outpost my-outpost
owned by account 123456789012
in Region us-west-2
, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf
. The value must be URL-encoded.
To copy a specific version of an object, append ?versionId=
\n to the value (for example,\n awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893
).\n If you don't specify a version ID, Amazon S3 copies the latest version of the source\n object.
Specifies the source object for the copy operation. The source object \n can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.
\nYou specify the value of the copy source in one of two\n formats, depending on whether you want to access the source object through an access point:
\nFor objects not accessed through an access point, specify the name of the source bucket\n and the key of the source object, separated by a slash (/). For example, to copy the\n object reports/january.pdf
from the general purpose bucket \n awsexamplebucket
, use awsexamplebucket/reports/january.pdf
.\n The value must be URL-encoded. To copy the\n object reports/january.pdf
from the directory bucket \n awsexamplebucket--use1-az5--x-s3
, use awsexamplebucket--use1-az5--x-s3/reports/january.pdf
.\n The value must be URL-encoded.
For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:
. For example, to copy the object reports/january.pdf
through access point my-access-point
owned by account 123456789012
in Region us-west-2
, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf
. The value must be URL encoded.
Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.
\nAccess points are not supported by directory buckets.
\nAlternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:
. For example, to copy the object reports/january.pdf
through outpost my-outpost
owned by account 123456789012
in Region us-west-2
, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf
. The value must be URL-encoded.
If your source bucket versioning is enabled, the x-amz-copy-source
header by default identifies the current\n version of an object to copy. If the current version is a delete marker, Amazon S3\n behaves as if the object was deleted. To copy a different version, use the\n versionId
query parameter. Specifically, append ?versionId=
\n to the value (for example,\n awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893
).\n If you don't specify a version ID, Amazon S3 copies the latest version of the source\n object.
If you enable versioning on the destination bucket, Amazon S3 generates a unique version\n ID for the copied object. This version ID is different from the version ID\n of the source object. Amazon S3 returns the version ID of the copied object in the\n x-amz-version-id
response header in the response.
If you do not enable versioning or suspend it on the destination bucket, the version\n ID that Amazon S3 generates in the\n x-amz-version-id
response header is always null.
\n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets.
\nCopies the object if its entity tag (ETag) matches the specified tag.
", + "smithy.api#documentation": "Copies the object if its entity tag (ETag) matches the specified tag.
\n If both the x-amz-copy-source-if-match
and\n x-amz-copy-source-if-unmodified-since
headers are present in the\n request and evaluate as follows, Amazon S3 returns 200 OK
and copies the\n data:
\n x-amz-copy-source-if-match
condition evaluates to\n true
\n x-amz-copy-source-if-unmodified-since
condition evaluates to\n false
Copies the object if it has been modified since the specified time.
", + "smithy.api#documentation": "Copies the object if it has been modified since the specified time.
\nIf both the x-amz-copy-source-if-none-match
and\n x-amz-copy-source-if-modified-since
headers are present in the\n request and evaluate as follows, Amazon S3 returns the 412 Precondition\n Failed
response code:
\n x-amz-copy-source-if-none-match
condition evaluates to\n false
\n x-amz-copy-source-if-modified-since
condition evaluates to\n true
Copies the object if its entity tag (ETag) is different than the specified ETag.
", + "smithy.api#documentation": "Copies the object if its entity tag (ETag) is different than the specified ETag.
\nIf both the x-amz-copy-source-if-none-match
and\n x-amz-copy-source-if-modified-since
headers are present in the\n request and evaluate as follows, Amazon S3 returns the 412 Precondition\n Failed
response code:
\n x-amz-copy-source-if-none-match
condition evaluates to\n false
\n x-amz-copy-source-if-modified-since
condition evaluates to\n true
Copies the object if it hasn't been modified since the specified time.
", + "smithy.api#documentation": "Copies the object if it hasn't been modified since the specified time.
\n If both the x-amz-copy-source-if-match
and\n x-amz-copy-source-if-unmodified-since
headers are present in the\n request and evaluate as follows, Amazon S3 returns 200 OK
and copies the\n data:
\n x-amz-copy-source-if-match
condition evaluates to\n true
\n x-amz-copy-source-if-unmodified-since
condition evaluates to\n false
Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
\nThis functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nAllows grantee to read the object data and its metadata.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee to read the object data and its metadata.
\nThis functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nAllows grantee to read the object ACL.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee to read the object ACL.
\nThis functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nAllows grantee to write the ACL for the applicable object.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee to write the ACL for the applicable object.
\nThis functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nSpecifies whether the metadata is copied from the source object or replaced with\n metadata provided in the request.
", + "smithy.api#documentation": "Specifies whether the metadata is copied from the source object or replaced with\n metadata that's provided in the request. \n When copying an object, you can preserve all metadata (the default) or specify\n new metadata. If this header isn’t specified, COPY
is the default behavior. \n
\n General purpose bucket - For general purpose buckets, when you grant permissions, you\n can use the s3:x-amz-metadata-directive
condition key to enforce\n certain metadata behavior when objects are uploaded. For more information, see\n Amazon S3 condition key examples in the Amazon S3 User Guide.
\n x-amz-website-redirect-location
is unique to each object and is not copied when using the\n x-amz-metadata-directive
header. To copy the value, you \n must specify x-amz-website-redirect-location
in the request header.
Specifies whether the object tag-set are copied from the source object or replaced with\n tag-set provided in the request.
", + "smithy.api#documentation": "Specifies whether the object tag-set is copied from the source object or replaced with\n the tag-set that's provided in the request.
\nThe default value is COPY
.
\n Directory buckets - For directory buckets in a CopyObject
operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented
status code. \nWhen the destination bucket is a directory bucket, you will receive a 501 Not Implemented
response in any of the following situations:
When you attempt to COPY
the tag-set from an S3 source object that has non-empty tags.
When you attempt to REPLACE
the tag-set of a source object and set a non-empty value to x-amz-tagging
.
When you don't set the x-amz-tagging-directive
header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive
is COPY
.
Because only the empty tag-set is supported for directory buckets in a CopyObject
operation, the following situations are allowed:
When you attempt to COPY
the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.
When you attempt to REPLACE
the tag-set of a directory bucket source object and set the x-amz-tagging
value of the directory bucket destination object to empty.
When you attempt to REPLACE
the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging
value of the directory bucket destination object to empty.
When you attempt to REPLACE
the tag-set of a directory bucket source object and don't set the x-amz-tagging
value of the directory bucket destination object. This is because the default value of x-amz-tagging
is the empty value.
The server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
The server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
). Unrecognized or unsupported values won’t write a destination object and will receive a 400 Bad Request
response.
Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket.\n When copying an object, if you don't specify encryption information in your copy\n request, the encryption setting of the target object is set to the default\n encryption configuration of the destination bucket. By default, all buckets have a\n base level of encryption configuration that uses server-side encryption with Amazon S3\n managed keys (SSE-S3). If the destination bucket has a default encryption\n configuration that uses server-side encryption with Key Management Service (KMS) keys\n (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or\n server-side encryption with customer-provided encryption keys (SSE-C), Amazon S3 uses\n the corresponding KMS key, or a customer-provided key to encrypt the target\n object copy.
\nWhen you perform a CopyObject
operation, if you want to use a\n different type of encryption setting for the target object, you can specify \n appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a\n KMS key, or a customer-provided key. If the encryption setting in\n your request is different from the default encryption configuration of the\n destination bucket, the encryption setting in your request takes precedence.
With server-side\n encryption, Amazon S3 encrypts your data as it writes your data to disks in its data\n centers and decrypts the data when you access it. For more information about server-side encryption, see Using\n Server-Side Encryption in the\n Amazon S3 User Guide.
\nFor directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
If the x-amz-storage-class
header is not used, the copied object will be stored in the\n STANDARD Storage Class by default. The STANDARD storage class provides high durability and\n high availability. Depending on performance needs, you can specify a different Storage\n Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see\n Storage\n Classes in the Amazon S3 User Guide.
If the x-amz-storage-class
header is not used, the copied object will be stored in the\n STANDARD
Storage Class by default. The STANDARD
storage class provides high durability and\n high availability. Depending on performance needs, you can specify a different Storage\n Class.\n
\n Directory buckets - For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. \nUnsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request
.
\n Amazon S3 on Outposts - S3 on Outposts only uses the OUTPOSTS
Storage Class.
You can use the CopyObject
action to change the storage class of\n an object that is already stored in Amazon S3 by using the x-amz-storage-class
\n header. For more information, see Storage Classes in\n the Amazon S3 User Guide.
Before using an object as a source object for the copy operation, you must restore a copy of it if it meets any of the following conditions:
\nThe storage class of the source object is GLACIER
or\n DEEP_ARCHIVE
.
The storage class of the source object is\n INTELLIGENT_TIERING
and it's S3 Intelligent-Tiering access tier is\n Archive Access
or Deep Archive Access
.
For more\n information, see RestoreObject and Copying\n Objects in\n the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-storage-class" } }, "WebsiteRedirectLocation": { "target": "com.amazonaws.s3#WebsiteRedirectLocation", "traits": { - "smithy.api#documentation": "If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata. This value is unique to each object and is not copied when using the\n x-amz-metadata-directive
header. Instead, you may opt to provide this\n header in combination with the directive.
If the destination bucket is configured as a website, redirects requests for this object copy to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata. This value is unique to each object and is not copied when using the\n x-amz-metadata-directive
header. Instead, you may opt to provide this\n header in combination with the x-amz-metadata-directive
header.
This functionality is not supported for directory buckets.
\nSpecifies the algorithm to use to when encrypting the object (for example,\n AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when encrypting the object (for example,\n AES256
).
When you perform a CopyObject
operation, if you want to use a\n different type of encryption setting for the target object, you can specify \n appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a\n KMS key, or a customer-provided key. If the encryption setting in\n your request is different from the default encryption configuration of the\n destination bucket, the encryption setting in your request takes precedence.
This functionality is not supported when the destination bucket is a directory bucket.
\nSpecifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded. Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
This functionality is not supported when the destination bucket is a directory bucket.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nThis functionality is not supported when the destination bucket is a directory bucket.
\nSpecifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an\n object protected by KMS will fail if they're not made via SSL or using SigV4. For\n information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see\n Specifying the\n Signature Version in Request Authentication in the\n Amazon S3 User Guide.
", + "smithy.api#documentation": "Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an\n object protected by KMS will fail if they're not made via SSL or using SigV4. For\n information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see\n Specifying the\n Signature Version in Request Authentication in the\n Amazon S3 User Guide.
\nThis functionality is not supported when the destination bucket is a directory bucket.
\nSpecifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a base64-encoded UTF-8 string holding JSON with the encryption context\n key-value pairs. This value must be explicitly added to specify encryption context for \n CopyObject requests.
", + "smithy.api#documentation": "Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a base64-encoded UTF-8 string holding JSON with the encryption context\n key-value pairs. This value must be explicitly added to specify encryption context for \n CopyObject
requests.
This functionality is not supported when the destination bucket is a directory bucket.
\nSpecifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to\n true
causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS.
Specifying this header with a COPY action doesn’t affect bucket-level settings for S3\n Bucket Key.
", + "smithy.api#documentation": "Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the\n object.
\nSetting this header to\n true
causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS. Specifying this header with a COPY action doesn’t affect bucket-level settings for S3\n Bucket Key.
For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.
\nThis functionality is not supported when the destination bucket is a directory bucket.
\nSpecifies the algorithm to use when decrypting the source object (for example,\n AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when decrypting the source object (for example,\n AES256
).
If\n the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the\n object for copying.
\nThis functionality is not supported when the source object is in a directory bucket.
\nSpecifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be one that was used when the\n source object was created.
", + "smithy.api#documentation": "Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be the same one that was used when the\n source object was created.
\nIf\n the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the\n object for copying.
\nThis functionality is not supported when the source object is in a directory bucket.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nIf\n the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the\n object for copying.
\nThis functionality is not supported when the source object is in a directory bucket.
\nThe tag-set for the object destination object this value must be used in conjunction\n with the TaggingDirective
. The tag-set must be encoded as URL Query\n parameters.
The tag-set for the object copy in the destination bucket. This value must be used in conjunction\n with the x-amz-tagging-directive
if you choose REPLACE
for the x-amz-tagging-directive
. If you choose COPY
for the x-amz-tagging-directive
, you don't need to set \n the x-amz-tagging
header, because the tag-set will be copied from the source object directly. The tag-set must be encoded as URL Query\n parameters.
The default value is the empty value.
\n\n Directory buckets - For directory buckets in a CopyObject
operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented
status code. \nWhen the destination bucket is a directory bucket, you will receive a 501 Not Implemented
response in any of the following situations:
When you attempt to COPY
the tag-set from an S3 source object that has non-empty tags.
When you attempt to REPLACE
the tag-set of a source object and set a non-empty value to x-amz-tagging
.
When you don't set the x-amz-tagging-directive
header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive
is COPY
.
Because only the empty tag-set is supported for directory buckets in a CopyObject
operation, the following situations are allowed:
When you attempt to COPY
the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.
When you attempt to REPLACE
the tag-set of a directory bucket source object and set the x-amz-tagging
value of the directory bucket destination object to empty.
When you attempt to REPLACE
the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging
value of the directory bucket destination object to empty.
When you attempt to REPLACE
the tag-set of a directory bucket source object and don't set the x-amz-tagging
value of the directory bucket destination object. This is because the default value of x-amz-tagging
is the empty value.
The Object Lock mode that you want to apply to the copied object.
", + "smithy.api#documentation": "The Object Lock mode that you want to apply to the object copy.
\nThis functionality is not supported for directory buckets.
\nThe date and time when you want the copied object's Object Lock to expire.
", + "smithy.api#documentation": "The date and time when you want the Object Lock of the object copy to expire.
\nThis functionality is not supported for directory buckets.
\nSpecifies whether you want to apply a legal hold to the copied object.
", + "smithy.api#documentation": "Specifies whether you want to apply a legal hold to the object copy.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumCRC32C": { "target": "com.amazonaws.s3#ChecksumCRC32C", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.
" } } }, @@ -17230,25 +18994,25 @@ "ChecksumCRC32": { "target": "com.amazonaws.s3#ChecksumCRC32", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumCRC32C": { "target": "com.amazonaws.s3#ChecksumCRC32C", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } } }, @@ -17309,7 +19073,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a new S3 bucket. To create a bucket, you must register with Amazon S3 and have a\n valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests are never allowed to\n create buckets. By creating the bucket, you become the bucket owner.
\nNot every string is an acceptable bucket name. For information about bucket naming\n restrictions, see Bucket naming\n rules.
\nIf you want to create an Amazon S3 on Outposts bucket, see Create Bucket.
\nBy default, the bucket is created in the US East (N. Virginia) Region. You can\n optionally specify a Region in the request body. To constrain the bucket creation to a\n specific Region, you can use \n LocationConstraint
\n condition key. You might choose a Region to\n optimize latency, minimize costs, or address regulatory requirements. For example, if you\n reside in Europe, you will probably find it advantageous to create buckets in the Europe\n (Ireland) Region. For more information, see Accessing a\n bucket.
If you send your create bucket request to the s3.amazonaws.com
endpoint,\n the request goes to the us-east-1
Region. Accordingly, the signature\n calculations in Signature Version 4 must use us-east-1
as the Region, even\n if the location constraint in the request specifies another Region where the bucket is\n to be created. If you create a bucket in a Region other than US East (N. Virginia), your\n application must be able to handle 307 redirect. For more information, see Virtual hosting of\n buckets.
In addition to s3:CreateBucket
, the following permissions are\n required when your CreateBucket
request includes specific\n headers:
\n Access control lists (ACLs) - If your\n CreateBucket
request specifies access control list (ACL)\n permissions and the ACL is public-read, public-read-write,\n authenticated-read, or if you specify access permissions explicitly through\n any other ACL, both s3:CreateBucket
and\n s3:PutBucketAcl
permissions are needed. If the ACL for the\n CreateBucket
request is private or if the request doesn't\n specify any ACLs, only s3:CreateBucket
permission is needed.\n
\n Object Lock - If\n ObjectLockEnabledForBucket
is set to true in your\n CreateBucket
request,\n s3:PutBucketObjectLockConfiguration
and\n s3:PutBucketVersioning
permissions are required.
\n S3 Object Ownership - If your\n CreateBucket
request includes the\n x-amz-object-ownership
header, then the\n s3:PutBucketOwnershipControls
permission is required. By\n default, ObjectOwnership
is set to\n BucketOWnerEnforced
and ACLs are disabled. We recommend\n keeping ACLs disabled, except in uncommon use cases where you must control\n access for each object individually. If you want to change the\n ObjectOwnership
setting, you can use the\n x-amz-object-ownership
header in your\n CreateBucket
request to set the ObjectOwnership
\n setting of your choice. For more information about S3 Object Ownership, see\n Controlling\n object ownership in the\n Amazon S3 User Guide.
\n S3 Block Public Access - If your\n specific use case requires granting public access to your S3 resources, you\n can disable Block Public Access. You can create a new bucket with Block\n Public Access enabled, then separately call the \n DeletePublicAccessBlock
\n API. To use this operation, you must have the\n s3:PutBucketPublicAccessBlock
permission. By default, all\n Block Public Access settings are enabled for new buckets. To avoid\n inadvertent exposure of your resources, we recommend keeping the S3 Block\n Public Access settings enabled. For more information about S3 Block Public\n Access, see Blocking\n public access to your Amazon S3 storage in the\n Amazon S3 User Guide.
If your CreateBucket
request sets BucketOwnerEnforced
for\n Amazon S3 Object Ownership and specifies a bucket ACL that provides access to an external\n Amazon Web Services account, your request fails with a 400
error and returns the\n InvalidBucketAcLWithObjectOwnership
error code. For more information,\n see Setting Object\n Ownership on an existing bucket in the Amazon S3 User Guide.\n
The following operations are related to CreateBucket
:
\n PutObject\n
\n\n DeleteBucket\n
\nThis action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see \n CreateBucket
\n .
Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a\n valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests are never allowed to\n create buckets. By creating the bucket, you become the bucket owner.
\nThere are two types of buckets: general purpose buckets and directory buckets. For more\n information about these bucket types, see Creating, configuring, and\n working with Amazon S3 buckets in the Amazon S3 User Guide.
\n\n General purpose buckets - If you send your CreateBucket
request to the s3.amazonaws.com
global endpoint,\n the request goes to the us-east-1
Region. So the signature\n calculations in Signature Version 4 must use us-east-1
as the Region, even\n if the location constraint in the request specifies another Region where the bucket is\n to be created. If you create a bucket in a Region other than US East (N. Virginia), your\n application must be able to handle 307 redirect. For more information, see Virtual hosting of\n buckets in the Amazon S3 User Guide.
\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. \nFor more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - In addition to the s3:CreateBucket
permission, the following permissions are\n required in a policy when your CreateBucket
request includes specific\n headers:
\n Access control lists (ACLs) - In your CreateBucket
request, if you specify an access control list (ACL) \n and set it to public-read
, public-read-write
,\n authenticated-read
, or if you explicitly specify any other custom ACLs, both s3:CreateBucket
and\n s3:PutBucketAcl
permissions are required. In your CreateBucket
request, if you set the ACL to private
, \n or if you don't specify any ACLs, only the s3:CreateBucket
permission is required.\n
\n Object Lock - In your\n CreateBucket
request, if you set \n x-amz-bucket-object-lock-enabled
to true, the \n s3:PutBucketObjectLockConfiguration
and\n s3:PutBucketVersioning
permissions are required.
\n S3 Object Ownership - If your\n CreateBucket
request includes the\n x-amz-object-ownership
header, then the\n s3:PutBucketOwnershipControls
permission is required.
If your CreateBucket
request sets BucketOwnerEnforced
for\n Amazon S3 Object Ownership and specifies a bucket ACL that provides access to an external\n Amazon Web Services account, your request fails with a 400
error and returns the\n InvalidBucketAcLWithObjectOwnership
error code. For more information,\n see Setting Object\n Ownership on an existing bucket in the Amazon S3 User Guide.\n
\n S3 Block Public Access - If your\n specific use case requires granting public access to your S3 resources, you\n can disable Block Public Access. Specifically, you can create a new bucket with Block\n Public Access enabled, then separately call the \n DeletePublicAccessBlock
\n API. To use this operation, you must have the\n s3:PutBucketPublicAccessBlock
permission. For more information about S3 Block Public\n Access, see Blocking\n public access to your Amazon S3 storage in the\n Amazon S3 User Guide.
\n Directory bucket permissions - You must have the s3express:CreateBucket
permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.
The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access are not supported for directory buckets. \n For directory buckets, all Block Public Access settings are enabled at the bucket level and S3 \n Object Ownership is set to Bucket owner enforced (ACLs disabled). These settings can't be modified.\n
\nFor more information about permissions for creating and working with \n directory buckets, see Directory buckets in the Amazon S3 User Guide. \n For more information about supported S3 features for directory buckets, see Features of S3 Express One Zone in the Amazon S3 User Guide.
\n\n Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com
.
The following operations are related to CreateBucket
:
\n PutObject\n
\n\n DeleteBucket\n
\nSpecifies the Region where the bucket will be created. If you don't specify a Region,\n the bucket is created in the US East (N. Virginia) Region (us-east-1).
" + "smithy.api#documentation": "Specifies the Region where the bucket will be created. You might choose a Region to\n optimize latency, minimize costs, or address regulatory requirements. For example, if you\n reside in Europe, you will probably find it advantageous to create buckets in the Europe\n (Ireland) Region. For more information, see Accessing a\n bucket in the Amazon S3 User Guide.
\nIf you don't specify a Region,\n the bucket is created in the US East (N. Virginia) Region (us-east-1) by default.
\nThis functionality is not supported for directory buckets.
\nSpecifies the location where the bucket will be created.
\nFor directory buckets, the location type is Availability Zone.
\nThis functionality is only supported by directory buckets.
\nSpecifies the information about the bucket that will be created.
\nThis functionality is only supported by directory buckets.
\nThe canned ACL to apply to the bucket.
", + "smithy.api#documentation": "The canned ACL to apply to the bucket.
\nThis functionality is not supported for directory buckets.
\nThe name of the bucket to create.
", + "smithy.api#documentation": "The name of the bucket to create.
\n\n General purpose buckets - For information about bucket naming\n restrictions, see Bucket naming\n rules in the Amazon S3 User Guide.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format \n bucket_base_name--az_id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n
Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.
", + "smithy.api#documentation": "Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.
\nThis functionality is not supported for directory buckets.
\nAllows grantee to list the objects in the bucket.
", + "smithy.api#documentation": "Allows grantee to list the objects in the bucket.
\nThis functionality is not supported for directory buckets.
\nAllows grantee to read the bucket ACL.
", + "smithy.api#documentation": "Allows grantee to read the bucket ACL.
\nThis functionality is not supported for directory buckets.
\nAllows grantee to create new objects in the bucket.
\nFor the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.
", + "smithy.api#documentation": "Allows grantee to create new objects in the bucket.
\nFor the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.
\nThis functionality is not supported for directory buckets.
\nAllows grantee to write the ACL for the applicable bucket.
", + "smithy.api#documentation": "Allows grantee to write the ACL for the applicable bucket.
\nThis functionality is not supported for directory buckets.
\nSpecifies whether you want S3 Object Lock to be enabled for the new bucket.
", + "smithy.api#documentation": "Specifies whether you want S3 Object Lock to be enabled for the new bucket.
\nThis functionality is not supported for directory buckets.
\nThis action initiates a multipart upload and returns an upload ID. This upload ID is\n used to associate all of the parts in the specific multipart upload. You specify this\n upload ID in each of your subsequent upload part requests (see UploadPart). You also include this\n upload ID in the final request to either complete or abort the multipart upload\n request.
\nFor more information about multipart uploads, see Multipart Upload Overview.
\nIf you have configured a lifecycle rule to abort incomplete multipart uploads, the\n upload must complete within the number of days specified in the bucket lifecycle\n configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort\n action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.
\nFor information about the permissions required to use the multipart upload API, see\n Multipart\n Upload and Permissions.
\nFor request signing, multipart upload is just a series of regular requests. You initiate\n a multipart upload, send one or more requests to upload parts, and then complete the\n multipart upload process. You sign each request individually. There is nothing special\n about signing multipart upload requests. For more information about signing, see Authenticating Requests (Amazon Web Services Signature Version 4).
\nAfter you initiate a multipart upload and upload one or more parts, to stop being\n charged for storing the uploaded parts, you must either complete or abort the multipart\n upload. Amazon S3 frees up the space used to store the parts and stop charging you for\n storing them only after you either complete or abort a multipart upload.
\nServer-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it. Amazon S3\n automatically encrypts all new objects that are uploaded to an S3 bucket. When doing a\n multipart upload, if you don't specify encryption information in your request, the\n encryption setting of the uploaded parts is set to the default encryption configuration of\n the destination bucket. By default, all buckets have a base level of encryption\n configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the\n destination bucket has a default encryption configuration that uses server-side encryption\n with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key (SSE-C),\n Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the uploaded\n parts. When you perform a CreateMultipartUpload operation, if you want to use a different\n type of encryption setting for the uploaded parts, you can request that Amazon S3 encrypts the\n object with a KMS key, an Amazon S3 managed key, or a customer-provided key. If the encryption\n setting in your request is different from the default encryption configuration of the\n destination bucket, the encryption setting in your request takes precedence. If you choose\n to provide your own encryption key, the request headers you provide in UploadPart\n and UploadPartCopy requests must match the headers you used in the request to\n initiate the upload by using CreateMultipartUpload
. You can request that Amazon S3\n save the uploaded parts encrypted with server-side encryption with an Amazon S3 managed key\n (SSE-S3), an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key\n (SSE-C).
To perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester\n must have permission to the kms:Decrypt
and kms:GenerateDataKey*
\n actions on the key. These permissions are required because Amazon S3 must decrypt and read data\n from the encrypted file parts before it completes the multipart upload. For more\n information, see Multipart upload API\n and permissions and Protecting data using\n server-side encryption with Amazon Web Services KMS in the\n Amazon S3 User Guide.
If your Identity and Access Management (IAM) user or role is in the same Amazon Web Services account as the KMS key,\n then you must have these permissions on the key policy. If your IAM user or role belongs\n to a different account than the key, then you must have the permissions on both the key\n policy and your IAM user or role.
\nFor more information, see Protecting Data Using Server-Side\n Encryption.
\nWhen copying an object, you can optionally specify the accounts or groups that\n should be granted specific permissions on the new object. There are two ways to\n grant the permissions using the request headers:
\nSpecify a canned ACL with the x-amz-acl
request header. For\n more information, see Canned\n ACL.
Specify access permissions explicitly with the\n x-amz-grant-read
, x-amz-grant-read-acp
,\n x-amz-grant-write-acp
, and\n x-amz-grant-full-control
headers. These parameters map to\n the set of permissions that Amazon S3 supports in an ACL. For more information,\n see Access Control List (ACL) Overview.
You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.
\nAmazon S3 encrypts data by using server-side encryption with an Amazon S3 managed key\n (SSE-S3) by default. Server-side encryption is for data encryption at rest. Amazon S3\n encrypts your data as it writes it to disks in its data centers and decrypts it\n when you access it. You can request that Amazon S3 encrypts data at rest by using\n server-side encryption with other key options. The option you use depends on\n whether you want to use KMS keys (SSE-KMS) or provide your own encryption keys\n (SSE-C).
\nUse KMS keys (SSE-KMS) that include the Amazon Web Services managed key\n (aws/s3
) and KMS customer managed keys stored in Key Management Service (KMS) –\n If you want Amazon Web Services to manage the keys used to encrypt data, specify the\n following headers in the request.
\n x-amz-server-side-encryption
\n
\n x-amz-server-side-encryption-aws-kms-key-id
\n
\n x-amz-server-side-encryption-context
\n
If you specify x-amz-server-side-encryption:aws:kms
, but\n don't provide x-amz-server-side-encryption-aws-kms-key-id
,\n Amazon S3 uses the Amazon Web Services managed key (aws/s3
key) in KMS to\n protect the data.
All GET
and PUT
requests for an object\n protected by KMS fail if you don't make them by using Secure Sockets\n Layer (SSL), Transport Layer Security (TLS), or Signature Version\n 4.
For more information about server-side encryption with KMS keys\n (SSE-KMS), see Protecting Data\n Using Server-Side Encryption with KMS keys.
\nUse customer-provided encryption keys (SSE-C) – If you want to manage\n your own encryption keys, provide all the following headers in the\n request.
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about server-side encryption with customer-provided\n encryption keys (SSE-C), see \n Protecting data using server-side encryption with customer-provided\n encryption keys (SSE-C).
\nYou also can use the following access control–related headers with this\n operation. By default, all objects are private. Only the owner has full access\n control. When adding a new object, you can grant permissions to individual\n Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then\n added to the access control list (ACL) on the object. For more information, see\n Using ACLs. With this operation, you can grant access permissions\n using one of the following two methods:
\nSpecify a canned ACL (x-amz-acl
) — Amazon S3 supports a set of\n predefined ACLs, known as canned ACLs. Each canned ACL\n has a predefined set of grantees and permissions. For more information, see\n Canned\n ACL.
Specify access permissions explicitly — To explicitly grant access\n permissions to specific Amazon Web Services accounts or groups, use the following headers.\n Each header maps to specific permissions that Amazon S3 supports in an ACL. For\n more information, see Access Control List (ACL)\n Overview. In the header, you specify a list of grantees who get\n the specific permission. To grant permissions explicitly, use:
\n\n x-amz-grant-read
\n
\n x-amz-grant-write
\n
\n x-amz-grant-read-acp
\n
\n x-amz-grant-write-acp
\n
\n x-amz-grant-full-control
\n
You specify each grantee as a type=value pair, where the type is one of\n the following:
\n\n id
– if the value specified is the canonical user ID\n of an Amazon Web Services account
\n uri
– if you are granting permissions to a predefined\n group
\n emailAddress
– if the value specified is the email\n address of an Amazon Web Services account
Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nFor example, the following x-amz-grant-read
header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:
\n x-amz-grant-read: id=\"11112222333\", id=\"444455556666\"
\n
The following operations are related to CreateMultipartUpload
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nThis action initiates a multipart upload and returns an upload ID. This upload ID is\n used to associate all of the parts in the specific multipart upload. You specify this\n upload ID in each of your subsequent upload part requests (see UploadPart). You also include this\n upload ID in the final request to either complete or abort the multipart upload\n request. For more information about multipart uploads, see Multipart Upload Overview in the Amazon S3 User Guide.
\nAfter you initiate a multipart upload and upload one or more parts, to stop being\n charged for storing the uploaded parts, you must either complete or abort the multipart\n upload. Amazon S3 frees up the space used to store the parts and stops charging you for\n storing them only after you either complete or abort a multipart upload.
\nIf you have configured a lifecycle rule to abort incomplete multipart uploads, the created multipart \n upload must be completed within the number of days specified in the bucket lifecycle\n configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort\n action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.
\n\n Directory buckets - S3 Lifecycle is not supported by directory buckets.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
For request signing, multipart upload is just a series of regular requests. You initiate\n a multipart upload, send one or more requests to upload parts, and then complete the\n multipart upload process. You sign each request individually. There is nothing special\n about signing multipart upload requests. For more information about signing, see Authenticating Requests (Amazon Web Services Signature Version 4) in the Amazon S3 User Guide.
\n\n General purpose bucket permissions - For information about the permissions required to use the multipart upload API, see\n Multipart\n upload and permissions in the Amazon S3 User Guide.
\nTo perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester\n must have permission to the kms:Decrypt
and kms:GenerateDataKey*
\n actions on the key. These permissions are required because Amazon S3 must decrypt and read data\n from the encrypted file parts before it completes the multipart upload. For more\n information, see Multipart upload API\n and permissions and Protecting data using\n server-side encryption with Amazon Web Services KMS in the\n Amazon S3 User Guide.
\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
\n General purpose buckets - Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it. Amazon S3\n automatically encrypts all new objects that are uploaded to an S3 bucket. When doing a\n multipart upload, if you don't specify encryption information in your request, the\n encryption setting of the uploaded parts is set to the default encryption configuration of\n the destination bucket. By default, all buckets have a base level of encryption\n configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the\n destination bucket has a default encryption configuration that uses server-side encryption\n with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key (SSE-C),\n Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the uploaded\n parts. When you perform a CreateMultipartUpload operation, if you want to use a different\n type of encryption setting for the uploaded parts, you can request that Amazon S3 encrypts the\n object with a different encryption key (such as an Amazon S3 managed key, a KMS key, or a customer-provided key). When the encryption\n setting in your request is different from the default encryption configuration of the\n destination bucket, the encryption setting in your request takes precedence. If you choose\n to provide your own encryption key, the request headers you provide in UploadPart\n and UploadPartCopy requests must match the headers you used in the CreateMultipartUpload
request.
Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key\n (aws/s3
) and KMS customer managed keys stored in Key Management Service (KMS) –\n If you want Amazon Web Services to manage the keys used to encrypt data, specify the\n following headers in the request.
\n x-amz-server-side-encryption
\n
\n x-amz-server-side-encryption-aws-kms-key-id
\n
\n x-amz-server-side-encryption-context
\n
If you specify x-amz-server-side-encryption:aws:kms
, but\n don't provide x-amz-server-side-encryption-aws-kms-key-id
,\n Amazon S3 uses the Amazon Web Services managed key (aws/s3
key) in KMS to\n protect the data.
To perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester\n must have permission to the kms:Decrypt
and kms:GenerateDataKey*
\n actions on the key. These permissions are required because Amazon S3 must decrypt and read data\n from the encrypted file parts before it completes the multipart upload. For more\n information, see Multipart upload API\n and permissions and Protecting data using\n server-side encryption with Amazon Web Services KMS in the\n Amazon S3 User Guide.
If your Identity and Access Management (IAM) user or role is in the same Amazon Web Services account as the KMS key,\n then you must have these permissions on the key policy. If your IAM user or role is in a different account from the key, then you must have the permissions on both the key\n policy and your IAM user or role.
\nAll GET
and PUT
requests for an object\n protected by KMS fail if you don't make them by using Secure Sockets\n Layer (SSL), Transport Layer Security (TLS), or Signature Version\n 4. For information about configuring any of the officially supported Amazon Web Services\n SDKs and Amazon Web Services CLI, see Specifying the Signature Version in Request Authentication\n in the Amazon S3 User Guide.
For more information about server-side encryption with KMS keys\n (SSE-KMS), see Protecting Data\n Using Server-Side Encryption with KMS keys in the Amazon S3 User Guide.
\nUse customer-provided encryption keys (SSE-C) – If you want to manage\n your own encryption keys, provide all the following headers in the\n request.
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about server-side encryption with customer-provided\n encryption keys (SSE-C), see \n Protecting data using server-side encryption with customer-provided\n encryption keys (SSE-C) in the Amazon S3 User Guide.
\n\n Directory buckets -For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to CreateMultipartUpload
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nIf the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, the response includes this header. The header indicates when the initiated\n multipart upload becomes eligible for an abort operation. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.
\nThe response also includes the x-amz-abort-rule-id
header that provides the\n ID of the lifecycle configuration rule that defines this action.
If the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, the response includes this header. The header indicates when the initiated\n multipart upload becomes eligible for an abort operation. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration in the Amazon S3 User Guide.
\nThe response also includes the x-amz-abort-rule-id
header that provides the\n ID of the lifecycle configuration rule that defines the abort action.
This functionality is not supported for directory buckets.
\nThis header is returned along with the x-amz-abort-date
header. It\n identifies the applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.
This header is returned along with the x-amz-abort-date
header. It\n identifies the applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.
This functionality is not supported for directory buckets.
\nThe name of the bucket to which the multipart upload was initiated. Does not return the\n access point ARN or access point alias if used.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the bucket to which the multipart upload was initiated. Does not return the\n access point ARN or access point alias if used.
\nAccess points are not supported by directory buckets.
\nThe server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
).
The server-side encryption algorithm used when you store this object in Amazon S3 (for example,\n AES256
, aws:kms
).
For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header confirming the encryption algorithm used.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.
\nThis functionality is not supported for directory buckets.
\nIf server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide round-trip message integrity verification of\n the customer-provided encryption key.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification of\n the customer-provided encryption key.
\nThis functionality is not supported for directory buckets.
\nIf present, specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
", + "smithy.api#documentation": "If present, indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
\nThis functionality is not supported for directory buckets.
\nIf present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The\n value of this header is a base64-encoded UTF-8 string holding JSON with the encryption\n context key-value pairs.
", + "smithy.api#documentation": "If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The\n value of this header is a base64-encoded UTF-8 string holding JSON with the encryption\n context key-value pairs.
\nThis functionality is not supported for directory buckets.
\nIndicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
", + "smithy.api#documentation": "Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
\nThis functionality is not supported for directory buckets.
\nThe canned ACL to apply to the object.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "The canned ACL to apply to the object. Amazon S3 supports a set of\n predefined ACLs, known as canned ACLs. Each canned ACL\n has a predefined set of grantees and permissions. For more information, see\n Canned\n ACL in the Amazon S3 User Guide.
\nBy default, all objects are private. Only the owner has full access\n control. When uploading an object, you can grant access permissions to individual\n Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then\n added to the access control list (ACL) on the new object. For more information, see\n Using ACLs. One way to\n grant the permissions using the request headers is to specify a canned ACL with the x-amz-acl
request header.
This functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nThe name of the bucket to which to initiate the upload
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the bucket where the multipart upload is initiated and where the object is uploaded.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.
", + "smithy.api#documentation": "Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.
\nFor directory buckets, only the aws-chunked
value is supported in this header field.
The language the content is in.
", + "smithy.api#documentation": "The language that the content is in.
", "smithy.api#httpHeader": "Content-Language" } }, @@ -17643,28 +19422,28 @@ "GrantFullControl": { "target": "com.amazonaws.s3#GrantFullControl", "traits": { - "smithy.api#documentation": "Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
\nBy default, all objects are private. Only the owner has full access\n control. When uploading an object, you can use this header to explicitly grant access\n permissions to specific Amazon Web Services accounts or groups.\n This header maps to specific permissions that Amazon S3 supports in an ACL. For\n more information, see Access Control List (ACL)\n Overview in the Amazon S3 User Guide.
\nYou specify each grantee as a type=value pair, where the type is one of\n the following:
\n\n id
– if the value specified is the canonical user ID\n of an Amazon Web Services account
\n uri
– if you are granting permissions to a predefined\n group
\n emailAddress
– if the value specified is the email\n address of an Amazon Web Services account
Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nFor example, the following x-amz-grant-read
header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:
\n x-amz-grant-read: id=\"11112222333\", id=\"444455556666\"
\n
This functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nAllows grantee to read the object data and its metadata.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Specify access permissions explicitly to allow grantee to read the object data and its metadata.
\nBy default, all objects are private. Only the owner has full access\n control. When uploading an object, you can use this header to explicitly grant access\n permissions to specific Amazon Web Services accounts or groups.\n This header maps to specific permissions that Amazon S3 supports in an ACL. For\n more information, see Access Control List (ACL)\n Overview in the Amazon S3 User Guide.
\nYou specify each grantee as a type=value pair, where the type is one of\n the following:
\n\n id
– if the value specified is the canonical user ID\n of an Amazon Web Services account
\n uri
– if you are granting permissions to a predefined\n group
\n emailAddress
– if the value specified is the email\n address of an Amazon Web Services account
Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nFor example, the following x-amz-grant-read
header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:
\n x-amz-grant-read: id=\"11112222333\", id=\"444455556666\"
\n
This functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nAllows grantee to read the object ACL.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Specify access permissions explicitly to allows grantee to read the object ACL.
\nBy default, all objects are private. Only the owner has full access\n control. When uploading an object, you can use this header to explicitly grant access\n permissions to specific Amazon Web Services accounts or groups.\n This header maps to specific permissions that Amazon S3 supports in an ACL. For\n more information, see Access Control List (ACL)\n Overview in the Amazon S3 User Guide.
\nYou specify each grantee as a type=value pair, where the type is one of\n the following:
\n\n id
– if the value specified is the canonical user ID\n of an Amazon Web Services account
\n uri
– if you are granting permissions to a predefined\n group
\n emailAddress
– if the value specified is the email\n address of an Amazon Web Services account
Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nFor example, the following x-amz-grant-read
header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:
\n x-amz-grant-read: id=\"11112222333\", id=\"444455556666\"
\n
This functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nAllows grantee to write the ACL for the applicable object.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.
\nBy default, all objects are private. Only the owner has full access\n control. When uploading an object, you can use this header to explicitly grant access\n permissions to specific Amazon Web Services accounts or groups.\n This header maps to specific permissions that Amazon S3 supports in an ACL. For\n more information, see Access Control List (ACL)\n Overview in the Amazon S3 User Guide.
\nYou specify each grantee as a type=value pair, where the type is one of\n the following:
\n\n id
– if the value specified is the canonical user ID\n of an Amazon Web Services account
\n uri
– if you are granting permissions to a predefined\n group
\n emailAddress
– if the value specified is the email\n address of an Amazon Web Services account
Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nFor example, the following x-amz-grant-read
header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:
\n x-amz-grant-read: id=\"11112222333\", id=\"444455556666\"
\n
This functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nThe server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
).
The server-side encryption algorithm used when you store this object in Amazon S3 (for example,\n AES256
, aws:kms
).
For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The\n STANDARD storage class provides high durability and high availability. Depending on\n performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses\n the OUTPOSTS Storage Class. For more information, see Storage Classes in the\n Amazon S3 User Guide.
", + "smithy.api#documentation": "By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The\n STANDARD storage class provides high durability and high availability. Depending on\n performance needs, you can specify a different Storage Class. For more information, see Storage Classes in the\n Amazon S3 User Guide.
\nFor directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.
\nAmazon S3 on Outposts only uses\n the OUTPOSTS Storage Class.
\nIf the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.
", + "smithy.api#documentation": "If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.
\nThis functionality is not supported for directory buckets.
\nSpecifies the algorithm to use to when encrypting the object (for example,\n AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when encrypting the object (for example,\n AES256).
\nThis functionality is not supported for directory buckets.
\nSpecifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
This functionality is not supported for directory buckets.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nThis functionality is not supported for directory buckets.
\nSpecifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric encryption customer managed key to use for object encryption.\n All GET and PUT requests for an object protected by KMS will fail if they're not made via\n SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services\n SDKs and Amazon Web Services CLI, see Specifying the Signature Version in Request Authentication\n in the Amazon S3 User Guide.
", + "smithy.api#documentation": "Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric encryption customer managed key to use for object encryption.
\nThis functionality is not supported for directory buckets.
\nSpecifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a base64-encoded UTF-8 string holding JSON with the encryption context\n key-value pairs.
", + "smithy.api#documentation": "Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a base64-encoded UTF-8 string holding JSON with the encryption context\n key-value pairs.
\nThis functionality is not supported for directory buckets.
\nSpecifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to\n true
causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS.
Specifying this header with an object action doesn’t affect bucket-level settings for S3\n Bucket Key.
", + "smithy.api#documentation": "Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to\n true
causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS.
Specifying this header with an object action doesn’t affect bucket-level settings for S3\n Bucket Key.
\nThis functionality is not supported for directory buckets.
\nThe tag-set for the object. The tag-set must be encoded as URL Query parameters.
", + "smithy.api#documentation": "The tag-set for the object. The tag-set must be encoded as URL Query parameters.
\nThis functionality is not supported for directory buckets.
\nSpecifies the Object Lock mode that you want to apply to the uploaded object.
", + "smithy.api#documentation": "Specifies the Object Lock mode that you want to apply to the uploaded object.
\nThis functionality is not supported for directory buckets.
\nSpecifies the date and time when you want the Object Lock to expire.
", + "smithy.api#documentation": "Specifies the date and time when you want the Object Lock to expire.
\nThis functionality is not supported for directory buckets.
\nSpecifies whether you want to apply a legal hold to the uploaded object.
", + "smithy.api#documentation": "Specifies whether you want to apply a legal hold to the uploaded object.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Indicates the algorithm you want Amazon S3 to use to create the checksum for the object. For more information, see\n Checking object integrity in\n the Amazon S3 User Guide.
", + "smithy.api#documentation": "Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see\n Checking object integrity in\n the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-algorithm" } } @@ -17802,9 +19581,89 @@ "smithy.api#input": {} } }, + "com.amazonaws.s3#CreateSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateSessionRequest" + }, + "output": { + "target": "com.amazonaws.s3#CreateSessionOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchBucket" + } + ], + "traits": { + "smithy.api#documentation": "Creates a session that establishes temporary security credentials to support fast authentication and authorization for the Zonal endpoint APIs on directory buckets. \n For more information about Zonal endpoint APIs that include the Availability Zone in the request endpoint, see \n S3 Express One Zone APIs in the Amazon S3 User Guide. \n
\nTo make Zonal endpoint API requests on a directory bucket, use the CreateSession
\n API operation. Specifically, you grant s3express:CreateSession
permission to a\n bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the\n CreateSession
API request on the bucket, which returns temporary security\n credentials that include the access key ID, secret access key, session token, and\n expiration. These credentials have associated permissions to access the Zonal endpoint APIs. After\n the session is created, you don’t need to use other policies to grant permissions to each\n Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by\n applying the temporary security credentials of the session to the request headers and\n following the SigV4 protocol for authentication. You also apply the session token to the\n x-amz-s3session-token
request header for authorization. Temporary security\n credentials are scoped to the bucket and expire after 5 minutes. After the expiration time,\n any calls that you make with those credentials will fail. You must use IAM credentials\n again to make a CreateSession
API request that generates a new set of\n temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond\n the original specified interval.
If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid\n service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to\n initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the\n Amazon S3 User Guide.
\nYou must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n \n CopyObject
API operation - Unlike other Zonal endpoint APIs, the CopyObject
API operation doesn't use the temporary security credentials returned from the CreateSession
API operation for authentication and authorization. For information about authentication and authorization of the CopyObject
API operation on directory buckets, see CopyObject.
\n \n HeadBucket
API operation - Unlike other Zonal endpoint APIs, the HeadBucket
API operation doesn't use the temporary security credentials returned from the CreateSession
API operation for authentication and authorization. For information about authentication and authorization of the HeadBucket
API operation on directory buckets, see HeadBucket.
To obtain temporary security credentials, you must create a bucket policy or an IAM identity-based policy that\n grants s3express:CreateSession
permission to the bucket. In a\n policy, you can have the s3express:SessionMode
condition key to\n control who can create a ReadWrite
or ReadOnly
session.\n For more information about ReadWrite
or ReadOnly
\n sessions, see \n x-amz-create-session-mode
\n . For example policies, see\n Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone in the\n Amazon S3 User Guide.
To grant cross-account access to Zonal endpoint APIs, the bucket policy should also grant both accounts the s3express:CreateSession
permission.
\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The established temporary security credentials for the created session..
", + "smithy.api#required": {}, + "smithy.api#xmlName": "Credentials" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#CreateSessionRequest": { + "type": "structure", + "members": { + "SessionMode": { + "target": "com.amazonaws.s3#SessionMode", + "traits": { + "smithy.api#documentation": "Specifies the mode of the session that will be created, either ReadWrite
or\n ReadOnly
. By default, a ReadWrite
session is created. A\n ReadWrite
session is capable of executing all the Zonal endpoint APIs on a\n directory bucket. A ReadOnly
session is constrained to execute the following\n Zonal endpoint APIs: GetObject
, HeadObject
, ListObjectsV2
,\n GetObjectAttributes
, ListParts
, and\n ListMultipartUploads
.
The name of the bucket that you create a session for.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, "com.amazonaws.s3#CreationDate": { "type": "timestamp" }, + "com.amazonaws.s3#DataRedundancy": { + "type": "enum", + "members": { + "SingleAvailabilityZone": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SingleAvailabilityZone" + } + } + } + }, "com.amazonaws.s3#Date": { "type": "timestamp", "traits": { @@ -17849,7 +19708,7 @@ "Objects": { "target": "com.amazonaws.s3#ObjectIdentifierList", "traits": { - "smithy.api#documentation": "The object to delete.
", + "smithy.api#documentation": "The object to delete.
\n\n Directory buckets - For directory buckets, an object that's composed entirely of \n whitespace characters is not supported by the DeleteObjects
API operation. The request will receive a 400 Bad Request
error \n and none of the objects in the request will be deleted.
Element to enable quiet mode for the request. When you add this element, you must set\n its value to true.
" + "smithy.api#documentation": "Element to enable quiet mode for the request. When you add this element, you must set\n its value to true
.
Deletes the S3 bucket. All objects (including all object versions and delete markers) in\n the bucket must be deleted before the bucket itself can be deleted.
\nThe following operations are related to DeleteBucket
:
\n CreateBucket\n
\n\n DeleteObject\n
\nDeletes the S3 bucket. All objects (including all object versions and delete markers) in\n the bucket must be deleted before the bucket itself can be deleted.
\n\n Directory buckets - If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. \nFor more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - You must have the s3:DeleteBucket
permission on the specified bucket in a policy.
\n Directory bucket permissions - You must have the s3express:DeleteBucket
permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.
\n Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com
.
The following operations are related to DeleteBucket
:
\n CreateBucket\n
\n\n DeleteObject\n
\nDeletes an analytics configuration for the bucket (specified by the analytics\n configuration ID).
\nTo use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about the Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class\n Analysis.
\nThe following operations are related to\n DeleteBucketAnalyticsConfiguration
:
This operation is not supported by directory buckets.
\nDeletes an analytics configuration for the bucket (specified by the analytics\n configuration ID).
\nTo use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about the Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class\n Analysis.
\nThe following operations are related to\n DeleteBucketAnalyticsConfiguration
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Deletes the cors
configuration information set for the bucket.
To use this operation, you must have permission to perform the\n s3:PutBucketCORS
action. The bucket owner has this permission by default\n and can grant this permission to others.
For information about cors
, see Enabling Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.
\n Related Resources\n
\n\n PutBucketCors\n
\n\n RESTOPTIONSobject\n
\nThis operation is not supported by directory buckets.
\nDeletes the cors
configuration information set for the bucket.
To use this operation, you must have permission to perform the\n s3:PutBucketCORS
action. The bucket owner has this permission by default\n and can grant this permission to others.
For information about cors
, see Enabling Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.
\n Related Resources\n
\n\n PutBucketCors\n
\n\n RESTOPTIONSobject\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
This implementation of the DELETE action resets the default encryption for the bucket as\n server-side encryption with Amazon S3 managed keys (SSE-S3). For information about the bucket\n default encryption feature, see Amazon S3 Bucket Default Encryption\n in the Amazon S3 User Guide.
\nTo use this operation, you must have permissions to perform the\n s3:PutEncryptionConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to your Amazon S3 Resources in the\n Amazon S3 User Guide.
The following operations are related to DeleteBucketEncryption
:
\n PutBucketEncryption\n
\n\n GetBucketEncryption\n
\nThis operation is not supported by directory buckets.
\nThis implementation of the DELETE action resets the default encryption for the bucket as\n server-side encryption with Amazon S3 managed keys (SSE-S3). For information about the bucket\n default encryption feature, see Amazon S3 Bucket Default Encryption\n in the Amazon S3 User Guide.
\nTo use this operation, you must have permissions to perform the\n s3:PutEncryptionConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to your Amazon S3 Resources in the\n Amazon S3 User Guide.
The following operations are related to DeleteBucketEncryption
:
\n PutBucketEncryption\n
\n\n GetBucketEncryption\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Deletes the S3 Intelligent-Tiering configuration from the specified bucket.
\nThe S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.
\nThe S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.
\nFor more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.
\nOperations related to DeleteBucketIntelligentTieringConfiguration
include:
This operation is not supported by directory buckets.
\nDeletes the S3 Intelligent-Tiering configuration from the specified bucket.
\nThe S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.
\nThe S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.
\nFor more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.
\nOperations related to DeleteBucketIntelligentTieringConfiguration
include:
Deletes an inventory configuration (identified by the inventory ID) from the\n bucket.
\nTo use this operation, you must have permissions to perform the\n s3:PutInventoryConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.
\nOperations related to DeleteBucketInventoryConfiguration
include:
This operation is not supported by directory buckets.
\nDeletes an inventory configuration (identified by the inventory ID) from the\n bucket.
\nTo use this operation, you must have permissions to perform the\n s3:PutInventoryConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.
\nOperations related to DeleteBucketInventoryConfiguration
include:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the\n lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your\n objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of\n rules contained in the deleted lifecycle configuration.
\nTo use this operation, you must have permission to perform the\n s3:PutLifecycleConfiguration
action. By default, the bucket owner has this\n permission and the bucket owner can grant this permission to others.
There is usually some time lag before lifecycle configuration deletion is fully\n propagated to all the Amazon S3 systems.
\nFor more information about the object expiration, see Elements to Describe Lifecycle Actions.
\nRelated actions include:
\nThis operation is not supported by directory buckets.
\nDeletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the\n lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your\n objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of\n rules contained in the deleted lifecycle configuration.
\nTo use this operation, you must have permission to perform the\n s3:PutLifecycleConfiguration
action. By default, the bucket owner has this\n permission and the bucket owner can grant this permission to others.
There is usually some time lag before lifecycle configuration deletion is fully\n propagated to all the Amazon S3 systems.
\nFor more information about the object expiration, see Elements to Describe Lifecycle Actions.
\nRelated actions include:
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the\n metrics configuration ID) from the bucket. Note that this doesn't include the daily storage\n metrics.
\n To use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration
action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with\n Amazon CloudWatch.
\nThe following operations are related to\n DeleteBucketMetricsConfiguration
:
This operation is not supported by directory buckets.
\nDeletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the\n metrics configuration ID) from the bucket. Note that this doesn't include the daily storage\n metrics.
\n To use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration
action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with\n Amazon CloudWatch.
\nThe following operations are related to\n DeleteBucketMetricsConfiguration
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Removes OwnershipControls
for an Amazon S3 bucket. To use this operation, you\n must have the s3:PutBucketOwnershipControls
permission. For more information\n about Amazon S3 permissions, see Specifying Permissions in a\n Policy.
For information about Amazon S3 Object Ownership, see Using Object Ownership.
\nThe following operations are related to\n DeleteBucketOwnershipControls
:
This operation is not supported by directory buckets.
\nRemoves OwnershipControls
for an Amazon S3 bucket. To use this operation, you\n must have the s3:PutBucketOwnershipControls
permission. For more information\n about Amazon S3 permissions, see Specifying Permissions in a\n Policy.
For information about Amazon S3 Object Ownership, see Using Object Ownership.
\nThe following operations are related to\n DeleteBucketOwnershipControls
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
This implementation of the DELETE action uses the policy subresource to delete the\n policy of a specified bucket. If you are using an identity other than the root user of the\n Amazon Web Services account that owns the bucket, the calling identity must have the\n DeleteBucketPolicy
permissions on the specified bucket and belong to the\n bucket owner's account to use this operation.
If you don't have DeleteBucketPolicy
permissions, Amazon S3 returns a 403\n Access Denied
error. If you have the correct permissions, but you're not using an\n identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not\n Allowed
error.
To ensure that bucket owners don't inadvertently lock themselves out of their own\n buckets, the root principal in a bucket owner's Amazon Web Services account can perform the\n GetBucketPolicy
, PutBucketPolicy
, and\n DeleteBucketPolicy
API actions, even if their bucket policy explicitly\n denies the root principal's access. Bucket owner root principals can only be blocked\n from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations\n policies.
For more information about bucket policies, see Using Bucket Policies and\n UserPolicies.
\nThe following operations are related to DeleteBucketPolicy
\n
\n CreateBucket\n
\n\n DeleteObject\n
\nDeletes the\n policy of a specified bucket.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. \nFor more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
If you are using an identity other than the\n root user of the Amazon Web Services account that owns the bucket, the calling identity must both have the\n DeleteBucketPolicy
permissions on the specified bucket and belong to the\n bucket owner's account in order to use this operation.
If you don't have DeleteBucketPolicy
permissions, Amazon S3 returns a 403\n Access Denied
error. If you have the correct permissions, but you're not using an\n identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not\n Allowed
error.
To ensure that bucket owners don't inadvertently lock themselves out of their own\n buckets, the root principal in a bucket owner's Amazon Web Services account can perform the\n GetBucketPolicy
, PutBucketPolicy
, and\n DeleteBucketPolicy
API actions, even if their bucket policy explicitly\n denies the root principal's access. Bucket owner root principals can only be blocked\n from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations\n policies.
\n General purpose bucket permissions - The s3:DeleteBucketPolicy
permission is required in a policy. \n For more information about general purpose buckets bucket policies, see Using Bucket Policies and User\n Policies in the Amazon S3 User Guide.
\n Directory bucket permissions - To grant access to this API operation, you must have the s3express:DeleteBucketPolicy
permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.
\n Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com
.
The following operations are related to DeleteBucketPolicy
\n
\n CreateBucket\n
\n\n DeleteObject\n
\nThe bucket name.
", + "smithy.api#documentation": "The bucket name.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format \n bucket_base_name--az_id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented
.
Deletes the replication configuration from the bucket.
\nTo use this operation, you must have permissions to perform the\n s3:PutReplicationConfiguration
action. The bucket owner has these\n permissions by default and can grant it to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
It can take a while for the deletion of a replication configuration to fully\n propagate.
\nFor information about replication configuration, see Replication in the\n Amazon S3 User Guide.
\nThe following operations are related to DeleteBucketReplication
:
\n PutBucketReplication\n
\n\n GetBucketReplication\n
\nThis operation is not supported by directory buckets.
\nDeletes the replication configuration from the bucket.
\nTo use this operation, you must have permissions to perform the\n s3:PutReplicationConfiguration
action. The bucket owner has these\n permissions by default and can grant it to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
It can take a while for the deletion of a replication configuration to fully\n propagate.
\nFor information about replication configuration, see Replication in the\n Amazon S3 User Guide.
\nThe following operations are related to DeleteBucketReplication
:
\n PutBucketReplication\n
\n\n GetBucketReplication\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Specifies the bucket being deleted.
", + "smithy.api#documentation": "Specifies the bucket being deleted.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format \n bucket_base_name--az_id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented
.
Deletes the tags from the bucket.
\nTo use this operation, you must have permission to perform the\n s3:PutBucketTagging
action. By default, the bucket owner has this\n permission and can grant this permission to others.
The following operations are related to DeleteBucketTagging
:
\n GetBucketTagging\n
\n\n PutBucketTagging\n
\nThis operation is not supported by directory buckets.
\nDeletes the tags from the bucket.
\nTo use this operation, you must have permission to perform the\n s3:PutBucketTagging
action. By default, the bucket owner has this\n permission and can grant this permission to others.
The following operations are related to DeleteBucketTagging
:
\n GetBucketTagging\n
\n\n PutBucketTagging\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
This action removes the website configuration for a bucket. Amazon S3 returns a 200\n OK
response upon successfully deleting a website configuration on the specified\n bucket. You will get a 200 OK
response if the website configuration you are\n trying to delete does not exist on the bucket. Amazon S3 returns a 404
response if\n the bucket specified in the request does not exist.
This DELETE action requires the S3:DeleteBucketWebsite
permission. By\n default, only the bucket owner can delete the website configuration attached to a bucket.\n However, bucket owners can grant other users permission to delete the website configuration\n by writing a bucket policy granting them the S3:DeleteBucketWebsite
\n permission.
For more information about hosting websites, see Hosting Websites on Amazon S3.
\nThe following operations are related to DeleteBucketWebsite
:
\n GetBucketWebsite\n
\n\n PutBucketWebsite\n
\nThis operation is not supported by directory buckets.
\nThis action removes the website configuration for a bucket. Amazon S3 returns a 200\n OK
response upon successfully deleting a website configuration on the specified\n bucket. You will get a 200 OK
response if the website configuration you are\n trying to delete does not exist on the bucket. Amazon S3 returns a 404
response if\n the bucket specified in the request does not exist.
This DELETE action requires the S3:DeleteBucketWebsite
permission. By\n default, only the bucket owner can delete the website configuration attached to a bucket.\n However, bucket owners can grant other users permission to delete the website configuration\n by writing a bucket policy granting them the S3:DeleteBucketWebsite
\n permission.
For more information about hosting websites, see Hosting Websites on Amazon S3.
\nThe following operations are related to DeleteBucketWebsite
:
\n GetBucketWebsite\n
\n\n PutBucketWebsite\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Removes the null version (if there is one) of an object and inserts a delete marker,\n which becomes the latest version of the object. If there isn't a null version, Amazon S3 does\n not remove any objects but will still respond that the command was successful.
\nTo remove a specific version, you must use the version Id subresource. Using this\n subresource permanently deletes the version. If the object deleted is a delete marker, Amazon S3\n sets the response header, x-amz-delete-marker
, to true.
If the object you want to delete is in a bucket where the bucket versioning\n configuration is MFA Delete enabled, you must include the x-amz-mfa
request\n header in the DELETE versionId
request. Requests that include\n x-amz-mfa
must use HTTPS.
For more information about MFA Delete, see Using MFA Delete. To see sample\n requests that use versioning, see Sample\n Request.
\nYou can delete objects by explicitly calling DELETE Object or configure its lifecycle\n (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block\n users or accounts from removing or deleting objects from your bucket, you must deny them\n the s3:DeleteObject
, s3:DeleteObjectVersion
, and\n s3:PutLifeCycleConfiguration
actions.
The following action is related to DeleteObject
:
\n PutObject\n
\nRemoves an object from a bucket. The behavior depends on the bucket's versioning state:
\nIf versioning is enabled, the operation removes the null version (if there is one) of an object and inserts a delete marker,\n which becomes the latest version of the object. If there isn't a null version, Amazon S3 does\n not remove any objects but will still respond that the command was successful.
\nIf versioning is suspended or not enabled, the operation permanently deletes the object.
\n\n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null
value of the version ID is supported by directory buckets. You can only specify null
\n to the versionId
query parameter in the request.
\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
To remove a specific version, you must use the versionId
query parameter. Using this\n query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3\n sets the response header x-amz-delete-marker
to true.
If the object you want to delete is in a bucket where the bucket versioning\n configuration is MFA Delete enabled, you must include the x-amz-mfa
request\n header in the DELETE versionId
request. Requests that include\n x-amz-mfa
must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3\n User Guide. To see sample\n requests that use versioning, see Sample\n Request.
\n Directory buckets - MFA delete is not supported by directory buckets.
\nYou can delete objects by explicitly calling DELETE Object or calling \n (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block\n users or accounts from removing or deleting objects from your bucket, you must deny them\n the s3:DeleteObject
, s3:DeleteObjectVersion
, and\n s3:PutLifeCycleConfiguration
actions.
\n Directory buckets - S3 Lifecycle is not supported by directory buckets.
\n\n General purpose bucket permissions - The following permissions are required in your policies when your \n DeleteObjects
request includes specific headers.
\n \n s3:DeleteObject
\n - To delete an object from a bucket, you must always have the s3:DeleteObject
permission.
\n \n s3:DeleteObjectVersion
\n - To delete a specific version of an object from a versiong-enabled bucket, you must have the s3:DeleteObjectVersion
permission.
\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following action is related to DeleteObject
:
\n PutObject\n
\nIndicates whether the specified object version that was permanently deleted was (true) or was\n not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or\n not (false) the current version of the object is a delete marker.
", + "smithy.api#documentation": "Indicates whether the specified object version that was permanently deleted was (true) or was\n not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or\n not (false) the current version of the object is a delete marker.
\nThis functionality is not supported for directory buckets.
\nReturns the version ID of the delete marker created as a result of the DELETE\n operation.
", + "smithy.api#documentation": "Returns the version ID of the delete marker created as a result of the DELETE\n operation.
\nThis functionality is not supported for directory buckets.
\nThe bucket name of the bucket containing the object.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name of the bucket containing the object.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.
", + "smithy.api#documentation": "The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.
\nThis functionality is not supported for directory buckets.
\nVersionId used to reference a specific version of the object.
", + "smithy.api#documentation": "Version ID used to reference a specific version of the object.
\nFor directory buckets in this API operation, only the null
value of the version ID is supported.
Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process\n this operation. To use this header, you must have the\n s3:BypassGovernanceRetention
permission.
Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process\n this operation. To use this header, you must have the\n s3:BypassGovernanceRetention
permission.
This functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Removes the entire tag set from the specified object. For more information about\n managing object tags, see Object Tagging.
\nTo use this operation, you must have permission to perform the\n s3:DeleteObjectTagging
action.
To delete tags of a specific object version, add the versionId
query\n parameter in the request. You will need permission for the\n s3:DeleteObjectVersionTagging
action.
The following operations are related to DeleteObjectTagging
:
\n PutObjectTagging\n
\n\n GetObjectTagging\n
\nThis operation is not supported by directory buckets.
\nRemoves the entire tag set from the specified object. For more information about\n managing object tags, see Object Tagging.
\nTo use this operation, you must have permission to perform the\n s3:DeleteObjectTagging
action.
To delete tags of a specific object version, add the versionId
query\n parameter in the request. You will need permission for the\n s3:DeleteObjectVersionTagging
action.
The following operations are related to DeleteObjectTagging
:
\n PutObjectTagging\n
\n\n GetObjectTagging\n
\nThe bucket name containing the objects from which to remove the tags.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name containing the objects from which to remove the tags.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
This action enables you to delete multiple objects from a bucket using a single HTTP\n request. If you know the object keys that you want to delete, then this action provides a\n suitable alternative to sending individual delete requests, reducing per-request\n overhead.
\nThe request contains a list of up to 1000 keys that you want to delete. In the XML, you\n provide the object key names, and optionally, version IDs if you want to delete a specific\n version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a\n delete action and returns the result of that delete, success, or failure, in the response.\n Note that if the object specified in the request is not found, Amazon S3 returns the result as\n deleted.
\nThe action supports two modes for the response: verbose and quiet. By default, the\n action uses verbose mode in which the response includes the result of deletion of each key\n in your request. In quiet mode the response includes only keys where the delete action\n encountered an error. For a successful deletion, the action does not return any information\n about the delete in the response body.
\nWhen performing this action on an MFA Delete enabled bucket, that attempts to delete any\n versioned objects, you must include an MFA token. If you do not provide one, the entire\n request will fail, even if there are non-versioned objects you are trying to delete. If you\n provide an invalid token, whether there are versioned keys in the request or not, the\n entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA\n Delete.
\nFinally, the Content-MD5 header is required for all Multi-Object Delete requests. Amazon S3\n uses the header value to ensure that your request body has not been altered in\n transit.
\nThe following operations are related to DeleteObjects
:
\n UploadPart\n
\n\n ListParts\n
\n\n AbortMultipartUpload\n
\nThis operation enables you to delete multiple objects from a bucket using a single HTTP\n request. If you know the object keys that you want to delete, then this operation provides a\n suitable alternative to sending individual delete requests, reducing per-request\n overhead.
\nThe request can contain a list of up to 1000 keys that you want to delete. In the XML, you\n provide the object key names, and optionally, version IDs if you want to delete a specific\n version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a\n delete operation and returns the result of that delete, success or failure, in the response.\n Note that if the object specified in the request is not found, Amazon S3 returns the result as\n deleted.
\n\n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
The operation supports two modes for the response: verbose and quiet. By default, the\n operation uses verbose mode in which the response includes the result of deletion of each key\n in your request. In quiet mode the response includes only keys where the delete operation \n encountered an error. For a successful deletion in a quiet mode, the operation does not return any information\n about the delete in the response body.
\nWhen performing this action on an MFA Delete enabled bucket, that attempts to delete any\n versioned objects, you must include an MFA token. If you do not provide one, the entire\n request will fail, even if there are non-versioned objects you are trying to delete. If you\n provide an invalid token, whether there are versioned keys in the request or not, the\n entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA\n Delete in the Amazon S3\n User Guide.
\n\n Directory buckets - MFA delete is not supported by directory buckets.
\n\n General purpose bucket permissions - The following permissions are required in your policies when your \n DeleteObjects
request includes specific headers.
\n \n s3:DeleteObject
\n - To delete an object from a bucket, you must always specify the s3:DeleteObject
permission.
\n \n s3:DeleteObjectVersion
\n - To delete a specific version of an object from a versiong-enabled bucket, you must specify the s3:DeleteObjectVersion
permission.
\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
\n General purpose bucket - The Content-MD5 request header is required for all Multi-Object Delete requests. Amazon S3\n uses the header value to ensure that your request body has not been altered in\n transit.
\n\n Directory bucket - The Content-MD5 request header or a additional checksum request header \n (including x-amz-checksum-crc32
, x-amz-checksum-crc32c
, x-amz-checksum-sha1
, or \n x-amz-checksum-sha256
) is required for all Multi-Object Delete requests.
\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to DeleteObjects
:
\n UploadPart\n
\n\n ListParts\n
\n\n AbortMultipartUpload\n
\nThe bucket name containing the objects to delete.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name containing the objects to delete.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.
", + "smithy.api#documentation": "The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.
\nWhen performing the DeleteObjects
operation on an MFA delete enabled bucket, which attempts to delete the specified \n versioned objects, you must include an MFA token. If you don't provide an MFA token, the entire\n request will fail, even if there are non-versioned objects that you are trying to delete. If you\n provide an invalid token, whether there are versioned object keys in the request or not, the\n entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA\n Delete in the Amazon S3 User Guide.
This functionality is not supported for directory buckets.
\nSpecifies whether you want to delete this object even if it has a Governance-type Object\n Lock in place. To use this header, you must have the\n s3:BypassGovernanceRetention
permission.
Specifies whether you want to delete this object even if it has a Governance-type Object\n Lock in place. To use this header, you must have the\n s3:BypassGovernanceRetention
permission.
This functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
This checksum algorithm must be the same for all parts and it match the checksum value\n supplied in the CreateMultipartUpload
request.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
.
For the x-amz-checksum-algorithm\n
header, replace \n algorithm\n
with the supported algorithm from the following list:
CRC32
\nCRC32C
\nSHA1
\nSHA256
\nFor more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
\nIf the individual checksum value you provide through x-amz-checksum-algorithm\n
doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm
, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter and uses the checksum algorithm that matches the provided value in x-amz-checksum-algorithm\n
.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Removes the PublicAccessBlock
configuration for an Amazon S3 bucket. To use this\n operation, you must have the s3:PutBucketPublicAccessBlock
permission. For\n more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
The following operations are related to DeletePublicAccessBlock
:
\n GetPublicAccessBlock\n
\n\n PutPublicAccessBlock\n
\nThis operation is not supported by directory buckets.
\nRemoves the PublicAccessBlock
configuration for an Amazon S3 bucket. To use this\n operation, you must have the s3:PutBucketPublicAccessBlock
permission. For\n more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
The following operations are related to DeletePublicAccessBlock
:
\n GetPublicAccessBlock\n
\n\n PutPublicAccessBlock\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
The version ID of the deleted object.
" + "smithy.api#documentation": "The version ID of the deleted object.
\nThis functionality is not supported for directory buckets.
\nIndicates whether the specified object version that was permanently deleted was (true) or was\n not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or\n not (false) the current version of the object is a delete marker.
" + "smithy.api#documentation": "Indicates whether the specified object version that was permanently deleted was (true) or was\n not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or\n not (false) the current version of the object is a delete marker.
\nThis functionality is not supported for directory buckets.
\nThe version ID of the delete marker created as a result of the DELETE operation. If you\n delete a specific object version, the value returned by this header is the version ID of\n the object version deleted.
" + "smithy.api#documentation": "The version ID of the delete marker created as a result of the DELETE operation. If you\n delete a specific object version, the value returned by this header is the version ID of\n the object version deleted.
\nThis functionality is not supported for directory buckets.
\nSpecifies information about where to publish analysis or configuration results for an\n Amazon S3 bucket and S3 Replication Time Control (S3 RTC).
" } }, + "com.amazonaws.s3#DirectoryBucketToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, "com.amazonaws.s3#DisplayName": { "type": "string" }, @@ -19173,7 +21078,7 @@ "VersionId": { "target": "com.amazonaws.s3#ObjectVersionId", "traits": { - "smithy.api#documentation": "The version ID of the error.
" + "smithy.api#documentation": "The version ID of the error.
\nThis functionality is not supported for directory buckets.
\nThis implementation of the GET action uses the accelerate
subresource to\n return the Transfer Acceleration state of a bucket, which is either Enabled
or\n Suspended
. Amazon S3 Transfer Acceleration is a bucket-level feature that\n enables you to perform faster data transfers to and from Amazon S3.
To use this operation, you must have permission to perform the\n s3:GetAccelerateConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to your Amazon S3 Resources in the\n Amazon S3 User Guide.
You set the Transfer Acceleration state of an existing bucket to Enabled
or\n Suspended
by using the PutBucketAccelerateConfiguration operation.
A GET accelerate
request does not return a state value for a bucket that\n has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state\n has never been set on the bucket.
For more information about transfer acceleration, see Transfer Acceleration in\n the Amazon S3 User Guide.
\nThe following operations are related to\n GetBucketAccelerateConfiguration
:
This operation is not supported by directory buckets.
\nThis implementation of the GET action uses the accelerate
subresource to\n return the Transfer Acceleration state of a bucket, which is either Enabled
or\n Suspended
. Amazon S3 Transfer Acceleration is a bucket-level feature that\n enables you to perform faster data transfers to and from Amazon S3.
To use this operation, you must have permission to perform the\n s3:GetAccelerateConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to your Amazon S3 Resources in the\n Amazon S3 User Guide.
You set the Transfer Acceleration state of an existing bucket to Enabled
or\n Suspended
by using the PutBucketAccelerateConfiguration operation.
A GET accelerate
request does not return a state value for a bucket that\n has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state\n has never been set on the bucket.
For more information about transfer acceleration, see Transfer Acceleration in\n the Amazon S3 User Guide.
\nThe following operations are related to\n GetBucketAccelerateConfiguration
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
This implementation of the GET
action uses the acl
subresource\n to return the access control list (ACL) of a bucket. To use GET
to return the\n ACL of the bucket, you must have READ_ACP
access to the bucket. If\n READ_ACP
permission is granted to the anonymous user, you can return the\n ACL of the bucket without using an authorization header.
To use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
If your bucket uses the bucket owner enforced setting for S3 Object Ownership,\n requests to read ACLs are still supported and return the\n bucket-owner-full-control
ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.
The following operations are related to GetBucketAcl
:
\n ListObjects\n
\nThis operation is not supported by directory buckets.
\nThis implementation of the GET
action uses the acl
subresource\n to return the access control list (ACL) of a bucket. To use GET
to return the\n ACL of the bucket, you must have the READ_ACP
access to the bucket. If\n READ_ACP
permission is granted to the anonymous user, you can return the\n ACL of the bucket without using an authorization header.
When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
\nWhen you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
If your bucket uses the bucket owner enforced setting for S3 Object Ownership,\n requests to read ACLs are still supported and return the\n bucket-owner-full-control
ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.
The following operations are related to GetBucketAcl
:
\n ListObjects\n
\nSpecifies the S3 bucket whose ACL is being requested.
\nTo use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
Specifies the S3 bucket whose ACL is being requested.
\nWhen you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
\nWhen you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
This implementation of the GET action returns an analytics configuration (identified by\n the analytics configuration ID) from the bucket.
\nTo use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.
For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class\n Analysis in the Amazon S3 User Guide.
\nThe following operations are related to\n GetBucketAnalyticsConfiguration
:
This operation is not supported by directory buckets.
\nThis implementation of the GET action returns an analytics configuration (identified by\n the analytics configuration ID) from the bucket.
\nTo use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.
For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class\n Analysis in the Amazon S3 User Guide.
\nThe following operations are related to\n GetBucketAnalyticsConfiguration
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the\n bucket.
\n To use this operation, you must have permission to perform the\n s3:GetBucketCORS
action. By default, the bucket owner has this permission\n and can grant it to others.
To use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
For more information about CORS, see Enabling Cross-Origin Resource\n Sharing.
\nThe following operations are related to GetBucketCors
:
\n PutBucketCors\n
\n\n DeleteBucketCors\n
\nThis operation is not supported by directory buckets.
\nReturns the Cross-Origin Resource Sharing (CORS) configuration information set for the\n bucket.
\n To use this operation, you must have permission to perform the\n s3:GetBucketCORS
action. By default, the bucket owner has this permission\n and can grant it to others.
When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
\nWhen you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
For more information about CORS, see Enabling Cross-Origin Resource\n Sharing.
\nThe following operations are related to GetBucketCors
:
\n PutBucketCors\n
\n\n DeleteBucketCors\n
\nThe bucket name for which to get the cors configuration.
\nTo use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
The bucket name for which to get the cors configuration.
\nWhen you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
\nWhen you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets\n have a default encryption configuration that uses server-side encryption with Amazon S3 managed\n keys (SSE-S3). For information about the bucket default encryption feature, see Amazon S3 Bucket\n Default Encryption in the Amazon S3 User Guide.
\nTo use this operation, you must have permission to perform the\n s3:GetEncryptionConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
The following operations are related to GetBucketEncryption
:
\n PutBucketEncryption\n
\nThis operation is not supported by directory buckets.
\nReturns the default encryption configuration for an Amazon S3 bucket. By default, all buckets\n have a default encryption configuration that uses server-side encryption with Amazon S3 managed\n keys (SSE-S3). For information about the bucket default encryption feature, see Amazon S3 Bucket\n Default Encryption in the Amazon S3 User Guide.
\nTo use this operation, you must have permission to perform the\n s3:GetEncryptionConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
The following operations are related to GetBucketEncryption
:
\n PutBucketEncryption\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Gets the S3 Intelligent-Tiering configuration from the specified bucket.
\nThe S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.
\nThe S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.
\nFor more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.
\nOperations related to GetBucketIntelligentTieringConfiguration
include:
This operation is not supported by directory buckets.
\nGets the S3 Intelligent-Tiering configuration from the specified bucket.
\nThe S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.
\nThe S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.
\nFor more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.
\nOperations related to GetBucketIntelligentTieringConfiguration
include:
Returns an inventory configuration (identified by the inventory configuration ID) from\n the bucket.
\nTo use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration
action. The bucket owner has this permission\n by default and can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.
\nThe following operations are related to\n GetBucketInventoryConfiguration
:
This operation is not supported by directory buckets.
\nReturns an inventory configuration (identified by the inventory configuration ID) from\n the bucket.
\nTo use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration
action. The bucket owner has this permission\n by default and can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.
\nThe following operations are related to\n GetBucketInventoryConfiguration
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Bucket lifecycle configuration now supports specifying a lifecycle rule using an\n object key name prefix, one or more object tags, or a combination of both. Accordingly,\n this section describes the latest API. The response describes the new filter element\n that you can use to specify a filter to select a subset of objects to which the rule\n applies. If you are using a previous version of the lifecycle configuration, it still\n works. For the earlier action, see GetBucketLifecycle.
\nReturns the lifecycle configuration information set on the bucket. For information about\n lifecycle configuration, see Object Lifecycle\n Management.
\nTo use this operation, you must have permission to perform the\n s3:GetLifecycleConfiguration
action. The bucket owner has this permission,\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
\n GetBucketLifecycleConfiguration
has the following special error:
Error code: NoSuchLifecycleConfiguration
\n
Description: The lifecycle configuration does not exist.
\nHTTP Status Code: 404 Not Found
\nSOAP Fault Code Prefix: Client
\nThe following operations are related to\n GetBucketLifecycleConfiguration
:
\n GetBucketLifecycle\n
\n\n PutBucketLifecycle\n
\nThis operation is not supported by directory buckets.
\nBucket lifecycle configuration now supports specifying a lifecycle rule using an\n object key name prefix, one or more object tags, or a combination of both. Accordingly,\n this section describes the latest API. The response describes the new filter element\n that you can use to specify a filter to select a subset of objects to which the rule\n applies. If you are using a previous version of the lifecycle configuration, it still\n works. For the earlier action, see GetBucketLifecycle.
\nReturns the lifecycle configuration information set on the bucket. For information about\n lifecycle configuration, see Object Lifecycle\n Management.
\nTo use this operation, you must have permission to perform the\n s3:GetLifecycleConfiguration
action. The bucket owner has this permission,\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
\n GetBucketLifecycleConfiguration
has the following special error:
Error code: NoSuchLifecycleConfiguration
\n
Description: The lifecycle configuration does not exist.
\nHTTP Status Code: 404 Not Found
\nSOAP Fault Code Prefix: Client
\nThe following operations are related to\n GetBucketLifecycleConfiguration
:
\n GetBucketLifecycle\n
\n\n PutBucketLifecycle\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the Region the bucket resides in. You set the bucket's Region using the\n LocationConstraint
request parameter in a CreateBucket
\n request. For more information, see CreateBucket.
To use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
We recommend that you use HeadBucket to return the Region\n that a bucket resides in. For backward compatibility, Amazon S3 continues to support\n GetBucketLocation.
\nThe following operations are related to GetBucketLocation
:
\n GetObject\n
\n\n CreateBucket\n
\nThis operation is not supported by directory buckets.
\nReturns the Region the bucket resides in. You set the bucket's Region using the\n LocationConstraint
request parameter in a CreateBucket
\n request. For more information, see CreateBucket.
When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
\nWhen you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
We recommend that you use HeadBucket to return the Region\n that a bucket resides in. For backward compatibility, Amazon S3 continues to support\n GetBucketLocation.
\nThe following operations are related to GetBucketLocation
:
\n GetObject\n
\n\n CreateBucket\n
\nThe name of the bucket for which to get the location.
\nTo use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
The name of the bucket for which to get the location.
\nWhen you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
\nWhen you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the logging status of a bucket and the permissions users have to view and modify\n that status.
\nThe following operations are related to GetBucketLogging
:
\n CreateBucket\n
\n\n PutBucketLogging\n
\nThis operation is not supported by directory buckets.
\nReturns the logging status of a bucket and the permissions users have to view and modify\n that status.
\nThe following operations are related to GetBucketLogging
:
\n CreateBucket\n
\n\n PutBucketLogging\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Gets a metrics configuration (specified by the metrics configuration ID) from the\n bucket. Note that this doesn't include the daily storage metrics.
\n To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration
action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.
\nThe following operations are related to\n GetBucketMetricsConfiguration
:
This operation is not supported by directory buckets.
\nGets a metrics configuration (specified by the metrics configuration ID) from the\n bucket. Note that this doesn't include the daily storage metrics.
\n To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration
action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.
\nThe following operations are related to\n GetBucketMetricsConfiguration
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the notification configuration of a bucket.
\nIf notifications are not enabled on the bucket, the action returns an empty\n NotificationConfiguration
element.
By default, you must be the bucket owner to read the notification configuration of a\n bucket. However, the bucket owner can use a bucket policy to grant permission to other\n users to read this configuration with the s3:GetBucketNotification
\n permission.
To use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
For more information about setting and reading the notification configuration on a\n bucket, see Setting Up Notification of Bucket Events. For more information about bucket\n policies, see Using Bucket Policies.
\nThe following action is related to GetBucketNotification
:
This operation is not supported by directory buckets.
\nReturns the notification configuration of a bucket.
\nIf notifications are not enabled on the bucket, the action returns an empty\n NotificationConfiguration
element.
By default, you must be the bucket owner to read the notification configuration of a\n bucket. However, the bucket owner can use a bucket policy to grant permission to other\n users to read this configuration with the s3:GetBucketNotification
\n permission.
When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
\nWhen you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
For more information about setting and reading the notification configuration on a\n bucket, see Setting Up Notification of Bucket Events. For more information about bucket\n policies, see Using Bucket Policies.
\nThe following action is related to GetBucketNotification
:
The name of the bucket for which to get the notification configuration.
\nTo use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
The name of the bucket for which to get the notification configuration.
\nWhen you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
\nWhen you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Retrieves OwnershipControls
for an Amazon S3 bucket. To use this operation, you\n must have the s3:GetBucketOwnershipControls
permission. For more information\n about Amazon S3 permissions, see Specifying permissions in a\n policy.
For information about Amazon S3 Object Ownership, see Using Object\n Ownership.
\nThe following operations are related to GetBucketOwnershipControls
:
This operation is not supported by directory buckets.
\nRetrieves OwnershipControls
for an Amazon S3 bucket. To use this operation, you\n must have the s3:GetBucketOwnershipControls
permission. For more information\n about Amazon S3 permissions, see Specifying permissions in a\n policy.
For information about Amazon S3 Object Ownership, see Using Object\n Ownership.
\nThe following operations are related to GetBucketOwnershipControls
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the policy of a specified bucket. If you are using an identity other than the\n root user of the Amazon Web Services account that owns the bucket, the calling identity must have the\n GetBucketPolicy
permissions on the specified bucket and belong to the\n bucket owner's account in order to use this operation.
If you don't have GetBucketPolicy
permissions, Amazon S3 returns a 403\n Access Denied
error. If you have the correct permissions, but you're not using an\n identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not\n Allowed
error.
To ensure that bucket owners don't inadvertently lock themselves out of their own\n buckets, the root principal in a bucket owner's Amazon Web Services account can perform the\n GetBucketPolicy
, PutBucketPolicy
, and\n DeleteBucketPolicy
API actions, even if their bucket policy explicitly\n denies the root principal's access. Bucket owner root principals can only be blocked\n from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations\n policies.
To use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
For more information about bucket policies, see Using Bucket Policies and User\n Policies.
\nThe following action is related to GetBucketPolicy
:
\n GetObject\n
\nReturns the policy of a specified bucket.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. \nFor more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
If you are using an identity other than the\n root user of the Amazon Web Services account that owns the bucket, the calling identity must both have the\n GetBucketPolicy
permissions on the specified bucket and belong to the\n bucket owner's account in order to use this operation.
If you don't have GetBucketPolicy
permissions, Amazon S3 returns a 403\n Access Denied
error. If you have the correct permissions, but you're not using an\n identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not\n Allowed
error.
To ensure that bucket owners don't inadvertently lock themselves out of their own\n buckets, the root principal in a bucket owner's Amazon Web Services account can perform the\n GetBucketPolicy
, PutBucketPolicy
, and\n DeleteBucketPolicy
API actions, even if their bucket policy explicitly\n denies the root principal's access. Bucket owner root principals can only be blocked\n from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations\n policies.
\n General purpose bucket permissions - The s3:GetBucketPolicy
permission is required in a policy. \n For more information about general purpose buckets bucket policies, see Using Bucket Policies and User\n Policies in the Amazon S3 User Guide.
\n Directory bucket permissions - To grant access to this API operation, you must have the s3express:GetBucketPolicy
permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.
\n General purpose buckets example bucket policies - See Bucket policy examples in the Amazon S3 User Guide.
\n\n Directory bucket example bucket policies - See Example bucket policies for S3 Express One Zone in the Amazon S3 User Guide.
\n\n Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com
.
The following action is related to GetBucketPolicy
:
\n GetObject\n
\nThe bucket name for which to get the bucket policy.
\nTo use this API operation against an access point, provide the alias of the access point in place of the bucket name.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
The bucket name to get the bucket policy for.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format \n bucket_base_name--az_id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n
\n Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
\n\n Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
Access points and Object Lambda access points are not supported by directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented
.
Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public.\n In order to use this operation, you must have the s3:GetBucketPolicyStatus
\n permission. For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.
For more information about when Amazon S3 considers a bucket public, see The Meaning of \"Public\".
\nThe following operations are related to GetBucketPolicyStatus
:
\n GetPublicAccessBlock\n
\n\n PutPublicAccessBlock\n
\nThis operation is not supported by directory buckets.
\nRetrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public.\n In order to use this operation, you must have the s3:GetBucketPolicyStatus
\n permission. For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.
For more information about when Amazon S3 considers a bucket public, see The Meaning of \"Public\".
\nThe following operations are related to GetBucketPolicyStatus
:
\n GetPublicAccessBlock\n
\n\n PutPublicAccessBlock\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the replication configuration of a bucket.
\nIt can take a while to propagate the put or delete a replication configuration to\n all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong\n result.
\nFor information about replication configuration, see Replication in the\n Amazon S3 User Guide.
\nThis action requires permissions for the s3:GetReplicationConfiguration
\n action. For more information about permissions, see Using Bucket Policies and User\n Policies.
If you include the Filter
element in a replication configuration, you must\n also include the DeleteMarkerReplication
and Priority
elements.\n The response also returns those elements.
For information about GetBucketReplication
errors, see List of\n replication-related error codes\n
The following operations are related to GetBucketReplication
:
\n PutBucketReplication\n
\nThis operation is not supported by directory buckets.
\nReturns the replication configuration of a bucket.
\nIt can take a while to propagate the put or delete a replication configuration to\n all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong\n result.
\nFor information about replication configuration, see Replication in the\n Amazon S3 User Guide.
\nThis action requires permissions for the s3:GetReplicationConfiguration
\n action. For more information about permissions, see Using Bucket Policies and User\n Policies.
If you include the Filter
element in a replication configuration, you must\n also include the DeleteMarkerReplication
and Priority
elements.\n The response also returns those elements.
For information about GetBucketReplication
errors, see List of\n replication-related error codes\n
The following operations are related to GetBucketReplication
:
\n PutBucketReplication\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the request payment configuration of a bucket. To use this version of the\n operation, you must be the bucket owner. For more information, see Requester Pays\n Buckets.
\nThe following operations are related to GetBucketRequestPayment
:
\n ListObjects\n
\nThis operation is not supported by directory buckets.
\nReturns the request payment configuration of a bucket. To use this version of the\n operation, you must be the bucket owner. For more information, see Requester Pays\n Buckets.
\nThe following operations are related to GetBucketRequestPayment
:
\n ListObjects\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the tag set associated with the bucket.
\nTo use this operation, you must have permission to perform the\n s3:GetBucketTagging
action. By default, the bucket owner has this\n permission and can grant this permission to others.
\n GetBucketTagging
has the following special error:
Error code: NoSuchTagSet
\n
Description: There is no tag set associated with the bucket.
\nThe following operations are related to GetBucketTagging
:
\n PutBucketTagging\n
\n\n DeleteBucketTagging\n
\nThis operation is not supported by directory buckets.
\nReturns the tag set associated with the bucket.
\nTo use this operation, you must have permission to perform the\n s3:GetBucketTagging
action. By default, the bucket owner has this\n permission and can grant this permission to others.
\n GetBucketTagging
has the following special error:
Error code: NoSuchTagSet
\n
Description: There is no tag set associated with the bucket.
\nThe following operations are related to GetBucketTagging
:
\n PutBucketTagging\n
\n\n DeleteBucketTagging\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the versioning state of a bucket.
\nTo retrieve the versioning state of a bucket, you must be the bucket owner.
\nThis implementation also returns the MFA Delete status of the versioning state. If the\n MFA Delete status is enabled
, the bucket owner must use an authentication\n device to change the versioning state of the bucket.
The following operations are related to GetBucketVersioning
:
\n GetObject\n
\n\n PutObject\n
\n\n DeleteObject\n
\nThis operation is not supported by directory buckets.
\nReturns the versioning state of a bucket.
\nTo retrieve the versioning state of a bucket, you must be the bucket owner.
\nThis implementation also returns the MFA Delete status of the versioning state. If the\n MFA Delete status is enabled
, the bucket owner must use an authentication\n device to change the versioning state of the bucket.
The following operations are related to GetBucketVersioning
:
\n GetObject\n
\n\n PutObject\n
\n\n DeleteObject\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the website configuration for a bucket. To host website on Amazon S3, you can\n configure a bucket as website by adding a website configuration. For more information about\n hosting websites, see Hosting Websites on Amazon S3.
\nThis GET action requires the S3:GetBucketWebsite
permission. By default,\n only the bucket owner can read the bucket website configuration. However, bucket owners can\n allow other users to read the website configuration by writing a bucket policy granting\n them the S3:GetBucketWebsite
permission.
The following operations are related to GetBucketWebsite
:
\n DeleteBucketWebsite\n
\n\n PutBucketWebsite\n
\nThis operation is not supported by directory buckets.
\nReturns the website configuration for a bucket. To host website on Amazon S3, you can\n configure a bucket as website by adding a website configuration. For more information about\n hosting websites, see Hosting Websites on Amazon S3.
\nThis GET action requires the S3:GetBucketWebsite
permission. By default,\n only the bucket owner can read the bucket website configuration. However, bucket owners can\n allow other users to read the website configuration by writing a bucket policy granting\n them the S3:GetBucketWebsite
permission.
The following operations are related to GetBucketWebsite
:
\n DeleteBucketWebsite\n
\n\n PutBucketWebsite\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Retrieves objects from Amazon S3. To use GET
, you must have READ
\n access to the object. If you grant READ
access to the anonymous user, you can\n return the object without using an authorization header.
An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer\n file system. You can, however, create a logical hierarchy by using object key names that\n imply a folder structure. For example, instead of naming an object sample.jpg
,\n you can name it photos/2006/February/sample.jpg
.
To get an object from such a logical hierarchy, specify the full key name for the object\n in the GET
operation. For a virtual hosted-style request example, if you have\n the object photos/2006/February/sample.jpg
, specify the resource as\n /photos/2006/February/sample.jpg
. For a path-style request example, if you\n have the object photos/2006/February/sample.jpg
in the bucket named\n examplebucket
, specify the resource as\n /examplebucket/photos/2006/February/sample.jpg
. For more information about\n request types, see HTTP Host\n Header Bucket Specification.
For more information about returning the ACL of an object, see GetObjectAcl.
\nIf the object you are retrieving is stored in the S3 Glacier Flexible Retrieval or\n S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or\n S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a\n copy using RestoreObject. Otherwise, this action returns an\n InvalidObjectState
error. For information about restoring archived objects,\n see Restoring\n Archived Objects.
Encryption request headers, like x-amz-server-side-encryption
, should not\n be sent for GET requests if your object uses server-side encryption with Key Management Service (KMS)\n keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or\n server-side encryption with Amazon S3 managed encryption keys (SSE-S3). If your object does use\n these types of keys, you’ll get an HTTP 400 Bad Request error.
If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object,\n you must use the following headers:
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about SSE-C, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys).
\nAssuming you have the relevant permission to read object tags, the response also returns\n the x-amz-tagging-count
header that provides the count of number of tags\n associated with the object. You can use GetObjectTagging to retrieve\n the tag set associated with an object.
You need the relevant read object (or version) permission for this operation.\n For more information, see Specifying Permissions in\n a Policy. If the object that you request doesn’t exist, the error that\n Amazon S3 returns depends on whether you also have the s3:ListBucket
\n permission.
If you have the s3:ListBucket
permission on the bucket, Amazon S3\n returns an HTTP status code 404 (Not Found) error.
If you don’t have the s3:ListBucket
permission, Amazon S3 returns an\n HTTP status code 403 (\"access denied\") error.
By default, the GET
action returns the current version of an\n object. To return a different version, use the versionId
\n subresource.
If you supply a versionId
, you need the\n s3:GetObjectVersion
permission to access a specific\n version of an object. If you request a specific version, you do not need\n to have the s3:GetObject
permission. If you request the\n current version without a specific version ID, only\n s3:GetObject
permission is required.\n s3:GetObjectVersion
permission won't be required.
If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes x-amz-delete-marker: true
in the response.
If the specified version is a delete marker, the response returns a 405 (Method Not Allowed) error and the Last-Modified: timestamp
response header.
For more information about versioning, see PutBucketVersioning.
\nThere are times when you want to override certain response header values in a\n GET
response. For example, you might override the\n Content-Disposition
response header value in your GET
\n request.
You can override values for a set of response headers using the following query\n parameters. These response header values are sent only on a successful request,\n that is, when status code 200 OK is returned. The set of headers you can override\n using these parameters is a subset of the headers that Amazon S3 accepts when you\n create an object. The response headers that you can override for the\n GET
response are Content-Type
,\n Content-Language
, Expires
,\n Cache-Control
, Content-Disposition
, and\n Content-Encoding
. To override these header values in the\n GET
response, you use the following request parameters.
You must sign the request, either using an Authorization header or a\n presigned URL, when using these parameters. They cannot be used with an\n unsigned (anonymous) request.
\n\n response-content-type
\n
\n response-content-language
\n
\n response-expires
\n
\n response-cache-control
\n
\n response-content-disposition
\n
\n response-content-encoding
\n
If both of the If-Match
and If-Unmodified-Since
\n headers are present in the request as follows: If-Match
condition\n evaluates to true
, and; If-Unmodified-Since
condition\n evaluates to false
; then, S3 returns 200 OK and the data requested.
If both of the If-None-Match
and If-Modified-Since
\n headers are present in the request as follows: If-None-Match
\n condition evaluates to false
, and; If-Modified-Since
\n condition evaluates to true
; then, S3 returns 304 Not Modified\n response code.
For more information about conditional requests, see RFC 7232.
\nThe following operations are related to GetObject
:
\n ListBuckets\n
\n\n GetObjectAcl\n
\nRetrieves an object from Amazon S3.
\nIn the GetObject
request, specify the full key name for the object.
\n General purpose buckets - Both the virtual-hosted-style requests and the path-style requests are supported. For a virtual hosted-style request example, if you have\n the object photos/2006/February/sample.jpg
, specify the object key name as\n /photos/2006/February/sample.jpg
. For a path-style request example, if you\n have the object photos/2006/February/sample.jpg
in the bucket named\n examplebucket
, specify the object key name as\n /examplebucket/photos/2006/February/sample.jpg
. For more information about\n request types, see HTTP Host\n Header Bucket Specification in the Amazon S3 User Guide.
\n Directory buckets - Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg
in the bucket named examplebucket--use1-az5--x-s3
, specify the object key name as /photos/2006/February/sample.jpg
. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - You must have the required permissions in a policy. To use GetObject
, you must have the READ
\n access to the object (or version). If you grant READ
access to the anonymous user, the GetObject
operation \n returns the object without using an authorization header. For more information, see Specifying permissions in\n a policy in the Amazon S3 User Guide.
If you include a versionId
in your request header, you must have the\n s3:GetObjectVersion
permission to access a specific\n version of an object. The s3:GetObject
permission is not required in this scenario.
If you request the\n current version of an object without a specific versionId
in the request header, only\n the s3:GetObject
permission is required. The s3:GetObjectVersion
permission is not required in this scenario.\n
If the object that you request doesn’t exist, the error that\n Amazon S3 returns depends on whether you also have the s3:ListBucket
\n permission.
If you have the s3:ListBucket
permission on the bucket, Amazon S3\n returns an HTTP status code 404 Not Found
error.
If you don’t have the s3:ListBucket
permission, Amazon S3 returns an\n HTTP status code 403 Access Denied
error.
\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the \n S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access tier, or the \n S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you must first restore a\n copy using RestoreObject. Otherwise, this operation returns an\n InvalidObjectState
error. For information about restoring archived objects,\n see Restoring\n Archived Objects in the Amazon S3 User Guide.
\n Directory buckets - For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. \nUnsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request
.
Encryption request headers, like x-amz-server-side-encryption
, should not\n be sent for the GetObject
requests, if your object uses server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side encryption with Key Management Service (KMS)\n keys (SSE-KMS), or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your GetObject
requests for the object that uses \n these types of keys, you’ll get an HTTP 400 Bad Request
error.
There are times when you want to override certain response header values of a\n GetObject
response. For example, you might override the\n Content-Disposition
response header value through your GetObject
\n request.
You can override values for a set of response headers. These modified response header values are included only in a successful response, that is, when the HTTP status code 200 OK
is returned. \n The headers you can override using the following query parameters in the request are a subset of the headers that Amazon S3 accepts when you create an object. \n
The response headers that you can override for the\n GetObject
response are Cache-Control
, Content-Disposition
, \n Content-Encoding
, Content-Language
, Content-Type
, and Expires
.
To override values for a set of response headers in the\n GetObject
response, you can use the following query\n parameters in the request.
\n response-cache-control
\n
\n response-content-disposition
\n
\n response-content-encoding
\n
\n response-content-language
\n
\n response-content-type
\n
\n response-expires
\n
When you use these parameters, you must sign the request by using either an Authorization header or a\n presigned URL. These parameters cannot be used with an\n unsigned (anonymous) request.
\n\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to GetObject
:
\n ListBuckets\n
\n\n GetObjectAcl\n
\nReturns the access control list (ACL) of an object. To use this operation, you must have\n s3:GetObjectAcl
permissions or READ_ACP
access to the object.\n For more information, see Mapping of ACL permissions and access policy permissions in the Amazon S3\n User Guide\n
This action is not supported by Amazon S3 on Outposts.
\nBy default, GET returns ACL information about the current version of an object. To\n return ACL information about a different version, use the versionId subresource.
\nIf your bucket uses the bucket owner enforced setting for S3 Object Ownership,\n requests to read ACLs are still supported and return the\n bucket-owner-full-control
ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.
The following operations are related to GetObjectAcl
:
\n GetObject\n
\n\n GetObjectAttributes\n
\n\n DeleteObject\n
\n\n PutObject\n
\nThis operation is not supported by directory buckets.
\nReturns the access control list (ACL) of an object. To use this operation, you must have\n s3:GetObjectAcl
permissions or READ_ACP
access to the object.\n For more information, see Mapping of ACL permissions and access policy permissions in the Amazon S3\n User Guide\n
This functionality is not supported for Amazon S3 on Outposts.
\nBy default, GET returns ACL information about the current version of an object. To\n return ACL information about a different version, use the versionId subresource.
\nIf your bucket uses the bucket owner enforced setting for S3 Object Ownership,\n requests to read ACLs are still supported and return the\n bucket-owner-full-control
ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.
The following operations are related to GetObjectAcl
:
\n GetObject\n
\n\n GetObjectAttributes\n
\n\n DeleteObject\n
\n\n PutObject\n
\nThe bucket name that contains the object for which to get the ACL information.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The bucket name that contains the object for which to get the ACL information.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", "smithy.api#httpLabel": {}, "smithy.api#required": {}, "smithy.rules#contextParam": { @@ -21099,7 +23104,7 @@ "VersionId": { "target": "com.amazonaws.s3#ObjectVersionId", "traits": { - "smithy.api#documentation": "VersionId used to reference a specific version of the object.
", + "smithy.api#documentation": "Version ID used to reference a specific version of the object.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Retrieves all the metadata from an object without returning the object itself. This\n action is useful if you're interested only in an object's metadata. To use\n GetObjectAttributes
, you must have READ access to the object.
\n GetObjectAttributes
combines the functionality of HeadObject
\n and ListParts
. All of the data returned with each of those individual calls\n can be returned with a single call to GetObjectAttributes
.
If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the\n metadata from the object, you must use the following headers:
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about SSE-C, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys) in the\n Amazon S3 User Guide.
\nEncryption request headers, such as x-amz-server-side-encryption
,\n should not be sent for GET requests if your object uses server-side encryption\n with Amazon Web Services KMS keys stored in Amazon Web Services Key Management Service (SSE-KMS) or\n server-side encryption with Amazon S3 managed keys (SSE-S3). If your object does use\n these types of keys, you'll get an HTTP 400 Bad Request
error.
The last modified property in this case is the creation date of the\n object.
\nConsider the following when using request headers:
\n If both of the If-Match
and If-Unmodified-Since
headers\n are present in the request as follows, then Amazon S3 returns the HTTP status code\n 200 OK
and the data requested:
\n If-Match
condition evaluates to true
.
\n If-Unmodified-Since
condition evaluates to\n false
.
If both of the If-None-Match
and If-Modified-Since
\n headers are present in the request as follows, then Amazon S3 returns the HTTP status code\n 304 Not Modified
:
\n If-None-Match
condition evaluates to false
.
\n If-Modified-Since
condition evaluates to\n true
.
For more information about conditional requests, see RFC 7232.
\nThe permissions that you need to use this operation depend on whether the\n bucket is versioned. If the bucket is versioned, you need both the\n s3:GetObjectVersion
and s3:GetObjectVersionAttributes
\n permissions for this operation. If the bucket is not versioned, you need the\n s3:GetObject
and s3:GetObjectAttributes
permissions.\n For more information, see Specifying Permissions in\n a Policy in the Amazon S3 User Guide. If the object\n that you request does not exist, the error Amazon S3 returns depends on whether you\n also have the s3:ListBucket
permission.
If you have the s3:ListBucket
permission on the bucket, Amazon S3\n returns an HTTP status code 404 Not Found
(\"no such key\")\n error.
If you don't have the s3:ListBucket
permission, Amazon S3 returns\n an HTTP status code 403 Forbidden
(\"access denied\")\n error.
The following actions are related to GetObjectAttributes
:
\n GetObject\n
\n\n GetObjectAcl\n
\n\n GetObjectLegalHold\n
\n\n GetObjectRetention\n
\n\n GetObjectTagging\n
\n\n HeadObject\n
\n\n ListParts\n
\nRetrieves all the metadata from an object without returning the object itself. This\n operation is useful if you're interested only in an object's metadata.
\n\n GetObjectAttributes
combines the functionality of HeadObject
\n and ListParts
. All of the data returned with each of those individual calls\n can be returned with a single call to GetObjectAttributes
.
\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - To use\n GetObjectAttributes
, you must have READ access to the object. The permissions that you need to use this operation with depend on whether the\n bucket is versioned. If the bucket is versioned, you need both the\n s3:GetObjectVersion
and s3:GetObjectVersionAttributes
\n permissions for this operation. If the bucket is not versioned, you need the\n s3:GetObject
and s3:GetObjectAttributes
permissions.\n For more information, see Specifying Permissions in\n a Policy in the Amazon S3 User Guide. If the object\n that you request does not exist, the error Amazon S3 returns depends on whether you\n also have the s3:ListBucket
permission.
If you have the s3:ListBucket
permission on the bucket, Amazon S3\n returns an HTTP status code 404 Not Found
(\"no such key\")\n error.
If you don't have the s3:ListBucket
permission, Amazon S3 returns\n an HTTP status code 403 Forbidden
(\"access denied\")\n error.
\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
Encryption request headers, like x-amz-server-side-encryption
,\n should not be sent for HEAD
requests if your object uses server-side\n encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side\n encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3\n managed encryption keys (SSE-S3). The x-amz-server-side-encryption
header is used when you PUT
an object to S3 and want to specify the encryption method. \n If you include this header in a GET
request for an object that uses these types of keys, \n you’ll get an HTTP 400 Bad Request
error. It's because the encryption method can't be changed when you retrieve the object.
If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the\n metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are:
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about SSE-C, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys) in the Amazon S3\n User Guide.
\n\n Directory bucket permissions - For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
\n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null
value of the version ID is supported by directory buckets. You can only specify null
\n to the versionId
query parameter in the request.
Consider the following when using request headers:
\nIf both of the If-Match
and If-Unmodified-Since
headers\n are present in the request as follows, then Amazon S3 returns the HTTP status code\n 200 OK
and the data requested:
\n If-Match
condition evaluates to true
.
\n If-Unmodified-Since
condition evaluates to\n false
.
For more information about conditional requests, see RFC 7232.
\nIf both of the If-None-Match
and If-Modified-Since
\n headers are present in the request as follows, then Amazon S3 returns the HTTP status code\n 304 Not Modified
:
\n If-None-Match
condition evaluates to false
.
\n If-Modified-Since
condition evaluates to\n true
.
For more information about conditional requests, see RFC 7232.
\n\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following actions are related to GetObjectAttributes
:
\n GetObject\n
\n\n GetObjectAcl\n
\n\n GetObjectLegalHold\n
\n\n GetObjectRetention\n
\n\n GetObjectTagging\n
\n\n HeadObject\n
\n\n ListParts\n
\nSpecifies whether the object retrieved was (true
) or was not\n (false
) a delete marker. If false
, this response header does\n not appear in the response.
Specifies whether the object retrieved was (true
) or was not\n (false
) a delete marker. If false
, this response header does\n not appear in the response.
This functionality is not supported for directory buckets.
\nThe version ID of the object.
", + "smithy.api#documentation": "The version ID of the object.
\nThis functionality is not supported for directory buckets.
\nProvides the storage class information of the object. Amazon S3 returns this header for all\n objects except for S3 Standard storage class objects.
\nFor more information, see Storage Classes.
" + "smithy.api#documentation": "Provides the storage class information of the object. Amazon S3 returns this header for all\n objects except for S3 Standard storage class objects.
\nFor more information, see Storage Classes.
\n\n Directory buckets - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nA container for elements related to a particular part. A response can contain zero or\n more Parts
elements.
A container for elements related to a particular part. A response can contain zero or\n more Parts
elements.
\n General purpose buckets - For GetObjectAttributes
, if a additional checksum (including x-amz-checksum-crc32
, \n x-amz-checksum-crc32c
, x-amz-checksum-sha1
, or \n x-amz-checksum-sha256
) isn't applied to the object specified in the request, the response doesn't return Part
.
\n Directory buckets - For GetObjectAttributes
, no matter whether a additional checksum is applied to the object specified in the request, the response returns Part
.
The name of the bucket that contains the object.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the bucket that contains the object.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The version ID used to reference a specific version of the object.
", + "smithy.api#documentation": "The version ID used to reference a specific version of the object.
\nS3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null
value of the version ID is supported by directory buckets. You can only specify null
\n to the versionId
query parameter in the request.
Specifies the algorithm to use when encrypting the object (for example, AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when encrypting the object (for example, AES256).
\nThis functionality is not supported for directory buckets.
\nSpecifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
This functionality is not supported for directory buckets.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Gets an object's current legal hold status. For more information, see Locking\n Objects.
\nThis action is not supported by Amazon S3 on Outposts.
\nThe following action is related to GetObjectLegalHold
:
\n GetObjectAttributes\n
\nThis operation is not supported by directory buckets.
\nGets an object's current legal hold status. For more information, see Locking\n Objects.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nThe following action is related to GetObjectLegalHold
:
\n GetObjectAttributes\n
\nThe bucket name containing the object whose legal hold status you want to retrieve.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The bucket name containing the object whose legal hold status you want to retrieve.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", "smithy.api#httpLabel": {}, "smithy.api#required": {}, "smithy.rules#contextParam": { @@ -21415,7 +23420,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock\n configuration will be applied by default to every new object placed in the specified\n bucket. For more information, see Locking Objects.
\nThe following action is related to GetObjectLockConfiguration
:
\n GetObjectAttributes\n
\nThis operation is not supported by directory buckets.
\nGets the Object Lock configuration for a bucket. The rule specified in the Object Lock\n configuration will be applied by default to every new object placed in the specified\n bucket. For more information, see Locking Objects.
\nThe following action is related to GetObjectLockConfiguration
:
\n GetObjectAttributes\n
\nThe bucket whose Object Lock configuration you want to retrieve.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The bucket whose Object Lock configuration you want to retrieve.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", "smithy.api#httpLabel": {}, "smithy.api#required": {}, "smithy.rules#contextParam": { @@ -21473,7 +23478,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If\n false, this response header does not appear in the response.
", + "smithy.api#documentation": "Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If\n false, this response header does not appear in the response.
\nIf the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes x-amz-delete-marker: true
in the response.
If the specified version in the request is a delete marker, the response returns a 405 Method Not Allowed
error and the Last-Modified: timestamp
response header.
Indicates that a range of bytes was specified.
", + "smithy.api#documentation": "Indicates that a range of bytes was specified in the request.
", "smithy.api#httpHeader": "accept-ranges" } }, "Expiration": { "target": "com.amazonaws.s3#Expiration", "traits": { - "smithy.api#documentation": "If the object expiration is configured (see PUT Bucket lifecycle), the response includes\n this header. It includes the expiry-date
and rule-id
key-value\n pairs providing object expiration information. The value of the rule-id
is\n URL-encoded.
If the object expiration is configured (see \n PutBucketLifecycleConfiguration
\n ), the response includes\n this header. It includes the expiry-date
and rule-id
key-value\n pairs providing object expiration information. The value of the rule-id
is\n URL-encoded.
This functionality is not supported for directory buckets.
\nProvides information about object restoration action and expiration time of the restored\n object copy.
", + "smithy.api#documentation": "Provides information about object restoration action and expiration time of the restored\n object copy.
\nThis functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nDate and time when the object was last modified.
", + "smithy.api#documentation": "Date and time when the object was last modified.
\n\n General purpose buckets - When you specify a versionId
of the object in your request, if the specified version in the request is a delete marker, the response returns a 405 Method Not Allowed
error and the Last-Modified: timestamp
response header.
The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-crc32" } }, "ChecksumCRC32C": { "target": "com.amazonaws.s3#ChecksumCRC32C", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-crc32c" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-sha1" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-sha256" } }, "MissingMeta": { "target": "com.amazonaws.s3#MissingMeta", "traits": { - "smithy.api#documentation": "This is set to the number of metadata entries not returned in x-amz-meta
\n headers. This can happen if you create metadata using an API like SOAP that supports more\n flexible metadata than the REST API. For example, using SOAP, you can create metadata whose\n values are not legal HTTP headers.
This is set to the number of metadata entries not returned in the headers that are prefixed with x-amz-meta-
. This can happen if you create metadata using an API like SOAP that supports more\n flexible metadata than the REST API. For example, using SOAP, you can create metadata whose\n values are not legal HTTP headers.
This functionality is not supported for directory buckets.
\nVersion of the object.
", + "smithy.api#documentation": "Version ID of the object.
\nThis functionality is not supported for directory buckets.
\nSpecifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.
", + "smithy.api#documentation": "Indicates what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.
", "smithy.api#httpHeader": "Content-Encoding" } }, @@ -21636,14 +23641,14 @@ "WebsiteRedirectLocation": { "target": "com.amazonaws.s3#WebsiteRedirectLocation", "traits": { - "smithy.api#documentation": "If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.
", + "smithy.api#documentation": "If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.
\nThis functionality is not supported for directory buckets.
\nThe server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
The server-side encryption algorithm used when you store this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header confirming the encryption algorithm used.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.
\nThis functionality is not supported for directory buckets.
\nIf server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide round-trip message integrity verification of\n the customer-provided encryption key.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification of\n the customer-provided encryption key.
\nThis functionality is not supported for directory buckets.
\nIf present, specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
", + "smithy.api#documentation": "If present, indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
\nThis functionality is not supported for directory buckets.
\nIndicates whether the object uses an S3 Bucket Key for server-side encryption with\n Key Management Service (KMS) keys (SSE-KMS).
", + "smithy.api#documentation": "Indicates whether the object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
\nThis functionality is not supported for directory buckets.
\nProvides storage class information of the object. Amazon S3 returns this header for all\n objects except for S3 Standard storage class objects.
", + "smithy.api#documentation": "Provides storage class information of the object. Amazon S3 returns this header for all\n objects except for S3 Standard storage class objects.
\n\n Directory buckets - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nAmazon S3 can return this if your request involves a bucket that is either a source or\n destination in a replication rule.
", + "smithy.api#documentation": "Amazon S3 can return this if your request involves a bucket that is either a source or\n destination in a replication rule.
\nThis functionality is not supported for directory buckets.
\nThe number of tags, if any, on the object.
", + "smithy.api#documentation": "The number of tags, if any, on the object, when you have the relevant permission to read object tags.
\nYou can use GetObjectTagging to retrieve\n the tag set associated with an object.
\nThis functionality is not supported for directory buckets.
\nThe Object Lock mode currently in place for this object.
", + "smithy.api#documentation": "The Object Lock mode that's currently in place for this object.
\nThis functionality is not supported for directory buckets.
\nThe date and time when this object's Object Lock will expire.
", + "smithy.api#documentation": "The date and time when this object's Object Lock will expire.
\nThis functionality is not supported for directory buckets.
\nIndicates whether this object has an active legal hold. This field is only returned if\n you have permission to view an object's legal hold status.
", + "smithy.api#documentation": "Indicates whether this object has an active legal hold. This field is only returned if\n you have permission to view an object's legal hold status.
\nThis functionality is not supported for directory buckets.
\nThe bucket name containing the object.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen using an Object Lambda access point the hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name containing the object.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\n\n Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Return the object only if its entity tag (ETag) is the same as the one specified;\n otherwise, return a 412 (precondition failed) error.
", + "smithy.api#documentation": "Return the object only if its entity tag (ETag) is the same as the one specified in this header;\n otherwise, return a 412 Precondition Failed
error.
If both of the If-Match
and If-Unmodified-Since
headers are present in the request as follows: If-Match
condition \n evaluates to true
, and; If-Unmodified-Since
condition evaluates to false
; then, S3 returns 200 OK
and the data requested.
For more information about conditional requests, see RFC 7232.
", "smithy.api#httpHeader": "If-Match" } }, "IfModifiedSince": { "target": "com.amazonaws.s3#IfModifiedSince", "traits": { - "smithy.api#documentation": "Return the object only if it has been modified since the specified time; otherwise,\n return a 304 (not modified) error.
", + "smithy.api#documentation": "Return the object only if it has been modified since the specified time; otherwise,\n return a 304 Not Modified
error.
If both of the If-None-Match
and If-Modified-Since
headers are present in the request as follows: If-None-Match
\n condition evaluates to false
, and; If-Modified-Since
condition evaluates to true
; then, S3 returns 304 Not Modified
\n status code.
For more information about conditional requests, see RFC 7232.
", "smithy.api#httpHeader": "If-Modified-Since" } }, "IfNoneMatch": { "target": "com.amazonaws.s3#IfNoneMatch", "traits": { - "smithy.api#documentation": "Return the object only if its entity tag (ETag) is different from the one specified;\n otherwise, return a 304 (not modified) error.
", + "smithy.api#documentation": "Return the object only if its entity tag (ETag) is different from the one specified in this header;\n otherwise, return a 304 Not Modified
error.
If both of the If-None-Match
and If-Modified-Since
\n headers are present in the request as follows: If-None-Match
\n condition evaluates to false
, and; If-Modified-Since
\n condition evaluates to true
; then, S3 returns 304 Not Modified
HTTP status code.
For more information about conditional requests, see RFC 7232.
", "smithy.api#httpHeader": "If-None-Match" } }, "IfUnmodifiedSince": { "target": "com.amazonaws.s3#IfUnmodifiedSince", "traits": { - "smithy.api#documentation": "Return the object only if it has not been modified since the specified time; otherwise,\n return a 412 (precondition failed) error.
", + "smithy.api#documentation": "Return the object only if it has not been modified since the specified time; otherwise,\n return a 412 Precondition Failed
error.
If both of the If-Match
and If-Unmodified-Since
\n headers are present in the request as follows: If-Match
condition\n evaluates to true
, and; If-Unmodified-Since
condition\n evaluates to false
; then, S3 returns 200 OK
and the data requested.
For more information about conditional requests, see RFC 7232.
", "smithy.api#httpHeader": "If-Unmodified-Since" } }, @@ -21798,7 +23803,7 @@ "Range": { "target": "com.amazonaws.s3#Range", "traits": { - "smithy.api#documentation": "Downloads the specified range bytes of an object. For more information about the HTTP\n Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.
\nAmazon S3 doesn't support retrieving multiple ranges of data per GET
\n request.
Downloads the specified byte range of an object. For more information about the HTTP\n Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.
\nAmazon S3 doesn't support retrieving multiple ranges of data per GET
\n request.
Sets the Content-Disposition
header of the response
Sets the Content-Disposition
header of the response.
VersionId used to reference a specific version of the object.
", + "smithy.api#documentation": "Version ID used to reference a specific version of the object.
\nBy default, the GetObject
operation returns the current version of an object. To return a different version, use the versionId
subresource.
If you include a versionId
in your request header, you must have the s3:GetObjectVersion
permission to access a specific version of an object. The s3:GetObject
permission is not required in this scenario.
If you request the current version of an object without a specific versionId
in the request header, only the s3:GetObject
permission is required. The s3:GetObjectVersion
permission is not required in this scenario.
\n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null
value of the version ID is supported by directory buckets. You can only specify null
\n to the versionId
query parameter in the request.
For more information about versioning, see PutBucketVersioning.
", "smithy.api#httpQuery": "versionId" } }, "SSECustomerAlgorithm": { "target": "com.amazonaws.s3#SSECustomerAlgorithm", "traits": { - "smithy.api#documentation": "Specifies the algorithm to use to when decrypting the object (for example,\n AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when decrypting the object (for example,\n AES256
).
If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object,\n you must use the following headers:
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about SSE-C, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nSpecifies the customer-provided encryption key for Amazon S3 used to encrypt the data. This\n value is used to decrypt the object when recovering it and must match the one used when\n storing the data. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This\n value is used to decrypt the object when recovering it and must match the one used when\n storing the data. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object,\n you must use the following headers:
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about SSE-C, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nIf you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object,\n you must use the following headers:
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about SSE-C, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Retrieves an object's retention settings. For more information, see Locking\n Objects.
\nThis action is not supported by Amazon S3 on Outposts.
\nThe following action is related to GetObjectRetention
:
\n GetObjectAttributes\n
\nThis operation is not supported by directory buckets.
\nRetrieves an object's retention settings. For more information, see Locking\n Objects.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nThe following action is related to GetObjectRetention
:
\n GetObjectAttributes\n
\nThe bucket name containing the object whose retention settings you want to retrieve.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The bucket name containing the object whose retention settings you want to retrieve.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", "smithy.api#httpLabel": {}, "smithy.api#required": {}, "smithy.rules#contextParam": { @@ -21977,7 +23982,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns the tag-set of an object. You send the GET request against the tagging\n subresource associated with the object.
\nTo use this operation, you must have permission to perform the\n s3:GetObjectTagging
action. By default, the GET action returns information\n about current version of an object. For a versioned bucket, you can have multiple versions\n of an object in your bucket. To retrieve tags of any other version, use the versionId query\n parameter. You also need permission for the s3:GetObjectVersionTagging
\n action.
By default, the bucket owner has this permission and can grant this permission to\n others.
\nFor information about the Amazon S3 object tagging feature, see Object Tagging.
\nThe following actions are related to GetObjectTagging
:
\n DeleteObjectTagging\n
\n\n GetObjectAttributes\n
\n\n PutObjectTagging\n
\nThis operation is not supported by directory buckets.
\nReturns the tag-set of an object. You send the GET request against the tagging\n subresource associated with the object.
\nTo use this operation, you must have permission to perform the\n s3:GetObjectTagging
action. By default, the GET action returns information\n about current version of an object. For a versioned bucket, you can have multiple versions\n of an object in your bucket. To retrieve tags of any other version, use the versionId query\n parameter. You also need permission for the s3:GetObjectVersionTagging
\n action.
By default, the bucket owner has this permission and can grant this permission to\n others.
\nFor information about the Amazon S3 object tagging feature, see Object Tagging.
\nThe following actions are related to GetObjectTagging
:
\n DeleteObjectTagging\n
\n\n GetObjectAttributes\n
\n\n PutObjectTagging\n
\nThe bucket name containing the object for which to get the tagging information.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name containing the object for which to get the tagging information.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're\n distributing large files.
\nYou can get torrent only for objects that are less than 5 GB in size, and that are\n not encrypted using server-side encryption with a customer-provided encryption\n key.
\nTo use GET, you must have READ access to the object.
\nThis action is not supported by Amazon S3 on Outposts.
\nThe following action is related to GetObjectTorrent
:
\n GetObject\n
\nThis operation is not supported by directory buckets.
\nReturns torrent files from a bucket. BitTorrent can save you bandwidth when you're\n distributing large files.
\nYou can get torrent only for objects that are less than 5 GB in size, and that are\n not encrypted using server-side encryption with a customer-provided encryption\n key.
\nTo use GET, you must have READ access to the object.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nThe following action is related to GetObjectTorrent
:
\n GetObject\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Retrieves the PublicAccessBlock
configuration for an Amazon S3 bucket. To use\n this operation, you must have the s3:GetBucketPublicAccessBlock
permission.\n For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.
When Amazon S3 evaluates the PublicAccessBlock
configuration for a bucket or\n an object, it checks the PublicAccessBlock
configuration for both the\n bucket (or the bucket that contains the object) and the bucket owner's account. If the\n PublicAccessBlock
settings are different between the bucket and the\n account, Amazon S3 uses the most restrictive combination of the bucket-level and\n account-level settings.
For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".
\nThe following operations are related to GetPublicAccessBlock
:
\n PutPublicAccessBlock\n
\n\n GetPublicAccessBlock\n
\nThis operation is not supported by directory buckets.
\nRetrieves the PublicAccessBlock
configuration for an Amazon S3 bucket. To use\n this operation, you must have the s3:GetBucketPublicAccessBlock
permission.\n For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.
When Amazon S3 evaluates the PublicAccessBlock
configuration for a bucket or\n an object, it checks the PublicAccessBlock
configuration for both the\n bucket (or the bucket that contains the object) and the bucket owner's account. If the\n PublicAccessBlock
settings are different between the bucket and the\n account, Amazon S3 uses the most restrictive combination of the bucket-level and\n account-level settings.
For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".
\nThe following operations are related to GetPublicAccessBlock
:
\n PutPublicAccessBlock\n
\n\n GetPublicAccessBlock\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
This action is useful to determine if a bucket exists and you have permission to access\n it. The action returns a 200 OK
if the bucket exists and you have permission\n to access it.
If the bucket does not exist or you do not have permission to access it, the\n HEAD
request returns a generic 400 Bad Request
, 403\n Forbidden
or 404 Not Found
code. A message body is not included, so\n you cannot determine the exception beyond these error codes.
To use this operation, you must have permissions to perform the\n s3:ListBucket
action. The bucket owner has this permission by default and\n can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
To use this API operation against an access point, you must provide the alias of the access point in\n place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct\n requests to the access point hostname. The access point hostname takes the form\n AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.\n When using the Amazon Web Services SDKs, you provide the ARN in place of the bucket name. For more\n information, see Using access points.
\nTo use this API operation against an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
You can use this operation to determine if a bucket exists and if you have permission to access it. The action returns a 200 OK
if the bucket exists and you have permission\n to access it.
If the bucket does not exist or you do not have permission to access it, the\n HEAD
request returns a generic 400 Bad Request
, 403\n Forbidden
or 404 Not Found
code. A message body is not included, so\n you cannot determine the exception beyond these error codes.
\n Directory buckets - You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
All HeadBucket
requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz-
prefix, including\n x-amz-copy-source
, must be signed. For more information, see REST Authentication.
\n Directory bucket - You must use IAM credentials to authenticate and authorize your access to the HeadBucket
API operation, instead of using the \n temporary security credentials through the CreateSession
API operation.
Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.
\n\n General purpose bucket permissions - To use this operation, you must have permissions to perform the\n s3:ListBucket
action. The bucket owner has this permission by default and\n can grant this permission to others. For more information about permissions, see Managing\n access permissions to your Amazon S3 resources in the Amazon S3 User Guide.
\n Directory bucket permissions -\n You must have the \n s3express:CreateSession
\n permission in the\n Action
element of a policy. By default, the session is in the ReadWrite
mode. If you want to restrict the access, you can explicitly set the s3express:SessionMode
condition key to ReadOnly
on the bucket.
For more information about example bucket policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone in the Amazon S3 User Guide.
\n\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The type of location where the bucket is created.
\nThis functionality is only supported by directory buckets.
\nThe name of the location where the bucket will be created.
\nFor directory buckets, the AZ ID of the Availability Zone where the bucket is created. An example AZ ID value is usw2-az2
.
This functionality is only supported by directory buckets.
\nThe Region that the bucket is located.
\nThis functionality is not supported for directory buckets.
\nIndicates whether the bucket name used in the request is an access point alias.
\nThis functionality is not supported for directory buckets.
\nThe bucket name.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the\n bucket name. If the Object Lambda access point alias in a request is not valid, the error code\n InvalidAccessPointAliasError
is returned. For more information about\n InvalidAccessPointAliasError
, see List of Error\n Codes.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\n\n Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError
is returned. \nFor more information about InvalidAccessPointAliasError
, see List of\n Error Codes.
Access points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
The HEAD
action retrieves metadata from an object without returning the\n object itself. This action is useful if you're only interested in an object's metadata. To\n use HEAD
, you must have READ access to the object.
A HEAD
request has the same options as a GET
action on an\n object. The response is identical to the GET
response except that there is no\n response body. Because of this, if the HEAD
request generates an error, it\n returns a generic code, such as 400 Bad Request
, 403 Forbidden
, 404 Not\n Found
, 405 Method Not Allowed
, 412 Precondition Failed
, or 304 Not Modified
. \n It's not possible to retrieve the exact exception of these error codes.
If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the\n metadata from the object, you must use the following headers:
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about SSE-C, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys).
\nEncryption request headers, like x-amz-server-side-encryption
,\n should not be sent for GET
requests if your object uses server-side\n encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side\n encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3\n managed encryption keys (SSE-S3). If your object does use these types of keys,\n you’ll get an HTTP 400 Bad Request error.
The last modified property in this case is the creation date of the\n object.
\nRequest headers are limited to 8 KB in size. For more information, see Common\n Request Headers.
\nConsider the following when using request headers:
\n Consideration 1 – If both of the If-Match
and\n If-Unmodified-Since
headers are present in the request as\n follows:
\n If-Match
condition evaluates to true
, and;
\n If-Unmodified-Since
condition evaluates to\n false
;
Then Amazon S3 returns 200 OK
and the data requested.
Consideration 2 – If both of the If-None-Match
and\n If-Modified-Since
headers are present in the request as\n follows:
\n If-None-Match
condition evaluates to false
,\n and;
\n If-Modified-Since
condition evaluates to\n true
;
Then Amazon S3 returns the 304 Not Modified
response code.
For more information about conditional requests, see RFC 7232.
\nYou need the relevant read object (or version) permission for this operation.\n For more information, see Actions, resources, and condition\n keys for Amazon S3. If the object you request doesn't exist, the error that\n Amazon S3 returns depends on whether you also have the s3:ListBucket permission.
\nIf you have the s3:ListBucket
permission on the bucket, Amazon S3\n returns an HTTP status code 404 error.
If you don’t have the s3:ListBucket
permission, Amazon S3 returns\n an HTTP status code 403 error.
If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes x-amz-delete-marker: true
in the response.
If the specified version is a delete marker, the response returns a 405 (Method Not Allowed) error and the Last-Modified: timestamp
response header.
The following actions are related to HeadObject
:
\n GetObject\n
\n\n GetObjectAttributes\n
\nThe HEAD
operation retrieves metadata from an object without returning the\n object itself. This operation is useful if you're interested only in an object's metadata.
A HEAD
request has the same options as a GET
operation on an\n object. The response is identical to the GET
response except that there is no\n response body. Because of this, if the HEAD
request generates an error, it\n returns a generic code, such as 400 Bad Request
, 403 Forbidden
, 404 Not\n Found
, 405 Method Not Allowed
, 412 Precondition Failed
, or 304 Not Modified
. \n It's not possible to retrieve the exact exception of these error codes.
Request headers are limited to 8 KB in size. For more information, see Common\n Request Headers.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - To\n use HEAD
, you must have the s3:GetObject
permission. You need the relevant read object (or version) permission for this operation.\n For more information, see Actions, resources, and condition\n keys for Amazon S3 in the Amazon S3\n User Guide.
If the object you request doesn't exist, the error that\n Amazon S3 returns depends on whether you also have the s3:ListBucket
permission.
If you have the s3:ListBucket
permission on the bucket, Amazon S3\n returns an HTTP status code 404 Not Found
error.
If you don’t have the s3:ListBucket
permission, Amazon S3 returns\n an HTTP status code 403 Forbidden
error.
\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
Encryption request headers, like x-amz-server-side-encryption
,\n should not be sent for HEAD
requests if your object uses server-side\n encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side\n encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3\n managed encryption keys (SSE-S3). The x-amz-server-side-encryption
header is used when you PUT
an object to S3 and want to specify the encryption method. \n If you include this header in a HEAD
request for an object that uses these types of keys, \n you’ll get an HTTP 400 Bad Request
error. It's because the encryption method can't be changed when you retrieve the object.
If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the\n metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are:
\n\n x-amz-server-side-encryption-customer-algorithm
\n
\n x-amz-server-side-encryption-customer-key
\n
\n x-amz-server-side-encryption-customer-key-MD5
\n
For more information about SSE-C, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys) in the Amazon S3\n User Guide.
\n\n Directory bucket permissions - For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes x-amz-delete-marker: true
in the response.
If the specified version is a delete marker, the response returns a 405 Method Not Allowed
error and the Last-Modified: timestamp
response header.
\n Directory buckets - Delete marker is not supported by directory buckets.
\n\n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null
value of the version ID is supported by directory buckets. You can only specify null
\n to the versionId
query parameter in the request.
\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following actions are related to HeadObject
:
\n GetObject\n
\n\n GetObjectAttributes\n
\nSpecifies whether the object retrieved was (true) or was not (false) a Delete Marker. If\n false, this response header does not appear in the response.
", + "smithy.api#documentation": "Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If\n false, this response header does not appear in the response.
\nThis functionality is not supported for directory buckets.
\nIf the object expiration is configured (see PUT Bucket lifecycle), the response includes\n this header. It includes the expiry-date
and rule-id
key-value\n pairs providing object expiration information. The value of the rule-id
is\n URL-encoded.
If the object expiration is configured (see \n PutBucketLifecycleConfiguration
\n ), the response includes\n this header. It includes the expiry-date
and rule-id
key-value\n pairs providing object expiration information. The value of the rule-id
is\n URL-encoded.
This functionality is not supported for directory buckets.
\nIf the object is an archived object (an object whose storage class is GLACIER), the\n response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.
\nIf an archive copy is already restored, the header value indicates when Amazon S3 is\n scheduled to delete the object copy. For example:
\n\n x-amz-restore: ongoing-request=\"false\", expiry-date=\"Fri, 21 Dec 2012 00:00:00\n GMT\"
\n
If the object restoration is in progress, the header returns the value\n ongoing-request=\"true\"
.
For more information about archiving objects, see Transitioning Objects: General Considerations.
", + "smithy.api#documentation": "If the object is an archived object (an object whose storage class is GLACIER), the\n response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.
\nIf an archive copy is already restored, the header value indicates when Amazon S3 is\n scheduled to delete the object copy. For example:
\n\n x-amz-restore: ongoing-request=\"false\", expiry-date=\"Fri, 21 Dec 2012 00:00:00\n GMT\"
\n
If the object restoration is in progress, the header returns the value\n ongoing-request=\"true\"
.
For more information about archiving objects, see Transitioning Objects: General Considerations.
\nThis functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nThe archive state of the head object.
", + "smithy.api#documentation": "The archive state of the head object.
\nThis functionality is not supported for directory buckets.
\nThe base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-crc32" } }, "ChecksumCRC32C": { "target": "com.amazonaws.s3#ChecksumCRC32C", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-crc32c" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-sha1" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-sha256" } }, @@ -22574,14 +24620,14 @@ "MissingMeta": { "target": "com.amazonaws.s3#MissingMeta", "traits": { - "smithy.api#documentation": "This is set to the number of metadata entries not returned in x-amz-meta
\n headers. This can happen if you create metadata using an API like SOAP that supports more\n flexible metadata than the REST API. For example, using SOAP, you can create metadata whose\n values are not legal HTTP headers.
This is set to the number of metadata entries not returned in x-amz-meta
\n headers. This can happen if you create metadata using an API like SOAP that supports more\n flexible metadata than the REST API. For example, using SOAP, you can create metadata whose\n values are not legal HTTP headers.
This functionality is not supported for directory buckets.
\nVersion of the object.
", + "smithy.api#documentation": "Version ID of the object.
\nThis functionality is not supported for directory buckets.
\nSpecifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.
", + "smithy.api#documentation": "Indicates what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.
", "smithy.api#httpHeader": "Content-Encoding" } }, @@ -22630,14 +24676,14 @@ "WebsiteRedirectLocation": { "target": "com.amazonaws.s3#WebsiteRedirectLocation", "traits": { - "smithy.api#documentation": "If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.
", + "smithy.api#documentation": "If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.
\nThis functionality is not supported for directory buckets.
\nThe server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
The server-side encryption algorithm used when you store this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header confirming the encryption algorithm used.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.
\nThis functionality is not supported for directory buckets.
\nIf server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide round-trip message integrity verification of\n the customer-provided encryption key.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification of\n the customer-provided encryption key.
\nThis functionality is not supported for directory buckets.
\nIf present, specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
", + "smithy.api#documentation": "If present, indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
\nThis functionality is not supported for directory buckets.
\nIndicates whether the object uses an S3 Bucket Key for server-side encryption with\n Key Management Service (KMS) keys (SSE-KMS).
", + "smithy.api#documentation": "Indicates whether the object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
\nThis functionality is not supported for directory buckets.
\nProvides storage class information of the object. Amazon S3 returns this header for all\n objects except for S3 Standard storage class objects.
\nFor more information, see Storage Classes.
", + "smithy.api#documentation": "Provides storage class information of the object. Amazon S3 returns this header for all\n objects except for S3 Standard storage class objects.
\nFor more information, see Storage Classes.
\n\n Directory buckets - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nAmazon S3 can return this header if your request involves a bucket that is either a source or\n a destination in a replication rule.
\nIn replication, you have a source bucket on which you configure replication and\n destination bucket or buckets where Amazon S3 stores object replicas. When you request an object\n (GetObject
) or object metadata (HeadObject
) from these\n buckets, Amazon S3 will return the x-amz-replication-status
header in the response\n as follows:
\n If requesting an object from the source bucket,\n Amazon S3 will return the x-amz-replication-status
header if the object in\n your request is eligible for replication.
For example, suppose that in your replication configuration, you specify object\n prefix TaxDocs
requesting Amazon S3 to replicate objects with key prefix\n TaxDocs
. Any objects you upload with this key name prefix, for\n example TaxDocs/document1.pdf
, are eligible for replication. For any\n object request with this key name prefix, Amazon S3 will return the\n x-amz-replication-status
header with value PENDING, COMPLETED or\n FAILED indicating object replication status.
\n If requesting an object from a destination\n bucket, Amazon S3 will return the x-amz-replication-status
header\n with value REPLICA if the object in your request is a replica that Amazon S3 created and\n there is no replica modification replication in progress.
\n When replicating objects to multiple destination\n buckets, the x-amz-replication-status
header acts\n differently. The header of the source object will only return a value of COMPLETED\n when replication is successful to all destinations. The header will remain at value\n PENDING until replication has completed for all destinations. If one or more\n destinations fails replication the header will return FAILED.
For more information, see Replication.
", + "smithy.api#documentation": "Amazon S3 can return this header if your request involves a bucket that is either a source or\n a destination in a replication rule.
\nIn replication, you have a source bucket on which you configure replication and\n destination bucket or buckets where Amazon S3 stores object replicas. When you request an object\n (GetObject
) or object metadata (HeadObject
) from these\n buckets, Amazon S3 will return the x-amz-replication-status
header in the response\n as follows:
\n If requesting an object from the source bucket,\n Amazon S3 will return the x-amz-replication-status
header if the object in\n your request is eligible for replication.
For example, suppose that in your replication configuration, you specify object\n prefix TaxDocs
requesting Amazon S3 to replicate objects with key prefix\n TaxDocs
. Any objects you upload with this key name prefix, for\n example TaxDocs/document1.pdf
, are eligible for replication. For any\n object request with this key name prefix, Amazon S3 will return the\n x-amz-replication-status
header with value PENDING, COMPLETED or\n FAILED indicating object replication status.
\n If requesting an object from a destination\n bucket, Amazon S3 will return the x-amz-replication-status
header\n with value REPLICA if the object in your request is a replica that Amazon S3 created and\n there is no replica modification replication in progress.
\n When replicating objects to multiple destination\n buckets, the x-amz-replication-status
header acts\n differently. The header of the source object will only return a value of COMPLETED\n when replication is successful to all destinations. The header will remain at value\n PENDING until replication has completed for all destinations. If one or more\n destinations fails replication the header will return FAILED.
For more information, see Replication.
\nThis functionality is not supported for directory buckets.
\nThe Object Lock mode, if any, that's in effect for this object. This header is only\n returned if the requester has the s3:GetObjectRetention
permission. For more\n information about S3 Object Lock, see Object Lock.
The Object Lock mode, if any, that's in effect for this object. This header is only\n returned if the requester has the s3:GetObjectRetention
permission. For more\n information about S3 Object Lock, see Object Lock.
This functionality is not supported for directory buckets.
\nThe date and time when the Object Lock retention period expires. This header is only\n returned if the requester has the s3:GetObjectRetention
permission.
The date and time when the Object Lock retention period expires. This header is only\n returned if the requester has the s3:GetObjectRetention
permission.
This functionality is not supported for directory buckets.
\nSpecifies whether a legal hold is in effect for this object. This header is only\n returned if the requester has the s3:GetObjectLegalHold
permission. This\n header is not returned if the specified version of this object has never had a legal hold\n applied. For more information about S3 Object Lock, see Object Lock.
Specifies whether a legal hold is in effect for this object. This header is only\n returned if the requester has the s3:GetObjectLegalHold
permission. This\n header is not returned if the specified version of this object has never had a legal hold\n applied. For more information about S3 Object Lock, see Object Lock.
This functionality is not supported for directory buckets.
\nThe name of the bucket containing the object.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the bucket that contains the object.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Return the object only if its entity tag (ETag) is the same as the one specified;\n otherwise, return a 412 (precondition failed) error.
", + "smithy.api#documentation": "Return the object only if its entity tag (ETag) is the same as the one specified;\n otherwise, return a 412 (precondition failed) error.
\nIf both of the If-Match
and\n If-Unmodified-Since
headers are present in the request as\n follows:
\n If-Match
condition evaluates to true
, and;
\n If-Unmodified-Since
condition evaluates to\n false
;
Then Amazon S3 returns 200 OK
and the data requested.
For more information about conditional requests, see RFC 7232.
", "smithy.api#httpHeader": "If-Match" } }, "IfModifiedSince": { "target": "com.amazonaws.s3#IfModifiedSince", "traits": { - "smithy.api#documentation": "Return the object only if it has been modified since the specified time; otherwise,\n return a 304 (not modified) error.
", + "smithy.api#documentation": "Return the object only if it has been modified since the specified time; otherwise,\n return a 304 (not modified) error.
\nIf both of the If-None-Match
and\n If-Modified-Since
headers are present in the request as\n follows:
\n If-None-Match
condition evaluates to false
,\n and;
\n If-Modified-Since
condition evaluates to\n true
;
Then Amazon S3 returns the 304 Not Modified
response code.
For more information about conditional requests, see RFC 7232.
", "smithy.api#httpHeader": "If-Modified-Since" } }, "IfNoneMatch": { "target": "com.amazonaws.s3#IfNoneMatch", "traits": { - "smithy.api#documentation": "Return the object only if its entity tag (ETag) is different from the one specified;\n otherwise, return a 304 (not modified) error.
", + "smithy.api#documentation": "Return the object only if its entity tag (ETag) is different from the one specified;\n otherwise, return a 304 (not modified) error.
\nIf both of the If-None-Match
and\n If-Modified-Since
headers are present in the request as\n follows:
\n If-None-Match
condition evaluates to false
,\n and;
\n If-Modified-Since
condition evaluates to\n true
;
Then Amazon S3 returns the 304 Not Modified
response code.
For more information about conditional requests, see RFC 7232.
", "smithy.api#httpHeader": "If-None-Match" } }, "IfUnmodifiedSince": { "target": "com.amazonaws.s3#IfUnmodifiedSince", "traits": { - "smithy.api#documentation": "Return the object only if it has not been modified since the specified time; otherwise,\n return a 412 (precondition failed) error.
", + "smithy.api#documentation": "Return the object only if it has not been modified since the specified time; otherwise,\n return a 412 (precondition failed) error.
\nIf both of the If-Match
and\n If-Unmodified-Since
headers are present in the request as\n follows:
\n If-Match
condition evaluates to true
, and;
\n If-Unmodified-Since
condition evaluates to\n false
;
Then Amazon S3 returns 200 OK
and the data requested.
For more information about conditional requests, see RFC 7232.
", "smithy.api#httpHeader": "If-Unmodified-Since" } }, @@ -22792,28 +24838,28 @@ "VersionId": { "target": "com.amazonaws.s3#ObjectVersionId", "traits": { - "smithy.api#documentation": "VersionId used to reference a specific version of the object.
", + "smithy.api#documentation": "Version ID used to reference a specific version of the object.
\nFor directory buckets in this API operation, only the null
value of the version ID is supported.
Specifies the algorithm to use to when encrypting the object (for example,\n AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when encrypting the object (for example,\n AES256).
\nThis functionality is not supported for directory buckets.
\nSpecifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
This functionality is not supported for directory buckets.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the\n principal is an IAM User, it provides a user ARN value.
" + "smithy.api#documentation": "If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the\n principal is an IAM User, it provides a user ARN value.
\n\n Directory buckets - If the principal is an Amazon Web Services account, it provides the Amazon Web Services account ID. If the\n principal is an IAM User, it provides a user ARN value.
\nName of the Principal.
" + "smithy.api#documentation": "Name of the Principal.
\nThis functionality is not supported for directory buckets.
\nObject is archived and inaccessible until restored.
", - "smithy.api#error": "client" + "smithy.api#documentation": "Object is archived and inaccessible until restored.
\nIf the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the \n S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access tier, or the \n S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you must first restore a\n copy using RestoreObject. Otherwise, this operation returns an\n InvalidObjectState
error. For information about restoring archived objects,\n see Restoring\n Archived Objects in the Amazon S3 User Guide.
Lists the analytics configurations for the bucket. You can have up to 1,000 analytics\n configurations per bucket.
\nThis action supports list pagination and does not return more than 100 configurations at\n a time. You should always check the IsTruncated
element in the response. If\n there are no more configurations to list, IsTruncated
is set to false. If\n there are more configurations to list, IsTruncated
is set to true, and there\n will be a value in NextContinuationToken
. You use the\n NextContinuationToken
value to continue the pagination of the list by\n passing the value in continuation-token in the request to GET
the next\n page.
To use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class\n Analysis.
\nThe following operations are related to\n ListBucketAnalyticsConfigurations
:
This operation is not supported by directory buckets.
\nLists the analytics configurations for the bucket. You can have up to 1,000 analytics\n configurations per bucket.
\nThis action supports list pagination and does not return more than 100 configurations at\n a time. You should always check the IsTruncated
element in the response. If\n there are no more configurations to list, IsTruncated
is set to false. If\n there are more configurations to list, IsTruncated
is set to true, and there\n will be a value in NextContinuationToken
. You use the\n NextContinuationToken
value to continue the pagination of the list by\n passing the value in continuation-token in the request to GET
the next\n page.
To use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class\n Analysis.
\nThe following operations are related to\n ListBucketAnalyticsConfigurations
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Lists the S3 Intelligent-Tiering configuration from the specified bucket.
\nThe S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.
\nThe S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.
\nFor more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.
\nOperations related to ListBucketIntelligentTieringConfigurations
include:
This operation is not supported by directory buckets.
\nLists the S3 Intelligent-Tiering configuration from the specified bucket.
\nThe S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.
\nThe S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.
\nFor more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.
\nOperations related to ListBucketIntelligentTieringConfigurations
include:
Returns a list of inventory configurations for the bucket. You can have up to 1,000\n analytics configurations per bucket.
\nThis action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated
element in the response. If there are no\n more configurations to list, IsTruncated
is set to false. If there are more\n configurations to list, IsTruncated
is set to true, and there is a value in\n NextContinuationToken
. You use the NextContinuationToken
value\n to continue the pagination of the list by passing the value in continuation-token in the\n request to GET
the next page.
To use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about the Amazon S3 inventory feature, see Amazon S3 Inventory\n
\nThe following operations are related to\n ListBucketInventoryConfigurations
:
This operation is not supported by directory buckets.
\nReturns a list of inventory configurations for the bucket. You can have up to 1,000\n analytics configurations per bucket.
\nThis action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated
element in the response. If there are no\n more configurations to list, IsTruncated
is set to false. If there are more\n configurations to list, IsTruncated
is set to true, and there is a value in\n NextContinuationToken
. You use the NextContinuationToken
value\n to continue the pagination of the list by passing the value in continuation-token in the\n request to GET
the next page.
To use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about the Amazon S3 inventory feature, see Amazon S3 Inventory\n
\nThe following operations are related to\n ListBucketInventoryConfigurations
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Lists the metrics configurations for the bucket. The metrics configurations are only for\n the request metrics of the bucket and do not provide information on daily storage metrics.\n You can have up to 1,000 configurations per bucket.
\nThis action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated
element in the response. If there are no\n more configurations to list, IsTruncated
is set to false. If there are more\n configurations to list, IsTruncated
is set to true, and there is a value in\n NextContinuationToken
. You use the NextContinuationToken
value\n to continue the pagination of the list by passing the value in\n continuation-token
in the request to GET
the next page.
To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration
action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For more information about metrics configurations and CloudWatch request metrics, see\n Monitoring Metrics with Amazon CloudWatch.
\nThe following operations are related to\n ListBucketMetricsConfigurations
:
This operation is not supported by directory buckets.
\nLists the metrics configurations for the bucket. The metrics configurations are only for\n the request metrics of the bucket and do not provide information on daily storage metrics.\n You can have up to 1,000 configurations per bucket.
\nThis action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated
element in the response. If there are no\n more configurations to list, IsTruncated
is set to false. If there are more\n configurations to list, IsTruncated
is set to true, and there is a value in\n NextContinuationToken
. You use the NextContinuationToken
value\n to continue the pagination of the list by passing the value in\n continuation-token
in the request to GET
the next page.
To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration
action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For more information about metrics configurations and CloudWatch request metrics, see\n Monitoring Metrics with Amazon CloudWatch.
\nThe following operations are related to\n ListBucketMetricsConfigurations
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns a list of all buckets owned by the authenticated sender of the request. To use\n this operation, you must have the s3:ListAllMyBuckets
permission.
For information about Amazon S3 buckets, see Creating, configuring, and\n working with Amazon S3 buckets.
", + "smithy.api#documentation": "This operation is not supported by directory buckets.
\nReturns a list of all buckets owned by the authenticated sender of the request. To use\n this operation, you must have the s3:ListAllMyBuckets
permission.
For information about Amazon S3 buckets, see Creating, configuring, and\n working with Amazon S3 buckets.
", "smithy.api#examples": [ { "title": "To list all buckets", @@ -24066,7 +26128,7 @@ ], "smithy.api#http": { "method": "GET", - "uri": "/", + "uri": "/?x-id=ListBuckets", "code": 200 } } @@ -24092,6 +26154,76 @@ "smithy.api#xmlName": "ListAllMyBucketsResult" } }, + "com.amazonaws.s3#ListDirectoryBuckets": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListDirectoryBucketsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListDirectoryBucketsOutput" + }, + "traits": { + "smithy.api#documentation": "Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. \nFor more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
You must have the s3express:ListAllMyDirectoryBuckets
permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.
\n Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com
.
The list of buckets owned by the requester.
" + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#DirectoryBucketToken", + "traits": { + "smithy.api#documentation": "If ContinuationToken
was sent with the request, it is included in the\n response. You can use the returned ContinuationToken
for pagination of the list response.
\n ContinuationToken
indicates to Amazon S3 that the list is being continued on\n this bucket with a token. ContinuationToken
is obfuscated and is not a real\n key. You can use this ContinuationToken
for pagination of the list results.
Maximum number of buckets to be returned in response. When the number is more than the count of buckets that are owned by an Amazon Web Services account, return all the buckets in response.
", + "smithy.api#httpQuery": "max-directory-buckets" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, "com.amazonaws.s3#ListMultipartUploads": { "type": "operation", "input": { @@ -24101,7 +26233,7 @@ "target": "com.amazonaws.s3#ListMultipartUploadsOutput" }, "traits": { - "smithy.api#documentation": "This action lists in-progress multipart uploads. An in-progress multipart upload is a\n multipart upload that has been initiated using the Initiate Multipart Upload request, but\n has not yet been completed or aborted.
\nThis action returns at most 1,000 multipart uploads in the response. 1,000 multipart\n uploads is the maximum number of uploads a response can include, which is also the default\n value. You can further limit the number of uploads in a response by specifying the\n max-uploads
parameter in the response. If additional multipart uploads\n satisfy the list criteria, the response will contain an IsTruncated
element\n with the value true. To list the additional multipart uploads, use the\n key-marker
and upload-id-marker
request parameters.
In the response, the uploads are sorted by key. If your application has initiated more\n than one multipart upload using the same object key, then uploads in the response are first\n sorted by key. Additionally, uploads are sorted in ascending order within each key by the\n upload initiation time.
\nFor more information on multipart uploads, see Uploading Objects Using Multipart\n Upload.
\nFor information on permissions required to use the multipart upload API, see Multipart Upload\n and Permissions.
\nThe following operations are related to ListMultipartUploads
:
\n UploadPart\n
\n\n ListParts\n
\n\n AbortMultipartUpload\n
\nThis operation lists in-progress multipart uploads in a bucket. An in-progress multipart upload is a\n multipart upload that has been initiated by the CreateMultipartUpload
request, but\n has not yet been completed or aborted.
\n Directory buckets - \n If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed.\n
\nThe ListMultipartUploads
operation returns a maximum of 1,000 multipart uploads in the response. The limit of 1,000 multipart\n uploads is also the default\n value. You can further limit the number of uploads in a response by specifying the\n max-uploads
request parameter. If there are more than 1,000 multipart uploads that \n satisfy your ListMultipartUploads
request, the response returns an IsTruncated
element\n with the value of true
, a NextKeyMarker
element, and a NextUploadIdMarker
element. \n To list the remaining multipart uploads, you need to make subsequent ListMultipartUploads
requests. \n In these requests, include two query parameters: key-marker
and upload-id-marker
. \n Set the value of key-marker
to the NextKeyMarker
value from the previous response. \n Similarly, set the value of upload-id-marker
to the NextUploadIdMarker
value from the previous response.
\n Directory buckets - The upload-id-marker
element and \n the NextUploadIdMarker
element aren't supported by directory buckets. \n To list the additional multipart uploads, you only need to set the value of key-marker
to the NextKeyMarker
value from the previous response.
For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3\n User Guide.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - For information about permissions required to use the multipart upload API, see Multipart Upload\n and Permissions in the Amazon S3\n User Guide.
\n\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
\n General purpose bucket - In the ListMultipartUploads
response, the multipart uploads are sorted based on two criteria:
Key-based sorting - Multipart uploads are initially sorted in ascending order based on their object keys.
\nTime-based sorting - For uploads that share the same object key, \n they are further sorted in ascending order based on the upload initiation time. Among uploads with the same key, the one that was initiated first will appear before the ones that were initiated later.
\n\n Directory bucket - In the ListMultipartUploads
response, the multipart uploads aren't sorted lexicographically based on the object keys. \n \n
\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to ListMultipartUploads
:
\n UploadPart\n
\n\n ListParts\n
\n\n AbortMultipartUpload\n
\nUpload ID after which listing began.
" + "smithy.api#documentation": "Upload ID after which listing began.
\nThis functionality is not supported for directory buckets.
\nWhen a prefix is provided in the request, this field contains the specified prefix. The\n result contains only keys starting with the specified prefix.
" + "smithy.api#documentation": "When a prefix is provided in the request, this field contains the specified prefix. The\n result contains only keys starting with the specified prefix.
\n\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/
) are supported.
Contains the delimiter you specified in the request. If you don't specify a delimiter in\n your request, this element is absent from the response.
" + "smithy.api#documentation": "Contains the delimiter you specified in the request. If you don't specify a delimiter in\n your request, this element is absent from the response.
\n\n Directory buckets - For directory buckets, /
is the only supported delimiter.
When a list is truncated, this element specifies the value that should be used for the\n upload-id-marker
request parameter in a subsequent request.
When a list is truncated, this element specifies the value that should be used for the\n upload-id-marker
request parameter in a subsequent request.
This functionality is not supported for directory buckets.
\nIf you specify a delimiter in the request, then the result returns each distinct key\n prefix containing the delimiter in a CommonPrefixes
element. The distinct key\n prefixes are returned in the Prefix
child element.
If you specify a delimiter in the request, then the result returns each distinct key\n prefix containing the delimiter in a CommonPrefixes
element. The distinct key\n prefixes are returned in the Prefix
child element.
\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/
) are supported.
The name of the bucket to which the multipart upload was initiated.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the bucket to which the multipart upload was initiated.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Character you use to group keys.
\nAll keys that contain the same string between the prefix, if specified, and the first\n occurrence of the delimiter after the prefix are grouped under a single result element,\n CommonPrefixes
. If you don't specify the prefix parameter, then the\n substring starts at the beginning of the key. The keys that are grouped under\n CommonPrefixes
result element are not returned elsewhere in the\n response.
Character you use to group keys.
\nAll keys that contain the same string between the prefix, if specified, and the first\n occurrence of the delimiter after the prefix are grouped under a single result element,\n CommonPrefixes
. If you don't specify the prefix parameter, then the\n substring starts at the beginning of the key. The keys that are grouped under\n CommonPrefixes
result element are not returned elsewhere in the\n response.
\n Directory buckets - For directory buckets, /
is the only supported delimiter.
Together with upload-id-marker
, this parameter specifies the multipart\n upload after which listing should begin.
If upload-id-marker
is not specified, only the keys lexicographically\n greater than the specified key-marker
will be included in the list.
If upload-id-marker
is specified, any multipart uploads for a key equal to\n the key-marker
might also be included, provided those multipart uploads have\n upload IDs lexicographically greater than the specified\n upload-id-marker
.
Specifies the multipart upload after which listing should begin.
\n\n General purpose buckets - For general purpose buckets, key-marker
\n is an object key. Together with upload-id-marker
, this parameter specifies the multipart\n upload after which listing should begin.
If upload-id-marker
is not specified, only the keys lexicographically\n greater than the specified key-marker
will be included in the list.
If upload-id-marker
is specified, any multipart uploads for a key equal to\n the key-marker
might also be included, provided those multipart uploads have\n upload IDs lexicographically greater than the specified\n upload-id-marker
.
\n Directory buckets - For directory buckets, key-marker
\n is obfuscated and isn't a real object key. \n The upload-id-marker
parameter isn't supported by directory buckets. \n To list the additional multipart uploads, you only need to set the value of key-marker
to the NextKeyMarker
value from the previous response. \n
In the ListMultipartUploads
response, the multipart uploads aren't sorted lexicographically based on the object keys. \n \n
Lists in-progress uploads only for those keys that begin with the specified prefix. You\n can use prefixes to separate a bucket into different grouping of keys. (You can think of\n using prefix
to make groups in the same way that you'd use a folder in a file\n system.)
Lists in-progress uploads only for those keys that begin with the specified prefix. You\n can use prefixes to separate a bucket into different grouping of keys. (You can think of\n using prefix
to make groups in the same way that you'd use a folder in a file\n system.)
\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/
) are supported.
Together with key-marker, specifies the multipart upload after which listing should\n begin. If key-marker is not specified, the upload-id-marker parameter is ignored.\n Otherwise, any multipart uploads for a key equal to the key-marker might be included in the\n list only if they have an upload ID lexicographically greater than the specified\n upload-id-marker
.
Together with key-marker, specifies the multipart upload after which listing should\n begin. If key-marker is not specified, the upload-id-marker parameter is ignored.\n Otherwise, any multipart uploads for a key equal to the key-marker might be included in the\n list only if they have an upload ID lexicographically greater than the specified\n upload-id-marker
.
This functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns metadata about all versions of the objects in a bucket. You can also use request\n parameters as selection criteria to return metadata about a subset of all the object\n versions.
\n To use this operation, you must have permission to perform the\n s3:ListBucketVersions
action. Be aware of the name difference.
A 200 OK
response can contain valid or invalid XML. Make sure to design\n your application to parse the contents of the response and handle it\n appropriately.
To use this operation, you must have READ access to the bucket.
\nThe following operations are related to ListObjectVersions
:
\n ListObjectsV2\n
\n\n GetObject\n
\n\n PutObject\n
\n\n DeleteObject\n
\nThis operation is not supported by directory buckets.
\nReturns metadata about all versions of the objects in a bucket. You can also use request\n parameters as selection criteria to return metadata about a subset of all the object\n versions.
\n To use this operation, you must have permission to perform the\n s3:ListBucketVersions
action. Be aware of the name difference.
A 200 OK
response can contain valid or invalid XML. Make sure to design\n your application to parse the contents of the response and handle it\n appropriately.
To use this operation, you must have READ access to the bucket.
\nThe following operations are related to ListObjectVersions
:
\n ListObjectsV2\n
\n\n GetObject\n
\n\n PutObject\n
\n\n DeleteObject\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns some or all (up to 1,000) of the objects in a bucket. You can use the request\n parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK\n response can contain valid or invalid XML. Be sure to design your application to parse the\n contents of the response and handle it appropriately.
\nThis action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility,\n Amazon S3 continues to support ListObjects
.
The following operations are related to ListObjects
:
\n ListObjectsV2\n
\n\n GetObject\n
\n\n PutObject\n
\n\n CreateBucket\n
\n\n ListBuckets\n
\nThis operation is not supported by directory buckets.
\nReturns some or all (up to 1,000) of the objects in a bucket. You can use the request\n parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK\n response can contain valid or invalid XML. Be sure to design your application to parse the\n contents of the response and handle it appropriately.
\nThis action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility,\n Amazon S3 continues to support ListObjects
.
The following operations are related to ListObjects
:
\n ListObjectsV2\n
\n\n GetObject\n
\n\n PutObject\n
\n\n CreateBucket\n
\n\n ListBuckets\n
\nThe name of the bucket containing the objects.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the bucket containing the objects.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Returns some or all (up to 1,000) of the objects in a bucket with each request. You can\n use the request parameters as selection criteria to return a subset of the objects in a\n bucket. A 200 OK
response can contain valid or invalid XML. Make sure to\n design your application to parse the contents of the response and handle it appropriately.\n Objects are returned sorted in an ascending order of the respective key names in the list.\n For more information about listing objects, see Listing object keys\n programmatically in the Amazon S3 User Guide.
To use this operation, you must have READ access to the bucket.
\nTo use this action in an Identity and Access Management (IAM) policy, you must have permission to perform\n the s3:ListBucket
action. The bucket owner has this permission by default and\n can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.
This section describes the latest revision of this action. We recommend that you use\n this revised API operation for application development. For backward compatibility, Amazon S3\n continues to support the prior version of this API operation, ListObjects.
\nTo get a list of your buckets, see ListBuckets.
\nThe following operations are related to ListObjectsV2
:
\n GetObject\n
\n\n PutObject\n
\n\n CreateBucket\n
\nReturns some or all (up to 1,000) of the objects in a bucket with each request. You can\n use the request parameters as selection criteria to return a subset of the objects in a\n bucket. A 200 OK
response can contain valid or invalid XML. Make sure to\n design your application to parse the contents of the response and handle it appropriately.\n \n For more information about listing objects, see Listing object keys\n programmatically in the Amazon S3 User Guide. To get a list of your buckets, see ListBuckets.
\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - To use this operation, you must have READ access to the bucket. You must have permission to perform\n the s3:ListBucket
action. The bucket owner has this permission by default and\n can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.
\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
\n General purpose bucket - For general purpose buckets, ListObjectsV2
returns objects in lexicographical order based on their key names.
\n Directory bucket - For directory buckets, ListObjectsV2
does not return objects in lexicographical order.
\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
This section describes the latest revision of this action. We recommend that you use\n this revised API operation for application development. For backward compatibility, Amazon S3\n continues to support the prior version of this API operation, ListObjects.
\nThe following operations are related to ListObjectsV2
:
\n GetObject\n
\n\n PutObject\n
\n\n CreateBucket\n
\nThe bucket name.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name.
" } }, "Prefix": { "target": "com.amazonaws.s3#Prefix", "traits": { - "smithy.api#documentation": "Keys that begin with the indicated prefix.
" + "smithy.api#documentation": "Keys that begin with the indicated prefix.
\n\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/
) are supported.
Causes keys that contain the same string between the prefix
and the first\n occurrence of the delimiter to be rolled up into a single result element in the\n CommonPrefixes
collection. These rolled-up keys are not returned elsewhere\n in the response. Each rolled-up result counts as only one return against the\n MaxKeys
value.
Causes keys that contain the same string between the prefix
and the first\n occurrence of the delimiter to be rolled up into a single result element in the\n CommonPrefixes
collection. These rolled-up keys are not returned elsewhere\n in the response. Each rolled-up result counts as only one return against the\n MaxKeys
value.
\n Directory buckets - For directory buckets, /
is the only supported delimiter.
All of the keys (up to 1,000) rolled up into a common prefix count as a single return\n when calculating the number of returns.
\nA response can contain CommonPrefixes
only if you specify a\n delimiter.
\n CommonPrefixes
contains all (if there are any) keys between\n Prefix
and the next occurrence of the string specified by a\n delimiter.
\n CommonPrefixes
lists keys that act like subdirectories in the directory\n specified by Prefix
.
For example, if the prefix is notes/
and the delimiter is a slash\n (/
) as in notes/summer/july
, the common prefix is\n notes/summer/
. All of the keys that roll up into a common prefix count as a\n single return when calculating the number of returns.
All of the keys (up to 1,000) that share the same prefix are grouped together. When counting the total numbers of returns by this API operation, \n this group of keys is considered as one item.
\nA response can contain CommonPrefixes
only if you specify a\n delimiter.
\n CommonPrefixes
contains all (if there are any) keys between\n Prefix
and the next occurrence of the string specified by a\n delimiter.
\n CommonPrefixes
lists keys that act like subdirectories in the directory\n specified by Prefix
.
For example, if the prefix is notes/
and the delimiter is a slash\n (/
) as in notes/summer/july
, the common prefix is\n notes/summer/
. All of the keys that roll up into a common prefix count as a\n single return when calculating the number of returns.
\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/
) are supported.
\n Directory buckets - When you query ListObjectsV2
with a delimiter during in-progress multipart uploads, the \n CommonPrefixes
response parameter contains the prefixes that are associated with the in-progress multipart uploads. \n For more information about multipart uploads, see Multipart Upload Overview in the Amazon S3 User Guide.
If ContinuationToken
was sent with the request, it is included in the\n response.
If ContinuationToken
was sent with the request, it is included in the\n response. You can use the returned ContinuationToken
for pagination of the list response. You can use this ContinuationToken
for pagination of the list results.
If StartAfter was sent with the request, it is included in the response.
" + "smithy.api#documentation": "If StartAfter was sent with the request, it is included in the response.
\nThis functionality is not supported for directory buckets.
\nBucket name to list.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
A delimiter is a character that you use to group keys.
", + "smithy.api#documentation": "A delimiter is a character that you use to group keys.
\n\n Directory buckets - For directory buckets, /
is the only supported delimiter.
\n Directory buckets - When you query ListObjectsV2
with a delimiter during in-progress multipart uploads, the \n CommonPrefixes
response parameter contains the prefixes that are associated with the in-progress multipart uploads. \n For more information about multipart uploads, see Multipart Upload Overview in the Amazon S3 User Guide.
Limits the response to keys that begin with the specified prefix.
", + "smithy.api#documentation": "Limits the response to keys that begin with the specified prefix.
\n\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/
) are supported.
\n ContinuationToken
indicates to Amazon S3 that the list is being continued on\n this bucket with a token. ContinuationToken
is obfuscated and is not a real\n key.
\n ContinuationToken
indicates to Amazon S3 that the list is being continued on\n this bucket with a token. ContinuationToken
is obfuscated and is not a real\n key. You can use this ContinuationToken
for pagination of the list results.
The owner field is not present in ListObjectsV2
by default. If you want to\n return the owner field with each key in the result, then set the FetchOwner
\n field to true
.
The owner field is not present in ListObjectsV2
by default. If you want to\n return the owner field with each key in the result, then set the FetchOwner
\n field to true
.
\n Directory buckets - For directory buckets, the bucket owner is returned as the object owner for all objects.
\nStartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this\n specified key. StartAfter can be any key in the bucket.
", + "smithy.api#documentation": "StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this\n specified key. StartAfter can be any key in the bucket.
\nThis functionality is not supported for directory buckets.
\nConfirms that the requester knows that she or he will be charged for the list objects\n request in V2 style. Bucket owners need not specify this parameter in their\n requests.
", + "smithy.api#documentation": "Confirms that the requester knows that she or he will be charged for the list objects\n request in V2 style. Bucket owners need not specify this parameter in their\n requests.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.
", + "smithy.api#documentation": "Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.
\nThis functionality is not supported for directory buckets.
\nLists the parts that have been uploaded for a specific multipart upload. This operation\n must include the upload ID, which you obtain by sending the initiate multipart upload\n request (see CreateMultipartUpload).\n This request returns a maximum of 1,000 uploaded parts. The default number of parts\n returned is 1,000 parts. You can restrict the number of parts returned by specifying the\n max-parts
request parameter. If your multipart upload consists of more than\n 1,000 parts, the response returns an IsTruncated
field with the value of true,\n and a NextPartNumberMarker
element. In subsequent ListParts
\n requests you can include the part-number-marker query string parameter and set its value to\n the NextPartNumberMarker
field value from the previous response.
If the upload was created using a checksum algorithm, you will need to have permission\n to the kms:Decrypt
action for the request to succeed.
For more information on multipart uploads, see Uploading Objects Using Multipart\n Upload.
\nFor information on permissions required to use the multipart upload API, see Multipart Upload\n and Permissions.
\nThe following operations are related to ListParts
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n GetObjectAttributes\n
\n\n ListMultipartUploads\n
\nLists the parts that have been uploaded for a specific multipart upload.
\nTo use this operation, you must provide the upload ID
in the request. You obtain this uploadID by sending the initiate multipart upload\n request through CreateMultipartUpload.
The ListParts
request returns a maximum of 1,000 uploaded parts. The limit of 1,000 parts is also the default value. You can restrict the number of parts in a response by specifying the\n max-parts
request parameter. If your multipart upload consists of more than\n 1,000 parts, the response returns an IsTruncated
field with the value of true
,\n and a NextPartNumberMarker
element. To list remaining uploaded parts, in subsequent ListParts
\n requests, include the part-number-marker
query string parameter and set its value to\n the NextPartNumberMarker
field value from the previous response.
For more information on multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3\n User Guide.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - For information about permissions required to use the multipart upload API, see Multipart Upload\n and Permissions in the Amazon S3\n User Guide.
\nIf the upload was created using server-side encryption with Key Management Service (KMS) keys\n (SSE-KMS) or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), you must have permission\n to the kms:Decrypt
action for the ListParts
request to succeed.
\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to ListParts
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n GetObjectAttributes\n
\n\n ListMultipartUploads\n
\nIf the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, then the response includes this header indicating when the initiated multipart\n upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.
\nThe response will also include the x-amz-abort-rule-id
header that will\n provide the ID of the lifecycle configuration rule that defines this action.
If the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, then the response includes this header indicating when the initiated multipart\n upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.
\nThe response will also include the x-amz-abort-rule-id
header that will\n provide the ID of the lifecycle configuration rule that defines this action.
This functionality is not supported for directory buckets.
\nThis header is returned along with the x-amz-abort-date
header. It\n identifies applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.
This header is returned along with the x-amz-abort-date
header. It\n identifies applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.
This functionality is not supported for directory buckets.
\n Container for elements related to a particular part. A response can contain zero or\n more Part
elements.
Container for elements related to a particular part. A response can contain zero or\n more Part
elements.
Container element that identifies the object owner, after the object is created. If\n multipart upload is initiated by an IAM user, this element provides the parent account ID\n and display name.
" + "smithy.api#documentation": "Container element that identifies the object owner, after the object is created. If\n multipart upload is initiated by an IAM user, this element provides the parent account ID\n and display name.
\n\n Directory buckets - The bucket owner is returned as the object owner for all the parts.
\nClass of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded\n object.
" + "smithy.api#documentation": "The class of storage used to store the uploaded\n object.
\n\n Directory buckets - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nThe name of the bucket to which the parts are being uploaded.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the bucket to which the parts are being uploaded.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created \n using a checksum algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
", + "smithy.api#documentation": "The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created \n using a checksum algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nThe server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. \n For more information, see\n Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
", + "smithy.api#documentation": "The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. \n For more information, see\n Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nThe MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum \n algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
", + "smithy.api#documentation": "The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum \n algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nThe type of location where the bucket will be created.
" + } + }, + "Name": { + "target": "com.amazonaws.s3#LocationNameAsString", + "traits": { + "smithy.api#documentation": "The name of the location where the bucket will be created.
\nFor directory buckets, the AZ ID of the Availability Zone where the bucket will be created. An example AZ ID value is usw2-az2
.
Specifies the location where the bucket will be created.
\nFor directory buckets, the location type is Availability Zone. For more information about directory buckets, see \n Directory buckets in the Amazon S3 User Guide.
\nThis functionality is only supported by directory buckets.
\nThe class of storage used to store the object.
" + "smithy.api#documentation": "The class of storage used to store the object.
\n\n Directory buckets - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nSpecifies the owner of the object that is part of the multipart upload.
" + "smithy.api#documentation": "Specifies the owner of the object that is part of the multipart upload.
\n\n Directory buckets - The bucket owner is returned as the object owner for all the objects.
\nThe specified bucket does not exist.
", - "smithy.api#error": "client" + "smithy.api#error": "client", + "smithy.api#httpError": 404 } }, "com.amazonaws.s3#NoSuchKey": { @@ -25521,7 +27697,8 @@ "members": {}, "traits": { "smithy.api#documentation": "The specified key does not exist.
", - "smithy.api#error": "client" + "smithy.api#error": "client", + "smithy.api#httpError": 404 } }, "com.amazonaws.s3#NoSuchUpload": { @@ -25529,7 +27706,8 @@ "members": {}, "traits": { "smithy.api#documentation": "The specified multipart upload does not exist.
", - "smithy.api#error": "client" + "smithy.api#error": "client", + "smithy.api#httpError": 404 } }, "com.amazonaws.s3#NoncurrentVersionExpiration": { @@ -25668,7 +27846,7 @@ "ETag": { "target": "com.amazonaws.s3#ETag", "traits": { - "smithy.api#documentation": "The entity tag is a hash of the object. The ETag reflects changes only to the contents\n of an object, not its metadata. The ETag may or may not be an MD5 digest of the object\n data. Whether or not it is depends on how the object was created and how it is encrypted as\n described below:
\nObjects created by the PUT Object, POST Object, or Copy operation, or through the\n Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that\n are an MD5 digest of their object data.
\nObjects created by the PUT Object, POST Object, or Copy operation, or through the\n Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are\n not an MD5 digest of their object data.
\nIf an object is created by either the Multipart Upload or Part Copy operation, the\n ETag is not an MD5 digest, regardless of the method of encryption. If an object is\n larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a\n Multipart Upload, and therefore the ETag will not be an MD5 digest.
\nThe entity tag is a hash of the object. The ETag reflects changes only to the contents\n of an object, not its metadata. The ETag may or may not be an MD5 digest of the object\n data. Whether or not it is depends on how the object was created and how it is encrypted as\n described below:
\nObjects created by the PUT Object, POST Object, or Copy operation, or through the\n Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that\n are an MD5 digest of their object data.
\nObjects created by the PUT Object, POST Object, or Copy operation, or through the\n Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are\n not an MD5 digest of their object data.
\nIf an object is created by either the Multipart Upload or Part Copy operation, the\n ETag is not an MD5 digest, regardless of the method of encryption. If an object is\n larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a\n Multipart Upload, and therefore the ETag will not be an MD5 digest.
\n\n Directory buckets - MD5 is not supported by directory buckets.
\nThe class of storage used to store the object.
" + "smithy.api#documentation": "The class of storage used to store the object.
\n\n Directory buckets - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nThe owner of the object
" + "smithy.api#documentation": "The owner of the object
\n\n Directory buckets - The bucket owner is returned as the object owner.
\nSpecifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.
" + "smithy.api#documentation": "Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nThis action is not allowed against this storage tier.
", - "smithy.api#error": "client" + "smithy.api#error": "client", + "smithy.api#httpError": 403 } }, "com.amazonaws.s3#ObjectAttributes": { @@ -25816,7 +27995,7 @@ "VersionId": { "target": "com.amazonaws.s3#ObjectVersionId", "traits": { - "smithy.api#documentation": "VersionId for the specific version of the object to delete.
" + "smithy.api#documentation": "Version ID for the specific version of the object to delete.
\nThis functionality is not supported for directory buckets.
\nThe source object of the COPY action is not in the active tier and is only stored in\n Amazon S3 Glacier.
", - "smithy.api#error": "client" + "smithy.api#error": "client", + "smithy.api#httpError": 403 } }, "com.amazonaws.s3#ObjectOwnership": { @@ -26017,7 +28197,7 @@ } }, "traits": { - "smithy.api#documentation": "The container element for object ownership for a bucket's ownership controls.
\nBucketOwnerPreferred - Objects uploaded to the bucket change ownership to the bucket\n owner if the objects are uploaded with the bucket-owner-full-control
canned\n ACL.
ObjectWriter - The uploading account will own the object if the object is uploaded with\n the bucket-owner-full-control
canned ACL.
BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer affect\n permissions. The bucket owner automatically owns and has full control over every object in\n the bucket. The bucket only accepts PUT requests that don't specify an ACL or bucket owner\n full control ACLs, such as the bucket-owner-full-control
canned ACL or an\n equivalent form of this ACL expressed in the XML format.
The container element for object ownership for a bucket's ownership controls.
\n\n BucketOwnerPreferred
- Objects uploaded to the bucket change ownership to the bucket\n owner if the objects are uploaded with the bucket-owner-full-control
canned\n ACL.
\n ObjectWriter
- The uploading account will own the object if the object is uploaded with\n the bucket-owner-full-control
canned ACL.
\n BucketOwnerEnforced
- Access control lists (ACLs) are disabled and no longer affect\n permissions. The bucket owner automatically owns and has full control over every object in\n the bucket. The bucket only accepts PUT requests that don't specify an ACL or specify bucket owner\n full control ACLs (such as the predefined bucket-owner-full-control
canned ACL or a custom ACL \n in XML format that grants the same permissions).
By default, ObjectOwnership
is set to BucketOwnerEnforced
and ACLs are disabled. We recommend\n keeping ACLs disabled, except in uncommon use cases where you must control access for each object individually. For more information about S3 Object Ownership, see\n Controlling ownership of objects and disabling ACLs for your bucket in the Amazon S3 User Guide.\n
This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.
\nThe base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } } }, @@ -26135,6 +28315,12 @@ "traits": { "smithy.api#enumValue": "SNOW" } + }, + "EXPRESS_ONEZONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXPRESS_ONEZONE" + } } } }, @@ -26284,7 +28470,7 @@ "DisplayName": { "target": "com.amazonaws.s3#DisplayName", "traits": { - "smithy.api#documentation": "Container for the display name of the owner. This value is only supported in the\n following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nContainer for the display name of the owner. This value is only supported in the\n following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nThis functionality is not supported for directory buckets.
\nThe base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
" } }, "ChecksumSHA256": { @@ -26644,11 +28830,16 @@ "aws.protocols#httpChecksum": { "requestAlgorithmMember": "ChecksumAlgorithm" }, - "smithy.api#documentation": "Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a\n bucket-level feature that enables you to perform faster data transfers to Amazon S3.
\n To use this operation, you must have permission to perform the\n s3:PutAccelerateConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
The Transfer Acceleration state of a bucket can be set to one of the following two\n values:
\nEnabled – Enables accelerated data transfers to the bucket.
\nSuspended – Disables accelerated data transfers to the bucket.
\nThe GetBucketAccelerateConfiguration action returns the transfer acceleration state\n of a bucket.
\nAfter setting the Transfer Acceleration state of a bucket to Enabled, it might take up\n to thirty minutes before the data transfer rates to the bucket increase.
\nThe name of the bucket used for Transfer Acceleration must be DNS-compliant and must\n not contain periods (\".\").
\nFor more information about transfer acceleration, see Transfer\n Acceleration.
\nThe following operations are related to\n PutBucketAccelerateConfiguration
:
\n CreateBucket\n
\nThis operation is not supported by directory buckets.
\nSets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a\n bucket-level feature that enables you to perform faster data transfers to Amazon S3.
\n To use this operation, you must have permission to perform the\n s3:PutAccelerateConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
The Transfer Acceleration state of a bucket can be set to one of the following two\n values:
\nEnabled – Enables accelerated data transfers to the bucket.
\nSuspended – Disables accelerated data transfers to the bucket.
\nThe GetBucketAccelerateConfiguration action returns the transfer acceleration state\n of a bucket.
\nAfter setting the Transfer Acceleration state of a bucket to Enabled, it might take up\n to thirty minutes before the data transfer rates to the bucket increase.
\nThe name of the bucket used for Transfer Acceleration must be DNS-compliant and must\n not contain periods (\".\").
\nFor more information about transfer acceleration, see Transfer\n Acceleration.
\nThe following operations are related to\n PutBucketAccelerateConfiguration
:
\n CreateBucket\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Sets the permissions on an existing bucket using access control lists (ACL). For more\n information, see Using ACLs. To set the ACL of a\n bucket, you must have WRITE_ACP
permission.
You can use one of the following two ways to set a bucket's permissions:
\nSpecify the ACL in the request body
\nSpecify permissions using request headers
\nYou cannot specify access permission using both the body and the request\n headers.
\nDepending on your application needs, you may choose to set the ACL on a bucket using\n either the request body or the headers. For example, if you have an existing application\n that updates a bucket ACL using the request body, then you can continue to use that\n approach.
\nIf your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported
error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.
You can set access permissions by using one of the following methods:
\nSpecify a canned ACL with the x-amz-acl
request header. Amazon S3\n supports a set of predefined ACLs, known as canned\n ACLs. Each canned ACL has a predefined set of grantees and\n permissions. Specify the canned ACL name as the value of\n x-amz-acl
. If you use this header, you cannot use other\n access control-specific headers in your request. For more information, see\n Canned\n ACL.
Specify access permissions explicitly with the\n x-amz-grant-read
, x-amz-grant-read-acp
,\n x-amz-grant-write-acp
, and\n x-amz-grant-full-control
headers. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use the x-amz-acl
header to set a canned\n ACL. These parameters map to the set of permissions that Amazon S3 supports in an\n ACL. For more information, see Access Control List (ACL)\n Overview.
You specify each grantee as a type=value pair, where the type is one of\n the following:
\n\n id
– if the value specified is the canonical user ID\n of an Amazon Web Services account
\n uri
– if you are granting permissions to a predefined\n group
\n emailAddress
– if the value specified is the email\n address of an Amazon Web Services account
Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nFor example, the following x-amz-grant-write
header grants\n create, overwrite, and delete objects permission to LogDelivery group\n predefined by Amazon S3 and two Amazon Web Services accounts identified by their email\n addresses.
\n x-amz-grant-write:\n uri=\"http://acs.amazonaws.com/groups/s3/LogDelivery\", id=\"111122223333\",\n id=\"555566667777\"
\n
You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.
\nYou can specify the person (grantee) to whom you're assigning access rights\n (using request elements) in the following ways:
\nBy the person's ID:
\n\n
\n
DisplayName is optional and ignored in the request
\nBy URI:
\n\n
\n
By Email address:
\n\n
\n
The grantee is resolved to the CanonicalUser and, in a response to a GET\n Object acl request, appears as the CanonicalUser.
\nUsing email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nThe following operations are related to PutBucketAcl
:
\n CreateBucket\n
\n\n DeleteBucket\n
\n\n GetObjectAcl\n
\nThis operation is not supported by directory buckets.
\nSets the permissions on an existing bucket using access control lists (ACL). For more\n information, see Using ACLs. To set the ACL of a\n bucket, you must have the WRITE_ACP
permission.
You can use one of the following two ways to set a bucket's permissions:
\nSpecify the ACL in the request body
\nSpecify permissions using request headers
\nYou cannot specify access permission using both the body and the request\n headers.
\nDepending on your application needs, you may choose to set the ACL on a bucket using\n either the request body or the headers. For example, if you have an existing application\n that updates a bucket ACL using the request body, then you can continue to use that\n approach.
\nIf your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported
error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.
You can set access permissions by using one of the following methods:
\nSpecify a canned ACL with the x-amz-acl
request header. Amazon S3\n supports a set of predefined ACLs, known as canned\n ACLs. Each canned ACL has a predefined set of grantees and\n permissions. Specify the canned ACL name as the value of\n x-amz-acl
. If you use this header, you cannot use other\n access control-specific headers in your request. For more information, see\n Canned\n ACL.
Specify access permissions explicitly with the\n x-amz-grant-read
, x-amz-grant-read-acp
,\n x-amz-grant-write-acp
, and\n x-amz-grant-full-control
headers. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use the x-amz-acl
header to set a canned\n ACL. These parameters map to the set of permissions that Amazon S3 supports in an\n ACL. For more information, see Access Control List (ACL)\n Overview.
You specify each grantee as a type=value pair, where the type is one of\n the following:
\n\n id
– if the value specified is the canonical user ID\n of an Amazon Web Services account
\n uri
– if you are granting permissions to a predefined\n group
\n emailAddress
– if the value specified is the email\n address of an Amazon Web Services account
Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nFor example, the following x-amz-grant-write
header grants\n create, overwrite, and delete objects permission to LogDelivery group\n predefined by Amazon S3 and two Amazon Web Services accounts identified by their email\n addresses.
\n x-amz-grant-write:\n uri=\"http://acs.amazonaws.com/groups/s3/LogDelivery\", id=\"111122223333\",\n id=\"555566667777\"
\n
You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.
\nYou can specify the person (grantee) to whom you're assigning access rights\n (using request elements) in the following ways:
\nBy the person's ID:
\n\n
\n
DisplayName is optional and ignored in the request
\nBy URI:
\n\n
\n
By Email address:
\n\n
\n
The grantee is resolved to the CanonicalUser and, in a response to a GET\n Object acl request, appears as the CanonicalUser.
\nUsing email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nThe following operations are related to PutBucketAcl
:
\n CreateBucket\n
\n\n DeleteBucket\n
\n\n GetObjectAcl\n
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Sets an analytics configuration for the bucket (specified by the analytics configuration\n ID). You can have up to 1,000 analytics configurations per bucket.
\nYou can choose to have storage class analysis export analysis reports sent to a\n comma-separated values (CSV) flat file. See the DataExport
request element.\n Reports are updated daily and are based on the object filters that you configure. When\n selecting data export, you specify a destination bucket and an optional destination prefix\n where the file is written. You can export the data to a destination bucket in a different\n account. However, the destination bucket must be in the same Region as the bucket that you\n are making the PUT analytics configuration to. For more information, see Amazon S3\n Analytics – Storage Class Analysis.
You must create a bucket policy on the destination bucket where the exported file is\n written to grant permissions to Amazon S3 to write objects to the bucket. For an example\n policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.
\nTo use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
\n PutBucketAnalyticsConfiguration
has the following special errors:
\n HTTP Error: HTTP 400 Bad Request\n
\n\n Code: InvalidArgument\n
\n\n Cause: Invalid argument.\n
\n\n HTTP Error: HTTP 400 Bad Request\n
\n\n Code: TooManyConfigurations\n
\n\n Cause: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.\n
\n\n HTTP Error: HTTP 403 Forbidden\n
\n\n Code: AccessDenied\n
\n\n Cause: You are not the owner of the specified bucket, or you do\n not have the s3:PutAnalyticsConfiguration bucket permission to set the\n configuration on the bucket.\n
\nThe following operations are related to\n PutBucketAnalyticsConfiguration
:
This operation is not supported by directory buckets.
\nSets an analytics configuration for the bucket (specified by the analytics configuration\n ID). You can have up to 1,000 analytics configurations per bucket.
\nYou can choose to have storage class analysis export analysis reports sent to a\n comma-separated values (CSV) flat file. See the DataExport
request element.\n Reports are updated daily and are based on the object filters that you configure. When\n selecting data export, you specify a destination bucket and an optional destination prefix\n where the file is written. You can export the data to a destination bucket in a different\n account. However, the destination bucket must be in the same Region as the bucket that you\n are making the PUT analytics configuration to. For more information, see Amazon S3\n Analytics – Storage Class Analysis.
You must create a bucket policy on the destination bucket where the exported file is\n written to grant permissions to Amazon S3 to write objects to the bucket. For an example\n policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.
\nTo use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
\n PutBucketAnalyticsConfiguration
has the following special errors:
\n HTTP Error: HTTP 400 Bad Request\n
\n\n Code: InvalidArgument\n
\n\n Cause: Invalid argument.\n
\n\n HTTP Error: HTTP 400 Bad Request\n
\n\n Code: TooManyConfigurations\n
\n\n Cause: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.\n
\n\n HTTP Error: HTTP 403 Forbidden\n
\n\n Code: AccessDenied\n
\n\n Cause: You are not the owner of the specified bucket, or you do\n not have the s3:PutAnalyticsConfiguration bucket permission to set the\n configuration on the bucket.\n
\nThe following operations are related to\n PutBucketAnalyticsConfiguration
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Sets the cors
configuration for your bucket. If the configuration exists,\n Amazon S3 replaces it.
To use this operation, you must be allowed to perform the s3:PutBucketCORS
\n action. By default, the bucket owner has this permission and can grant it to others.
You set this configuration on a bucket so that the bucket can service cross-origin\n requests. For example, you might want to enable a request whose origin is\n http://www.example.com
to access your Amazon S3 bucket at\n my.example.bucket.com
by using the browser's XMLHttpRequest
\n capability.
To enable cross-origin resource sharing (CORS) on a bucket, you add the\n cors
subresource to the bucket. The cors
subresource is an XML\n document in which you configure rules that identify origins and the HTTP methods that can\n be executed on your bucket. The document is limited to 64 KB in size.
When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a\n bucket, it evaluates the cors
configuration on the bucket and uses the first\n CORSRule
rule that matches the incoming browser request to enable a\n cross-origin request. For a rule to match, the following conditions must be met:
The request's Origin
header must match AllowedOrigin
\n elements.
The request method (for example, GET, PUT, HEAD, and so on) or the\n Access-Control-Request-Method
header in case of a pre-flight\n OPTIONS
request must be one of the AllowedMethod
\n elements.
Every header specified in the Access-Control-Request-Headers
request\n header of a pre-flight request must match an AllowedHeader
element.\n
For more information about CORS, go to Enabling Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.
\nThe following operations are related to PutBucketCors
:
\n GetBucketCors\n
\n\n DeleteBucketCors\n
\n\n RESTOPTIONSobject\n
\nThis operation is not supported by directory buckets.
\nSets the cors
configuration for your bucket. If the configuration exists,\n Amazon S3 replaces it.
To use this operation, you must be allowed to perform the s3:PutBucketCORS
\n action. By default, the bucket owner has this permission and can grant it to others.
You set this configuration on a bucket so that the bucket can service cross-origin\n requests. For example, you might want to enable a request whose origin is\n http://www.example.com
to access your Amazon S3 bucket at\n my.example.bucket.com
by using the browser's XMLHttpRequest
\n capability.
To enable cross-origin resource sharing (CORS) on a bucket, you add the\n cors
subresource to the bucket. The cors
subresource is an XML\n document in which you configure rules that identify origins and the HTTP methods that can\n be executed on your bucket. The document is limited to 64 KB in size.
When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a\n bucket, it evaluates the cors
configuration on the bucket and uses the first\n CORSRule
rule that matches the incoming browser request to enable a\n cross-origin request. For a rule to match, the following conditions must be met:
The request's Origin
header must match AllowedOrigin
\n elements.
The request method (for example, GET, PUT, HEAD, and so on) or the\n Access-Control-Request-Method
header in case of a pre-flight\n OPTIONS
request must be one of the AllowedMethod
\n elements.
Every header specified in the Access-Control-Request-Headers
request\n header of a pre-flight request must match an AllowedHeader
element.\n
For more information about CORS, go to Enabling Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.
\nThe following operations are related to PutBucketCors
:
\n GetBucketCors\n
\n\n DeleteBucketCors\n
\n\n RESTOPTIONSobject\n
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
This action uses the encryption
subresource to configure default encryption\n and Amazon S3 Bucket Keys for an existing bucket.
By default, all buckets have a default encryption configuration that uses server-side\n encryption with Amazon S3 managed keys (SSE-S3). You can optionally configure default encryption\n for a bucket by using server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or\n dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify default encryption by using\n SSE-KMS, you can also configure Amazon S3 Bucket\n Keys. If you use PutBucketEncryption to set your default bucket encryption to SSE-KMS, you should verify that your KMS key ID is correct. Amazon S3 does not validate the KMS key ID provided in PutBucketEncryption requests.
\nThis action requires Amazon Web Services Signature Version 4. For more information, see \n Authenticating Requests (Amazon Web Services Signature Version 4).
\nTo use this operation, you must have permission to perform the\n s3:PutEncryptionConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.
The following operations are related to PutBucketEncryption
:
\n GetBucketEncryption\n
\nThis operation is not supported by directory buckets.
\nThis action uses the encryption
subresource to configure default encryption\n and Amazon S3 Bucket Keys for an existing bucket.
By default, all buckets have a default encryption configuration that uses server-side\n encryption with Amazon S3 managed keys (SSE-S3). You can optionally configure default encryption\n for a bucket by using server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or\n dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify default encryption by using\n SSE-KMS, you can also configure Amazon S3 Bucket\n Keys. If you use PutBucketEncryption to set your default bucket encryption to SSE-KMS, you should verify that your KMS key ID is correct. Amazon S3 does not validate the KMS key ID provided in PutBucketEncryption requests.
\nThis action requires Amazon Web Services Signature Version 4. For more information, see \n Authenticating Requests (Amazon Web Services Signature Version 4).
\nTo use this operation, you must have permission to perform the\n s3:PutEncryptionConfiguration
action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.
The following operations are related to PutBucketEncryption
:
\n GetBucketEncryption\n
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to\n 1,000 S3 Intelligent-Tiering configurations per bucket.
\nThe S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.
\nThe S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.
\nFor more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.
\nOperations related to PutBucketIntelligentTieringConfiguration
include:
You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically\n move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access\n or Deep Archive Access tier.
\n\n PutBucketIntelligentTieringConfiguration
has the following special\n errors:
\n Code: InvalidArgument
\n\n Cause: Invalid Argument
\n\n Code: TooManyConfigurations
\n\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.
\n\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutIntelligentTieringConfiguration
bucket\n permission to set the configuration on the bucket.
This operation is not supported by directory buckets.
\nPuts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to\n 1,000 S3 Intelligent-Tiering configurations per bucket.
\nThe S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.
\nThe S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.
\nFor more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.
\nOperations related to PutBucketIntelligentTieringConfiguration
include:
You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically\n move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access\n or Deep Archive Access tier.
\n\n PutBucketIntelligentTieringConfiguration
has the following special\n errors:
\n Code: InvalidArgument
\n\n Cause: Invalid Argument
\n\n Code: TooManyConfigurations
\n\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.
\n\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutIntelligentTieringConfiguration
bucket\n permission to set the configuration on the bucket.
This implementation of the PUT
action adds an inventory configuration\n (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory\n configurations per bucket.
Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly\n basis, and the results are published to a flat file. The bucket that is inventoried is\n called the source bucket, and the bucket where the inventory flat file\n is stored is called the destination bucket. The\n destination bucket must be in the same Amazon Web Services Region as the\n source bucket.
\nWhen you configure an inventory for a source bucket, you specify\n the destination bucket where you want the inventory to be stored, and\n whether to generate the inventory daily or weekly. You can also configure what object\n metadata to include and whether to inventory all object versions or only current versions.\n For more information, see Amazon S3 Inventory in the\n Amazon S3 User Guide.
\nYou must create a bucket policy on the destination bucket to\n grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an\n example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.
\nTo use this operation, you must have permission to perform the\n s3:PutInventoryConfiguration
action. The bucket owner has this\n permission by default and can grant this permission to others.
The s3:PutInventoryConfiguration
permission allows a user to\n create an S3 Inventory\n report that includes all object metadata fields available and to specify the\n destination bucket to store the inventory. A user with read access to objects in\n the destination bucket can also access all object metadata fields that are\n available in the inventory report.
To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the\n Amazon S3 User Guide. For more information about the metadata\n fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For\n more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the\n Amazon S3 User Guide.
\n\n PutBucketInventoryConfiguration
has the following special errors:
\n Code: InvalidArgument
\n\n Cause: Invalid Argument
\n\n Code: TooManyConfigurations
\n\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.
\n\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutInventoryConfiguration
bucket permission to\n set the configuration on the bucket.
The following operations are related to\n PutBucketInventoryConfiguration
:
This operation is not supported by directory buckets.
\nThis implementation of the PUT
action adds an inventory configuration\n (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory\n configurations per bucket.
Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly\n basis, and the results are published to a flat file. The bucket that is inventoried is\n called the source bucket, and the bucket where the inventory flat file\n is stored is called the destination bucket. The\n destination bucket must be in the same Amazon Web Services Region as the\n source bucket.
\nWhen you configure an inventory for a source bucket, you specify\n the destination bucket where you want the inventory to be stored, and\n whether to generate the inventory daily or weekly. You can also configure what object\n metadata to include and whether to inventory all object versions or only current versions.\n For more information, see Amazon S3 Inventory in the\n Amazon S3 User Guide.
\nYou must create a bucket policy on the destination bucket to\n grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an\n example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.
\nTo use this operation, you must have permission to perform the\n s3:PutInventoryConfiguration
action. The bucket owner has this\n permission by default and can grant this permission to others.
The s3:PutInventoryConfiguration
permission allows a user to\n create an S3 Inventory\n report that includes all object metadata fields available and to specify the\n destination bucket to store the inventory. A user with read access to objects in\n the destination bucket can also access all object metadata fields that are\n available in the inventory report.
To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the\n Amazon S3 User Guide. For more information about the metadata\n fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For\n more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the\n Amazon S3 User Guide.
\n\n PutBucketInventoryConfiguration
has the following special errors:
\n Code: InvalidArgument
\n\n Cause: Invalid Argument
\n\n Code: TooManyConfigurations
\n\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.
\n\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutInventoryConfiguration
bucket permission to\n set the configuration on the bucket.
The following operations are related to\n PutBucketInventoryConfiguration
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle\n configuration. Keep in mind that this will overwrite an existing lifecycle configuration,\n so if you want to retain any configuration details, they must be included in the new\n lifecycle configuration. For information about lifecycle configuration, see Managing\n your storage lifecycle.
\nBucket lifecycle configuration now supports specifying a lifecycle rule using an\n object key name prefix, one or more object tags, or a combination of both. Accordingly,\n this section describes the latest API. The previous version of the API supported\n filtering based only on an object key name prefix, which is supported for backward\n compatibility. For the related API description, see PutBucketLifecycle.
\nYou specify the lifecycle configuration in your request body. The lifecycle\n configuration is specified as XML consisting of one or more rules. An Amazon S3\n Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable.\n Each rule consists of the following:
\nA filter identifying a subset of objects to which the rule applies. The\n filter can be based on a key name prefix, object tags, or a combination of\n both.
\nA status indicating whether the rule is in effect.
\nOne or more lifecycle transition and expiration actions that you want\n Amazon S3 to perform on the objects identified by the filter. If the state of\n your bucket is versioning-enabled or versioning-suspended, you can have many\n versions of the same object (one current version and zero or more noncurrent\n versions). Amazon S3 provides predefined actions that you can specify for current\n and noncurrent object versions.
\nFor more information, see Object Lifecycle\n Management and Lifecycle Configuration\n Elements.
\nBy default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that created\n it) can access the resource. The resource owner can optionally grant access\n permissions to others by writing an access policy. For this operation, a user must\n get the s3:PutLifecycleConfiguration
permission.
You can also explicitly deny permissions. An explicit deny also supersedes any\n other permissions. If you want to block users or accounts from removing or\n deleting objects from your bucket, you must deny them permissions for the\n following actions:
\n\n s3:DeleteObject
\n
\n s3:DeleteObjectVersion
\n
\n s3:PutLifecycleConfiguration
\n
For more information about permissions, see Managing Access\n Permissions to Your Amazon S3 Resources.
\nThe following operations are related to\n PutBucketLifecycleConfiguration
:
This operation is not supported by directory buckets.
\nCreates a new lifecycle configuration for the bucket or replaces an existing lifecycle\n configuration. Keep in mind that this will overwrite an existing lifecycle configuration,\n so if you want to retain any configuration details, they must be included in the new\n lifecycle configuration. For information about lifecycle configuration, see Managing\n your storage lifecycle.
\nBucket lifecycle configuration now supports specifying a lifecycle rule using an\n object key name prefix, one or more object tags, or a combination of both. Accordingly,\n this section describes the latest API. The previous version of the API supported\n filtering based only on an object key name prefix, which is supported for backward\n compatibility. For the related API description, see PutBucketLifecycle.
\nYou specify the lifecycle configuration in your request body. The lifecycle\n configuration is specified as XML consisting of one or more rules. An Amazon S3\n Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable.\n Each rule consists of the following:
\nA filter identifying a subset of objects to which the rule applies. The\n filter can be based on a key name prefix, object tags, or a combination of\n both.
\nA status indicating whether the rule is in effect.
\nOne or more lifecycle transition and expiration actions that you want\n Amazon S3 to perform on the objects identified by the filter. If the state of\n your bucket is versioning-enabled or versioning-suspended, you can have many\n versions of the same object (one current version and zero or more noncurrent\n versions). Amazon S3 provides predefined actions that you can specify for current\n and noncurrent object versions.
\nFor more information, see Object Lifecycle\n Management and Lifecycle Configuration\n Elements.
\nBy default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that created\n it) can access the resource. The resource owner can optionally grant access\n permissions to others by writing an access policy. For this operation, a user must\n get the s3:PutLifecycleConfiguration
permission.
You can also explicitly deny permissions. An explicit deny also supersedes any\n other permissions. If you want to block users or accounts from removing or\n deleting objects from your bucket, you must deny them permissions for the\n following actions:
\n\n s3:DeleteObject
\n
\n s3:DeleteObjectVersion
\n
\n s3:PutLifecycleConfiguration
\n
For more information about permissions, see Managing Access\n Permissions to Your Amazon S3 Resources.
\nThe following operations are related to\n PutBucketLifecycleConfiguration
:
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Set the logging parameters for a bucket and to specify permissions for who can view and\n modify the logging parameters. All logs are saved to buckets in the same Amazon Web Services Region as\n the source bucket. To set the logging status of a bucket, you must be the bucket\n owner.
\nThe bucket owner is automatically granted FULL_CONTROL to all logs. You use the\n Grantee
request element to grant access to other people. The\n Permissions
request element specifies the kind of access the grantee has to\n the logs.
If the target bucket for log delivery uses the bucket owner enforced setting for S3\n Object Ownership, you can't use the Grantee
request element to grant access\n to others. Permissions can only be granted using policies. For more information, see\n Permissions for server access log delivery in the\n Amazon S3 User Guide.
You can specify the person (grantee) to whom you're assigning access rights (by\n using request elements) in the following ways:
\nBy the person's ID:
\n\n
\n
\n DisplayName
is optional and ignored in the request.
By Email address:
\n\n
\n
The grantee is resolved to the CanonicalUser
and, in a\n response to a GETObjectAcl
request, appears as the\n CanonicalUser.
By URI:
\n\n
\n
To enable logging, you use LoggingEnabled
and its children request\n elements. To disable logging, you use an empty BucketLoggingStatus
request\n element:
\n
\n
For more information about server access logging, see Server Access Logging in the\n Amazon S3 User Guide.
\nFor more information about creating a bucket, see CreateBucket. For more\n information about returning the logging status of a bucket, see GetBucketLogging.
\nThe following operations are related to PutBucketLogging
:
\n PutObject\n
\n\n DeleteBucket\n
\n\n CreateBucket\n
\n\n GetBucketLogging\n
\nThis operation is not supported by directory buckets.
\nSet the logging parameters for a bucket and to specify permissions for who can view and\n modify the logging parameters. All logs are saved to buckets in the same Amazon Web Services Region as\n the source bucket. To set the logging status of a bucket, you must be the bucket\n owner.
\nThe bucket owner is automatically granted FULL_CONTROL to all logs. You use the\n Grantee
request element to grant access to other people. The\n Permissions
request element specifies the kind of access the grantee has to\n the logs.
If the target bucket for log delivery uses the bucket owner enforced setting for S3\n Object Ownership, you can't use the Grantee
request element to grant access\n to others. Permissions can only be granted using policies. For more information, see\n Permissions for server access log delivery in the\n Amazon S3 User Guide.
You can specify the person (grantee) to whom you're assigning access rights (by\n using request elements) in the following ways:
\nBy the person's ID:
\n\n
\n
\n DisplayName
is optional and ignored in the request.
By Email address:
\n\n
\n
The grantee is resolved to the CanonicalUser
and, in a\n response to a GETObjectAcl
request, appears as the\n CanonicalUser.
By URI:
\n\n
\n
To enable logging, you use LoggingEnabled
and its children request\n elements. To disable logging, you use an empty BucketLoggingStatus
request\n element:
\n
\n
For more information about server access logging, see Server Access Logging in the\n Amazon S3 User Guide.
\nFor more information about creating a bucket, see CreateBucket. For more\n information about returning the logging status of a bucket, see GetBucketLogging.
\nThe following operations are related to PutBucketLogging
:
\n PutObject\n
\n\n DeleteBucket\n
\n\n CreateBucket\n
\n\n GetBucketLogging\n
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Sets a metrics configuration (specified by the metrics configuration ID) for the bucket.\n You can have up to 1,000 metrics configurations per bucket. If you're updating an existing\n metrics configuration, note that this is a full replacement of the existing metrics\n configuration. If you don't include the elements you want to keep, they are erased.
\nTo use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration
action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.
\nThe following operations are related to\n PutBucketMetricsConfiguration
:
\n PutBucketMetricsConfiguration
has the following special error:
Error code: TooManyConfigurations
\n
Description: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.
\nHTTP Status Code: HTTP 400 Bad Request
\nThis operation is not supported by directory buckets.
\nSets a metrics configuration (specified by the metrics configuration ID) for the bucket.\n You can have up to 1,000 metrics configurations per bucket. If you're updating an existing\n metrics configuration, note that this is a full replacement of the existing metrics\n configuration. If you don't include the elements you want to keep, they are erased.
\nTo use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration
action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.
\nThe following operations are related to\n PutBucketMetricsConfiguration
:
\n PutBucketMetricsConfiguration
has the following special error:
Error code: TooManyConfigurations
\n
Description: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.
\nHTTP Status Code: HTTP 400 Bad Request
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Enables notifications of specified events for a bucket. For more information about event\n notifications, see Configuring Event\n Notifications.
\nUsing this API, you can replace an existing notification configuration. The\n configuration is an XML file that defines the event types that you want Amazon S3 to publish and\n the destination where you want Amazon S3 to publish an event notification when it detects an\n event of the specified type.
\nBy default, your bucket has no event notifications configured. That is, the notification\n configuration will be an empty NotificationConfiguration
.
\n
\n
\n \n
This action replaces the existing notification configuration with the configuration you\n include in the request body.
\nAfter Amazon S3 receives this request, it first verifies that any Amazon Simple Notification\n Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and\n that the bucket owner has permission to publish to it by sending a test notification. In\n the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions\n grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information,\n see Configuring Notifications for Amazon S3 Events.
\nYou can disable notifications by adding the empty NotificationConfiguration\n element.
\nFor more information about the number of event notification configurations that you can\n create per bucket, see Amazon S3 service quotas in Amazon Web Services\n General Reference.
\nBy default, only the bucket owner can configure notifications on a bucket. However,\n bucket owners can use a bucket policy to grant permission to other users to set this\n configuration with the required s3:PutBucketNotification
permission.
The PUT notification is an atomic operation. For example, suppose your notification\n configuration includes SNS topic, SQS queue, and Lambda function configurations. When\n you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS\n topic. If the message fails, the entire PUT action will fail, and Amazon S3 will not add the\n configuration to your bucket.
\nIf the configuration in the request body includes only one\n TopicConfiguration
specifying only the\n s3:ReducedRedundancyLostObject
event type, the response will also include\n the x-amz-sns-test-message-id
header containing the message ID of the test\n notification sent to the topic.
The following action is related to\n PutBucketNotificationConfiguration
:
This operation is not supported by directory buckets.
\nEnables notifications of specified events for a bucket. For more information about event\n notifications, see Configuring Event\n Notifications.
\nUsing this API, you can replace an existing notification configuration. The\n configuration is an XML file that defines the event types that you want Amazon S3 to publish and\n the destination where you want Amazon S3 to publish an event notification when it detects an\n event of the specified type.
\nBy default, your bucket has no event notifications configured. That is, the notification\n configuration will be an empty NotificationConfiguration
.
\n
\n
\n \n
This action replaces the existing notification configuration with the configuration you\n include in the request body.
\nAfter Amazon S3 receives this request, it first verifies that any Amazon Simple Notification\n Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and\n that the bucket owner has permission to publish to it by sending a test notification. In\n the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions\n grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information,\n see Configuring Notifications for Amazon S3 Events.
\nYou can disable notifications by adding the empty NotificationConfiguration\n element.
\nFor more information about the number of event notification configurations that you can\n create per bucket, see Amazon S3 service quotas in Amazon Web Services\n General Reference.
\nBy default, only the bucket owner can configure notifications on a bucket. However,\n bucket owners can use a bucket policy to grant permission to other users to set this\n configuration with the required s3:PutBucketNotification
permission.
The PUT notification is an atomic operation. For example, suppose your notification\n configuration includes SNS topic, SQS queue, and Lambda function configurations. When\n you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS\n topic. If the message fails, the entire PUT action will fail, and Amazon S3 will not add the\n configuration to your bucket.
\nIf the configuration in the request body includes only one\n TopicConfiguration
specifying only the\n s3:ReducedRedundancyLostObject
event type, the response will also include\n the x-amz-sns-test-message-id
header containing the message ID of the test\n notification sent to the topic.
The following action is related to\n PutBucketNotificationConfiguration
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Creates or modifies OwnershipControls
for an Amazon S3 bucket. To use this\n operation, you must have the s3:PutBucketOwnershipControls
permission. For\n more information about Amazon S3 permissions, see Specifying permissions in a\n policy.
For information about Amazon S3 Object Ownership, see Using object\n ownership.
\nThe following operations are related to PutBucketOwnershipControls
:
This operation is not supported by directory buckets.
\nCreates or modifies OwnershipControls
for an Amazon S3 bucket. To use this\n operation, you must have the s3:PutBucketOwnershipControls
permission. For\n more information about Amazon S3 permissions, see Specifying permissions in a\n policy.
For information about Amazon S3 Object Ownership, see Using object\n ownership.
\nThe following operations are related to PutBucketOwnershipControls
:
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using an identity other than\n the root user of the Amazon Web Services account that owns the bucket, the calling identity must have the\n PutBucketPolicy
permissions on the specified bucket and belong to the\n bucket owner's account in order to use this operation.
If you don't have PutBucketPolicy
permissions, Amazon S3 returns a 403\n Access Denied
error. If you have the correct permissions, but you're not using an\n identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not\n Allowed
error.
To ensure that bucket owners don't inadvertently lock themselves out of their own\n buckets, the root principal in a bucket owner's Amazon Web Services account can perform the\n GetBucketPolicy
, PutBucketPolicy
, and\n DeleteBucketPolicy
API actions, even if their bucket policy explicitly\n denies the root principal's access. Bucket owner root principals can only be blocked\n from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations\n policies.
For more information, see Bucket policy\n examples.
\nThe following operations are related to PutBucketPolicy
:
\n CreateBucket\n
\n\n DeleteBucket\n
\nApplies an Amazon S3 bucket policy to an Amazon S3 bucket.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. \nFor more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
If you are using an identity other than the\n root user of the Amazon Web Services account that owns the bucket, the calling identity must both have the\n PutBucketPolicy
permissions on the specified bucket and belong to the\n bucket owner's account in order to use this operation.
If you don't have PutBucketPolicy
permissions, Amazon S3 returns a 403\n Access Denied
error. If you have the correct permissions, but you're not using an\n identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not\n Allowed
error.
To ensure that bucket owners don't inadvertently lock themselves out of their own\n buckets, the root principal in a bucket owner's Amazon Web Services account can perform the\n GetBucketPolicy
, PutBucketPolicy
, and\n DeleteBucketPolicy
API actions, even if their bucket policy explicitly\n denies the root principal's access. Bucket owner root principals can only be blocked\n from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations\n policies.
\n General purpose bucket permissions - The s3:PutBucketPolicy
permission is required in a policy. \n For more information about general purpose buckets bucket policies, see Using Bucket Policies and User\n Policies in the Amazon S3 User Guide.
\n Directory bucket permissions - To grant access to this API operation, you must have the s3express:PutBucketPolicy
permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.
\n General purpose buckets example bucket policies - See Bucket policy examples in the Amazon S3 User Guide.
\n\n Directory bucket example bucket policies - See Example bucket policies for S3 Express One Zone in the Amazon S3 User Guide.
\n\n Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com
.
The following operations are related to PutBucketPolicy
:
\n CreateBucket\n
\n\n DeleteBucket\n
\nThe name of the bucket.
", + "smithy.api#documentation": "The name of the bucket.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name\n
. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format \n bucket_base_name--az_id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n
The MD5 hash of the request body.
\nFor requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.
", + "smithy.api#documentation": "The MD5 hash of the request body.
\nFor requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.
\nThis functionality is not supported for directory buckets.
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
.
For the x-amz-checksum-algorithm\n
header, replace \n algorithm\n
with the supported algorithm from the following list:
CRC32
\nCRC32C
\nSHA1
\nSHA256
\nFor more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
\nIf the individual checksum value you provide through x-amz-checksum-algorithm\n
doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm
, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter and uses the checksum algorithm that matches the provided value in x-amz-checksum-algorithm\n
.
For directory buckets, when you use Amazon Web Services SDKs, CRC32
is the default checksum algorithm that's used for performance.
Set this parameter to true to confirm that you want to remove your permissions to change\n this bucket policy in the future.
", + "smithy.api#documentation": "Set this parameter to true to confirm that you want to remove your permissions to change\n this bucket policy in the future.
\nThis functionality is not supported for directory buckets.
\nThe bucket policy as a JSON document.
", + "smithy.api#documentation": "The bucket policy as a JSON document.
\nFor directory buckets, the only IAM action supported in the bucket policy is s3express:CreateSession
.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented
.
Creates a replication configuration or replaces an existing one. For more information,\n see Replication in the Amazon S3 User Guide.
\nSpecify the replication configuration in the request body. In the replication\n configuration, you provide the name of the destination bucket or buckets where you want\n Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your\n behalf, and other relevant information. You can invoke this request for a specific\n Amazon Web Services Region by using the \n \n aws:RequestedRegion
\n condition key.
A replication configuration must include at least one rule, and can contain a maximum of\n 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in\n the source bucket. To choose additional subsets of objects to replicate, add a rule for\n each subset.
\nTo specify a subset of the objects in the source bucket to apply a replication rule to,\n add the Filter element as a child of the Rule element. You can filter objects based on an\n object key prefix, one or more object tags, or both. When you add the Filter element in the\n configuration, you must also add the following elements:\n DeleteMarkerReplication
, Status
, and\n Priority
.
If you are using an earlier version of the replication configuration, Amazon S3 handles\n replication of delete markers differently. For more information, see Backward Compatibility.
\nFor information about enabling versioning on a bucket, see Using Versioning.
\nBy default, Amazon S3 doesn't replicate objects that are stored at rest using\n server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects,\n add the following: SourceSelectionCriteria
,\n SseKmsEncryptedObjects
, Status
,\n EncryptionConfiguration
, and ReplicaKmsKeyID
. For\n information about replication configuration, see Replicating\n Objects Created with SSE Using KMS keys.
For information on PutBucketReplication
errors, see List of\n replication-related error codes\n
To create a PutBucketReplication
request, you must have\n s3:PutReplicationConfiguration
permissions for the bucket.\n \n
By default, a resource owner, in this case the Amazon Web Services account that created the\n bucket, can perform this operation. The resource owner can also grant others\n permissions to perform the operation. For more information about permissions, see\n Specifying Permissions in\n a Policy and Managing Access\n Permissions to Your Amazon S3 Resources.
\nTo perform this operation, the user or role performing the action must have\n the iam:PassRole\n permission.
\nThe following operations are related to PutBucketReplication
:
\n GetBucketReplication\n
\nThis operation is not supported by directory buckets.
\nCreates a replication configuration or replaces an existing one. For more information,\n see Replication in the Amazon S3 User Guide.
\nSpecify the replication configuration in the request body. In the replication\n configuration, you provide the name of the destination bucket or buckets where you want\n Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your\n behalf, and other relevant information. You can invoke this request for a specific\n Amazon Web Services Region by using the \n \n aws:RequestedRegion
\n condition key.
A replication configuration must include at least one rule, and can contain a maximum of\n 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in\n the source bucket. To choose additional subsets of objects to replicate, add a rule for\n each subset.
\nTo specify a subset of the objects in the source bucket to apply a replication rule to,\n add the Filter element as a child of the Rule element. You can filter objects based on an\n object key prefix, one or more object tags, or both. When you add the Filter element in the\n configuration, you must also add the following elements:\n DeleteMarkerReplication
, Status
, and\n Priority
.
If you are using an earlier version of the replication configuration, Amazon S3 handles\n replication of delete markers differently. For more information, see Backward Compatibility.
\nFor information about enabling versioning on a bucket, see Using Versioning.
\nBy default, Amazon S3 doesn't replicate objects that are stored at rest using\n server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects,\n add the following: SourceSelectionCriteria
,\n SseKmsEncryptedObjects
, Status
,\n EncryptionConfiguration
, and ReplicaKmsKeyID
. For\n information about replication configuration, see Replicating\n Objects Created with SSE Using KMS keys.
For information on PutBucketReplication
errors, see List of\n replication-related error codes\n
To create a PutBucketReplication
request, you must have\n s3:PutReplicationConfiguration
permissions for the bucket.\n \n
By default, a resource owner, in this case the Amazon Web Services account that created the\n bucket, can perform this operation. The resource owner can also grant others\n permissions to perform the operation. For more information about permissions, see\n Specifying Permissions in\n a Policy and Managing Access\n Permissions to Your Amazon S3 Resources.
\nTo perform this operation, the user or role performing the action must have\n the iam:PassRole\n permission.
\nThe following operations are related to PutBucketReplication
:
\n GetBucketReplication\n
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Sets the request payment configuration for a bucket. By default, the bucket owner pays\n for downloads from the bucket. This configuration parameter enables the bucket owner (only)\n to specify that the person requesting the download will be charged for the download. For\n more information, see Requester Pays\n Buckets.
\nThe following operations are related to PutBucketRequestPayment
:
\n CreateBucket\n
\nThis operation is not supported by directory buckets.
\nSets the request payment configuration for a bucket. By default, the bucket owner pays\n for downloads from the bucket. This configuration parameter enables the bucket owner (only)\n to specify that the person requesting the download will be charged for the download. For\n more information, see Requester Pays\n Buckets.
\nThe following operations are related to PutBucketRequestPayment
:
\n CreateBucket\n
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Sets the tags for a bucket.
\nUse tags to organize your Amazon Web Services bill to reflect your own cost structure. To do this,\n sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost\n of combined resources, organize your billing information according to resources with the\n same tag key values. For example, you can tag several resources with a specific application\n name, and then organize your billing information to see the total cost of that application\n across several services. For more information, see Cost Allocation and\n Tagging and Using Cost Allocation in Amazon S3\n Bucket Tags.
\nWhen this operation sets the tags for a bucket, it will overwrite any current tags\n the bucket already has. You cannot use this operation to add tags to an existing list of\n tags.
\nTo use this operation, you must have permissions to perform the\n s3:PutBucketTagging
action. The bucket owner has this permission by default\n and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
\n PutBucketTagging
has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.
\n InvalidTag
- The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Using\n Cost Allocation in Amazon S3 Bucket Tags.
\n MalformedXML
- The XML provided does not match the\n schema.
\n OperationAborted
- A conflicting conditional action is\n currently in progress against this resource. Please try again.
\n InternalError
- The service was unable to apply the provided\n tag to the bucket.
The following operations are related to PutBucketTagging
:
\n GetBucketTagging\n
\n\n DeleteBucketTagging\n
\nThis operation is not supported by directory buckets.
\nSets the tags for a bucket.
\nUse tags to organize your Amazon Web Services bill to reflect your own cost structure. To do this,\n sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost\n of combined resources, organize your billing information according to resources with the\n same tag key values. For example, you can tag several resources with a specific application\n name, and then organize your billing information to see the total cost of that application\n across several services. For more information, see Cost Allocation and\n Tagging and Using Cost Allocation in Amazon S3\n Bucket Tags.
\nWhen this operation sets the tags for a bucket, it will overwrite any current tags\n the bucket already has. You cannot use this operation to add tags to an existing list of\n tags.
\nTo use this operation, you must have permissions to perform the\n s3:PutBucketTagging
action. The bucket owner has this permission by default\n and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.
\n PutBucketTagging
has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.
\n InvalidTag
- The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Using\n Cost Allocation in Amazon S3 Bucket Tags.
\n MalformedXML
- The XML provided does not match the\n schema.
\n OperationAborted
- A conflicting conditional action is\n currently in progress against this resource. Please try again.
\n InternalError
- The service was unable to apply the provided\n tag to the bucket.
The following operations are related to PutBucketTagging
:
\n GetBucketTagging\n
\n\n DeleteBucketTagging\n
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Sets the versioning state of an existing bucket.
\nYou can set the versioning state with one of the following values:
\n\n Enabled—Enables versioning for the objects in the\n bucket. All objects added to the bucket receive a unique version ID.
\n\n Suspended—Disables versioning for the objects in the\n bucket. All objects added to the bucket receive the version ID null.
\nIf the versioning state has never been set on a bucket, it has no versioning state; a\n GetBucketVersioning request does not return a versioning state value.
\nIn order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner\n and want to enable MFA Delete in the bucket versioning configuration, you must include the\n x-amz-mfa request
header and the Status
and the\n MfaDelete
request elements in a request to set the versioning state of the\n bucket.
If you have an object expiration lifecycle configuration in your non-versioned bucket\n and you want to maintain the same permanent delete behavior when you enable versioning,\n you must add a noncurrent expiration policy. The noncurrent expiration lifecycle\n configuration will manage the deletes of the noncurrent object versions in the\n version-enabled bucket. (A version-enabled bucket maintains one current and zero or more\n noncurrent object versions.) For more information, see Lifecycle and Versioning.
\nThe following operations are related to PutBucketVersioning
:
\n CreateBucket\n
\n\n DeleteBucket\n
\n\n GetBucketVersioning\n
\nThis operation is not supported by directory buckets.
\nSets the versioning state of an existing bucket.
\nYou can set the versioning state with one of the following values:
\n\n Enabled—Enables versioning for the objects in the\n bucket. All objects added to the bucket receive a unique version ID.
\n\n Suspended—Disables versioning for the objects in the\n bucket. All objects added to the bucket receive the version ID null.
\nIf the versioning state has never been set on a bucket, it has no versioning state; a\n GetBucketVersioning request does not return a versioning state value.
\nIn order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner\n and want to enable MFA Delete in the bucket versioning configuration, you must include the\n x-amz-mfa request
header and the Status
and the\n MfaDelete
request elements in a request to set the versioning state of the\n bucket.
If you have an object expiration lifecycle configuration in your non-versioned bucket\n and you want to maintain the same permanent delete behavior when you enable versioning,\n you must add a noncurrent expiration policy. The noncurrent expiration lifecycle\n configuration will manage the deletes of the noncurrent object versions in the\n version-enabled bucket. (A version-enabled bucket maintains one current and zero or more\n noncurrent object versions.) For more information, see Lifecycle and Versioning.
\nThe following operations are related to PutBucketVersioning
:
\n CreateBucket\n
\n\n DeleteBucket\n
\n\n GetBucketVersioning\n
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Sets the configuration of the website that is specified in the website
\n subresource. To configure a bucket as a website, you can add this subresource on the bucket\n with website configuration information such as the file name of the index document and any\n redirect rules. For more information, see Hosting Websites on Amazon S3.
This PUT action requires the S3:PutBucketWebsite
permission. By default,\n only the bucket owner can configure the website attached to a bucket; however, bucket\n owners can allow other users to set the website configuration by writing a bucket policy\n that grants them the S3:PutBucketWebsite
permission.
To redirect all website requests sent to the bucket's website endpoint, you add a\n website configuration with the following elements. Because all requests are sent to another\n website, you don't need to provide index document name for the bucket.
\n\n WebsiteConfiguration
\n
\n RedirectAllRequestsTo
\n
\n HostName
\n
\n Protocol
\n
If you want granular control over redirects, you can use the following elements to add\n routing rules that describe conditions for redirecting requests and information about the\n redirect destination. In this case, the website configuration must provide an index\n document for the bucket, because some requests might not be redirected.
\n\n WebsiteConfiguration
\n
\n IndexDocument
\n
\n Suffix
\n
\n ErrorDocument
\n
\n Key
\n
\n RoutingRules
\n
\n RoutingRule
\n
\n Condition
\n
\n HttpErrorCodeReturnedEquals
\n
\n KeyPrefixEquals
\n
\n Redirect
\n
\n Protocol
\n
\n HostName
\n
\n ReplaceKeyPrefixWith
\n
\n ReplaceKeyWith
\n
\n HttpRedirectCode
\n
Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more\n than 50 routing rules, you can use object redirect. For more information, see Configuring an\n Object Redirect in the Amazon S3 User Guide.
\nThe maximum request length is limited to 128 KB.
", + "smithy.api#documentation": "This operation is not supported by directory buckets.
\nSets the configuration of the website that is specified in the website
\n subresource. To configure a bucket as a website, you can add this subresource on the bucket\n with website configuration information such as the file name of the index document and any\n redirect rules. For more information, see Hosting Websites on Amazon S3.
This PUT action requires the S3:PutBucketWebsite
permission. By default,\n only the bucket owner can configure the website attached to a bucket; however, bucket\n owners can allow other users to set the website configuration by writing a bucket policy\n that grants them the S3:PutBucketWebsite
permission.
To redirect all website requests sent to the bucket's website endpoint, you add a\n website configuration with the following elements. Because all requests are sent to another\n website, you don't need to provide index document name for the bucket.
\n\n WebsiteConfiguration
\n
\n RedirectAllRequestsTo
\n
\n HostName
\n
\n Protocol
\n
If you want granular control over redirects, you can use the following elements to add\n routing rules that describe conditions for redirecting requests and information about the\n redirect destination. In this case, the website configuration must provide an index\n document for the bucket, because some requests might not be redirected.
\n\n WebsiteConfiguration
\n
\n IndexDocument
\n
\n Suffix
\n
\n ErrorDocument
\n
\n Key
\n
\n RoutingRules
\n
\n RoutingRule
\n
\n Condition
\n
\n HttpErrorCodeReturnedEquals
\n
\n KeyPrefixEquals
\n
\n Redirect
\n
\n Protocol
\n
\n HostName
\n
\n ReplaceKeyPrefixWith
\n
\n ReplaceKeyWith
\n
\n HttpRedirectCode
\n
Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more\n than 50 routing rules, you can use object redirect. For more information, see Configuring an\n Object Redirect in the Amazon S3 User Guide.
\nThe maximum request length is limited to 128 KB.
", "smithy.api#examples": [ { "title": "Set website configuration on a bucket", @@ -28038,6 +30309,11 @@ "method": "PUT", "uri": "/{Bucket}?website", "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } } } }, @@ -28065,7 +30341,7 @@ "ChecksumAlgorithm": { "target": "com.amazonaws.s3#ChecksumAlgorithm", "traits": { - "smithy.api#documentation": "Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Adds an object to a bucket. You must have WRITE permissions on a bucket to add an object\n to it.
\nAmazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the\n entire object to the bucket. You cannot use PutObject
to only update a\n single piece of metadata for an existing object. You must put the entire object with\n updated metadata if you want to update some values.
Amazon S3 is a distributed system. If it receives multiple write requests for the same object\n simultaneously, it overwrites all but the last object written. To prevent objects from\n being deleted or overwritten, you can use Amazon S3 Object\n Lock.
\nTo ensure that data is not corrupted traversing the network, use the\n Content-MD5
header. When you use this header, Amazon S3 checks the object\n against the provided MD5 value and, if they do not match, returns an error. Additionally,\n you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to\n the calculated MD5 value.
To successfully complete the PutObject
request, you must have the\n s3:PutObject
in your IAM permissions.
To successfully change the objects acl of your PutObject
request,\n you must have the s3:PutObjectAcl
in your IAM permissions.
To successfully set the tag-set with your PutObject
request, you\n must have the s3:PutObjectTagging
in your IAM permissions.
The Content-MD5
header is required for any request to upload an\n object with a retention period configured using Amazon S3 Object Lock. For more\n information about Amazon S3 Object Lock, see Amazon S3 Object Lock\n Overview in the Amazon S3 User Guide.
You have four mutually exclusive options to protect data using server-side encryption in\n Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the\n encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or\n DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side\n encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to\n encrypt data at rest by using server-side encryption with other key options. For more\n information, see Using Server-Side\n Encryption.
\nWhen adding a new object, you can use headers to grant ACL-based permissions to\n individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are\n then added to the ACL on the object. By default, all objects are private. Only the owner\n has full access control. For more information, see Access Control List (ACL) Overview\n and Managing\n ACLs Using the REST API.
\nIf the bucket that you're uploading objects to uses the bucket owner enforced setting\n for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that\n use this setting only accept PUT requests that don't specify an ACL or PUT requests that\n specify bucket owner full control ACLs, such as the bucket-owner-full-control
\n canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that\n contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a\n 400
error with the error code AccessControlListNotSupported
.\n For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.
If your bucket uses the bucket owner enforced setting for Object Ownership, all\n objects written to the bucket by any account will be owned by the bucket owner.
\nBy default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The\n STANDARD storage class provides high durability and high availability. Depending on\n performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses\n the OUTPOSTS Storage Class. For more information, see Storage Classes in the\n Amazon S3 User Guide.
\nIf you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID\n for the object being stored. Amazon S3 returns this ID in the response. When you enable\n versioning for a bucket, if Amazon S3 receives multiple write requests for the same object\n simultaneously, it stores all of the objects. For more information about versioning, see\n Adding Objects to\n Versioning-Enabled Buckets. For information about returning the versioning state\n of a bucket, see GetBucketVersioning.
\nFor more information about related Amazon S3 APIs, see the following:
\n\n CopyObject\n
\n\n DeleteObject\n
\nAdds an object to a bucket.
\nAmazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the\n entire object to the bucket. You cannot use PutObject
to only update a\n single piece of metadata for an existing object. You must put the entire object with\n updated metadata if you want to update some values.
If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are disabled and no longer affect permissions. All\n objects written to the bucket by any account will be owned by the bucket owner.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
Amazon S3 is a distributed system. If it receives multiple write requests for the same object\n simultaneously, it overwrites all but the last object written. However, Amazon S3 provides features that can modify this behavior:
\n\n S3 Object Lock - To prevent objects from\n being deleted or overwritten, you can use Amazon S3 Object\n Lock in the Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\n\n S3 Versioning - When you enable\n versioning for a bucket, if Amazon S3 receives multiple write requests for the same object\n simultaneously, it stores all versions of the objects. For each write request that is made to the same object, Amazon S3 automatically generates a unique version ID\n of that object being stored in Amazon S3. \n You can retrieve, replace, or delete any version of the object. For more information about versioning, see\n Adding Objects to\n Versioning-Enabled Buckets in the Amazon S3\n User Guide. For information about returning the versioning state\n of a bucket, see GetBucketVersioning.
\nThis functionality is not supported for directory buckets.
\n\n General purpose bucket permissions - The following permissions are required in your policies when your \n PutObject
request includes specific headers.
\n \n s3:PutObject
\n - To successfully complete the PutObject
request, you must always have the s3:PutObject
permission on a bucket to add an object\n to it.
\n \n s3:PutObjectAcl
\n - To successfully change the objects ACL of your PutObject
request, you must have the s3:PutObjectAcl
.
\n \n s3:PutObjectTagging
\n - To successfully set the tag-set with your PutObject
request, you\n must have the s3:PutObjectTagging
.
\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
\n General purpose bucket - To ensure that data is not corrupted traversing the network, use the\n Content-MD5
header. When you use this header, Amazon S3 checks the object\n against the provided MD5 value and, if they do not match, Amazon S3 returns an error. Alternatively, when the object's ETag is its MD5 digest, \n you can calculate the MD5 while putting the object to Amazon S3 and compare the returned ETag to\n the calculated MD5 value.
\n Directory bucket - This functionality is not supported for directory buckets.
\n\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
For more information about related Amazon S3 APIs, see the following:
\n\n CopyObject\n
\n\n DeleteObject\n
\nUses the acl
subresource to set the access control list (ACL) permissions\n for a new or existing object in an S3 bucket. You must have WRITE_ACP
\n permission to set the ACL of an object. For more information, see What\n permissions can I grant? in the Amazon S3 User Guide.
This action is not supported by Amazon S3 on Outposts.
\nDepending on your application needs, you can choose to set the ACL on an object using\n either the request body or the headers. For example, if you have an existing application\n that updates a bucket ACL using the request body, you can continue to use that approach.\n For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.
\nIf your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported
error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.
You can set access permissions using one of the following methods:
\nSpecify a canned ACL with the x-amz-acl
request header. Amazon S3\n supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has\n a predefined set of grantees and permissions. Specify the canned ACL name as\n the value of x-amz-ac
l. If you use this header, you cannot use\n other access control-specific headers in your request. For more information,\n see Canned\n ACL.
Specify access permissions explicitly with the\n x-amz-grant-read
, x-amz-grant-read-acp
,\n x-amz-grant-write-acp
, and\n x-amz-grant-full-control
headers. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use x-amz-acl
header to set a canned ACL.\n These parameters map to the set of permissions that Amazon S3 supports in an ACL.\n For more information, see Access Control List (ACL)\n Overview.
You specify each grantee as a type=value pair, where the type is one of\n the following:
\n\n id
– if the value specified is the canonical user ID\n of an Amazon Web Services account
\n uri
– if you are granting permissions to a predefined\n group
\n emailAddress
– if the value specified is the email\n address of an Amazon Web Services account
Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nFor example, the following x-amz-grant-read
header grants\n list objects permission to the two Amazon Web Services accounts identified by their email\n addresses.
\n x-amz-grant-read: emailAddress=\"xyz@amazon.com\",\n emailAddress=\"abc@amazon.com\"
\n
You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.
\nYou can specify the person (grantee) to whom you're assigning access rights\n (using request elements) in the following ways:
\nBy the person's ID:
\n\n
\n
DisplayName is optional and ignored in the request.
\nBy URI:
\n\n
\n
By Email address:
\n\n
\n
The grantee is resolved to the CanonicalUser and, in a response to a GET\n Object acl request, appears as the CanonicalUser.
\nUsing email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nThe ACL of an object is set at the object version level. By default, PUT sets\n the ACL of the current version of an object. To set the ACL of a different\n version, use the versionId
subresource.
The following operations are related to PutObjectAcl
:
\n CopyObject\n
\n\n GetObject\n
\nThis operation is not supported by directory buckets.
\nUses the acl
subresource to set the access control list (ACL) permissions\n for a new or existing object in an S3 bucket. You must have the WRITE_ACP
\n permission to set the ACL of an object. For more information, see What\n permissions can I grant? in the Amazon S3 User Guide.
This functionality is not supported for Amazon S3 on Outposts.
\nDepending on your application needs, you can choose to set the ACL on an object using\n either the request body or the headers. For example, if you have an existing application\n that updates a bucket ACL using the request body, you can continue to use that approach.\n For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.
\nIf your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported
error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.
You can set access permissions using one of the following methods:
\nSpecify a canned ACL with the x-amz-acl
request header. Amazon S3\n supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has\n a predefined set of grantees and permissions. Specify the canned ACL name as\n the value of x-amz-ac
l. If you use this header, you cannot use\n other access control-specific headers in your request. For more information,\n see Canned\n ACL.
Specify access permissions explicitly with the\n x-amz-grant-read
, x-amz-grant-read-acp
,\n x-amz-grant-write-acp
, and\n x-amz-grant-full-control
headers. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use x-amz-acl
header to set a canned ACL.\n These parameters map to the set of permissions that Amazon S3 supports in an ACL.\n For more information, see Access Control List (ACL)\n Overview.
You specify each grantee as a type=value pair, where the type is one of\n the following:
\n\n id
– if the value specified is the canonical user ID\n of an Amazon Web Services account
\n uri
– if you are granting permissions to a predefined\n group
\n emailAddress
– if the value specified is the email\n address of an Amazon Web Services account
Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nFor example, the following x-amz-grant-read
header grants\n list objects permission to the two Amazon Web Services accounts identified by their email\n addresses.
\n x-amz-grant-read: emailAddress=\"xyz@amazon.com\",\n emailAddress=\"abc@amazon.com\"
\n
You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.
\nYou can specify the person (grantee) to whom you're assigning access rights\n (using request elements) in the following ways:
\nBy the person's ID:
\n\n
\n
DisplayName is optional and ignored in the request.
\nBy URI:
\n\n
\n
By Email address:
\n\n
\n
The grantee is resolved to the CanonicalUser and, in a response to a GET\n Object acl request, appears as the CanonicalUser.
\nUsing email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
\nUS East (N. Virginia)
\nUS West (N. California)
\nUS West (Oregon)
\nAsia Pacific (Singapore)
\nAsia Pacific (Sydney)
\nAsia Pacific (Tokyo)
\nEurope (Ireland)
\nSouth America (São Paulo)
\nFor a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.
\nThe ACL of an object is set at the object version level. By default, PUT sets\n the ACL of the current version of an object. To set the ACL of a different\n version, use the versionId
subresource.
The following operations are related to PutObjectAcl
:
\n CopyObject\n
\n\n GetObject\n
\nThe bucket name that contains the object to which you want to attach the ACL.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The bucket name that contains the object to which you want to attach the ACL.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.
\nThis functionality is not supported for Amazon S3 on Outposts.
", "smithy.api#httpHeader": "x-amz-grant-full-control" } }, "GrantRead": { "target": "com.amazonaws.s3#GrantRead", "traits": { - "smithy.api#documentation": "Allows grantee to list the objects in the bucket.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee to list the objects in the bucket.
\nThis functionality is not supported for Amazon S3 on Outposts.
", "smithy.api#httpHeader": "x-amz-grant-read" } }, "GrantReadACP": { "target": "com.amazonaws.s3#GrantReadACP", "traits": { - "smithy.api#documentation": "Allows grantee to read the bucket ACL.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee to read the bucket ACL.
\nThis functionality is not supported for Amazon S3 on Outposts.
", "smithy.api#httpHeader": "x-amz-grant-read-acp" } }, @@ -28254,14 +30530,14 @@ "GrantWriteACP": { "target": "com.amazonaws.s3#GrantWriteACP", "traits": { - "smithy.api#documentation": "Allows grantee to write the ACL for the applicable bucket.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee to write the ACL for the applicable bucket.
\nThis functionality is not supported for Amazon S3 on Outposts.
", "smithy.api#httpHeader": "x-amz-grant-write-acp" } }, "Key": { "target": "com.amazonaws.s3#ObjectKey", "traits": { - "smithy.api#documentation": "Key for which the PUT action was initiated.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Key for which the PUT action was initiated.
", "smithy.api#httpLabel": {}, "smithy.api#required": {}, "smithy.rules#contextParam": { @@ -28278,14 +30554,14 @@ "VersionId": { "target": "com.amazonaws.s3#ObjectVersionId", "traits": { - "smithy.api#documentation": "VersionId used to reference a specific version of the object.
", + "smithy.api#documentation": "Version ID used to reference a specific version of the object.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Applies a legal hold configuration to the specified object. For more information, see\n Locking\n Objects.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "This operation is not supported by directory buckets.
\nApplies a legal hold configuration to the specified object. For more information, see\n Locking\n Objects.
\nThis functionality is not supported for Amazon S3 on Outposts.
", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?legal-hold", @@ -28335,7 +30611,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "The bucket name containing the object that you want to place a legal hold on.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The bucket name containing the object that you want to place a legal hold on.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", "smithy.api#httpLabel": {}, "smithy.api#required": {}, "smithy.rules#contextParam": { @@ -28382,14 +30658,14 @@ "ChecksumAlgorithm": { "target": "com.amazonaws.s3#ChecksumAlgorithm", "traits": { - "smithy.api#documentation": "Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Places an Object Lock configuration on the specified bucket. The rule specified in the\n Object Lock configuration will be applied by default to every new object placed in the\n specified bucket. For more information, see Locking Objects.
\nThe DefaultRetention
settings require both a mode and a\n period.
The DefaultRetention
period can be either Days
or\n Years
but you must select one. You cannot specify\n Days
and Years
at the same time.
You can enable Object Lock for new or existing buckets. For more\n information, see Configuring Object\n Lock.
\nThis operation is not supported by directory buckets.
\nPlaces an Object Lock configuration on the specified bucket. The rule specified in the\n Object Lock configuration will be applied by default to every new object placed in the\n specified bucket. For more information, see Locking Objects.
\nThe DefaultRetention
settings require both a mode and a\n period.
The DefaultRetention
period can be either Days
or\n Years
but you must select one. You cannot specify\n Days
and Years
at the same time.
You can enable Object Lock for new or existing buckets. For more\n information, see Configuring Object\n Lock.
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
If the expiration is configured for the object (see PutBucketLifecycleConfiguration), the response includes this header. It\n includes the expiry-date
and rule-id
key-value pairs that provide\n information about object expiration. The value of the rule-id
is\n URL-encoded.
If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, the response includes this header. It\n includes the expiry-date
and rule-id
key-value pairs that provide\n information about object expiration. The value of the rule-id
is\n URL-encoded.
This functionality is not supported for directory buckets.
\nEntity tag for the uploaded object.
", + "smithy.api#documentation": "Entity tag for the uploaded object.
\n\n General purpose buckets - To ensure that data is not corrupted traversing the network, \n for objects where the \n ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to\n the calculated MD5 value.
\n\n Directory buckets - The ETag for the object in a directory bucket isn't the MD5 digest of the object.
", "smithy.api#httpHeader": "ETag" } }, "ChecksumCRC32": { "target": "com.amazonaws.s3#ChecksumCRC32", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-crc32" } }, "ChecksumCRC32C": { "target": "com.amazonaws.s3#ChecksumCRC32C", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-crc32c" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-sha1" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-sha256" } }, "ServerSideEncryption": { "target": "com.amazonaws.s3#ServerSideEncryption", "traits": { - "smithy.api#documentation": "The server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
The server-side encryption algorithm used when you store this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
Version of the object.
", + "smithy.api#documentation": "Version ID of the object.
\nIf you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID\n for the object being stored. Amazon S3 returns this ID in the response. When you enable\n versioning for a bucket, if Amazon S3 receives multiple write requests for the same object\n simultaneously, it stores all of the objects. For more information about versioning, see\n Adding Objects to\n Versioning-Enabled Buckets in the Amazon S3\n User Guide. For information about returning the versioning state\n of a bucket, see GetBucketVersioning.
\nThis functionality is not supported for directory buckets.
\nIf server-side encryption with a customer-provided encryption key was requested, the\n response will include this header confirming the encryption algorithm used.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.
\nThis functionality is not supported for directory buckets.
\nIf server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide round-trip message integrity verification of\n the customer-provided encryption key.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification of\n the customer-provided encryption key.
\nThis functionality is not supported for directory buckets.
\nIf x-amz-server-side-encryption
has a valid value of aws:kms
\n or aws:kms:dsse
, this header specifies the ID of the Key Management Service (KMS)\n symmetric encryption customer managed key that was used for the object.
If x-amz-server-side-encryption
has a valid value of aws:kms
\n or aws:kms:dsse
, this header indicates the ID of the Key Management Service (KMS)\n symmetric encryption customer managed key that was used for the object.
This functionality is not supported for directory buckets.
\nIf present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The\n value of this header is a base64-encoded UTF-8 string holding JSON with the encryption\n context key-value pairs. This value is stored as object metadata and automatically gets\n passed on to Amazon Web Services KMS for future GetObject
or CopyObject
\n operations on this object.
If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The\n value of this header is a base64-encoded UTF-8 string holding JSON with the encryption\n context key-value pairs. This value is stored as object metadata and automatically gets\n passed on to Amazon Web Services KMS for future GetObject
or CopyObject
\n operations on this object.
This functionality is not supported for directory buckets.
\nIndicates whether the uploaded object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
", + "smithy.api#documentation": "Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
\nThis functionality is not supported for directory buckets.
\nThe canned ACL to apply to the object. For more information, see Canned\n ACL.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "The canned ACL to apply to the object. For more information, see Canned\n ACL in the Amazon S3 User Guide.
\nWhen adding a new object, you can use headers to grant ACL-based permissions to\n individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are\n then added to the ACL on the object. By default, all objects are private. Only the owner\n has full access control. For more information, see Access Control List (ACL) Overview\n and Managing\n ACLs Using the REST API in the Amazon S3 User Guide.
\nIf the bucket that you're uploading objects to uses the bucket owner enforced setting\n for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that\n use this setting only accept PUT requests that don't specify an ACL or PUT requests that\n specify bucket owner full control ACLs, such as the bucket-owner-full-control
\n canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that\n contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a\n 400
error with the error code AccessControlListNotSupported
.\n For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.
This functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nThe bucket name to which the PUT action was initiated.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name to which the PUT action was initiated.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Can be used to specify caching behavior along the request/reply chain. For more\n information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.
", + "smithy.api#documentation": "Can be used to specify caching behavior along the request/reply chain. For more\n information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.
", "smithy.api#httpHeader": "Cache-Control" } }, @@ -28666,7 +30942,7 @@ "ContentMD5": { "target": "com.amazonaws.s3#ContentMD5", "traits": { - "smithy.api#documentation": "The base64-encoded 128-bit MD5 digest of the message (without the headers) according to\n RFC 1864. This header can be used as a message integrity check to verify that the data is\n the same data that was originally sent. Although it is optional, we recommend using the\n Content-MD5 mechanism as an end-to-end integrity check. For more information about REST\n request authentication, see REST Authentication.
", + "smithy.api#documentation": "The base64-encoded 128-bit MD5 digest of the message (without the headers) according to\n RFC 1864. This header can be used as a message integrity check to verify that the data is\n the same data that was originally sent. Although it is optional, we recommend using the\n Content-MD5 mechanism as an end-to-end integrity check. For more information about REST\n request authentication, see REST Authentication.
\nThe Content-MD5
header is required for any request to upload an\n object with a retention period configured using Amazon S3 Object Lock. For more\n information about Amazon S3 Object Lock, see Amazon S3 Object Lock\n Overview in the Amazon S3 User Guide.
This functionality is not supported for directory buckets.
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
.
For the x-amz-checksum-algorithm\n
header, replace \n algorithm\n
with the supported algorithm from the following list:
CRC32
\nCRC32C
\nSHA1
\nSHA256
\nFor more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
\nIf the individual checksum value you provide through x-amz-checksum-algorithm\n
doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm
, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter and uses the checksum algorithm that matches the provided value in x-amz-checksum-algorithm\n
.
For directory buckets, when you use Amazon Web Services SDKs, CRC32
is the default checksum algorithm that's used for performance.
Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
\nThis functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nAllows grantee to read the object data and its metadata.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee to read the object data and its metadata.
\nThis functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nAllows grantee to read the object ACL.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee to read the object ACL.
\nThis functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nAllows grantee to write the ACL for the applicable object.
\nThis action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "Allows grantee to write the ACL for the applicable object.
\nThis functionality is not supported for directory buckets.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nThe server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example,\n AES256
, aws:kms
, aws:kms:dsse
).
\n General purpose buckets - You have four mutually exclusive options to protect data using server-side encryption in\n Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the\n encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or\n DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side\n encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to\n encrypt data at rest by using server-side encryption with other key options. For more\n information, see Using Server-Side\n Encryption in the Amazon S3 User Guide.
\n\n Directory buckets - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) value is supported.
By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The\n STANDARD storage class provides high durability and high availability. Depending on\n performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses\n the OUTPOSTS Storage Class. For more information, see Storage Classes in the\n Amazon S3 User Guide.
", + "smithy.api#documentation": "By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The\n STANDARD storage class provides high durability and high availability. Depending on\n performance needs, you can specify a different Storage Class. For more information, see Storage Classes in the\n Amazon S3 User Guide.
\nFor directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.
\nAmazon S3 on Outposts only uses\n the OUTPOSTS Storage Class.
\nIf the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata. For information about object metadata, see Object Key and Metadata.
\nIn the following example, the request header sets the redirect to an object\n (anotherPage.html) in the same bucket:
\n\n x-amz-website-redirect-location: /anotherPage.html
\n
In the following example, the request header sets the object redirect to another\n website:
\n\n x-amz-website-redirect-location: http://www.example.com/
\n
For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and\n How to\n Configure Website Page Redirects.
", + "smithy.api#documentation": "If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata. For information about object metadata, see Object Key and Metadata in the Amazon S3\n User Guide.
\nIn the following example, the request header sets the redirect to an object\n (anotherPage.html) in the same bucket:
\n\n x-amz-website-redirect-location: /anotherPage.html
\n
In the following example, the request header sets the object redirect to another\n website:
\n\n x-amz-website-redirect-location: http://www.example.com/
\n
For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and\n How to\n Configure Website Page Redirects in the Amazon S3\n User Guide.
\nThis functionality is not supported for directory buckets.
\nSpecifies the algorithm to use to when encrypting the object (for example,\n AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when encrypting the object (for example,\n AES256
).
This functionality is not supported for directory buckets.
\nSpecifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header.
This functionality is not supported for directory buckets.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nThis functionality is not supported for directory buckets.
\nIf x-amz-server-side-encryption
has a valid value of aws:kms
\n or aws:kms:dsse
, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS)\n symmetric encryption customer managed key that was used for the object. If you specify\n x-amz-server-side-encryption:aws:kms
or\n x-amz-server-side-encryption:aws:kms:dsse
, but do not provide\n x-amz-server-side-encryption-aws-kms-key-id
, Amazon S3 uses the Amazon Web Services managed key\n (aws/s3
) to protect the data. If the KMS key does not exist in the same\n account that's issuing the command, you must use the full ARN and not just the ID.
If x-amz-server-side-encryption
has a valid value of aws:kms
\n or aws:kms:dsse
, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS)\n symmetric encryption customer managed key that was used for the object. If you specify\n x-amz-server-side-encryption:aws:kms
or\n x-amz-server-side-encryption:aws:kms:dsse
, but do not provide\n x-amz-server-side-encryption-aws-kms-key-id
, Amazon S3 uses the Amazon Web Services managed key\n (aws/s3
) to protect the data. If the KMS key does not exist in the same\n account that's issuing the command, you must use the full ARN and not just the ID.
This functionality is not supported for directory buckets.
\nSpecifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a base64-encoded UTF-8 string holding JSON with the encryption context\n key-value pairs. This value is stored as object metadata and automatically gets passed on\n to Amazon Web Services KMS for future GetObject
or CopyObject
operations on\n this object. This value must be explicitly added during CopyObject\n operations.
Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a base64-encoded UTF-8 string holding JSON with the encryption context\n key-value pairs. This value is stored as object metadata and automatically gets passed on\n to Amazon Web Services KMS for future GetObject
or CopyObject
operations on\n this object. This value must be explicitly added during CopyObject
operations.
This functionality is not supported for directory buckets.
\nSpecifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to\n true
causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS.
Specifying this header with a PUT action doesn’t affect bucket-level settings for S3\n Bucket Key.
", + "smithy.api#documentation": "Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to\n true
causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS.
Specifying this header with a PUT action doesn’t affect bucket-level settings for S3\n Bucket Key.
\nThis functionality is not supported for directory buckets.
\nThe tag-set for the object. The tag-set must be encoded as URL Query parameters. (For\n example, \"Key1=Value1\")
", + "smithy.api#documentation": "The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For\n example, \"Key1=Value1\")
\nThis functionality is not supported for directory buckets.
\nThe Object Lock mode that you want to apply to this object.
", + "smithy.api#documentation": "The Object Lock mode that you want to apply to this object.
\nThis functionality is not supported for directory buckets.
\nThe date and time when you want this object's Object Lock to expire. Must be formatted\n as a timestamp parameter.
", + "smithy.api#documentation": "The date and time when you want this object's Object Lock to expire. Must be formatted\n as a timestamp parameter.
\nThis functionality is not supported for directory buckets.
\nSpecifies whether a legal hold will be applied to this object. For more information\n about S3 Object Lock, see Object Lock.
", + "smithy.api#documentation": "Specifies whether a legal hold will be applied to this object. For more information\n about S3 Object Lock, see Object Lock in the Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Places an Object Retention configuration on an object. For more information, see Locking Objects.\n Users or accounts require the s3:PutObjectRetention
permission in order to\n place an Object Retention configuration on objects. Bypassing a Governance Retention\n configuration requires the s3:BypassGovernanceRetention
permission.
This action is not supported by Amazon S3 on Outposts.
", + "smithy.api#documentation": "This operation is not supported by directory buckets.
\nPlaces an Object Retention configuration on an object. For more information, see Locking Objects.\n Users or accounts require the s3:PutObjectRetention
permission in order to\n place an Object Retention configuration on objects. Bypassing a Governance Retention\n configuration requires the s3:BypassGovernanceRetention
permission.
This functionality is not supported for Amazon S3 on Outposts.
", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?retention", @@ -28915,7 +31191,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "The bucket name that contains the object you want to apply this Object Retention\n configuration to.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The bucket name that contains the object you want to apply this Object Retention\n configuration to.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
", "smithy.api#httpLabel": {}, "smithy.api#required": {}, "smithy.rules#contextParam": { @@ -28969,14 +31245,14 @@ "ChecksumAlgorithm": { "target": "com.amazonaws.s3#ChecksumAlgorithm", "traits": { - "smithy.api#documentation": "Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Sets the supplied tag-set to an object that already exists in a bucket. A tag is a\n key-value pair. For more information, see Object Tagging.
\nYou can associate tags with an object by sending a PUT request against the tagging\n subresource that is associated with the object. You can retrieve tags by sending a GET\n request. For more information, see GetObjectTagging.
\nFor tagging-related restrictions related to characters and encodings, see Tag\n Restrictions. Note that Amazon S3 limits the maximum number of tags to 10 tags per\n object.
\nTo use this operation, you must have permission to perform the\n s3:PutObjectTagging
action. By default, the bucket owner has this\n permission and can grant this permission to others.
To put tags of any other version, use the versionId
query parameter. You\n also need permission for the s3:PutObjectVersionTagging
action.
\n PutObjectTagging
has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.
\n InvalidTag
- The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Object\n Tagging.
\n MalformedXML
- The XML provided does not match the\n schema.
\n OperationAborted
- A conflicting conditional action is\n currently in progress against this resource. Please try again.
\n InternalError
- The service was unable to apply the provided\n tag to the object.
The following operations are related to PutObjectTagging
:
\n GetObjectTagging\n
\n\n DeleteObjectTagging\n
\nThis operation is not supported by directory buckets.
\nSets the supplied tag-set to an object that already exists in a bucket. A tag is a\n key-value pair. For more information, see Object Tagging.
\nYou can associate tags with an object by sending a PUT request against the tagging\n subresource that is associated with the object. You can retrieve tags by sending a GET\n request. For more information, see GetObjectTagging.
\nFor tagging-related restrictions related to characters and encodings, see Tag\n Restrictions. Note that Amazon S3 limits the maximum number of tags to 10 tags per\n object.
\nTo use this operation, you must have permission to perform the\n s3:PutObjectTagging
action. By default, the bucket owner has this\n permission and can grant this permission to others.
To put tags of any other version, use the versionId
query parameter. You\n also need permission for the s3:PutObjectVersionTagging
action.
\n PutObjectTagging
has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.
\n InvalidTag
- The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Object\n Tagging.
\n MalformedXML
- The XML provided does not match the\n schema.
\n OperationAborted
- A conflicting conditional action is\n currently in progress against this resource. Please try again.
\n InternalError
- The service was unable to apply the provided\n tag to the object.
The following operations are related to PutObjectTagging
:
\n GetObjectTagging\n
\n\n DeleteObjectTagging\n
\nThe bucket name containing the object.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name containing the object.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Creates or modifies the PublicAccessBlock
configuration for an Amazon S3 bucket.\n To use this operation, you must have the s3:PutBucketPublicAccessBlock
\n permission. For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.
When Amazon S3 evaluates the PublicAccessBlock
configuration for a bucket or\n an object, it checks the PublicAccessBlock
configuration for both the\n bucket (or the bucket that contains the object) and the bucket owner's account. If the\n PublicAccessBlock
configurations are different between the bucket and\n the account, Amazon S3 uses the most restrictive combination of the bucket-level and\n account-level settings.
For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".
\nThe following operations are related to PutPublicAccessBlock
:
\n GetPublicAccessBlock\n
\nThis operation is not supported by directory buckets.
\nCreates or modifies the PublicAccessBlock
configuration for an Amazon S3 bucket.\n To use this operation, you must have the s3:PutBucketPublicAccessBlock
\n permission. For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.
When Amazon S3 evaluates the PublicAccessBlock
configuration for a bucket or\n an object, it checks the PublicAccessBlock
configuration for both the\n bucket (or the bucket that contains the object) and the bucket owner's account. If the\n PublicAccessBlock
configurations are different between the bucket and\n the account, Amazon S3 uses the most restrictive combination of the bucket-level and\n account-level settings.
For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".
\nThe following operations are related to PutPublicAccessBlock
:
\n GetPublicAccessBlock\n
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3\n bucket.
" } }, + "com.amazonaws.s3#Region": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 20 + } + } + }, "com.amazonaws.s3#ReplaceKeyPrefixWith": { "type": "string" }, @@ -29626,7 +31916,7 @@ } }, "traits": { - "smithy.api#documentation": "If present, indicates that the requester was successfully charged for the\n request.
" + "smithy.api#documentation": "If present, indicates that the requester was successfully charged for the\n request.
\nThis functionality is not supported for directory buckets.
\nConfirms that the requester knows that they will be charged for the request. Bucket\n owners need not specify this parameter in their requests. If either the source or\n destination Amazon S3 bucket has Requester Pays enabled, the requester will pay for\n corresponding charges to copy the object. For information about downloading objects from\n Requester Pays buckets, see Downloading Objects in\n Requester Pays Buckets in the Amazon S3 User Guide.
" + "smithy.api#documentation": "Confirms that the requester knows that they will be charged for the request. Bucket\n owners need not specify this parameter in their requests. If either the source or\n destination S3 bucket has Requester Pays enabled, the requester will pay for\n corresponding charges to copy the object. For information about downloading objects from\n Requester Pays buckets, see Downloading Objects in\n Requester Pays Buckets in the Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets.
\nRestores an archived copy of an object back into Amazon S3
\nThis action is not supported by Amazon S3 on Outposts.
\nThis action performs the following types of requests:
\n\n select
- Perform a select query on an archived object
\n restore an archive
- Restore an archived object
For more information about the S3
structure in the request body, see the\n following:
\n PutObject\n
\n\n Managing Access with ACLs in the\n Amazon S3 User Guide\n
\n\n Protecting Data Using Server-Side Encryption in the\n Amazon S3 User Guide\n
\nDefine the SQL expression for the SELECT
type of restoration for your query\n in the request body's SelectParameters
structure. You can use expressions like\n the following examples.
The following expression returns all records from the specified object.
\n\n SELECT * FROM Object
\n
Assuming that you are not using any headers for data stored in the object, you can\n specify columns with positional headers.
\n\n SELECT s._1, s._2 FROM Object s WHERE s._3 > 100
\n
If you have headers and you set the fileHeaderInfo
in the\n CSV
structure in the request body to USE
, you can\n specify headers in the query. (If you set the fileHeaderInfo
field to\n IGNORE
, the first row is skipped for the query.) You cannot mix\n ordinal positions with header column names.
\n SELECT s.Id, s.FirstName, s.SSN FROM S3Object s
\n
When making a select request, you can also do the following:
\nTo expedite your queries, specify the Expedited
tier. For more\n information about tiers, see \"Restoring Archives,\" later in this topic.
Specify details about the data serialization format of both the input object that\n is being queried and the serialization of the CSV-encoded query results.
\nThe following are additional important facts about the select feature:
\nThe output results are new Amazon S3 objects. Unlike archive retrievals, they are\n stored until explicitly deleted-manually or through a lifecycle configuration.
\nYou can issue more than one select request on the same Amazon S3 object. Amazon S3 doesn't\n duplicate requests, so avoid issuing duplicate requests.
\n Amazon S3 accepts a select request even if the object has already been restored. A\n select request doesn’t return error response 409
.
To use this operation, you must have permissions to perform the\n s3:RestoreObject
action. The bucket owner has this permission by\n default and can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.
Objects that you archive to the S3 Glacier Flexible Retrieval Flexible Retrieval\n or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or\n S3 Intelligent-Tiering Deep Archive tiers, are not accessible in real time. For objects in the\n S3 Glacier Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive\n storage classes, you must first initiate a restore request, and then wait until a\n temporary copy of the object is available. If you want a permanent copy of the\n object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket.\n To access an archived object, you must restore the object for the duration (number\n of days) that you specify. For objects in the Archive Access or Deep Archive\n Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request,\n and then wait until the object is moved into the Frequent Access tier.
\nTo restore a specific object version, you can provide a version ID. If you\n don't provide a version ID, Amazon S3 restores the current version.
\nWhen restoring an archived object, you can specify one of the following data\n access tier options in the Tier
element of the request body:
\n Expedited
- Expedited retrievals allow you to quickly access\n your data stored in the S3 Glacier Flexible Retrieval Flexible Retrieval\n storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests\n for restoring archives are required. For all but the largest archived\n objects (250 MB+), data accessed using Expedited retrievals is typically\n made available within 1–5 minutes. Provisioned capacity ensures that\n retrieval capacity for Expedited retrievals is available when you need it.\n Expedited retrievals and provisioned capacity are not available for objects\n stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.
\n Standard
- Standard retrievals allow you to access any of\n your archived objects within several hours. This is the default option for\n retrieval requests that do not specify the retrieval option. Standard\n retrievals typically finish within 3–5 hours for objects stored in the\n S3 Glacier Flexible Retrieval Flexible Retrieval storage class or\n S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for\n objects stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored\n in S3 Intelligent-Tiering.
\n Bulk
- Bulk retrievals free for objects stored in the\n S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes,\n enabling you to retrieve large amounts, even petabytes, of data at no cost.\n Bulk retrievals typically finish within 5–12 hours for objects stored in the\n S3 Glacier Flexible Retrieval Flexible Retrieval storage class or\n S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost\n retrieval option when restoring objects from\n S3 Glacier Deep Archive. They typically finish within 48 hours for\n objects stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.
For more information about archive retrieval options and provisioned capacity\n for Expedited
data access, see Restoring Archived\n Objects in the Amazon S3 User Guide.
You can use Amazon S3 restore speed upgrade to change the restore speed to a faster\n speed while it is in progress. For more information, see Upgrading the speed of an in-progress restore in the\n Amazon S3 User Guide.
\nTo get the status of object restoration, you can send a HEAD
\n request. Operations return the x-amz-restore
header, which provides\n information about the restoration status, in the response. You can use Amazon S3 event\n notifications to notify you when a restore is initiated or completed. For more\n information, see Configuring Amazon S3 Event\n Notifications in the Amazon S3 User Guide.
After restoring an archived object, you can update the restoration period by\n reissuing the request with a new period. Amazon S3 updates the restoration period\n relative to the current time and charges only for the request-there are no\n data transfer charges. You cannot update the restoration period when Amazon S3 is\n actively processing your current restore request for the object.
\nIf your bucket has a lifecycle configuration with a rule that includes an\n expiration action, the object expiration overrides the life span that you specify\n in a restore request. For example, if you restore an object copy for 10 days, but\n the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days.\n For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle\n Management in Amazon S3 User Guide.
\nA successful action returns either the 200 OK
or 202\n Accepted
status code.
If the object is not previously restored, then Amazon S3 returns 202\n Accepted
in the response.
If the object is previously restored, Amazon S3 returns 200 OK
in\n the response.
Special errors:
\n\n Code: RestoreAlreadyInProgress\n
\n\n Cause: Object restore is already in progress. (This error\n does not apply to SELECT type requests.)\n
\n\n HTTP Status Code: 409 Conflict\n
\n\n SOAP Fault Code Prefix: Client\n
\n\n Code: GlacierExpeditedRetrievalNotAvailable\n
\n\n Cause: expedited retrievals are currently not available.\n Try again later. (Returned if there is insufficient capacity to\n process the Expedited request. This error applies only to Expedited\n retrievals and not to S3 Standard or Bulk retrievals.)\n
\n\n HTTP Status Code: 503\n
\n\n SOAP Fault Code Prefix: N/A\n
\nThe following operations are related to RestoreObject
:
This operation is not supported by directory buckets.
\nRestores an archived copy of an object back into Amazon S3
\nThis functionality is not supported for Amazon S3 on Outposts.
\nThis action performs the following types of requests:
\n\n select
- Perform a select query on an archived object
\n restore an archive
- Restore an archived object
For more information about the S3
structure in the request body, see the\n following:
\n PutObject\n
\n\n Managing Access with ACLs in the\n Amazon S3 User Guide\n
\n\n Protecting Data Using Server-Side Encryption in the\n Amazon S3 User Guide\n
\nDefine the SQL expression for the SELECT
type of restoration for your query\n in the request body's SelectParameters
structure. You can use expressions like\n the following examples.
The following expression returns all records from the specified object.
\n\n SELECT * FROM Object
\n
Assuming that you are not using any headers for data stored in the object, you can\n specify columns with positional headers.
\n\n SELECT s._1, s._2 FROM Object s WHERE s._3 > 100
\n
If you have headers and you set the fileHeaderInfo
in the\n CSV
structure in the request body to USE
, you can\n specify headers in the query. (If you set the fileHeaderInfo
field to\n IGNORE
, the first row is skipped for the query.) You cannot mix\n ordinal positions with header column names.
\n SELECT s.Id, s.FirstName, s.SSN FROM S3Object s
\n
When making a select request, you can also do the following:
\nTo expedite your queries, specify the Expedited
tier. For more\n information about tiers, see \"Restoring Archives,\" later in this topic.
Specify details about the data serialization format of both the input object that\n is being queried and the serialization of the CSV-encoded query results.
\nThe following are additional important facts about the select feature:
\nThe output results are new Amazon S3 objects. Unlike archive retrievals, they are\n stored until explicitly deleted-manually or through a lifecycle configuration.
\nYou can issue more than one select request on the same Amazon S3 object. Amazon S3 doesn't\n duplicate requests, so avoid issuing duplicate requests.
\n Amazon S3 accepts a select request even if the object has already been restored. A\n select request doesn’t return error response 409
.
To use this operation, you must have permissions to perform the\n s3:RestoreObject
action. The bucket owner has this permission by\n default and can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.
Objects that you archive to the S3 Glacier Flexible Retrieval Flexible Retrieval\n or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or\n S3 Intelligent-Tiering Deep Archive tiers, are not accessible in real time. For objects in the\n S3 Glacier Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive\n storage classes, you must first initiate a restore request, and then wait until a\n temporary copy of the object is available. If you want a permanent copy of the\n object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket.\n To access an archived object, you must restore the object for the duration (number\n of days) that you specify. For objects in the Archive Access or Deep Archive\n Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request,\n and then wait until the object is moved into the Frequent Access tier.
\nTo restore a specific object version, you can provide a version ID. If you\n don't provide a version ID, Amazon S3 restores the current version.
\nWhen restoring an archived object, you can specify one of the following data\n access tier options in the Tier
element of the request body:
\n Expedited
- Expedited retrievals allow you to quickly access\n your data stored in the S3 Glacier Flexible Retrieval Flexible Retrieval\n storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests\n for restoring archives are required. For all but the largest archived\n objects (250 MB+), data accessed using Expedited retrievals is typically\n made available within 1–5 minutes. Provisioned capacity ensures that\n retrieval capacity for Expedited retrievals is available when you need it.\n Expedited retrievals and provisioned capacity are not available for objects\n stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.
\n Standard
- Standard retrievals allow you to access any of\n your archived objects within several hours. This is the default option for\n retrieval requests that do not specify the retrieval option. Standard\n retrievals typically finish within 3–5 hours for objects stored in the\n S3 Glacier Flexible Retrieval Flexible Retrieval storage class or\n S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for\n objects stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored\n in S3 Intelligent-Tiering.
\n Bulk
- Bulk retrievals free for objects stored in the\n S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes,\n enabling you to retrieve large amounts, even petabytes, of data at no cost.\n Bulk retrievals typically finish within 5–12 hours for objects stored in the\n S3 Glacier Flexible Retrieval Flexible Retrieval storage class or\n S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost\n retrieval option when restoring objects from\n S3 Glacier Deep Archive. They typically finish within 48 hours for\n objects stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.
For more information about archive retrieval options and provisioned capacity\n for Expedited
data access, see Restoring Archived\n Objects in the Amazon S3 User Guide.
You can use Amazon S3 restore speed upgrade to change the restore speed to a faster\n speed while it is in progress. For more information, see Upgrading the speed of an in-progress restore in the\n Amazon S3 User Guide.
\nTo get the status of object restoration, you can send a HEAD
\n request. Operations return the x-amz-restore
header, which provides\n information about the restoration status, in the response. You can use Amazon S3 event\n notifications to notify you when a restore is initiated or completed. For more\n information, see Configuring Amazon S3 Event\n Notifications in the Amazon S3 User Guide.
After restoring an archived object, you can update the restoration period by\n reissuing the request with a new period. Amazon S3 updates the restoration period\n relative to the current time and charges only for the request-there are no\n data transfer charges. You cannot update the restoration period when Amazon S3 is\n actively processing your current restore request for the object.
\nIf your bucket has a lifecycle configuration with a rule that includes an\n expiration action, the object expiration overrides the life span that you specify\n in a restore request. For example, if you restore an object copy for 10 days, but\n the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days.\n For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle\n Management in Amazon S3 User Guide.
\nA successful action returns either the 200 OK
or 202\n Accepted
status code.
If the object is not previously restored, then Amazon S3 returns 202\n Accepted
in the response.
If the object is previously restored, Amazon S3 returns 200 OK
in\n the response.
Special errors:
\n\n Code: RestoreAlreadyInProgress\n
\n\n Cause: Object restore is already in progress. (This error\n does not apply to SELECT type requests.)\n
\n\n HTTP Status Code: 409 Conflict\n
\n\n SOAP Fault Code Prefix: Client\n
\n\n Code: GlacierExpeditedRetrievalNotAvailable\n
\n\n Cause: expedited retrievals are currently not available.\n Try again later. (Returned if there is insufficient capacity to\n process the Expedited request. This error applies only to Expedited\n retrievals and not to S3 Standard or Bulk retrievals.)\n
\n\n HTTP Status Code: 503\n
\n\n SOAP Fault Code Prefix: N/A\n
\nThe following operations are related to RestoreObject
:
The bucket name containing the object to restore.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name containing the object to restore.
\n\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.
" + "smithy.api#documentation": "Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.
\nThis functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
\nThis action filters the contents of an Amazon S3 object based on a simple structured query\n language (SQL) statement. In the request, along with the SQL expression, you must also\n specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses\n this format to parse object data into records, and returns only records that match the\n specified SQL expression. You must also specify the data serialization format for the\n response.
\nThis action is not supported by Amazon S3 on Outposts.
\nFor more information about Amazon S3 Select, see Selecting Content from\n Objects and SELECT\n Command in the Amazon S3 User Guide.
\n \nYou must have s3:GetObject
permission for this operation. Amazon S3\n Select does not support anonymous access. For more information about permissions,\n see Specifying Permissions in\n a Policy in the Amazon S3 User Guide.
You can use Amazon S3 Select to query objects that have the following format\n properties:
\n\n CSV, JSON, and Parquet - Objects must be in CSV,\n JSON, or Parquet format.
\n\n UTF-8 - UTF-8 is the only encoding type Amazon S3 Select\n supports.
\n\n GZIP or BZIP2 - CSV and JSON files can be compressed\n using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that\n Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar\n compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support\n whole-object compression for Parquet objects.
\n\n Server-side encryption - Amazon S3 Select supports\n querying objects that are protected with server-side encryption.
\nFor objects that are encrypted with customer-provided encryption keys\n (SSE-C), you must use HTTPS, and you must use the headers that are\n documented in the GetObject. For more\n information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys)\n in the Amazon S3 User Guide.
\nFor objects that are encrypted with Amazon S3 managed keys (SSE-S3) and\n Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently,\n so you don't need to specify anything. For more information about\n server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the\n Amazon S3 User Guide.
\nGiven the response size is unknown, Amazon S3 Select streams the response as a\n series of messages and includes a Transfer-Encoding
header with\n chunked
as its value in the response. For more information, see\n Appendix:\n SelectObjectContent\n Response.
The SelectObjectContent
action does not support the following\n GetObject
functionality. For more information, see GetObject.
\n Range
: Although you can specify a scan range for an Amazon S3 Select\n request (see SelectObjectContentRequest - ScanRange in the request\n parameters), you cannot specify the range of bytes of an object to return.\n
The GLACIER
, DEEP_ARCHIVE
, and\n REDUCED_REDUNDANCY
storage classes, or the\n ARCHIVE_ACCESS
and DEEP_ARCHIVE_ACCESS
access\n tiers of the INTELLIGENT_TIERING
storage class: You cannot\n query objects in the GLACIER
, DEEP_ARCHIVE
, or\n REDUCED_REDUNDANCY
storage classes, nor objects in the\n ARCHIVE_ACCESS
or DEEP_ARCHIVE_ACCESS
access\n tiers of the INTELLIGENT_TIERING
storage class. For more\n information about storage classes, see Using Amazon S3\n storage classes in the\n Amazon S3 User Guide.
For a list of special errors for this operation, see List of SELECT Object Content Error Codes\n
\nThe following operations are related to SelectObjectContent
:
\n GetObject\n
\nThis operation is not supported by directory buckets.
\nThis action filters the contents of an Amazon S3 object based on a simple structured query\n language (SQL) statement. In the request, along with the SQL expression, you must also\n specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses\n this format to parse object data into records, and returns only records that match the\n specified SQL expression. You must also specify the data serialization format for the\n response.
\nThis functionality is not supported for Amazon S3 on Outposts.
\nFor more information about Amazon S3 Select, see Selecting Content from\n Objects and SELECT\n Command in the Amazon S3 User Guide.
\n \nYou must have the s3:GetObject
permission for this operation. Amazon S3\n Select does not support anonymous access. For more information about permissions,\n see Specifying Permissions in\n a Policy in the Amazon S3 User Guide.
You can use Amazon S3 Select to query objects that have the following format\n properties:
\n\n CSV, JSON, and Parquet - Objects must be in CSV,\n JSON, or Parquet format.
\n\n UTF-8 - UTF-8 is the only encoding type Amazon S3 Select\n supports.
\n\n GZIP or BZIP2 - CSV and JSON files can be compressed\n using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that\n Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar\n compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support\n whole-object compression for Parquet objects.
\n\n Server-side encryption - Amazon S3 Select supports\n querying objects that are protected with server-side encryption.
\nFor objects that are encrypted with customer-provided encryption keys\n (SSE-C), you must use HTTPS, and you must use the headers that are\n documented in the GetObject. For more\n information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys)\n in the Amazon S3 User Guide.
\nFor objects that are encrypted with Amazon S3 managed keys (SSE-S3) and\n Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently,\n so you don't need to specify anything. For more information about\n server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the\n Amazon S3 User Guide.
\nGiven the response size is unknown, Amazon S3 Select streams the response as a\n series of messages and includes a Transfer-Encoding
header with\n chunked
as its value in the response. For more information, see\n Appendix:\n SelectObjectContent\n Response.
The SelectObjectContent
action does not support the following\n GetObject
functionality. For more information, see GetObject.
\n Range
: Although you can specify a scan range for an Amazon S3 Select\n request (see SelectObjectContentRequest - ScanRange in the request\n parameters), you cannot specify the range of bytes of an object to return.\n
The GLACIER
, DEEP_ARCHIVE
, and\n REDUCED_REDUNDANCY
storage classes, or the\n ARCHIVE_ACCESS
and DEEP_ARCHIVE_ACCESS
access\n tiers of the INTELLIGENT_TIERING
storage class: You cannot\n query objects in the GLACIER
, DEEP_ARCHIVE
, or\n REDUCED_REDUNDANCY
storage classes, nor objects in the\n ARCHIVE_ACCESS
or DEEP_ARCHIVE_ACCESS
access\n tiers of the INTELLIGENT_TIERING
storage class. For more\n information about storage classes, see Using Amazon S3\n storage classes in the\n Amazon S3 User Guide.
For a list of special errors for this operation, see List of SELECT Object Content Error Codes\n
\nThe following operations are related to SelectObjectContent
:
\n GetObject\n
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
A unique identifier that's associated with a secret access key. The access key ID and the secret access key are used together to sign programmatic Amazon Web Services requests cryptographically.
", + "smithy.api#required": {}, + "smithy.api#xmlName": "AccessKeyId" + } + }, + "SecretAccessKey": { + "target": "com.amazonaws.s3#SessionCredentialValue", + "traits": { + "smithy.api#documentation": "A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services requests. Signing a request identifies the sender and prevents the request from being altered.
", + "smithy.api#required": {}, + "smithy.api#xmlName": "SecretAccessKey" + } + }, + "SessionToken": { + "target": "com.amazonaws.s3#SessionCredentialValue", + "traits": { + "smithy.api#documentation": "A part of the temporary security credentials. The session token is used to validate the temporary security credentials. \n \n
", + "smithy.api#required": {}, + "smithy.api#xmlName": "SessionToken" + } + }, + "Expiration": { + "target": "com.amazonaws.s3#SessionExpiration", + "traits": { + "smithy.api#documentation": "Temporary security credentials expire after a specified interval. After temporary credentials expire, any calls that you make with those credentials will fail. So you must generate a new set of temporary credentials. \n Temporary credentials cannot be extended or refreshed beyond the original specified interval.
", + "smithy.api#required": {}, + "smithy.api#xmlName": "Expiration" + } + } + }, + "traits": { + "smithy.api#documentation": "The established temporary security credentials of the session.
\n\n Directory buckets - These session credentials are only supported for the authentication and authorization of Zonal endpoint APIs on directory buckets.
\nUploads a part in a multipart upload.
\nIn this operation, you provide part data in your request. However, you have an option\n to specify your existing Amazon S3 object as a data source for the part you are uploading. To\n upload a part from an existing object, you use the UploadPartCopy operation.\n
\nYou must initiate a multipart upload (see CreateMultipartUpload)\n before you can upload any part. In response to your initiate request, Amazon S3 returns an\n upload ID, a unique identifier, that you must include in your upload part request.
\nPart numbers can be any number from 1 to 10,000, inclusive. A part number uniquely\n identifies a part and also defines its position within the object being created. If you\n upload a new part using the same part number that was used with a previous part, the\n previously uploaded part is overwritten.
\nFor information about maximum and minimum part sizes and other multipart upload\n specifications, see Multipart upload limits in the Amazon S3 User Guide.
\nTo ensure that data is not corrupted when traversing the network, specify the\n Content-MD5
header in the upload part request. Amazon S3 checks the part data\n against the provided MD5 value. If they do not match, Amazon S3 returns an error.
If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the\n x-amz-content-sha256
header as a checksum instead of\n Content-MD5
. For more information see Authenticating\n Requests: Using the Authorization Header (Amazon Web Services Signature Version 4).
\n Note: After you initiate multipart upload and upload\n one or more parts, you must either complete or abort multipart upload in order to stop\n getting charged for storage of the uploaded parts. Only after you either complete or abort\n multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts\n storage.
\nFor more information on multipart uploads, go to Multipart Upload Overview in the\n Amazon S3 User Guide .
\nFor information on the permissions required to use the multipart upload API, go to\n Multipart\n Upload and Permissions in the Amazon S3 User Guide.
\nServer-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it. You have three\n mutually exclusive options to protect data using server-side encryption in Amazon S3, depending\n on how you choose to manage the encryption keys. Specifically, the encryption key options\n are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys\n (SSE-C). Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys (SSE-S3) by\n default. You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption\n with other key options. The option you use depends on whether you want to use KMS keys\n (SSE-KMS) or provide your own encryption key (SSE-C). If you choose to provide your own\n encryption key, the request headers you provide in the request must match the headers you\n used in the request to initiate the upload by using CreateMultipartUpload.\n For more information, go to Using Server-Side\n Encryption in the Amazon S3 User Guide.
\nServer-side encryption is supported by the S3 Multipart Upload actions. Unless you are\n using a customer-provided encryption key (SSE-C), you don't need to specify the encryption\n parameters in each UploadPart request. Instead, you only need to specify the server-side\n encryption parameters in the initial Initiate Multipart request. For more information, see\n CreateMultipartUpload.
\nIf you requested server-side encryption using a customer-provided encryption key (SSE-C)\n in your initiate multipart upload request, you must provide identical encryption\n information in each part upload using the following headers.
\nx-amz-server-side-encryption-customer-algorithm
\nx-amz-server-side-encryption-customer-key
\nx-amz-server-side-encryption-customer-key-MD5
\n\n UploadPart
has the following special errors:
\n Code: NoSuchUpload\n
\n\n Cause: The specified multipart upload does not exist. The upload\n ID might be invalid, or the multipart upload might have been aborted or\n completed.\n
\n\n HTTP Status Code: 404 Not Found \n
\n\n SOAP Fault Code Prefix: Client\n
\nThe following operations are related to UploadPart
:
\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nUploads a part in a multipart upload.
\nIn this operation, you provide new data as a part of an object in your request. However, you have an option\n to specify your existing Amazon S3 object as a data source for the part you are uploading. To\n upload a part from an existing object, you use the UploadPartCopy operation.\n
\nYou must initiate a multipart upload (see CreateMultipartUpload)\n before you can upload any part. In response to your initiate request, Amazon S3 returns an\n upload ID, a unique identifier that you must include in your upload part request.
\nPart numbers can be any number from 1 to 10,000, inclusive. A part number uniquely\n identifies a part and also defines its position within the object being created. If you\n upload a new part using the same part number that was used with a previous part, the\n previously uploaded part is overwritten.
\nFor information about maximum and minimum part sizes and other multipart upload\n specifications, see Multipart upload limits in the Amazon S3 User Guide.
\nAfter you initiate multipart upload and upload\n one or more parts, you must either complete or abort multipart upload in order to stop\n getting charged for storage of the uploaded parts. Only after you either complete or abort\n multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts\n storage.
\nFor more information on multipart uploads, go to Multipart Upload Overview in the\n Amazon S3 User Guide .
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
\n General purpose bucket permissions - For information on the permissions required to use the multipart upload API, see \n Multipart\n Upload and Permissions in the Amazon S3 User Guide.
\n\n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession
\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession
permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession
API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession
API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession
\n .
\n General purpose bucket - To ensure that data is not corrupted traversing the network, specify the\n Content-MD5
header in the upload part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the\n x-amz-content-sha256
header as a checksum instead of\n Content-MD5
. For more information see Authenticating\n Requests: Using the Authorization Header (Amazon Web Services Signature Version 4).
\n Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.
\n\n General purpose bucket - Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it. You have \n mutually exclusive options to protect data using server-side encryption in Amazon S3, depending\n on how you choose to manage the encryption keys. Specifically, the encryption key options\n are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys\n (SSE-C). Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys (SSE-S3) by\n default. You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption\n with other key options. The option you use depends on whether you want to use KMS keys\n (SSE-KMS) or provide your own encryption key (SSE-C).
\nServer-side encryption is supported by the S3 Multipart Upload operations. Unless you are\n using a customer-provided encryption key (SSE-C), you don't need to specify the encryption\n parameters in each UploadPart request. Instead, you only need to specify the server-side\n encryption parameters in the initial Initiate Multipart request. For more information, see\n CreateMultipartUpload.
\nIf you request server-side encryption using a customer-provided encryption key (SSE-C)\n in your initiate multipart upload request, you must provide identical encryption\n information in each part upload using the following request headers.
\nx-amz-server-side-encryption-customer-algorithm
\nx-amz-server-side-encryption-customer-key
\nx-amz-server-side-encryption-customer-key-MD5
\n\n Directory bucket - For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
\n For more information, see Using Server-Side\n Encryption in the Amazon S3 User Guide.
\nError Code: NoSuchUpload
\n
Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.
\nHTTP Status Code: 404 Not Found
\nSOAP Fault Code Prefix: Client
\n\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to UploadPart
:
\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nUploads a part by copying data from an existing object as data source. You specify the\n data source by adding the request header x-amz-copy-source
in your request and\n a byte range by adding the request header x-amz-copy-source-range
in your\n request.
For information about maximum and minimum part sizes and other multipart upload\n specifications, see Multipart upload limits in the Amazon S3 User Guide.
\nInstead of using an existing object as part data, you might use the UploadPart\n action and provide data in your request.
\nYou must initiate a multipart upload before you can upload any part. In response to your\n initiate request. Amazon S3 returns a unique identifier, the upload ID, that you must include in\n your upload part request.
\nFor more information about using the UploadPartCopy
operation, see the\n following:
For conceptual information about multipart uploads, see Uploading\n Objects Using Multipart Upload in the\n Amazon S3 User Guide.
\nFor information about permissions required to use the multipart upload API, see\n Multipart Upload and Permissions in the\n Amazon S3 User Guide.
\nFor information about copying objects using a single atomic action vs. a multipart\n upload, see Operations on Objects in\n the Amazon S3 User Guide.
\nFor information about using server-side encryption with customer-provided\n encryption keys with the UploadPartCopy
operation, see CopyObject and UploadPart.
Note the following additional considerations about the request headers\n x-amz-copy-source-if-match
, x-amz-copy-source-if-none-match
,\n x-amz-copy-source-if-unmodified-since
, and\n x-amz-copy-source-if-modified-since
:
\n
\n Consideration 1 - If both of the\n x-amz-copy-source-if-match
and\n x-amz-copy-source-if-unmodified-since
headers are present in the\n request as follows:
\n x-amz-copy-source-if-match
condition evaluates to true
,\n and;
\n x-amz-copy-source-if-unmodified-since
condition evaluates to\n false
;
Amazon S3 returns 200 OK
and copies the data.\n
\n Consideration 2 - If both of the\n x-amz-copy-source-if-none-match
and\n x-amz-copy-source-if-modified-since
headers are present in the\n request as follows:
\n x-amz-copy-source-if-none-match
condition evaluates to\n false
, and;
\n x-amz-copy-source-if-modified-since
condition evaluates to\n true
;
Amazon S3 returns 412 Precondition Failed
response code.\n
If your bucket has versioning enabled, you could have multiple versions of the\n same object. By default, x-amz-copy-source
identifies the current\n version of the object to copy. If the current version is a delete marker and you\n don't specify a versionId in the x-amz-copy-source
, Amazon S3 returns a\n 404 error, because the object does not exist. If you specify versionId in the\n x-amz-copy-source
and the versionId is a delete marker, Amazon S3\n returns an HTTP 400 error, because you are not allowed to specify a delete marker\n as a version for the x-amz-copy-source
.
You can optionally specify a specific version of the source object to copy by\n adding the versionId
subresource as shown in the following\n example:
\n x-amz-copy-source: /bucket/object?versionId=version id
\n
\n Code: NoSuchUpload\n
\n\n Cause: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.\n
\n\n HTTP Status Code: 404 Not Found\n
\n\n Code: InvalidRequest\n
\n\n Cause: The specified copy source is not supported as a\n byte-range copy source.\n
\n\n HTTP Status Code: 400 Bad Request\n
\nThe following operations are related to UploadPartCopy
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nUploads a part by copying data from an existing object as data source. To specify the\n data source, you add the request header x-amz-copy-source
in your request. To specify \n a byte range, you add the request header x-amz-copy-source-range
in your\n request.
For information about maximum and minimum part sizes and other multipart upload\n specifications, see Multipart upload limits in the Amazon S3 User Guide.
\nInstead of copying data from an existing object as part data, you might use the UploadPart\n action to upload new data as a part of an object in your request.
\nYou must initiate a multipart upload before you can upload any part. In response to your\n initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in\n your upload part request.
\nFor conceptual information about multipart uploads, see Uploading\n Objects Using Multipart Upload in the\n Amazon S3 User Guide. For information about copying objects using a single atomic action vs. a multipart\n upload, see Operations on Objects in\n the Amazon S3 User Guide.
\n\n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n
. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.
All UploadPartCopy
requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz-
prefix, including\n x-amz-copy-source
, must be signed. For more information, see REST Authentication.
\n Directory buckets - You must use IAM credentials to authenticate and authorize your access to the UploadPartCopy
API operation, instead of using the \n temporary security credentials through the CreateSession
API operation.
Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.
\nYou must have READ
access to the source object and WRITE
\n access to the destination bucket.
\n General purpose bucket permissions - You must have the permissions in a policy based on the bucket types of your source bucket and destination bucket in an UploadPartCopy
operation.
If the source object is in a general purpose bucket, you must have the \n s3:GetObject
\n permission to read the source object that is being copied.
If the destination bucket is a general purpose bucket, you must have the \n s3:PubObject
\n permission to write the object copy to the destination bucket.\n
For information about permissions required to use the multipart upload API, see\n Multipart Upload and Permissions in the\n Amazon S3 User Guide.
\n\n Directory bucket permissions -\n You must have permissions in a bucket policy or an IAM identity-based policy based on the source and destination\n bucket types in an UploadPartCopy
operation.
If the source object that you want to copy is in a\n directory bucket, you must have the \n s3express:CreateSession
\n permission in\n the Action
element of a policy to read the object\n . \n By default, the session is in the ReadWrite
mode. If you want to restrict the access, you can explicitly set the s3express:SessionMode
condition key to ReadOnly
on the copy source bucket.
If the copy destination is a directory bucket, you must have the \n \n s3express:CreateSession
\n permission in the\n Action
element of a policy to write the object\n to the destination. The s3express:SessionMode
condition\n key cannot be set to ReadOnly
on the copy destination.
For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone in the\n Amazon S3 User Guide.
\n\n General purpose buckets - \n \n For information about using server-side encryption with customer-provided\n encryption keys with the UploadPartCopy
operation, see CopyObject and UploadPart.\n
\n Directory buckets - For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
Error Code: NoSuchUpload
\n
Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.
\nHTTP Status Code: 404 Not Found
\nError Code: InvalidRequest
\n
Description: The specified copy source is not supported as a\n byte-range copy source.
\nHTTP Status Code: 400 Bad Request
\n\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com
.
The following operations are related to UploadPartCopy
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nThe version of the source object that was copied, if you have enabled versioning on the\n source bucket.
", + "smithy.api#documentation": "The version of the source object that was copied, if you have enabled versioning on the\n source bucket.
\nThis functionality is not supported when the source object is in a directory bucket.
\nThe server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
).
The server-side encryption algorithm used when you store this object in Amazon S3 (for example,\n AES256
, aws:kms
).
For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header confirming the encryption algorithm used.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.
\nThis functionality is not supported for directory buckets.
\nIf server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide round-trip message integrity verification of\n the customer-provided encryption key.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification of\n the customer-provided encryption key.
\nThis functionality is not supported for directory buckets.
\nIf present, specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
", + "smithy.api#documentation": "If present, indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
\nThis functionality is not supported for directory buckets.
\nIndicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
", + "smithy.api#documentation": "Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
\nThis functionality is not supported for directory buckets.
\nThe bucket name.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The bucket name.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
Specifies the source object for the copy operation. You specify the value in one of two\n formats, depending on whether you want to access the source object through an access point:
\nFor objects not accessed through an access point, specify the name of the source bucket\n and key of the source object, separated by a slash (/). For example, to copy the\n object reports/january.pdf
from the bucket\n awsexamplebucket
, use awsexamplebucket/reports/january.pdf
.\n The value must be URL-encoded.
For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:
. For example, to copy the object reports/january.pdf
through access point my-access-point
owned by account 123456789012
in Region us-west-2
, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf
. The value must be URL encoded.
Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same Amazon Web Services Region.
\nAlternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:
. For example, to copy the object reports/january.pdf
through outpost my-outpost
owned by account 123456789012
in Region us-west-2
, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf
. The value must be URL-encoded.
To copy a specific version of an object, append ?versionId=
\n to the value (for example,\n awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893
).\n If you don't specify a version ID, Amazon S3 copies the latest version of the source\n object.
Specifies the source object for the copy operation. You specify the value in one of two\n formats, depending on whether you want to access the source object through an access point:
\nFor objects not accessed through an access point, specify the name of the source bucket\n and key of the source object, separated by a slash (/). For example, to copy the\n object reports/january.pdf
from the bucket\n awsexamplebucket
, use awsexamplebucket/reports/january.pdf
.\n The value must be URL-encoded.
For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:
. For example, to copy the object reports/january.pdf
through access point my-access-point
owned by account 123456789012
in Region us-west-2
, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf
. The value must be URL encoded.
Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.
\nAccess points are not supported by directory buckets.
\nAlternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:
. For example, to copy the object reports/january.pdf
through outpost my-outpost
owned by account 123456789012
in Region us-west-2
, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf
. The value must be URL-encoded.
If your bucket has versioning enabled, you could have multiple versions of the\n same object. By default, x-amz-copy-source
identifies the current\n version of the source object to copy. \n To copy a specific version of the source object to copy, append ?versionId=
\n to the x-amz-copy-source
request header (for example, \n x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893
).\n
If the current version is a delete marker and you\n don't specify a versionId in the x-amz-copy-source
request header, Amazon S3 returns a\n 404 Not Found
error, because the object does not exist. If you specify versionId in the\n x-amz-copy-source
and the versionId is a delete marker, Amazon S3\n returns an HTTP 400 Bad Request
error, because you are not allowed to specify a delete marker\n as a version for the x-amz-copy-source
.
\n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets.
\nCopies the object if its entity tag (ETag) matches the specified tag.
", + "smithy.api#documentation": "Copies the object if its entity tag (ETag) matches the specified tag.
\nIf both of the\n x-amz-copy-source-if-match
and\n x-amz-copy-source-if-unmodified-since
headers are present in the\n request as follows:
\n x-amz-copy-source-if-match
condition evaluates to true
,\n and;
\n x-amz-copy-source-if-unmodified-since
condition evaluates to\n false
;
Amazon S3 returns 200 OK
and copies the data.\n
Copies the object if it has been modified since the specified time.
", + "smithy.api#documentation": "Copies the object if it has been modified since the specified time.
\nIf both of the\n x-amz-copy-source-if-none-match
and\n x-amz-copy-source-if-modified-since
headers are present in the\n request as follows:
\n x-amz-copy-source-if-none-match
condition evaluates to\n false
, and;
\n x-amz-copy-source-if-modified-since
condition evaluates to\n true
;
Amazon S3 returns 412 Precondition Failed
response code.\n
Copies the object if its entity tag (ETag) is different than the specified ETag.
", + "smithy.api#documentation": "Copies the object if its entity tag (ETag) is different than the specified ETag.
\nIf both of the\n x-amz-copy-source-if-none-match
and\n x-amz-copy-source-if-modified-since
headers are present in the\n request as follows:
\n x-amz-copy-source-if-none-match
condition evaluates to\n false
, and;
\n x-amz-copy-source-if-modified-since
condition evaluates to\n true
;
Amazon S3 returns 412 Precondition Failed
response code.\n
Copies the object if it hasn't been modified since the specified time.
", + "smithy.api#documentation": "Copies the object if it hasn't been modified since the specified time.
\nIf both of the\n x-amz-copy-source-if-match
and\n x-amz-copy-source-if-unmodified-since
headers are present in the\n request as follows:
\n x-amz-copy-source-if-match
condition evaluates to true
,\n and;
\n x-amz-copy-source-if-unmodified-since
condition evaluates to\n false
;
Amazon S3 returns 200 OK
and copies the data.\n
Specifies the algorithm to use to when encrypting the object (for example,\n AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when encrypting the object (for example,\n AES256).
\nThis functionality is not supported when the destination bucket is a directory bucket.
\nSpecifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header. This must be the\n same encryption key specified in the initiate multipart upload request.
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm
header. This must be the\n same encryption key specified in the initiate multipart upload request.
This functionality is not supported when the destination bucket is a directory bucket.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nThis functionality is not supported when the destination bucket is a directory bucket.
\nSpecifies the algorithm to use when decrypting the source object (for example,\n AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when decrypting the source object (for example,\n AES256
).
This functionality is not supported when the source object is in a directory bucket.
\nSpecifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be one that was used when the\n source object was created.
", + "smithy.api#documentation": "Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be one that was used when the\n source object was created.
\nThis functionality is not supported when the source object is in a directory bucket.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nThis functionality is not supported when the source object is in a directory bucket.
\nThe account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
The server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256
, aws:kms
).
The server-side encryption algorithm used when you store this object in Amazon S3 (for example,\n AES256
, aws:kms
).
For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256
) is supported.
The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-crc32" } }, "ChecksumCRC32C": { "target": "com.amazonaws.s3#ChecksumCRC32C", "traits": { - "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-crc32c" } }, "ChecksumSHA1": { "target": "com.amazonaws.s3#ChecksumSHA1", "traits": { - "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-sha1" } }, "ChecksumSHA256": { "target": "com.amazonaws.s3#ChecksumSHA256", "traits": { - "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", + "smithy.api#documentation": "The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.
", "smithy.api#httpHeader": "x-amz-checksum-sha256" } }, "SSECustomerAlgorithm": { "target": "com.amazonaws.s3#SSECustomerAlgorithm", "traits": { - "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header confirming the encryption algorithm used.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.
\nThis functionality is not supported for directory buckets.
\nIf server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide round-trip message integrity verification of\n the customer-provided encryption key.
", + "smithy.api#documentation": "If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification of\n the customer-provided encryption key.
\nThis functionality is not supported for directory buckets.
\nIf present, specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n was used for the object.
", + "smithy.api#documentation": "If present, indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key\n that was used for the object.
\nThis functionality is not supported for directory buckets.
\nIndicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
", + "smithy.api#documentation": "Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).
\nThis functionality is not supported for directory buckets.
\nThe name of the bucket to which the multipart upload was initiated.
\nWhen using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nWhen you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The name of the bucket to which the multipart upload was initiated.
\n\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket_name.s3express-az_id.region.amazonaws.com
. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format \n bucket_base_name--az-id--x-s3
(for example, \n DOC-EXAMPLE-BUCKET--usw2-az2--x-s3
). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.
\n Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
\nAccess points and Object Lambda access points are not supported by directory buckets.
\n\n S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.
The base64-encoded 128-bit MD5 digest of the part data. This parameter is auto-populated\n when using the command from the CLI. This parameter is required if object lock parameters\n are specified.
", + "smithy.api#documentation": "The base64-encoded 128-bit MD5 digest of the part data. This parameter is auto-populated\n when using the command from the CLI. This parameter is required if object lock parameters\n are specified.
\nThis functionality is not supported for directory buckets.
\nIndicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
This checksum algorithm must be the same for all parts and it match the checksum value\n supplied in the CreateMultipartUpload
request.
Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum
or\n x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm
parameter.
This checksum algorithm must be the same for all parts and it match the checksum value\n supplied in the CreateMultipartUpload
request.
Specifies the algorithm to use to when encrypting the object (for example,\n AES256).
", + "smithy.api#documentation": "Specifies the algorithm to use when encrypting the object (for example,\n AES256).
\nThis functionality is not supported for directory buckets.
\nSpecifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm header
. This must be the\n same encryption key specified in the initiate multipart upload request.
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm header
. This must be the\n same encryption key specified in the initiate multipart upload request.
This functionality is not supported for directory buckets.
\nSpecifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
", + "smithy.api#documentation": "Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.
\nThis functionality is not supported for directory buckets.
\nThe account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden
(access denied).
Passes transformed objects to a GetObject
operation when using Object Lambda access points. For\n information about Object Lambda access points, see Transforming objects with\n Object Lambda access points in the Amazon S3 User Guide.
This operation supports metadata that can be returned by GetObject, in addition to\n RequestRoute
, RequestToken
, StatusCode
,\n ErrorCode
, and ErrorMessage
. The GetObject
\n response metadata is supported so that the WriteGetObjectResponse
caller,\n typically an Lambda function, can provide the same metadata when it internally invokes\n GetObject
. When WriteGetObjectResponse
is called by a\n customer-owned Lambda function, the metadata returned to the end user\n GetObject
call might differ from what Amazon S3 would normally return.
You can include any number of metadata headers. When including a metadata header, it\n should be prefaced with x-amz-meta
. For example,\n x-amz-meta-my-custom-header: MyCustomValue
. The primary use case for this\n is to forward GetObject
metadata.
Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to\n detect and redact personally identifiable information (PII) and decompress S3 objects.\n These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and\n can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.
\nExample 1: PII Access Control - This Lambda function uses Amazon Comprehend, a\n natural language processing (NLP) service using machine learning to find insights and\n relationships in text. It automatically detects personally identifiable information (PII)\n such as names, addresses, dates, credit card numbers, and social security numbers from\n documents in your Amazon S3 bucket.
\nExample 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural\n language processing (NLP) service using machine learning to find insights and relationships\n in text. It automatically redacts personally identifiable information (PII) such as names,\n addresses, dates, credit card numbers, and social security numbers from documents in your\n Amazon S3 bucket.
\nExample 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is\n equipped to decompress objects stored in S3 in one of six compressed file formats including\n bzip2, gzip, snappy, zlib, zstandard and ZIP.
\nFor information on how to view and use these functions, see Using Amazon Web Services built Lambda\n functions in the Amazon S3 User Guide.
", + "smithy.api#documentation": "This operation is not supported by directory buckets.
\nPasses transformed objects to a GetObject
operation when using Object Lambda access points. For\n information about Object Lambda access points, see Transforming objects with\n Object Lambda access points in the Amazon S3 User Guide.
This operation supports metadata that can be returned by GetObject, in addition to\n RequestRoute
, RequestToken
, StatusCode
,\n ErrorCode
, and ErrorMessage
. The GetObject
\n response metadata is supported so that the WriteGetObjectResponse
caller,\n typically an Lambda function, can provide the same metadata when it internally invokes\n GetObject
. When WriteGetObjectResponse
is called by a\n customer-owned Lambda function, the metadata returned to the end user\n GetObject
call might differ from what Amazon S3 would normally return.
You can include any number of metadata headers. When including a metadata header, it\n should be prefaced with x-amz-meta
. For example,\n x-amz-meta-my-custom-header: MyCustomValue
. The primary use case for this\n is to forward GetObject
metadata.
Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to\n detect and redact personally identifiable information (PII) and decompress S3 objects.\n These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and\n can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.
\nExample 1: PII Access Control - This Lambda function uses Amazon Comprehend, a\n natural language processing (NLP) service using machine learning to find insights and\n relationships in text. It automatically detects personally identifiable information (PII)\n such as names, addresses, dates, credit card numbers, and social security numbers from\n documents in your Amazon S3 bucket.
\nExample 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural\n language processing (NLP) service using machine learning to find insights and relationships\n in text. It automatically redacts personally identifiable information (PII) such as names,\n addresses, dates, credit card numbers, and social security numbers from documents in your\n Amazon S3 bucket.
\nExample 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is\n equipped to decompress objects stored in S3 in one of six compressed file formats including\n bzip2, gzip, snappy, zlib, zstandard and ZIP.
\nFor information on how to view and use these functions, see Using Amazon Web Services built Lambda\n functions in the Amazon S3 User Guide.
", "smithy.api#endpoint": { "hostPrefix": "{RequestRoute}." }, diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsGoDependency.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsGoDependency.java index 2c042eced55..d5c7b414a4e 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsGoDependency.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsGoDependency.java @@ -44,6 +44,7 @@ public class AwsGoDependency { public static final GoDependency INTERNAL_ENDPOINTS = aws("internal/endpoints"); public static final GoDependency INTERNAL_AUTH = aws("internal/auth", "internalauth"); public static final GoDependency INTERNAL_AUTH_SMITHY = aws("internal/auth/smithy", "internalauthsmithy"); + public static final GoDependency INTERNAL_CONTEXT = aws("internal/context", "internalcontext"); public static final GoDependency INTERNAL_ENDPOINTS_V2 = awsModuleDep("internal/endpoints/v2", null, Versions.INTERNAL_ENDPOINTS_V2, "endpoints"); diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsHttpPresignURLClientGenerator.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsHttpPresignURLClientGenerator.java index 9d7d02e7fb5..1d9589a98bf 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsHttpPresignURLClientGenerator.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsHttpPresignURLClientGenerator.java @@ -433,9 +433,8 @@ private void writeConvertToPresignMiddleware( if (isS3ServiceShape(model, serviceShape)) { writer.write(""); - writer.write("// add multi-region access point presigner"); + writer.write("// extended s3 presigning"); - // ==== multi-region access point support Symbol PresignConstructor = SymbolUtils.createValueSymbolBuilder( "NewPresignHTTPRequestMiddleware", AwsCustomGoDependency.S3_CUSTOMIZATION ).build(); @@ -451,6 +450,7 @@ private void writeConvertToPresignMiddleware( writer.openBlock("signermv := $T($T{", "})", PresignConstructor, PresignOptions, () -> { writer.write("CredentialsProvider : options.Credentials,"); + writer.write("ExpressCredentials : options.ExpressCredentials,"); writer.write("V4Presigner : c.Presigner,"); writer.write("V4aPresigner : c.presignerV4a,"); writer.write("LogSigning : options.ClientLogMode.IsSigning(),"); @@ -460,8 +460,6 @@ private void writeConvertToPresignMiddleware( writer.write("if err != nil { return err }"); writer.write(""); - // ======= - writer.openBlock("if c.Expires < 0 {", "}", () -> { writer.addUseImports(SmithyGoDependency.FMT); writer.write( @@ -753,7 +751,7 @@ private GoWriter.Writable generateBody() { schemeID := rscheme.Scheme.SchemeID() $setSignerVersion:W - if schemeID == "aws.auth#sigv4" { + if schemeID == "aws.auth#sigv4" || schemeID == "com.amazonaws.s3#sigv4express" { if sn, ok := smithyhttp.GetSigV4SigningName(&rscheme.SignerProperties); ok { ctx = $ctxSetName:T(ctx, sn) } diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/ResolveClientConfigFromSources.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/ResolveClientConfigFromSources.java index e217cb469f5..ac95defcdab 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/ResolveClientConfigFromSources.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/ResolveClientConfigFromSources.java @@ -66,6 +66,14 @@ public class ResolveClientConfigFromSources implements GoIntegration { .awsResolveFunction(SymbolUtils.createValueSymbolBuilder(DISABLE_MRAP_CONFIG_RESOLVER) .build()) .build(), + AddAwsConfigFields.AwsConfigField.builder() + .name("DisableExpressAuth") + .type(getUniversalSymbol("*bool")) + .generatedOnClient(false) + .servicePredicate(ResolveClientConfigFromSources::isS3Service) + .awsResolveFunction(SymbolUtils.createValueSymbolBuilder("resolveDisableExpressAuth") + .build()) + .build(), AddAwsConfigFields.AwsConfigField.builder() .name(ENDPOINT_DISCOVERY_OPTION) .type(ENDPOINT_DISCOVERY_OPTION_TYPE) diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/SdkGoTypes.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/SdkGoTypes.java index 5ac6fe610e6..9ef37ee873c 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/SdkGoTypes.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/SdkGoTypes.java @@ -57,6 +57,10 @@ public static final class Smithy { } } + public static final class Context { + public static final Symbol SetS3Backend = AwsGoDependency.INTERNAL_CONTEXT.valueSymbol("SetS3Backend"); + } + public static final class Endpoints { public static final Symbol MapFIPSRegion = AwsGoDependency.INTERNAL_ENDPOINTS.valueSymbol("MapFIPSRegion"); } @@ -73,6 +77,10 @@ public static final class V4A { public static final class ServiceCustomizations { public static final class S3 { public static final Symbol SetSignerVersion = AwsCustomGoDependency.S3_CUSTOMIZATION.valueSymbol("SetSignerVersion"); + public static final Symbol ExpressIdentityResolver = AwsCustomGoDependency.S3_CUSTOMIZATION.valueSymbol("ExpressIdentityResolver"); + public static final Symbol ExpressSigner = AwsCustomGoDependency.S3_CUSTOMIZATION.valueSymbol("ExpressSigner"); + public static final Symbol GetPropertiesBackend = AwsCustomGoDependency.S3_CUSTOMIZATION.valueSymbol("GetPropertiesBackend"); + public static final Symbol AddExpressDefaultChecksumMiddleware = AwsCustomGoDependency.S3_CUSTOMIZATION.valueSymbol("AddExpressDefaultChecksumMiddleware"); } public static final class S3Control { diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/S3BucketContext.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/S3BucketContext.java new file mode 100644 index 00000000000..380b485875d --- /dev/null +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/S3BucketContext.java @@ -0,0 +1,29 @@ +package software.amazon.smithy.aws.go.codegen.customization; + +import software.amazon.smithy.go.codegen.SymbolUtils; +import software.amazon.smithy.go.codegen.integration.GoIntegration; +import software.amazon.smithy.go.codegen.integration.MiddlewareRegistrar; +import software.amazon.smithy.go.codegen.integration.RuntimeClientPlugin; +import software.amazon.smithy.utils.ListUtils; + +import java.util.List; + +/** + * Adds the input bucket name to the context for S3 operations, which is required for a variety of custom S3 behaviors. + */ +public class S3BucketContext implements GoIntegration { + private final MiddlewareRegistrar putBucketContextMiddleware = + MiddlewareRegistrar.builder() + .resolvedFunction(SymbolUtils.createValueSymbolBuilder("addPutBucketContextMiddleware").build()) + .build(); + + @Override + public List