Base exception class for all service exceptions from Glacier service.
+ * + */ +export class UploadArchiveCommand extends $Command + .classBuilder< + UploadArchiveCommandInput, + UploadArchiveCommandOutput, + GlacierClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .m(function (this: any, Command: any, cs: any, config: GlacierClientResolvedConfig, o: any) { + return [getSerdePlugin(config, this.serialize, this.deserialize)]; + }) + .s("Glacier", "UploadArchive", {}) + .n("GlacierClient", "UploadArchiveCommand") + .f(UploadArchiveInputFilterSensitiveLog, void 0) + .ser(se_UploadArchiveCommand) + .de(de_UploadArchiveCommand) + .build() {} diff --git a/private/aws-protocoltests-restjson-glacier/src/commands/UploadMultipartPartCommand.ts b/private/aws-protocoltests-restjson-glacier/src/commands/UploadMultipartPartCommand.ts new file mode 100644 index 0000000000000..f4e3b7e169a07 --- /dev/null +++ b/private/aws-protocoltests-restjson-glacier/src/commands/UploadMultipartPartCommand.ts @@ -0,0 +1,96 @@ +// smithy-typescript generated code +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer, StreamingBlobPayloadInputTypes } from "@smithy/types"; + +import { GlacierClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlacierClient"; +import { + UploadMultipartPartInput, + UploadMultipartPartInputFilterSensitiveLog, + UploadMultipartPartOutput, +} from "../models/models_0"; +import { de_UploadMultipartPartCommand, se_UploadMultipartPartCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UploadMultipartPartCommand}. + */ +export interface UploadMultipartPartCommandInput extends OmitBase exception class for all service exceptions from Glacier service.
+ * + */ +export class UploadMultipartPartCommand extends $Command + .classBuilder< + UploadMultipartPartCommandInput, + UploadMultipartPartCommandOutput, + GlacierClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .m(function (this: any, Command: any, cs: any, config: GlacierClientResolvedConfig, o: any) { + return [getSerdePlugin(config, this.serialize, this.deserialize)]; + }) + .s("Glacier", "UploadMultipartPart", {}) + .n("GlacierClient", "UploadMultipartPartCommand") + .f(UploadMultipartPartInputFilterSensitiveLog, void 0) + .ser(se_UploadMultipartPartCommand) + .de(de_UploadMultipartPartCommand) + .build() {} diff --git a/private/aws-protocoltests-restjson-glacier/src/commands/index.ts b/private/aws-protocoltests-restjson-glacier/src/commands/index.ts new file mode 100644 index 0000000000000..8221be9b2ac1e --- /dev/null +++ b/private/aws-protocoltests-restjson-glacier/src/commands/index.ts @@ -0,0 +1,3 @@ +// smithy-typescript generated code +export * from "./UploadArchiveCommand"; +export * from "./UploadMultipartPartCommand"; diff --git a/private/aws-protocoltests-restjson-glacier/src/endpoints.ts b/private/aws-protocoltests-restjson-glacier/src/endpoints.ts new file mode 100644 index 0000000000000..0e70fa7e58f9d --- /dev/null +++ b/private/aws-protocoltests-restjson-glacier/src/endpoints.ts @@ -0,0 +1,233 @@ +// smithy-typescript generated code +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; +import { getRegionInfo, PartitionHash, RegionHash } from "@smithy/config-resolver"; + +const regionHash: RegionHash = { + "ca-central-1": { + variants: [ + { + hostname: "glacier-fips.ca-central-1.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-east-1": { + variants: [ + { + hostname: "glacier-fips.us-east-1.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-east-2": { + variants: [ + { + hostname: "glacier-fips.us-east-2.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-gov-east-1": { + variants: [ + { + hostname: "glacier.us-gov-east-1.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-gov-west-1": { + variants: [ + { + hostname: "glacier.us-gov-west-1.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-west-1": { + variants: [ + { + hostname: "glacier-fips.us-west-1.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-west-2": { + variants: [ + { + hostname: "glacier-fips.us-west-2.amazonaws.com", + tags: ["fips"], + }, + ], + }, +}; + +const partitionHash: PartitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-south-2", + "ap-southeast-1", + "ap-southeast-2", + "ap-southeast-3", + "ap-southeast-4", + "ca-central-1", + "ca-west-1", + "eu-central-1", + "eu-central-2", + "eu-north-1", + "eu-south-1", + "eu-south-2", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "fips-ca-central-1", + "fips-us-east-1", + "fips-us-east-2", + "fips-us-west-1", + "fips-us-west-2", + "il-central-1", + "me-central-1", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + regionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "glacier.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "glacier-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "glacier-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "glacier.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + regionRegex: "^cn\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "glacier.{region}.amazonaws.com.cn", + tags: [], + }, + { + hostname: "glacier-fips.{region}.amazonaws.com.cn", + tags: ["fips"], + }, + { + hostname: "glacier-fips.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack", "fips"], + }, + { + hostname: "glacier.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack"], + }, + ], + }, + "aws-iso": { + regions: ["us-iso-east-1", "us-iso-west-1"], + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "glacier.{region}.c2s.ic.gov", + tags: [], + }, + { + hostname: "glacier-fips.{region}.c2s.ic.gov", + tags: ["fips"], + }, + ], + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "glacier.{region}.sc2s.sgov.gov", + tags: [], + }, + { + hostname: "glacier-fips.{region}.sc2s.sgov.gov", + tags: ["fips"], + }, + ], + }, + "aws-iso-e": { + regions: ["eu-isoe-west-1"], + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "glacier.{region}.cloud.adc-e.uk", + tags: [], + }, + { + hostname: "glacier-fips.{region}.cloud.adc-e.uk", + tags: ["fips"], + }, + ], + }, + "aws-iso-f": { + regions: [], + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "glacier.{region}.csp.hci.ic.gov", + tags: [], + }, + { + hostname: "glacier-fips.{region}.csp.hci.ic.gov", + tags: ["fips"], + }, + ], + }, + "aws-us-gov": { + regions: ["fips-us-gov-east-1", "fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"], + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "glacier.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "glacier-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "glacier-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "glacier.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, +}; + +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => + getRegionInfo(region, { + ...options, + signingService: "glacier", + regionHash, + partitionHash, + }); diff --git a/private/aws-protocoltests-restjson-glacier/src/extensionConfiguration.ts b/private/aws-protocoltests-restjson-glacier/src/extensionConfiguration.ts new file mode 100644 index 0000000000000..172e2be4ce113 --- /dev/null +++ b/private/aws-protocoltests-restjson-glacier/src/extensionConfiguration.ts @@ -0,0 +1,15 @@ +// smithy-typescript generated code +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; + +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; + +/** + * @internal + */ +export interface GlacierExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration, + HttpAuthExtensionConfiguration {} diff --git a/private/aws-protocoltests-restjson-glacier/src/index.ts b/private/aws-protocoltests-restjson-glacier/src/index.ts new file mode 100644 index 0000000000000..0034a9e49ecd1 --- /dev/null +++ b/private/aws-protocoltests-restjson-glacier/src/index.ts @@ -0,0 +1,10 @@ +// smithy-typescript generated code +/* eslint-disable */ +export * from "./GlacierClient"; +export * from "./Glacier"; +export type { RuntimeExtension } from "./runtimeExtensions"; +export type { GlacierExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./models"; + +export { GlacierServiceException } from "./models/GlacierServiceException"; diff --git a/private/aws-protocoltests-restjson-glacier/src/models/GlacierServiceException.ts b/private/aws-protocoltests-restjson-glacier/src/models/GlacierServiceException.ts new file mode 100644 index 0000000000000..06563bd1e2675 --- /dev/null +++ b/private/aws-protocoltests-restjson-glacier/src/models/GlacierServiceException.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; + +export type { __ServiceExceptionOptions }; + +export { __ServiceException }; + +/** + * @public + * + * Base exception class for all service exceptions from Glacier service. + */ +export class GlacierServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, GlacierServiceException.prototype); + } +} diff --git a/private/aws-protocoltests-restjson-glacier/src/models/index.ts b/private/aws-protocoltests-restjson-glacier/src/models/index.ts new file mode 100644 index 0000000000000..9eaceb12865f8 --- /dev/null +++ b/private/aws-protocoltests-restjson-glacier/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/private/aws-protocoltests-restjson-glacier/src/models/models_0.ts b/private/aws-protocoltests-restjson-glacier/src/models/models_0.ts new file mode 100644 index 0000000000000..d3f805ba07a24 --- /dev/null +++ b/private/aws-protocoltests-restjson-glacier/src/models/models_0.ts @@ -0,0 +1,173 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { StreamingBlobTypes } from "@smithy/types"; + +import { GlacierServiceException as __BaseException } from "./GlacierServiceException"; + +/** + * @public + */ +export interface ArchiveCreationOutput { + location?: string; + checksum?: string; + archiveId?: string; +} + +/** + * @public + */ +export class InvalidParameterValueException extends __BaseException { + readonly name: "InvalidParameterValueException" = "InvalidParameterValueException"; + readonly $fault: "client" = "client"; + type?: string; + code?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType