@aws-sdk/client-s3
Version:
AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native
970 lines • 404 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.se_GetObjectTorrentCommand = exports.se_GetObjectTaggingCommand = exports.se_GetObjectRetentionCommand = exports.se_GetObjectLockConfigurationCommand = exports.se_GetObjectLegalHoldCommand = exports.se_GetObjectAttributesCommand = exports.se_GetObjectAclCommand = exports.se_GetObjectCommand = exports.se_GetBucketWebsiteCommand = exports.se_GetBucketVersioningCommand = exports.se_GetBucketTaggingCommand = exports.se_GetBucketRequestPaymentCommand = exports.se_GetBucketReplicationCommand = exports.se_GetBucketPolicyStatusCommand = exports.se_GetBucketPolicyCommand = exports.se_GetBucketOwnershipControlsCommand = exports.se_GetBucketNotificationConfigurationCommand = exports.se_GetBucketMetricsConfigurationCommand = exports.se_GetBucketLoggingCommand = exports.se_GetBucketLocationCommand = exports.se_GetBucketLifecycleConfigurationCommand = exports.se_GetBucketInventoryConfigurationCommand = exports.se_GetBucketIntelligentTieringConfigurationCommand = exports.se_GetBucketEncryptionCommand = exports.se_GetBucketCorsCommand = exports.se_GetBucketAnalyticsConfigurationCommand = exports.se_GetBucketAclCommand = exports.se_GetBucketAccelerateConfigurationCommand = exports.se_DeletePublicAccessBlockCommand = exports.se_DeleteObjectTaggingCommand = exports.se_DeleteObjectsCommand = exports.se_DeleteObjectCommand = exports.se_DeleteBucketWebsiteCommand = exports.se_DeleteBucketTaggingCommand = exports.se_DeleteBucketReplicationCommand = exports.se_DeleteBucketPolicyCommand = exports.se_DeleteBucketOwnershipControlsCommand = exports.se_DeleteBucketMetricsConfigurationCommand = exports.se_DeleteBucketLifecycleCommand = exports.se_DeleteBucketInventoryConfigurationCommand = exports.se_DeleteBucketIntelligentTieringConfigurationCommand = exports.se_DeleteBucketEncryptionCommand = exports.se_DeleteBucketCorsCommand = exports.se_DeleteBucketAnalyticsConfigurationCommand = exports.se_DeleteBucketCommand = exports.se_CreateMultipartUploadCommand = exports.se_CreateBucketCommand = exports.se_CopyObjectCommand = exports.se_CompleteMultipartUploadCommand = exports.se_AbortMultipartUploadCommand = void 0;
exports.de_DeleteBucketAnalyticsConfigurationCommand = exports.de_DeleteBucketCommand = exports.de_CreateMultipartUploadCommand = exports.de_CreateBucketCommand = exports.de_CopyObjectCommand = exports.de_CompleteMultipartUploadCommand = exports.de_AbortMultipartUploadCommand = exports.se_WriteGetObjectResponseCommand = exports.se_UploadPartCopyCommand = exports.se_UploadPartCommand = exports.se_SelectObjectContentCommand = exports.se_RestoreObjectCommand = exports.se_PutPublicAccessBlockCommand = exports.se_PutObjectTaggingCommand = exports.se_PutObjectRetentionCommand = exports.se_PutObjectLockConfigurationCommand = exports.se_PutObjectLegalHoldCommand = exports.se_PutObjectAclCommand = exports.se_PutObjectCommand = exports.se_PutBucketWebsiteCommand = exports.se_PutBucketVersioningCommand = exports.se_PutBucketTaggingCommand = exports.se_PutBucketRequestPaymentCommand = exports.se_PutBucketReplicationCommand = exports.se_PutBucketPolicyCommand = exports.se_PutBucketOwnershipControlsCommand = exports.se_PutBucketNotificationConfigurationCommand = exports.se_PutBucketMetricsConfigurationCommand = exports.se_PutBucketLoggingCommand = exports.se_PutBucketLifecycleConfigurationCommand = exports.se_PutBucketInventoryConfigurationCommand = exports.se_PutBucketIntelligentTieringConfigurationCommand = exports.se_PutBucketEncryptionCommand = exports.se_PutBucketCorsCommand = exports.se_PutBucketAnalyticsConfigurationCommand = exports.se_PutBucketAclCommand = exports.se_PutBucketAccelerateConfigurationCommand = exports.se_ListPartsCommand = exports.se_ListObjectVersionsCommand = exports.se_ListObjectsV2Command = exports.se_ListObjectsCommand = exports.se_ListMultipartUploadsCommand = exports.se_ListBucketsCommand = exports.se_ListBucketMetricsConfigurationsCommand = exports.se_ListBucketInventoryConfigurationsCommand = exports.se_ListBucketIntelligentTieringConfigurationsCommand = exports.se_ListBucketAnalyticsConfigurationsCommand = exports.se_HeadObjectCommand = exports.se_HeadBucketCommand = exports.se_GetPublicAccessBlockCommand = void 0;
exports.de_ListBucketMetricsConfigurationsCommand = exports.de_ListBucketInventoryConfigurationsCommand = exports.de_ListBucketIntelligentTieringConfigurationsCommand = exports.de_ListBucketAnalyticsConfigurationsCommand = exports.de_HeadObjectCommand = exports.de_HeadBucketCommand = exports.de_GetPublicAccessBlockCommand = exports.de_GetObjectTorrentCommand = exports.de_GetObjectTaggingCommand = exports.de_GetObjectRetentionCommand = exports.de_GetObjectLockConfigurationCommand = exports.de_GetObjectLegalHoldCommand = exports.de_GetObjectAttributesCommand = exports.de_GetObjectAclCommand = exports.de_GetObjectCommand = exports.de_GetBucketWebsiteCommand = exports.de_GetBucketVersioningCommand = exports.de_GetBucketTaggingCommand = exports.de_GetBucketRequestPaymentCommand = exports.de_GetBucketReplicationCommand = exports.de_GetBucketPolicyStatusCommand = exports.de_GetBucketPolicyCommand = exports.de_GetBucketOwnershipControlsCommand = exports.de_GetBucketNotificationConfigurationCommand = exports.de_GetBucketMetricsConfigurationCommand = exports.de_GetBucketLoggingCommand = exports.de_GetBucketLocationCommand = exports.de_GetBucketLifecycleConfigurationCommand = exports.de_GetBucketInventoryConfigurationCommand = exports.de_GetBucketIntelligentTieringConfigurationCommand = exports.de_GetBucketEncryptionCommand = exports.de_GetBucketCorsCommand = exports.de_GetBucketAnalyticsConfigurationCommand = exports.de_GetBucketAclCommand = exports.de_GetBucketAccelerateConfigurationCommand = exports.de_DeletePublicAccessBlockCommand = exports.de_DeleteObjectTaggingCommand = exports.de_DeleteObjectsCommand = exports.de_DeleteObjectCommand = exports.de_DeleteBucketWebsiteCommand = exports.de_DeleteBucketTaggingCommand = exports.de_DeleteBucketReplicationCommand = exports.de_DeleteBucketPolicyCommand = exports.de_DeleteBucketOwnershipControlsCommand = exports.de_DeleteBucketMetricsConfigurationCommand = exports.de_DeleteBucketLifecycleCommand = exports.de_DeleteBucketInventoryConfigurationCommand = exports.de_DeleteBucketIntelligentTieringConfigurationCommand = exports.de_DeleteBucketEncryptionCommand = exports.de_DeleteBucketCorsCommand = void 0;
exports.de_WriteGetObjectResponseCommand = exports.de_UploadPartCopyCommand = exports.de_UploadPartCommand = exports.de_SelectObjectContentCommand = exports.de_RestoreObjectCommand = exports.de_PutPublicAccessBlockCommand = exports.de_PutObjectTaggingCommand = exports.de_PutObjectRetentionCommand = exports.de_PutObjectLockConfigurationCommand = exports.de_PutObjectLegalHoldCommand = exports.de_PutObjectAclCommand = exports.de_PutObjectCommand = exports.de_PutBucketWebsiteCommand = exports.de_PutBucketVersioningCommand = exports.de_PutBucketTaggingCommand = exports.de_PutBucketRequestPaymentCommand = exports.de_PutBucketReplicationCommand = exports.de_PutBucketPolicyCommand = exports.de_PutBucketOwnershipControlsCommand = exports.de_PutBucketNotificationConfigurationCommand = exports.de_PutBucketMetricsConfigurationCommand = exports.de_PutBucketLoggingCommand = exports.de_PutBucketLifecycleConfigurationCommand = exports.de_PutBucketInventoryConfigurationCommand = exports.de_PutBucketIntelligentTieringConfigurationCommand = exports.de_PutBucketEncryptionCommand = exports.de_PutBucketCorsCommand = exports.de_PutBucketAnalyticsConfigurationCommand = exports.de_PutBucketAclCommand = exports.de_PutBucketAccelerateConfigurationCommand = exports.de_ListPartsCommand = exports.de_ListObjectVersionsCommand = exports.de_ListObjectsV2Command = exports.de_ListObjectsCommand = exports.de_ListMultipartUploadsCommand = exports.de_ListBucketsCommand = void 0;
const protocol_http_1 = require("@aws-sdk/protocol-http");
const smithy_client_1 = require("@aws-sdk/smithy-client");
const xml_builder_1 = require("@aws-sdk/xml-builder");
const fast_xml_parser_1 = require("fast-xml-parser");
const models_0_1 = require("../models/models_0");
const models_1_1 = require("../models/models_1");
const S3ServiceException_1 = require("../models/S3ServiceException");
const se_AbortMultipartUploadCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-request-payer": input.RequestPayer,
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/{Key+}";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true);
const query = (0, smithy_client_1.map)({
"x-id": [, "AbortMultipartUpload"],
uploadId: [, (0, smithy_client_1.expectNonNull)(input.UploadId, `UploadId`)],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_AbortMultipartUploadCommand = se_AbortMultipartUploadCommand;
const se_CompleteMultipartUploadCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"content-type": "application/xml",
"x-amz-checksum-crc32": input.ChecksumCRC32,
"x-amz-checksum-crc32c": input.ChecksumCRC32C,
"x-amz-checksum-sha1": input.ChecksumSHA1,
"x-amz-checksum-sha256": input.ChecksumSHA256,
"x-amz-request-payer": input.RequestPayer,
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
"x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm,
"x-amz-server-side-encryption-customer-key": input.SSECustomerKey,
"x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/{Key+}";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true);
const query = (0, smithy_client_1.map)({
"x-id": [, "CompleteMultipartUpload"],
uploadId: [, (0, smithy_client_1.expectNonNull)(input.UploadId, `UploadId`)],
});
let body;
if (input.MultipartUpload !== undefined) {
body = se_CompletedMultipartUpload(input.MultipartUpload, context);
}
let contents;
if (input.MultipartUpload !== undefined) {
contents = se_CompletedMultipartUpload(input.MultipartUpload, context);
contents = contents.withName("CompleteMultipartUpload");
body = '<?xml version="1.0" encoding="UTF-8"?>';
contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "POST",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_CompleteMultipartUploadCommand = se_CompleteMultipartUploadCommand;
const se_CopyObjectCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-acl": input.ACL,
"cache-control": input.CacheControl,
"x-amz-checksum-algorithm": input.ChecksumAlgorithm,
"content-disposition": input.ContentDisposition,
"content-encoding": input.ContentEncoding,
"content-language": input.ContentLanguage,
"content-type": input.ContentType,
"x-amz-copy-source": input.CopySource,
"x-amz-copy-source-if-match": input.CopySourceIfMatch,
"x-amz-copy-source-if-modified-since": [
() => isSerializableHeaderValue(input.CopySourceIfModifiedSince),
() => (0, smithy_client_1.dateToUtcString)(input.CopySourceIfModifiedSince).toString(),
],
"x-amz-copy-source-if-none-match": input.CopySourceIfNoneMatch,
"x-amz-copy-source-if-unmodified-since": [
() => isSerializableHeaderValue(input.CopySourceIfUnmodifiedSince),
() => (0, smithy_client_1.dateToUtcString)(input.CopySourceIfUnmodifiedSince).toString(),
],
expires: [() => isSerializableHeaderValue(input.Expires), () => (0, smithy_client_1.dateToUtcString)(input.Expires).toString()],
"x-amz-grant-full-control": input.GrantFullControl,
"x-amz-grant-read": input.GrantRead,
"x-amz-grant-read-acp": input.GrantReadACP,
"x-amz-grant-write-acp": input.GrantWriteACP,
"x-amz-metadata-directive": input.MetadataDirective,
"x-amz-tagging-directive": input.TaggingDirective,
"x-amz-server-side-encryption": input.ServerSideEncryption,
"x-amz-storage-class": input.StorageClass,
"x-amz-website-redirect-location": input.WebsiteRedirectLocation,
"x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm,
"x-amz-server-side-encryption-customer-key": input.SSECustomerKey,
"x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5,
"x-amz-server-side-encryption-aws-kms-key-id": input.SSEKMSKeyId,
"x-amz-server-side-encryption-context": input.SSEKMSEncryptionContext,
"x-amz-server-side-encryption-bucket-key-enabled": [
() => isSerializableHeaderValue(input.BucketKeyEnabled),
() => input.BucketKeyEnabled.toString(),
],
"x-amz-copy-source-server-side-encryption-customer-algorithm": input.CopySourceSSECustomerAlgorithm,
"x-amz-copy-source-server-side-encryption-customer-key": input.CopySourceSSECustomerKey,
"x-amz-copy-source-server-side-encryption-customer-key-md5": input.CopySourceSSECustomerKeyMD5,
"x-amz-request-payer": input.RequestPayer,
"x-amz-tagging": input.Tagging,
"x-amz-object-lock-mode": input.ObjectLockMode,
"x-amz-object-lock-retain-until-date": [
() => isSerializableHeaderValue(input.ObjectLockRetainUntilDate),
() => (input.ObjectLockRetainUntilDate.toISOString().split(".")[0] + "Z").toString(),
],
"x-amz-object-lock-legal-hold": input.ObjectLockLegalHoldStatus,
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
"x-amz-source-expected-bucket-owner": input.ExpectedSourceBucketOwner,
...(input.Metadata !== undefined &&
Object.keys(input.Metadata).reduce((acc, suffix) => {
acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
return acc;
}, {})),
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/{Key+}";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true);
const query = (0, smithy_client_1.map)({
"x-id": [, "CopyObject"],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "PUT",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_CopyObjectCommand = se_CopyObjectCommand;
const se_CreateBucketCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"content-type": "application/xml",
"x-amz-acl": input.ACL,
"x-amz-grant-full-control": input.GrantFullControl,
"x-amz-grant-read": input.GrantRead,
"x-amz-grant-read-acp": input.GrantReadACP,
"x-amz-grant-write": input.GrantWrite,
"x-amz-grant-write-acp": input.GrantWriteACP,
"x-amz-bucket-object-lock-enabled": [
() => isSerializableHeaderValue(input.ObjectLockEnabledForBucket),
() => input.ObjectLockEnabledForBucket.toString(),
],
"x-amz-object-ownership": input.ObjectOwnership,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
let body;
if (input.CreateBucketConfiguration !== undefined) {
body = se_CreateBucketConfiguration(input.CreateBucketConfiguration, context);
}
let contents;
if (input.CreateBucketConfiguration !== undefined) {
contents = se_CreateBucketConfiguration(input.CreateBucketConfiguration, context);
body = '<?xml version="1.0" encoding="UTF-8"?>';
contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "PUT",
headers,
path: resolvedPath,
body,
});
};
exports.se_CreateBucketCommand = se_CreateBucketCommand;
const se_CreateMultipartUploadCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-acl": input.ACL,
"cache-control": input.CacheControl,
"content-disposition": input.ContentDisposition,
"content-encoding": input.ContentEncoding,
"content-language": input.ContentLanguage,
"content-type": input.ContentType,
expires: [() => isSerializableHeaderValue(input.Expires), () => (0, smithy_client_1.dateToUtcString)(input.Expires).toString()],
"x-amz-grant-full-control": input.GrantFullControl,
"x-amz-grant-read": input.GrantRead,
"x-amz-grant-read-acp": input.GrantReadACP,
"x-amz-grant-write-acp": input.GrantWriteACP,
"x-amz-server-side-encryption": input.ServerSideEncryption,
"x-amz-storage-class": input.StorageClass,
"x-amz-website-redirect-location": input.WebsiteRedirectLocation,
"x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm,
"x-amz-server-side-encryption-customer-key": input.SSECustomerKey,
"x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5,
"x-amz-server-side-encryption-aws-kms-key-id": input.SSEKMSKeyId,
"x-amz-server-side-encryption-context": input.SSEKMSEncryptionContext,
"x-amz-server-side-encryption-bucket-key-enabled": [
() => isSerializableHeaderValue(input.BucketKeyEnabled),
() => input.BucketKeyEnabled.toString(),
],
"x-amz-request-payer": input.RequestPayer,
"x-amz-tagging": input.Tagging,
"x-amz-object-lock-mode": input.ObjectLockMode,
"x-amz-object-lock-retain-until-date": [
() => isSerializableHeaderValue(input.ObjectLockRetainUntilDate),
() => (input.ObjectLockRetainUntilDate.toISOString().split(".")[0] + "Z").toString(),
],
"x-amz-object-lock-legal-hold": input.ObjectLockLegalHoldStatus,
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
"x-amz-checksum-algorithm": input.ChecksumAlgorithm,
...(input.Metadata !== undefined &&
Object.keys(input.Metadata).reduce((acc, suffix) => {
acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
return acc;
}, {})),
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/{Key+}";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true);
const query = (0, smithy_client_1.map)({
uploads: [, ""],
"x-id": [, "CreateMultipartUpload"],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "POST",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_CreateMultipartUploadCommand = se_CreateMultipartUploadCommand;
const se_DeleteBucketCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
body,
});
};
exports.se_DeleteBucketCommand = se_DeleteBucketCommand;
const se_DeleteBucketAnalyticsConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
analytics: [, ""],
id: [, (0, smithy_client_1.expectNonNull)(input.Id, `Id`)],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketAnalyticsConfigurationCommand = se_DeleteBucketAnalyticsConfigurationCommand;
const se_DeleteBucketCorsCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
cors: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketCorsCommand = se_DeleteBucketCorsCommand;
const se_DeleteBucketEncryptionCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
encryption: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketEncryptionCommand = se_DeleteBucketEncryptionCommand;
const se_DeleteBucketIntelligentTieringConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = {};
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
"intelligent-tiering": [, ""],
id: [, (0, smithy_client_1.expectNonNull)(input.Id, `Id`)],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketIntelligentTieringConfigurationCommand = se_DeleteBucketIntelligentTieringConfigurationCommand;
const se_DeleteBucketInventoryConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
inventory: [, ""],
id: [, (0, smithy_client_1.expectNonNull)(input.Id, `Id`)],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketInventoryConfigurationCommand = se_DeleteBucketInventoryConfigurationCommand;
const se_DeleteBucketLifecycleCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
lifecycle: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketLifecycleCommand = se_DeleteBucketLifecycleCommand;
const se_DeleteBucketMetricsConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
metrics: [, ""],
id: [, (0, smithy_client_1.expectNonNull)(input.Id, `Id`)],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketMetricsConfigurationCommand = se_DeleteBucketMetricsConfigurationCommand;
const se_DeleteBucketOwnershipControlsCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
ownershipControls: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketOwnershipControlsCommand = se_DeleteBucketOwnershipControlsCommand;
const se_DeleteBucketPolicyCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
policy: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketPolicyCommand = se_DeleteBucketPolicyCommand;
const se_DeleteBucketReplicationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
replication: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketReplicationCommand = se_DeleteBucketReplicationCommand;
const se_DeleteBucketTaggingCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
tagging: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketTaggingCommand = se_DeleteBucketTaggingCommand;
const se_DeleteBucketWebsiteCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
website: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteBucketWebsiteCommand = se_DeleteBucketWebsiteCommand;
const se_DeleteObjectCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-mfa": input.MFA,
"x-amz-request-payer": input.RequestPayer,
"x-amz-bypass-governance-retention": [
() => isSerializableHeaderValue(input.BypassGovernanceRetention),
() => input.BypassGovernanceRetention.toString(),
],
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/{Key+}";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true);
const query = (0, smithy_client_1.map)({
"x-id": [, "DeleteObject"],
versionId: [, input.VersionId],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteObjectCommand = se_DeleteObjectCommand;
const se_DeleteObjectsCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"content-type": "application/xml",
"x-amz-mfa": input.MFA,
"x-amz-request-payer": input.RequestPayer,
"x-amz-bypass-governance-retention": [
() => isSerializableHeaderValue(input.BypassGovernanceRetention),
() => input.BypassGovernanceRetention.toString(),
],
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
"x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
delete: [, ""],
"x-id": [, "DeleteObjects"],
});
let body;
if (input.Delete !== undefined) {
body = se_Delete(input.Delete, context);
}
let contents;
if (input.Delete !== undefined) {
contents = se_Delete(input.Delete, context);
body = '<?xml version="1.0" encoding="UTF-8"?>';
contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "POST",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteObjectsCommand = se_DeleteObjectsCommand;
const se_DeleteObjectTaggingCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/{Key+}";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true);
const query = (0, smithy_client_1.map)({
tagging: [, ""],
versionId: [, input.VersionId],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeleteObjectTaggingCommand = se_DeleteObjectTaggingCommand;
const se_DeletePublicAccessBlockCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
publicAccessBlock: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "DELETE",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_DeletePublicAccessBlockCommand = se_DeletePublicAccessBlockCommand;
const se_GetBucketAccelerateConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
accelerate: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketAccelerateConfigurationCommand = se_GetBucketAccelerateConfigurationCommand;
const se_GetBucketAclCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
acl: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketAclCommand = se_GetBucketAclCommand;
const se_GetBucketAnalyticsConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
analytics: [, ""],
"x-id": [, "GetBucketAnalyticsConfiguration"],
id: [, (0, smithy_client_1.expectNonNull)(input.Id, `Id`)],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketAnalyticsConfigurationCommand = se_GetBucketAnalyticsConfigurationCommand;
const se_GetBucketCorsCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
cors: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketCorsCommand = se_GetBucketCorsCommand;
const se_GetBucketEncryptionCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
encryption: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketEncryptionCommand = se_GetBucketEncryptionCommand;
const se_GetBucketIntelligentTieringConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = {};
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
"intelligent-tiering": [, ""],
"x-id": [, "GetBucketIntelligentTieringConfiguration"],
id: [, (0, smithy_client_1.expectNonNull)(input.Id, `Id`)],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketIntelligentTieringConfigurationCommand = se_GetBucketIntelligentTieringConfigurationCommand;
const se_GetBucketInventoryConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
inventory: [, ""],
"x-id": [, "GetBucketInventoryConfiguration"],
id: [, (0, smithy_client_1.expectNonNull)(input.Id, `Id`)],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketInventoryConfigurationCommand = se_GetBucketInventoryConfigurationCommand;
const se_GetBucketLifecycleConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
lifecycle: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketLifecycleConfigurationCommand = se_GetBucketLifecycleConfigurationCommand;
const se_GetBucketLocationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
location: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketLocationCommand = se_GetBucketLocationCommand;
const se_GetBucketLoggingCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
logging: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketLoggingCommand = se_GetBucketLoggingCommand;
const se_GetBucketMetricsConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
metrics: [, ""],
"x-id": [, "GetBucketMetricsConfiguration"],
id: [, (0, smithy_client_1.expectNonNull)(input.Id, `Id`)],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketMetricsConfigurationCommand = se_GetBucketMetricsConfigurationCommand;
const se_GetBucketNotificationConfigurationCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, smithy_client_1.map)({
notification: [, ""],
});
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.se_GetBucketNotificationConfigurationCommand = se_GetBucketNotificationConfigurationCommand;
const se_GetBucketOwnershipControlsCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
});
let resolvedPath = `${basePath?.endsWith