From 368204f2560f046db12470dc3c3c7715fc89ff12 Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Sat, 18 Nov 2017 13:36:30 -0800 Subject: [PATCH 1/3] Create a client package generator command --- packages/config-resolver/src/index.spec.ts | 30 ++- packages/config-resolver/src/index.ts | 25 +-- packages/middleware-stack/src/index.spec.ts | 17 +- packages/middleware-stack/src/index.ts | 47 ++-- packages/model-codecommit-v1/.gitignore | 10 - packages/model-codecommit-v1/.npmignore | 4 - .../BatchGetRepositoriesInput.ts | 9 - .../BatchGetRepositoriesOutput.ts | 23 -- .../BlobIdDoesNotExistException.ts | 27 --- .../BlobIdRequiredException.ts | 27 --- .../BranchDoesNotExistException.ts | 27 --- .../BranchNameExistsException.ts | 27 --- .../BranchNameRequiredException.ts | 27 --- .../CommitDoesNotExistException.ts | 27 --- .../CommitIdDoesNotExistException.ts | 27 --- .../CommitIdRequiredException.ts | 27 --- .../CommitRequiredException.ts | 27 --- .../model-codecommit-v1/CreateBranchInput.ts | 19 -- .../model-codecommit-v1/CreateBranchOutput.ts | 12 -- .../CreateRepositoryInput.ts | 14 -- .../CreateRepositoryOutput.ts | 18 -- .../DefaultBranchCannotBeDeletedException.ts | 27 --- .../model-codecommit-v1/DeleteBranchInput.ts | 14 -- .../model-codecommit-v1/DeleteBranchOutput.ts | 18 -- .../DeleteRepositoryInput.ts | 9 - .../DeleteRepositoryOutput.ts | 17 -- ...ncryptionIntegrityChecksFailedException.ts | 27 --- .../EncryptionKeyAccessDeniedException.ts | 27 --- .../EncryptionKeyDisabledException.ts | 27 --- .../EncryptionKeyNotFoundException.ts | 27 --- .../EncryptionKeyUnavailableException.ts | 27 --- .../FileTooLargeException.ts | 27 --- packages/model-codecommit-v1/GetBlobInput.ts | 14 -- packages/model-codecommit-v1/GetBlobOutput.ts | 17 -- .../model-codecommit-v1/GetBranchInput.ts | 14 -- .../model-codecommit-v1/GetBranchOutput.ts | 18 -- .../model-codecommit-v1/GetCommitInput.ts | 14 -- .../model-codecommit-v1/GetCommitOutput.ts | 18 -- .../GetDifferencesInput.ts | 39 ---- .../GetDifferencesOutput.ts | 23 -- .../model-codecommit-v1/GetRepositoryInput.ts | 9 - .../GetRepositoryOutput.ts | 18 -- .../GetRepositoryTriggersInput.ts | 9 - .../GetRepositoryTriggersOutput.ts | 23 -- .../model-codecommit-v1/InputTypesUnion.ts | 38 ---- .../InvalidBlobIdException.ts | 27 --- .../InvalidBranchNameException.ts | 27 --- .../InvalidCommitException.ts | 27 --- .../InvalidCommitIdException.ts | 27 --- .../InvalidContinuationTokenException.ts | 27 --- .../InvalidMaxResultsException.ts | 27 --- .../InvalidOrderException.ts | 27 --- .../InvalidPathException.ts | 27 --- .../InvalidRepositoryDescriptionException.ts | 27 --- .../InvalidRepositoryNameException.ts | 27 --- ...lidRepositoryTriggerBranchNameException.ts | 27 --- ...lidRepositoryTriggerCustomDataException.ts | 27 --- ...epositoryTriggerDestinationArnException.ts | 27 --- ...InvalidRepositoryTriggerEventsException.ts | 27 --- .../InvalidRepositoryTriggerNameException.ts | 27 --- ...InvalidRepositoryTriggerRegionException.ts | 27 --- .../InvalidSortByException.ts | 27 --- packages/model-codecommit-v1/LICENSE | 201 ----------------- .../model-codecommit-v1/ListBranchesInput.ts | 14 -- .../model-codecommit-v1/ListBranchesOutput.ts | 22 -- .../ListRepositoriesInput.ts | 19 -- .../ListRepositoriesOutput.ts | 23 -- .../MaximumBranchesExceededException.ts | 27 --- ...MaximumRepositoryNamesExceededException.ts | 27 --- ...imumRepositoryTriggersExceededException.ts | 27 --- .../model-codecommit-v1/OutputTypesUnion.ts | 38 ---- .../PathDoesNotExistException.ts | 27 --- .../PutRepositoryTriggersInput.ts | 16 -- .../PutRepositoryTriggersOutput.ts | 17 -- packages/model-codecommit-v1/README.md | 3 - .../RepositoryDoesNotExistException.ts | 27 --- .../RepositoryLimitExceededException.ts | 27 --- .../RepositoryNameExistsException.ts | 27 --- .../RepositoryNameRequiredException.ts | 27 --- .../RepositoryNamesRequiredException.ts | 27 --- ...yTriggerBranchNameListRequiredException.ts | 27 --- ...yTriggerDestinationArnRequiredException.ts | 27 --- ...itoryTriggerEventsListRequiredException.ts | 27 --- .../RepositoryTriggerNameRequiredException.ts | 27 --- ...RepositoryTriggersListRequiredException.ts | 27 --- .../TestRepositoryTriggersInput.ts | 16 -- .../TestRepositoryTriggersOutput.ts | 23 -- .../UpdateDefaultBranchInput.ts | 14 -- .../UpdateDefaultBranchOutput.ts | 12 -- .../UpdateRepositoryDescriptionInput.ts | 14 -- .../UpdateRepositoryDescriptionOutput.ts | 12 -- .../UpdateRepositoryNameInput.ts | 14 -- .../UpdateRepositoryNameOutput.ts | 12 -- packages/model-codecommit-v1/_BlobMetadata.ts | 21 -- packages/model-codecommit-v1/_BranchInfo.ts | 16 -- packages/model-codecommit-v1/_Commit.ts | 58 ----- packages/model-codecommit-v1/_Difference.ts | 33 --- .../_RepositoryMetadata.ts | 66 ------ .../_RepositoryNameIdPair.ts | 16 -- .../model-codecommit-v1/_RepositoryTrigger.ts | 57 ----- .../_RepositoryTriggerExecutionFailure.ts | 16 -- packages/model-codecommit-v1/_UserInfo.ts | 21 -- .../model/BatchGetRepositories.ts | 53 ----- .../model/BatchGetRepositoriesInput.ts | 12 -- .../model/BatchGetRepositoriesOutput.ts | 16 -- .../model/BlobIdDoesNotExistException.ts | 8 - .../model/BlobIdRequiredException.ts | 8 - .../model/BranchDoesNotExistException.ts | 8 - .../model/BranchNameExistsException.ts | 8 - .../model/BranchNameRequiredException.ts | 8 - .../model/CommitDoesNotExistException.ts | 8 - .../model/CommitIdDoesNotExistException.ts | 8 - .../model/CommitIdRequiredException.ts | 8 - .../model/CommitRequiredException.ts | 8 - .../model-codecommit-v1/model/CreateBranch.ts | 77 ------- .../model/CreateBranchInput.ts | 25 --- .../model/CreateBranchOutput.ts | 7 - .../model/CreateRepository.ts | 61 ------ .../model/CreateRepositoryInput.ts | 19 -- .../model/CreateRepositoryOutput.ts | 12 -- .../DefaultBranchCannotBeDeletedException.ts | 8 - .../model-codecommit-v1/model/DeleteBranch.ts | 65 ------ .../model/DeleteBranchInput.ts | 20 -- .../model/DeleteBranchOutput.ts | 12 -- .../model/DeleteRepository.ts | 49 ----- .../model/DeleteRepositoryInput.ts | 14 -- .../model/DeleteRepositoryOutput.ts | 13 -- ...ncryptionIntegrityChecksFailedException.ts | 8 - .../EncryptionKeyAccessDeniedException.ts | 8 - .../model/EncryptionKeyDisabledException.ts | 8 - .../model/EncryptionKeyNotFoundException.ts | 8 - .../EncryptionKeyUnavailableException.ts | 8 - .../model/FileTooLargeException.ts | 8 - packages/model-codecommit-v1/model/GetBlob.ts | 69 ------ .../model-codecommit-v1/model/GetBlobInput.ts | 19 -- .../model/GetBlobOutput.ts | 13 -- .../model-codecommit-v1/model/GetBranch.ts | 65 ------ .../model/GetBranchInput.ts | 20 -- .../model/GetBranchOutput.ts | 12 -- .../model-codecommit-v1/model/GetCommit.ts | 65 ------ .../model/GetCommitInput.ts | 19 -- .../model/GetCommitOutput.ts | 12 -- .../model/GetDifferences.ts | 85 -------- .../model/GetDifferencesInput.ts | 44 ---- .../model/GetDifferencesOutput.ts | 17 -- .../model/GetRepository.ts | 53 ----- .../model/GetRepositoryInput.ts | 14 -- .../model/GetRepositoryOutput.ts | 12 -- .../model/GetRepositoryTriggers.ts | 53 ----- .../model/GetRepositoryTriggersInput.ts | 14 -- .../model/GetRepositoryTriggersOutput.ts | 17 -- .../model/InvalidBlobIdException.ts | 8 - .../model/InvalidBranchNameException.ts | 8 - .../model/InvalidCommitException.ts | 8 - .../model/InvalidCommitIdException.ts | 8 - .../InvalidContinuationTokenException.ts | 8 - .../model/InvalidMaxResultsException.ts | 8 - .../model/InvalidOrderException.ts | 8 - .../model/InvalidPathException.ts | 8 - .../InvalidRepositoryDescriptionException.ts | 8 - .../model/InvalidRepositoryNameException.ts | 8 - ...lidRepositoryTriggerBranchNameException.ts | 8 - ...lidRepositoryTriggerCustomDataException.ts | 8 - ...epositoryTriggerDestinationArnException.ts | 8 - ...InvalidRepositoryTriggerEventsException.ts | 8 - .../InvalidRepositoryTriggerNameException.ts | 8 - ...InvalidRepositoryTriggerRegionException.ts | 8 - .../model/InvalidSortByException.ts | 8 - .../model-codecommit-v1/model/ListBranches.ts | 57 ----- .../model/ListBranchesInput.ts | 19 -- .../model/ListBranchesOutput.ts | 17 -- .../model/ListRepositories.ts | 33 --- .../model/ListRepositoriesInput.ts | 23 -- .../model/ListRepositoriesOutput.ts | 17 -- .../model/MaximumBranchesExceededException.ts | 8 - ...MaximumRepositoryNamesExceededException.ts | 8 - ...imumRepositoryTriggersExceededException.ts | 8 - .../model/PathDoesNotExistException.ts | 8 - .../model/PutRepositoryTriggers.ts | 105 --------- .../model/PutRepositoryTriggersInput.ts | 18 -- .../model/PutRepositoryTriggersOutput.ts | 13 -- .../model/RepositoryDoesNotExistException.ts | 8 - .../model/RepositoryLimitExceededException.ts | 8 - .../model/RepositoryNameExistsException.ts | 8 - .../model/RepositoryNameRequiredException.ts | 8 - .../model/RepositoryNamesRequiredException.ts | 8 - ...yTriggerBranchNameListRequiredException.ts | 8 - ...yTriggerDestinationArnRequiredException.ts | 8 - ...itoryTriggerEventsListRequiredException.ts | 8 - .../RepositoryTriggerNameRequiredException.ts | 8 - ...RepositoryTriggersListRequiredException.ts | 8 - .../model/ServiceMetadata.ts | 13 -- .../model/TestRepositoryTriggers.ts | 105 --------- .../model/TestRepositoryTriggersInput.ts | 18 -- .../model/TestRepositoryTriggersOutput.ts | 16 -- .../model/UpdateDefaultBranch.ts | 65 ------ .../model/UpdateDefaultBranchInput.ts | 20 -- .../model/UpdateDefaultBranchOutput.ts | 7 - .../model/UpdateRepositoryDescription.ts | 57 ----- .../model/UpdateRepositoryDescriptionInput.ts | 19 -- .../UpdateRepositoryDescriptionOutput.ts | 7 - .../model/UpdateRepositoryName.ts | 37 ---- .../model/UpdateRepositoryNameInput.ts | 20 -- .../model/UpdateRepositoryNameOutput.ts | 7 - .../model/_BlobMetadata.ts | 23 -- .../model-codecommit-v1/model/_BranchInfo.ts | 19 -- .../model/_BranchNameList.ts | 11 - packages/model-codecommit-v1/model/_Commit.ts | 39 ---- .../model-codecommit-v1/model/_Difference.ts | 20 -- .../model/_DifferenceList.ts | 9 - .../model-codecommit-v1/model/_ParentList.ts | 10 - .../model/_RepositoryMetadata.ts | 60 ------ .../model/_RepositoryMetadataList.ts | 9 - .../model/_RepositoryNameIdPair.ts | 19 -- .../model/_RepositoryNameIdPairList.ts | 9 - .../model/_RepositoryNameList.ts | 11 - .../model/_RepositoryNotFoundList.ts | 11 - .../model/_RepositoryTrigger.ts | 31 --- .../model/_RepositoryTriggerEventList.ts | 10 - .../_RepositoryTriggerExecutionFailure.ts | 18 -- .../_RepositoryTriggerExecutionFailureList.ts | 9 - .../model/_RepositoryTriggerNameList.ts | 10 - .../model/_RepositoryTriggersList.ts | 9 - .../model-codecommit-v1/model/_UserInfo.ts | 23 -- packages/model-codecommit-v1/package.json | 18 -- packages/model-codecommit-v1/tsconfig.json | 14 -- .../model-codecommit-v1/tsconfig.test.json | 3 - packages/package-generator/package.json | 2 + .../src/ClientModuleGenerator.ts | 203 ++++++++++++++++++ packages/package-generator/src/cli.ts | 2 + .../commands/CreateClientPackageCommand.ts | 40 ++++ .../package-generator/src/commands/index.ts | 1 + .../src/JsonRpcSerializer.ts | 5 +- .../protocol-query/src/QuerySerializer.ts | 5 +- packages/protocol-rest/src/RestSerializer.ts | 8 +- packages/protocol-timestamp/package.json | 8 +- .../src/ClientGenerator.ts | 30 +-- .../Components/Client/ClassicClient.spec.ts | 23 ++ .../src/Components/Client/ClassicClient.ts | 5 +- .../src/Components/Client/Client.spec.ts | 5 +- .../src/Components/Client/Client.ts | 127 ++++++----- .../Components/Client/Configuration.spec.ts | 5 +- .../src/Components/Client/Configuration.ts | 5 +- .../src/Components/Client/Method.spec.ts | 55 +++++ .../src/Components/Client/Method.ts | 5 +- .../endpointConfigurationProperties.ts | 4 +- .../httpConfigurationProperties.ts | 17 +- .../Client/customizationsFromModel/index.ts | 2 + .../serializerConfigurationProperties.ts | 125 ++++++----- .../signatureConfigurationProperties.ts | 6 +- .../standardConfigurationProperties.ts | 40 +++- .../staticOrProvider.spec.ts | 4 +- .../staticOrProvider.ts | 9 +- .../src/Components/Client/internalImports.ts | 32 ++- packages/service-types-generator/src/index.ts | 1 + packages/types/src/client.ts | 26 ++- packages/types/src/http.ts | 4 +- packages/types/src/middleware.ts | 49 ++++- packages/util-hex-encoding/package.json | 8 +- packages/xml-body-builder/package.json | 2 +- 260 files changed, 752 insertions(+), 5216 deletions(-) delete mode 100644 packages/model-codecommit-v1/.gitignore delete mode 100644 packages/model-codecommit-v1/.npmignore delete mode 100644 packages/model-codecommit-v1/BatchGetRepositoriesInput.ts delete mode 100644 packages/model-codecommit-v1/BatchGetRepositoriesOutput.ts delete mode 100644 packages/model-codecommit-v1/BlobIdDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/BlobIdRequiredException.ts delete mode 100644 packages/model-codecommit-v1/BranchDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/BranchNameExistsException.ts delete mode 100644 packages/model-codecommit-v1/BranchNameRequiredException.ts delete mode 100644 packages/model-codecommit-v1/CommitDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/CommitIdDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/CommitIdRequiredException.ts delete mode 100644 packages/model-codecommit-v1/CommitRequiredException.ts delete mode 100644 packages/model-codecommit-v1/CreateBranchInput.ts delete mode 100644 packages/model-codecommit-v1/CreateBranchOutput.ts delete mode 100644 packages/model-codecommit-v1/CreateRepositoryInput.ts delete mode 100644 packages/model-codecommit-v1/CreateRepositoryOutput.ts delete mode 100644 packages/model-codecommit-v1/DefaultBranchCannotBeDeletedException.ts delete mode 100644 packages/model-codecommit-v1/DeleteBranchInput.ts delete mode 100644 packages/model-codecommit-v1/DeleteBranchOutput.ts delete mode 100644 packages/model-codecommit-v1/DeleteRepositoryInput.ts delete mode 100644 packages/model-codecommit-v1/DeleteRepositoryOutput.ts delete mode 100644 packages/model-codecommit-v1/EncryptionIntegrityChecksFailedException.ts delete mode 100644 packages/model-codecommit-v1/EncryptionKeyAccessDeniedException.ts delete mode 100644 packages/model-codecommit-v1/EncryptionKeyDisabledException.ts delete mode 100644 packages/model-codecommit-v1/EncryptionKeyNotFoundException.ts delete mode 100644 packages/model-codecommit-v1/EncryptionKeyUnavailableException.ts delete mode 100644 packages/model-codecommit-v1/FileTooLargeException.ts delete mode 100644 packages/model-codecommit-v1/GetBlobInput.ts delete mode 100644 packages/model-codecommit-v1/GetBlobOutput.ts delete mode 100644 packages/model-codecommit-v1/GetBranchInput.ts delete mode 100644 packages/model-codecommit-v1/GetBranchOutput.ts delete mode 100644 packages/model-codecommit-v1/GetCommitInput.ts delete mode 100644 packages/model-codecommit-v1/GetCommitOutput.ts delete mode 100644 packages/model-codecommit-v1/GetDifferencesInput.ts delete mode 100644 packages/model-codecommit-v1/GetDifferencesOutput.ts delete mode 100644 packages/model-codecommit-v1/GetRepositoryInput.ts delete mode 100644 packages/model-codecommit-v1/GetRepositoryOutput.ts delete mode 100644 packages/model-codecommit-v1/GetRepositoryTriggersInput.ts delete mode 100644 packages/model-codecommit-v1/GetRepositoryTriggersOutput.ts delete mode 100644 packages/model-codecommit-v1/InputTypesUnion.ts delete mode 100644 packages/model-codecommit-v1/InvalidBlobIdException.ts delete mode 100644 packages/model-codecommit-v1/InvalidBranchNameException.ts delete mode 100644 packages/model-codecommit-v1/InvalidCommitException.ts delete mode 100644 packages/model-codecommit-v1/InvalidCommitIdException.ts delete mode 100644 packages/model-codecommit-v1/InvalidContinuationTokenException.ts delete mode 100644 packages/model-codecommit-v1/InvalidMaxResultsException.ts delete mode 100644 packages/model-codecommit-v1/InvalidOrderException.ts delete mode 100644 packages/model-codecommit-v1/InvalidPathException.ts delete mode 100644 packages/model-codecommit-v1/InvalidRepositoryDescriptionException.ts delete mode 100644 packages/model-codecommit-v1/InvalidRepositoryNameException.ts delete mode 100644 packages/model-codecommit-v1/InvalidRepositoryTriggerBranchNameException.ts delete mode 100644 packages/model-codecommit-v1/InvalidRepositoryTriggerCustomDataException.ts delete mode 100644 packages/model-codecommit-v1/InvalidRepositoryTriggerDestinationArnException.ts delete mode 100644 packages/model-codecommit-v1/InvalidRepositoryTriggerEventsException.ts delete mode 100644 packages/model-codecommit-v1/InvalidRepositoryTriggerNameException.ts delete mode 100644 packages/model-codecommit-v1/InvalidRepositoryTriggerRegionException.ts delete mode 100644 packages/model-codecommit-v1/InvalidSortByException.ts delete mode 100644 packages/model-codecommit-v1/LICENSE delete mode 100644 packages/model-codecommit-v1/ListBranchesInput.ts delete mode 100644 packages/model-codecommit-v1/ListBranchesOutput.ts delete mode 100644 packages/model-codecommit-v1/ListRepositoriesInput.ts delete mode 100644 packages/model-codecommit-v1/ListRepositoriesOutput.ts delete mode 100644 packages/model-codecommit-v1/MaximumBranchesExceededException.ts delete mode 100644 packages/model-codecommit-v1/MaximumRepositoryNamesExceededException.ts delete mode 100644 packages/model-codecommit-v1/MaximumRepositoryTriggersExceededException.ts delete mode 100644 packages/model-codecommit-v1/OutputTypesUnion.ts delete mode 100644 packages/model-codecommit-v1/PathDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/PutRepositoryTriggersInput.ts delete mode 100644 packages/model-codecommit-v1/PutRepositoryTriggersOutput.ts delete mode 100644 packages/model-codecommit-v1/README.md delete mode 100644 packages/model-codecommit-v1/RepositoryDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/RepositoryLimitExceededException.ts delete mode 100644 packages/model-codecommit-v1/RepositoryNameExistsException.ts delete mode 100644 packages/model-codecommit-v1/RepositoryNameRequiredException.ts delete mode 100644 packages/model-codecommit-v1/RepositoryNamesRequiredException.ts delete mode 100644 packages/model-codecommit-v1/RepositoryTriggerBranchNameListRequiredException.ts delete mode 100644 packages/model-codecommit-v1/RepositoryTriggerDestinationArnRequiredException.ts delete mode 100644 packages/model-codecommit-v1/RepositoryTriggerEventsListRequiredException.ts delete mode 100644 packages/model-codecommit-v1/RepositoryTriggerNameRequiredException.ts delete mode 100644 packages/model-codecommit-v1/RepositoryTriggersListRequiredException.ts delete mode 100644 packages/model-codecommit-v1/TestRepositoryTriggersInput.ts delete mode 100644 packages/model-codecommit-v1/TestRepositoryTriggersOutput.ts delete mode 100644 packages/model-codecommit-v1/UpdateDefaultBranchInput.ts delete mode 100644 packages/model-codecommit-v1/UpdateDefaultBranchOutput.ts delete mode 100644 packages/model-codecommit-v1/UpdateRepositoryDescriptionInput.ts delete mode 100644 packages/model-codecommit-v1/UpdateRepositoryDescriptionOutput.ts delete mode 100644 packages/model-codecommit-v1/UpdateRepositoryNameInput.ts delete mode 100644 packages/model-codecommit-v1/UpdateRepositoryNameOutput.ts delete mode 100644 packages/model-codecommit-v1/_BlobMetadata.ts delete mode 100644 packages/model-codecommit-v1/_BranchInfo.ts delete mode 100644 packages/model-codecommit-v1/_Commit.ts delete mode 100644 packages/model-codecommit-v1/_Difference.ts delete mode 100644 packages/model-codecommit-v1/_RepositoryMetadata.ts delete mode 100644 packages/model-codecommit-v1/_RepositoryNameIdPair.ts delete mode 100644 packages/model-codecommit-v1/_RepositoryTrigger.ts delete mode 100644 packages/model-codecommit-v1/_RepositoryTriggerExecutionFailure.ts delete mode 100644 packages/model-codecommit-v1/_UserInfo.ts delete mode 100644 packages/model-codecommit-v1/model/BatchGetRepositories.ts delete mode 100644 packages/model-codecommit-v1/model/BatchGetRepositoriesInput.ts delete mode 100644 packages/model-codecommit-v1/model/BatchGetRepositoriesOutput.ts delete mode 100644 packages/model-codecommit-v1/model/BlobIdDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/model/BlobIdRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/BranchDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/model/BranchNameExistsException.ts delete mode 100644 packages/model-codecommit-v1/model/BranchNameRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/CommitDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/model/CommitIdDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/model/CommitIdRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/CommitRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/CreateBranch.ts delete mode 100644 packages/model-codecommit-v1/model/CreateBranchInput.ts delete mode 100644 packages/model-codecommit-v1/model/CreateBranchOutput.ts delete mode 100644 packages/model-codecommit-v1/model/CreateRepository.ts delete mode 100644 packages/model-codecommit-v1/model/CreateRepositoryInput.ts delete mode 100644 packages/model-codecommit-v1/model/CreateRepositoryOutput.ts delete mode 100644 packages/model-codecommit-v1/model/DefaultBranchCannotBeDeletedException.ts delete mode 100644 packages/model-codecommit-v1/model/DeleteBranch.ts delete mode 100644 packages/model-codecommit-v1/model/DeleteBranchInput.ts delete mode 100644 packages/model-codecommit-v1/model/DeleteBranchOutput.ts delete mode 100644 packages/model-codecommit-v1/model/DeleteRepository.ts delete mode 100644 packages/model-codecommit-v1/model/DeleteRepositoryInput.ts delete mode 100644 packages/model-codecommit-v1/model/DeleteRepositoryOutput.ts delete mode 100644 packages/model-codecommit-v1/model/EncryptionIntegrityChecksFailedException.ts delete mode 100644 packages/model-codecommit-v1/model/EncryptionKeyAccessDeniedException.ts delete mode 100644 packages/model-codecommit-v1/model/EncryptionKeyDisabledException.ts delete mode 100644 packages/model-codecommit-v1/model/EncryptionKeyNotFoundException.ts delete mode 100644 packages/model-codecommit-v1/model/EncryptionKeyUnavailableException.ts delete mode 100644 packages/model-codecommit-v1/model/FileTooLargeException.ts delete mode 100644 packages/model-codecommit-v1/model/GetBlob.ts delete mode 100644 packages/model-codecommit-v1/model/GetBlobInput.ts delete mode 100644 packages/model-codecommit-v1/model/GetBlobOutput.ts delete mode 100644 packages/model-codecommit-v1/model/GetBranch.ts delete mode 100644 packages/model-codecommit-v1/model/GetBranchInput.ts delete mode 100644 packages/model-codecommit-v1/model/GetBranchOutput.ts delete mode 100644 packages/model-codecommit-v1/model/GetCommit.ts delete mode 100644 packages/model-codecommit-v1/model/GetCommitInput.ts delete mode 100644 packages/model-codecommit-v1/model/GetCommitOutput.ts delete mode 100644 packages/model-codecommit-v1/model/GetDifferences.ts delete mode 100644 packages/model-codecommit-v1/model/GetDifferencesInput.ts delete mode 100644 packages/model-codecommit-v1/model/GetDifferencesOutput.ts delete mode 100644 packages/model-codecommit-v1/model/GetRepository.ts delete mode 100644 packages/model-codecommit-v1/model/GetRepositoryInput.ts delete mode 100644 packages/model-codecommit-v1/model/GetRepositoryOutput.ts delete mode 100644 packages/model-codecommit-v1/model/GetRepositoryTriggers.ts delete mode 100644 packages/model-codecommit-v1/model/GetRepositoryTriggersInput.ts delete mode 100644 packages/model-codecommit-v1/model/GetRepositoryTriggersOutput.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidBlobIdException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidBranchNameException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidCommitException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidCommitIdException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidContinuationTokenException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidMaxResultsException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidOrderException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidPathException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidRepositoryDescriptionException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidRepositoryNameException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidRepositoryTriggerBranchNameException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidRepositoryTriggerCustomDataException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidRepositoryTriggerDestinationArnException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidRepositoryTriggerEventsException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidRepositoryTriggerNameException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidRepositoryTriggerRegionException.ts delete mode 100644 packages/model-codecommit-v1/model/InvalidSortByException.ts delete mode 100644 packages/model-codecommit-v1/model/ListBranches.ts delete mode 100644 packages/model-codecommit-v1/model/ListBranchesInput.ts delete mode 100644 packages/model-codecommit-v1/model/ListBranchesOutput.ts delete mode 100644 packages/model-codecommit-v1/model/ListRepositories.ts delete mode 100644 packages/model-codecommit-v1/model/ListRepositoriesInput.ts delete mode 100644 packages/model-codecommit-v1/model/ListRepositoriesOutput.ts delete mode 100644 packages/model-codecommit-v1/model/MaximumBranchesExceededException.ts delete mode 100644 packages/model-codecommit-v1/model/MaximumRepositoryNamesExceededException.ts delete mode 100644 packages/model-codecommit-v1/model/MaximumRepositoryTriggersExceededException.ts delete mode 100644 packages/model-codecommit-v1/model/PathDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/model/PutRepositoryTriggers.ts delete mode 100644 packages/model-codecommit-v1/model/PutRepositoryTriggersInput.ts delete mode 100644 packages/model-codecommit-v1/model/PutRepositoryTriggersOutput.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryDoesNotExistException.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryLimitExceededException.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryNameExistsException.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryNameRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryNamesRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryTriggerBranchNameListRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryTriggerDestinationArnRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryTriggerEventsListRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryTriggerNameRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/RepositoryTriggersListRequiredException.ts delete mode 100644 packages/model-codecommit-v1/model/ServiceMetadata.ts delete mode 100644 packages/model-codecommit-v1/model/TestRepositoryTriggers.ts delete mode 100644 packages/model-codecommit-v1/model/TestRepositoryTriggersInput.ts delete mode 100644 packages/model-codecommit-v1/model/TestRepositoryTriggersOutput.ts delete mode 100644 packages/model-codecommit-v1/model/UpdateDefaultBranch.ts delete mode 100644 packages/model-codecommit-v1/model/UpdateDefaultBranchInput.ts delete mode 100644 packages/model-codecommit-v1/model/UpdateDefaultBranchOutput.ts delete mode 100644 packages/model-codecommit-v1/model/UpdateRepositoryDescription.ts delete mode 100644 packages/model-codecommit-v1/model/UpdateRepositoryDescriptionInput.ts delete mode 100644 packages/model-codecommit-v1/model/UpdateRepositoryDescriptionOutput.ts delete mode 100644 packages/model-codecommit-v1/model/UpdateRepositoryName.ts delete mode 100644 packages/model-codecommit-v1/model/UpdateRepositoryNameInput.ts delete mode 100644 packages/model-codecommit-v1/model/UpdateRepositoryNameOutput.ts delete mode 100644 packages/model-codecommit-v1/model/_BlobMetadata.ts delete mode 100644 packages/model-codecommit-v1/model/_BranchInfo.ts delete mode 100644 packages/model-codecommit-v1/model/_BranchNameList.ts delete mode 100644 packages/model-codecommit-v1/model/_Commit.ts delete mode 100644 packages/model-codecommit-v1/model/_Difference.ts delete mode 100644 packages/model-codecommit-v1/model/_DifferenceList.ts delete mode 100644 packages/model-codecommit-v1/model/_ParentList.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryMetadata.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryMetadataList.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryNameIdPair.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryNameIdPairList.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryNameList.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryNotFoundList.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryTrigger.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryTriggerEventList.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailure.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailureList.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryTriggerNameList.ts delete mode 100644 packages/model-codecommit-v1/model/_RepositoryTriggersList.ts delete mode 100644 packages/model-codecommit-v1/model/_UserInfo.ts delete mode 100644 packages/model-codecommit-v1/package.json delete mode 100644 packages/model-codecommit-v1/tsconfig.json delete mode 100644 packages/model-codecommit-v1/tsconfig.test.json create mode 100644 packages/package-generator/src/ClientModuleGenerator.ts create mode 100644 packages/package-generator/src/commands/CreateClientPackageCommand.ts create mode 100644 packages/service-types-generator/src/Components/Client/ClassicClient.spec.ts create mode 100644 packages/service-types-generator/src/Components/Client/Method.spec.ts diff --git a/packages/config-resolver/src/index.spec.ts b/packages/config-resolver/src/index.spec.ts index 20c534d0fec79..b3c813660459f 100644 --- a/packages/config-resolver/src/index.spec.ts +++ b/packages/config-resolver/src/index.spec.ts @@ -3,7 +3,10 @@ import { ConfigurationDefinition } from "@aws/types"; describe("resolveConfiguration", () => { it("should throw if a required property is not supplied", () => { - const definition: ConfigurationDefinition<{ region: string }> = { + const definition: ConfigurationDefinition< + { region: string }, + { region: string } + > = { region: { required: true } @@ -14,7 +17,10 @@ describe("resolveConfiguration", () => { }); it("should inject a default value if a property is not supplied", () => { - const definition: ConfigurationDefinition<{ region?: string }> = { + const definition: ConfigurationDefinition< + { region?: string }, + { region: string } + > = { region: { required: false, defaultValue: "us-west-2" @@ -27,7 +33,10 @@ describe("resolveConfiguration", () => { }); it("should not inject a default value if a property is supplied", () => { - const definition: ConfigurationDefinition<{ region?: string }> = { + const definition: ConfigurationDefinition< + { region?: string }, + { region: string } + > = { region: { required: false, defaultValue: "us-west-2" @@ -41,7 +50,10 @@ describe("resolveConfiguration", () => { it("should call a default provider and inject its return value if a property is not supplied", () => { const defaultProvider = jest.fn(() => "us-west-2"); - const definition: ConfigurationDefinition<{ region?: string }> = { + const definition: ConfigurationDefinition< + { region?: string }, + { region: string } + > = { region: { required: false, defaultProvider @@ -57,7 +69,10 @@ describe("resolveConfiguration", () => { it("should not call a default provider if a property is supplied", () => { const defaultProvider = jest.fn(() => "us-west-2"); - const definition: ConfigurationDefinition<{ region?: string }> = { + const definition: ConfigurationDefinition< + { region?: string }, + { region: string } + > = { region: { required: false, defaultProvider @@ -73,7 +88,10 @@ describe("resolveConfiguration", () => { it("should always call an apply function if one is provided", () => { const apply = jest.fn(() => {}); const middlewareStack = {} as any; - const definition: ConfigurationDefinition<{ region?: string }> = { + const definition: ConfigurationDefinition< + { region: string }, + { region: string } + > = { region: { required: true, apply diff --git a/packages/config-resolver/src/index.ts b/packages/config-resolver/src/index.ts index caf8ae169b8d3..3c5cca7e4ff7a 100644 --- a/packages/config-resolver/src/index.ts +++ b/packages/config-resolver/src/index.ts @@ -4,12 +4,15 @@ export type IndexedObject = { [key: string]: any }; export function resolveConfiguration( providedConfiguration: T, - configurationDefinition: ConfigurationDefinition, - middlewareStack: MiddlewareStack + configurationDefinition: ConfigurationDefinition, + middlewareStack: MiddlewareStack ): R { - const out = {} as Partial; + const out: Partial = {}; - for (const property of Object.keys(configurationDefinition)) { + // Iterate over the definitions own keys, using getOwnPropertyNames to + // guarantee insertion order is preserved. + // @see https://www.ecma-international.org/ecma-262/6.0/#sec-ordinary-object-internal-methods-and-internal-slots-ownpropertykeys + for (const property of Object.getOwnPropertyNames(configurationDefinition)) { const { required, defaultValue, @@ -22,20 +25,18 @@ export function resolveConfiguration( if (defaultValue !== undefined) { input = defaultValue; } else if (defaultProvider) { - input = defaultProvider(out); + input = defaultProvider(out as R); + } else if (required) { + throw new Error( + `No input provided for required configuration parameter: ${property}` + ); } } - if (required && input === undefined) { - throw new Error( - `No input provided for required configuration parameter: ${property}` - ); - } - out[property] = input; if (apply) { - apply(out[property], out, middlewareStack); + apply(input, out as R, middlewareStack); } } diff --git a/packages/middleware-stack/src/index.spec.ts b/packages/middleware-stack/src/index.spec.ts index 79171f591eb9a..6f3db958682db 100644 --- a/packages/middleware-stack/src/index.spec.ts +++ b/packages/middleware-stack/src/index.spec.ts @@ -3,12 +3,11 @@ import { Handler, HandlerArguments } from "@aws/types"; type input = Array; type output = object; -type handler = Handler; -class ConcatMiddleware implements handler { +class ConcatMiddleware implements Handler { constructor( private readonly message: string, - private readonly next: handler + private readonly next: Handler ) {} handle(args: HandlerArguments): Promise { @@ -31,7 +30,7 @@ function shuffle(arr: Array): Array { describe("MiddlewareStack", () => { it("should resolve the stack into a composed handler", async () => { - const stack = new MiddlewareStack(); + const stack = new MiddlewareStack(); const middleware = shuffle([ [ConcatMiddleware.bind(null, "second")], @@ -66,7 +65,7 @@ describe("MiddlewareStack", () => { }); it("should allow cloning", async () => { - const stack = new MiddlewareStack(); + const stack = new MiddlewareStack(); stack.add(ConcatMiddleware.bind(null, "second")); stack.add(ConcatMiddleware.bind(null, "first"), { priority: 100 }); @@ -83,11 +82,11 @@ describe("MiddlewareStack", () => { }); it("should allow combining stacks", async () => { - const stack = new MiddlewareStack(); + const stack = new MiddlewareStack(); stack.add(ConcatMiddleware.bind(null, "second")); stack.add(ConcatMiddleware.bind(null, "first"), { priority: 100 }); - const secondStack = new MiddlewareStack(); + const secondStack = new MiddlewareStack(); secondStack.add(ConcatMiddleware.bind(null, "fourth"), { step: "build" }); secondStack.add(ConcatMiddleware.bind(null, "third"), { step: "build", @@ -110,7 +109,7 @@ describe("MiddlewareStack", () => { it("should allow the removal of middleware by constructor identity", async () => { const MyMiddleware = ConcatMiddleware.bind(null, "remove me!"); - const stack = new MiddlewareStack(); + const stack = new MiddlewareStack(); stack.add(MyMiddleware); stack.add(ConcatMiddleware.bind(null, "don't remove me")); @@ -142,7 +141,7 @@ describe("MiddlewareStack", () => { }); it("should allow the removal of middleware by tag", async () => { - const stack = new MiddlewareStack(); + const stack = new MiddlewareStack(); stack.add(ConcatMiddleware.bind(null, "not removed"), { tags: new Set(["foo", "bar"]) }); diff --git a/packages/middleware-stack/src/index.ts b/packages/middleware-stack/src/index.ts index 6a7b8ebc788e4..594e89b627245 100644 --- a/packages/middleware-stack/src/index.ts +++ b/packages/middleware-stack/src/index.ts @@ -8,22 +8,32 @@ import { export type Step = "initialize" | "build" | "finalize"; -interface HandlerListEntry> { +interface HandlerListEntry< + InputType extends object, + OutputType extends object, + StreamType +> { step: Step; priority: number; - middleware: Middleware; + middleware: Middleware; tags?: Set; } -export class MiddlewareStack> - implements IMiddlewareStack { - private readonly entries: Array> = []; +export class MiddlewareStack< + InputType extends object, + OutputType extends object, + StreamType = Uint8Array +> implements IMiddlewareStack { + private readonly entries: Array< + HandlerListEntry + > = []; private sorted: boolean = false; add( - middleware: Middleware, - { step = "initialize", priority = 0, tags }: HandlerOptions = {} + middleware: Middleware, + options: HandlerOptions = {} ): void { + const { step = "initialize", priority = 0, tags } = options; this.sorted = false; this.entries.push({ middleware, @@ -33,19 +43,23 @@ export class MiddlewareStack> }); } - clone(): MiddlewareStack { - const clone = new MiddlewareStack(); + clone(): MiddlewareStack { + const clone = new MiddlewareStack(); clone.entries.push(...this.entries); return clone; } - concat(from: MiddlewareStack): MiddlewareStack { - const clone = new MiddlewareStack(); + concat( + from: MiddlewareStack + ): MiddlewareStack { + const clone = new MiddlewareStack(); clone.entries.push(...this.entries, ...from.entries); return clone; } - remove(toRemove: Middleware | string): boolean { + remove( + toRemove: Middleware | string + ): boolean { const { length } = this.entries; if (typeof toRemove === "string") { this.removeByTag(toRemove); @@ -56,7 +70,10 @@ export class MiddlewareStack> return this.entries.length < length; } - resolve(handler: T, context: HandlerExecutionContext): T { + resolve( + handler: Handler, + context: HandlerExecutionContext + ): Handler { if (!this.sorted) { this.sort(); } @@ -68,7 +85,9 @@ export class MiddlewareStack> return handler; } - private removeByIdentity(toRemove: Middleware) { + private removeByIdentity( + toRemove: Middleware + ) { for (let i = this.entries.length - 1; i >= 0; i--) { if (this.entries[i].middleware === toRemove) { this.entries.splice(i, 1); diff --git a/packages/model-codecommit-v1/.gitignore b/packages/model-codecommit-v1/.gitignore deleted file mode 100644 index 9b7e3100fd965..0000000000000 --- a/packages/model-codecommit-v1/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/node_modules/ -/build/ -/coverage/ -/docs/ -*.tgz -*.log -package-lock.json -*.d.ts -*.js -*.js.map \ No newline at end of file diff --git a/packages/model-codecommit-v1/.npmignore b/packages/model-codecommit-v1/.npmignore deleted file mode 100644 index c63a94e488a03..0000000000000 --- a/packages/model-codecommit-v1/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/coverage/ -/docs/ -*.ts -tsconfig.test.json \ No newline at end of file diff --git a/packages/model-codecommit-v1/BatchGetRepositoriesInput.ts b/packages/model-codecommit-v1/BatchGetRepositoriesInput.ts deleted file mode 100644 index c62d1698758f9..0000000000000 --- a/packages/model-codecommit-v1/BatchGetRepositoriesInput.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - *

Represents the input of a batch get repositories operation.

- */ -export interface BatchGetRepositoriesInput { - /** - *

The names of the repositories to get information about.

- */ - repositoryNames: Array | Iterable; -} diff --git a/packages/model-codecommit-v1/BatchGetRepositoriesOutput.ts b/packages/model-codecommit-v1/BatchGetRepositoriesOutput.ts deleted file mode 100644 index b3352d4a3cf47..0000000000000 --- a/packages/model-codecommit-v1/BatchGetRepositoriesOutput.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { _UnmarshalledRepositoryMetadata } from "./_RepositoryMetadata"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a batch get repositories operation.

- */ -export interface BatchGetRepositoriesOutput { - /** - *

A list of repositories returned by the batch get repositories operation.

- */ - repositories?: Array<_UnmarshalledRepositoryMetadata>; - - /** - *

Returns a list of repository names for which information could not be found.

- */ - repositoriesNotFound?: Array; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/BlobIdDoesNotExistException.ts b/packages/model-codecommit-v1/BlobIdDoesNotExistException.ts deleted file mode 100644 index 85c371c134e59..0000000000000 --- a/packages/model-codecommit-v1/BlobIdDoesNotExistException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified blob does not exist.

- */ -export interface BlobIdDoesNotExistException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/BlobIdRequiredException.ts b/packages/model-codecommit-v1/BlobIdRequiredException.ts deleted file mode 100644 index 12b11a983d79c..0000000000000 --- a/packages/model-codecommit-v1/BlobIdRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

A blob ID is required but was not specified.

- */ -export interface BlobIdRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/BranchDoesNotExistException.ts b/packages/model-codecommit-v1/BranchDoesNotExistException.ts deleted file mode 100644 index 7902f6847fcc4..0000000000000 --- a/packages/model-codecommit-v1/BranchDoesNotExistException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified branch does not exist.

- */ -export interface BranchDoesNotExistException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/BranchNameExistsException.ts b/packages/model-codecommit-v1/BranchNameExistsException.ts deleted file mode 100644 index 730d1ff74482c..0000000000000 --- a/packages/model-codecommit-v1/BranchNameExistsException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified branch name already exists.

- */ -export interface BranchNameExistsException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/BranchNameRequiredException.ts b/packages/model-codecommit-v1/BranchNameRequiredException.ts deleted file mode 100644 index 575abd4f2ed55..0000000000000 --- a/packages/model-codecommit-v1/BranchNameRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

A branch name is required but was not specified.

- */ -export interface BranchNameRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/CommitDoesNotExistException.ts b/packages/model-codecommit-v1/CommitDoesNotExistException.ts deleted file mode 100644 index d0f0235f68f91..0000000000000 --- a/packages/model-codecommit-v1/CommitDoesNotExistException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified commit does not exist or no commit was specified, and the specified repository has no default branch.

- */ -export interface CommitDoesNotExistException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/CommitIdDoesNotExistException.ts b/packages/model-codecommit-v1/CommitIdDoesNotExistException.ts deleted file mode 100644 index 0f168aa33d7c5..0000000000000 --- a/packages/model-codecommit-v1/CommitIdDoesNotExistException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified commit ID does not exist.

- */ -export interface CommitIdDoesNotExistException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/CommitIdRequiredException.ts b/packages/model-codecommit-v1/CommitIdRequiredException.ts deleted file mode 100644 index 1f654ae2c3074..0000000000000 --- a/packages/model-codecommit-v1/CommitIdRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

A commit ID was not specified.

- */ -export interface CommitIdRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/CommitRequiredException.ts b/packages/model-codecommit-v1/CommitRequiredException.ts deleted file mode 100644 index 29ddf5d150913..0000000000000 --- a/packages/model-codecommit-v1/CommitRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

A commit was not specified.

- */ -export interface CommitRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/CreateBranchInput.ts b/packages/model-codecommit-v1/CreateBranchInput.ts deleted file mode 100644 index a8eae15d633e0..0000000000000 --- a/packages/model-codecommit-v1/CreateBranchInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - *

Represents the input of a create branch operation.

- */ -export interface CreateBranchInput { - /** - *

The name of the repository in which you want to create the new branch.

- */ - repositoryName: string; - - /** - *

The name of the new branch to create.

- */ - branchName: string; - - /** - *

The ID of the commit to point the new branch to.

- */ - commitId: string; -} diff --git a/packages/model-codecommit-v1/CreateBranchOutput.ts b/packages/model-codecommit-v1/CreateBranchOutput.ts deleted file mode 100644 index ca1370af3b825..0000000000000 --- a/packages/model-codecommit-v1/CreateBranchOutput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - * CreateBranchOutput shape - */ -export interface CreateBranchOutput { - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/CreateRepositoryInput.ts b/packages/model-codecommit-v1/CreateRepositoryInput.ts deleted file mode 100644 index 5e17bcc7c33ec..0000000000000 --- a/packages/model-codecommit-v1/CreateRepositoryInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - *

Represents the input of a create repository operation.

- */ -export interface CreateRepositoryInput { - /** - *

The name of the new repository to be created.

The repository name must be unique across the calling AWS account. In addition, repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For a full description of the limits on repository names, see Limits in the AWS CodeCommit User Guide. The suffix ".git" is prohibited.

- */ - repositoryName: string; - - /** - *

A comment or description about the new repository.

The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

- */ - repositoryDescription?: string; -} diff --git a/packages/model-codecommit-v1/CreateRepositoryOutput.ts b/packages/model-codecommit-v1/CreateRepositoryOutput.ts deleted file mode 100644 index 644564007f2bb..0000000000000 --- a/packages/model-codecommit-v1/CreateRepositoryOutput.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { _UnmarshalledRepositoryMetadata } from "./_RepositoryMetadata"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a create repository operation.

- */ -export interface CreateRepositoryOutput { - /** - *

Information about the newly created repository.

- */ - repositoryMetadata?: _UnmarshalledRepositoryMetadata; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/DefaultBranchCannotBeDeletedException.ts b/packages/model-codecommit-v1/DefaultBranchCannotBeDeletedException.ts deleted file mode 100644 index 190f67f30b7f2..0000000000000 --- a/packages/model-codecommit-v1/DefaultBranchCannotBeDeletedException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified branch is the default branch for the repository, and cannot be deleted. To delete this branch, you must first set another branch as the default branch.

- */ -export interface DefaultBranchCannotBeDeletedException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/DeleteBranchInput.ts b/packages/model-codecommit-v1/DeleteBranchInput.ts deleted file mode 100644 index e0c0ea939a8e6..0000000000000 --- a/packages/model-codecommit-v1/DeleteBranchInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - *

Represents the input of a delete branch operation.

- */ -export interface DeleteBranchInput { - /** - *

The name of the repository that contains the branch to be deleted.

- */ - repositoryName: string; - - /** - *

The name of the branch to delete.

- */ - branchName: string; -} diff --git a/packages/model-codecommit-v1/DeleteBranchOutput.ts b/packages/model-codecommit-v1/DeleteBranchOutput.ts deleted file mode 100644 index 03eca6f54ecfc..0000000000000 --- a/packages/model-codecommit-v1/DeleteBranchOutput.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { _UnmarshalledBranchInfo } from "./_BranchInfo"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a delete branch operation.

- */ -export interface DeleteBranchOutput { - /** - *

Information about the branch deleted by the operation, including the branch name and the commit ID that was the tip of the branch.

- */ - deletedBranch?: _UnmarshalledBranchInfo; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/DeleteRepositoryInput.ts b/packages/model-codecommit-v1/DeleteRepositoryInput.ts deleted file mode 100644 index 2de9e8bbf8e57..0000000000000 --- a/packages/model-codecommit-v1/DeleteRepositoryInput.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - *

Represents the input of a delete repository operation.

- */ -export interface DeleteRepositoryInput { - /** - *

The name of the repository to delete.

- */ - repositoryName: string; -} diff --git a/packages/model-codecommit-v1/DeleteRepositoryOutput.ts b/packages/model-codecommit-v1/DeleteRepositoryOutput.ts deleted file mode 100644 index 3e673965d3a4d..0000000000000 --- a/packages/model-codecommit-v1/DeleteRepositoryOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a delete repository operation.

- */ -export interface DeleteRepositoryOutput { - /** - *

The ID of the repository that was deleted.

- */ - repositoryId?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/EncryptionIntegrityChecksFailedException.ts b/packages/model-codecommit-v1/EncryptionIntegrityChecksFailedException.ts deleted file mode 100644 index 506c8452fa11b..0000000000000 --- a/packages/model-codecommit-v1/EncryptionIntegrityChecksFailedException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

An encryption integrity check failed.

- */ -export interface EncryptionIntegrityChecksFailedException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/EncryptionKeyAccessDeniedException.ts b/packages/model-codecommit-v1/EncryptionKeyAccessDeniedException.ts deleted file mode 100644 index 98a5862665039..0000000000000 --- a/packages/model-codecommit-v1/EncryptionKeyAccessDeniedException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

An encryption key could not be accessed.

- */ -export interface EncryptionKeyAccessDeniedException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/EncryptionKeyDisabledException.ts b/packages/model-codecommit-v1/EncryptionKeyDisabledException.ts deleted file mode 100644 index ba3430deaf334..0000000000000 --- a/packages/model-codecommit-v1/EncryptionKeyDisabledException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The encryption key is disabled.

- */ -export interface EncryptionKeyDisabledException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/EncryptionKeyNotFoundException.ts b/packages/model-codecommit-v1/EncryptionKeyNotFoundException.ts deleted file mode 100644 index 1019589e9ac71..0000000000000 --- a/packages/model-codecommit-v1/EncryptionKeyNotFoundException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

No encryption key was found.

- */ -export interface EncryptionKeyNotFoundException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/EncryptionKeyUnavailableException.ts b/packages/model-codecommit-v1/EncryptionKeyUnavailableException.ts deleted file mode 100644 index a104d4e781247..0000000000000 --- a/packages/model-codecommit-v1/EncryptionKeyUnavailableException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The encryption key is not available.

- */ -export interface EncryptionKeyUnavailableException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/FileTooLargeException.ts b/packages/model-codecommit-v1/FileTooLargeException.ts deleted file mode 100644 index 3b18903fbeff9..0000000000000 --- a/packages/model-codecommit-v1/FileTooLargeException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified file exceeds the file size limit for AWS CodeCommit. For more information about limits in AWS CodeCommit, see AWS CodeCommit User Guide.

- */ -export interface FileTooLargeException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/GetBlobInput.ts b/packages/model-codecommit-v1/GetBlobInput.ts deleted file mode 100644 index 20ba668494b0d..0000000000000 --- a/packages/model-codecommit-v1/GetBlobInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - *

Represents the input of a get blob operation.

- */ -export interface GetBlobInput { - /** - *

The name of the repository that contains the blob.

- */ - repositoryName: string; - - /** - *

The ID of the blob, which is its SHA-1 pointer.

- */ - blobId: string; -} diff --git a/packages/model-codecommit-v1/GetBlobOutput.ts b/packages/model-codecommit-v1/GetBlobOutput.ts deleted file mode 100644 index 79531e89f3e8f..0000000000000 --- a/packages/model-codecommit-v1/GetBlobOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a get blob operation.

- */ -export interface GetBlobOutput { - /** - *

The content of the blob, usually a file.

- */ - content: Uint8Array; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/GetBranchInput.ts b/packages/model-codecommit-v1/GetBranchInput.ts deleted file mode 100644 index 81305487ca41f..0000000000000 --- a/packages/model-codecommit-v1/GetBranchInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - *

Represents the input of a get branch operation.

- */ -export interface GetBranchInput { - /** - *

The name of the repository that contains the branch for which you want to retrieve information.

- */ - repositoryName?: string; - - /** - *

The name of the branch for which you want to retrieve information.

- */ - branchName?: string; -} diff --git a/packages/model-codecommit-v1/GetBranchOutput.ts b/packages/model-codecommit-v1/GetBranchOutput.ts deleted file mode 100644 index ee41482a2f1a2..0000000000000 --- a/packages/model-codecommit-v1/GetBranchOutput.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { _UnmarshalledBranchInfo } from "./_BranchInfo"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a get branch operation.

- */ -export interface GetBranchOutput { - /** - *

The name of the branch.

- */ - branch?: _UnmarshalledBranchInfo; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/GetCommitInput.ts b/packages/model-codecommit-v1/GetCommitInput.ts deleted file mode 100644 index 6b146e4d09007..0000000000000 --- a/packages/model-codecommit-v1/GetCommitInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - *

Represents the input of a get commit operation.

- */ -export interface GetCommitInput { - /** - *

The name of the repository to which the commit was made.

- */ - repositoryName: string; - - /** - *

The commit ID. Commit IDs are the full SHA of the commit.

- */ - commitId: string; -} diff --git a/packages/model-codecommit-v1/GetCommitOutput.ts b/packages/model-codecommit-v1/GetCommitOutput.ts deleted file mode 100644 index aa63942f78ae0..0000000000000 --- a/packages/model-codecommit-v1/GetCommitOutput.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { _UnmarshalledCommit } from "./_Commit"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a get commit operation.

- */ -export interface GetCommitOutput { - /** - *

A commit data type object that contains information about the specified commit.

- */ - commit: _UnmarshalledCommit; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/GetDifferencesInput.ts b/packages/model-codecommit-v1/GetDifferencesInput.ts deleted file mode 100644 index 44d6533043edc..0000000000000 --- a/packages/model-codecommit-v1/GetDifferencesInput.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GetDifferencesInput shape - */ -export interface GetDifferencesInput { - /** - *

The name of the repository where you want to get differences.

- */ - repositoryName: string; - - /** - *

The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, the full commit ID. Optional. If not specified, all changes prior to the afterCommitSpecifier value will be shown. If you do not use beforeCommitSpecifier in your request, consider limiting the results with maxResults.

- */ - beforeCommitSpecifier?: string; - - /** - *

The branch, tag, HEAD, or other fully qualified reference used to identify a commit.

- */ - afterCommitSpecifier: string; - - /** - *

The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If beforePath and afterPath are not specified, differences will be shown for all paths.

- */ - beforePath?: string; - - /** - *

The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences will be shown for all paths.

- */ - afterPath?: string; - - /** - *

A non-negative integer used to limit the number of returned results.

- */ - MaxResults?: number; - - /** - *

An enumeration token that when provided in a request, returns the next batch of the results.

- */ - NextToken?: string; -} diff --git a/packages/model-codecommit-v1/GetDifferencesOutput.ts b/packages/model-codecommit-v1/GetDifferencesOutput.ts deleted file mode 100644 index 73942856cedf2..0000000000000 --- a/packages/model-codecommit-v1/GetDifferencesOutput.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { _UnmarshalledDifference } from "./_Difference"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - * GetDifferencesOutput shape - */ -export interface GetDifferencesOutput { - /** - *

A differences data type object that contains information about the differences, including whether the difference is added, modified, or deleted (A, D, M).

- */ - differences?: Array<_UnmarshalledDifference>; - - /** - *

An enumeration token that can be used in a request to return the next batch of the results.

- */ - NextToken?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/GetRepositoryInput.ts b/packages/model-codecommit-v1/GetRepositoryInput.ts deleted file mode 100644 index 89f86db3954df..0000000000000 --- a/packages/model-codecommit-v1/GetRepositoryInput.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - *

Represents the input of a get repository operation.

- */ -export interface GetRepositoryInput { - /** - *

The name of the repository to get information about.

- */ - repositoryName: string; -} diff --git a/packages/model-codecommit-v1/GetRepositoryOutput.ts b/packages/model-codecommit-v1/GetRepositoryOutput.ts deleted file mode 100644 index 6e48fc5fb8614..0000000000000 --- a/packages/model-codecommit-v1/GetRepositoryOutput.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { _UnmarshalledRepositoryMetadata } from "./_RepositoryMetadata"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a get repository operation.

- */ -export interface GetRepositoryOutput { - /** - *

Information about the repository.

- */ - repositoryMetadata?: _UnmarshalledRepositoryMetadata; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/GetRepositoryTriggersInput.ts b/packages/model-codecommit-v1/GetRepositoryTriggersInput.ts deleted file mode 100644 index cd4646d5ff6de..0000000000000 --- a/packages/model-codecommit-v1/GetRepositoryTriggersInput.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - *

Represents the input of a get repository triggers operation.

- */ -export interface GetRepositoryTriggersInput { - /** - *

The name of the repository for which the trigger is configured.

- */ - repositoryName: string; -} diff --git a/packages/model-codecommit-v1/GetRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/GetRepositoryTriggersOutput.ts deleted file mode 100644 index 16d82dc5358fe..0000000000000 --- a/packages/model-codecommit-v1/GetRepositoryTriggersOutput.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { _UnmarshalledRepositoryTrigger } from "./_RepositoryTrigger"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a get repository triggers operation.

- */ -export interface GetRepositoryTriggersOutput { - /** - *

The system-generated unique ID for the trigger.

- */ - configurationId?: string; - - /** - *

The JSON block of configuration information for each trigger.

- */ - triggers?: Array<_UnmarshalledRepositoryTrigger>; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InputTypesUnion.ts b/packages/model-codecommit-v1/InputTypesUnion.ts deleted file mode 100644 index 7f14b917bd793..0000000000000 --- a/packages/model-codecommit-v1/InputTypesUnion.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BatchGetRepositoriesInput } from "./BatchGetRepositoriesInput"; -import { CreateBranchInput } from "./CreateBranchInput"; -import { CreateRepositoryInput } from "./CreateRepositoryInput"; -import { DeleteBranchInput } from "./DeleteBranchInput"; -import { DeleteRepositoryInput } from "./DeleteRepositoryInput"; -import { GetBlobInput } from "./GetBlobInput"; -import { GetBranchInput } from "./GetBranchInput"; -import { GetCommitInput } from "./GetCommitInput"; -import { GetDifferencesInput } from "./GetDifferencesInput"; -import { GetRepositoryInput } from "./GetRepositoryInput"; -import { GetRepositoryTriggersInput } from "./GetRepositoryTriggersInput"; -import { ListBranchesInput } from "./ListBranchesInput"; -import { ListRepositoriesInput } from "./ListRepositoriesInput"; -import { PutRepositoryTriggersInput } from "./PutRepositoryTriggersInput"; -import { TestRepositoryTriggersInput } from "./TestRepositoryTriggersInput"; -import { UpdateDefaultBranchInput } from "./UpdateDefaultBranchInput"; -import { UpdateRepositoryDescriptionInput } from "./UpdateRepositoryDescriptionInput"; -import { UpdateRepositoryNameInput } from "./UpdateRepositoryNameInput"; - -export type InputTypesUnion = - | BatchGetRepositoriesInput - | CreateBranchInput - | CreateRepositoryInput - | DeleteBranchInput - | DeleteRepositoryInput - | GetBlobInput - | GetBranchInput - | GetCommitInput - | GetDifferencesInput - | GetRepositoryInput - | GetRepositoryTriggersInput - | ListBranchesInput - | ListRepositoriesInput - | PutRepositoryTriggersInput - | TestRepositoryTriggersInput - | UpdateDefaultBranchInput - | UpdateRepositoryDescriptionInput - | UpdateRepositoryNameInput; diff --git a/packages/model-codecommit-v1/InvalidBlobIdException.ts b/packages/model-codecommit-v1/InvalidBlobIdException.ts deleted file mode 100644 index 7bfaf88480b50..0000000000000 --- a/packages/model-codecommit-v1/InvalidBlobIdException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified blob is not valid.

- */ -export interface InvalidBlobIdException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidBranchNameException.ts b/packages/model-codecommit-v1/InvalidBranchNameException.ts deleted file mode 100644 index 33afc2260bf26..0000000000000 --- a/packages/model-codecommit-v1/InvalidBranchNameException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified branch name is not valid.

- */ -export interface InvalidBranchNameException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidCommitException.ts b/packages/model-codecommit-v1/InvalidCommitException.ts deleted file mode 100644 index 3aaba5aeb9855..0000000000000 --- a/packages/model-codecommit-v1/InvalidCommitException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified commit is not valid.

- */ -export interface InvalidCommitException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidCommitIdException.ts b/packages/model-codecommit-v1/InvalidCommitIdException.ts deleted file mode 100644 index 6b861066e3625..0000000000000 --- a/packages/model-codecommit-v1/InvalidCommitIdException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified commit ID is not valid.

- */ -export interface InvalidCommitIdException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidContinuationTokenException.ts b/packages/model-codecommit-v1/InvalidContinuationTokenException.ts deleted file mode 100644 index 37487209619b0..0000000000000 --- a/packages/model-codecommit-v1/InvalidContinuationTokenException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified continuation token is not valid.

- */ -export interface InvalidContinuationTokenException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidMaxResultsException.ts b/packages/model-codecommit-v1/InvalidMaxResultsException.ts deleted file mode 100644 index 6d78c08144275..0000000000000 --- a/packages/model-codecommit-v1/InvalidMaxResultsException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified number of maximum results is not valid.

- */ -export interface InvalidMaxResultsException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidOrderException.ts b/packages/model-codecommit-v1/InvalidOrderException.ts deleted file mode 100644 index 30ffd705ceb77..0000000000000 --- a/packages/model-codecommit-v1/InvalidOrderException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified sort order is not valid.

- */ -export interface InvalidOrderException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidPathException.ts b/packages/model-codecommit-v1/InvalidPathException.ts deleted file mode 100644 index f2988a9c9b8a1..0000000000000 --- a/packages/model-codecommit-v1/InvalidPathException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified path is not valid.

- */ -export interface InvalidPathException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidRepositoryDescriptionException.ts b/packages/model-codecommit-v1/InvalidRepositoryDescriptionException.ts deleted file mode 100644 index 7d29bc20b8cd5..0000000000000 --- a/packages/model-codecommit-v1/InvalidRepositoryDescriptionException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified repository description is not valid.

- */ -export interface InvalidRepositoryDescriptionException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidRepositoryNameException.ts b/packages/model-codecommit-v1/InvalidRepositoryNameException.ts deleted file mode 100644 index 91aca5eaf9b23..0000000000000 --- a/packages/model-codecommit-v1/InvalidRepositoryNameException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

At least one specified repository name is not valid.

This exception only occurs when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist.

- */ -export interface InvalidRepositoryNameException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerBranchNameException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerBranchNameException.ts deleted file mode 100644 index dbddc540ac03e..0000000000000 --- a/packages/model-codecommit-v1/InvalidRepositoryTriggerBranchNameException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

One or more branch names specified for the trigger is not valid.

- */ -export interface InvalidRepositoryTriggerBranchNameException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerCustomDataException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerCustomDataException.ts deleted file mode 100644 index 89df3a2b42ad6..0000000000000 --- a/packages/model-codecommit-v1/InvalidRepositoryTriggerCustomDataException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The custom data provided for the trigger is not valid.

- */ -export interface InvalidRepositoryTriggerCustomDataException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerDestinationArnException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerDestinationArnException.ts deleted file mode 100644 index d238ae0bd520d..0000000000000 --- a/packages/model-codecommit-v1/InvalidRepositoryTriggerDestinationArnException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The Amazon Resource Name (ARN) for the trigger is not valid for the specified destination. The most common reason for this error is that the ARN does not meet the requirements for the service type.

- */ -export interface InvalidRepositoryTriggerDestinationArnException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerEventsException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerEventsException.ts deleted file mode 100644 index 71e04f53f6cb8..0000000000000 --- a/packages/model-codecommit-v1/InvalidRepositoryTriggerEventsException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

One or more events specified for the trigger is not valid. Check to make sure that all events specified match the requirements for allowed events.

- */ -export interface InvalidRepositoryTriggerEventsException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerNameException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerNameException.ts deleted file mode 100644 index ffc1f0699228c..0000000000000 --- a/packages/model-codecommit-v1/InvalidRepositoryTriggerNameException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The name of the trigger is not valid.

- */ -export interface InvalidRepositoryTriggerNameException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerRegionException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerRegionException.ts deleted file mode 100644 index efb25ad6636a2..0000000000000 --- a/packages/model-codecommit-v1/InvalidRepositoryTriggerRegionException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The region for the trigger target does not match the region for the repository. Triggers must be created in the same region as the target for the trigger.

- */ -export interface InvalidRepositoryTriggerRegionException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/InvalidSortByException.ts b/packages/model-codecommit-v1/InvalidSortByException.ts deleted file mode 100644 index 8db2e18d12565..0000000000000 --- a/packages/model-codecommit-v1/InvalidSortByException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified sort by value is not valid.

- */ -export interface InvalidSortByException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/LICENSE b/packages/model-codecommit-v1/LICENSE deleted file mode 100644 index ad410e1130210..0000000000000 --- a/packages/model-codecommit-v1/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/model-codecommit-v1/ListBranchesInput.ts b/packages/model-codecommit-v1/ListBranchesInput.ts deleted file mode 100644 index 698789e96a2ed..0000000000000 --- a/packages/model-codecommit-v1/ListBranchesInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - *

Represents the input of a list branches operation.

- */ -export interface ListBranchesInput { - /** - *

The name of the repository that contains the branches.

- */ - repositoryName: string; - - /** - *

An enumeration token that allows the operation to batch the results.

- */ - nextToken?: string; -} diff --git a/packages/model-codecommit-v1/ListBranchesOutput.ts b/packages/model-codecommit-v1/ListBranchesOutput.ts deleted file mode 100644 index c63dedb0d49f0..0000000000000 --- a/packages/model-codecommit-v1/ListBranchesOutput.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a list branches operation.

- */ -export interface ListBranchesOutput { - /** - *

The list of branch names.

- */ - branches?: Array; - - /** - *

An enumeration token that returns the batch of the results.

- */ - nextToken?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/ListRepositoriesInput.ts b/packages/model-codecommit-v1/ListRepositoriesInput.ts deleted file mode 100644 index 4229f045261ad..0000000000000 --- a/packages/model-codecommit-v1/ListRepositoriesInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - *

Represents the input of a list repositories operation.

- */ -export interface ListRepositoriesInput { - /** - *

An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.

- */ - nextToken?: string; - - /** - *

The criteria used to sort the results of a list repositories operation.

- */ - sortBy?: "repositoryName" | "lastModifiedDate" | string; - - /** - *

The order in which to sort the results of a list repositories operation.

- */ - order?: "ascending" | "descending" | string; -} diff --git a/packages/model-codecommit-v1/ListRepositoriesOutput.ts b/packages/model-codecommit-v1/ListRepositoriesOutput.ts deleted file mode 100644 index 3d9f9b9662c40..0000000000000 --- a/packages/model-codecommit-v1/ListRepositoriesOutput.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { _UnmarshalledRepositoryNameIdPair } from "./_RepositoryNameIdPair"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a list repositories operation.

- */ -export interface ListRepositoriesOutput { - /** - *

Lists the repositories called by the list repositories operation.

- */ - repositories?: Array<_UnmarshalledRepositoryNameIdPair>; - - /** - *

An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.

- */ - nextToken?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/MaximumBranchesExceededException.ts b/packages/model-codecommit-v1/MaximumBranchesExceededException.ts deleted file mode 100644 index b3abbcdb88239..0000000000000 --- a/packages/model-codecommit-v1/MaximumBranchesExceededException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The number of branches for the trigger was exceeded.

- */ -export interface MaximumBranchesExceededException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/MaximumRepositoryNamesExceededException.ts b/packages/model-codecommit-v1/MaximumRepositoryNamesExceededException.ts deleted file mode 100644 index 0806fd09e6b6f..0000000000000 --- a/packages/model-codecommit-v1/MaximumRepositoryNamesExceededException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The maximum number of allowed repository names was exceeded. Currently, this number is 25.

- */ -export interface MaximumRepositoryNamesExceededException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/MaximumRepositoryTriggersExceededException.ts b/packages/model-codecommit-v1/MaximumRepositoryTriggersExceededException.ts deleted file mode 100644 index a41536b3b521d..0000000000000 --- a/packages/model-codecommit-v1/MaximumRepositoryTriggersExceededException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The number of triggers allowed for the repository was exceeded.

- */ -export interface MaximumRepositoryTriggersExceededException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/OutputTypesUnion.ts b/packages/model-codecommit-v1/OutputTypesUnion.ts deleted file mode 100644 index 104706da6bd44..0000000000000 --- a/packages/model-codecommit-v1/OutputTypesUnion.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BatchGetRepositoriesOutput } from "./BatchGetRepositoriesOutput"; -import { CreateBranchOutput } from "./CreateBranchOutput"; -import { CreateRepositoryOutput } from "./CreateRepositoryOutput"; -import { DeleteBranchOutput } from "./DeleteBranchOutput"; -import { DeleteRepositoryOutput } from "./DeleteRepositoryOutput"; -import { GetBlobOutput } from "./GetBlobOutput"; -import { GetBranchOutput } from "./GetBranchOutput"; -import { GetCommitOutput } from "./GetCommitOutput"; -import { GetDifferencesOutput } from "./GetDifferencesOutput"; -import { GetRepositoryOutput } from "./GetRepositoryOutput"; -import { GetRepositoryTriggersOutput } from "./GetRepositoryTriggersOutput"; -import { ListBranchesOutput } from "./ListBranchesOutput"; -import { ListRepositoriesOutput } from "./ListRepositoriesOutput"; -import { PutRepositoryTriggersOutput } from "./PutRepositoryTriggersOutput"; -import { TestRepositoryTriggersOutput } from "./TestRepositoryTriggersOutput"; -import { UpdateDefaultBranchOutput } from "./UpdateDefaultBranchOutput"; -import { UpdateRepositoryDescriptionOutput } from "./UpdateRepositoryDescriptionOutput"; -import { UpdateRepositoryNameOutput } from "./UpdateRepositoryNameOutput"; - -export type OutputTypesUnion = - | BatchGetRepositoriesOutput - | CreateBranchOutput - | CreateRepositoryOutput - | DeleteBranchOutput - | DeleteRepositoryOutput - | GetBlobOutput - | GetBranchOutput - | GetCommitOutput - | GetDifferencesOutput - | GetRepositoryOutput - | GetRepositoryTriggersOutput - | ListBranchesOutput - | ListRepositoriesOutput - | PutRepositoryTriggersOutput - | TestRepositoryTriggersOutput - | UpdateDefaultBranchOutput - | UpdateRepositoryDescriptionOutput - | UpdateRepositoryNameOutput; diff --git a/packages/model-codecommit-v1/PathDoesNotExistException.ts b/packages/model-codecommit-v1/PathDoesNotExistException.ts deleted file mode 100644 index bab93f9e0f222..0000000000000 --- a/packages/model-codecommit-v1/PathDoesNotExistException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified path does not exist.

- */ -export interface PathDoesNotExistException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/PutRepositoryTriggersInput.ts b/packages/model-codecommit-v1/PutRepositoryTriggersInput.ts deleted file mode 100644 index cbea5c5a1d227..0000000000000 --- a/packages/model-codecommit-v1/PutRepositoryTriggersInput.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { _RepositoryTrigger } from "./_RepositoryTrigger"; - -/** - *

Represents the input ofa put repository triggers operation.

- */ -export interface PutRepositoryTriggersInput { - /** - *

The name of the repository where you want to create or update the trigger.

- */ - repositoryName: string; - - /** - *

The JSON block of configuration information for each trigger.

- */ - triggers: Array<_RepositoryTrigger> | Iterable<_RepositoryTrigger>; -} diff --git a/packages/model-codecommit-v1/PutRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/PutRepositoryTriggersOutput.ts deleted file mode 100644 index 50fb14da75314..0000000000000 --- a/packages/model-codecommit-v1/PutRepositoryTriggersOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a put repository triggers operation.

- */ -export interface PutRepositoryTriggersOutput { - /** - *

The system-generated unique ID for the create or update operation.

- */ - configurationId?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/README.md b/packages/model-codecommit-v1/README.md deleted file mode 100644 index 2abc3b7c5bae2..0000000000000 --- a/packages/model-codecommit-v1/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# model-codecommit-v1 - -Service model for AWS CodeCommit \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryDoesNotExistException.ts b/packages/model-codecommit-v1/RepositoryDoesNotExistException.ts deleted file mode 100644 index d4953a9070739..0000000000000 --- a/packages/model-codecommit-v1/RepositoryDoesNotExistException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified repository does not exist.

- */ -export interface RepositoryDoesNotExistException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/RepositoryLimitExceededException.ts b/packages/model-codecommit-v1/RepositoryLimitExceededException.ts deleted file mode 100644 index 354c67b7ddb88..0000000000000 --- a/packages/model-codecommit-v1/RepositoryLimitExceededException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

A repository resource limit was exceeded.

- */ -export interface RepositoryLimitExceededException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/RepositoryNameExistsException.ts b/packages/model-codecommit-v1/RepositoryNameExistsException.ts deleted file mode 100644 index e15bde72a01d2..0000000000000 --- a/packages/model-codecommit-v1/RepositoryNameExistsException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The specified repository name already exists.

- */ -export interface RepositoryNameExistsException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/RepositoryNameRequiredException.ts b/packages/model-codecommit-v1/RepositoryNameRequiredException.ts deleted file mode 100644 index 568b5d2b3259a..0000000000000 --- a/packages/model-codecommit-v1/RepositoryNameRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

A repository name is required but was not specified.

- */ -export interface RepositoryNameRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/RepositoryNamesRequiredException.ts b/packages/model-codecommit-v1/RepositoryNamesRequiredException.ts deleted file mode 100644 index aeb2645947199..0000000000000 --- a/packages/model-codecommit-v1/RepositoryNamesRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

A repository names object is required but was not specified.

- */ -export interface RepositoryNamesRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/RepositoryTriggerBranchNameListRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggerBranchNameListRequiredException.ts deleted file mode 100644 index 401dd979c048d..0000000000000 --- a/packages/model-codecommit-v1/RepositoryTriggerBranchNameListRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

At least one branch name is required but was not specified in the trigger configuration.

- */ -export interface RepositoryTriggerBranchNameListRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/RepositoryTriggerDestinationArnRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggerDestinationArnRequiredException.ts deleted file mode 100644 index bb207d4d0d15c..0000000000000 --- a/packages/model-codecommit-v1/RepositoryTriggerDestinationArnRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

A destination ARN for the target service for the trigger is required but was not specified.

- */ -export interface RepositoryTriggerDestinationArnRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/RepositoryTriggerEventsListRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggerEventsListRequiredException.ts deleted file mode 100644 index d7b95dcdd1a11..0000000000000 --- a/packages/model-codecommit-v1/RepositoryTriggerEventsListRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

At least one event for the trigger is required but was not specified.

- */ -export interface RepositoryTriggerEventsListRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/RepositoryTriggerNameRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggerNameRequiredException.ts deleted file mode 100644 index f400338a90741..0000000000000 --- a/packages/model-codecommit-v1/RepositoryTriggerNameRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

A name for the trigger is required but was not specified.

- */ -export interface RepositoryTriggerNameRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/RepositoryTriggersListRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggersListRequiredException.ts deleted file mode 100644 index 5a31c7d37b931..0000000000000 --- a/packages/model-codecommit-v1/RepositoryTriggersListRequiredException.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

The list of triggers for the repository is required but was not specified.

- */ -export interface RepositoryTriggersListRequiredException { - /** - *

A trace of which functions were called leading to this error being raised.

- */ - stack?: string; - - /** - *

The species of error returned by the service.

- */ - name?: string; - - /** - *

Human-readable description of the error.

- */ - message?: string; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/TestRepositoryTriggersInput.ts b/packages/model-codecommit-v1/TestRepositoryTriggersInput.ts deleted file mode 100644 index 7d7d45e119db8..0000000000000 --- a/packages/model-codecommit-v1/TestRepositoryTriggersInput.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { _RepositoryTrigger } from "./_RepositoryTrigger"; - -/** - *

Represents the input of a test repository triggers operation.

- */ -export interface TestRepositoryTriggersInput { - /** - *

The name of the repository in which to test the triggers.

- */ - repositoryName: string; - - /** - *

The list of triggers to test.

- */ - triggers: Array<_RepositoryTrigger> | Iterable<_RepositoryTrigger>; -} diff --git a/packages/model-codecommit-v1/TestRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/TestRepositoryTriggersOutput.ts deleted file mode 100644 index b429de0364fe9..0000000000000 --- a/packages/model-codecommit-v1/TestRepositoryTriggersOutput.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { _UnmarshalledRepositoryTriggerExecutionFailure } from "./_RepositoryTriggerExecutionFailure"; -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - *

Represents the output of a test repository triggers operation.

- */ -export interface TestRepositoryTriggersOutput { - /** - *

The list of triggers that were successfully tested. This list provides the names of the triggers that were successfully tested, separated by commas.

- */ - successfulExecutions?: Array; - - /** - *

The list of triggers that were not able to be tested. This list provides the names of the triggers that could not be tested, separated by commas.

- */ - failedExecutions?: Array<_UnmarshalledRepositoryTriggerExecutionFailure>; - - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/UpdateDefaultBranchInput.ts b/packages/model-codecommit-v1/UpdateDefaultBranchInput.ts deleted file mode 100644 index 1dcd93d28d17c..0000000000000 --- a/packages/model-codecommit-v1/UpdateDefaultBranchInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - *

Represents the input of an update default branch operation.

- */ -export interface UpdateDefaultBranchInput { - /** - *

The name of the repository to set or change the default branch for.

- */ - repositoryName: string; - - /** - *

The name of the branch to set as the default.

- */ - defaultBranchName: string; -} diff --git a/packages/model-codecommit-v1/UpdateDefaultBranchOutput.ts b/packages/model-codecommit-v1/UpdateDefaultBranchOutput.ts deleted file mode 100644 index b9c8fab00bfb2..0000000000000 --- a/packages/model-codecommit-v1/UpdateDefaultBranchOutput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - * UpdateDefaultBranchOutput shape - */ -export interface UpdateDefaultBranchOutput { - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/UpdateRepositoryDescriptionInput.ts b/packages/model-codecommit-v1/UpdateRepositoryDescriptionInput.ts deleted file mode 100644 index 923decb3c04de..0000000000000 --- a/packages/model-codecommit-v1/UpdateRepositoryDescriptionInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - *

Represents the input of an update repository description operation.

- */ -export interface UpdateRepositoryDescriptionInput { - /** - *

The name of the repository to set or change the comment or description for.

- */ - repositoryName: string; - - /** - *

The new comment or description for the specified repository. Repository descriptions are limited to 1,000 characters.

- */ - repositoryDescription?: string; -} diff --git a/packages/model-codecommit-v1/UpdateRepositoryDescriptionOutput.ts b/packages/model-codecommit-v1/UpdateRepositoryDescriptionOutput.ts deleted file mode 100644 index 6964183d5bce9..0000000000000 --- a/packages/model-codecommit-v1/UpdateRepositoryDescriptionOutput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - * UpdateRepositoryDescriptionOutput shape - */ -export interface UpdateRepositoryDescriptionOutput { - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/UpdateRepositoryNameInput.ts b/packages/model-codecommit-v1/UpdateRepositoryNameInput.ts deleted file mode 100644 index fc070305fc784..0000000000000 --- a/packages/model-codecommit-v1/UpdateRepositoryNameInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - *

Represents the input of an update repository description operation.

- */ -export interface UpdateRepositoryNameInput { - /** - *

The existing name of the repository.

- */ - oldName: string; - - /** - *

The new name for the repository.

- */ - newName: string; -} diff --git a/packages/model-codecommit-v1/UpdateRepositoryNameOutput.ts b/packages/model-codecommit-v1/UpdateRepositoryNameOutput.ts deleted file mode 100644 index ad387cd63a736..0000000000000 --- a/packages/model-codecommit-v1/UpdateRepositoryNameOutput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; - -/** - * UpdateRepositoryNameOutput shape - */ -export interface UpdateRepositoryNameOutput { - /** - * Metadata about the response received, including the HTTP status code, HTTP - * headers, and any request identifiers recognized by the SDK. - */ - $metadata: __ResponseMetadata__; -} diff --git a/packages/model-codecommit-v1/_BlobMetadata.ts b/packages/model-codecommit-v1/_BlobMetadata.ts deleted file mode 100644 index e0b2c771775e3..0000000000000 --- a/packages/model-codecommit-v1/_BlobMetadata.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - *

Returns information about a specific Git blob object.

- */ -export interface _BlobMetadata { - /** - *

The full ID of the blob.

- */ - blobId?: string; - - /** - *

The path to the blob and any associated file name, if any.

- */ - path?: string; - - /** - *

The file mode permissions of the blob. File mode permission codes include:

  • 100644 indicates read/write

  • 100755 indicates read/write/execute

  • 160000 indicates a submodule

  • 120000 indicates a symlink

- */ - mode?: string; -} - -export type _UnmarshalledBlobMetadata = _BlobMetadata; diff --git a/packages/model-codecommit-v1/_BranchInfo.ts b/packages/model-codecommit-v1/_BranchInfo.ts deleted file mode 100644 index 073e5f837342a..0000000000000 --- a/packages/model-codecommit-v1/_BranchInfo.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - *

Returns information about a branch.

- */ -export interface _BranchInfo { - /** - *

The name of the branch.

- */ - branchName?: string; - - /** - *

The ID of the last commit made to the branch.

- */ - commitId?: string; -} - -export type _UnmarshalledBranchInfo = _BranchInfo; diff --git a/packages/model-codecommit-v1/_Commit.ts b/packages/model-codecommit-v1/_Commit.ts deleted file mode 100644 index 77d73ba100d0d..0000000000000 --- a/packages/model-codecommit-v1/_Commit.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { _UserInfo, _UnmarshalledUserInfo } from "./_UserInfo"; - -/** - *

Returns information about a specific commit.

- */ -export interface _Commit { - /** - *

The full SHA of the specified commit.

- */ - commitId?: string; - - /** - *

Tree information for the specified commit.

- */ - treeId?: string; - - /** - *

The parent list for the specified commit.

- */ - parents?: Array | Iterable; - - /** - *

The commit message associated with the specified commit.

- */ - message?: string; - - /** - *

Information about the author of the specified commit. Information includes the date in timestamp format with GMT offset, the name of the author, and the email address for the author, as configured in Git.

- */ - author?: _UserInfo; - - /** - *

Information about the person who committed the specified commit, also known as the committer. Information includes the date in timestamp format with GMT offset, the name of the committer, and the email address for the committer, as configured in Git.

For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.

- */ - committer?: _UserInfo; - - /** - *

Any additional data associated with the specified commit.

- */ - additionalData?: string; -} - -export interface _UnmarshalledCommit extends _Commit { - /** - *

The parent list for the specified commit.

- */ - parents?: Array; - - /** - *

Information about the author of the specified commit. Information includes the date in timestamp format with GMT offset, the name of the author, and the email address for the author, as configured in Git.

- */ - author?: _UnmarshalledUserInfo; - - /** - *

Information about the person who committed the specified commit, also known as the committer. Information includes the date in timestamp format with GMT offset, the name of the committer, and the email address for the committer, as configured in Git.

For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.

- */ - committer?: _UnmarshalledUserInfo; -} diff --git a/packages/model-codecommit-v1/_Difference.ts b/packages/model-codecommit-v1/_Difference.ts deleted file mode 100644 index a1be231877726..0000000000000 --- a/packages/model-codecommit-v1/_Difference.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { _BlobMetadata, _UnmarshalledBlobMetadata } from "./_BlobMetadata"; - -/** - *

Returns information about a set of differences for a commit specifier.

- */ -export interface _Difference { - /** - *

Information about a beforeBlob data type object, including the ID, the file mode permission code, and the path.

- */ - beforeBlob?: _BlobMetadata; - - /** - *

Information about an afterBlob data type object, including the ID, the file mode permission code, and the path.

- */ - afterBlob?: _BlobMetadata; - - /** - *

Whether the change type of the difference is an addition (A), deletion (D), or modification (M).

- */ - changeType?: "A" | "M" | "D" | string; -} - -export interface _UnmarshalledDifference extends _Difference { - /** - *

Information about a beforeBlob data type object, including the ID, the file mode permission code, and the path.

- */ - beforeBlob?: _UnmarshalledBlobMetadata; - - /** - *

Information about an afterBlob data type object, including the ID, the file mode permission code, and the path.

- */ - afterBlob?: _UnmarshalledBlobMetadata; -} diff --git a/packages/model-codecommit-v1/_RepositoryMetadata.ts b/packages/model-codecommit-v1/_RepositoryMetadata.ts deleted file mode 100644 index 3899092b41748..0000000000000 --- a/packages/model-codecommit-v1/_RepositoryMetadata.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - *

Information about a repository.

- */ -export interface _RepositoryMetadata { - /** - *

The ID of the AWS account associated with the repository.

- */ - accountId?: string; - - /** - *

The ID of the repository.

- */ - repositoryId?: string; - - /** - *

The repository's name.

- */ - repositoryName?: string; - - /** - *

A comment or description about the repository.

- */ - repositoryDescription?: string; - - /** - *

The repository's default branch name.

- */ - defaultBranch?: string; - - /** - *

The date and time the repository was last modified, in timestamp format.

- */ - lastModifiedDate?: Date | string | number; - - /** - *

The date and time the repository was created, in timestamp format.

- */ - creationDate?: Date | string | number; - - /** - *

The URL to use for cloning the repository over HTTPS.

- */ - cloneUrlHttp?: string; - - /** - *

The URL to use for cloning the repository over SSH.

- */ - cloneUrlSsh?: string; - - /** - *

The Amazon Resource Name (ARN) of the repository.

- */ - Arn?: string; -} - -export interface _UnmarshalledRepositoryMetadata extends _RepositoryMetadata { - /** - *

The date and time the repository was last modified, in timestamp format.

- */ - lastModifiedDate?: Date; - - /** - *

The date and time the repository was created, in timestamp format.

- */ - creationDate?: Date; -} diff --git a/packages/model-codecommit-v1/_RepositoryNameIdPair.ts b/packages/model-codecommit-v1/_RepositoryNameIdPair.ts deleted file mode 100644 index 6492a87534157..0000000000000 --- a/packages/model-codecommit-v1/_RepositoryNameIdPair.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - *

Information about a repository name and ID.

- */ -export interface _RepositoryNameIdPair { - /** - *

The name associated with the repository.

- */ - repositoryName?: string; - - /** - *

The ID associated with the repository.

- */ - repositoryId?: string; -} - -export type _UnmarshalledRepositoryNameIdPair = _RepositoryNameIdPair; diff --git a/packages/model-codecommit-v1/_RepositoryTrigger.ts b/packages/model-codecommit-v1/_RepositoryTrigger.ts deleted file mode 100644 index da1f59cc007a3..0000000000000 --- a/packages/model-codecommit-v1/_RepositoryTrigger.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - *

Information about a trigger for a repository.

- */ -export interface _RepositoryTrigger { - /** - *

The name of the trigger.

- */ - name: string; - - /** - *

The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

- */ - destinationArn: string; - - /** - *

Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

- */ - customData?: string; - - /** - *

The branches that will be included in the trigger configuration. If you specify an empty array, the trigger will apply to all branches.

While no content is required in the array, you must include the array itself.

- */ - branches?: Array | Iterable; - - /** - *

The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS).

The valid value "all" cannot be used with any other values.

- */ - events: - | Array< - | "all" - | "updateReference" - | "createReference" - | "deleteReference" - | string - > - | Iterable< - | "all" - | "updateReference" - | "createReference" - | "deleteReference" - | string - >; -} - -export interface _UnmarshalledRepositoryTrigger extends _RepositoryTrigger { - /** - *

The branches that will be included in the trigger configuration. If you specify an empty array, the trigger will apply to all branches.

While no content is required in the array, you must include the array itself.

- */ - branches?: Array; - - /** - *

The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS).

The valid value "all" cannot be used with any other values.

- */ - events: Array< - "all" | "updateReference" | "createReference" | "deleteReference" | string - >; -} diff --git a/packages/model-codecommit-v1/_RepositoryTriggerExecutionFailure.ts b/packages/model-codecommit-v1/_RepositoryTriggerExecutionFailure.ts deleted file mode 100644 index 1b0d033959163..0000000000000 --- a/packages/model-codecommit-v1/_RepositoryTriggerExecutionFailure.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - *

A trigger failed to run.

- */ -export interface _RepositoryTriggerExecutionFailure { - /** - *

The name of the trigger that did not run.

- */ - trigger?: string; - - /** - *

Additional message information about the trigger that did not run.

- */ - failureMessage?: string; -} - -export type _UnmarshalledRepositoryTriggerExecutionFailure = _RepositoryTriggerExecutionFailure; diff --git a/packages/model-codecommit-v1/_UserInfo.ts b/packages/model-codecommit-v1/_UserInfo.ts deleted file mode 100644 index e92c314d6e936..0000000000000 --- a/packages/model-codecommit-v1/_UserInfo.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - *

Information about the user who made a specified commit.

- */ -export interface _UserInfo { - /** - *

The name of the user who made the specified commit.

- */ - name?: string; - - /** - *

The email address associated with the user who made the commit, if any.

- */ - email?: string; - - /** - *

The date when the specified commit was pushed to the repository.

- */ - date?: string; -} - -export type _UnmarshalledUserInfo = _UserInfo; diff --git a/packages/model-codecommit-v1/model/BatchGetRepositories.ts b/packages/model-codecommit-v1/model/BatchGetRepositories.ts deleted file mode 100644 index 911313c33041b..0000000000000 --- a/packages/model-codecommit-v1/model/BatchGetRepositories.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { BatchGetRepositoriesInput } from "./BatchGetRepositoriesInput"; -import { BatchGetRepositoriesOutput } from "./BatchGetRepositoriesOutput"; -import { RepositoryNamesRequiredException } from "./RepositoryNamesRequiredException"; -import { MaximumRepositoryNamesExceededException } from "./MaximumRepositoryNamesExceededException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const BatchGetRepositories: _Operation_ = { - metadata: ServiceMetadata, - name: "BatchGetRepositories", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: BatchGetRepositoriesInput - }, - output: { - shape: BatchGetRepositoriesOutput - }, - errors: [ - { - shape: RepositoryNamesRequiredException - }, - { - shape: MaximumRepositoryNamesExceededException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/BatchGetRepositoriesInput.ts b/packages/model-codecommit-v1/model/BatchGetRepositoriesInput.ts deleted file mode 100644 index 2ed643667c935..0000000000000 --- a/packages/model-codecommit-v1/model/BatchGetRepositoriesInput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { _RepositoryNameList } from "./_RepositoryNameList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const BatchGetRepositoriesInput: _Structure_ = { - type: "structure", - required: ["repositoryNames"], - members: { - repositoryNames: { - shape: _RepositoryNameList - } - } -}; diff --git a/packages/model-codecommit-v1/model/BatchGetRepositoriesOutput.ts b/packages/model-codecommit-v1/model/BatchGetRepositoriesOutput.ts deleted file mode 100644 index 5bb94f4293da5..0000000000000 --- a/packages/model-codecommit-v1/model/BatchGetRepositoriesOutput.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { _RepositoryMetadataList } from "./_RepositoryMetadataList"; -import { _RepositoryNotFoundList } from "./_RepositoryNotFoundList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const BatchGetRepositoriesOutput: _Structure_ = { - type: "structure", - required: [], - members: { - repositories: { - shape: _RepositoryMetadataList - }, - repositoriesNotFound: { - shape: _RepositoryNotFoundList - } - } -}; diff --git a/packages/model-codecommit-v1/model/BlobIdDoesNotExistException.ts b/packages/model-codecommit-v1/model/BlobIdDoesNotExistException.ts deleted file mode 100644 index e48fbf0ee4d84..0000000000000 --- a/packages/model-codecommit-v1/model/BlobIdDoesNotExistException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const BlobIdDoesNotExistException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "BlobIdDoesNotExistException" -}; diff --git a/packages/model-codecommit-v1/model/BlobIdRequiredException.ts b/packages/model-codecommit-v1/model/BlobIdRequiredException.ts deleted file mode 100644 index 4f5e5e6cf92e0..0000000000000 --- a/packages/model-codecommit-v1/model/BlobIdRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const BlobIdRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "BlobIdRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/BranchDoesNotExistException.ts b/packages/model-codecommit-v1/model/BranchDoesNotExistException.ts deleted file mode 100644 index 8a0f3be8efb64..0000000000000 --- a/packages/model-codecommit-v1/model/BranchDoesNotExistException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const BranchDoesNotExistException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "BranchDoesNotExistException" -}; diff --git a/packages/model-codecommit-v1/model/BranchNameExistsException.ts b/packages/model-codecommit-v1/model/BranchNameExistsException.ts deleted file mode 100644 index 6b61c0c22442b..0000000000000 --- a/packages/model-codecommit-v1/model/BranchNameExistsException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const BranchNameExistsException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "BranchNameExistsException" -}; diff --git a/packages/model-codecommit-v1/model/BranchNameRequiredException.ts b/packages/model-codecommit-v1/model/BranchNameRequiredException.ts deleted file mode 100644 index 1b0aa49bc7ae7..0000000000000 --- a/packages/model-codecommit-v1/model/BranchNameRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const BranchNameRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "BranchNameRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/CommitDoesNotExistException.ts b/packages/model-codecommit-v1/model/CommitDoesNotExistException.ts deleted file mode 100644 index b584cb8901970..0000000000000 --- a/packages/model-codecommit-v1/model/CommitDoesNotExistException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const CommitDoesNotExistException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "CommitDoesNotExistException" -}; diff --git a/packages/model-codecommit-v1/model/CommitIdDoesNotExistException.ts b/packages/model-codecommit-v1/model/CommitIdDoesNotExistException.ts deleted file mode 100644 index f9fe085945fef..0000000000000 --- a/packages/model-codecommit-v1/model/CommitIdDoesNotExistException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const CommitIdDoesNotExistException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "CommitIdDoesNotExistException" -}; diff --git a/packages/model-codecommit-v1/model/CommitIdRequiredException.ts b/packages/model-codecommit-v1/model/CommitIdRequiredException.ts deleted file mode 100644 index 1ae3af3a1ae09..0000000000000 --- a/packages/model-codecommit-v1/model/CommitIdRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const CommitIdRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "CommitIdRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/CommitRequiredException.ts b/packages/model-codecommit-v1/model/CommitRequiredException.ts deleted file mode 100644 index f7a79db30d76c..0000000000000 --- a/packages/model-codecommit-v1/model/CommitRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const CommitRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "CommitRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/CreateBranch.ts b/packages/model-codecommit-v1/model/CreateBranch.ts deleted file mode 100644 index d9b08a05d81e6..0000000000000 --- a/packages/model-codecommit-v1/model/CreateBranch.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { CreateBranchInput } from "./CreateBranchInput"; -import { CreateBranchOutput } from "./CreateBranchOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { BranchNameRequiredException } from "./BranchNameRequiredException"; -import { BranchNameExistsException } from "./BranchNameExistsException"; -import { InvalidBranchNameException } from "./InvalidBranchNameException"; -import { CommitIdRequiredException } from "./CommitIdRequiredException"; -import { CommitDoesNotExistException } from "./CommitDoesNotExistException"; -import { InvalidCommitIdException } from "./InvalidCommitIdException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const CreateBranch: _Operation_ = { - metadata: ServiceMetadata, - name: "CreateBranch", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: CreateBranchInput - }, - output: { - shape: CreateBranchOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: BranchNameRequiredException - }, - { - shape: BranchNameExistsException - }, - { - shape: InvalidBranchNameException - }, - { - shape: CommitIdRequiredException - }, - { - shape: CommitDoesNotExistException - }, - { - shape: InvalidCommitIdException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/CreateBranchInput.ts b/packages/model-codecommit-v1/model/CreateBranchInput.ts deleted file mode 100644 index 31911ffe3dc48..0000000000000 --- a/packages/model-codecommit-v1/model/CreateBranchInput.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const CreateBranchInput: _Structure_ = { - type: "structure", - required: ["repositoryName", "branchName", "commitId"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - branchName: { - shape: { - type: "string", - min: 1 - } - }, - commitId: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/CreateBranchOutput.ts b/packages/model-codecommit-v1/model/CreateBranchOutput.ts deleted file mode 100644 index 372166ebcb3cb..0000000000000 --- a/packages/model-codecommit-v1/model/CreateBranchOutput.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const CreateBranchOutput: _Structure_ = { - type: "structure", - required: [], - members: {} -}; diff --git a/packages/model-codecommit-v1/model/CreateRepository.ts b/packages/model-codecommit-v1/model/CreateRepository.ts deleted file mode 100644 index 9c6e58018b398..0000000000000 --- a/packages/model-codecommit-v1/model/CreateRepository.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { CreateRepositoryInput } from "./CreateRepositoryInput"; -import { CreateRepositoryOutput } from "./CreateRepositoryOutput"; -import { RepositoryNameExistsException } from "./RepositoryNameExistsException"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { InvalidRepositoryDescriptionException } from "./InvalidRepositoryDescriptionException"; -import { RepositoryLimitExceededException } from "./RepositoryLimitExceededException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const CreateRepository: _Operation_ = { - metadata: ServiceMetadata, - name: "CreateRepository", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: CreateRepositoryInput - }, - output: { - shape: CreateRepositoryOutput - }, - errors: [ - { - shape: RepositoryNameExistsException - }, - { - shape: RepositoryNameRequiredException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: InvalidRepositoryDescriptionException - }, - { - shape: RepositoryLimitExceededException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/CreateRepositoryInput.ts b/packages/model-codecommit-v1/model/CreateRepositoryInput.ts deleted file mode 100644 index 404af6ebaab9d..0000000000000 --- a/packages/model-codecommit-v1/model/CreateRepositoryInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const CreateRepositoryInput: _Structure_ = { - type: "structure", - required: ["repositoryName"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - repositoryDescription: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/CreateRepositoryOutput.ts b/packages/model-codecommit-v1/model/CreateRepositoryOutput.ts deleted file mode 100644 index 04c41f1ebfe89..0000000000000 --- a/packages/model-codecommit-v1/model/CreateRepositoryOutput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { _RepositoryMetadata } from "./_RepositoryMetadata"; -import { Structure as _Structure_ } from "@aws/types"; - -export const CreateRepositoryOutput: _Structure_ = { - type: "structure", - required: [], - members: { - repositoryMetadata: { - shape: _RepositoryMetadata - } - } -}; diff --git a/packages/model-codecommit-v1/model/DefaultBranchCannotBeDeletedException.ts b/packages/model-codecommit-v1/model/DefaultBranchCannotBeDeletedException.ts deleted file mode 100644 index d44806556356f..0000000000000 --- a/packages/model-codecommit-v1/model/DefaultBranchCannotBeDeletedException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const DefaultBranchCannotBeDeletedException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "DefaultBranchCannotBeDeletedException" -}; diff --git a/packages/model-codecommit-v1/model/DeleteBranch.ts b/packages/model-codecommit-v1/model/DeleteBranch.ts deleted file mode 100644 index b3a9ab5376cd1..0000000000000 --- a/packages/model-codecommit-v1/model/DeleteBranch.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { DeleteBranchInput } from "./DeleteBranchInput"; -import { DeleteBranchOutput } from "./DeleteBranchOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { BranchNameRequiredException } from "./BranchNameRequiredException"; -import { InvalidBranchNameException } from "./InvalidBranchNameException"; -import { DefaultBranchCannotBeDeletedException } from "./DefaultBranchCannotBeDeletedException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const DeleteBranch: _Operation_ = { - metadata: ServiceMetadata, - name: "DeleteBranch", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: DeleteBranchInput - }, - output: { - shape: DeleteBranchOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: BranchNameRequiredException - }, - { - shape: InvalidBranchNameException - }, - { - shape: DefaultBranchCannotBeDeletedException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/DeleteBranchInput.ts b/packages/model-codecommit-v1/model/DeleteBranchInput.ts deleted file mode 100644 index ef0f882d43123..0000000000000 --- a/packages/model-codecommit-v1/model/DeleteBranchInput.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const DeleteBranchInput: _Structure_ = { - type: "structure", - required: ["repositoryName", "branchName"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - branchName: { - shape: { - type: "string", - min: 1 - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/DeleteBranchOutput.ts b/packages/model-codecommit-v1/model/DeleteBranchOutput.ts deleted file mode 100644 index e251c0eddaebb..0000000000000 --- a/packages/model-codecommit-v1/model/DeleteBranchOutput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { _BranchInfo } from "./_BranchInfo"; -import { Structure as _Structure_ } from "@aws/types"; - -export const DeleteBranchOutput: _Structure_ = { - type: "structure", - required: [], - members: { - deletedBranch: { - shape: _BranchInfo - } - } -}; diff --git a/packages/model-codecommit-v1/model/DeleteRepository.ts b/packages/model-codecommit-v1/model/DeleteRepository.ts deleted file mode 100644 index 97f516e205777..0000000000000 --- a/packages/model-codecommit-v1/model/DeleteRepository.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { DeleteRepositoryInput } from "./DeleteRepositoryInput"; -import { DeleteRepositoryOutput } from "./DeleteRepositoryOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const DeleteRepository: _Operation_ = { - metadata: ServiceMetadata, - name: "DeleteRepository", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: DeleteRepositoryInput - }, - output: { - shape: DeleteRepositoryOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/DeleteRepositoryInput.ts b/packages/model-codecommit-v1/model/DeleteRepositoryInput.ts deleted file mode 100644 index aecfecc4d0be1..0000000000000 --- a/packages/model-codecommit-v1/model/DeleteRepositoryInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const DeleteRepositoryInput: _Structure_ = { - type: "structure", - required: ["repositoryName"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/DeleteRepositoryOutput.ts b/packages/model-codecommit-v1/model/DeleteRepositoryOutput.ts deleted file mode 100644 index 538ff3c394d84..0000000000000 --- a/packages/model-codecommit-v1/model/DeleteRepositoryOutput.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const DeleteRepositoryOutput: _Structure_ = { - type: "structure", - required: [], - members: { - repositoryId: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/EncryptionIntegrityChecksFailedException.ts b/packages/model-codecommit-v1/model/EncryptionIntegrityChecksFailedException.ts deleted file mode 100644 index 8193ce51c0135..0000000000000 --- a/packages/model-codecommit-v1/model/EncryptionIntegrityChecksFailedException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const EncryptionIntegrityChecksFailedException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "EncryptionIntegrityChecksFailedException" -}; diff --git a/packages/model-codecommit-v1/model/EncryptionKeyAccessDeniedException.ts b/packages/model-codecommit-v1/model/EncryptionKeyAccessDeniedException.ts deleted file mode 100644 index fcef6f78571ac..0000000000000 --- a/packages/model-codecommit-v1/model/EncryptionKeyAccessDeniedException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const EncryptionKeyAccessDeniedException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "EncryptionKeyAccessDeniedException" -}; diff --git a/packages/model-codecommit-v1/model/EncryptionKeyDisabledException.ts b/packages/model-codecommit-v1/model/EncryptionKeyDisabledException.ts deleted file mode 100644 index 55bef863a0e38..0000000000000 --- a/packages/model-codecommit-v1/model/EncryptionKeyDisabledException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const EncryptionKeyDisabledException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "EncryptionKeyDisabledException" -}; diff --git a/packages/model-codecommit-v1/model/EncryptionKeyNotFoundException.ts b/packages/model-codecommit-v1/model/EncryptionKeyNotFoundException.ts deleted file mode 100644 index eba8dce3f6eb9..0000000000000 --- a/packages/model-codecommit-v1/model/EncryptionKeyNotFoundException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const EncryptionKeyNotFoundException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "EncryptionKeyNotFoundException" -}; diff --git a/packages/model-codecommit-v1/model/EncryptionKeyUnavailableException.ts b/packages/model-codecommit-v1/model/EncryptionKeyUnavailableException.ts deleted file mode 100644 index 91b1e15e6254b..0000000000000 --- a/packages/model-codecommit-v1/model/EncryptionKeyUnavailableException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const EncryptionKeyUnavailableException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "EncryptionKeyUnavailableException" -}; diff --git a/packages/model-codecommit-v1/model/FileTooLargeException.ts b/packages/model-codecommit-v1/model/FileTooLargeException.ts deleted file mode 100644 index 6372c5bafa7f7..0000000000000 --- a/packages/model-codecommit-v1/model/FileTooLargeException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const FileTooLargeException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "FileTooLargeException" -}; diff --git a/packages/model-codecommit-v1/model/GetBlob.ts b/packages/model-codecommit-v1/model/GetBlob.ts deleted file mode 100644 index ee5c838cd4692..0000000000000 --- a/packages/model-codecommit-v1/model/GetBlob.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { GetBlobInput } from "./GetBlobInput"; -import { GetBlobOutput } from "./GetBlobOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { BlobIdRequiredException } from "./BlobIdRequiredException"; -import { InvalidBlobIdException } from "./InvalidBlobIdException"; -import { BlobIdDoesNotExistException } from "./BlobIdDoesNotExistException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { FileTooLargeException } from "./FileTooLargeException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const GetBlob: _Operation_ = { - metadata: ServiceMetadata, - name: "GetBlob", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: GetBlobInput - }, - output: { - shape: GetBlobOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: BlobIdRequiredException - }, - { - shape: InvalidBlobIdException - }, - { - shape: BlobIdDoesNotExistException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - }, - { - shape: FileTooLargeException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/GetBlobInput.ts b/packages/model-codecommit-v1/model/GetBlobInput.ts deleted file mode 100644 index 3b3cd88dcffdd..0000000000000 --- a/packages/model-codecommit-v1/model/GetBlobInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const GetBlobInput: _Structure_ = { - type: "structure", - required: ["repositoryName", "blobId"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - blobId: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetBlobOutput.ts b/packages/model-codecommit-v1/model/GetBlobOutput.ts deleted file mode 100644 index 223d109c01846..0000000000000 --- a/packages/model-codecommit-v1/model/GetBlobOutput.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const GetBlobOutput: _Structure_ = { - type: "structure", - required: ["content"], - members: { - content: { - shape: { - type: "blob" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetBranch.ts b/packages/model-codecommit-v1/model/GetBranch.ts deleted file mode 100644 index 68b16f2133f72..0000000000000 --- a/packages/model-codecommit-v1/model/GetBranch.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { GetBranchInput } from "./GetBranchInput"; -import { GetBranchOutput } from "./GetBranchOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { BranchNameRequiredException } from "./BranchNameRequiredException"; -import { InvalidBranchNameException } from "./InvalidBranchNameException"; -import { BranchDoesNotExistException } from "./BranchDoesNotExistException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const GetBranch: _Operation_ = { - metadata: ServiceMetadata, - name: "GetBranch", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: GetBranchInput - }, - output: { - shape: GetBranchOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: BranchNameRequiredException - }, - { - shape: InvalidBranchNameException - }, - { - shape: BranchDoesNotExistException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/GetBranchInput.ts b/packages/model-codecommit-v1/model/GetBranchInput.ts deleted file mode 100644 index bd72451cb96a6..0000000000000 --- a/packages/model-codecommit-v1/model/GetBranchInput.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const GetBranchInput: _Structure_ = { - type: "structure", - required: [], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - branchName: { - shape: { - type: "string", - min: 1 - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetBranchOutput.ts b/packages/model-codecommit-v1/model/GetBranchOutput.ts deleted file mode 100644 index a93d92ec46af3..0000000000000 --- a/packages/model-codecommit-v1/model/GetBranchOutput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { _BranchInfo } from "./_BranchInfo"; -import { Structure as _Structure_ } from "@aws/types"; - -export const GetBranchOutput: _Structure_ = { - type: "structure", - required: [], - members: { - branch: { - shape: _BranchInfo - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetCommit.ts b/packages/model-codecommit-v1/model/GetCommit.ts deleted file mode 100644 index f93cbb1450e21..0000000000000 --- a/packages/model-codecommit-v1/model/GetCommit.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { GetCommitInput } from "./GetCommitInput"; -import { GetCommitOutput } from "./GetCommitOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { CommitIdRequiredException } from "./CommitIdRequiredException"; -import { InvalidCommitIdException } from "./InvalidCommitIdException"; -import { CommitIdDoesNotExistException } from "./CommitIdDoesNotExistException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const GetCommit: _Operation_ = { - metadata: ServiceMetadata, - name: "GetCommit", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: GetCommitInput - }, - output: { - shape: GetCommitOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: CommitIdRequiredException - }, - { - shape: InvalidCommitIdException - }, - { - shape: CommitIdDoesNotExistException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/GetCommitInput.ts b/packages/model-codecommit-v1/model/GetCommitInput.ts deleted file mode 100644 index 58503198d8772..0000000000000 --- a/packages/model-codecommit-v1/model/GetCommitInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const GetCommitInput: _Structure_ = { - type: "structure", - required: ["repositoryName", "commitId"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - commitId: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetCommitOutput.ts b/packages/model-codecommit-v1/model/GetCommitOutput.ts deleted file mode 100644 index 1c6a01712be5a..0000000000000 --- a/packages/model-codecommit-v1/model/GetCommitOutput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { _Commit } from "./_Commit"; -import { Structure as _Structure_ } from "@aws/types"; - -export const GetCommitOutput: _Structure_ = { - type: "structure", - required: ["commit"], - members: { - commit: { - shape: _Commit - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetDifferences.ts b/packages/model-codecommit-v1/model/GetDifferences.ts deleted file mode 100644 index 81c60e935cd33..0000000000000 --- a/packages/model-codecommit-v1/model/GetDifferences.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { GetDifferencesInput } from "./GetDifferencesInput"; -import { GetDifferencesOutput } from "./GetDifferencesOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { InvalidContinuationTokenException } from "./InvalidContinuationTokenException"; -import { InvalidMaxResultsException } from "./InvalidMaxResultsException"; -import { InvalidCommitIdException } from "./InvalidCommitIdException"; -import { CommitRequiredException } from "./CommitRequiredException"; -import { InvalidCommitException } from "./InvalidCommitException"; -import { CommitDoesNotExistException } from "./CommitDoesNotExistException"; -import { InvalidPathException } from "./InvalidPathException"; -import { PathDoesNotExistException } from "./PathDoesNotExistException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const GetDifferences: _Operation_ = { - metadata: ServiceMetadata, - name: "GetDifferences", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: GetDifferencesInput - }, - output: { - shape: GetDifferencesOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: InvalidContinuationTokenException - }, - { - shape: InvalidMaxResultsException - }, - { - shape: InvalidCommitIdException - }, - { - shape: CommitRequiredException - }, - { - shape: InvalidCommitException - }, - { - shape: CommitDoesNotExistException - }, - { - shape: InvalidPathException - }, - { - shape: PathDoesNotExistException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/GetDifferencesInput.ts b/packages/model-codecommit-v1/model/GetDifferencesInput.ts deleted file mode 100644 index 1a461a0cdec1b..0000000000000 --- a/packages/model-codecommit-v1/model/GetDifferencesInput.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const GetDifferencesInput: _Structure_ = { - type: "structure", - required: ["repositoryName", "afterCommitSpecifier"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - beforeCommitSpecifier: { - shape: { - type: "string" - } - }, - afterCommitSpecifier: { - shape: { - type: "string" - } - }, - beforePath: { - shape: { - type: "string" - } - }, - afterPath: { - shape: { - type: "string" - } - }, - MaxResults: { - shape: { - type: "integer" - } - }, - NextToken: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetDifferencesOutput.ts b/packages/model-codecommit-v1/model/GetDifferencesOutput.ts deleted file mode 100644 index 4ab863ca46e44..0000000000000 --- a/packages/model-codecommit-v1/model/GetDifferencesOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { _DifferenceList } from "./_DifferenceList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const GetDifferencesOutput: _Structure_ = { - type: "structure", - required: [], - members: { - differences: { - shape: _DifferenceList - }, - NextToken: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetRepository.ts b/packages/model-codecommit-v1/model/GetRepository.ts deleted file mode 100644 index 5927436fadb79..0000000000000 --- a/packages/model-codecommit-v1/model/GetRepository.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { GetRepositoryInput } from "./GetRepositoryInput"; -import { GetRepositoryOutput } from "./GetRepositoryOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const GetRepository: _Operation_ = { - metadata: ServiceMetadata, - name: "GetRepository", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: GetRepositoryInput - }, - output: { - shape: GetRepositoryOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/GetRepositoryInput.ts b/packages/model-codecommit-v1/model/GetRepositoryInput.ts deleted file mode 100644 index bea6e60864354..0000000000000 --- a/packages/model-codecommit-v1/model/GetRepositoryInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const GetRepositoryInput: _Structure_ = { - type: "structure", - required: ["repositoryName"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetRepositoryOutput.ts b/packages/model-codecommit-v1/model/GetRepositoryOutput.ts deleted file mode 100644 index 5dd2bfd90a523..0000000000000 --- a/packages/model-codecommit-v1/model/GetRepositoryOutput.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { _RepositoryMetadata } from "./_RepositoryMetadata"; -import { Structure as _Structure_ } from "@aws/types"; - -export const GetRepositoryOutput: _Structure_ = { - type: "structure", - required: [], - members: { - repositoryMetadata: { - shape: _RepositoryMetadata - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetRepositoryTriggers.ts b/packages/model-codecommit-v1/model/GetRepositoryTriggers.ts deleted file mode 100644 index 9d1d0711feaaa..0000000000000 --- a/packages/model-codecommit-v1/model/GetRepositoryTriggers.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { GetRepositoryTriggersInput } from "./GetRepositoryTriggersInput"; -import { GetRepositoryTriggersOutput } from "./GetRepositoryTriggersOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const GetRepositoryTriggers: _Operation_ = { - metadata: ServiceMetadata, - name: "GetRepositoryTriggers", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: GetRepositoryTriggersInput - }, - output: { - shape: GetRepositoryTriggersOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/GetRepositoryTriggersInput.ts b/packages/model-codecommit-v1/model/GetRepositoryTriggersInput.ts deleted file mode 100644 index 60e5ea86d3ab6..0000000000000 --- a/packages/model-codecommit-v1/model/GetRepositoryTriggersInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const GetRepositoryTriggersInput: _Structure_ = { - type: "structure", - required: ["repositoryName"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/GetRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/model/GetRepositoryTriggersOutput.ts deleted file mode 100644 index a3327e1dc16c5..0000000000000 --- a/packages/model-codecommit-v1/model/GetRepositoryTriggersOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { _RepositoryTriggersList } from "./_RepositoryTriggersList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const GetRepositoryTriggersOutput: _Structure_ = { - type: "structure", - required: [], - members: { - configurationId: { - shape: { - type: "string" - } - }, - triggers: { - shape: _RepositoryTriggersList - } - } -}; diff --git a/packages/model-codecommit-v1/model/InvalidBlobIdException.ts b/packages/model-codecommit-v1/model/InvalidBlobIdException.ts deleted file mode 100644 index 44e9fd489da78..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidBlobIdException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidBlobIdException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidBlobIdException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidBranchNameException.ts b/packages/model-codecommit-v1/model/InvalidBranchNameException.ts deleted file mode 100644 index 049f26b2005fb..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidBranchNameException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidBranchNameException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidBranchNameException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidCommitException.ts b/packages/model-codecommit-v1/model/InvalidCommitException.ts deleted file mode 100644 index 165e93af58345..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidCommitException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidCommitException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidCommitException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidCommitIdException.ts b/packages/model-codecommit-v1/model/InvalidCommitIdException.ts deleted file mode 100644 index 295e0833ab622..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidCommitIdException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidCommitIdException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidCommitIdException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidContinuationTokenException.ts b/packages/model-codecommit-v1/model/InvalidContinuationTokenException.ts deleted file mode 100644 index 0d6a422be89f5..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidContinuationTokenException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidContinuationTokenException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidContinuationTokenException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidMaxResultsException.ts b/packages/model-codecommit-v1/model/InvalidMaxResultsException.ts deleted file mode 100644 index 8ae91e605ab0d..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidMaxResultsException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidMaxResultsException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidMaxResultsException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidOrderException.ts b/packages/model-codecommit-v1/model/InvalidOrderException.ts deleted file mode 100644 index 1384b5546001a..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidOrderException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidOrderException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidOrderException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidPathException.ts b/packages/model-codecommit-v1/model/InvalidPathException.ts deleted file mode 100644 index 4c4a7f4e064cc..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidPathException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidPathException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidPathException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryDescriptionException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryDescriptionException.ts deleted file mode 100644 index 4dbec4de42d59..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidRepositoryDescriptionException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidRepositoryDescriptionException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidRepositoryDescriptionException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryNameException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryNameException.ts deleted file mode 100644 index ba41b4306a33a..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidRepositoryNameException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidRepositoryNameException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidRepositoryNameException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerBranchNameException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerBranchNameException.ts deleted file mode 100644 index 2d4398f9b7d5a..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerBranchNameException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidRepositoryTriggerBranchNameException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidRepositoryTriggerBranchNameException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerCustomDataException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerCustomDataException.ts deleted file mode 100644 index 771c2f7fb9c66..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerCustomDataException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidRepositoryTriggerCustomDataException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidRepositoryTriggerCustomDataException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerDestinationArnException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerDestinationArnException.ts deleted file mode 100644 index 16d68cb513cbf..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerDestinationArnException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidRepositoryTriggerDestinationArnException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidRepositoryTriggerDestinationArnException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerEventsException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerEventsException.ts deleted file mode 100644 index 329a0560009fc..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerEventsException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidRepositoryTriggerEventsException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidRepositoryTriggerEventsException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerNameException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerNameException.ts deleted file mode 100644 index 5a0af22153aeb..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerNameException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidRepositoryTriggerNameException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidRepositoryTriggerNameException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerRegionException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerRegionException.ts deleted file mode 100644 index 6bba85b218bf5..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerRegionException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidRepositoryTriggerRegionException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidRepositoryTriggerRegionException" -}; diff --git a/packages/model-codecommit-v1/model/InvalidSortByException.ts b/packages/model-codecommit-v1/model/InvalidSortByException.ts deleted file mode 100644 index 20d6b449d46a0..0000000000000 --- a/packages/model-codecommit-v1/model/InvalidSortByException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const InvalidSortByException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "InvalidSortByException" -}; diff --git a/packages/model-codecommit-v1/model/ListBranches.ts b/packages/model-codecommit-v1/model/ListBranches.ts deleted file mode 100644 index 6c8debbeef735..0000000000000 --- a/packages/model-codecommit-v1/model/ListBranches.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ListBranchesInput } from "./ListBranchesInput"; -import { ListBranchesOutput } from "./ListBranchesOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { InvalidContinuationTokenException } from "./InvalidContinuationTokenException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const ListBranches: _Operation_ = { - metadata: ServiceMetadata, - name: "ListBranches", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: ListBranchesInput - }, - output: { - shape: ListBranchesOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - }, - { - shape: InvalidContinuationTokenException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/ListBranchesInput.ts b/packages/model-codecommit-v1/model/ListBranchesInput.ts deleted file mode 100644 index 6e6139cfc476e..0000000000000 --- a/packages/model-codecommit-v1/model/ListBranchesInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const ListBranchesInput: _Structure_ = { - type: "structure", - required: ["repositoryName"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - nextToken: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/ListBranchesOutput.ts b/packages/model-codecommit-v1/model/ListBranchesOutput.ts deleted file mode 100644 index b1dd80003ccb5..0000000000000 --- a/packages/model-codecommit-v1/model/ListBranchesOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { _BranchNameList } from "./_BranchNameList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const ListBranchesOutput: _Structure_ = { - type: "structure", - required: [], - members: { - branches: { - shape: _BranchNameList - }, - nextToken: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/ListRepositories.ts b/packages/model-codecommit-v1/model/ListRepositories.ts deleted file mode 100644 index 62035f3ced0ab..0000000000000 --- a/packages/model-codecommit-v1/model/ListRepositories.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { ListRepositoriesInput } from "./ListRepositoriesInput"; -import { ListRepositoriesOutput } from "./ListRepositoriesOutput"; -import { InvalidSortByException } from "./InvalidSortByException"; -import { InvalidOrderException } from "./InvalidOrderException"; -import { InvalidContinuationTokenException } from "./InvalidContinuationTokenException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const ListRepositories: _Operation_ = { - metadata: ServiceMetadata, - name: "ListRepositories", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: ListRepositoriesInput - }, - output: { - shape: ListRepositoriesOutput - }, - errors: [ - { - shape: InvalidSortByException - }, - { - shape: InvalidOrderException - }, - { - shape: InvalidContinuationTokenException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/ListRepositoriesInput.ts b/packages/model-codecommit-v1/model/ListRepositoriesInput.ts deleted file mode 100644 index 2ad56102c9998..0000000000000 --- a/packages/model-codecommit-v1/model/ListRepositoriesInput.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const ListRepositoriesInput: _Structure_ = { - type: "structure", - required: [], - members: { - nextToken: { - shape: { - type: "string" - } - }, - sortBy: { - shape: { - type: "string" - } - }, - order: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/ListRepositoriesOutput.ts b/packages/model-codecommit-v1/model/ListRepositoriesOutput.ts deleted file mode 100644 index 62892fa746908..0000000000000 --- a/packages/model-codecommit-v1/model/ListRepositoriesOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { _RepositoryNameIdPairList } from "./_RepositoryNameIdPairList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const ListRepositoriesOutput: _Structure_ = { - type: "structure", - required: [], - members: { - repositories: { - shape: _RepositoryNameIdPairList - }, - nextToken: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/MaximumBranchesExceededException.ts b/packages/model-codecommit-v1/model/MaximumBranchesExceededException.ts deleted file mode 100644 index 3e3dd9be3d6a8..0000000000000 --- a/packages/model-codecommit-v1/model/MaximumBranchesExceededException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const MaximumBranchesExceededException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "MaximumBranchesExceededException" -}; diff --git a/packages/model-codecommit-v1/model/MaximumRepositoryNamesExceededException.ts b/packages/model-codecommit-v1/model/MaximumRepositoryNamesExceededException.ts deleted file mode 100644 index 370da397b2c64..0000000000000 --- a/packages/model-codecommit-v1/model/MaximumRepositoryNamesExceededException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const MaximumRepositoryNamesExceededException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "MaximumRepositoryNamesExceededException" -}; diff --git a/packages/model-codecommit-v1/model/MaximumRepositoryTriggersExceededException.ts b/packages/model-codecommit-v1/model/MaximumRepositoryTriggersExceededException.ts deleted file mode 100644 index d97b03db41a6c..0000000000000 --- a/packages/model-codecommit-v1/model/MaximumRepositoryTriggersExceededException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const MaximumRepositoryTriggersExceededException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "MaximumRepositoryTriggersExceededException" -}; diff --git a/packages/model-codecommit-v1/model/PathDoesNotExistException.ts b/packages/model-codecommit-v1/model/PathDoesNotExistException.ts deleted file mode 100644 index aa32a4e509214..0000000000000 --- a/packages/model-codecommit-v1/model/PathDoesNotExistException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const PathDoesNotExistException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "PathDoesNotExistException" -}; diff --git a/packages/model-codecommit-v1/model/PutRepositoryTriggers.ts b/packages/model-codecommit-v1/model/PutRepositoryTriggers.ts deleted file mode 100644 index 1d74bbfb0353f..0000000000000 --- a/packages/model-codecommit-v1/model/PutRepositoryTriggers.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { PutRepositoryTriggersInput } from "./PutRepositoryTriggersInput"; -import { PutRepositoryTriggersOutput } from "./PutRepositoryTriggersOutput"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { RepositoryTriggersListRequiredException } from "./RepositoryTriggersListRequiredException"; -import { MaximumRepositoryTriggersExceededException } from "./MaximumRepositoryTriggersExceededException"; -import { InvalidRepositoryTriggerNameException } from "./InvalidRepositoryTriggerNameException"; -import { InvalidRepositoryTriggerDestinationArnException } from "./InvalidRepositoryTriggerDestinationArnException"; -import { InvalidRepositoryTriggerRegionException } from "./InvalidRepositoryTriggerRegionException"; -import { InvalidRepositoryTriggerCustomDataException } from "./InvalidRepositoryTriggerCustomDataException"; -import { MaximumBranchesExceededException } from "./MaximumBranchesExceededException"; -import { InvalidRepositoryTriggerBranchNameException } from "./InvalidRepositoryTriggerBranchNameException"; -import { InvalidRepositoryTriggerEventsException } from "./InvalidRepositoryTriggerEventsException"; -import { RepositoryTriggerNameRequiredException } from "./RepositoryTriggerNameRequiredException"; -import { RepositoryTriggerDestinationArnRequiredException } from "./RepositoryTriggerDestinationArnRequiredException"; -import { RepositoryTriggerBranchNameListRequiredException } from "./RepositoryTriggerBranchNameListRequiredException"; -import { RepositoryTriggerEventsListRequiredException } from "./RepositoryTriggerEventsListRequiredException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const PutRepositoryTriggers: _Operation_ = { - metadata: ServiceMetadata, - name: "PutRepositoryTriggers", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: PutRepositoryTriggersInput - }, - output: { - shape: PutRepositoryTriggersOutput - }, - errors: [ - { - shape: RepositoryDoesNotExistException - }, - { - shape: RepositoryNameRequiredException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: RepositoryTriggersListRequiredException - }, - { - shape: MaximumRepositoryTriggersExceededException - }, - { - shape: InvalidRepositoryTriggerNameException - }, - { - shape: InvalidRepositoryTriggerDestinationArnException - }, - { - shape: InvalidRepositoryTriggerRegionException - }, - { - shape: InvalidRepositoryTriggerCustomDataException - }, - { - shape: MaximumBranchesExceededException - }, - { - shape: InvalidRepositoryTriggerBranchNameException - }, - { - shape: InvalidRepositoryTriggerEventsException - }, - { - shape: RepositoryTriggerNameRequiredException - }, - { - shape: RepositoryTriggerDestinationArnRequiredException - }, - { - shape: RepositoryTriggerBranchNameListRequiredException - }, - { - shape: RepositoryTriggerEventsListRequiredException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/PutRepositoryTriggersInput.ts b/packages/model-codecommit-v1/model/PutRepositoryTriggersInput.ts deleted file mode 100644 index a7d636dc9a2f2..0000000000000 --- a/packages/model-codecommit-v1/model/PutRepositoryTriggersInput.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { _RepositoryTriggersList } from "./_RepositoryTriggersList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const PutRepositoryTriggersInput: _Structure_ = { - type: "structure", - required: ["repositoryName", "triggers"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - triggers: { - shape: _RepositoryTriggersList - } - } -}; diff --git a/packages/model-codecommit-v1/model/PutRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/model/PutRepositoryTriggersOutput.ts deleted file mode 100644 index a9c548df3c752..0000000000000 --- a/packages/model-codecommit-v1/model/PutRepositoryTriggersOutput.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const PutRepositoryTriggersOutput: _Structure_ = { - type: "structure", - required: [], - members: { - configurationId: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/RepositoryDoesNotExistException.ts b/packages/model-codecommit-v1/model/RepositoryDoesNotExistException.ts deleted file mode 100644 index 9290f960e38a0..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryDoesNotExistException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryDoesNotExistException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryDoesNotExistException" -}; diff --git a/packages/model-codecommit-v1/model/RepositoryLimitExceededException.ts b/packages/model-codecommit-v1/model/RepositoryLimitExceededException.ts deleted file mode 100644 index ea744a1285b16..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryLimitExceededException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryLimitExceededException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryLimitExceededException" -}; diff --git a/packages/model-codecommit-v1/model/RepositoryNameExistsException.ts b/packages/model-codecommit-v1/model/RepositoryNameExistsException.ts deleted file mode 100644 index 412ff8ebcef80..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryNameExistsException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryNameExistsException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryNameExistsException" -}; diff --git a/packages/model-codecommit-v1/model/RepositoryNameRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryNameRequiredException.ts deleted file mode 100644 index 8e6fdcf73a151..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryNameRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryNameRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryNameRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/RepositoryNamesRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryNamesRequiredException.ts deleted file mode 100644 index 8b2f5f7d2b28c..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryNamesRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryNamesRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryNamesRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/RepositoryTriggerBranchNameListRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggerBranchNameListRequiredException.ts deleted file mode 100644 index 60be1bde8ca6d..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryTriggerBranchNameListRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryTriggerBranchNameListRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryTriggerBranchNameListRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/RepositoryTriggerDestinationArnRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggerDestinationArnRequiredException.ts deleted file mode 100644 index c40b135e53fb5..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryTriggerDestinationArnRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryTriggerDestinationArnRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryTriggerDestinationArnRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/RepositoryTriggerEventsListRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggerEventsListRequiredException.ts deleted file mode 100644 index bb91bc7a5d059..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryTriggerEventsListRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryTriggerEventsListRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryTriggerEventsListRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/RepositoryTriggerNameRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggerNameRequiredException.ts deleted file mode 100644 index ee12ea0c4a5ef..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryTriggerNameRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryTriggerNameRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryTriggerNameRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/RepositoryTriggersListRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggersListRequiredException.ts deleted file mode 100644 index 026fc4bc60c33..0000000000000 --- a/packages/model-codecommit-v1/model/RepositoryTriggersListRequiredException.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const RepositoryTriggersListRequiredException: _Structure_ = { - type: "structure", - required: [], - members: {}, - exceptionType: "RepositoryTriggersListRequiredException" -}; diff --git a/packages/model-codecommit-v1/model/ServiceMetadata.ts b/packages/model-codecommit-v1/model/ServiceMetadata.ts deleted file mode 100644 index e32218f787c85..0000000000000 --- a/packages/model-codecommit-v1/model/ServiceMetadata.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ServiceMetadata as _ServiceMetadata_ } from "@aws/types"; - -export const ServiceMetadata: _ServiceMetadata_ = { - apiVersion: "2015-04-13", - endpointPrefix: "codecommit", - jsonVersion: "1.1", - protocol: "json", - serviceAbbreviation: "CodeCommit", - serviceFullName: "AWS CodeCommit", - signatureVersion: "v4", - targetPrefix: "CodeCommit_20150413", - uid: "codecommit-2015-04-13" -}; diff --git a/packages/model-codecommit-v1/model/TestRepositoryTriggers.ts b/packages/model-codecommit-v1/model/TestRepositoryTriggers.ts deleted file mode 100644 index c8ef59f3eee76..0000000000000 --- a/packages/model-codecommit-v1/model/TestRepositoryTriggers.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { TestRepositoryTriggersInput } from "./TestRepositoryTriggersInput"; -import { TestRepositoryTriggersOutput } from "./TestRepositoryTriggersOutput"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { RepositoryTriggersListRequiredException } from "./RepositoryTriggersListRequiredException"; -import { MaximumRepositoryTriggersExceededException } from "./MaximumRepositoryTriggersExceededException"; -import { InvalidRepositoryTriggerNameException } from "./InvalidRepositoryTriggerNameException"; -import { InvalidRepositoryTriggerDestinationArnException } from "./InvalidRepositoryTriggerDestinationArnException"; -import { InvalidRepositoryTriggerRegionException } from "./InvalidRepositoryTriggerRegionException"; -import { InvalidRepositoryTriggerCustomDataException } from "./InvalidRepositoryTriggerCustomDataException"; -import { MaximumBranchesExceededException } from "./MaximumBranchesExceededException"; -import { InvalidRepositoryTriggerBranchNameException } from "./InvalidRepositoryTriggerBranchNameException"; -import { InvalidRepositoryTriggerEventsException } from "./InvalidRepositoryTriggerEventsException"; -import { RepositoryTriggerNameRequiredException } from "./RepositoryTriggerNameRequiredException"; -import { RepositoryTriggerDestinationArnRequiredException } from "./RepositoryTriggerDestinationArnRequiredException"; -import { RepositoryTriggerBranchNameListRequiredException } from "./RepositoryTriggerBranchNameListRequiredException"; -import { RepositoryTriggerEventsListRequiredException } from "./RepositoryTriggerEventsListRequiredException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const TestRepositoryTriggers: _Operation_ = { - metadata: ServiceMetadata, - name: "TestRepositoryTriggers", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: TestRepositoryTriggersInput - }, - output: { - shape: TestRepositoryTriggersOutput - }, - errors: [ - { - shape: RepositoryDoesNotExistException - }, - { - shape: RepositoryNameRequiredException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: RepositoryTriggersListRequiredException - }, - { - shape: MaximumRepositoryTriggersExceededException - }, - { - shape: InvalidRepositoryTriggerNameException - }, - { - shape: InvalidRepositoryTriggerDestinationArnException - }, - { - shape: InvalidRepositoryTriggerRegionException - }, - { - shape: InvalidRepositoryTriggerCustomDataException - }, - { - shape: MaximumBranchesExceededException - }, - { - shape: InvalidRepositoryTriggerBranchNameException - }, - { - shape: InvalidRepositoryTriggerEventsException - }, - { - shape: RepositoryTriggerNameRequiredException - }, - { - shape: RepositoryTriggerDestinationArnRequiredException - }, - { - shape: RepositoryTriggerBranchNameListRequiredException - }, - { - shape: RepositoryTriggerEventsListRequiredException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/TestRepositoryTriggersInput.ts b/packages/model-codecommit-v1/model/TestRepositoryTriggersInput.ts deleted file mode 100644 index 45d6b4896cafa..0000000000000 --- a/packages/model-codecommit-v1/model/TestRepositoryTriggersInput.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { _RepositoryTriggersList } from "./_RepositoryTriggersList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const TestRepositoryTriggersInput: _Structure_ = { - type: "structure", - required: ["repositoryName", "triggers"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - triggers: { - shape: _RepositoryTriggersList - } - } -}; diff --git a/packages/model-codecommit-v1/model/TestRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/model/TestRepositoryTriggersOutput.ts deleted file mode 100644 index b02a654cc4581..0000000000000 --- a/packages/model-codecommit-v1/model/TestRepositoryTriggersOutput.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { _RepositoryTriggerNameList } from "./_RepositoryTriggerNameList"; -import { _RepositoryTriggerExecutionFailureList } from "./_RepositoryTriggerExecutionFailureList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const TestRepositoryTriggersOutput: _Structure_ = { - type: "structure", - required: [], - members: { - successfulExecutions: { - shape: _RepositoryTriggerNameList - }, - failedExecutions: { - shape: _RepositoryTriggerExecutionFailureList - } - } -}; diff --git a/packages/model-codecommit-v1/model/UpdateDefaultBranch.ts b/packages/model-codecommit-v1/model/UpdateDefaultBranch.ts deleted file mode 100644 index d6cb6f25f596d..0000000000000 --- a/packages/model-codecommit-v1/model/UpdateDefaultBranch.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { UpdateDefaultBranchInput } from "./UpdateDefaultBranchInput"; -import { UpdateDefaultBranchOutput } from "./UpdateDefaultBranchOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { BranchNameRequiredException } from "./BranchNameRequiredException"; -import { InvalidBranchNameException } from "./InvalidBranchNameException"; -import { BranchDoesNotExistException } from "./BranchDoesNotExistException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const UpdateDefaultBranch: _Operation_ = { - metadata: ServiceMetadata, - name: "UpdateDefaultBranch", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: UpdateDefaultBranchInput - }, - output: { - shape: UpdateDefaultBranchOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: BranchNameRequiredException - }, - { - shape: InvalidBranchNameException - }, - { - shape: BranchDoesNotExistException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/UpdateDefaultBranchInput.ts b/packages/model-codecommit-v1/model/UpdateDefaultBranchInput.ts deleted file mode 100644 index 8384a3a4fabd8..0000000000000 --- a/packages/model-codecommit-v1/model/UpdateDefaultBranchInput.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const UpdateDefaultBranchInput: _Structure_ = { - type: "structure", - required: ["repositoryName", "defaultBranchName"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - defaultBranchName: { - shape: { - type: "string", - min: 1 - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/UpdateDefaultBranchOutput.ts b/packages/model-codecommit-v1/model/UpdateDefaultBranchOutput.ts deleted file mode 100644 index 1d8c78850f094..0000000000000 --- a/packages/model-codecommit-v1/model/UpdateDefaultBranchOutput.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const UpdateDefaultBranchOutput: _Structure_ = { - type: "structure", - required: [], - members: {} -}; diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryDescription.ts b/packages/model-codecommit-v1/model/UpdateRepositoryDescription.ts deleted file mode 100644 index 19310269b772e..0000000000000 --- a/packages/model-codecommit-v1/model/UpdateRepositoryDescription.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { UpdateRepositoryDescriptionInput } from "./UpdateRepositoryDescriptionInput"; -import { UpdateRepositoryDescriptionOutput } from "./UpdateRepositoryDescriptionOutput"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { InvalidRepositoryDescriptionException } from "./InvalidRepositoryDescriptionException"; -import { EncryptionIntegrityChecksFailedException } from "./EncryptionIntegrityChecksFailedException"; -import { EncryptionKeyAccessDeniedException } from "./EncryptionKeyAccessDeniedException"; -import { EncryptionKeyDisabledException } from "./EncryptionKeyDisabledException"; -import { EncryptionKeyNotFoundException } from "./EncryptionKeyNotFoundException"; -import { EncryptionKeyUnavailableException } from "./EncryptionKeyUnavailableException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const UpdateRepositoryDescription: _Operation_ = { - metadata: ServiceMetadata, - name: "UpdateRepositoryDescription", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: UpdateRepositoryDescriptionInput - }, - output: { - shape: UpdateRepositoryDescriptionOutput - }, - errors: [ - { - shape: RepositoryNameRequiredException - }, - { - shape: RepositoryDoesNotExistException - }, - { - shape: InvalidRepositoryNameException - }, - { - shape: InvalidRepositoryDescriptionException - }, - { - shape: EncryptionIntegrityChecksFailedException - }, - { - shape: EncryptionKeyAccessDeniedException - }, - { - shape: EncryptionKeyDisabledException - }, - { - shape: EncryptionKeyNotFoundException - }, - { - shape: EncryptionKeyUnavailableException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionInput.ts b/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionInput.ts deleted file mode 100644 index b1abf835b9789..0000000000000 --- a/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const UpdateRepositoryDescriptionInput: _Structure_ = { - type: "structure", - required: ["repositoryName"], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - repositoryDescription: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionOutput.ts b/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionOutput.ts deleted file mode 100644 index 3938f795b1534..0000000000000 --- a/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionOutput.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const UpdateRepositoryDescriptionOutput: _Structure_ = { - type: "structure", - required: [], - members: {} -}; diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryName.ts b/packages/model-codecommit-v1/model/UpdateRepositoryName.ts deleted file mode 100644 index 7f894d644cdf3..0000000000000 --- a/packages/model-codecommit-v1/model/UpdateRepositoryName.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { UpdateRepositoryNameInput } from "./UpdateRepositoryNameInput"; -import { UpdateRepositoryNameOutput } from "./UpdateRepositoryNameOutput"; -import { RepositoryDoesNotExistException } from "./RepositoryDoesNotExistException"; -import { RepositoryNameExistsException } from "./RepositoryNameExistsException"; -import { RepositoryNameRequiredException } from "./RepositoryNameRequiredException"; -import { InvalidRepositoryNameException } from "./InvalidRepositoryNameException"; -import { OperationModel as _Operation_ } from "@aws/types"; -import { ServiceMetadata } from "./ServiceMetadata"; - -export const UpdateRepositoryName: _Operation_ = { - metadata: ServiceMetadata, - name: "UpdateRepositoryName", - http: { - method: "POST", - requestUri: "/" - }, - input: { - shape: UpdateRepositoryNameInput - }, - output: { - shape: UpdateRepositoryNameOutput - }, - errors: [ - { - shape: RepositoryDoesNotExistException - }, - { - shape: RepositoryNameExistsException - }, - { - shape: RepositoryNameRequiredException - }, - { - shape: InvalidRepositoryNameException - } - ] -}; diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryNameInput.ts b/packages/model-codecommit-v1/model/UpdateRepositoryNameInput.ts deleted file mode 100644 index ea4eb1108eea6..0000000000000 --- a/packages/model-codecommit-v1/model/UpdateRepositoryNameInput.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const UpdateRepositoryNameInput: _Structure_ = { - type: "structure", - required: ["oldName", "newName"], - members: { - oldName: { - shape: { - type: "string", - min: 1 - } - }, - newName: { - shape: { - type: "string", - min: 1 - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryNameOutput.ts b/packages/model-codecommit-v1/model/UpdateRepositoryNameOutput.ts deleted file mode 100644 index 054dab41edeb0..0000000000000 --- a/packages/model-codecommit-v1/model/UpdateRepositoryNameOutput.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const UpdateRepositoryNameOutput: _Structure_ = { - type: "structure", - required: [], - members: {} -}; diff --git a/packages/model-codecommit-v1/model/_BlobMetadata.ts b/packages/model-codecommit-v1/model/_BlobMetadata.ts deleted file mode 100644 index 9479571ee292c..0000000000000 --- a/packages/model-codecommit-v1/model/_BlobMetadata.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const _BlobMetadata: _Structure_ = { - type: "structure", - required: [], - members: { - blobId: { - shape: { - type: "string" - } - }, - path: { - shape: { - type: "string" - } - }, - mode: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/_BranchInfo.ts b/packages/model-codecommit-v1/model/_BranchInfo.ts deleted file mode 100644 index a9c904f546d85..0000000000000 --- a/packages/model-codecommit-v1/model/_BranchInfo.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const _BranchInfo: _Structure_ = { - type: "structure", - required: [], - members: { - branchName: { - shape: { - type: "string", - min: 1 - } - }, - commitId: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/_BranchNameList.ts b/packages/model-codecommit-v1/model/_BranchNameList.ts deleted file mode 100644 index cda7f34dc5de4..0000000000000 --- a/packages/model-codecommit-v1/model/_BranchNameList.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { List as _List_ } from "@aws/types"; - -export const _BranchNameList: _List_ = { - type: "list", - member: { - shape: { - type: "string", - min: 1 - } - } -}; diff --git a/packages/model-codecommit-v1/model/_Commit.ts b/packages/model-codecommit-v1/model/_Commit.ts deleted file mode 100644 index 3cba9483d7c91..0000000000000 --- a/packages/model-codecommit-v1/model/_Commit.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { _ParentList } from "./_ParentList"; -import { _UserInfo } from "./_UserInfo"; -import { Structure as _Structure_ } from "@aws/types"; - -export const _Commit: _Structure_ = { - type: "structure", - required: [], - members: { - commitId: { - shape: { - type: "string" - } - }, - treeId: { - shape: { - type: "string" - } - }, - parents: { - shape: _ParentList - }, - message: { - shape: { - type: "string" - } - }, - author: { - shape: _UserInfo - }, - committer: { - shape: _UserInfo - }, - additionalData: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/_Difference.ts b/packages/model-codecommit-v1/model/_Difference.ts deleted file mode 100644 index dbafffb509546..0000000000000 --- a/packages/model-codecommit-v1/model/_Difference.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { _BlobMetadata } from "./_BlobMetadata"; -import { Structure as _Structure_ } from "@aws/types"; - -export const _Difference: _Structure_ = { - type: "structure", - required: [], - members: { - beforeBlob: { - shape: _BlobMetadata - }, - afterBlob: { - shape: _BlobMetadata - }, - changeType: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/_DifferenceList.ts b/packages/model-codecommit-v1/model/_DifferenceList.ts deleted file mode 100644 index 92aa2bbf51f54..0000000000000 --- a/packages/model-codecommit-v1/model/_DifferenceList.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { List as _List_ } from "@aws/types"; -import { _Difference } from "./_Difference"; - -export const _DifferenceList: _List_ = { - type: "list", - member: { - shape: _Difference - } -}; diff --git a/packages/model-codecommit-v1/model/_ParentList.ts b/packages/model-codecommit-v1/model/_ParentList.ts deleted file mode 100644 index a37cc8c33c4ae..0000000000000 --- a/packages/model-codecommit-v1/model/_ParentList.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { List as _List_ } from "@aws/types"; - -export const _ParentList: _List_ = { - type: "list", - member: { - shape: { - type: "string" - } - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryMetadata.ts b/packages/model-codecommit-v1/model/_RepositoryMetadata.ts deleted file mode 100644 index 8b619d8cc085b..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryMetadata.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const _RepositoryMetadata: _Structure_ = { - type: "structure", - required: [], - members: { - accountId: { - shape: { - type: "string" - } - }, - repositoryId: { - shape: { - type: "string" - } - }, - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - repositoryDescription: { - shape: { - type: "string" - } - }, - defaultBranch: { - shape: { - type: "string", - min: 1 - } - }, - lastModifiedDate: { - shape: { - type: "timestamp" - } - }, - creationDate: { - shape: { - type: "timestamp" - } - }, - cloneUrlHttp: { - shape: { - type: "string" - } - }, - cloneUrlSsh: { - shape: { - type: "string" - } - }, - Arn: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryMetadataList.ts b/packages/model-codecommit-v1/model/_RepositoryMetadataList.ts deleted file mode 100644 index b21fa427ac51a..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryMetadataList.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { List as _List_ } from "@aws/types"; -import { _RepositoryMetadata } from "./_RepositoryMetadata"; - -export const _RepositoryMetadataList: _List_ = { - type: "list", - member: { - shape: _RepositoryMetadata - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryNameIdPair.ts b/packages/model-codecommit-v1/model/_RepositoryNameIdPair.ts deleted file mode 100644 index dd5f7db4a1f69..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryNameIdPair.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const _RepositoryNameIdPair: _Structure_ = { - type: "structure", - required: [], - members: { - repositoryName: { - shape: { - type: "string", - min: 1 - } - }, - repositoryId: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryNameIdPairList.ts b/packages/model-codecommit-v1/model/_RepositoryNameIdPairList.ts deleted file mode 100644 index b77991abcf671..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryNameIdPairList.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { List as _List_ } from "@aws/types"; -import { _RepositoryNameIdPair } from "./_RepositoryNameIdPair"; - -export const _RepositoryNameIdPairList: _List_ = { - type: "list", - member: { - shape: _RepositoryNameIdPair - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryNameList.ts b/packages/model-codecommit-v1/model/_RepositoryNameList.ts deleted file mode 100644 index 2fd73c4e77af9..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryNameList.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { List as _List_ } from "@aws/types"; - -export const _RepositoryNameList: _List_ = { - type: "list", - member: { - shape: { - type: "string", - min: 1 - } - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryNotFoundList.ts b/packages/model-codecommit-v1/model/_RepositoryNotFoundList.ts deleted file mode 100644 index 3feb80f6eb539..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryNotFoundList.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { List as _List_ } from "@aws/types"; - -export const _RepositoryNotFoundList: _List_ = { - type: "list", - member: { - shape: { - type: "string", - min: 1 - } - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryTrigger.ts b/packages/model-codecommit-v1/model/_RepositoryTrigger.ts deleted file mode 100644 index 7739047bbd992..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryTrigger.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { _BranchNameList } from "./_BranchNameList"; -import { _RepositoryTriggerEventList } from "./_RepositoryTriggerEventList"; -import { Structure as _Structure_ } from "@aws/types"; - -export const _RepositoryTrigger: _Structure_ = { - type: "structure", - required: ["name", "destinationArn", "events"], - members: { - name: { - shape: { - type: "string" - } - }, - destinationArn: { - shape: { - type: "string" - } - }, - customData: { - shape: { - type: "string" - } - }, - branches: { - shape: _BranchNameList - }, - events: { - shape: _RepositoryTriggerEventList - } - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggerEventList.ts b/packages/model-codecommit-v1/model/_RepositoryTriggerEventList.ts deleted file mode 100644 index b4a14f5ed46cf..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryTriggerEventList.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { List as _List_ } from "@aws/types"; - -export const _RepositoryTriggerEventList: _List_ = { - type: "list", - member: { - shape: { - type: "string" - } - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailure.ts b/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailure.ts deleted file mode 100644 index 30e82789c4e76..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailure.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const _RepositoryTriggerExecutionFailure: _Structure_ = { - type: "structure", - required: [], - members: { - trigger: { - shape: { - type: "string" - } - }, - failureMessage: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailureList.ts b/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailureList.ts deleted file mode 100644 index 88197f03ceccf..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailureList.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { List as _List_ } from "@aws/types"; -import { _RepositoryTriggerExecutionFailure } from "./_RepositoryTriggerExecutionFailure"; - -export const _RepositoryTriggerExecutionFailureList: _List_ = { - type: "list", - member: { - shape: _RepositoryTriggerExecutionFailure - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggerNameList.ts b/packages/model-codecommit-v1/model/_RepositoryTriggerNameList.ts deleted file mode 100644 index 3a122b5cbc95d..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryTriggerNameList.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { List as _List_ } from "@aws/types"; - -export const _RepositoryTriggerNameList: _List_ = { - type: "list", - member: { - shape: { - type: "string" - } - } -}; diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggersList.ts b/packages/model-codecommit-v1/model/_RepositoryTriggersList.ts deleted file mode 100644 index b2ebb7505f012..0000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryTriggersList.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { List as _List_ } from "@aws/types"; -import { _RepositoryTrigger } from "./_RepositoryTrigger"; - -export const _RepositoryTriggersList: _List_ = { - type: "list", - member: { - shape: _RepositoryTrigger - } -}; diff --git a/packages/model-codecommit-v1/model/_UserInfo.ts b/packages/model-codecommit-v1/model/_UserInfo.ts deleted file mode 100644 index deeda6ce3f703..0000000000000 --- a/packages/model-codecommit-v1/model/_UserInfo.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Structure as _Structure_ } from "@aws/types"; - -export const _UserInfo: _Structure_ = { - type: "structure", - required: [], - members: { - name: { - shape: { - type: "string" - } - }, - email: { - shape: { - type: "string" - } - }, - date: { - shape: { - type: "string" - } - } - } -}; diff --git a/packages/model-codecommit-v1/package.json b/packages/model-codecommit-v1/package.json deleted file mode 100644 index b0a05171938a7..0000000000000 --- a/packages/model-codecommit-v1/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@aws/model-codecommit-v1", - "description": "Service model for AWS CodeCommit", - "version": "0.0.1", - "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc", - "test": "exit 0" - }, - "author": "aws-sdk-js@amazon.com", - "license": "Apache-2.0", - "devDependencies": { - "typescript": "^2.3" - }, - "dependencies": { - "@aws/types": "^0.0.1" - } -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/tsconfig.json b/packages/model-codecommit-v1/tsconfig.json deleted file mode 100644 index 55345474dc0b6..0000000000000 --- a/packages/model-codecommit-v1/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "downlevelIteration": true, - "lib": [ - "es5", - "es2015.iterable" - ] - } -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/tsconfig.test.json b/packages/model-codecommit-v1/tsconfig.test.json deleted file mode 100644 index d6cc42f32515f..0000000000000 --- a/packages/model-codecommit-v1/tsconfig.test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./tsconfig.json" -} \ No newline at end of file diff --git a/packages/package-generator/package.json b/packages/package-generator/package.json index f6de0c46c0fc8..9ff18e5d4da66 100644 --- a/packages/package-generator/package.json +++ b/packages/package-generator/package.json @@ -23,11 +23,13 @@ "@aws/service-model": "^0.0.1", "@aws/service-types-generator": "^0.0.1", "@aws/types": "^0.0.1", + "semver": "^5.4.1", "yargs": "^8.0.2" }, "devDependencies": { "@types/jest": "^20.0.2", "@types/node": "^7.0.12", + "@types/semver": "^5.4.0", "@types/yargs": "^8.0", "jest": "^20.0.4", "typescript": "^2.3" diff --git a/packages/package-generator/src/ClientModuleGenerator.ts b/packages/package-generator/src/ClientModuleGenerator.ts new file mode 100644 index 0000000000000..092dd66f62a55 --- /dev/null +++ b/packages/package-generator/src/ClientModuleGenerator.ts @@ -0,0 +1,203 @@ +import { ModuleGenerator } from "./ModuleGenerator"; +import { + ConfigurationDefinition, + CustomizationDefinition, + RuntimeTarget, + TreeModel, + Import +} from "@aws/build-types"; +import { + ClientGenerator, + ModelGenerator, + OperationGenerator, + TypeGenerator +} from "@aws/service-types-generator"; +import { ServiceMetadata } from "@aws/types"; +import { join, sep } from "path"; +import { intersects } from "semver"; + +export interface ClientModuleInit { + customizations?: Array; + model: TreeModel; + runtime: RuntimeTarget; + version?: string; +} + +export class ClientModuleGenerator extends ModuleGenerator { + private readonly clientGenerator: ClientGenerator; + private readonly model: TreeModel; + + constructor({ + customizations, + model, + runtime, + version = "0.0.1" + }: ClientModuleInit) { + let name = `sdk-${getServiceId(model.metadata)}`; + const modelVersion = determineServiceVersion(model.metadata); + if (modelVersion > 1) { + name += `-v${modelVersion}`; + } + if (runtime !== "universal") { + name += `-${runtime}`; + } + + super({ + name, + description: `${runtime.substring(0, 1).toUpperCase()}${runtime.substring( + 1 + )} SDK for ${model.metadata.serviceFullName}`, + version + }); + + this.clientGenerator = new ClientGenerator(model, runtime, customizations); + + this.model = model; + } + + *[Symbol.iterator](): IterableIterator<[string, string]> { + yield* super[Symbol.iterator](); + for (const [name, contents] of this.modelFiles()) { + yield [join("model", `${name}.ts`), contents]; + } + + const packageIndexLines = []; + for (const [name, contents] of new TypeGenerator(this.model)) { + packageIndexLines.push(`export * from './types/${name}';`); + yield [join("types", `${name}.ts`), contents]; + } + + for (const [name, contents] of this.clientGenerator) { + packageIndexLines.push(`export * from './${name}';`); + yield [`${name}.ts`, contents]; + } + + yield ["index.ts", packageIndexLines.join("\n")]; + } + + protected gitignore() { + return ` +${super.gitignore()} +*.d.ts +*.js +*.js.map + `.trim(); + } + + protected npmignore() { + return ` +/coverage/ +/docs/ +*.ts +tsconfig.test.json + `.trim(); + } + + protected packageJson() { + const dependencyDeclarations: { [key: string]: Set } = {}; + + for (const dependency of this.clientGenerator.dependencies) { + const { package: packageName, version } = dependency; + if (!(packageName in dependencyDeclarations)) { + dependencyDeclarations[packageName] = new Set(); + } + dependencyDeclarations[packageName].add(version); + } + + const dependencies = Object.keys(dependencyDeclarations).reduce( + (carry: { [key: string]: string }, value: string) => { + const versionsRequied = [...dependencyDeclarations[value]]; + carry[value] = versionsRequied.reduce( + (carry: string, version: string) => { + if (!intersects(carry, version)) { + throw new Error( + `Invalid version used for package ${value}. ${version} is not compatible with ${carry}.` + ); + } + + return `${carry} ${version}`; + }, + versionsRequied.pop() as string + ); + + return carry; + }, + {} + ); + + return { + ...super.packageJson(), + dependencies, + devDependencies: { + typescript: "^2.3" + }, + scripts: { + prepublishOnly: "tsc", + pretest: "tsc", + test: "exit 0" + } + }; + } + + protected tsconfig() { + const { compilerOptions, ...rest } = super.tsconfig(); + return { + ...rest, + compilerOptions: { + ...compilerOptions, + rootDir: undefined, + outDir: undefined + } + }; + } + + protected testTsconfig() { + return { extends: "./tsconfig.json" }; + } + + private *modelFiles() { + yield* new ModelGenerator(this.model); + yield* new OperationGenerator(this.model); + } + + private *rootExports() { + yield* new TypeGenerator(this.model); + yield* this.clientGenerator; + } +} + +function getServiceId(metadata: ServiceMetadata): string { + const { serviceAbbreviation, serviceFullName, serviceId } = metadata; + + const className = + serviceId || + (serviceAbbreviation || serviceFullName) + .replace(/^(aws|amazon)/i, "") + .trim(); + + return className.toLowerCase().replace(/\s/g, "-"); +} + +// TODO use metadata.major_version when added to the model +function determineServiceVersion(metadata: ServiceMetadata): number { + const serviceId = getServiceId(metadata); + if ( + serviceMajorVersions[serviceId] && + serviceMajorVersions[serviceId][metadata.apiVersion] + ) { + return serviceMajorVersions[serviceId][metadata.apiVersion]; + } + + return 1; +} + +interface MajorVersionMatcher { + [serviceIdentifier: string]: { + [apiVersion: string]: number; + }; +} +const serviceMajorVersions: MajorVersionMatcher = { + dynamodb: { + "2012-08-10": 2 + } +}; diff --git a/packages/package-generator/src/cli.ts b/packages/package-generator/src/cli.ts index 79c5dc8768c38..6446c77287cb3 100644 --- a/packages/package-generator/src/cli.ts +++ b/packages/package-generator/src/cli.ts @@ -1,10 +1,12 @@ import { + CreateClientPackageCommand, CreateCustomPackageCommand, CreateModelPackageCommand } from "./commands"; require("yargs") .command(CreateCustomPackageCommand) + .command(CreateClientPackageCommand) .command(CreateModelPackageCommand) .demandCommand() .help().argv; diff --git a/packages/package-generator/src/commands/CreateClientPackageCommand.ts b/packages/package-generator/src/commands/CreateClientPackageCommand.ts new file mode 100644 index 0000000000000..0075df95fa7ac --- /dev/null +++ b/packages/package-generator/src/commands/CreateClientPackageCommand.ts @@ -0,0 +1,40 @@ +import { importModule } from "../importModule"; +import { + ClientModuleGenerator, + ClientModuleInit +} from "../ClientModuleGenerator"; +import { fromModelJson } from "@aws/service-model"; +import { readFileSync } from "fs"; +import * as yargs from "yargs"; + +export const CreateClientPackageCommand: yargs.CommandModule = { + command: "client", + + aliases: ["create-client"], + + describe: + "Create a client for the provided service model targeting the provided runtime.", + + builder: { + model: { + alias: ["m"], + type: "string", + demandOption: true, + coerce: modelPath => fromModelJson(readFileSync(modelPath, "utf8")) + }, + runtime: { + alias: ["r"], + type: "string", + choices: ["node", "browser", "universal"], + demandOption: true + }, + version: { + alias: ["v"], + type: "string" + } + } as yargs.CommandBuilder, + + handler(args: ClientModuleInit): void { + importModule(new ClientModuleGenerator(args)); + } +}; diff --git a/packages/package-generator/src/commands/index.ts b/packages/package-generator/src/commands/index.ts index 38a963a8c4d3e..4c1e798efd9f7 100644 --- a/packages/package-generator/src/commands/index.ts +++ b/packages/package-generator/src/commands/index.ts @@ -1,2 +1,3 @@ +export * from "./CreateClientPackageCommand"; export * from "./CreateCustomPackageCommand"; export * from "./CreateModelPackageCommand"; diff --git a/packages/protocol-json-rpc/src/JsonRpcSerializer.ts b/packages/protocol-json-rpc/src/JsonRpcSerializer.ts index 13268ee880446..f89ce2c81dfed 100644 --- a/packages/protocol-json-rpc/src/JsonRpcSerializer.ts +++ b/packages/protocol-json-rpc/src/JsonRpcSerializer.ts @@ -6,13 +6,14 @@ import { RequestSerializer } from "@aws/types"; -export class JsonRpcSerializer implements RequestSerializer { +export class JsonRpcSerializer + implements RequestSerializer { constructor( private readonly endpoint: HttpEndpoint, private readonly bodySerializer: BodySerializer ) {} - serialize(operation: OperationModel, input: any): HttpRequest { + serialize(operation: OperationModel, input: any): HttpRequest { const { http: httpTrait, metadata: { jsonVersion, targetPrefix }, diff --git a/packages/protocol-query/src/QuerySerializer.ts b/packages/protocol-query/src/QuerySerializer.ts index 2c091404a989b..6e738c8ddf2fd 100644 --- a/packages/protocol-query/src/QuerySerializer.ts +++ b/packages/protocol-query/src/QuerySerializer.ts @@ -9,13 +9,14 @@ import { /** * set up http request for services using query protocol including ec2 query */ -export class QuerySerializer implements RequestSerializer { +export class QuerySerializer + implements RequestSerializer { constructor( private readonly endpoint: HttpEndpoint, private readonly bodySerializer: BodySerializer ) {} - serialize(operation: OperationModel, input: any): HttpRequest { + serialize(operation: OperationModel, input: any): HttpRequest { const { name: operationName, metadata: { apiVersion } diff --git a/packages/protocol-rest/src/RestSerializer.ts b/packages/protocol-rest/src/RestSerializer.ts index fbf2c0024141e..028fceb4bd4e6 100644 --- a/packages/protocol-rest/src/RestSerializer.ts +++ b/packages/protocol-rest/src/RestSerializer.ts @@ -23,7 +23,8 @@ interface QueryStringMap { [key: string]: string | any[]; } -export class RestSerializer implements RequestSerializer { +export class RestSerializer + implements RequestSerializer { constructor( private readonly endpoint: HttpEndpoint, private readonly bodySerializer: BodySerializer, @@ -31,7 +32,10 @@ export class RestSerializer implements RequestSerializer { private utf8Decoder: Decoder ) {} - public serialize(operation: OperationModel, input: any): HttpRequest { + public serialize( + operation: OperationModel, + input: any + ): HttpRequest { // Depending on payload rules, body may be binary, or a string const { http: httpTrait, diff --git a/packages/protocol-timestamp/package.json b/packages/protocol-timestamp/package.json index 0c307376e8909..95d3fccae635d 100644 --- a/packages/protocol-timestamp/package.json +++ b/packages/protocol-timestamp/package.json @@ -6,11 +6,11 @@ "main": "./build/index.js", "scripts": { "prepublishOnly": "tsc", - "pretest": "tsc", + "pretest": "tsc -p tsconfig.test.json", "test": "jest" }, - "author": "aws-javascript-sdk-team@amazon.com", - "license": "UNLICENSED", + "author": "aws-sdk-js@amazon.com", + "license": "Apache-2.0", "dependencies": { "@aws/types": "^0.0.1" }, @@ -20,4 +20,4 @@ "typescript": "^2.3" }, "types": "./build/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/service-types-generator/src/ClientGenerator.ts b/packages/service-types-generator/src/ClientGenerator.ts index 0f26a203c3477..e04f888fdf5a3 100644 --- a/packages/service-types-generator/src/ClientGenerator.ts +++ b/packages/service-types-generator/src/ClientGenerator.ts @@ -7,26 +7,32 @@ import { ConfigurationDefinition, CustomizationDefinition, RuntimeTarget, - TreeModel + TreeModel, + Import } from "@aws/build-types"; export class ClientGenerator { + private readonly client: Client; + private readonly classicClient: ClassicClient; + constructor( - private readonly model: TreeModel, - private readonly target: RuntimeTarget, - private readonly customizations: Array = [] - ) {} + model: TreeModel, + target: RuntimeTarget, + customizations?: Array + ) { + this.client = new Client(model, target, customizations); + this.classicClient = new ClassicClient(model, target, customizations); + } - *[Symbol.iterator](): Iterator<[string, string]> { - const { model, target, customizations } = this; - const client = new Client(model, target, customizations); - const classicClient = new ClassicClient(model, target, customizations); - const className = serviceIdFromMetadata(model.metadata).replace(/\s/g, ""); + get dependencies(): Array { + return this.client.dependencies; + } - yield [client.className, client.toString()]; + *[Symbol.iterator](): Iterator<[string, string]> { + yield [this.client.className, this.client.toString()]; // yield a command object for every operation - yield [classicClient.className, classicClient.toString()]; + yield [this.classicClient.className, this.classicClient.toString()]; } } diff --git a/packages/service-types-generator/src/Components/Client/ClassicClient.spec.ts b/packages/service-types-generator/src/Components/Client/ClassicClient.spec.ts new file mode 100644 index 0000000000000..29932cab5e6ce --- /dev/null +++ b/packages/service-types-generator/src/Components/Client/ClassicClient.spec.ts @@ -0,0 +1,23 @@ +import { ClassicClient } from "./ClassicClient"; +import { model } from "../../shapes.fixture"; + +describe("ClassicClient", () => { + it("should create a class extending the client", () => { + const client = new ClassicClient(model, "universal"); + + expect(client.toString()).toMatch( + "export class FakeService extends FakeServiceClient {" + ); + }); + + it("should create a method for each operation", () => { + const stringified = new ClassicClient(model, "universal").toString(); + + for (const operationName of Object.keys(model.operations)) { + expect(stringified).toMatch( + `public ${operationName.substring(0, 1).toLowerCase() + + operationName.substring(1)}(` + ); + } + }); +}); diff --git a/packages/service-types-generator/src/Components/Client/ClassicClient.ts b/packages/service-types-generator/src/Components/Client/ClassicClient.ts index d5925b2886c66..9bdd6dc8dcb33 100644 --- a/packages/service-types-generator/src/Components/Client/ClassicClient.ts +++ b/packages/service-types-generator/src/Components/Client/ClassicClient.ts @@ -47,17 +47,16 @@ ${new IndentedSection( const importsFromModel = new Set(); for (const key of Object.keys(this.model.operations)) { const { input, output, errors } = this.model.operations[key]; - for (const shape of [input, output]) { + for (const shape of [input, output, ...errors]) { importsFromModel.add(shape.shape.name); } } - const modelPackage = `@aws/${serviceId.replace(/\s/g, "-")}`; return imports .concat( [...importsFromModel] .sort() - .map(name => new Import(`${modelPackage}/${name}`, name)) + .map(name => new Import(`./types/${name}`, name)) ) .join("\n"); } diff --git a/packages/service-types-generator/src/Components/Client/Client.spec.ts b/packages/service-types-generator/src/Components/Client/Client.spec.ts index 133c2fb004050..e37e8ac2a4732 100644 --- a/packages/service-types-generator/src/Components/Client/Client.spec.ts +++ b/packages/service-types-generator/src/Components/Client/Client.spec.ts @@ -22,7 +22,10 @@ describe("Client", () => { const sender = new Client(model, "node"); expect(sender.toString()).toMatch( - "const configurationProperties: __aws_types.ConfigurationDefinition = {" + `const configurationProperties: __aws_types.ConfigurationDefinition< + FakeServiceResolvableConfiguration, + FakeServiceResolvedConfiguration +> = {` ); }); diff --git a/packages/service-types-generator/src/Components/Client/Client.ts b/packages/service-types-generator/src/Components/Client/Client.ts index fb947377262d1..0c47b60b80889 100644 --- a/packages/service-types-generator/src/Components/Client/Client.ts +++ b/packages/service-types-generator/src/Components/Client/Client.ts @@ -1,11 +1,14 @@ import { serviceIdFromMetadata } from "./serviceIdFromMetadata"; import { Configuration } from "./Configuration"; +import { IMPORTS } from "./internalImports"; import { customizationsFromModel } from "./customizationsFromModel"; import { FullPackageImport } from "./FullPackageImport"; +import { Import as DestructuringImport } from "../Import"; import { packageNameToVariable } from "./packageNameToVariable"; import { ConfigurationDefinition, CustomizationDefinition, + Import, RuntimeTarget, TreeModel } from "@aws/build-types"; @@ -29,27 +32,44 @@ export class Client { return `${this.prefix}Client`; } + get dependencies(): Array { + const dependencies = [ + IMPORTS.types, + IMPORTS["config-resolver"], + IMPORTS["middleware-stack"] + ]; + + for (const customization of this.customizations) { + dependencies.push(...this.dependenciesFromCustomization(customization)); + } + + return dependencies; + } + toString(): string { const typesPackage = packageNameToVariable("@aws/types"); return `${this.imports()} +import {InputTypesUnion} from './types/InputTypesUnion'; +import {OutputTypesUnion} from './types/OutputTypesUnion'; export class ${this.className} { private readonly config: ${this.prefix}ResolvedConfiguration; - // The input type and output type parameters below should be a union of all - // supported inputs and outputs for a service. - // FIXME when https://github.com/aws/aws-sdk-js-staging/pull/69 lands readonly middlewareStack = new ${packageNameToVariable( "@aws/middleware-stack" )}.MiddlewareStack< - ${typesPackage}.Handler + InputTypesUnion, + OutputTypesUnion, + ${this.streamType()} >(); constructor(configuration: ${this.prefix}Configuration) { this.config = ${packageNameToVariable( "@aws/config-resolver" )}.resolveConfiguration( - configuration + configuration, + configurationProperties, + this.middlewareStack ); } @@ -61,16 +81,22 @@ export class ${this.className} { /** * This will need to be revised when the command interface lands. - * - * FIXME ensure InputType and OutputType extend the respective unions - * defined when https://github.com/aws/aws-sdk-js-staging/pull/69 lands */ - send(command: any): Promise; - send( + send< + InputType extends InputTypesUnion, + OutputType extends OutputTypesUnion + >(command: any): Promise; + send< + InputType extends InputTypesUnion, + OutputType extends OutputTypesUnion + >( command: any, cb: (err: any, data?: OutputType) => void ): void; - send( + send< + InputType extends InputTypesUnion, + OutputType extends OutputTypesUnion + >( command: any, cb?: (err: any, data?: OutputType) => void ): Promise|void { @@ -79,8 +105,8 @@ export class ${this.className} { }; if (cb) { handler.handle(command).then( - result => cb(null, result), - err => cb(err) + (result: OutputType) => cb(null, result), + (err: any) => cb(err) ).catch( // prevent any errors thrown in the callback from triggering an // unhandled promise rejection @@ -108,46 +134,12 @@ ${new Configuration(this.prefix, this.target, this.concattedConfig())} } private imports(): string { - const packages = new Set([ - "@aws/config-resolver", - "@aws/middleware-stack", - "@aws/types" - ]); + const packages = new Set(); if (this.target === "node") { packages.add("stream"); } - for (const customization of this.customizations) { - switch (customization.type) { - case "Middleware": - case "ParserDecorator": - const { configuration, imports } = customization; - if (imports) { - for (const imported of imports) { - packages.add(imported.package); - } - } - if (configuration) { - for (const imported of this.importsFromConfiguration( - configuration - )) { - packages.add(imported); - } - } - break; - case "Configuration": - for (const imported of this.importsFromConfiguration( - customization.configuration - )) { - packages.add(imported); - } - break; - default: - throw new Error( - `Unrecognized customization type encountered: ${ - (customization as any).type - }` - ); - } + for (const dependency of this.dependencies) { + packages.add(dependency.package); } return [...packages] @@ -156,21 +148,40 @@ ${new Configuration(this.prefix, this.target, this.concattedConfig())} .join("\n"); } - private importsFromConfiguration( + private dependenciesFromConfiguration( configuration: ConfigurationDefinition - ): Set { - const packages = new Set(); + ): Array { + const allImports: Array = []; for (const key of Object.keys(configuration)) { const { imports = [], ...property } = configuration[key]; + allImports.push(...imports); if (property.type === "forked") { - imports.push(...(property[this.target].imports || [])); - } - for (const { package: packageName } of imports) { - packages.add(packageName); + allImports.push(...(property[this.target].imports || [])); } } - return packages; + return allImports; + } + + private dependenciesFromCustomization( + customization: CustomizationDefinition + ): Array { + switch (customization.type) { + case "Middleware": + case "ParserDecorator": + const { configuration, imports = [] } = customization; + return configuration + ? imports.concat(this.dependenciesFromConfiguration(configuration)) + : imports; + case "Configuration": + return this.dependenciesFromConfiguration(customization.configuration); + default: + throw new Error( + `Unrecognized customization type encountered: ${ + (customization as any).type + }` + ); + } } private streamType(): string { diff --git a/packages/service-types-generator/src/Components/Client/Configuration.spec.ts b/packages/service-types-generator/src/Components/Client/Configuration.spec.ts index c95270a7121c4..771df089ce7b7 100644 --- a/packages/service-types-generator/src/Components/Client/Configuration.spec.ts +++ b/packages/service-types-generator/src/Components/Client/Configuration.spec.ts @@ -141,7 +141,10 @@ describe("Configuration", () => { const config = new Configuration("CloudFoo", "node", { optionalProperty }); expect(config.toString()).toMatch( - `const configurationProperties: __aws_types.ConfigurationDefinition = { + `const configurationProperties: __aws_types.ConfigurationDefinition< + CloudFooResolvableConfiguration, + CloudFooResolvedConfiguration +> = { optionalProperty: { required: false, defaultValue: true diff --git a/packages/service-types-generator/src/Components/Client/Configuration.ts b/packages/service-types-generator/src/Components/Client/Configuration.ts index 54a3e1de2522c..86253ea7b78e1 100644 --- a/packages/service-types-generator/src/Components/Client/Configuration.ts +++ b/packages/service-types-generator/src/Components/Client/Configuration.ts @@ -30,7 +30,10 @@ ${new IndentedSection(this.resolvedConfiguration())} const configurationProperties: ${packageNameToVariable( "@aws/types" - )}.ConfigurationDefinition<${this.className}ResolvableConfiguration> = { + )}.ConfigurationDefinition< + ${this.className}ResolvableConfiguration, + ${this.className}ResolvedConfiguration +> = { ${new IndentedSection(this.configurationProperties())} }; `.trim(); diff --git a/packages/service-types-generator/src/Components/Client/Method.spec.ts b/packages/service-types-generator/src/Components/Client/Method.spec.ts new file mode 100644 index 0000000000000..8e9d03a713081 --- /dev/null +++ b/packages/service-types-generator/src/Components/Client/Method.spec.ts @@ -0,0 +1,55 @@ +import { Method } from "./Method"; +import { model } from "../../shapes.fixture"; + +const { + operations: { GetResource } +} = model; +const { + input: { + shape: { name: inputShape } + }, + output: { + shape: { name: outputShape } + }, + documentation, + errors +} = GetResource; +const stringified = new Method(GetResource).toString(); + +describe("Method", () => { + it("should define a signature that takes no callback and returns a promise", () => { + expect(stringified).toMatch( + `public getResource(args: ${inputShape}): Promise<${outputShape}>;` + ); + }); + + it("should define a signature that takes a callback and returns nothing", () => { + expect(stringified).toMatch( + `public getResource( + args: ${inputShape}, + cb: (err: any, data?: ${outputShape}) => void +): void;` + ); + }); + + it("should define an implementation that takes an optional callback and returns a promise or void", () => { + expect(stringified).toMatch( + `public getResource( + args: ${inputShape}, + cb?: (err: any, data?: ${outputShape}) => void +): Promise<${outputShape}>|void {` + ); + }); + + it(`should document the method using the operation's documentation string and provide a list of possible errors`, () => { + expect(stringified).toMatch( + `/** + * GetResource operation + * + * This operation may fail with one of the following errors: + * - {ResourceNotFoundException} Exception thrown when a resource is not found + * - {Error} An error originating from the SDK or customizations rather than the service + */` + ); + }); +}); diff --git a/packages/service-types-generator/src/Components/Client/Method.ts b/packages/service-types-generator/src/Components/Client/Method.ts index 0f48be4538ed4..ed74d9ab6fd61 100644 --- a/packages/service-types-generator/src/Components/Client/Method.ts +++ b/packages/service-types-generator/src/Components/Client/Method.ts @@ -18,12 +18,13 @@ export class Method { return ` /** * ${documentation} - * + * + * This operation may fail with one of the following errors: ${this.errors()} */ public ${methodName}(args: ${inputName}): Promise<${outputName}>; public ${methodName}( - args: ${inputName}, + args: ${inputName}, cb: (err: any, data?: ${outputName}) => void ): void; public ${methodName}( diff --git a/packages/service-types-generator/src/Components/Client/customizationsFromModel/endpointConfigurationProperties.ts b/packages/service-types-generator/src/Components/Client/customizationsFromModel/endpointConfigurationProperties.ts index 3d47f52e0cff6..d62226384db44 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/endpointConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/endpointConfigurationProperties.ts @@ -53,11 +53,11 @@ export const endpoint: ConfigurationPropertyDefinition = { }` }, apply: `( - value: ${endpointType}, + value: ${endpointType}|undefined, configuration: { sslEnabled: boolean, endpointProvider: any, - endpoint: ${endpointType}, + endpoint?: ${endpointType}, } ): void => { if (typeof value === 'string') { diff --git a/packages/service-types-generator/src/Components/Client/customizationsFromModel/httpConfigurationProperties.ts b/packages/service-types-generator/src/Components/Client/customizationsFromModel/httpConfigurationProperties.ts index 532b4cc2310b9..daf7edb1e3710 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/httpConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/httpConfigurationProperties.ts @@ -38,20 +38,20 @@ function httpHandlerProperty( required: false, imports: [IMPORTS["node-http-handler"]], default: { - type: "value", - expression: `${packageNameToVariable( + type: "provider", + expression: `() => new ${packageNameToVariable( "@aws/node-http-handler" - )}.NodeHttpHandler` + )}.NodeHttpHandler()` } }, browser: { required: false, imports: [IMPORTS["fetch-http-handler"]], default: { - type: "value", - expression: `${packageNameToVariable( + type: "provider", + expression: `() => new ${packageNameToVariable( "@aws/fetch-http-handler" - )}.FetchHttpHandler` + )}.FetchHttpHandler()` } }, universal: { @@ -72,7 +72,7 @@ function handlerProperty( ): ConfigurationPropertyDefinition { return { type: "unified", - inputType: `${typesPackage}.CoreHandlerConstructor<${typesPackage}.Handler<${inputTypeUnion}, ${outputTypeUnion}, ${streamType}>>`, + inputType: `${typesPackage}.CoreHandlerConstructor<${inputTypeUnion}, ${outputTypeUnion}, ${streamType}>`, documentation: "The handler to use as the core of the client's middleware stack", imports: [IMPORTS.types, IMPORTS["core-handler"]], @@ -90,8 +90,7 @@ function handlerProperty( constructor(context: ${typesPackage}.HandlerExecutionContext) { super(configuration.httpHandler, configuration.parser, context); } -} -` +}` } }; } diff --git a/packages/service-types-generator/src/Components/Client/customizationsFromModel/index.ts b/packages/service-types-generator/src/Components/Client/customizationsFromModel/index.ts index b15662fe57054..6e85e1adbd381 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/index.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/index.ts @@ -1,6 +1,7 @@ import { maxRedirects, maxRetries, + profile, region, sslEnabled } from "./standardConfigurationProperties"; @@ -23,6 +24,7 @@ export function customizationsFromModel( streamType: string ): Array { let configuration: ConfigurationDefinition = { + profile, maxRedirects, maxRetries, region, diff --git a/packages/service-types-generator/src/Components/Client/customizationsFromModel/serializerConfigurationProperties.ts b/packages/service-types-generator/src/Components/Client/customizationsFromModel/serializerConfigurationProperties.ts index 810c1ec0a58ea..2be7e48cb5aee 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/serializerConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/serializerConfigurationProperties.ts @@ -59,7 +59,8 @@ function parserProperty( inputType: `${typesPackage}.ResponseParser<${streamType}>`, documentation: "The parser to use when converting HTTP responses to SDK output types", - required: false + required: false, + internal: true }; switch (metadata.protocol) { @@ -76,14 +77,14 @@ function parserProperty( expression: `( configuration: { base64Decoder: ${typesPackage}.Decoder, - bodyCollector: ${typesPackage}.StreamCollector<${streamType}>, + streamCollector: ${typesPackage}.StreamCollector<${streamType}>, utf8Encoder: ${typesPackage}.Encoder } ) => new ${packageNameToVariable("@aws/protocol-json-rpc")}.JsonRpcParser( new ${packageNameToVariable("@aws/json-parser")}.JsonParser( configuration.base64Decoder ), - configuration.bodyCollector, + configuration.streamCollector, configuration.utf8Encoder )` } @@ -101,7 +102,7 @@ function parserProperty( expression: `( configuration: { base64Decoder: ${typesPackage}.Decoder, - bodyCollector: ${typesPackage}.StreamCollector<${streamType}>, + streamCollector: ${typesPackage}.StreamCollector<${streamType}>, utf8Encoder: ${typesPackage}.Encoder } ) => new ${packageNameToVariable( @@ -110,7 +111,7 @@ function parserProperty( new ${packageNameToVariable("@aws/json-parser")}.JsonParser( configuration.base64Decoder ), - configuration.bodyCollector, + configuration.streamCollector, configuration.utf8Encoder )` } @@ -128,7 +129,7 @@ function parserProperty( expression: `( configuration: { base64Decoder: ${typesPackage}.Decoder, - bodyCollector: ${typesPackage}.StreamCollector<${streamType}>, + streamCollector: ${typesPackage}.StreamCollector<${streamType}>, utf8Encoder: ${typesPackage}.Encoder } ) => new ${packageNameToVariable( @@ -137,7 +138,7 @@ function parserProperty( new ${packageNameToVariable("@aws/xml-parser")}.XmlParser( configuration.base64Decoder ), - configuration.bodyCollector, + configuration.streamCollector, configuration.utf8Encoder )` } @@ -156,14 +157,14 @@ function parserProperty( expression: `( configuration: { base64Decoder: ${typesPackage}.Decoder, - bodyCollector: ${typesPackage}.StreamCollector<${streamType}>, + streamCollector: ${typesPackage}.StreamCollector<${streamType}>, utf8Encoder: ${typesPackage}.Encoder } ) => new ${packageNameToVariable("@aws/protocol-query")}.QueryParser( new ${packageNameToVariable("@aws/xml-parser")}.XmlParser( configuration.base64Decoder ), - configuration.bodyCollector, + configuration.streamCollector, configuration.utf8Encoder )` } @@ -178,12 +179,14 @@ function serializerProperty( metadata: ServiceMetadata, streamType: string ): ConfigurationPropertyDefinition { + const serializerType = `${typesPackage}.RequestSerializer<${streamType}>`; const sharedProps = { type: "unified" as "unified", - inputType: `${typesPackage}.RequestSerializer<${streamType}>`, + inputType: `${typesPackage}.Provider<${serializerType}>`, documentation: "The serializer to use when converting SDK input to HTTP requests", - required: false + required: false, + internal: true }; switch (metadata.protocol) { @@ -200,16 +203,22 @@ function serializerProperty( expression: `( configuration: { base64Encoder: ${typesPackage}.Encoder, - endpoint: ${typesPackage}.HttpEndpoint, + endpoint: ${typesPackage}.Provider<${typesPackage}.HttpEndpoint>, utf8Decoder: ${typesPackage}.Decoder } -) => new ${packageNameToVariable("@aws/protocol-json-rpc")}.JsonRpcSerializer( - configuration.endpoint, - new ${packageNameToVariable("@aws/json-builder")}.JsonBuilder( - configuration.base64Encoder, - configuration.utf8Decoder - ) -)` +) => { + const promisified = configuration.endpoint() + .then(endpoint => new ${packageNameToVariable( + "@aws/protocol-json-rpc" + )}.JsonRpcSerializer<${streamType}>( + endpoint, + new ${packageNameToVariable("@aws/json-builder")}.JsonBuilder( + configuration.base64Encoder, + configuration.utf8Decoder + ) + )); + return () => promisified; +}` } }; case "rest-json": @@ -225,18 +234,24 @@ function serializerProperty( expression: `( configuration: { base64Encoder: ${typesPackage}.Encoder, - endpoint: ${typesPackage}.HttpEndpoint, + endpoint: ${typesPackage}.Provider<${typesPackage}.HttpEndpoint>, utf8Decoder: ${typesPackage}.Decoder } -) => new ${packageNameToVariable("@aws/protocol-rest")}.RestSerializer( - configuration.endpoint, - new ${packageNameToVariable("@aws/json-builder")}.JsonBuilder( - configuration.base64Encoder, - configuration.utf8Decoder - ), - configuration.base64Encoder, - configuration.utf8Decoder -)` +) => { + const promisified = configuration.endpoint() + .then(endpoint => new ${packageNameToVariable( + "@aws/protocol-rest" + )}.RestSerializer<${streamType}>( + endpoint, + new ${packageNameToVariable("@aws/json-builder")}.JsonBuilder( + configuration.base64Encoder, + configuration.utf8Decoder + ), + configuration.base64Encoder, + configuration.utf8Decoder + )); + return () => promisified; +}` } }; case "rest-xml": @@ -252,18 +267,26 @@ function serializerProperty( expression: `( configuration: { base64Encoder: ${typesPackage}.Encoder, - endpoint: ${typesPackage}.HttpEndpoint, + endpoint: ${typesPackage}.Provider<${typesPackage}.HttpEndpoint>, utf8Decoder: ${typesPackage}.Decoder } -) => new ${packageNameToVariable("@aws/protocol-rest")}.RestSerializer( - configuration.endpoint, - new ${packageNameToVariable("@aws/xml-body-builder")}.XmlBodyBuilder( - configuration.base64Encoder, - configuration.utf8Decoder - ), - configuration.base64Encoder, - configuration.utf8Decoder -)` +) => { + const promisified = configuration.endpoint() + .then(endpoint => new ${packageNameToVariable( + "@aws/protocol-rest" + )}.RestSerializer<${streamType}>( + endpoint, + new ${packageNameToVariable( + "@aws/xml-body-builder" + )}.XmlBodyBuilder( + configuration.base64Encoder, + configuration.utf8Decoder + ), + configuration.base64Encoder, + configuration.utf8Decoder + )); + return () => promisified; +}` } }; case "query": @@ -280,17 +303,23 @@ function serializerProperty( expression: `( configuration: { base64Encoder: ${typesPackage}.Encoder, - endpoint: ${typesPackage}.HttpEndpoint, + endpoint: ${typesPackage}.Provider<${typesPackage}.HttpEndpoint>, utf8Decoder: ${typesPackage}.Decoder } -) => new ${packageNameToVariable("@aws/protocol-query")}.QuerySerializer( - configuration.endpoint, - new ${packageNameToVariable("@aws/query-builder")}.QueryBuilder( - configuration.base64Encoder, - configuration.utf8Decoder, - '${metadata.protocol}' - ) -)` +) => { + const promisified = configuration.endpoint() + .then(endpoint => new ${packageNameToVariable( + "@aws/protocol-query" + )}.QuerySerializer<${streamType}>( + endpoint, + new ${packageNameToVariable("@aws/query-builder")}.QueryBuilder( + configuration.base64Encoder, + configuration.utf8Decoder, + '${metadata.protocol}' + ) + )); + return () => promisified; +}` } }; } diff --git a/packages/service-types-generator/src/Components/Client/customizationsFromModel/signatureConfigurationProperties.ts b/packages/service-types-generator/src/Components/Client/customizationsFromModel/signatureConfigurationProperties.ts index 1dc0ba649ab62..c14a8b0dcbc45 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/signatureConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/signatureConfigurationProperties.ts @@ -73,9 +73,9 @@ function signerProperty( })` }, apply: `( - signer: ${typesPackage}.RequestSigner, + signer: ${typesPackage}.RequestSigner|undefined, configuration: object, - middlewareStack: ${typesPackage}.MiddlewareStack + middlewareStack: ${typesPackage}.MiddlewareStack ): void => { const tagSet = new Set(); tagSet.add('SIGNATURE'); @@ -85,7 +85,7 @@ function signerProperty( "@aws/signing-middleware" )}.SigningHandler { constructor(next: ${typesPackage}.Handler) { - super(signer, next); + super(signer as ${typesPackage}.RequestSigner, next); } }, { diff --git a/packages/service-types-generator/src/Components/Client/customizationsFromModel/standardConfigurationProperties.ts b/packages/service-types-generator/src/Components/Client/customizationsFromModel/standardConfigurationProperties.ts index 04d2231883eec..d3072586c82c2 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/standardConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/standardConfigurationProperties.ts @@ -95,7 +95,7 @@ export const base64Encoder: ConfigurationPropertyDefinition = { export const credentials: ConfigurationPropertyDefinition = { type: "forked", inputType: `${staticOrProvider(credsType)}`, - resolvedType: credsType, + resolvedType: `${packageNameToVariable("@aws/types")}.Provider<${credsType}>`, imports: [IMPORTS.types], documentation: "The credentials used to sign requests.", browser: { @@ -154,14 +154,46 @@ export const maxRetries: ConfigurationPropertyDefinition = { /** * @internal */ -export const region: ConfigurationPropertyDefinition = { +export const profile: ConfigurationPropertyDefinition = { type: "unified", + inputType: "string", + documentation: "The configuration profile to use.", + required: false +}; + +const regionApplicator = applyStaticOrProvider( + "region", + "string", + "typeof region === 'string'" +); +/** + * @internal + */ +export const region: ConfigurationPropertyDefinition = { + type: "forked", inputType: staticOrProvider("string"), resolvedType: `${typesPackage}.Provider`, imports: [IMPORTS.types], documentation: "The AWS region to which this client will send requests", - required: true, - apply: applyStaticOrProvider("region", "string", "typeof region === 'string'") + node: { + required: false, + imports: [IMPORTS["region-provider"]], + default: { + type: "provider", + expression: `${packageNameToVariable( + "@aws/region-provider" + )}.defaultProvider` + }, + apply: regionApplicator + }, + browser: { + required: true, + apply: regionApplicator + }, + universal: { + required: true, + apply: regionApplicator + } }; /** diff --git a/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.spec.ts b/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.spec.ts index 2f09e32708e3a..df4ba3c9caa2c 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.spec.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.spec.ts @@ -18,8 +18,8 @@ describe("applyStaticOrProvider", () => { ) ).toBe( `( - propertyKey: boolean|__aws_types.Provider, - configuration: {propertyKey: boolean|__aws_types.Provider} + propertyKey: boolean|__aws_types.Provider|undefined, + configuration: {propertyKey?: boolean|__aws_types.Provider} ) => { if (typeof propertyKey === 'boolean') { const promisified = Promise.resolve(propertyKey); diff --git a/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.ts b/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.ts index ee3838b944c41..356a3545dd5a8 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.ts @@ -15,12 +15,15 @@ export function staticOrProvider(staticType: string) { export function applyStaticOrProvider( key: string, staticType: string, - staticEvaluationExpression: string + staticEvaluationExpression: string, + optional: boolean = true ): string { return ` ( - ${key}: ${staticOrProvider(staticType)}, - configuration: {${key}: ${staticOrProvider(staticType)}} + ${key}: ${staticOrProvider(staticType)}${optional ? "|undefined" : ""}, + configuration: {${key}${optional ? "?" : ""}: ${staticOrProvider( + staticType + )}} ) => { if (${staticEvaluationExpression}) { const promisified = Promise.resolve(${key}); diff --git a/packages/service-types-generator/src/Components/Client/internalImports.ts b/packages/service-types-generator/src/Components/Client/internalImports.ts index 66e82ae77e399..8f32067e6092b 100644 --- a/packages/service-types-generator/src/Components/Client/internalImports.ts +++ b/packages/service-types-generator/src/Components/Client/internalImports.ts @@ -20,10 +20,6 @@ export const IMPORTS: { [key: string]: Import } = { package: "@aws/core-handler", version: "^0.0.1" }, - "credential-provider-base": { - package: "@aws/credential-provider-base", - version: "^0.0.1" - }, "credential-provider-env": { package: "@aws/credential-provider-env", version: "^0.0.1" @@ -136,10 +132,22 @@ export const IMPORTS: { [key: string]: Import } = { package: "@aws/json-parser", version: "^0.0.1" }, + logger: { + package: "@aws/logger", + version: "^0.0.1" + }, + "middleware-operation-logging": { + package: "@aws/middleware-operation-logging", + version: "^0.0.1" + }, "middleware-stack": { package: "@aws/middleware-stack", version: "^0.0.1" }, + "model-codecommit-v1": { + package: "@aws/model-codecommit-v1", + version: "^0.0.1" + }, "node-http-handler": { package: "@aws/node-http-handler", version: "^0.0.1" @@ -148,6 +156,10 @@ export const IMPORTS: { [key: string]: Import } = { package: "@aws/package-generator", version: "^0.0.1" }, + "property-provider": { + package: "@aws/property-provider", + version: "^0.0.1" + }, "protocol-json-rpc": { package: "@aws/protocol-json-rpc", version: "^0.0.1" @@ -168,10 +180,22 @@ export const IMPORTS: { [key: string]: Import } = { package: "@aws/query-builder", version: "^0.0.1" }, + "region-provider": { + package: "@aws/region-provider", + version: "^0.0.1" + }, + "remove-sensitive-logs": { + package: "@aws/remove-sensitive-logs", + version: "^0.0.1" + }, "response-metadata-extractor": { package: "@aws/response-metadata-extractor", version: "^0.0.1" }, + "sdk-kms-node": { + package: "@aws/sdk-kms-node", + version: "^0.0.1" + }, "service-model": { package: "@aws/service-model", version: "^0.0.1" diff --git a/packages/service-types-generator/src/index.ts b/packages/service-types-generator/src/index.ts index 2924bd2f7c71c..446c567b3df95 100644 --- a/packages/service-types-generator/src/index.ts +++ b/packages/service-types-generator/src/index.ts @@ -1,3 +1,4 @@ +export * from "./ClientGenerator"; export * from "./ModelGenerator"; export * from "./OperationGenerator"; export * from "./TypeGenerator"; diff --git a/packages/types/src/client.ts b/packages/types/src/client.ts index 43e026f409b08..aa15446e6ed2a 100644 --- a/packages/types/src/client.ts +++ b/packages/types/src/client.ts @@ -2,26 +2,28 @@ import { MiddlewareStack } from "./middleware"; export interface ConfigurationPropertyDefinition< InputType, - ServiceConfiguration extends { [key: string]: any } + ResolvedType extends InputType, + ServiceConfiguration extends { [key: string]: any }, + ResolvedConfiguration extends ServiceConfiguration > { /** * Whether this property must be supplied by the user of a client. If value * must be resolved but a default is available, this property should be - * `false`. + * `false` */ required: boolean; /** * A static value to use as the default should none be supplied. */ - defaultValue?: InputType; + defaultValue?: ResolvedType; /** * A function that returns a default value for this property. It will be * called if no value is supplied. */ defaultProvider?: { - (config: Partial): InputType; + (config: ResolvedConfiguration): ResolvedType; }; /** @@ -31,8 +33,8 @@ export interface ConfigurationPropertyDefinition< apply?: { ( value: InputType, - config: Partial, - clientMiddlewareStack: MiddlewareStack + config: ResolvedConfiguration, + clientMiddlewareStack: MiddlewareStack ): void; }; } @@ -44,6 +46,14 @@ export interface ConfigurationPropertyDefinition< * to any `defaultProvider` and `apply` functions will only include properties * that have already been resolved. */ -export type ConfigurationDefinition = { - readonly [P in keyof T]: ConfigurationPropertyDefinition +export type ConfigurationDefinition< + Configuration extends { [key: string]: any }, + ResolvedConfiguration extends Configuration +> = { + readonly [P in keyof Configuration]: ConfigurationPropertyDefinition< + Configuration[P], + ResolvedConfiguration[P], + Configuration, + ResolvedConfiguration + > }; diff --git a/packages/types/src/http.ts b/packages/types/src/http.ts index 1de38f50341b6..6e2e029b774ae 100644 --- a/packages/types/src/http.ts +++ b/packages/types/src/http.ts @@ -68,12 +68,10 @@ export interface HttpResponse /** * A class that stores httpOptions and can make requests by calling handle. */ -export declare class HttpHandler< +export interface HttpHandler< StreamType = Uint8Array, HttpOptionsType = HttpOptions > { - constructor(httpOptions: HttpOptionsType); - /** * Perform any necessary cleanup actions, such as closing any open * connections. Calling `destroy` should allow the host application to diff --git a/packages/types/src/middleware.ts b/packages/types/src/middleware.ts index b82fef46bf043..3350acc92807d 100644 --- a/packages/types/src/middleware.ts +++ b/packages/types/src/middleware.ts @@ -44,22 +44,37 @@ export interface Handler< /** * A constructor for a class that implements the {Handler} interface. */ -export interface Middleware> { +export interface Middleware< + InputType extends object, + OutputType extends object, + StreamType = Uint8Array +> { /** * @param next The handler to invoke after this middleware has operated on * the user input and before this middleware operates on the output. * * @param context */ - new (next: T, context: HandlerExecutionContext): T; + new ( + next: Handler, + context: HandlerExecutionContext + ): Handler; } /** * The constructor for a class to be used as the terminal handler in a * middleware stack. */ -export interface CoreHandlerConstructor> { - new (context: HandlerExecutionContext): T; +export interface CoreHandlerConstructor< + InputType extends object, + OutputType extends object, + StreamType = Uint8Array +> { + new (context: HandlerExecutionContext): Handler< + InputType, + OutputType, + StreamType + >; } export type Step = "initialize" | "build" | "finalize"; @@ -106,7 +121,11 @@ export interface HandlerOptions { tags?: Set; } -export interface MiddlewareStack> { +export interface MiddlewareStack< + InputType extends object, + OutputType extends object, + StreamType = Uint8Array +> { /** * Add middleware to the list, optionally specifying a step, priority, and * tags. @@ -114,20 +133,25 @@ export interface MiddlewareStack> { * Middleware registered at the same step and with the same priority may be * executed in any order. */ - add(middleware: Middleware, options?: HandlerOptions): void; + add( + middleware: Middleware, + options?: HandlerOptions + ): void; /** * Create a shallow clone of this list. Step bindings and handler priorities * and tags are preserved in the copy. */ - clone(): MiddlewareStack; + clone(): MiddlewareStack; /** * Create a list containing the middlewares in this list as well as the * middlewares in the `from` list. Neither source is modified, and step * bindings and handler priorities and tags are preserved in the copy. */ - concat(from: MiddlewareStack): MiddlewareStack; + concat( + from: MiddlewareStack + ): MiddlewareStack; /** * Removes middleware from the stack. @@ -137,7 +161,9 @@ export interface MiddlewareStack> { * * If a middleware class is provided, all usages thereof will be removed. */ - remove(toRemove: Middleware | string): boolean; + remove( + toRemove: Middleware | string + ): boolean; /** * Builds a single handler function from zero or more middleware classes and @@ -149,7 +175,10 @@ export interface MiddlewareStack> { * middleware in a defined order, and the return from the innermost handler * will pass through all middleware in the reverse of that order. */ - resolve(handler: T, context: HandlerExecutionContext): T; + resolve( + handler: Handler, + context: HandlerExecutionContext + ): Handler; } /** diff --git a/packages/util-hex-encoding/package.json b/packages/util-hex-encoding/package.json index c98688e13b930..c9deeae26daf8 100644 --- a/packages/util-hex-encoding/package.json +++ b/packages/util-hex-encoding/package.json @@ -4,11 +4,11 @@ "version": "0.0.1", "description": "Converts binary buffers to and from lowercase hexadecimal encoding", "scripts": { - "pretest": "tsc", + "pretest": "tsc -p tsconfig.test.json", "test": "jest" }, - "author": "aws-javascript-sdk-team@amazon.com", - "license": "UNLICENSED", + "author": "aws-sdk-js@amazon.com", + "license": "Apache-2.0", "main": "./build/index.js", "devDependencies": { "@types/jest": "^20.0.2", @@ -16,4 +16,4 @@ "typescript": "^2.3" }, "types": "./build/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/xml-body-builder/package.json b/packages/xml-body-builder/package.json index 4590920554681..1c89e2d3ad4e6 100644 --- a/packages/xml-body-builder/package.json +++ b/packages/xml-body-builder/package.json @@ -18,7 +18,7 @@ }, "scripts": { "prepublishOnly": "tsc", - "pretest": "tsc", + "pretest": "tsc -p tsconfig.test.json", "test": "jest" }, "author": "aws-javascript-sdk-team@amazon.com", From d6bf70269e0b60ce9c558a75a322fbbd082c7cfe Mon Sep 17 00:00:00 2001 From: awstools Date: Sat, 18 Nov 2017 21:39:58 -0800 Subject: [PATCH 2/3] Add Node.JS KMS SDK package --- packages/crypto-sha256-node/package.json | 8 +- packages/sdk-kms-node/.gitignore | 10 + packages/sdk-kms-node/.npmignore | 4 + packages/sdk-kms-node/KMS.ts | 996 ++++++++++++++++++ packages/sdk-kms-node/KMSClient.ts | 478 +++++++++ packages/sdk-kms-node/LICENSE | 201 ++++ packages/sdk-kms-node/README.md | 3 + packages/sdk-kms-node/index.ts | 101 ++ .../model/AlreadyExistsException.ts | 14 + .../sdk-kms-node/model/CancelKeyDeletion.ts | 41 + .../model/CancelKeyDeletionInput.ts | 14 + .../model/CancelKeyDeletionOutput.ts | 14 + packages/sdk-kms-node/model/CreateAlias.ts | 49 + .../sdk-kms-node/model/CreateAliasInput.ts | 20 + .../sdk-kms-node/model/CreateAliasOutput.ts | 7 + packages/sdk-kms-node/model/CreateGrant.ts | 53 + .../sdk-kms-node/model/CreateGrantInput.ts | 44 + .../sdk-kms-node/model/CreateGrantOutput.ts | 20 + packages/sdk-kms-node/model/CreateKey.ts | 49 + packages/sdk-kms-node/model/CreateKeyInput.ts | 38 + .../sdk-kms-node/model/CreateKeyOutput.ts | 12 + packages/sdk-kms-node/model/Decrypt.ts | 53 + packages/sdk-kms-node/model/DecryptInput.ts | 21 + packages/sdk-kms-node/model/DecryptOutput.ts | 20 + packages/sdk-kms-node/model/DeleteAlias.ts | 37 + .../sdk-kms-node/model/DeleteAliasInput.ts | 14 + .../sdk-kms-node/model/DeleteAliasOutput.ts | 7 + .../model/DeleteImportedKeyMaterial.ts | 45 + .../model/DeleteImportedKeyMaterialInput.ts | 14 + .../model/DeleteImportedKeyMaterialOutput.ts | 7 + .../model/DependencyTimeoutException.ts | 14 + packages/sdk-kms-node/model/DescribeKey.ts | 37 + .../sdk-kms-node/model/DescribeKeyInput.ts | 18 + .../sdk-kms-node/model/DescribeKeyOutput.ts | 12 + packages/sdk-kms-node/model/DisableKey.ts | 41 + .../sdk-kms-node/model/DisableKeyInput.ts | 14 + .../sdk-kms-node/model/DisableKeyOutput.ts | 7 + .../sdk-kms-node/model/DisableKeyRotation.ts | 49 + .../model/DisableKeyRotationInput.ts | 14 + .../model/DisableKeyRotationOutput.ts | 7 + .../sdk-kms-node/model/DisabledException.ts | 14 + packages/sdk-kms-node/model/EnableKey.ts | 45 + packages/sdk-kms-node/model/EnableKeyInput.ts | 14 + .../sdk-kms-node/model/EnableKeyOutput.ts | 7 + .../sdk-kms-node/model/EnableKeyRotation.ts | 49 + .../model/EnableKeyRotationInput.ts | 14 + .../model/EnableKeyRotationOutput.ts | 7 + packages/sdk-kms-node/model/Encrypt.ts | 53 + packages/sdk-kms-node/model/EncryptInput.ts | 28 + packages/sdk-kms-node/model/EncryptOutput.ts | 19 + .../model/ExpiredImportTokenException.ts | 14 + .../sdk-kms-node/model/GenerateDataKey.ts | 53 + .../model/GenerateDataKeyInput.ts | 33 + .../model/GenerateDataKeyOutput.ts | 25 + .../model/GenerateDataKeyWithoutPlaintext.ts | 53 + .../GenerateDataKeyWithoutPlaintextInput.ts | 33 + .../GenerateDataKeyWithoutPlaintextOutput.ts | 19 + packages/sdk-kms-node/model/GenerateRandom.ts | 29 + .../sdk-kms-node/model/GenerateRandomInput.ts | 14 + .../model/GenerateRandomOutput.ts | 14 + packages/sdk-kms-node/model/GetKeyPolicy.ts | 41 + .../sdk-kms-node/model/GetKeyPolicyInput.ts | 20 + .../sdk-kms-node/model/GetKeyPolicyOutput.ts | 14 + .../model/GetKeyRotationStatus.ts | 45 + .../model/GetKeyRotationStatusInput.ts | 14 + .../model/GetKeyRotationStatusOutput.ts | 13 + .../model/GetParametersForImport.ts | 45 + .../model/GetParametersForImportInput.ts | 24 + .../model/GetParametersForImportOutput.ts | 30 + .../sdk-kms-node/model/ImportKeyMaterial.ts | 61 ++ .../model/ImportKeyMaterialInput.ts | 34 + .../model/ImportKeyMaterialOutput.ts | 7 + .../model/IncorrectKeyMaterialException.ts | 14 + .../model/InvalidAliasNameException.ts | 14 + .../sdk-kms-node/model/InvalidArnException.ts | 14 + .../model/InvalidCiphertextException.ts | 14 + .../model/InvalidGrantIdException.ts | 14 + .../model/InvalidGrantTokenException.ts | 14 + .../model/InvalidImportTokenException.ts | 14 + .../model/InvalidKeyUsageException.ts | 14 + .../model/InvalidMarkerException.ts | 14 + .../model/KMSInternalException.ts | 14 + .../model/KMSInvalidStateException.ts | 14 + .../model/KeyUnavailableException.ts | 14 + .../model/LimitExceededException.ts | 14 + packages/sdk-kms-node/model/ListAliases.ts | 33 + .../sdk-kms-node/model/ListAliasesInput.ts | 20 + .../sdk-kms-node/model/ListAliasesOutput.ts | 23 + packages/sdk-kms-node/model/ListGrants.ts | 45 + .../sdk-kms-node/model/ListGrantsInput.ts | 26 + .../sdk-kms-node/model/ListGrantsOutput.ts | 23 + .../sdk-kms-node/model/ListKeyPolicies.ts | 41 + .../model/ListKeyPoliciesInput.ts | 26 + .../model/ListKeyPoliciesOutput.ts | 23 + packages/sdk-kms-node/model/ListKeys.ts | 33 + packages/sdk-kms-node/model/ListKeysInput.ts | 20 + packages/sdk-kms-node/model/ListKeysOutput.ts | 23 + .../sdk-kms-node/model/ListResourceTags.ts | 37 + .../model/ListResourceTagsInput.ts | 26 + .../model/ListResourceTagsOutput.ts | 23 + .../sdk-kms-node/model/ListRetirableGrants.ts | 41 + .../model/ListRetirableGrantsInput.ts | 26 + .../model/ListRetirableGrantsOutput.ts | 23 + .../model/MalformedPolicyDocumentException.ts | 14 + .../sdk-kms-node/model/NotFoundException.ts | 14 + packages/sdk-kms-node/model/PutKeyPolicy.ts | 53 + .../sdk-kms-node/model/PutKeyPolicyInput.ts | 31 + .../sdk-kms-node/model/PutKeyPolicyOutput.ts | 7 + packages/sdk-kms-node/model/ReEncrypt.ts | 57 + packages/sdk-kms-node/model/ReEncryptInput.ts | 30 + .../sdk-kms-node/model/ReEncryptOutput.ts | 25 + packages/sdk-kms-node/model/RetireGrant.ts | 45 + .../sdk-kms-node/model/RetireGrantInput.ts | 26 + .../sdk-kms-node/model/RetireGrantOutput.ts | 7 + packages/sdk-kms-node/model/RevokeGrant.ts | 45 + .../sdk-kms-node/model/RevokeGrantInput.ts | 20 + .../sdk-kms-node/model/RevokeGrantOutput.ts | 7 + .../sdk-kms-node/model/ScheduleKeyDeletion.ts | 41 + .../model/ScheduleKeyDeletionInput.ts | 20 + .../model/ScheduleKeyDeletionOutput.ts | 19 + .../sdk-kms-node/model/ServiceMetadata.ts | 13 + packages/sdk-kms-node/model/TagException.ts | 14 + packages/sdk-kms-node/model/TagResource.ts | 45 + .../sdk-kms-node/model/TagResourceInput.ts | 18 + .../sdk-kms-node/model/TagResourceOutput.ts | 7 + .../model/UnsupportedOperationException.ts | 14 + packages/sdk-kms-node/model/UntagResource.ts | 41 + .../sdk-kms-node/model/UntagResourceInput.ts | 18 + .../sdk-kms-node/model/UntagResourceOutput.ts | 7 + packages/sdk-kms-node/model/UpdateAlias.ts | 37 + .../sdk-kms-node/model/UpdateAliasInput.ts | 20 + .../sdk-kms-node/model/UpdateAliasOutput.ts | 7 + .../model/UpdateKeyDescription.ts | 41 + .../model/UpdateKeyDescriptionInput.ts | 19 + .../model/UpdateKeyDescriptionOutput.ts | 7 + packages/sdk-kms-node/model/_AliasList.ts | 9 + .../sdk-kms-node/model/_AliasListEntry.ts | 26 + .../model/_EncryptionContextType.ts | 15 + .../sdk-kms-node/model/_GrantConstraints.ts | 15 + packages/sdk-kms-node/model/_GrantList.ts | 9 + .../sdk-kms-node/model/_GrantListEntry.ts | 57 + .../sdk-kms-node/model/_GrantOperationList.ts | 10 + .../sdk-kms-node/model/_GrantTokenList.ts | 11 + packages/sdk-kms-node/model/_KeyList.ts | 9 + packages/sdk-kms-node/model/_KeyListEntry.ts | 20 + packages/sdk-kms-node/model/_KeyMetadata.ts | 75 ++ .../sdk-kms-node/model/_PolicyNameList.ts | 11 + packages/sdk-kms-node/model/_Tag.ts | 19 + packages/sdk-kms-node/model/_TagKeyList.ts | 11 + packages/sdk-kms-node/model/_TagList.ts | 9 + packages/sdk-kms-node/package.json | 35 + packages/sdk-kms-node/tsconfig.json | 17 + packages/sdk-kms-node/tsconfig.test.json | 3 + .../types/AlreadyExistsException.ts | 27 + .../types/CancelKeyDeletionInput.ts | 9 + .../types/CancelKeyDeletionOutput.ts | 17 + .../sdk-kms-node/types/CreateAliasInput.ts | 14 + .../sdk-kms-node/types/CreateAliasOutput.ts | 12 + .../sdk-kms-node/types/CreateGrantInput.ts | 65 ++ .../sdk-kms-node/types/CreateGrantOutput.ts | 22 + packages/sdk-kms-node/types/CreateKeyInput.ts | 36 + .../sdk-kms-node/types/CreateKeyOutput.ts | 18 + packages/sdk-kms-node/types/DecryptInput.ts | 19 + packages/sdk-kms-node/types/DecryptOutput.ts | 22 + .../sdk-kms-node/types/DeleteAliasInput.ts | 9 + .../sdk-kms-node/types/DeleteAliasOutput.ts | 12 + .../types/DeleteImportedKeyMaterialInput.ts | 9 + .../types/DeleteImportedKeyMaterialOutput.ts | 12 + .../types/DependencyTimeoutException.ts | 27 + .../sdk-kms-node/types/DescribeKeyInput.ts | 14 + .../sdk-kms-node/types/DescribeKeyOutput.ts | 18 + .../sdk-kms-node/types/DisableKeyInput.ts | 9 + .../sdk-kms-node/types/DisableKeyOutput.ts | 12 + .../types/DisableKeyRotationInput.ts | 9 + .../types/DisableKeyRotationOutput.ts | 12 + .../sdk-kms-node/types/DisabledException.ts | 27 + packages/sdk-kms-node/types/EnableKeyInput.ts | 9 + .../sdk-kms-node/types/EnableKeyOutput.ts | 12 + .../types/EnableKeyRotationInput.ts | 9 + .../types/EnableKeyRotationOutput.ts | 12 + packages/sdk-kms-node/types/EncryptInput.ts | 24 + packages/sdk-kms-node/types/EncryptOutput.ts | 22 + .../types/ExpiredImportTokenException.ts | 27 + .../types/GenerateDataKeyInput.ts | 29 + .../types/GenerateDataKeyOutput.ts | 27 + .../GenerateDataKeyWithoutPlaintextInput.ts | 29 + .../GenerateDataKeyWithoutPlaintextOutput.ts | 22 + .../sdk-kms-node/types/GenerateRandomInput.ts | 9 + .../types/GenerateRandomOutput.ts | 17 + .../sdk-kms-node/types/GetKeyPolicyInput.ts | 14 + .../sdk-kms-node/types/GetKeyPolicyOutput.ts | 17 + .../types/GetKeyRotationStatusInput.ts | 9 + .../types/GetKeyRotationStatusOutput.ts | 17 + .../types/GetParametersForImportInput.ts | 23 + .../types/GetParametersForImportOutput.ts | 32 + .../types/ImportKeyMaterialInput.ts | 32 + .../types/ImportKeyMaterialOutput.ts | 12 + .../types/IncorrectKeyMaterialException.ts | 27 + .../sdk-kms-node/types/InputTypesUnion.ts | 72 ++ .../types/InvalidAliasNameException.ts | 27 + .../sdk-kms-node/types/InvalidArnException.ts | 27 + .../types/InvalidCiphertextException.ts | 27 + .../types/InvalidGrantIdException.ts | 27 + .../types/InvalidGrantTokenException.ts | 27 + .../types/InvalidImportTokenException.ts | 27 + .../types/InvalidKeyUsageException.ts | 27 + .../types/InvalidMarkerException.ts | 27 + .../types/KMSInternalException.ts | 27 + .../types/KMSInvalidStateException.ts | 27 + .../types/KeyUnavailableException.ts | 27 + .../types/LimitExceededException.ts | 27 + .../sdk-kms-node/types/ListAliasesInput.ts | 14 + .../sdk-kms-node/types/ListAliasesOutput.ts | 28 + .../sdk-kms-node/types/ListGrantsInput.ts | 19 + .../sdk-kms-node/types/ListGrantsOutput.ts | 28 + .../types/ListKeyPoliciesInput.ts | 19 + .../types/ListKeyPoliciesOutput.ts | 27 + packages/sdk-kms-node/types/ListKeysInput.ts | 14 + packages/sdk-kms-node/types/ListKeysOutput.ts | 28 + .../types/ListResourceTagsInput.ts | 19 + .../types/ListResourceTagsOutput.ts | 28 + .../types/ListRetirableGrantsInput.ts | 19 + .../types/ListRetirableGrantsOutput.ts | 28 + .../types/MalformedPolicyDocumentException.ts | 27 + .../sdk-kms-node/types/NotFoundException.ts | 27 + .../sdk-kms-node/types/OutputTypesUnion.ts | 72 ++ .../sdk-kms-node/types/PutKeyPolicyInput.ts | 24 + .../sdk-kms-node/types/PutKeyPolicyOutput.ts | 12 + packages/sdk-kms-node/types/ReEncryptInput.ts | 33 + .../sdk-kms-node/types/ReEncryptOutput.ts | 27 + .../sdk-kms-node/types/RetireGrantInput.ts | 19 + .../sdk-kms-node/types/RetireGrantOutput.ts | 12 + .../sdk-kms-node/types/RevokeGrantInput.ts | 14 + .../sdk-kms-node/types/RevokeGrantOutput.ts | 12 + .../types/ScheduleKeyDeletionInput.ts | 14 + .../types/ScheduleKeyDeletionOutput.ts | 22 + packages/sdk-kms-node/types/TagException.ts | 27 + .../sdk-kms-node/types/TagResourceInput.ts | 16 + .../sdk-kms-node/types/TagResourceOutput.ts | 12 + .../types/UnsupportedOperationException.ts | 27 + .../sdk-kms-node/types/UntagResourceInput.ts | 14 + .../sdk-kms-node/types/UntagResourceOutput.ts | 12 + .../sdk-kms-node/types/UpdateAliasInput.ts | 14 + .../sdk-kms-node/types/UpdateAliasOutput.ts | 12 + .../types/UpdateKeyDescriptionInput.ts | 14 + .../types/UpdateKeyDescriptionOutput.ts | 12 + .../sdk-kms-node/types/_AliasListEntry.ts | 21 + .../sdk-kms-node/types/_GrantConstraints.ts | 30 + .../sdk-kms-node/types/_GrantListEntry.ts | 106 ++ packages/sdk-kms-node/types/_KeyListEntry.ts | 16 + packages/sdk-kms-node/types/_KeyMetadata.ts | 94 ++ packages/sdk-kms-node/types/_Tag.ts | 16 + 252 files changed, 7599 insertions(+), 4 deletions(-) create mode 100644 packages/sdk-kms-node/.gitignore create mode 100644 packages/sdk-kms-node/.npmignore create mode 100644 packages/sdk-kms-node/KMS.ts create mode 100644 packages/sdk-kms-node/KMSClient.ts create mode 100644 packages/sdk-kms-node/LICENSE create mode 100644 packages/sdk-kms-node/README.md create mode 100644 packages/sdk-kms-node/index.ts create mode 100644 packages/sdk-kms-node/model/AlreadyExistsException.ts create mode 100644 packages/sdk-kms-node/model/CancelKeyDeletion.ts create mode 100644 packages/sdk-kms-node/model/CancelKeyDeletionInput.ts create mode 100644 packages/sdk-kms-node/model/CancelKeyDeletionOutput.ts create mode 100644 packages/sdk-kms-node/model/CreateAlias.ts create mode 100644 packages/sdk-kms-node/model/CreateAliasInput.ts create mode 100644 packages/sdk-kms-node/model/CreateAliasOutput.ts create mode 100644 packages/sdk-kms-node/model/CreateGrant.ts create mode 100644 packages/sdk-kms-node/model/CreateGrantInput.ts create mode 100644 packages/sdk-kms-node/model/CreateGrantOutput.ts create mode 100644 packages/sdk-kms-node/model/CreateKey.ts create mode 100644 packages/sdk-kms-node/model/CreateKeyInput.ts create mode 100644 packages/sdk-kms-node/model/CreateKeyOutput.ts create mode 100644 packages/sdk-kms-node/model/Decrypt.ts create mode 100644 packages/sdk-kms-node/model/DecryptInput.ts create mode 100644 packages/sdk-kms-node/model/DecryptOutput.ts create mode 100644 packages/sdk-kms-node/model/DeleteAlias.ts create mode 100644 packages/sdk-kms-node/model/DeleteAliasInput.ts create mode 100644 packages/sdk-kms-node/model/DeleteAliasOutput.ts create mode 100644 packages/sdk-kms-node/model/DeleteImportedKeyMaterial.ts create mode 100644 packages/sdk-kms-node/model/DeleteImportedKeyMaterialInput.ts create mode 100644 packages/sdk-kms-node/model/DeleteImportedKeyMaterialOutput.ts create mode 100644 packages/sdk-kms-node/model/DependencyTimeoutException.ts create mode 100644 packages/sdk-kms-node/model/DescribeKey.ts create mode 100644 packages/sdk-kms-node/model/DescribeKeyInput.ts create mode 100644 packages/sdk-kms-node/model/DescribeKeyOutput.ts create mode 100644 packages/sdk-kms-node/model/DisableKey.ts create mode 100644 packages/sdk-kms-node/model/DisableKeyInput.ts create mode 100644 packages/sdk-kms-node/model/DisableKeyOutput.ts create mode 100644 packages/sdk-kms-node/model/DisableKeyRotation.ts create mode 100644 packages/sdk-kms-node/model/DisableKeyRotationInput.ts create mode 100644 packages/sdk-kms-node/model/DisableKeyRotationOutput.ts create mode 100644 packages/sdk-kms-node/model/DisabledException.ts create mode 100644 packages/sdk-kms-node/model/EnableKey.ts create mode 100644 packages/sdk-kms-node/model/EnableKeyInput.ts create mode 100644 packages/sdk-kms-node/model/EnableKeyOutput.ts create mode 100644 packages/sdk-kms-node/model/EnableKeyRotation.ts create mode 100644 packages/sdk-kms-node/model/EnableKeyRotationInput.ts create mode 100644 packages/sdk-kms-node/model/EnableKeyRotationOutput.ts create mode 100644 packages/sdk-kms-node/model/Encrypt.ts create mode 100644 packages/sdk-kms-node/model/EncryptInput.ts create mode 100644 packages/sdk-kms-node/model/EncryptOutput.ts create mode 100644 packages/sdk-kms-node/model/ExpiredImportTokenException.ts create mode 100644 packages/sdk-kms-node/model/GenerateDataKey.ts create mode 100644 packages/sdk-kms-node/model/GenerateDataKeyInput.ts create mode 100644 packages/sdk-kms-node/model/GenerateDataKeyOutput.ts create mode 100644 packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintext.ts create mode 100644 packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextInput.ts create mode 100644 packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextOutput.ts create mode 100644 packages/sdk-kms-node/model/GenerateRandom.ts create mode 100644 packages/sdk-kms-node/model/GenerateRandomInput.ts create mode 100644 packages/sdk-kms-node/model/GenerateRandomOutput.ts create mode 100644 packages/sdk-kms-node/model/GetKeyPolicy.ts create mode 100644 packages/sdk-kms-node/model/GetKeyPolicyInput.ts create mode 100644 packages/sdk-kms-node/model/GetKeyPolicyOutput.ts create mode 100644 packages/sdk-kms-node/model/GetKeyRotationStatus.ts create mode 100644 packages/sdk-kms-node/model/GetKeyRotationStatusInput.ts create mode 100644 packages/sdk-kms-node/model/GetKeyRotationStatusOutput.ts create mode 100644 packages/sdk-kms-node/model/GetParametersForImport.ts create mode 100644 packages/sdk-kms-node/model/GetParametersForImportInput.ts create mode 100644 packages/sdk-kms-node/model/GetParametersForImportOutput.ts create mode 100644 packages/sdk-kms-node/model/ImportKeyMaterial.ts create mode 100644 packages/sdk-kms-node/model/ImportKeyMaterialInput.ts create mode 100644 packages/sdk-kms-node/model/ImportKeyMaterialOutput.ts create mode 100644 packages/sdk-kms-node/model/IncorrectKeyMaterialException.ts create mode 100644 packages/sdk-kms-node/model/InvalidAliasNameException.ts create mode 100644 packages/sdk-kms-node/model/InvalidArnException.ts create mode 100644 packages/sdk-kms-node/model/InvalidCiphertextException.ts create mode 100644 packages/sdk-kms-node/model/InvalidGrantIdException.ts create mode 100644 packages/sdk-kms-node/model/InvalidGrantTokenException.ts create mode 100644 packages/sdk-kms-node/model/InvalidImportTokenException.ts create mode 100644 packages/sdk-kms-node/model/InvalidKeyUsageException.ts create mode 100644 packages/sdk-kms-node/model/InvalidMarkerException.ts create mode 100644 packages/sdk-kms-node/model/KMSInternalException.ts create mode 100644 packages/sdk-kms-node/model/KMSInvalidStateException.ts create mode 100644 packages/sdk-kms-node/model/KeyUnavailableException.ts create mode 100644 packages/sdk-kms-node/model/LimitExceededException.ts create mode 100644 packages/sdk-kms-node/model/ListAliases.ts create mode 100644 packages/sdk-kms-node/model/ListAliasesInput.ts create mode 100644 packages/sdk-kms-node/model/ListAliasesOutput.ts create mode 100644 packages/sdk-kms-node/model/ListGrants.ts create mode 100644 packages/sdk-kms-node/model/ListGrantsInput.ts create mode 100644 packages/sdk-kms-node/model/ListGrantsOutput.ts create mode 100644 packages/sdk-kms-node/model/ListKeyPolicies.ts create mode 100644 packages/sdk-kms-node/model/ListKeyPoliciesInput.ts create mode 100644 packages/sdk-kms-node/model/ListKeyPoliciesOutput.ts create mode 100644 packages/sdk-kms-node/model/ListKeys.ts create mode 100644 packages/sdk-kms-node/model/ListKeysInput.ts create mode 100644 packages/sdk-kms-node/model/ListKeysOutput.ts create mode 100644 packages/sdk-kms-node/model/ListResourceTags.ts create mode 100644 packages/sdk-kms-node/model/ListResourceTagsInput.ts create mode 100644 packages/sdk-kms-node/model/ListResourceTagsOutput.ts create mode 100644 packages/sdk-kms-node/model/ListRetirableGrants.ts create mode 100644 packages/sdk-kms-node/model/ListRetirableGrantsInput.ts create mode 100644 packages/sdk-kms-node/model/ListRetirableGrantsOutput.ts create mode 100644 packages/sdk-kms-node/model/MalformedPolicyDocumentException.ts create mode 100644 packages/sdk-kms-node/model/NotFoundException.ts create mode 100644 packages/sdk-kms-node/model/PutKeyPolicy.ts create mode 100644 packages/sdk-kms-node/model/PutKeyPolicyInput.ts create mode 100644 packages/sdk-kms-node/model/PutKeyPolicyOutput.ts create mode 100644 packages/sdk-kms-node/model/ReEncrypt.ts create mode 100644 packages/sdk-kms-node/model/ReEncryptInput.ts create mode 100644 packages/sdk-kms-node/model/ReEncryptOutput.ts create mode 100644 packages/sdk-kms-node/model/RetireGrant.ts create mode 100644 packages/sdk-kms-node/model/RetireGrantInput.ts create mode 100644 packages/sdk-kms-node/model/RetireGrantOutput.ts create mode 100644 packages/sdk-kms-node/model/RevokeGrant.ts create mode 100644 packages/sdk-kms-node/model/RevokeGrantInput.ts create mode 100644 packages/sdk-kms-node/model/RevokeGrantOutput.ts create mode 100644 packages/sdk-kms-node/model/ScheduleKeyDeletion.ts create mode 100644 packages/sdk-kms-node/model/ScheduleKeyDeletionInput.ts create mode 100644 packages/sdk-kms-node/model/ScheduleKeyDeletionOutput.ts create mode 100644 packages/sdk-kms-node/model/ServiceMetadata.ts create mode 100644 packages/sdk-kms-node/model/TagException.ts create mode 100644 packages/sdk-kms-node/model/TagResource.ts create mode 100644 packages/sdk-kms-node/model/TagResourceInput.ts create mode 100644 packages/sdk-kms-node/model/TagResourceOutput.ts create mode 100644 packages/sdk-kms-node/model/UnsupportedOperationException.ts create mode 100644 packages/sdk-kms-node/model/UntagResource.ts create mode 100644 packages/sdk-kms-node/model/UntagResourceInput.ts create mode 100644 packages/sdk-kms-node/model/UntagResourceOutput.ts create mode 100644 packages/sdk-kms-node/model/UpdateAlias.ts create mode 100644 packages/sdk-kms-node/model/UpdateAliasInput.ts create mode 100644 packages/sdk-kms-node/model/UpdateAliasOutput.ts create mode 100644 packages/sdk-kms-node/model/UpdateKeyDescription.ts create mode 100644 packages/sdk-kms-node/model/UpdateKeyDescriptionInput.ts create mode 100644 packages/sdk-kms-node/model/UpdateKeyDescriptionOutput.ts create mode 100644 packages/sdk-kms-node/model/_AliasList.ts create mode 100644 packages/sdk-kms-node/model/_AliasListEntry.ts create mode 100644 packages/sdk-kms-node/model/_EncryptionContextType.ts create mode 100644 packages/sdk-kms-node/model/_GrantConstraints.ts create mode 100644 packages/sdk-kms-node/model/_GrantList.ts create mode 100644 packages/sdk-kms-node/model/_GrantListEntry.ts create mode 100644 packages/sdk-kms-node/model/_GrantOperationList.ts create mode 100644 packages/sdk-kms-node/model/_GrantTokenList.ts create mode 100644 packages/sdk-kms-node/model/_KeyList.ts create mode 100644 packages/sdk-kms-node/model/_KeyListEntry.ts create mode 100644 packages/sdk-kms-node/model/_KeyMetadata.ts create mode 100644 packages/sdk-kms-node/model/_PolicyNameList.ts create mode 100644 packages/sdk-kms-node/model/_Tag.ts create mode 100644 packages/sdk-kms-node/model/_TagKeyList.ts create mode 100644 packages/sdk-kms-node/model/_TagList.ts create mode 100644 packages/sdk-kms-node/package.json create mode 100644 packages/sdk-kms-node/tsconfig.json create mode 100644 packages/sdk-kms-node/tsconfig.test.json create mode 100644 packages/sdk-kms-node/types/AlreadyExistsException.ts create mode 100644 packages/sdk-kms-node/types/CancelKeyDeletionInput.ts create mode 100644 packages/sdk-kms-node/types/CancelKeyDeletionOutput.ts create mode 100644 packages/sdk-kms-node/types/CreateAliasInput.ts create mode 100644 packages/sdk-kms-node/types/CreateAliasOutput.ts create mode 100644 packages/sdk-kms-node/types/CreateGrantInput.ts create mode 100644 packages/sdk-kms-node/types/CreateGrantOutput.ts create mode 100644 packages/sdk-kms-node/types/CreateKeyInput.ts create mode 100644 packages/sdk-kms-node/types/CreateKeyOutput.ts create mode 100644 packages/sdk-kms-node/types/DecryptInput.ts create mode 100644 packages/sdk-kms-node/types/DecryptOutput.ts create mode 100644 packages/sdk-kms-node/types/DeleteAliasInput.ts create mode 100644 packages/sdk-kms-node/types/DeleteAliasOutput.ts create mode 100644 packages/sdk-kms-node/types/DeleteImportedKeyMaterialInput.ts create mode 100644 packages/sdk-kms-node/types/DeleteImportedKeyMaterialOutput.ts create mode 100644 packages/sdk-kms-node/types/DependencyTimeoutException.ts create mode 100644 packages/sdk-kms-node/types/DescribeKeyInput.ts create mode 100644 packages/sdk-kms-node/types/DescribeKeyOutput.ts create mode 100644 packages/sdk-kms-node/types/DisableKeyInput.ts create mode 100644 packages/sdk-kms-node/types/DisableKeyOutput.ts create mode 100644 packages/sdk-kms-node/types/DisableKeyRotationInput.ts create mode 100644 packages/sdk-kms-node/types/DisableKeyRotationOutput.ts create mode 100644 packages/sdk-kms-node/types/DisabledException.ts create mode 100644 packages/sdk-kms-node/types/EnableKeyInput.ts create mode 100644 packages/sdk-kms-node/types/EnableKeyOutput.ts create mode 100644 packages/sdk-kms-node/types/EnableKeyRotationInput.ts create mode 100644 packages/sdk-kms-node/types/EnableKeyRotationOutput.ts create mode 100644 packages/sdk-kms-node/types/EncryptInput.ts create mode 100644 packages/sdk-kms-node/types/EncryptOutput.ts create mode 100644 packages/sdk-kms-node/types/ExpiredImportTokenException.ts create mode 100644 packages/sdk-kms-node/types/GenerateDataKeyInput.ts create mode 100644 packages/sdk-kms-node/types/GenerateDataKeyOutput.ts create mode 100644 packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextInput.ts create mode 100644 packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextOutput.ts create mode 100644 packages/sdk-kms-node/types/GenerateRandomInput.ts create mode 100644 packages/sdk-kms-node/types/GenerateRandomOutput.ts create mode 100644 packages/sdk-kms-node/types/GetKeyPolicyInput.ts create mode 100644 packages/sdk-kms-node/types/GetKeyPolicyOutput.ts create mode 100644 packages/sdk-kms-node/types/GetKeyRotationStatusInput.ts create mode 100644 packages/sdk-kms-node/types/GetKeyRotationStatusOutput.ts create mode 100644 packages/sdk-kms-node/types/GetParametersForImportInput.ts create mode 100644 packages/sdk-kms-node/types/GetParametersForImportOutput.ts create mode 100644 packages/sdk-kms-node/types/ImportKeyMaterialInput.ts create mode 100644 packages/sdk-kms-node/types/ImportKeyMaterialOutput.ts create mode 100644 packages/sdk-kms-node/types/IncorrectKeyMaterialException.ts create mode 100644 packages/sdk-kms-node/types/InputTypesUnion.ts create mode 100644 packages/sdk-kms-node/types/InvalidAliasNameException.ts create mode 100644 packages/sdk-kms-node/types/InvalidArnException.ts create mode 100644 packages/sdk-kms-node/types/InvalidCiphertextException.ts create mode 100644 packages/sdk-kms-node/types/InvalidGrantIdException.ts create mode 100644 packages/sdk-kms-node/types/InvalidGrantTokenException.ts create mode 100644 packages/sdk-kms-node/types/InvalidImportTokenException.ts create mode 100644 packages/sdk-kms-node/types/InvalidKeyUsageException.ts create mode 100644 packages/sdk-kms-node/types/InvalidMarkerException.ts create mode 100644 packages/sdk-kms-node/types/KMSInternalException.ts create mode 100644 packages/sdk-kms-node/types/KMSInvalidStateException.ts create mode 100644 packages/sdk-kms-node/types/KeyUnavailableException.ts create mode 100644 packages/sdk-kms-node/types/LimitExceededException.ts create mode 100644 packages/sdk-kms-node/types/ListAliasesInput.ts create mode 100644 packages/sdk-kms-node/types/ListAliasesOutput.ts create mode 100644 packages/sdk-kms-node/types/ListGrantsInput.ts create mode 100644 packages/sdk-kms-node/types/ListGrantsOutput.ts create mode 100644 packages/sdk-kms-node/types/ListKeyPoliciesInput.ts create mode 100644 packages/sdk-kms-node/types/ListKeyPoliciesOutput.ts create mode 100644 packages/sdk-kms-node/types/ListKeysInput.ts create mode 100644 packages/sdk-kms-node/types/ListKeysOutput.ts create mode 100644 packages/sdk-kms-node/types/ListResourceTagsInput.ts create mode 100644 packages/sdk-kms-node/types/ListResourceTagsOutput.ts create mode 100644 packages/sdk-kms-node/types/ListRetirableGrantsInput.ts create mode 100644 packages/sdk-kms-node/types/ListRetirableGrantsOutput.ts create mode 100644 packages/sdk-kms-node/types/MalformedPolicyDocumentException.ts create mode 100644 packages/sdk-kms-node/types/NotFoundException.ts create mode 100644 packages/sdk-kms-node/types/OutputTypesUnion.ts create mode 100644 packages/sdk-kms-node/types/PutKeyPolicyInput.ts create mode 100644 packages/sdk-kms-node/types/PutKeyPolicyOutput.ts create mode 100644 packages/sdk-kms-node/types/ReEncryptInput.ts create mode 100644 packages/sdk-kms-node/types/ReEncryptOutput.ts create mode 100644 packages/sdk-kms-node/types/RetireGrantInput.ts create mode 100644 packages/sdk-kms-node/types/RetireGrantOutput.ts create mode 100644 packages/sdk-kms-node/types/RevokeGrantInput.ts create mode 100644 packages/sdk-kms-node/types/RevokeGrantOutput.ts create mode 100644 packages/sdk-kms-node/types/ScheduleKeyDeletionInput.ts create mode 100644 packages/sdk-kms-node/types/ScheduleKeyDeletionOutput.ts create mode 100644 packages/sdk-kms-node/types/TagException.ts create mode 100644 packages/sdk-kms-node/types/TagResourceInput.ts create mode 100644 packages/sdk-kms-node/types/TagResourceOutput.ts create mode 100644 packages/sdk-kms-node/types/UnsupportedOperationException.ts create mode 100644 packages/sdk-kms-node/types/UntagResourceInput.ts create mode 100644 packages/sdk-kms-node/types/UntagResourceOutput.ts create mode 100644 packages/sdk-kms-node/types/UpdateAliasInput.ts create mode 100644 packages/sdk-kms-node/types/UpdateAliasOutput.ts create mode 100644 packages/sdk-kms-node/types/UpdateKeyDescriptionInput.ts create mode 100644 packages/sdk-kms-node/types/UpdateKeyDescriptionOutput.ts create mode 100644 packages/sdk-kms-node/types/_AliasListEntry.ts create mode 100644 packages/sdk-kms-node/types/_GrantConstraints.ts create mode 100644 packages/sdk-kms-node/types/_GrantListEntry.ts create mode 100644 packages/sdk-kms-node/types/_KeyListEntry.ts create mode 100644 packages/sdk-kms-node/types/_KeyMetadata.ts create mode 100644 packages/sdk-kms-node/types/_Tag.ts diff --git a/packages/crypto-sha256-node/package.json b/packages/crypto-sha256-node/package.json index f2ff24b768312..6e1be17fec543 100644 --- a/packages/crypto-sha256-node/package.json +++ b/packages/crypto-sha256-node/package.json @@ -4,11 +4,11 @@ "description": "A Node.JS implementation of the AWS SDK for JavaScript's `Hash` interface for SHA-256", "main": "./build/index.js", "scripts": { - "pretest": "tsc", + "pretest": "tsc -p tsconfig.test.json", "test": "jest" }, - "author": "aws-javascript-sdk-team@amazon.com", - "license": "UNLICENSED", + "author": "aws-sdk-js@amazon.com", + "license": "Apache-2.0", "dependencies": { "@aws/types": "^0.0.1", "@aws/util-buffer-from": "^0.0.1" @@ -20,4 +20,4 @@ "typescript": "^2.3" }, "types": "./build/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/sdk-kms-node/.gitignore b/packages/sdk-kms-node/.gitignore new file mode 100644 index 0000000000000..9b7e3100fd965 --- /dev/null +++ b/packages/sdk-kms-node/.gitignore @@ -0,0 +1,10 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +*.tgz +*.log +package-lock.json +*.d.ts +*.js +*.js.map \ No newline at end of file diff --git a/packages/sdk-kms-node/.npmignore b/packages/sdk-kms-node/.npmignore new file mode 100644 index 0000000000000..c63a94e488a03 --- /dev/null +++ b/packages/sdk-kms-node/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +*.ts +tsconfig.test.json \ No newline at end of file diff --git a/packages/sdk-kms-node/KMS.ts b/packages/sdk-kms-node/KMS.ts new file mode 100644 index 0000000000000..cacca8f8ecf70 --- /dev/null +++ b/packages/sdk-kms-node/KMS.ts @@ -0,0 +1,996 @@ +import { KMSClient } from "./KMSClient"; +import { AlreadyExistsException } from "./types/AlreadyExistsException"; +import { CancelKeyDeletionInput } from "./types/CancelKeyDeletionInput"; +import { CancelKeyDeletionOutput } from "./types/CancelKeyDeletionOutput"; +import { CreateAliasInput } from "./types/CreateAliasInput"; +import { CreateAliasOutput } from "./types/CreateAliasOutput"; +import { CreateGrantInput } from "./types/CreateGrantInput"; +import { CreateGrantOutput } from "./types/CreateGrantOutput"; +import { CreateKeyInput } from "./types/CreateKeyInput"; +import { CreateKeyOutput } from "./types/CreateKeyOutput"; +import { DecryptInput } from "./types/DecryptInput"; +import { DecryptOutput } from "./types/DecryptOutput"; +import { DeleteAliasInput } from "./types/DeleteAliasInput"; +import { DeleteAliasOutput } from "./types/DeleteAliasOutput"; +import { DeleteImportedKeyMaterialInput } from "./types/DeleteImportedKeyMaterialInput"; +import { DeleteImportedKeyMaterialOutput } from "./types/DeleteImportedKeyMaterialOutput"; +import { DependencyTimeoutException } from "./types/DependencyTimeoutException"; +import { DescribeKeyInput } from "./types/DescribeKeyInput"; +import { DescribeKeyOutput } from "./types/DescribeKeyOutput"; +import { DisableKeyInput } from "./types/DisableKeyInput"; +import { DisableKeyOutput } from "./types/DisableKeyOutput"; +import { DisableKeyRotationInput } from "./types/DisableKeyRotationInput"; +import { DisableKeyRotationOutput } from "./types/DisableKeyRotationOutput"; +import { DisabledException } from "./types/DisabledException"; +import { EnableKeyInput } from "./types/EnableKeyInput"; +import { EnableKeyOutput } from "./types/EnableKeyOutput"; +import { EnableKeyRotationInput } from "./types/EnableKeyRotationInput"; +import { EnableKeyRotationOutput } from "./types/EnableKeyRotationOutput"; +import { EncryptInput } from "./types/EncryptInput"; +import { EncryptOutput } from "./types/EncryptOutput"; +import { ExpiredImportTokenException } from "./types/ExpiredImportTokenException"; +import { GenerateDataKeyInput } from "./types/GenerateDataKeyInput"; +import { GenerateDataKeyOutput } from "./types/GenerateDataKeyOutput"; +import { GenerateDataKeyWithoutPlaintextInput } from "./types/GenerateDataKeyWithoutPlaintextInput"; +import { GenerateDataKeyWithoutPlaintextOutput } from "./types/GenerateDataKeyWithoutPlaintextOutput"; +import { GenerateRandomInput } from "./types/GenerateRandomInput"; +import { GenerateRandomOutput } from "./types/GenerateRandomOutput"; +import { GetKeyPolicyInput } from "./types/GetKeyPolicyInput"; +import { GetKeyPolicyOutput } from "./types/GetKeyPolicyOutput"; +import { GetKeyRotationStatusInput } from "./types/GetKeyRotationStatusInput"; +import { GetKeyRotationStatusOutput } from "./types/GetKeyRotationStatusOutput"; +import { GetParametersForImportInput } from "./types/GetParametersForImportInput"; +import { GetParametersForImportOutput } from "./types/GetParametersForImportOutput"; +import { ImportKeyMaterialInput } from "./types/ImportKeyMaterialInput"; +import { ImportKeyMaterialOutput } from "./types/ImportKeyMaterialOutput"; +import { IncorrectKeyMaterialException } from "./types/IncorrectKeyMaterialException"; +import { InvalidAliasNameException } from "./types/InvalidAliasNameException"; +import { InvalidArnException } from "./types/InvalidArnException"; +import { InvalidCiphertextException } from "./types/InvalidCiphertextException"; +import { InvalidGrantIdException } from "./types/InvalidGrantIdException"; +import { InvalidGrantTokenException } from "./types/InvalidGrantTokenException"; +import { InvalidImportTokenException } from "./types/InvalidImportTokenException"; +import { InvalidKeyUsageException } from "./types/InvalidKeyUsageException"; +import { InvalidMarkerException } from "./types/InvalidMarkerException"; +import { KMSInternalException } from "./types/KMSInternalException"; +import { KMSInvalidStateException } from "./types/KMSInvalidStateException"; +import { KeyUnavailableException } from "./types/KeyUnavailableException"; +import { LimitExceededException } from "./types/LimitExceededException"; +import { ListAliasesInput } from "./types/ListAliasesInput"; +import { ListAliasesOutput } from "./types/ListAliasesOutput"; +import { ListGrantsInput } from "./types/ListGrantsInput"; +import { ListGrantsOutput } from "./types/ListGrantsOutput"; +import { ListKeyPoliciesInput } from "./types/ListKeyPoliciesInput"; +import { ListKeyPoliciesOutput } from "./types/ListKeyPoliciesOutput"; +import { ListKeysInput } from "./types/ListKeysInput"; +import { ListKeysOutput } from "./types/ListKeysOutput"; +import { ListResourceTagsInput } from "./types/ListResourceTagsInput"; +import { ListResourceTagsOutput } from "./types/ListResourceTagsOutput"; +import { ListRetirableGrantsInput } from "./types/ListRetirableGrantsInput"; +import { ListRetirableGrantsOutput } from "./types/ListRetirableGrantsOutput"; +import { MalformedPolicyDocumentException } from "./types/MalformedPolicyDocumentException"; +import { NotFoundException } from "./types/NotFoundException"; +import { PutKeyPolicyInput } from "./types/PutKeyPolicyInput"; +import { PutKeyPolicyOutput } from "./types/PutKeyPolicyOutput"; +import { ReEncryptInput } from "./types/ReEncryptInput"; +import { ReEncryptOutput } from "./types/ReEncryptOutput"; +import { RetireGrantInput } from "./types/RetireGrantInput"; +import { RetireGrantOutput } from "./types/RetireGrantOutput"; +import { RevokeGrantInput } from "./types/RevokeGrantInput"; +import { RevokeGrantOutput } from "./types/RevokeGrantOutput"; +import { ScheduleKeyDeletionInput } from "./types/ScheduleKeyDeletionInput"; +import { ScheduleKeyDeletionOutput } from "./types/ScheduleKeyDeletionOutput"; +import { TagException } from "./types/TagException"; +import { TagResourceInput } from "./types/TagResourceInput"; +import { TagResourceOutput } from "./types/TagResourceOutput"; +import { UnsupportedOperationException } from "./types/UnsupportedOperationException"; +import { UntagResourceInput } from "./types/UntagResourceInput"; +import { UntagResourceOutput } from "./types/UntagResourceOutput"; +import { UpdateAliasInput } from "./types/UpdateAliasInput"; +import { UpdateAliasOutput } from "./types/UpdateAliasOutput"; +import { UpdateKeyDescriptionInput } from "./types/UpdateKeyDescriptionInput"; +import { UpdateKeyDescriptionOutput } from "./types/UpdateKeyDescriptionOutput"; + +export class KMS extends KMSClient { + /** + *

Cancels the deletion of a customer master key (CMK). When this operation is successful, the CMK is set to the Disabled state. To enable a CMK, use EnableKey. You cannot perform this operation on a CMK in a different AWS account.

For more information about scheduling and canceling deletion of a CMK, see Deleting Customer Master Keys in the AWS Key Management Service Developer Guide.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public cancelKeyDeletion( + args: CancelKeyDeletionInput + ): Promise; + public cancelKeyDeletion( + args: CancelKeyDeletionInput, + cb: (err: any, data?: CancelKeyDeletionOutput) => void + ): void; + public cancelKeyDeletion( + args: CancelKeyDeletionInput, + cb?: (err: any, data?: CancelKeyDeletionOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Creates a display name for a customer master key (CMK). You can use an alias to identify a CMK in selected operations, such as Encrypt and GenerateDataKey.

Each CMK can have multiple aliases, but each alias points to only one CMK. The alias name must be unique in the AWS account and region. To simplify code that runs in multiple regions, use the same alias name, but point it to a different CMK in each region.

Because an alias is not a property of a CMK, you can delete and change the aliases of a CMK without affecting the CMK. Also, aliases do not appear in the response from the DescribeKey operation. To get the aliases of all CMKs, use the ListAliases operation.

An alias must start with the word alias followed by a forward slash (alias/). The alias name can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). Alias names cannot begin with aws; that alias name prefix is reserved by Amazon Web Services (AWS).

The alias and the CMK it is mapped to must be in the same AWS account and the same region. You cannot perform this operation on an alias in a different AWS account.

To map an existing alias to a different CMK, call UpdateAlias.

+ * + * This operation may fail with one of the following errors: + * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {AlreadyExistsException}

The request was rejected because it attempted to create a resource that already exists.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidAliasNameException}

The request was rejected because the specified alias name is not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {LimitExceededException}

The request was rejected because a limit was exceeded. For more information, see Limits in the AWS Key Management Service Developer Guide.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public createAlias(args: CreateAliasInput): Promise; + public createAlias( + args: CreateAliasInput, + cb: (err: any, data?: CreateAliasOutput) => void + ): void; + public createAlias( + args: CreateAliasInput, + cb?: (err: any, data?: CreateAliasOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Adds a grant to a customer master key (CMK). The grant specifies who can use the CMK and under what conditions. When setting permissions, grants are an alternative to key policies.

To perform this operation on a CMK in a different AWS account, specify the key ARN in the value of the KeyId parameter. For more information about grants, see Grants in the AWS Key Management Service Developer Guide.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DisabledException}

The request was rejected because the specified CMK is not enabled.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {InvalidGrantTokenException}

The request was rejected because the specified grant token is not valid.

+ * - {LimitExceededException}

The request was rejected because a limit was exceeded. For more information, see Limits in the AWS Key Management Service Developer Guide.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public createGrant(args: CreateGrantInput): Promise; + public createGrant( + args: CreateGrantInput, + cb: (err: any, data?: CreateGrantOutput) => void + ): void; + public createGrant( + args: CreateGrantInput, + cb?: (err: any, data?: CreateGrantOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Creates a customer master key (CMK) in the caller's AWS account.

You can use a CMK to encrypt small amounts of data (4 KiB or less) directly, but CMKs are more commonly used to encrypt data encryption keys (DEKs), which are used to encrypt raw data. For more information about DEKs and the difference between CMKs and DEKs, see the following:

You cannot use this operation to create a CMK in a different AWS account.

+ * + * This operation may fail with one of the following errors: + * - {MalformedPolicyDocumentException}

The request was rejected because the specified policy is not syntactically or semantically correct.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {UnsupportedOperationException}

The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {LimitExceededException}

The request was rejected because a limit was exceeded. For more information, see Limits in the AWS Key Management Service Developer Guide.

+ * - {TagException}

The request was rejected because one or more tags are not valid.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public createKey(args: CreateKeyInput): Promise; + public createKey( + args: CreateKeyInput, + cb: (err: any, data?: CreateKeyOutput) => void + ): void; + public createKey( + args: CreateKeyInput, + cb?: (err: any, data?: CreateKeyOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Decrypts ciphertext. Ciphertext is plaintext that has been previously encrypted by using any of the following operations:

Note that if a caller has been granted access permissions to all keys (through, for example, IAM user policies that grant Decrypt permission on all resources), then ciphertext encrypted by using keys in other accounts where the key grants access to the caller can be decrypted. To remedy this, we recommend that you do not grant Decrypt access in an IAM user policy. Instead grant Decrypt access only in key policies. If you must grant Decrypt access in an IAM user policy, you should scope the resource to specific keys or to specific trusted accounts.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DisabledException}

The request was rejected because the specified CMK is not enabled.

+ * - {InvalidCiphertextException}

The request was rejected because the specified ciphertext, or additional authenticated data incorporated into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise invalid.

+ * - {KeyUnavailableException}

The request was rejected because the specified CMK was not available. The request can be retried.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidGrantTokenException}

The request was rejected because the specified grant token is not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public decrypt(args: DecryptInput): Promise; + public decrypt( + args: DecryptInput, + cb: (err: any, data?: DecryptOutput) => void + ): void; + public decrypt( + args: DecryptInput, + cb?: (err: any, data?: DecryptOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Deletes the specified alias. You cannot perform this operation on an alias in a different AWS account.

Because an alias is not a property of a CMK, you can delete and change the aliases of a CMK without affecting the CMK. Also, aliases do not appear in the response from the DescribeKey operation. To get the aliases of all CMKs, use the ListAliases operation.

Each CMK can have multiple aliases. To change the alias of a CMK, use DeleteAlias to delete the current alias and CreateAlias to create a new alias. To associate an existing alias with a different customer master key (CMK), call UpdateAlias.

+ * + * This operation may fail with one of the following errors: + * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public deleteAlias(args: DeleteAliasInput): Promise; + public deleteAlias( + args: DeleteAliasInput, + cb: (err: any, data?: DeleteAliasOutput) => void + ): void; + public deleteAlias( + args: DeleteAliasInput, + cb?: (err: any, data?: DeleteAliasOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Deletes key material that you previously imported. This operation makes the specified customer master key (CMK) unusable. For more information about importing key material into AWS KMS, see Importing Key Material in the AWS Key Management Service Developer Guide. You cannot perform this operation on a CMK in a different AWS account.

When the specified CMK is in the PendingDeletion state, this operation does not change the CMK's state. Otherwise, it changes the CMK's state to PendingImport.

After you delete key material, you can use ImportKeyMaterial to reimport the same key material into the CMK.

+ * + * This operation may fail with one of the following errors: + * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {UnsupportedOperationException}

The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public deleteImportedKeyMaterial( + args: DeleteImportedKeyMaterialInput + ): Promise; + public deleteImportedKeyMaterial( + args: DeleteImportedKeyMaterialInput, + cb: (err: any, data?: DeleteImportedKeyMaterialOutput) => void + ): void; + public deleteImportedKeyMaterial( + args: DeleteImportedKeyMaterialInput, + cb?: (err: any, data?: DeleteImportedKeyMaterialOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Provides detailed information about the specified customer master key (CMK).

To perform this operation on a CMK in a different AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public describeKey(args: DescribeKeyInput): Promise; + public describeKey( + args: DescribeKeyInput, + cb: (err: any, data?: DescribeKeyOutput) => void + ): void; + public describeKey( + args: DescribeKeyInput, + cb?: (err: any, data?: DescribeKeyOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Sets the state of a customer master key (CMK) to disabled, thereby preventing its use for cryptographic operations. You cannot perform this operation on a CMK in a different AWS account.

For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public disableKey(args: DisableKeyInput): Promise; + public disableKey( + args: DisableKeyInput, + cb: (err: any, data?: DisableKeyOutput) => void + ): void; + public disableKey( + args: DisableKeyInput, + cb?: (err: any, data?: DisableKeyOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Disables automatic rotation of the key material for the specified customer master key (CMK). You cannot perform this operation on a CMK in a different AWS account.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DisabledException}

The request was rejected because the specified CMK is not enabled.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {UnsupportedOperationException}

The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public disableKeyRotation( + args: DisableKeyRotationInput + ): Promise; + public disableKeyRotation( + args: DisableKeyRotationInput, + cb: (err: any, data?: DisableKeyRotationOutput) => void + ): void; + public disableKeyRotation( + args: DisableKeyRotationInput, + cb?: (err: any, data?: DisableKeyRotationOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Sets the state of a customer master key (CMK) to enabled, thereby permitting its use for cryptographic operations. You cannot perform this operation on a CMK in a different AWS account.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {LimitExceededException}

The request was rejected because a limit was exceeded. For more information, see Limits in the AWS Key Management Service Developer Guide.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public enableKey(args: EnableKeyInput): Promise; + public enableKey( + args: EnableKeyInput, + cb: (err: any, data?: EnableKeyOutput) => void + ): void; + public enableKey( + args: EnableKeyInput, + cb?: (err: any, data?: EnableKeyOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Enables automatic rotation of the key material for the specified customer master key (CMK). You cannot perform this operation on a CMK in a different AWS account.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DisabledException}

The request was rejected because the specified CMK is not enabled.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {UnsupportedOperationException}

The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public enableKeyRotation( + args: EnableKeyRotationInput + ): Promise; + public enableKeyRotation( + args: EnableKeyRotationInput, + cb: (err: any, data?: EnableKeyRotationOutput) => void + ): void; + public enableKeyRotation( + args: EnableKeyRotationInput, + cb?: (err: any, data?: EnableKeyRotationOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Encrypts plaintext into ciphertext by using a customer master key (CMK). The Encrypt operation has two primary use cases:

  • You can encrypt up to 4 kilobytes (4096 bytes) of arbitrary data such as an RSA key, a database password, or other sensitive information.

  • To move encrypted data from one AWS region to another, you can use this operation to encrypt in the new region the plaintext data key that was used to encrypt the data in the original region. This provides you with an encrypted copy of the data key that can be decrypted in the new region and used there to decrypt the encrypted data.

To perform this operation on a CMK in a different AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter.

Unless you are moving encrypted data from one region to another, you don't use this operation to encrypt a generated data key within a region. To get data keys that are already encrypted, call the GenerateDataKey or GenerateDataKeyWithoutPlaintext operation. Data keys don't need to be encrypted again by calling Encrypt.

To encrypt data locally in your application, use the GenerateDataKey operation to return a plaintext data encryption key and a copy of the key encrypted under the CMK of your choosing.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DisabledException}

The request was rejected because the specified CMK is not enabled.

+ * - {KeyUnavailableException}

The request was rejected because the specified CMK was not available. The request can be retried.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidKeyUsageException}

The request was rejected because the specified KeySpec value is not valid.

+ * - {InvalidGrantTokenException}

The request was rejected because the specified grant token is not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public encrypt(args: EncryptInput): Promise; + public encrypt( + args: EncryptInput, + cb: (err: any, data?: EncryptOutput) => void + ): void; + public encrypt( + args: EncryptInput, + cb?: (err: any, data?: EncryptOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Returns a data encryption key that you can use in your application to encrypt data locally.

You must specify the customer master key (CMK) under which to generate the data key. You must also specify the length of the data key using either the KeySpec or NumberOfBytes field. You must specify one field or the other, but not both. For common key lengths (128-bit and 256-bit symmetric keys), we recommend that you use KeySpec. To perform this operation on a CMK in a different AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter.

This operation returns a plaintext copy of the data key in the Plaintext field of the response, and an encrypted copy of the data key in the CiphertextBlob field. The data key is encrypted under the CMK specified in the KeyId field of the request.

We recommend that you use the following pattern to encrypt data locally in your application:

  1. Use this operation (GenerateDataKey) to get a data encryption key.

  2. Use the plaintext data encryption key (returned in the Plaintext field of the response) to encrypt data locally, then erase the plaintext data key from memory.

  3. Store the encrypted data key (returned in the CiphertextBlob field of the response) alongside the locally encrypted data.

To decrypt data locally:

  1. Use the Decrypt operation to decrypt the encrypted data key into a plaintext copy of the data key.

  2. Use the plaintext data key to decrypt data locally, then erase the plaintext data key from memory.

To return only an encrypted copy of the data key, use GenerateDataKeyWithoutPlaintext. To return a random byte string that is cryptographically secure, use GenerateRandom.

If you use the optional EncryptionContext field, you must store at least enough information to be able to reconstruct the full encryption context when you later send the ciphertext to the Decrypt operation. It is a good practice to choose an encryption context that you can reconstruct on the fly to better secure the ciphertext. For more information, see Encryption Context in the AWS Key Management Service Developer Guide.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DisabledException}

The request was rejected because the specified CMK is not enabled.

+ * - {KeyUnavailableException}

The request was rejected because the specified CMK was not available. The request can be retried.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidKeyUsageException}

The request was rejected because the specified KeySpec value is not valid.

+ * - {InvalidGrantTokenException}

The request was rejected because the specified grant token is not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public generateDataKey( + args: GenerateDataKeyInput + ): Promise; + public generateDataKey( + args: GenerateDataKeyInput, + cb: (err: any, data?: GenerateDataKeyOutput) => void + ): void; + public generateDataKey( + args: GenerateDataKeyInput, + cb?: (err: any, data?: GenerateDataKeyOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Returns a data encryption key encrypted under a customer master key (CMK). This operation is identical to GenerateDataKey but returns only the encrypted copy of the data key.

To perform this operation on a CMK in a different AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter.

This operation is useful in a system that has multiple components with different degrees of trust. For example, consider a system that stores encrypted data in containers. Each container stores the encrypted data and an encrypted copy of the data key. One component of the system, called the control plane, creates new containers. When it creates a new container, it uses this operation (GenerateDataKeyWithoutPlaintext) to get an encrypted data key and then stores it in the container. Later, a different component of the system, called the data plane, puts encrypted data into the containers. To do this, it passes the encrypted data key to the Decrypt operation, then uses the returned plaintext data key to encrypt data, and finally stores the encrypted data in the container. In this system, the control plane never sees the plaintext data key.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DisabledException}

The request was rejected because the specified CMK is not enabled.

+ * - {KeyUnavailableException}

The request was rejected because the specified CMK was not available. The request can be retried.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidKeyUsageException}

The request was rejected because the specified KeySpec value is not valid.

+ * - {InvalidGrantTokenException}

The request was rejected because the specified grant token is not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public generateDataKeyWithoutPlaintext( + args: GenerateDataKeyWithoutPlaintextInput + ): Promise; + public generateDataKeyWithoutPlaintext( + args: GenerateDataKeyWithoutPlaintextInput, + cb: (err: any, data?: GenerateDataKeyWithoutPlaintextOutput) => void + ): void; + public generateDataKeyWithoutPlaintext( + args: GenerateDataKeyWithoutPlaintextInput, + cb?: (err: any, data?: GenerateDataKeyWithoutPlaintextOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Returns a random byte string that is cryptographically secure.

For more information about entropy and random number generation, see the AWS Key Management Service Cryptographic Details whitepaper.

+ * + * This operation may fail with one of the following errors: + * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public generateRandom( + args: GenerateRandomInput + ): Promise; + public generateRandom( + args: GenerateRandomInput, + cb: (err: any, data?: GenerateRandomOutput) => void + ): void; + public generateRandom( + args: GenerateRandomInput, + cb?: (err: any, data?: GenerateRandomOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Gets a key policy attached to the specified customer master key (CMK). You cannot perform this operation on a CMK in a different AWS account.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public getKeyPolicy(args: GetKeyPolicyInput): Promise; + public getKeyPolicy( + args: GetKeyPolicyInput, + cb: (err: any, data?: GetKeyPolicyOutput) => void + ): void; + public getKeyPolicy( + args: GetKeyPolicyInput, + cb?: (err: any, data?: GetKeyPolicyOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Gets a Boolean value that indicates whether automatic rotation of the key material is enabled for the specified customer master key (CMK).

To perform this operation on a CMK in a different AWS account, specify the key ARN in the value of the KeyId parameter.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {UnsupportedOperationException}

The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public getKeyRotationStatus( + args: GetKeyRotationStatusInput + ): Promise; + public getKeyRotationStatus( + args: GetKeyRotationStatusInput, + cb: (err: any, data?: GetKeyRotationStatusOutput) => void + ): void; + public getKeyRotationStatus( + args: GetKeyRotationStatusInput, + cb?: (err: any, data?: GetKeyRotationStatusOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Returns the items you need in order to import key material into AWS KMS from your existing key management infrastructure. For more information about importing key material into AWS KMS, see Importing Key Material in the AWS Key Management Service Developer Guide.

You must specify the key ID of the customer master key (CMK) into which you will import key material. This CMK's Origin must be EXTERNAL. You must also specify the wrapping algorithm and type of wrapping key (public key) that you will use to encrypt the key material. You cannot perform this operation on a CMK in a different AWS account.

This operation returns a public key and an import token. Use the public key to encrypt the key material. Store the import token to send with a subsequent ImportKeyMaterial request. The public key and import token from the same response must be used together. These items are valid for 24 hours. When they expire, they cannot be used for a subsequent ImportKeyMaterial request. To get new ones, send another GetParametersForImport request.

+ * + * This operation may fail with one of the following errors: + * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {UnsupportedOperationException}

The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public getParametersForImport( + args: GetParametersForImportInput + ): Promise; + public getParametersForImport( + args: GetParametersForImportInput, + cb: (err: any, data?: GetParametersForImportOutput) => void + ): void; + public getParametersForImport( + args: GetParametersForImportInput, + cb?: (err: any, data?: GetParametersForImportOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Imports key material into an existing AWS KMS customer master key (CMK) that was created without key material. You cannot perform this operation on a CMK in a different AWS account. For more information about creating CMKs with no key material and then importing key material, see Importing Key Material in the AWS Key Management Service Developer Guide.

Before using this operation, call GetParametersForImport. Its response includes a public key and an import token. Use the public key to encrypt the key material. Then, submit the import token from the same GetParametersForImport response.

When calling this operation, you must specify the following values:

  • The key ID or key ARN of a CMK with no key material. Its Origin must be EXTERNAL.

    To create a CMK with no key material, call CreateKey and set the value of its Origin parameter to EXTERNAL. To get the Origin of a CMK, call DescribeKey.)

  • The encrypted key material. To get the public key to encrypt the key material, call GetParametersForImport.

  • The import token that GetParametersForImport returned. This token and the public key used to encrypt the key material must have come from the same response.

  • Whether the key material expires and if so, when. If you set an expiration date, you can change it only by reimporting the same key material and specifying a new expiration date. If the key material expires, AWS KMS deletes the key material and the CMK becomes unusable. To use the CMK again, you must reimport the same key material.

When this operation is successful, the CMK's key state changes from PendingImport to Enabled, and you can use the CMK. After you successfully import key material into a CMK, you can reimport the same key material into that CMK, but you cannot import different key material.

+ * + * This operation may fail with one of the following errors: + * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {UnsupportedOperationException}

The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {InvalidCiphertextException}

The request was rejected because the specified ciphertext, or additional authenticated data incorporated into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise invalid.

+ * - {IncorrectKeyMaterialException}

The request was rejected because the provided key material is invalid or is not the same key material that was previously imported into this customer master key (CMK).

+ * - {ExpiredImportTokenException}

The request was rejected because the provided import token is expired. Use GetParametersForImport to get a new import token and public key, use the new public key to encrypt the key material, and then try the request again.

+ * - {InvalidImportTokenException}

The request was rejected because the provided import token is invalid or is associated with a different customer master key (CMK).

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public importKeyMaterial( + args: ImportKeyMaterialInput + ): Promise; + public importKeyMaterial( + args: ImportKeyMaterialInput, + cb: (err: any, data?: ImportKeyMaterialOutput) => void + ): void; + public importKeyMaterial( + args: ImportKeyMaterialInput, + cb?: (err: any, data?: ImportKeyMaterialOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Gets a list of all aliases in the caller's AWS account and region. You cannot list aliases in other accounts. For more information about aliases, see CreateAlias.

The response might include several aliases that do not have a TargetKeyId field because they are not associated with a CMK. These are predefined aliases that are reserved for CMKs managed by AWS services. If an alias is not associated with a CMK, the alias does not count against the alias limit for your account.

+ * + * This operation may fail with one of the following errors: + * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidMarkerException}

The request was rejected because the marker that specifies where pagination should next begin is not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public listAliases(args: ListAliasesInput): Promise; + public listAliases( + args: ListAliasesInput, + cb: (err: any, data?: ListAliasesOutput) => void + ): void; + public listAliases( + args: ListAliasesInput, + cb?: (err: any, data?: ListAliasesOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Gets a list of all grants for the specified customer master key (CMK).

To perform this operation on a CMK in a different AWS account, specify the key ARN in the value of the KeyId parameter.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidMarkerException}

The request was rejected because the marker that specifies where pagination should next begin is not valid.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public listGrants(args: ListGrantsInput): Promise; + public listGrants( + args: ListGrantsInput, + cb: (err: any, data?: ListGrantsOutput) => void + ): void; + public listGrants( + args: ListGrantsInput, + cb?: (err: any, data?: ListGrantsOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Gets the names of the key policies that are attached to a customer master key (CMK). This operation is designed to get policy names that you can use in a GetKeyPolicy operation. However, the only valid policy name is default. You cannot perform this operation on a CMK in a different AWS account.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public listKeyPolicies( + args: ListKeyPoliciesInput + ): Promise; + public listKeyPolicies( + args: ListKeyPoliciesInput, + cb: (err: any, data?: ListKeyPoliciesOutput) => void + ): void; + public listKeyPolicies( + args: ListKeyPoliciesInput, + cb?: (err: any, data?: ListKeyPoliciesOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Gets a list of all customer master keys (CMKs) in the caller's AWS account and region.

+ * + * This operation may fail with one of the following errors: + * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {InvalidMarkerException}

The request was rejected because the marker that specifies where pagination should next begin is not valid.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public listKeys(args: ListKeysInput): Promise; + public listKeys( + args: ListKeysInput, + cb: (err: any, data?: ListKeysOutput) => void + ): void; + public listKeys( + args: ListKeysInput, + cb?: (err: any, data?: ListKeysOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Returns a list of all tags for the specified customer master key (CMK).

You cannot perform this operation on a CMK in a different AWS account.

+ * + * This operation may fail with one of the following errors: + * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {InvalidMarkerException}

The request was rejected because the marker that specifies where pagination should next begin is not valid.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public listResourceTags( + args: ListResourceTagsInput + ): Promise; + public listResourceTags( + args: ListResourceTagsInput, + cb: (err: any, data?: ListResourceTagsOutput) => void + ): void; + public listResourceTags( + args: ListResourceTagsInput, + cb?: (err: any, data?: ListResourceTagsOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Returns a list of all grants for which the grant's RetiringPrincipal matches the one specified.

A typical use is to list all grants that you are able to retire. To retire a grant, use RetireGrant.

+ * + * This operation may fail with one of the following errors: + * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidMarkerException}

The request was rejected because the marker that specifies where pagination should next begin is not valid.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public listRetirableGrants( + args: ListRetirableGrantsInput + ): Promise; + public listRetirableGrants( + args: ListRetirableGrantsInput, + cb: (err: any, data?: ListRetirableGrantsOutput) => void + ): void; + public listRetirableGrants( + args: ListRetirableGrantsInput, + cb?: (err: any, data?: ListRetirableGrantsOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Attaches a key policy to the specified customer master key (CMK). You cannot perform this operation on a CMK in a different AWS account.

For more information about key policies, see Key Policies in the AWS Key Management Service Developer Guide.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {MalformedPolicyDocumentException}

The request was rejected because the specified policy is not syntactically or semantically correct.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {UnsupportedOperationException}

The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {LimitExceededException}

The request was rejected because a limit was exceeded. For more information, see Limits in the AWS Key Management Service Developer Guide.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public putKeyPolicy(args: PutKeyPolicyInput): Promise; + public putKeyPolicy( + args: PutKeyPolicyInput, + cb: (err: any, data?: PutKeyPolicyOutput) => void + ): void; + public putKeyPolicy( + args: PutKeyPolicyInput, + cb?: (err: any, data?: PutKeyPolicyOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Encrypts data on the server side with a new customer master key (CMK) without exposing the plaintext of the data on the client side. The data is first decrypted and then reencrypted. You can also use this operation to change the encryption context of a ciphertext.

You can reencrypt data using CMKs in different AWS accounts.

Unlike other operations, ReEncrypt is authorized twice, once as ReEncryptFrom on the source CMK and once as ReEncryptTo on the destination CMK. We recommend that you include the "kms:ReEncrypt*" permission in your key policies to permit reencryption from or to the CMK. This permission is automatically included in the key policy when you create a CMK through the console, but you must include it manually when you create a CMK programmatically or when you set a key policy with the PutKeyPolicy operation.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DisabledException}

The request was rejected because the specified CMK is not enabled.

+ * - {InvalidCiphertextException}

The request was rejected because the specified ciphertext, or additional authenticated data incorporated into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise invalid.

+ * - {KeyUnavailableException}

The request was rejected because the specified CMK was not available. The request can be retried.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidKeyUsageException}

The request was rejected because the specified KeySpec value is not valid.

+ * - {InvalidGrantTokenException}

The request was rejected because the specified grant token is not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public reEncrypt(args: ReEncryptInput): Promise; + public reEncrypt( + args: ReEncryptInput, + cb: (err: any, data?: ReEncryptOutput) => void + ): void; + public reEncrypt( + args: ReEncryptInput, + cb?: (err: any, data?: ReEncryptOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Retires a grant. To clean up, you can retire a grant when you're done using it. You should revoke a grant when you intend to actively deny operations that depend on it. The following are permitted to call this API:

  • The AWS account (root user) under which the grant was created

  • The RetiringPrincipal, if present in the grant

  • The GranteePrincipal, if RetireGrant is an operation specified in the grant

You must identify the grant to retire by its grant token or by a combination of the grant ID and the Amazon Resource Name (ARN) of the customer master key (CMK). A grant token is a unique variable-length base64-encoded string. A grant ID is a 64 character unique identifier of a grant. The CreateGrant operation returns both.

+ * + * This operation may fail with one of the following errors: + * - {InvalidGrantTokenException}

The request was rejected because the specified grant token is not valid.

+ * - {InvalidGrantIdException}

The request was rejected because the specified GrantId is not valid.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public retireGrant(args: RetireGrantInput): Promise; + public retireGrant( + args: RetireGrantInput, + cb: (err: any, data?: RetireGrantOutput) => void + ): void; + public retireGrant( + args: RetireGrantInput, + cb?: (err: any, data?: RetireGrantOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Revokes the specified grant for the specified customer master key (CMK). You can revoke a grant to actively deny operations that depend on it.

To perform this operation on a CMK in a different AWS account, specify the key ARN in the value of the KeyId parameter.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {InvalidGrantIdException}

The request was rejected because the specified GrantId is not valid.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public revokeGrant(args: RevokeGrantInput): Promise; + public revokeGrant( + args: RevokeGrantInput, + cb: (err: any, data?: RevokeGrantOutput) => void + ): void; + public revokeGrant( + args: RevokeGrantInput, + cb?: (err: any, data?: RevokeGrantOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Schedules the deletion of a customer master key (CMK). You may provide a waiting period, specified in days, before deletion occurs. If you do not provide a waiting period, the default period of 30 days is used. When this operation is successful, the state of the CMK changes to PendingDeletion. Before the waiting period ends, you can use CancelKeyDeletion to cancel the deletion of the CMK. After the waiting period ends, AWS KMS deletes the CMK and all AWS KMS data associated with it, including all aliases that refer to it.

You cannot perform this operation on a CMK in a different AWS account.

Deleting a CMK is a destructive and potentially dangerous operation. When a CMK is deleted, all data that was encrypted under the CMK is rendered unrecoverable. To restrict the use of a CMK without deleting it, use DisableKey.

For more information about scheduling a CMK for deletion, see Deleting Customer Master Keys in the AWS Key Management Service Developer Guide.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public scheduleKeyDeletion( + args: ScheduleKeyDeletionInput + ): Promise; + public scheduleKeyDeletion( + args: ScheduleKeyDeletionInput, + cb: (err: any, data?: ScheduleKeyDeletionOutput) => void + ): void; + public scheduleKeyDeletion( + args: ScheduleKeyDeletionInput, + cb?: (err: any, data?: ScheduleKeyDeletionOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Adds or overwrites one or more tags for the specified customer master key (CMK). You cannot perform this operation on a CMK in a different AWS account.

Each tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.

You cannot use the same tag key more than once per CMK. For example, consider a CMK with one tag whose tag key is Purpose and tag value is Test. If you send a TagResource request for this CMK with a tag key of Purpose and a tag value of Prod, it does not create a second tag. Instead, the original tag is overwritten with the new tag value.

For information about the rules that apply to tag keys and tag values, see User-Defined Tag Restrictions in the AWS Billing and Cost Management User Guide.

+ * + * This operation may fail with one of the following errors: + * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {LimitExceededException}

The request was rejected because a limit was exceeded. For more information, see Limits in the AWS Key Management Service Developer Guide.

+ * - {TagException}

The request was rejected because one or more tags are not valid.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public tagResource(args: TagResourceInput): Promise; + public tagResource( + args: TagResourceInput, + cb: (err: any, data?: TagResourceOutput) => void + ): void; + public tagResource( + args: TagResourceInput, + cb?: (err: any, data?: TagResourceOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Removes the specified tag or tags from the specified customer master key (CMK). You cannot perform this operation on a CMK in a different AWS account.

To remove a tag, you specify the tag key for each tag to remove. You do not specify the tag value. To overwrite the tag value for an existing tag, use TagResource.

+ * + * This operation may fail with one of the following errors: + * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {TagException}

The request was rejected because one or more tags are not valid.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public untagResource(args: UntagResourceInput): Promise; + public untagResource( + args: UntagResourceInput, + cb: (err: any, data?: UntagResourceOutput) => void + ): void; + public untagResource( + args: UntagResourceInput, + cb?: (err: any, data?: UntagResourceOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Associates an existing alias with a different customer master key (CMK). Each CMK can have multiple aliases, but the aliases must be unique within the account and region. You cannot perform this operation on an alias in a different AWS account.

This operation works only on existing aliases. To change the alias of a CMK to a new value, use CreateAlias to create a new alias and DeleteAlias to delete the old alias.

Because an alias is not a property of a CMK, you can create, update, and delete the aliases of a CMK without affecting the CMK. Also, aliases do not appear in the response from the DescribeKey operation. To get the aliases of all CMKs in the account, use the ListAliases operation.

An alias name can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). An alias must start with the word alias followed by a forward slash (alias/). The alias name can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). Alias names cannot begin with aws; that alias name prefix is reserved by Amazon Web Services (AWS).

+ * + * This operation may fail with one of the following errors: + * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public updateAlias(args: UpdateAliasInput): Promise; + public updateAlias( + args: UpdateAliasInput, + cb: (err: any, data?: UpdateAliasOutput) => void + ): void; + public updateAlias( + args: UpdateAliasInput, + cb?: (err: any, data?: UpdateAliasOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } + + /** + *

Updates the description of a customer master key (CMK). To see the decription of a CMK, use DescribeKey.

You cannot perform this operation on a CMK in a different AWS account.

+ * + * This operation may fail with one of the following errors: + * - {NotFoundException}

The request was rejected because the specified entity or resource could not be found.

+ * - {InvalidArnException}

The request was rejected because a specified ARN was not valid.

+ * - {DependencyTimeoutException}

The system timed out while trying to fulfill the request. The request can be retried.

+ * - {KMSInternalException}

The request was rejected because an internal exception occurred. The request can be retried.

+ * - {KMSInvalidStateException}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ * - {Error} An error originating from the SDK or customizations rather than the service + */ + public updateKeyDescription( + args: UpdateKeyDescriptionInput + ): Promise; + public updateKeyDescription( + args: UpdateKeyDescriptionInput, + cb: (err: any, data?: UpdateKeyDescriptionOutput) => void + ): void; + public updateKeyDescription( + args: UpdateKeyDescriptionInput, + cb?: (err: any, data?: UpdateKeyDescriptionOutput) => void + ): Promise | void { + // create the appropriate command and pass it to .send + throw new Error("Not implemented!"); + } +} diff --git a/packages/sdk-kms-node/KMSClient.ts b/packages/sdk-kms-node/KMSClient.ts new file mode 100644 index 0000000000000..dcd9de39d7f3a --- /dev/null +++ b/packages/sdk-kms-node/KMSClient.ts @@ -0,0 +1,478 @@ +import * as __aws_config_resolver from "@aws/config-resolver"; +import * as __aws_core_handler from "@aws/core-handler"; +import * as __aws_credential_provider_node from "@aws/credential-provider-node"; +import * as __aws_crypto_sha256_node from "@aws/crypto-sha256-node"; +import * as __aws_json_builder from "@aws/json-builder"; +import * as __aws_json_parser from "@aws/json-parser"; +import * as __aws_middleware_stack from "@aws/middleware-stack"; +import * as __aws_node_http_handler from "@aws/node-http-handler"; +import * as __aws_protocol_json_rpc from "@aws/protocol-json-rpc"; +import * as __aws_region_provider from "@aws/region-provider"; +import * as __aws_signature_v4 from "@aws/signature-v4"; +import * as __aws_signing_middleware from "@aws/signing-middleware"; +import * as __aws_stream_collector_node from "@aws/stream-collector-node"; +import * as __aws_types from "@aws/types"; +import * as __aws_util_base64_node from "@aws/util-base64-node"; +import * as __aws_util_utf8_node from "@aws/util-utf8-node"; +import * as _stream from "stream"; +import { InputTypesUnion } from "./types/InputTypesUnion"; +import { OutputTypesUnion } from "./types/OutputTypesUnion"; + +export class KMSClient { + private readonly config: KMSResolvedConfiguration; + + readonly middlewareStack = new __aws_middleware_stack.MiddlewareStack< + InputTypesUnion, + OutputTypesUnion, + _stream.Readable + >(); + + constructor(configuration: KMSConfiguration) { + this.config = __aws_config_resolver.resolveConfiguration( + configuration, + configurationProperties, + this.middlewareStack + ); + } + + destroy(): void { + if (!this.config._user_injected_http_handler) { + this.config.httpHandler.destroy(); + } + } + + /** + * This will need to be revised when the command interface lands. + */ + send( + command: any + ): Promise; + send( + command: any, + cb: (err: any, data?: OutputType) => void + ): void; + send( + command: any, + cb?: (err: any, data?: OutputType) => void + ): Promise | void { + const handler: any = { + handle: () => { + throw new Error("Not implemented"); + } + }; + if (cb) { + handler + .handle(command) + .then((result: OutputType) => cb(null, result), (err: any) => cb(err)) + .catch( + // prevent any errors thrown in the callback from triggering an + // unhandled promise rejection + () => {} + ); + } else { + return handler.handle(command); + } + } +} + +export interface KMSConfiguration { + /** + * The function that will be used to convert a base64-encoded string to a byte array + */ + base64Decoder?: __aws_types.Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string + */ + base64Encoder?: __aws_types.Encoder; + + /** + * The credentials used to sign requests. + * + * If no static credentials are supplied, the SDK will attempt to credentials from known environment variables, from shared configuration and credentials files, and from the EC2 Instance Metadata Service, in that order. + */ + credentials?: + | __aws_types.Credentials + | __aws_types.Provider<__aws_types.Credentials>; + + /** + * The fully qualified endpoint of the webservice. This is only required when using a custom endpoint (for example, when using a local version of S3). + */ + endpoint?: + | string + | __aws_types.HttpEndpoint + | __aws_types.Provider<__aws_types.HttpEndpoint>; + + /** + * The endpoint provider to call if no endpoint is provided + */ + endpointProvider?: any; + + /** + * The handler to use as the core of the client's middleware stack + */ + handler?: __aws_types.CoreHandlerConstructor; + + /** + * The HTTP handler to use + */ + httpHandler?: __aws_types.HttpHandler<_stream.Readable>; + + /** + * The maximum number of redirects to follow for a service request. Set to `0` to disable retries. + */ + maxRedirects?: number; + + /** + * The maximum number of retries that will be attempted. Set to `0` to disable retries. + */ + maxRetries?: number; + + /** + * The configuration profile to use. + */ + profile?: string; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __aws_types.Provider; + + /** + * A constructor that can calculate a SHA-256 HMAC + */ + sha256?: __aws_types.HashConstructor; + + /** + * The signer to use when signing requests. + */ + signer?: __aws_types.RequestSigner; + + /** + * The service name with which to sign requests. + */ + signingName?: string; + + /** + * Whether SSL is enabled for requests. + */ + sslEnabled?: boolean; + + /** + * A function that converts a stream into an array of bytes. + */ + streamCollector?: __aws_types.StreamCollector<_stream.Readable>; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array + */ + utf8Decoder?: __aws_types.Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string + */ + utf8Encoder?: __aws_types.Encoder; +} + +interface KMSResolvableConfiguration extends KMSConfiguration { + /** + * Whether the HTTP handler was injected by the user and should thus not be destroyed when this client is + */ + _user_injected_http_handler: any; + + /** + * The parser to use when converting HTTP responses to SDK output types + */ + parser: __aws_types.ResponseParser<_stream.Readable>; + + /** + * The serializer to use when converting SDK input to HTTP requests + */ + serializer: __aws_types.Provider< + __aws_types.RequestSerializer<_stream.Readable> + >; +} + +export interface KMSResolvedConfiguration extends KMSConfiguration { + _user_injected_http_handler: boolean; + + base64Decoder: __aws_types.Decoder; + + base64Encoder: __aws_types.Encoder; + + credentials: __aws_types.Provider<__aws_types.Credentials>; + + endpoint: __aws_types.Provider<__aws_types.HttpEndpoint>; + + endpointProvider: any; + + handler: __aws_types.CoreHandlerConstructor; + + httpHandler: __aws_types.HttpHandler<_stream.Readable>; + + maxRedirects: number; + + maxRetries: number; + + parser: __aws_types.ResponseParser<_stream.Readable>; + + region: __aws_types.Provider; + + serializer: __aws_types.Provider< + __aws_types.RequestSerializer<_stream.Readable> + >; + + sha256: __aws_types.HashConstructor; + + signer: __aws_types.RequestSigner; + + signingName: string; + + sslEnabled: boolean; + + streamCollector: __aws_types.StreamCollector<_stream.Readable>; + + utf8Decoder: __aws_types.Decoder; + + utf8Encoder: __aws_types.Encoder; +} + +const configurationProperties: __aws_types.ConfigurationDefinition< + KMSResolvableConfiguration, + KMSResolvedConfiguration +> = { + profile: { + required: false + }, + maxRedirects: { + required: false, + defaultValue: 10 + }, + maxRetries: { + required: false, + defaultValue: 3 + }, + region: { + required: false, + defaultProvider: __aws_region_provider.defaultProvider, + apply: ( + region: string | __aws_types.Provider | undefined, + configuration: { region?: string | __aws_types.Provider } + ) => { + if (typeof region === "string") { + const promisified = Promise.resolve(region); + configuration.region = () => promisified; + } + } + }, + sslEnabled: { + required: false, + defaultValue: true + }, + endpointProvider: { + required: false, + defaultValue: (sslEnabled: boolean, region: string) => ({ + protocol: sslEnabled ? "https:" : "http:", + path: "/", + hostname: `kms.${region}.amazonaws.com` + }) + }, + endpoint: { + required: false, + defaultProvider: (configuration: { + sslEnabled: boolean; + endpointProvider: any; + region: __aws_types.Provider; + }) => { + const promisified = configuration + .region() + .then(region => + configuration.endpointProvider(configuration.sslEnabled, region) + ); + return () => promisified; + }, + apply: ( + value: + | string + | __aws_types.HttpEndpoint + | __aws_types.Provider<__aws_types.HttpEndpoint> + | undefined, + configuration: { + sslEnabled: boolean; + endpointProvider: any; + endpoint?: + | string + | __aws_types.HttpEndpoint + | __aws_types.Provider<__aws_types.HttpEndpoint>; + } + ): void => { + if (typeof value === "string") { + let [protocol, host] = value.split("//"); + if (protocol && !host) { + host = protocol; + protocol = configuration.sslEnabled !== false ? "https:" : "http:"; + } + const [hostname, portString] = host.split(":"); + const port = portString + ? parseInt(portString, 10) + : protocol === "http:" + ? 80 + : 443; + + const promisified = Promise.resolve({ + hostname, + path: "/", + port, + protocol + }); + configuration.endpoint = () => promisified; + } else if (typeof value === "object") { + const promisified = Promise.resolve(value); + configuration.endpoint = () => promisified; + } + } + }, + base64Decoder: { + required: false, + defaultValue: __aws_util_base64_node.fromBase64 + }, + base64Encoder: { + required: false, + defaultValue: __aws_util_base64_node.toBase64 + }, + utf8Decoder: { + required: false, + defaultValue: __aws_util_utf8_node.fromUtf8 + }, + utf8Encoder: { + required: false, + defaultValue: __aws_util_utf8_node.toUtf8 + }, + streamCollector: { + required: false, + defaultValue: __aws_stream_collector_node.streamCollector + }, + serializer: { + required: false, + defaultProvider: (configuration: { + base64Encoder: __aws_types.Encoder; + endpoint: __aws_types.Provider<__aws_types.HttpEndpoint>; + utf8Decoder: __aws_types.Decoder; + }) => { + const promisified = configuration + .endpoint() + .then( + endpoint => + new __aws_protocol_json_rpc.JsonRpcSerializer<_stream.Readable>( + endpoint, + new __aws_json_builder.JsonBuilder( + configuration.base64Encoder, + configuration.utf8Decoder + ) + ) + ); + return () => promisified; + } + }, + parser: { + required: false, + defaultProvider: (configuration: { + base64Decoder: __aws_types.Decoder; + streamCollector: __aws_types.StreamCollector<_stream.Readable>; + utf8Encoder: __aws_types.Encoder; + }) => + new __aws_protocol_json_rpc.JsonRpcParser( + new __aws_json_parser.JsonParser(configuration.base64Decoder), + configuration.streamCollector, + configuration.utf8Encoder + ) + }, + _user_injected_http_handler: { + required: false, + defaultProvider: (configuration: { httpHandler?: any }) => + !configuration.httpHandler + }, + httpHandler: { + required: false, + defaultProvider: () => new __aws_node_http_handler.NodeHttpHandler() + }, + handler: { + required: false, + defaultProvider: (configuration: { + httpHandler: __aws_types.HttpHandler<_stream.Readable>; + parser: __aws_types.ResponseParser<_stream.Readable>; + }) => + class extends __aws_core_handler.CoreHandler { + constructor(context: __aws_types.HandlerExecutionContext) { + super(configuration.httpHandler, configuration.parser, context); + } + } + }, + credentials: { + required: false, + defaultProvider: __aws_credential_provider_node.defaultProvider, + apply: ( + credentials: + | __aws_types.Credentials + | __aws_types.Provider<__aws_types.Credentials> + | undefined, + configuration: { + credentials?: + | __aws_types.Credentials + | __aws_types.Provider<__aws_types.Credentials>; + } + ) => { + if (typeof credentials === "object") { + const promisified = Promise.resolve(credentials); + configuration.credentials = () => promisified; + } + } + }, + sha256: { + required: false, + defaultValue: __aws_crypto_sha256_node.Sha256 + }, + signingName: { + required: false, + defaultValue: "kms" + }, + signer: { + required: false, + defaultProvider: (configuration: { + credentials: + | __aws_types.Credentials + | __aws_types.Provider<__aws_types.Credentials>; + region: string | __aws_types.Provider; + sha256: __aws_types.HashConstructor; + signingName: string; + }) => + new __aws_signature_v4.SignatureV4({ + credentials: configuration.credentials, + region: configuration.region, + service: configuration.signingName, + sha256: configuration.sha256, + unsignedPayload: false, + uriEscapePath: false + }), + apply: ( + signer: __aws_types.RequestSigner | undefined, + configuration: object, + middlewareStack: __aws_types.MiddlewareStack + ): void => { + const tagSet = new Set(); + tagSet.add("SIGNATURE"); + + middlewareStack.add( + class extends __aws_signing_middleware.SigningHandler { + constructor(next: __aws_types.Handler) { + super(signer as __aws_types.RequestSigner, next); + } + }, + { + step: "finalize", + tags: tagSet + } + ); + } + } +}; diff --git a/packages/sdk-kms-node/LICENSE b/packages/sdk-kms-node/LICENSE new file mode 100644 index 0000000000000..ad410e1130210 --- /dev/null +++ b/packages/sdk-kms-node/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/packages/sdk-kms-node/README.md b/packages/sdk-kms-node/README.md new file mode 100644 index 0000000000000..4241eed99a8d5 --- /dev/null +++ b/packages/sdk-kms-node/README.md @@ -0,0 +1,3 @@ +# sdk-kms-node + +Node SDK for AWS Key Management Service \ No newline at end of file diff --git a/packages/sdk-kms-node/index.ts b/packages/sdk-kms-node/index.ts new file mode 100644 index 0000000000000..973bab4b69d62 --- /dev/null +++ b/packages/sdk-kms-node/index.ts @@ -0,0 +1,101 @@ +export * from "./types/AlreadyExistsException"; +export * from "./types/DependencyTimeoutException"; +export * from "./types/DisabledException"; +export * from "./types/ExpiredImportTokenException"; +export * from "./types/IncorrectKeyMaterialException"; +export * from "./types/InvalidAliasNameException"; +export * from "./types/InvalidArnException"; +export * from "./types/InvalidCiphertextException"; +export * from "./types/InvalidGrantIdException"; +export * from "./types/InvalidGrantTokenException"; +export * from "./types/InvalidImportTokenException"; +export * from "./types/InvalidKeyUsageException"; +export * from "./types/InvalidMarkerException"; +export * from "./types/KMSInternalException"; +export * from "./types/KMSInvalidStateException"; +export * from "./types/KeyUnavailableException"; +export * from "./types/LimitExceededException"; +export * from "./types/MalformedPolicyDocumentException"; +export * from "./types/NotFoundException"; +export * from "./types/TagException"; +export * from "./types/UnsupportedOperationException"; +export * from "./types/_AliasListEntry"; +export * from "./types/_GrantConstraints"; +export * from "./types/_GrantListEntry"; +export * from "./types/_KeyListEntry"; +export * from "./types/_KeyMetadata"; +export * from "./types/_Tag"; +export * from "./types/CancelKeyDeletionInput"; +export * from "./types/CancelKeyDeletionOutput"; +export * from "./types/CreateAliasInput"; +export * from "./types/CreateAliasOutput"; +export * from "./types/CreateGrantInput"; +export * from "./types/CreateGrantOutput"; +export * from "./types/CreateKeyInput"; +export * from "./types/CreateKeyOutput"; +export * from "./types/DecryptInput"; +export * from "./types/DecryptOutput"; +export * from "./types/DeleteAliasInput"; +export * from "./types/DeleteAliasOutput"; +export * from "./types/DeleteImportedKeyMaterialInput"; +export * from "./types/DeleteImportedKeyMaterialOutput"; +export * from "./types/DescribeKeyInput"; +export * from "./types/DescribeKeyOutput"; +export * from "./types/DisableKeyInput"; +export * from "./types/DisableKeyOutput"; +export * from "./types/DisableKeyRotationInput"; +export * from "./types/DisableKeyRotationOutput"; +export * from "./types/EnableKeyInput"; +export * from "./types/EnableKeyOutput"; +export * from "./types/EnableKeyRotationInput"; +export * from "./types/EnableKeyRotationOutput"; +export * from "./types/EncryptInput"; +export * from "./types/EncryptOutput"; +export * from "./types/GenerateDataKeyInput"; +export * from "./types/GenerateDataKeyOutput"; +export * from "./types/GenerateDataKeyWithoutPlaintextInput"; +export * from "./types/GenerateDataKeyWithoutPlaintextOutput"; +export * from "./types/GenerateRandomInput"; +export * from "./types/GenerateRandomOutput"; +export * from "./types/GetKeyPolicyInput"; +export * from "./types/GetKeyPolicyOutput"; +export * from "./types/GetKeyRotationStatusInput"; +export * from "./types/GetKeyRotationStatusOutput"; +export * from "./types/GetParametersForImportInput"; +export * from "./types/GetParametersForImportOutput"; +export * from "./types/ImportKeyMaterialInput"; +export * from "./types/ImportKeyMaterialOutput"; +export * from "./types/ListAliasesInput"; +export * from "./types/ListAliasesOutput"; +export * from "./types/ListGrantsInput"; +export * from "./types/ListGrantsOutput"; +export * from "./types/ListKeyPoliciesInput"; +export * from "./types/ListKeyPoliciesOutput"; +export * from "./types/ListKeysInput"; +export * from "./types/ListKeysOutput"; +export * from "./types/ListResourceTagsInput"; +export * from "./types/ListResourceTagsOutput"; +export * from "./types/ListRetirableGrantsInput"; +export * from "./types/ListRetirableGrantsOutput"; +export * from "./types/PutKeyPolicyInput"; +export * from "./types/PutKeyPolicyOutput"; +export * from "./types/ReEncryptInput"; +export * from "./types/ReEncryptOutput"; +export * from "./types/RetireGrantInput"; +export * from "./types/RetireGrantOutput"; +export * from "./types/RevokeGrantInput"; +export * from "./types/RevokeGrantOutput"; +export * from "./types/ScheduleKeyDeletionInput"; +export * from "./types/ScheduleKeyDeletionOutput"; +export * from "./types/TagResourceInput"; +export * from "./types/TagResourceOutput"; +export * from "./types/UntagResourceInput"; +export * from "./types/UntagResourceOutput"; +export * from "./types/UpdateAliasInput"; +export * from "./types/UpdateAliasOutput"; +export * from "./types/UpdateKeyDescriptionInput"; +export * from "./types/UpdateKeyDescriptionOutput"; +export * from "./types/InputTypesUnion"; +export * from "./types/OutputTypesUnion"; +export * from "./KMSClient"; +export * from "./KMS"; diff --git a/packages/sdk-kms-node/model/AlreadyExistsException.ts b/packages/sdk-kms-node/model/AlreadyExistsException.ts new file mode 100644 index 0000000000000..ea15bc08d9e2d --- /dev/null +++ b/packages/sdk-kms-node/model/AlreadyExistsException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const AlreadyExistsException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "AlreadyExistsException" +}; diff --git a/packages/sdk-kms-node/model/CancelKeyDeletion.ts b/packages/sdk-kms-node/model/CancelKeyDeletion.ts new file mode 100644 index 0000000000000..cba42458e71b5 --- /dev/null +++ b/packages/sdk-kms-node/model/CancelKeyDeletion.ts @@ -0,0 +1,41 @@ +import { CancelKeyDeletionInput } from "./CancelKeyDeletionInput"; +import { CancelKeyDeletionOutput } from "./CancelKeyDeletionOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const CancelKeyDeletion: _Operation_ = { + metadata: ServiceMetadata, + name: "CancelKeyDeletion", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: CancelKeyDeletionInput + }, + output: { + shape: CancelKeyDeletionOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/CancelKeyDeletionInput.ts b/packages/sdk-kms-node/model/CancelKeyDeletionInput.ts new file mode 100644 index 0000000000000..a3067991f2ba3 --- /dev/null +++ b/packages/sdk-kms-node/model/CancelKeyDeletionInput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const CancelKeyDeletionInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/CancelKeyDeletionOutput.ts b/packages/sdk-kms-node/model/CancelKeyDeletionOutput.ts new file mode 100644 index 0000000000000..29365792d8336 --- /dev/null +++ b/packages/sdk-kms-node/model/CancelKeyDeletionOutput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const CancelKeyDeletionOutput: _Structure_ = { + type: "structure", + required: [], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/CreateAlias.ts b/packages/sdk-kms-node/model/CreateAlias.ts new file mode 100644 index 0000000000000..d252301d7ece7 --- /dev/null +++ b/packages/sdk-kms-node/model/CreateAlias.ts @@ -0,0 +1,49 @@ +import { CreateAliasInput } from "./CreateAliasInput"; +import { CreateAliasOutput } from "./CreateAliasOutput"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { AlreadyExistsException } from "./AlreadyExistsException"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidAliasNameException } from "./InvalidAliasNameException"; +import { KMSInternalException } from "./KMSInternalException"; +import { LimitExceededException } from "./LimitExceededException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const CreateAlias: _Operation_ = { + metadata: ServiceMetadata, + name: "CreateAlias", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: CreateAliasInput + }, + output: { + shape: CreateAliasOutput + }, + errors: [ + { + shape: DependencyTimeoutException + }, + { + shape: AlreadyExistsException + }, + { + shape: NotFoundException + }, + { + shape: InvalidAliasNameException + }, + { + shape: KMSInternalException + }, + { + shape: LimitExceededException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/CreateAliasInput.ts b/packages/sdk-kms-node/model/CreateAliasInput.ts new file mode 100644 index 0000000000000..287e1441d8109 --- /dev/null +++ b/packages/sdk-kms-node/model/CreateAliasInput.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const CreateAliasInput: _Structure_ = { + type: "structure", + required: ["AliasName", "TargetKeyId"], + members: { + AliasName: { + shape: { + type: "string", + min: 1 + } + }, + TargetKeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/CreateAliasOutput.ts b/packages/sdk-kms-node/model/CreateAliasOutput.ts new file mode 100644 index 0000000000000..bd0d38481cda0 --- /dev/null +++ b/packages/sdk-kms-node/model/CreateAliasOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const CreateAliasOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/CreateGrant.ts b/packages/sdk-kms-node/model/CreateGrant.ts new file mode 100644 index 0000000000000..e2413e0a023f3 --- /dev/null +++ b/packages/sdk-kms-node/model/CreateGrant.ts @@ -0,0 +1,53 @@ +import { CreateGrantInput } from "./CreateGrantInput"; +import { CreateGrantOutput } from "./CreateGrantOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DisabledException } from "./DisabledException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidArnException } from "./InvalidArnException"; +import { KMSInternalException } from "./KMSInternalException"; +import { InvalidGrantTokenException } from "./InvalidGrantTokenException"; +import { LimitExceededException } from "./LimitExceededException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const CreateGrant: _Operation_ = { + metadata: ServiceMetadata, + name: "CreateGrant", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: CreateGrantInput + }, + output: { + shape: CreateGrantOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DisabledException + }, + { + shape: DependencyTimeoutException + }, + { + shape: InvalidArnException + }, + { + shape: KMSInternalException + }, + { + shape: InvalidGrantTokenException + }, + { + shape: LimitExceededException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/CreateGrantInput.ts b/packages/sdk-kms-node/model/CreateGrantInput.ts new file mode 100644 index 0000000000000..3af5f17f62ba0 --- /dev/null +++ b/packages/sdk-kms-node/model/CreateGrantInput.ts @@ -0,0 +1,44 @@ +import { _GrantOperationList } from "./_GrantOperationList"; +import { _GrantConstraints } from "./_GrantConstraints"; +import { _GrantTokenList } from "./_GrantTokenList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const CreateGrantInput: _Structure_ = { + type: "structure", + required: ["KeyId", "GranteePrincipal", "Operations"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + GranteePrincipal: { + shape: { + type: "string", + min: 1 + } + }, + RetiringPrincipal: { + shape: { + type: "string", + min: 1 + } + }, + Operations: { + shape: _GrantOperationList + }, + Constraints: { + shape: _GrantConstraints + }, + GrantTokens: { + shape: _GrantTokenList + }, + Name: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/CreateGrantOutput.ts b/packages/sdk-kms-node/model/CreateGrantOutput.ts new file mode 100644 index 0000000000000..f0c1c21f6303e --- /dev/null +++ b/packages/sdk-kms-node/model/CreateGrantOutput.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const CreateGrantOutput: _Structure_ = { + type: "structure", + required: [], + members: { + GrantToken: { + shape: { + type: "string", + min: 1 + } + }, + GrantId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/CreateKey.ts b/packages/sdk-kms-node/model/CreateKey.ts new file mode 100644 index 0000000000000..0ab0495f396ea --- /dev/null +++ b/packages/sdk-kms-node/model/CreateKey.ts @@ -0,0 +1,49 @@ +import { CreateKeyInput } from "./CreateKeyInput"; +import { CreateKeyOutput } from "./CreateKeyOutput"; +import { MalformedPolicyDocumentException } from "./MalformedPolicyDocumentException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidArnException } from "./InvalidArnException"; +import { UnsupportedOperationException } from "./UnsupportedOperationException"; +import { KMSInternalException } from "./KMSInternalException"; +import { LimitExceededException } from "./LimitExceededException"; +import { TagException } from "./TagException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const CreateKey: _Operation_ = { + metadata: ServiceMetadata, + name: "CreateKey", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: CreateKeyInput + }, + output: { + shape: CreateKeyOutput + }, + errors: [ + { + shape: MalformedPolicyDocumentException + }, + { + shape: DependencyTimeoutException + }, + { + shape: InvalidArnException + }, + { + shape: UnsupportedOperationException + }, + { + shape: KMSInternalException + }, + { + shape: LimitExceededException + }, + { + shape: TagException + } + ] +}; diff --git a/packages/sdk-kms-node/model/CreateKeyInput.ts b/packages/sdk-kms-node/model/CreateKeyInput.ts new file mode 100644 index 0000000000000..fa2492cdac99b --- /dev/null +++ b/packages/sdk-kms-node/model/CreateKeyInput.ts @@ -0,0 +1,38 @@ +import { _TagList } from "./_TagList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const CreateKeyInput: _Structure_ = { + type: "structure", + required: [], + members: { + Policy: { + shape: { + type: "string", + min: 1 + } + }, + Description: { + shape: { + type: "string" + } + }, + KeyUsage: { + shape: { + type: "string" + } + }, + Origin: { + shape: { + type: "string" + } + }, + BypassPolicyLockoutSafetyCheck: { + shape: { + type: "boolean" + } + }, + Tags: { + shape: _TagList + } + } +}; diff --git a/packages/sdk-kms-node/model/CreateKeyOutput.ts b/packages/sdk-kms-node/model/CreateKeyOutput.ts new file mode 100644 index 0000000000000..680ed72498200 --- /dev/null +++ b/packages/sdk-kms-node/model/CreateKeyOutput.ts @@ -0,0 +1,12 @@ +import { _KeyMetadata } from "./_KeyMetadata"; +import { Structure as _Structure_ } from "@aws/types"; + +export const CreateKeyOutput: _Structure_ = { + type: "structure", + required: [], + members: { + KeyMetadata: { + shape: _KeyMetadata + } + } +}; diff --git a/packages/sdk-kms-node/model/Decrypt.ts b/packages/sdk-kms-node/model/Decrypt.ts new file mode 100644 index 0000000000000..08b6e2415e146 --- /dev/null +++ b/packages/sdk-kms-node/model/Decrypt.ts @@ -0,0 +1,53 @@ +import { DecryptInput } from "./DecryptInput"; +import { DecryptOutput } from "./DecryptOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DisabledException } from "./DisabledException"; +import { InvalidCiphertextException } from "./InvalidCiphertextException"; +import { KeyUnavailableException } from "./KeyUnavailableException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidGrantTokenException } from "./InvalidGrantTokenException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const Decrypt: _Operation_ = { + metadata: ServiceMetadata, + name: "Decrypt", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: DecryptInput + }, + output: { + shape: DecryptOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DisabledException + }, + { + shape: InvalidCiphertextException + }, + { + shape: KeyUnavailableException + }, + { + shape: DependencyTimeoutException + }, + { + shape: InvalidGrantTokenException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/DecryptInput.ts b/packages/sdk-kms-node/model/DecryptInput.ts new file mode 100644 index 0000000000000..3cdab3988778c --- /dev/null +++ b/packages/sdk-kms-node/model/DecryptInput.ts @@ -0,0 +1,21 @@ +import { _EncryptionContextType } from "./_EncryptionContextType"; +import { _GrantTokenList } from "./_GrantTokenList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const DecryptInput: _Structure_ = { + type: "structure", + required: ["CiphertextBlob"], + members: { + CiphertextBlob: { + shape: { + type: "blob" + } + }, + EncryptionContext: { + shape: _EncryptionContextType + }, + GrantTokens: { + shape: _GrantTokenList + } + } +}; diff --git a/packages/sdk-kms-node/model/DecryptOutput.ts b/packages/sdk-kms-node/model/DecryptOutput.ts new file mode 100644 index 0000000000000..d2f568783b0bc --- /dev/null +++ b/packages/sdk-kms-node/model/DecryptOutput.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DecryptOutput: _Structure_ = { + type: "structure", + required: [], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + Plaintext: { + shape: { + type: "blob", + sensitive: true + } + } + } +}; diff --git a/packages/sdk-kms-node/model/DeleteAlias.ts b/packages/sdk-kms-node/model/DeleteAlias.ts new file mode 100644 index 0000000000000..949f50fbc4132 --- /dev/null +++ b/packages/sdk-kms-node/model/DeleteAlias.ts @@ -0,0 +1,37 @@ +import { DeleteAliasInput } from "./DeleteAliasInput"; +import { DeleteAliasOutput } from "./DeleteAliasOutput"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { NotFoundException } from "./NotFoundException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const DeleteAlias: _Operation_ = { + metadata: ServiceMetadata, + name: "DeleteAlias", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: DeleteAliasInput + }, + output: { + shape: DeleteAliasOutput + }, + errors: [ + { + shape: DependencyTimeoutException + }, + { + shape: NotFoundException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/DeleteAliasInput.ts b/packages/sdk-kms-node/model/DeleteAliasInput.ts new file mode 100644 index 0000000000000..5490685066cfa --- /dev/null +++ b/packages/sdk-kms-node/model/DeleteAliasInput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DeleteAliasInput: _Structure_ = { + type: "structure", + required: ["AliasName"], + members: { + AliasName: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/DeleteAliasOutput.ts b/packages/sdk-kms-node/model/DeleteAliasOutput.ts new file mode 100644 index 0000000000000..2d0ad34d50a27 --- /dev/null +++ b/packages/sdk-kms-node/model/DeleteAliasOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DeleteAliasOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/DeleteImportedKeyMaterial.ts b/packages/sdk-kms-node/model/DeleteImportedKeyMaterial.ts new file mode 100644 index 0000000000000..67c6cb8cf484e --- /dev/null +++ b/packages/sdk-kms-node/model/DeleteImportedKeyMaterial.ts @@ -0,0 +1,45 @@ +import { DeleteImportedKeyMaterialInput } from "./DeleteImportedKeyMaterialInput"; +import { DeleteImportedKeyMaterialOutput } from "./DeleteImportedKeyMaterialOutput"; +import { InvalidArnException } from "./InvalidArnException"; +import { UnsupportedOperationException } from "./UnsupportedOperationException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { NotFoundException } from "./NotFoundException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const DeleteImportedKeyMaterial: _Operation_ = { + metadata: ServiceMetadata, + name: "DeleteImportedKeyMaterial", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: DeleteImportedKeyMaterialInput + }, + output: { + shape: DeleteImportedKeyMaterialOutput + }, + errors: [ + { + shape: InvalidArnException + }, + { + shape: UnsupportedOperationException + }, + { + shape: DependencyTimeoutException + }, + { + shape: NotFoundException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/DeleteImportedKeyMaterialInput.ts b/packages/sdk-kms-node/model/DeleteImportedKeyMaterialInput.ts new file mode 100644 index 0000000000000..629209f27fa5b --- /dev/null +++ b/packages/sdk-kms-node/model/DeleteImportedKeyMaterialInput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DeleteImportedKeyMaterialInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/DeleteImportedKeyMaterialOutput.ts b/packages/sdk-kms-node/model/DeleteImportedKeyMaterialOutput.ts new file mode 100644 index 0000000000000..344906b5dc645 --- /dev/null +++ b/packages/sdk-kms-node/model/DeleteImportedKeyMaterialOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DeleteImportedKeyMaterialOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/DependencyTimeoutException.ts b/packages/sdk-kms-node/model/DependencyTimeoutException.ts new file mode 100644 index 0000000000000..7ce54fe9c60db --- /dev/null +++ b/packages/sdk-kms-node/model/DependencyTimeoutException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DependencyTimeoutException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "DependencyTimeoutException" +}; diff --git a/packages/sdk-kms-node/model/DescribeKey.ts b/packages/sdk-kms-node/model/DescribeKey.ts new file mode 100644 index 0000000000000..86bc811ff9373 --- /dev/null +++ b/packages/sdk-kms-node/model/DescribeKey.ts @@ -0,0 +1,37 @@ +import { DescribeKeyInput } from "./DescribeKeyInput"; +import { DescribeKeyOutput } from "./DescribeKeyOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const DescribeKey: _Operation_ = { + metadata: ServiceMetadata, + name: "DescribeKey", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: DescribeKeyInput + }, + output: { + shape: DescribeKeyOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + } + ] +}; diff --git a/packages/sdk-kms-node/model/DescribeKeyInput.ts b/packages/sdk-kms-node/model/DescribeKeyInput.ts new file mode 100644 index 0000000000000..03e66df6fae35 --- /dev/null +++ b/packages/sdk-kms-node/model/DescribeKeyInput.ts @@ -0,0 +1,18 @@ +import { _GrantTokenList } from "./_GrantTokenList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const DescribeKeyInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + GrantTokens: { + shape: _GrantTokenList + } + } +}; diff --git a/packages/sdk-kms-node/model/DescribeKeyOutput.ts b/packages/sdk-kms-node/model/DescribeKeyOutput.ts new file mode 100644 index 0000000000000..e600445541ebe --- /dev/null +++ b/packages/sdk-kms-node/model/DescribeKeyOutput.ts @@ -0,0 +1,12 @@ +import { _KeyMetadata } from "./_KeyMetadata"; +import { Structure as _Structure_ } from "@aws/types"; + +export const DescribeKeyOutput: _Structure_ = { + type: "structure", + required: [], + members: { + KeyMetadata: { + shape: _KeyMetadata + } + } +}; diff --git a/packages/sdk-kms-node/model/DisableKey.ts b/packages/sdk-kms-node/model/DisableKey.ts new file mode 100644 index 0000000000000..475eff1eedba4 --- /dev/null +++ b/packages/sdk-kms-node/model/DisableKey.ts @@ -0,0 +1,41 @@ +import { DisableKeyInput } from "./DisableKeyInput"; +import { DisableKeyOutput } from "./DisableKeyOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const DisableKey: _Operation_ = { + metadata: ServiceMetadata, + name: "DisableKey", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: DisableKeyInput + }, + output: { + shape: DisableKeyOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/DisableKeyInput.ts b/packages/sdk-kms-node/model/DisableKeyInput.ts new file mode 100644 index 0000000000000..c11fbf9ac05ef --- /dev/null +++ b/packages/sdk-kms-node/model/DisableKeyInput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DisableKeyInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/DisableKeyOutput.ts b/packages/sdk-kms-node/model/DisableKeyOutput.ts new file mode 100644 index 0000000000000..c7cf197f8ff3f --- /dev/null +++ b/packages/sdk-kms-node/model/DisableKeyOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DisableKeyOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/DisableKeyRotation.ts b/packages/sdk-kms-node/model/DisableKeyRotation.ts new file mode 100644 index 0000000000000..83d33f27cc8a1 --- /dev/null +++ b/packages/sdk-kms-node/model/DisableKeyRotation.ts @@ -0,0 +1,49 @@ +import { DisableKeyRotationInput } from "./DisableKeyRotationInput"; +import { DisableKeyRotationOutput } from "./DisableKeyRotationOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DisabledException } from "./DisabledException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { UnsupportedOperationException } from "./UnsupportedOperationException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const DisableKeyRotation: _Operation_ = { + metadata: ServiceMetadata, + name: "DisableKeyRotation", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: DisableKeyRotationInput + }, + output: { + shape: DisableKeyRotationOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DisabledException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + }, + { + shape: UnsupportedOperationException + } + ] +}; diff --git a/packages/sdk-kms-node/model/DisableKeyRotationInput.ts b/packages/sdk-kms-node/model/DisableKeyRotationInput.ts new file mode 100644 index 0000000000000..55da0358ef2c4 --- /dev/null +++ b/packages/sdk-kms-node/model/DisableKeyRotationInput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DisableKeyRotationInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/DisableKeyRotationOutput.ts b/packages/sdk-kms-node/model/DisableKeyRotationOutput.ts new file mode 100644 index 0000000000000..ba77a4b8dfff6 --- /dev/null +++ b/packages/sdk-kms-node/model/DisableKeyRotationOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DisableKeyRotationOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/DisabledException.ts b/packages/sdk-kms-node/model/DisabledException.ts new file mode 100644 index 0000000000000..d4c49076ec1fb --- /dev/null +++ b/packages/sdk-kms-node/model/DisabledException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const DisabledException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "DisabledException" +}; diff --git a/packages/sdk-kms-node/model/EnableKey.ts b/packages/sdk-kms-node/model/EnableKey.ts new file mode 100644 index 0000000000000..59dfb1cae0efd --- /dev/null +++ b/packages/sdk-kms-node/model/EnableKey.ts @@ -0,0 +1,45 @@ +import { EnableKeyInput } from "./EnableKeyInput"; +import { EnableKeyOutput } from "./EnableKeyOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { LimitExceededException } from "./LimitExceededException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const EnableKey: _Operation_ = { + metadata: ServiceMetadata, + name: "EnableKey", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: EnableKeyInput + }, + output: { + shape: EnableKeyOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: LimitExceededException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/EnableKeyInput.ts b/packages/sdk-kms-node/model/EnableKeyInput.ts new file mode 100644 index 0000000000000..c3526eccc2b44 --- /dev/null +++ b/packages/sdk-kms-node/model/EnableKeyInput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const EnableKeyInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/EnableKeyOutput.ts b/packages/sdk-kms-node/model/EnableKeyOutput.ts new file mode 100644 index 0000000000000..1e1b98cc57eef --- /dev/null +++ b/packages/sdk-kms-node/model/EnableKeyOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const EnableKeyOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/EnableKeyRotation.ts b/packages/sdk-kms-node/model/EnableKeyRotation.ts new file mode 100644 index 0000000000000..eb15f21d41459 --- /dev/null +++ b/packages/sdk-kms-node/model/EnableKeyRotation.ts @@ -0,0 +1,49 @@ +import { EnableKeyRotationInput } from "./EnableKeyRotationInput"; +import { EnableKeyRotationOutput } from "./EnableKeyRotationOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DisabledException } from "./DisabledException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { UnsupportedOperationException } from "./UnsupportedOperationException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const EnableKeyRotation: _Operation_ = { + metadata: ServiceMetadata, + name: "EnableKeyRotation", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: EnableKeyRotationInput + }, + output: { + shape: EnableKeyRotationOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DisabledException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + }, + { + shape: UnsupportedOperationException + } + ] +}; diff --git a/packages/sdk-kms-node/model/EnableKeyRotationInput.ts b/packages/sdk-kms-node/model/EnableKeyRotationInput.ts new file mode 100644 index 0000000000000..c367981e65bcc --- /dev/null +++ b/packages/sdk-kms-node/model/EnableKeyRotationInput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const EnableKeyRotationInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/EnableKeyRotationOutput.ts b/packages/sdk-kms-node/model/EnableKeyRotationOutput.ts new file mode 100644 index 0000000000000..8697f6ce947dd --- /dev/null +++ b/packages/sdk-kms-node/model/EnableKeyRotationOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const EnableKeyRotationOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/Encrypt.ts b/packages/sdk-kms-node/model/Encrypt.ts new file mode 100644 index 0000000000000..f551ef34e15a8 --- /dev/null +++ b/packages/sdk-kms-node/model/Encrypt.ts @@ -0,0 +1,53 @@ +import { EncryptInput } from "./EncryptInput"; +import { EncryptOutput } from "./EncryptOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DisabledException } from "./DisabledException"; +import { KeyUnavailableException } from "./KeyUnavailableException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidKeyUsageException } from "./InvalidKeyUsageException"; +import { InvalidGrantTokenException } from "./InvalidGrantTokenException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const Encrypt: _Operation_ = { + metadata: ServiceMetadata, + name: "Encrypt", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: EncryptInput + }, + output: { + shape: EncryptOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DisabledException + }, + { + shape: KeyUnavailableException + }, + { + shape: DependencyTimeoutException + }, + { + shape: InvalidKeyUsageException + }, + { + shape: InvalidGrantTokenException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/EncryptInput.ts b/packages/sdk-kms-node/model/EncryptInput.ts new file mode 100644 index 0000000000000..b8c8509faecaa --- /dev/null +++ b/packages/sdk-kms-node/model/EncryptInput.ts @@ -0,0 +1,28 @@ +import { _EncryptionContextType } from "./_EncryptionContextType"; +import { _GrantTokenList } from "./_GrantTokenList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const EncryptInput: _Structure_ = { + type: "structure", + required: ["KeyId", "Plaintext"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + Plaintext: { + shape: { + type: "blob", + sensitive: true + } + }, + EncryptionContext: { + shape: _EncryptionContextType + }, + GrantTokens: { + shape: _GrantTokenList + } + } +}; diff --git a/packages/sdk-kms-node/model/EncryptOutput.ts b/packages/sdk-kms-node/model/EncryptOutput.ts new file mode 100644 index 0000000000000..4cf0b616744dd --- /dev/null +++ b/packages/sdk-kms-node/model/EncryptOutput.ts @@ -0,0 +1,19 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const EncryptOutput: _Structure_ = { + type: "structure", + required: [], + members: { + CiphertextBlob: { + shape: { + type: "blob" + } + }, + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ExpiredImportTokenException.ts b/packages/sdk-kms-node/model/ExpiredImportTokenException.ts new file mode 100644 index 0000000000000..3cf9ffbbcbbfe --- /dev/null +++ b/packages/sdk-kms-node/model/ExpiredImportTokenException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ExpiredImportTokenException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "ExpiredImportTokenException" +}; diff --git a/packages/sdk-kms-node/model/GenerateDataKey.ts b/packages/sdk-kms-node/model/GenerateDataKey.ts new file mode 100644 index 0000000000000..7137c0dcd5062 --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateDataKey.ts @@ -0,0 +1,53 @@ +import { GenerateDataKeyInput } from "./GenerateDataKeyInput"; +import { GenerateDataKeyOutput } from "./GenerateDataKeyOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DisabledException } from "./DisabledException"; +import { KeyUnavailableException } from "./KeyUnavailableException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidKeyUsageException } from "./InvalidKeyUsageException"; +import { InvalidGrantTokenException } from "./InvalidGrantTokenException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const GenerateDataKey: _Operation_ = { + metadata: ServiceMetadata, + name: "GenerateDataKey", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: GenerateDataKeyInput + }, + output: { + shape: GenerateDataKeyOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DisabledException + }, + { + shape: KeyUnavailableException + }, + { + shape: DependencyTimeoutException + }, + { + shape: InvalidKeyUsageException + }, + { + shape: InvalidGrantTokenException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/GenerateDataKeyInput.ts b/packages/sdk-kms-node/model/GenerateDataKeyInput.ts new file mode 100644 index 0000000000000..0a71690c07f10 --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateDataKeyInput.ts @@ -0,0 +1,33 @@ +import { _EncryptionContextType } from "./_EncryptionContextType"; +import { _GrantTokenList } from "./_GrantTokenList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const GenerateDataKeyInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + EncryptionContext: { + shape: _EncryptionContextType + }, + NumberOfBytes: { + shape: { + type: "integer", + min: 1 + } + }, + KeySpec: { + shape: { + type: "string" + } + }, + GrantTokens: { + shape: _GrantTokenList + } + } +}; diff --git a/packages/sdk-kms-node/model/GenerateDataKeyOutput.ts b/packages/sdk-kms-node/model/GenerateDataKeyOutput.ts new file mode 100644 index 0000000000000..89d54f9114560 --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateDataKeyOutput.ts @@ -0,0 +1,25 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GenerateDataKeyOutput: _Structure_ = { + type: "structure", + required: [], + members: { + CiphertextBlob: { + shape: { + type: "blob" + } + }, + Plaintext: { + shape: { + type: "blob", + sensitive: true + } + }, + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintext.ts b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintext.ts new file mode 100644 index 0000000000000..0f5c23df2b48f --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintext.ts @@ -0,0 +1,53 @@ +import { GenerateDataKeyWithoutPlaintextInput } from "./GenerateDataKeyWithoutPlaintextInput"; +import { GenerateDataKeyWithoutPlaintextOutput } from "./GenerateDataKeyWithoutPlaintextOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DisabledException } from "./DisabledException"; +import { KeyUnavailableException } from "./KeyUnavailableException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidKeyUsageException } from "./InvalidKeyUsageException"; +import { InvalidGrantTokenException } from "./InvalidGrantTokenException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const GenerateDataKeyWithoutPlaintext: _Operation_ = { + metadata: ServiceMetadata, + name: "GenerateDataKeyWithoutPlaintext", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: GenerateDataKeyWithoutPlaintextInput + }, + output: { + shape: GenerateDataKeyWithoutPlaintextOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DisabledException + }, + { + shape: KeyUnavailableException + }, + { + shape: DependencyTimeoutException + }, + { + shape: InvalidKeyUsageException + }, + { + shape: InvalidGrantTokenException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextInput.ts b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextInput.ts new file mode 100644 index 0000000000000..c4b622d339a15 --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextInput.ts @@ -0,0 +1,33 @@ +import { _EncryptionContextType } from "./_EncryptionContextType"; +import { _GrantTokenList } from "./_GrantTokenList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const GenerateDataKeyWithoutPlaintextInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + EncryptionContext: { + shape: _EncryptionContextType + }, + KeySpec: { + shape: { + type: "string" + } + }, + NumberOfBytes: { + shape: { + type: "integer", + min: 1 + } + }, + GrantTokens: { + shape: _GrantTokenList + } + } +}; diff --git a/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextOutput.ts b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextOutput.ts new file mode 100644 index 0000000000000..cd68f88654fc2 --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextOutput.ts @@ -0,0 +1,19 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GenerateDataKeyWithoutPlaintextOutput: _Structure_ = { + type: "structure", + required: [], + members: { + CiphertextBlob: { + shape: { + type: "blob" + } + }, + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/GenerateRandom.ts b/packages/sdk-kms-node/model/GenerateRandom.ts new file mode 100644 index 0000000000000..d3af488c909c4 --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateRandom.ts @@ -0,0 +1,29 @@ +import { GenerateRandomInput } from "./GenerateRandomInput"; +import { GenerateRandomOutput } from "./GenerateRandomOutput"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const GenerateRandom: _Operation_ = { + metadata: ServiceMetadata, + name: "GenerateRandom", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: GenerateRandomInput + }, + output: { + shape: GenerateRandomOutput + }, + errors: [ + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + } + ] +}; diff --git a/packages/sdk-kms-node/model/GenerateRandomInput.ts b/packages/sdk-kms-node/model/GenerateRandomInput.ts new file mode 100644 index 0000000000000..73bc51f82f6c5 --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateRandomInput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GenerateRandomInput: _Structure_ = { + type: "structure", + required: [], + members: { + NumberOfBytes: { + shape: { + type: "integer", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/GenerateRandomOutput.ts b/packages/sdk-kms-node/model/GenerateRandomOutput.ts new file mode 100644 index 0000000000000..a3cfd246a04e5 --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateRandomOutput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GenerateRandomOutput: _Structure_ = { + type: "structure", + required: [], + members: { + Plaintext: { + shape: { + type: "blob", + sensitive: true + } + } + } +}; diff --git a/packages/sdk-kms-node/model/GetKeyPolicy.ts b/packages/sdk-kms-node/model/GetKeyPolicy.ts new file mode 100644 index 0000000000000..0f0f1315c60d5 --- /dev/null +++ b/packages/sdk-kms-node/model/GetKeyPolicy.ts @@ -0,0 +1,41 @@ +import { GetKeyPolicyInput } from "./GetKeyPolicyInput"; +import { GetKeyPolicyOutput } from "./GetKeyPolicyOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const GetKeyPolicy: _Operation_ = { + metadata: ServiceMetadata, + name: "GetKeyPolicy", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: GetKeyPolicyInput + }, + output: { + shape: GetKeyPolicyOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/GetKeyPolicyInput.ts b/packages/sdk-kms-node/model/GetKeyPolicyInput.ts new file mode 100644 index 0000000000000..e5ed061d6c133 --- /dev/null +++ b/packages/sdk-kms-node/model/GetKeyPolicyInput.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GetKeyPolicyInput: _Structure_ = { + type: "structure", + required: ["KeyId", "PolicyName"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + PolicyName: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/GetKeyPolicyOutput.ts b/packages/sdk-kms-node/model/GetKeyPolicyOutput.ts new file mode 100644 index 0000000000000..5ce961098e2d5 --- /dev/null +++ b/packages/sdk-kms-node/model/GetKeyPolicyOutput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GetKeyPolicyOutput: _Structure_ = { + type: "structure", + required: [], + members: { + Policy: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/GetKeyRotationStatus.ts b/packages/sdk-kms-node/model/GetKeyRotationStatus.ts new file mode 100644 index 0000000000000..e5a1a724ee108 --- /dev/null +++ b/packages/sdk-kms-node/model/GetKeyRotationStatus.ts @@ -0,0 +1,45 @@ +import { GetKeyRotationStatusInput } from "./GetKeyRotationStatusInput"; +import { GetKeyRotationStatusOutput } from "./GetKeyRotationStatusOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { UnsupportedOperationException } from "./UnsupportedOperationException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const GetKeyRotationStatus: _Operation_ = { + metadata: ServiceMetadata, + name: "GetKeyRotationStatus", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: GetKeyRotationStatusInput + }, + output: { + shape: GetKeyRotationStatusOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + }, + { + shape: UnsupportedOperationException + } + ] +}; diff --git a/packages/sdk-kms-node/model/GetKeyRotationStatusInput.ts b/packages/sdk-kms-node/model/GetKeyRotationStatusInput.ts new file mode 100644 index 0000000000000..0f1ebc7ab24fd --- /dev/null +++ b/packages/sdk-kms-node/model/GetKeyRotationStatusInput.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GetKeyRotationStatusInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/GetKeyRotationStatusOutput.ts b/packages/sdk-kms-node/model/GetKeyRotationStatusOutput.ts new file mode 100644 index 0000000000000..1b7fce9166a8b --- /dev/null +++ b/packages/sdk-kms-node/model/GetKeyRotationStatusOutput.ts @@ -0,0 +1,13 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GetKeyRotationStatusOutput: _Structure_ = { + type: "structure", + required: [], + members: { + KeyRotationEnabled: { + shape: { + type: "boolean" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/GetParametersForImport.ts b/packages/sdk-kms-node/model/GetParametersForImport.ts new file mode 100644 index 0000000000000..40667343a1449 --- /dev/null +++ b/packages/sdk-kms-node/model/GetParametersForImport.ts @@ -0,0 +1,45 @@ +import { GetParametersForImportInput } from "./GetParametersForImportInput"; +import { GetParametersForImportOutput } from "./GetParametersForImportOutput"; +import { InvalidArnException } from "./InvalidArnException"; +import { UnsupportedOperationException } from "./UnsupportedOperationException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { NotFoundException } from "./NotFoundException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const GetParametersForImport: _Operation_ = { + metadata: ServiceMetadata, + name: "GetParametersForImport", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: GetParametersForImportInput + }, + output: { + shape: GetParametersForImportOutput + }, + errors: [ + { + shape: InvalidArnException + }, + { + shape: UnsupportedOperationException + }, + { + shape: DependencyTimeoutException + }, + { + shape: NotFoundException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/GetParametersForImportInput.ts b/packages/sdk-kms-node/model/GetParametersForImportInput.ts new file mode 100644 index 0000000000000..8146c6b9b7c5b --- /dev/null +++ b/packages/sdk-kms-node/model/GetParametersForImportInput.ts @@ -0,0 +1,24 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GetParametersForImportInput: _Structure_ = { + type: "structure", + required: ["KeyId", "WrappingAlgorithm", "WrappingKeySpec"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + WrappingAlgorithm: { + shape: { + type: "string" + } + }, + WrappingKeySpec: { + shape: { + type: "string" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/GetParametersForImportOutput.ts b/packages/sdk-kms-node/model/GetParametersForImportOutput.ts new file mode 100644 index 0000000000000..57ccdbd4ed965 --- /dev/null +++ b/packages/sdk-kms-node/model/GetParametersForImportOutput.ts @@ -0,0 +1,30 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const GetParametersForImportOutput: _Structure_ = { + type: "structure", + required: [], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + ImportToken: { + shape: { + type: "blob" + } + }, + PublicKey: { + shape: { + type: "blob", + sensitive: true + } + }, + ParametersValidTo: { + shape: { + type: "timestamp" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ImportKeyMaterial.ts b/packages/sdk-kms-node/model/ImportKeyMaterial.ts new file mode 100644 index 0000000000000..3fc3d6102933f --- /dev/null +++ b/packages/sdk-kms-node/model/ImportKeyMaterial.ts @@ -0,0 +1,61 @@ +import { ImportKeyMaterialInput } from "./ImportKeyMaterialInput"; +import { ImportKeyMaterialOutput } from "./ImportKeyMaterialOutput"; +import { InvalidArnException } from "./InvalidArnException"; +import { UnsupportedOperationException } from "./UnsupportedOperationException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { NotFoundException } from "./NotFoundException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { InvalidCiphertextException } from "./InvalidCiphertextException"; +import { IncorrectKeyMaterialException } from "./IncorrectKeyMaterialException"; +import { ExpiredImportTokenException } from "./ExpiredImportTokenException"; +import { InvalidImportTokenException } from "./InvalidImportTokenException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const ImportKeyMaterial: _Operation_ = { + metadata: ServiceMetadata, + name: "ImportKeyMaterial", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: ImportKeyMaterialInput + }, + output: { + shape: ImportKeyMaterialOutput + }, + errors: [ + { + shape: InvalidArnException + }, + { + shape: UnsupportedOperationException + }, + { + shape: DependencyTimeoutException + }, + { + shape: NotFoundException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + }, + { + shape: InvalidCiphertextException + }, + { + shape: IncorrectKeyMaterialException + }, + { + shape: ExpiredImportTokenException + }, + { + shape: InvalidImportTokenException + } + ] +}; diff --git a/packages/sdk-kms-node/model/ImportKeyMaterialInput.ts b/packages/sdk-kms-node/model/ImportKeyMaterialInput.ts new file mode 100644 index 0000000000000..9615577165e67 --- /dev/null +++ b/packages/sdk-kms-node/model/ImportKeyMaterialInput.ts @@ -0,0 +1,34 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ImportKeyMaterialInput: _Structure_ = { + type: "structure", + required: ["KeyId", "ImportToken", "EncryptedKeyMaterial"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + ImportToken: { + shape: { + type: "blob" + } + }, + EncryptedKeyMaterial: { + shape: { + type: "blob" + } + }, + ValidTo: { + shape: { + type: "timestamp" + } + }, + ExpirationModel: { + shape: { + type: "string" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ImportKeyMaterialOutput.ts b/packages/sdk-kms-node/model/ImportKeyMaterialOutput.ts new file mode 100644 index 0000000000000..c45dd9344de29 --- /dev/null +++ b/packages/sdk-kms-node/model/ImportKeyMaterialOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ImportKeyMaterialOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/IncorrectKeyMaterialException.ts b/packages/sdk-kms-node/model/IncorrectKeyMaterialException.ts new file mode 100644 index 0000000000000..be4e2239ec838 --- /dev/null +++ b/packages/sdk-kms-node/model/IncorrectKeyMaterialException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const IncorrectKeyMaterialException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "IncorrectKeyMaterialException" +}; diff --git a/packages/sdk-kms-node/model/InvalidAliasNameException.ts b/packages/sdk-kms-node/model/InvalidAliasNameException.ts new file mode 100644 index 0000000000000..744de73a41ff3 --- /dev/null +++ b/packages/sdk-kms-node/model/InvalidAliasNameException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const InvalidAliasNameException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "InvalidAliasNameException" +}; diff --git a/packages/sdk-kms-node/model/InvalidArnException.ts b/packages/sdk-kms-node/model/InvalidArnException.ts new file mode 100644 index 0000000000000..891319da260ce --- /dev/null +++ b/packages/sdk-kms-node/model/InvalidArnException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const InvalidArnException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "InvalidArnException" +}; diff --git a/packages/sdk-kms-node/model/InvalidCiphertextException.ts b/packages/sdk-kms-node/model/InvalidCiphertextException.ts new file mode 100644 index 0000000000000..93a3adb36d097 --- /dev/null +++ b/packages/sdk-kms-node/model/InvalidCiphertextException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const InvalidCiphertextException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "InvalidCiphertextException" +}; diff --git a/packages/sdk-kms-node/model/InvalidGrantIdException.ts b/packages/sdk-kms-node/model/InvalidGrantIdException.ts new file mode 100644 index 0000000000000..ee6b6f1cbcd77 --- /dev/null +++ b/packages/sdk-kms-node/model/InvalidGrantIdException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const InvalidGrantIdException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "InvalidGrantIdException" +}; diff --git a/packages/sdk-kms-node/model/InvalidGrantTokenException.ts b/packages/sdk-kms-node/model/InvalidGrantTokenException.ts new file mode 100644 index 0000000000000..b2e56a39c1d7d --- /dev/null +++ b/packages/sdk-kms-node/model/InvalidGrantTokenException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const InvalidGrantTokenException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "InvalidGrantTokenException" +}; diff --git a/packages/sdk-kms-node/model/InvalidImportTokenException.ts b/packages/sdk-kms-node/model/InvalidImportTokenException.ts new file mode 100644 index 0000000000000..98c7d07a4b5f8 --- /dev/null +++ b/packages/sdk-kms-node/model/InvalidImportTokenException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const InvalidImportTokenException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "InvalidImportTokenException" +}; diff --git a/packages/sdk-kms-node/model/InvalidKeyUsageException.ts b/packages/sdk-kms-node/model/InvalidKeyUsageException.ts new file mode 100644 index 0000000000000..634bff39f4de7 --- /dev/null +++ b/packages/sdk-kms-node/model/InvalidKeyUsageException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const InvalidKeyUsageException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "InvalidKeyUsageException" +}; diff --git a/packages/sdk-kms-node/model/InvalidMarkerException.ts b/packages/sdk-kms-node/model/InvalidMarkerException.ts new file mode 100644 index 0000000000000..909e49f827949 --- /dev/null +++ b/packages/sdk-kms-node/model/InvalidMarkerException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const InvalidMarkerException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "InvalidMarkerException" +}; diff --git a/packages/sdk-kms-node/model/KMSInternalException.ts b/packages/sdk-kms-node/model/KMSInternalException.ts new file mode 100644 index 0000000000000..5fcf651471ad3 --- /dev/null +++ b/packages/sdk-kms-node/model/KMSInternalException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const KMSInternalException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "KMSInternalException" +}; diff --git a/packages/sdk-kms-node/model/KMSInvalidStateException.ts b/packages/sdk-kms-node/model/KMSInvalidStateException.ts new file mode 100644 index 0000000000000..6f3f0669d731f --- /dev/null +++ b/packages/sdk-kms-node/model/KMSInvalidStateException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const KMSInvalidStateException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "KMSInvalidStateException" +}; diff --git a/packages/sdk-kms-node/model/KeyUnavailableException.ts b/packages/sdk-kms-node/model/KeyUnavailableException.ts new file mode 100644 index 0000000000000..9ccdcd2402f50 --- /dev/null +++ b/packages/sdk-kms-node/model/KeyUnavailableException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const KeyUnavailableException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "KeyUnavailableException" +}; diff --git a/packages/sdk-kms-node/model/LimitExceededException.ts b/packages/sdk-kms-node/model/LimitExceededException.ts new file mode 100644 index 0000000000000..24537f26b6198 --- /dev/null +++ b/packages/sdk-kms-node/model/LimitExceededException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const LimitExceededException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "LimitExceededException" +}; diff --git a/packages/sdk-kms-node/model/ListAliases.ts b/packages/sdk-kms-node/model/ListAliases.ts new file mode 100644 index 0000000000000..8646ca41d0663 --- /dev/null +++ b/packages/sdk-kms-node/model/ListAliases.ts @@ -0,0 +1,33 @@ +import { ListAliasesInput } from "./ListAliasesInput"; +import { ListAliasesOutput } from "./ListAliasesOutput"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidMarkerException } from "./InvalidMarkerException"; +import { KMSInternalException } from "./KMSInternalException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const ListAliases: _Operation_ = { + metadata: ServiceMetadata, + name: "ListAliases", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: ListAliasesInput + }, + output: { + shape: ListAliasesOutput + }, + errors: [ + { + shape: DependencyTimeoutException + }, + { + shape: InvalidMarkerException + }, + { + shape: KMSInternalException + } + ] +}; diff --git a/packages/sdk-kms-node/model/ListAliasesInput.ts b/packages/sdk-kms-node/model/ListAliasesInput.ts new file mode 100644 index 0000000000000..650e900635995 --- /dev/null +++ b/packages/sdk-kms-node/model/ListAliasesInput.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ListAliasesInput: _Structure_ = { + type: "structure", + required: [], + members: { + Limit: { + shape: { + type: "integer", + min: 1 + } + }, + Marker: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListAliasesOutput.ts b/packages/sdk-kms-node/model/ListAliasesOutput.ts new file mode 100644 index 0000000000000..eca7c10f6609e --- /dev/null +++ b/packages/sdk-kms-node/model/ListAliasesOutput.ts @@ -0,0 +1,23 @@ +import { _AliasList } from "./_AliasList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const ListAliasesOutput: _Structure_ = { + type: "structure", + required: [], + members: { + Aliases: { + shape: _AliasList + }, + NextMarker: { + shape: { + type: "string", + min: 1 + } + }, + Truncated: { + shape: { + type: "boolean" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListGrants.ts b/packages/sdk-kms-node/model/ListGrants.ts new file mode 100644 index 0000000000000..454a02e0542cc --- /dev/null +++ b/packages/sdk-kms-node/model/ListGrants.ts @@ -0,0 +1,45 @@ +import { ListGrantsInput } from "./ListGrantsInput"; +import { ListGrantsOutput } from "./ListGrantsOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidMarkerException } from "./InvalidMarkerException"; +import { InvalidArnException } from "./InvalidArnException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const ListGrants: _Operation_ = { + metadata: ServiceMetadata, + name: "ListGrants", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: ListGrantsInput + }, + output: { + shape: ListGrantsOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DependencyTimeoutException + }, + { + shape: InvalidMarkerException + }, + { + shape: InvalidArnException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/ListGrantsInput.ts b/packages/sdk-kms-node/model/ListGrantsInput.ts new file mode 100644 index 0000000000000..0940248be0d10 --- /dev/null +++ b/packages/sdk-kms-node/model/ListGrantsInput.ts @@ -0,0 +1,26 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ListGrantsInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + Limit: { + shape: { + type: "integer", + min: 1 + } + }, + Marker: { + shape: { + type: "string", + min: 1 + } + }, + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListGrantsOutput.ts b/packages/sdk-kms-node/model/ListGrantsOutput.ts new file mode 100644 index 0000000000000..b4a5fd913b1db --- /dev/null +++ b/packages/sdk-kms-node/model/ListGrantsOutput.ts @@ -0,0 +1,23 @@ +import { _GrantList } from "./_GrantList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const ListGrantsOutput: _Structure_ = { + type: "structure", + required: [], + members: { + Grants: { + shape: _GrantList + }, + NextMarker: { + shape: { + type: "string", + min: 1 + } + }, + Truncated: { + shape: { + type: "boolean" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListKeyPolicies.ts b/packages/sdk-kms-node/model/ListKeyPolicies.ts new file mode 100644 index 0000000000000..68e27d9f5a7d9 --- /dev/null +++ b/packages/sdk-kms-node/model/ListKeyPolicies.ts @@ -0,0 +1,41 @@ +import { ListKeyPoliciesInput } from "./ListKeyPoliciesInput"; +import { ListKeyPoliciesOutput } from "./ListKeyPoliciesOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const ListKeyPolicies: _Operation_ = { + metadata: ServiceMetadata, + name: "ListKeyPolicies", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: ListKeyPoliciesInput + }, + output: { + shape: ListKeyPoliciesOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/ListKeyPoliciesInput.ts b/packages/sdk-kms-node/model/ListKeyPoliciesInput.ts new file mode 100644 index 0000000000000..1e85f2ef6372b --- /dev/null +++ b/packages/sdk-kms-node/model/ListKeyPoliciesInput.ts @@ -0,0 +1,26 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ListKeyPoliciesInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + Limit: { + shape: { + type: "integer", + min: 1 + } + }, + Marker: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListKeyPoliciesOutput.ts b/packages/sdk-kms-node/model/ListKeyPoliciesOutput.ts new file mode 100644 index 0000000000000..32fa79e4e2f4b --- /dev/null +++ b/packages/sdk-kms-node/model/ListKeyPoliciesOutput.ts @@ -0,0 +1,23 @@ +import { _PolicyNameList } from "./_PolicyNameList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const ListKeyPoliciesOutput: _Structure_ = { + type: "structure", + required: [], + members: { + PolicyNames: { + shape: _PolicyNameList + }, + NextMarker: { + shape: { + type: "string", + min: 1 + } + }, + Truncated: { + shape: { + type: "boolean" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListKeys.ts b/packages/sdk-kms-node/model/ListKeys.ts new file mode 100644 index 0000000000000..9be2d2fec4e2c --- /dev/null +++ b/packages/sdk-kms-node/model/ListKeys.ts @@ -0,0 +1,33 @@ +import { ListKeysInput } from "./ListKeysInput"; +import { ListKeysOutput } from "./ListKeysOutput"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { InvalidMarkerException } from "./InvalidMarkerException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const ListKeys: _Operation_ = { + metadata: ServiceMetadata, + name: "ListKeys", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: ListKeysInput + }, + output: { + shape: ListKeysOutput + }, + errors: [ + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: InvalidMarkerException + } + ] +}; diff --git a/packages/sdk-kms-node/model/ListKeysInput.ts b/packages/sdk-kms-node/model/ListKeysInput.ts new file mode 100644 index 0000000000000..c5d6d842e5c09 --- /dev/null +++ b/packages/sdk-kms-node/model/ListKeysInput.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ListKeysInput: _Structure_ = { + type: "structure", + required: [], + members: { + Limit: { + shape: { + type: "integer", + min: 1 + } + }, + Marker: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListKeysOutput.ts b/packages/sdk-kms-node/model/ListKeysOutput.ts new file mode 100644 index 0000000000000..86d0431c0b388 --- /dev/null +++ b/packages/sdk-kms-node/model/ListKeysOutput.ts @@ -0,0 +1,23 @@ +import { _KeyList } from "./_KeyList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const ListKeysOutput: _Structure_ = { + type: "structure", + required: [], + members: { + Keys: { + shape: _KeyList + }, + NextMarker: { + shape: { + type: "string", + min: 1 + } + }, + Truncated: { + shape: { + type: "boolean" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListResourceTags.ts b/packages/sdk-kms-node/model/ListResourceTags.ts new file mode 100644 index 0000000000000..094af0c5b3f77 --- /dev/null +++ b/packages/sdk-kms-node/model/ListResourceTags.ts @@ -0,0 +1,37 @@ +import { ListResourceTagsInput } from "./ListResourceTagsInput"; +import { ListResourceTagsOutput } from "./ListResourceTagsOutput"; +import { KMSInternalException } from "./KMSInternalException"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { InvalidMarkerException } from "./InvalidMarkerException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const ListResourceTags: _Operation_ = { + metadata: ServiceMetadata, + name: "ListResourceTags", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: ListResourceTagsInput + }, + output: { + shape: ListResourceTagsOutput + }, + errors: [ + { + shape: KMSInternalException + }, + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: InvalidMarkerException + } + ] +}; diff --git a/packages/sdk-kms-node/model/ListResourceTagsInput.ts b/packages/sdk-kms-node/model/ListResourceTagsInput.ts new file mode 100644 index 0000000000000..56381992f9c11 --- /dev/null +++ b/packages/sdk-kms-node/model/ListResourceTagsInput.ts @@ -0,0 +1,26 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ListResourceTagsInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + Limit: { + shape: { + type: "integer", + min: 1 + } + }, + Marker: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListResourceTagsOutput.ts b/packages/sdk-kms-node/model/ListResourceTagsOutput.ts new file mode 100644 index 0000000000000..108db90926e21 --- /dev/null +++ b/packages/sdk-kms-node/model/ListResourceTagsOutput.ts @@ -0,0 +1,23 @@ +import { _TagList } from "./_TagList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const ListResourceTagsOutput: _Structure_ = { + type: "structure", + required: [], + members: { + Tags: { + shape: _TagList + }, + NextMarker: { + shape: { + type: "string", + min: 1 + } + }, + Truncated: { + shape: { + type: "boolean" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListRetirableGrants.ts b/packages/sdk-kms-node/model/ListRetirableGrants.ts new file mode 100644 index 0000000000000..25aec97f342d8 --- /dev/null +++ b/packages/sdk-kms-node/model/ListRetirableGrants.ts @@ -0,0 +1,41 @@ +import { ListRetirableGrantsInput } from "./ListRetirableGrantsInput"; +import { ListRetirableGrantsOutput } from "./ListRetirableGrantsOutput"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidMarkerException } from "./InvalidMarkerException"; +import { InvalidArnException } from "./InvalidArnException"; +import { NotFoundException } from "./NotFoundException"; +import { KMSInternalException } from "./KMSInternalException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const ListRetirableGrants: _Operation_ = { + metadata: ServiceMetadata, + name: "ListRetirableGrants", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: ListRetirableGrantsInput + }, + output: { + shape: ListRetirableGrantsOutput + }, + errors: [ + { + shape: DependencyTimeoutException + }, + { + shape: InvalidMarkerException + }, + { + shape: InvalidArnException + }, + { + shape: NotFoundException + }, + { + shape: KMSInternalException + } + ] +}; diff --git a/packages/sdk-kms-node/model/ListRetirableGrantsInput.ts b/packages/sdk-kms-node/model/ListRetirableGrantsInput.ts new file mode 100644 index 0000000000000..16536a306da40 --- /dev/null +++ b/packages/sdk-kms-node/model/ListRetirableGrantsInput.ts @@ -0,0 +1,26 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ListRetirableGrantsInput: _Structure_ = { + type: "structure", + required: ["RetiringPrincipal"], + members: { + Limit: { + shape: { + type: "integer", + min: 1 + } + }, + Marker: { + shape: { + type: "string", + min: 1 + } + }, + RetiringPrincipal: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ListRetirableGrantsOutput.ts b/packages/sdk-kms-node/model/ListRetirableGrantsOutput.ts new file mode 100644 index 0000000000000..c12e76364f195 --- /dev/null +++ b/packages/sdk-kms-node/model/ListRetirableGrantsOutput.ts @@ -0,0 +1,23 @@ +import { _GrantList } from "./_GrantList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const ListRetirableGrantsOutput: _Structure_ = { + type: "structure", + required: [], + members: { + Grants: { + shape: _GrantList + }, + NextMarker: { + shape: { + type: "string", + min: 1 + } + }, + Truncated: { + shape: { + type: "boolean" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/MalformedPolicyDocumentException.ts b/packages/sdk-kms-node/model/MalformedPolicyDocumentException.ts new file mode 100644 index 0000000000000..9ad0733f8d72f --- /dev/null +++ b/packages/sdk-kms-node/model/MalformedPolicyDocumentException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const MalformedPolicyDocumentException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "MalformedPolicyDocumentException" +}; diff --git a/packages/sdk-kms-node/model/NotFoundException.ts b/packages/sdk-kms-node/model/NotFoundException.ts new file mode 100644 index 0000000000000..b8352ffd7e2a4 --- /dev/null +++ b/packages/sdk-kms-node/model/NotFoundException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const NotFoundException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "NotFoundException" +}; diff --git a/packages/sdk-kms-node/model/PutKeyPolicy.ts b/packages/sdk-kms-node/model/PutKeyPolicy.ts new file mode 100644 index 0000000000000..0af6856e2ba27 --- /dev/null +++ b/packages/sdk-kms-node/model/PutKeyPolicy.ts @@ -0,0 +1,53 @@ +import { PutKeyPolicyInput } from "./PutKeyPolicyInput"; +import { PutKeyPolicyOutput } from "./PutKeyPolicyOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { MalformedPolicyDocumentException } from "./MalformedPolicyDocumentException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { UnsupportedOperationException } from "./UnsupportedOperationException"; +import { KMSInternalException } from "./KMSInternalException"; +import { LimitExceededException } from "./LimitExceededException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const PutKeyPolicy: _Operation_ = { + metadata: ServiceMetadata, + name: "PutKeyPolicy", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: PutKeyPolicyInput + }, + output: { + shape: PutKeyPolicyOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: MalformedPolicyDocumentException + }, + { + shape: DependencyTimeoutException + }, + { + shape: UnsupportedOperationException + }, + { + shape: KMSInternalException + }, + { + shape: LimitExceededException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/PutKeyPolicyInput.ts b/packages/sdk-kms-node/model/PutKeyPolicyInput.ts new file mode 100644 index 0000000000000..01599bf7c2320 --- /dev/null +++ b/packages/sdk-kms-node/model/PutKeyPolicyInput.ts @@ -0,0 +1,31 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const PutKeyPolicyInput: _Structure_ = { + type: "structure", + required: ["KeyId", "PolicyName", "Policy"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + PolicyName: { + shape: { + type: "string", + min: 1 + } + }, + Policy: { + shape: { + type: "string", + min: 1 + } + }, + BypassPolicyLockoutSafetyCheck: { + shape: { + type: "boolean" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/PutKeyPolicyOutput.ts b/packages/sdk-kms-node/model/PutKeyPolicyOutput.ts new file mode 100644 index 0000000000000..8db483b1b9d76 --- /dev/null +++ b/packages/sdk-kms-node/model/PutKeyPolicyOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const PutKeyPolicyOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/ReEncrypt.ts b/packages/sdk-kms-node/model/ReEncrypt.ts new file mode 100644 index 0000000000000..f3ac3fb48992d --- /dev/null +++ b/packages/sdk-kms-node/model/ReEncrypt.ts @@ -0,0 +1,57 @@ +import { ReEncryptInput } from "./ReEncryptInput"; +import { ReEncryptOutput } from "./ReEncryptOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DisabledException } from "./DisabledException"; +import { InvalidCiphertextException } from "./InvalidCiphertextException"; +import { KeyUnavailableException } from "./KeyUnavailableException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidKeyUsageException } from "./InvalidKeyUsageException"; +import { InvalidGrantTokenException } from "./InvalidGrantTokenException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const ReEncrypt: _Operation_ = { + metadata: ServiceMetadata, + name: "ReEncrypt", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: ReEncryptInput + }, + output: { + shape: ReEncryptOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DisabledException + }, + { + shape: InvalidCiphertextException + }, + { + shape: KeyUnavailableException + }, + { + shape: DependencyTimeoutException + }, + { + shape: InvalidKeyUsageException + }, + { + shape: InvalidGrantTokenException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/ReEncryptInput.ts b/packages/sdk-kms-node/model/ReEncryptInput.ts new file mode 100644 index 0000000000000..18519a862fd58 --- /dev/null +++ b/packages/sdk-kms-node/model/ReEncryptInput.ts @@ -0,0 +1,30 @@ +import { _EncryptionContextType } from "./_EncryptionContextType"; +import { _GrantTokenList } from "./_GrantTokenList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const ReEncryptInput: _Structure_ = { + type: "structure", + required: ["CiphertextBlob", "DestinationKeyId"], + members: { + CiphertextBlob: { + shape: { + type: "blob" + } + }, + SourceEncryptionContext: { + shape: _EncryptionContextType + }, + DestinationKeyId: { + shape: { + type: "string", + min: 1 + } + }, + DestinationEncryptionContext: { + shape: _EncryptionContextType + }, + GrantTokens: { + shape: _GrantTokenList + } + } +}; diff --git a/packages/sdk-kms-node/model/ReEncryptOutput.ts b/packages/sdk-kms-node/model/ReEncryptOutput.ts new file mode 100644 index 0000000000000..ff0b7ac89d03b --- /dev/null +++ b/packages/sdk-kms-node/model/ReEncryptOutput.ts @@ -0,0 +1,25 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ReEncryptOutput: _Structure_ = { + type: "structure", + required: [], + members: { + CiphertextBlob: { + shape: { + type: "blob" + } + }, + SourceKeyId: { + shape: { + type: "string", + min: 1 + } + }, + KeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/RetireGrant.ts b/packages/sdk-kms-node/model/RetireGrant.ts new file mode 100644 index 0000000000000..c09ed9c1618a1 --- /dev/null +++ b/packages/sdk-kms-node/model/RetireGrant.ts @@ -0,0 +1,45 @@ +import { RetireGrantInput } from "./RetireGrantInput"; +import { RetireGrantOutput } from "./RetireGrantOutput"; +import { InvalidGrantTokenException } from "./InvalidGrantTokenException"; +import { InvalidGrantIdException } from "./InvalidGrantIdException"; +import { NotFoundException } from "./NotFoundException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const RetireGrant: _Operation_ = { + metadata: ServiceMetadata, + name: "RetireGrant", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: RetireGrantInput + }, + output: { + shape: RetireGrantOutput + }, + errors: [ + { + shape: InvalidGrantTokenException + }, + { + shape: InvalidGrantIdException + }, + { + shape: NotFoundException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/RetireGrantInput.ts b/packages/sdk-kms-node/model/RetireGrantInput.ts new file mode 100644 index 0000000000000..adf8034003ee4 --- /dev/null +++ b/packages/sdk-kms-node/model/RetireGrantInput.ts @@ -0,0 +1,26 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const RetireGrantInput: _Structure_ = { + type: "structure", + required: [], + members: { + GrantToken: { + shape: { + type: "string", + min: 1 + } + }, + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + GrantId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/RetireGrantOutput.ts b/packages/sdk-kms-node/model/RetireGrantOutput.ts new file mode 100644 index 0000000000000..22d799accedfb --- /dev/null +++ b/packages/sdk-kms-node/model/RetireGrantOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const RetireGrantOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/RevokeGrant.ts b/packages/sdk-kms-node/model/RevokeGrant.ts new file mode 100644 index 0000000000000..09d274fc9eb2f --- /dev/null +++ b/packages/sdk-kms-node/model/RevokeGrant.ts @@ -0,0 +1,45 @@ +import { RevokeGrantInput } from "./RevokeGrantInput"; +import { RevokeGrantOutput } from "./RevokeGrantOutput"; +import { NotFoundException } from "./NotFoundException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { InvalidArnException } from "./InvalidArnException"; +import { InvalidGrantIdException } from "./InvalidGrantIdException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const RevokeGrant: _Operation_ = { + metadata: ServiceMetadata, + name: "RevokeGrant", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: RevokeGrantInput + }, + output: { + shape: RevokeGrantOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: DependencyTimeoutException + }, + { + shape: InvalidArnException + }, + { + shape: InvalidGrantIdException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/RevokeGrantInput.ts b/packages/sdk-kms-node/model/RevokeGrantInput.ts new file mode 100644 index 0000000000000..8b4228e7fb89a --- /dev/null +++ b/packages/sdk-kms-node/model/RevokeGrantInput.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const RevokeGrantInput: _Structure_ = { + type: "structure", + required: ["KeyId", "GrantId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + GrantId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/RevokeGrantOutput.ts b/packages/sdk-kms-node/model/RevokeGrantOutput.ts new file mode 100644 index 0000000000000..f043a58fda3f5 --- /dev/null +++ b/packages/sdk-kms-node/model/RevokeGrantOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const RevokeGrantOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/ScheduleKeyDeletion.ts b/packages/sdk-kms-node/model/ScheduleKeyDeletion.ts new file mode 100644 index 0000000000000..030f2d007dcb5 --- /dev/null +++ b/packages/sdk-kms-node/model/ScheduleKeyDeletion.ts @@ -0,0 +1,41 @@ +import { ScheduleKeyDeletionInput } from "./ScheduleKeyDeletionInput"; +import { ScheduleKeyDeletionOutput } from "./ScheduleKeyDeletionOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const ScheduleKeyDeletion: _Operation_ = { + metadata: ServiceMetadata, + name: "ScheduleKeyDeletion", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: ScheduleKeyDeletionInput + }, + output: { + shape: ScheduleKeyDeletionOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/ScheduleKeyDeletionInput.ts b/packages/sdk-kms-node/model/ScheduleKeyDeletionInput.ts new file mode 100644 index 0000000000000..257b74af5dad3 --- /dev/null +++ b/packages/sdk-kms-node/model/ScheduleKeyDeletionInput.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ScheduleKeyDeletionInput: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + PendingWindowInDays: { + shape: { + type: "integer", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ScheduleKeyDeletionOutput.ts b/packages/sdk-kms-node/model/ScheduleKeyDeletionOutput.ts new file mode 100644 index 0000000000000..d37678e5d2057 --- /dev/null +++ b/packages/sdk-kms-node/model/ScheduleKeyDeletionOutput.ts @@ -0,0 +1,19 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const ScheduleKeyDeletionOutput: _Structure_ = { + type: "structure", + required: [], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + DeletionDate: { + shape: { + type: "timestamp" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/ServiceMetadata.ts b/packages/sdk-kms-node/model/ServiceMetadata.ts new file mode 100644 index 0000000000000..c1659732bb04c --- /dev/null +++ b/packages/sdk-kms-node/model/ServiceMetadata.ts @@ -0,0 +1,13 @@ +import { ServiceMetadata as _ServiceMetadata_ } from "@aws/types"; + +export const ServiceMetadata: _ServiceMetadata_ = { + apiVersion: "2014-11-01", + endpointPrefix: "kms", + jsonVersion: "1.1", + protocol: "json", + serviceAbbreviation: "KMS", + serviceFullName: "AWS Key Management Service", + signatureVersion: "v4", + targetPrefix: "TrentService", + uid: "kms-2014-11-01" +}; diff --git a/packages/sdk-kms-node/model/TagException.ts b/packages/sdk-kms-node/model/TagException.ts new file mode 100644 index 0000000000000..75e5d23c35256 --- /dev/null +++ b/packages/sdk-kms-node/model/TagException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const TagException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "TagException" +}; diff --git a/packages/sdk-kms-node/model/TagResource.ts b/packages/sdk-kms-node/model/TagResource.ts new file mode 100644 index 0000000000000..3a49f1ee7a8ef --- /dev/null +++ b/packages/sdk-kms-node/model/TagResource.ts @@ -0,0 +1,45 @@ +import { TagResourceInput } from "./TagResourceInput"; +import { TagResourceOutput } from "./TagResourceOutput"; +import { KMSInternalException } from "./KMSInternalException"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { LimitExceededException } from "./LimitExceededException"; +import { TagException } from "./TagException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const TagResource: _Operation_ = { + metadata: ServiceMetadata, + name: "TagResource", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: TagResourceInput + }, + output: { + shape: TagResourceOutput + }, + errors: [ + { + shape: KMSInternalException + }, + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: KMSInvalidStateException + }, + { + shape: LimitExceededException + }, + { + shape: TagException + } + ] +}; diff --git a/packages/sdk-kms-node/model/TagResourceInput.ts b/packages/sdk-kms-node/model/TagResourceInput.ts new file mode 100644 index 0000000000000..bd07b14624bb2 --- /dev/null +++ b/packages/sdk-kms-node/model/TagResourceInput.ts @@ -0,0 +1,18 @@ +import { _TagList } from "./_TagList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const TagResourceInput: _Structure_ = { + type: "structure", + required: ["KeyId", "Tags"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + Tags: { + shape: _TagList + } + } +}; diff --git a/packages/sdk-kms-node/model/TagResourceOutput.ts b/packages/sdk-kms-node/model/TagResourceOutput.ts new file mode 100644 index 0000000000000..33dc41823b40e --- /dev/null +++ b/packages/sdk-kms-node/model/TagResourceOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const TagResourceOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/UnsupportedOperationException.ts b/packages/sdk-kms-node/model/UnsupportedOperationException.ts new file mode 100644 index 0000000000000..d47462e4ade3b --- /dev/null +++ b/packages/sdk-kms-node/model/UnsupportedOperationException.ts @@ -0,0 +1,14 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const UnsupportedOperationException: _Structure_ = { + type: "structure", + required: [], + members: { + message: { + shape: { + type: "string" + } + } + }, + exceptionType: "UnsupportedOperationException" +}; diff --git a/packages/sdk-kms-node/model/UntagResource.ts b/packages/sdk-kms-node/model/UntagResource.ts new file mode 100644 index 0000000000000..3f216ee0787be --- /dev/null +++ b/packages/sdk-kms-node/model/UntagResource.ts @@ -0,0 +1,41 @@ +import { UntagResourceInput } from "./UntagResourceInput"; +import { UntagResourceOutput } from "./UntagResourceOutput"; +import { KMSInternalException } from "./KMSInternalException"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { TagException } from "./TagException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const UntagResource: _Operation_ = { + metadata: ServiceMetadata, + name: "UntagResource", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: UntagResourceInput + }, + output: { + shape: UntagResourceOutput + }, + errors: [ + { + shape: KMSInternalException + }, + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: KMSInvalidStateException + }, + { + shape: TagException + } + ] +}; diff --git a/packages/sdk-kms-node/model/UntagResourceInput.ts b/packages/sdk-kms-node/model/UntagResourceInput.ts new file mode 100644 index 0000000000000..8eeabb900c899 --- /dev/null +++ b/packages/sdk-kms-node/model/UntagResourceInput.ts @@ -0,0 +1,18 @@ +import { _TagKeyList } from "./_TagKeyList"; +import { Structure as _Structure_ } from "@aws/types"; + +export const UntagResourceInput: _Structure_ = { + type: "structure", + required: ["KeyId", "TagKeys"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + TagKeys: { + shape: _TagKeyList + } + } +}; diff --git a/packages/sdk-kms-node/model/UntagResourceOutput.ts b/packages/sdk-kms-node/model/UntagResourceOutput.ts new file mode 100644 index 0000000000000..417486136810f --- /dev/null +++ b/packages/sdk-kms-node/model/UntagResourceOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const UntagResourceOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/UpdateAlias.ts b/packages/sdk-kms-node/model/UpdateAlias.ts new file mode 100644 index 0000000000000..368c0143fb1a1 --- /dev/null +++ b/packages/sdk-kms-node/model/UpdateAlias.ts @@ -0,0 +1,37 @@ +import { UpdateAliasInput } from "./UpdateAliasInput"; +import { UpdateAliasOutput } from "./UpdateAliasOutput"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { NotFoundException } from "./NotFoundException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const UpdateAlias: _Operation_ = { + metadata: ServiceMetadata, + name: "UpdateAlias", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: UpdateAliasInput + }, + output: { + shape: UpdateAliasOutput + }, + errors: [ + { + shape: DependencyTimeoutException + }, + { + shape: NotFoundException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/UpdateAliasInput.ts b/packages/sdk-kms-node/model/UpdateAliasInput.ts new file mode 100644 index 0000000000000..103741f83df88 --- /dev/null +++ b/packages/sdk-kms-node/model/UpdateAliasInput.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const UpdateAliasInput: _Structure_ = { + type: "structure", + required: ["AliasName", "TargetKeyId"], + members: { + AliasName: { + shape: { + type: "string", + min: 1 + } + }, + TargetKeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/UpdateAliasOutput.ts b/packages/sdk-kms-node/model/UpdateAliasOutput.ts new file mode 100644 index 0000000000000..6b7f1b4fa44d1 --- /dev/null +++ b/packages/sdk-kms-node/model/UpdateAliasOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const UpdateAliasOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/UpdateKeyDescription.ts b/packages/sdk-kms-node/model/UpdateKeyDescription.ts new file mode 100644 index 0000000000000..0dbe6a9188eb8 --- /dev/null +++ b/packages/sdk-kms-node/model/UpdateKeyDescription.ts @@ -0,0 +1,41 @@ +import { UpdateKeyDescriptionInput } from "./UpdateKeyDescriptionInput"; +import { UpdateKeyDescriptionOutput } from "./UpdateKeyDescriptionOutput"; +import { NotFoundException } from "./NotFoundException"; +import { InvalidArnException } from "./InvalidArnException"; +import { DependencyTimeoutException } from "./DependencyTimeoutException"; +import { KMSInternalException } from "./KMSInternalException"; +import { KMSInvalidStateException } from "./KMSInvalidStateException"; +import { OperationModel as _Operation_ } from "@aws/types"; +import { ServiceMetadata } from "./ServiceMetadata"; + +export const UpdateKeyDescription: _Operation_ = { + metadata: ServiceMetadata, + name: "UpdateKeyDescription", + http: { + method: "POST", + requestUri: "/" + }, + input: { + shape: UpdateKeyDescriptionInput + }, + output: { + shape: UpdateKeyDescriptionOutput + }, + errors: [ + { + shape: NotFoundException + }, + { + shape: InvalidArnException + }, + { + shape: DependencyTimeoutException + }, + { + shape: KMSInternalException + }, + { + shape: KMSInvalidStateException + } + ] +}; diff --git a/packages/sdk-kms-node/model/UpdateKeyDescriptionInput.ts b/packages/sdk-kms-node/model/UpdateKeyDescriptionInput.ts new file mode 100644 index 0000000000000..ab42fdba6ad53 --- /dev/null +++ b/packages/sdk-kms-node/model/UpdateKeyDescriptionInput.ts @@ -0,0 +1,19 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const UpdateKeyDescriptionInput: _Structure_ = { + type: "structure", + required: ["KeyId", "Description"], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + Description: { + shape: { + type: "string" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/UpdateKeyDescriptionOutput.ts b/packages/sdk-kms-node/model/UpdateKeyDescriptionOutput.ts new file mode 100644 index 0000000000000..1052ea610c114 --- /dev/null +++ b/packages/sdk-kms-node/model/UpdateKeyDescriptionOutput.ts @@ -0,0 +1,7 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const UpdateKeyDescriptionOutput: _Structure_ = { + type: "structure", + required: [], + members: {} +}; diff --git a/packages/sdk-kms-node/model/_AliasList.ts b/packages/sdk-kms-node/model/_AliasList.ts new file mode 100644 index 0000000000000..73d144703f8b7 --- /dev/null +++ b/packages/sdk-kms-node/model/_AliasList.ts @@ -0,0 +1,9 @@ +import { List as _List_ } from "@aws/types"; +import { _AliasListEntry } from "./_AliasListEntry"; + +export const _AliasList: _List_ = { + type: "list", + member: { + shape: _AliasListEntry + } +}; diff --git a/packages/sdk-kms-node/model/_AliasListEntry.ts b/packages/sdk-kms-node/model/_AliasListEntry.ts new file mode 100644 index 0000000000000..dededb6733fa9 --- /dev/null +++ b/packages/sdk-kms-node/model/_AliasListEntry.ts @@ -0,0 +1,26 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const _AliasListEntry: _Structure_ = { + type: "structure", + required: [], + members: { + AliasName: { + shape: { + type: "string", + min: 1 + } + }, + AliasArn: { + shape: { + type: "string", + min: 20 + } + }, + TargetKeyId: { + shape: { + type: "string", + min: 1 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/_EncryptionContextType.ts b/packages/sdk-kms-node/model/_EncryptionContextType.ts new file mode 100644 index 0000000000000..feb73215c197e --- /dev/null +++ b/packages/sdk-kms-node/model/_EncryptionContextType.ts @@ -0,0 +1,15 @@ +import { Map as _Map_ } from "@aws/types"; + +export const _EncryptionContextType: _Map_ = { + type: "map", + key: { + shape: { + type: "string" + } + }, + value: { + shape: { + type: "string" + } + } +}; diff --git a/packages/sdk-kms-node/model/_GrantConstraints.ts b/packages/sdk-kms-node/model/_GrantConstraints.ts new file mode 100644 index 0000000000000..ef7b28cd7e0a0 --- /dev/null +++ b/packages/sdk-kms-node/model/_GrantConstraints.ts @@ -0,0 +1,15 @@ +import { _EncryptionContextType } from "./_EncryptionContextType"; +import { Structure as _Structure_ } from "@aws/types"; + +export const _GrantConstraints: _Structure_ = { + type: "structure", + required: [], + members: { + EncryptionContextSubset: { + shape: _EncryptionContextType + }, + EncryptionContextEquals: { + shape: _EncryptionContextType + } + } +}; diff --git a/packages/sdk-kms-node/model/_GrantList.ts b/packages/sdk-kms-node/model/_GrantList.ts new file mode 100644 index 0000000000000..19211c3cb3167 --- /dev/null +++ b/packages/sdk-kms-node/model/_GrantList.ts @@ -0,0 +1,9 @@ +import { List as _List_ } from "@aws/types"; +import { _GrantListEntry } from "./_GrantListEntry"; + +export const _GrantList: _List_ = { + type: "list", + member: { + shape: _GrantListEntry + } +}; diff --git a/packages/sdk-kms-node/model/_GrantListEntry.ts b/packages/sdk-kms-node/model/_GrantListEntry.ts new file mode 100644 index 0000000000000..bf2b26181daf9 --- /dev/null +++ b/packages/sdk-kms-node/model/_GrantListEntry.ts @@ -0,0 +1,57 @@ +import { _GrantOperationList } from "./_GrantOperationList"; +import { _GrantConstraints } from "./_GrantConstraints"; +import { Structure as _Structure_ } from "@aws/types"; + +export const _GrantListEntry: _Structure_ = { + type: "structure", + required: [], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + GrantId: { + shape: { + type: "string", + min: 1 + } + }, + Name: { + shape: { + type: "string", + min: 1 + } + }, + CreationDate: { + shape: { + type: "timestamp" + } + }, + GranteePrincipal: { + shape: { + type: "string", + min: 1 + } + }, + RetiringPrincipal: { + shape: { + type: "string", + min: 1 + } + }, + IssuingAccount: { + shape: { + type: "string", + min: 1 + } + }, + Operations: { + shape: _GrantOperationList + }, + Constraints: { + shape: _GrantConstraints + } + } +}; diff --git a/packages/sdk-kms-node/model/_GrantOperationList.ts b/packages/sdk-kms-node/model/_GrantOperationList.ts new file mode 100644 index 0000000000000..79b1bdabd4fb3 --- /dev/null +++ b/packages/sdk-kms-node/model/_GrantOperationList.ts @@ -0,0 +1,10 @@ +import { List as _List_ } from "@aws/types"; + +export const _GrantOperationList: _List_ = { + type: "list", + member: { + shape: { + type: "string" + } + } +}; diff --git a/packages/sdk-kms-node/model/_GrantTokenList.ts b/packages/sdk-kms-node/model/_GrantTokenList.ts new file mode 100644 index 0000000000000..00ff5ad4122e8 --- /dev/null +++ b/packages/sdk-kms-node/model/_GrantTokenList.ts @@ -0,0 +1,11 @@ +import { List as _List_ } from "@aws/types"; + +export const _GrantTokenList: _List_ = { + type: "list", + member: { + shape: { + type: "string", + min: 1 + } + } +}; diff --git a/packages/sdk-kms-node/model/_KeyList.ts b/packages/sdk-kms-node/model/_KeyList.ts new file mode 100644 index 0000000000000..6e8f9deefce45 --- /dev/null +++ b/packages/sdk-kms-node/model/_KeyList.ts @@ -0,0 +1,9 @@ +import { List as _List_ } from "@aws/types"; +import { _KeyListEntry } from "./_KeyListEntry"; + +export const _KeyList: _List_ = { + type: "list", + member: { + shape: _KeyListEntry + } +}; diff --git a/packages/sdk-kms-node/model/_KeyListEntry.ts b/packages/sdk-kms-node/model/_KeyListEntry.ts new file mode 100644 index 0000000000000..49f41b223dd68 --- /dev/null +++ b/packages/sdk-kms-node/model/_KeyListEntry.ts @@ -0,0 +1,20 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const _KeyListEntry: _Structure_ = { + type: "structure", + required: [], + members: { + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + KeyArn: { + shape: { + type: "string", + min: 20 + } + } + } +}; diff --git a/packages/sdk-kms-node/model/_KeyMetadata.ts b/packages/sdk-kms-node/model/_KeyMetadata.ts new file mode 100644 index 0000000000000..6c416e2c1731b --- /dev/null +++ b/packages/sdk-kms-node/model/_KeyMetadata.ts @@ -0,0 +1,75 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const _KeyMetadata: _Structure_ = { + type: "structure", + required: ["KeyId"], + members: { + AWSAccountId: { + shape: { + type: "string" + } + }, + KeyId: { + shape: { + type: "string", + min: 1 + } + }, + Arn: { + shape: { + type: "string", + min: 20 + } + }, + CreationDate: { + shape: { + type: "timestamp" + } + }, + Enabled: { + shape: { + type: "boolean" + } + }, + Description: { + shape: { + type: "string" + } + }, + KeyUsage: { + shape: { + type: "string" + } + }, + KeyState: { + shape: { + type: "string" + } + }, + DeletionDate: { + shape: { + type: "timestamp" + } + }, + ValidTo: { + shape: { + type: "timestamp" + } + }, + Origin: { + shape: { + type: "string" + } + }, + ExpirationModel: { + shape: { + type: "string" + } + }, + KeyManager: { + shape: { + type: "string" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/_PolicyNameList.ts b/packages/sdk-kms-node/model/_PolicyNameList.ts new file mode 100644 index 0000000000000..f21af6c1ef857 --- /dev/null +++ b/packages/sdk-kms-node/model/_PolicyNameList.ts @@ -0,0 +1,11 @@ +import { List as _List_ } from "@aws/types"; + +export const _PolicyNameList: _List_ = { + type: "list", + member: { + shape: { + type: "string", + min: 1 + } + } +}; diff --git a/packages/sdk-kms-node/model/_Tag.ts b/packages/sdk-kms-node/model/_Tag.ts new file mode 100644 index 0000000000000..f25f9dea050a3 --- /dev/null +++ b/packages/sdk-kms-node/model/_Tag.ts @@ -0,0 +1,19 @@ +import { Structure as _Structure_ } from "@aws/types"; + +export const _Tag: _Structure_ = { + type: "structure", + required: ["TagKey", "TagValue"], + members: { + TagKey: { + shape: { + type: "string", + min: 1 + } + }, + TagValue: { + shape: { + type: "string" + } + } + } +}; diff --git a/packages/sdk-kms-node/model/_TagKeyList.ts b/packages/sdk-kms-node/model/_TagKeyList.ts new file mode 100644 index 0000000000000..08d35007b1d29 --- /dev/null +++ b/packages/sdk-kms-node/model/_TagKeyList.ts @@ -0,0 +1,11 @@ +import { List as _List_ } from "@aws/types"; + +export const _TagKeyList: _List_ = { + type: "list", + member: { + shape: { + type: "string", + min: 1 + } + } +}; diff --git a/packages/sdk-kms-node/model/_TagList.ts b/packages/sdk-kms-node/model/_TagList.ts new file mode 100644 index 0000000000000..d3f6f7a6787b8 --- /dev/null +++ b/packages/sdk-kms-node/model/_TagList.ts @@ -0,0 +1,9 @@ +import { List as _List_ } from "@aws/types"; +import { _Tag } from "./_Tag"; + +export const _TagList: _List_ = { + type: "list", + member: { + shape: _Tag + } +}; diff --git a/packages/sdk-kms-node/package.json b/packages/sdk-kms-node/package.json new file mode 100644 index 0000000000000..27f93735de406 --- /dev/null +++ b/packages/sdk-kms-node/package.json @@ -0,0 +1,35 @@ +{ + "name": "@aws/sdk-kms-node", + "description": "Node SDK for AWS Key Management Service", + "version": "0.0.1", + "scripts": { + "prepublishOnly": "tsc", + "pretest": "tsc", + "test": "exit 0" + }, + "main": "./build/index.js", + "types": "./build/index.d.ts", + "author": "aws-sdk-js@amazon.com", + "license": "Apache-2.0", + "devDependencies": { + "typescript": "^2.3" + }, + "dependencies": { + "@aws/types": "^0.0.1", + "@aws/config-resolver": "^0.0.1", + "@aws/middleware-stack": "^0.0.1", + "@aws/region-provider": "^0.0.1", + "@aws/util-base64-node": "^0.0.1", + "@aws/util-utf8-node": "^0.0.1", + "@aws/stream-collector-node": "^0.0.1", + "@aws/protocol-json-rpc": "^0.0.1", + "@aws/json-builder": "^0.0.1", + "@aws/json-parser": "^0.0.1", + "@aws/node-http-handler": "^0.0.1", + "@aws/core-handler": "^0.0.1", + "@aws/credential-provider-node": "^0.0.1", + "@aws/crypto-sha256-node": "^0.0.1", + "@aws/signature-v4": "^0.0.1", + "@aws/signing-middleware": "^0.0.1" + } +} \ No newline at end of file diff --git a/packages/sdk-kms-node/tsconfig.json b/packages/sdk-kms-node/tsconfig.json new file mode 100644 index 0000000000000..9e1712ac50a21 --- /dev/null +++ b/packages/sdk-kms-node/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "declaration": true, + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ] + } +} \ No newline at end of file diff --git a/packages/sdk-kms-node/tsconfig.test.json b/packages/sdk-kms-node/tsconfig.test.json new file mode 100644 index 0000000000000..d6cc42f32515f --- /dev/null +++ b/packages/sdk-kms-node/tsconfig.test.json @@ -0,0 +1,3 @@ +{ + "extends": "./tsconfig.json" +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/AlreadyExistsException.ts b/packages/sdk-kms-node/types/AlreadyExistsException.ts new file mode 100644 index 0000000000000..6531c4e6e6e00 --- /dev/null +++ b/packages/sdk-kms-node/types/AlreadyExistsException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because it attempted to create a resource that already exists.

+ */ +export interface AlreadyExistsException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/CancelKeyDeletionInput.ts b/packages/sdk-kms-node/types/CancelKeyDeletionInput.ts new file mode 100644 index 0000000000000..dffc4cd9df616 --- /dev/null +++ b/packages/sdk-kms-node/types/CancelKeyDeletionInput.ts @@ -0,0 +1,9 @@ +/** + * CancelKeyDeletionInput shape + */ +export interface CancelKeyDeletionInput { + /** + *

The unique identifier for the customer master key (CMK) for which to cancel deletion.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; +} diff --git a/packages/sdk-kms-node/types/CancelKeyDeletionOutput.ts b/packages/sdk-kms-node/types/CancelKeyDeletionOutput.ts new file mode 100644 index 0000000000000..3b8f57ff10ecb --- /dev/null +++ b/packages/sdk-kms-node/types/CancelKeyDeletionOutput.ts @@ -0,0 +1,17 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * CancelKeyDeletionOutput shape + */ +export interface CancelKeyDeletionOutput { + /** + *

The unique identifier of the master key for which deletion is canceled.

+ */ + KeyId?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/CreateAliasInput.ts b/packages/sdk-kms-node/types/CreateAliasInput.ts new file mode 100644 index 0000000000000..60a1717982087 --- /dev/null +++ b/packages/sdk-kms-node/types/CreateAliasInput.ts @@ -0,0 +1,14 @@ +/** + * CreateAliasInput shape + */ +export interface CreateAliasInput { + /** + *

String that contains the display name. The name must start with the word "alias" followed by a forward slash (alias/). Aliases that begin with "alias/AWS" are reserved.

+ */ + AliasName: string; + + /** + *

Identifies the CMK for which you are creating the alias. This value cannot be an alias.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + TargetKeyId: string; +} diff --git a/packages/sdk-kms-node/types/CreateAliasOutput.ts b/packages/sdk-kms-node/types/CreateAliasOutput.ts new file mode 100644 index 0000000000000..57e28d2c893ef --- /dev/null +++ b/packages/sdk-kms-node/types/CreateAliasOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * CreateAliasOutput shape + */ +export interface CreateAliasOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/CreateGrantInput.ts b/packages/sdk-kms-node/types/CreateGrantInput.ts new file mode 100644 index 0000000000000..60e0031c7fea9 --- /dev/null +++ b/packages/sdk-kms-node/types/CreateGrantInput.ts @@ -0,0 +1,65 @@ +import { _GrantConstraints } from "./_GrantConstraints"; + +/** + * CreateGrantInput shape + */ +export interface CreateGrantInput { + /** + *

The unique identifier for the customer master key (CMK) that the grant applies to.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a different AWS account, you must use the key ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

The principal that is given permission to perform the operations that the grant permits.

To specify the principal, use the Amazon Resource Name (ARN) of an AWS principal. Valid AWS principals include AWS accounts (root), IAM users, IAM roles, federated users, and assumed role users. For examples of the ARN syntax to use for specifying a principal, see AWS Identity and Access Management (IAM) in the Example ARNs section of the AWS General Reference.

+ */ + GranteePrincipal: string; + + /** + *

The principal that is given permission to retire the grant by using RetireGrant operation.

To specify the principal, use the Amazon Resource Name (ARN) of an AWS principal. Valid AWS principals include AWS accounts (root), IAM users, federated users, and assumed role users. For examples of the ARN syntax to use for specifying a principal, see AWS Identity and Access Management (IAM) in the Example ARNs section of the AWS General Reference.

+ */ + RetiringPrincipal?: string; + + /** + *

A list of operations that the grant permits.

+ */ + Operations: + | Array< + | "Decrypt" + | "Encrypt" + | "GenerateDataKey" + | "GenerateDataKeyWithoutPlaintext" + | "ReEncryptFrom" + | "ReEncryptTo" + | "CreateGrant" + | "RetireGrant" + | "DescribeKey" + | string + > + | Iterable< + | "Decrypt" + | "Encrypt" + | "GenerateDataKey" + | "GenerateDataKeyWithoutPlaintext" + | "ReEncryptFrom" + | "ReEncryptTo" + | "CreateGrant" + | "RetireGrant" + | "DescribeKey" + | string + >; + + /** + *

A structure that you can use to allow certain operations in the grant only when the desired encryption context is present. For more information about encryption context, see Encryption Context in the AWS Key Management Service Developer Guide.

+ */ + Constraints?: _GrantConstraints; + + /** + *

A list of grant tokens.

For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.

+ */ + GrantTokens?: Array | Iterable; + + /** + *

A friendly name for identifying the grant. Use this value to prevent unintended creation of duplicate grants when retrying this request.

When this value is absent, all CreateGrant requests result in a new grant with a unique GrantId even if all the supplied parameters are identical. This can result in unintended duplicates when you retry the CreateGrant request.

When this value is present, you can retry a CreateGrant request with identical parameters; if the grant already exists, the original GrantId is returned without creating a new grant. Note that the returned grant token is unique with every CreateGrant request, even when a duplicate GrantId is returned. All grant tokens obtained in this way can be used interchangeably.

+ */ + Name?: string; +} diff --git a/packages/sdk-kms-node/types/CreateGrantOutput.ts b/packages/sdk-kms-node/types/CreateGrantOutput.ts new file mode 100644 index 0000000000000..84c15f813580f --- /dev/null +++ b/packages/sdk-kms-node/types/CreateGrantOutput.ts @@ -0,0 +1,22 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * CreateGrantOutput shape + */ +export interface CreateGrantOutput { + /** + *

The grant token.

For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.

+ */ + GrantToken?: string; + + /** + *

The unique identifier for the grant.

You can use the GrantId in a subsequent RetireGrant or RevokeGrant operation.

+ */ + GrantId?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/CreateKeyInput.ts b/packages/sdk-kms-node/types/CreateKeyInput.ts new file mode 100644 index 0000000000000..265e1969c14fa --- /dev/null +++ b/packages/sdk-kms-node/types/CreateKeyInput.ts @@ -0,0 +1,36 @@ +import { _Tag } from "./_Tag"; + +/** + * CreateKeyInput shape + */ +export interface CreateKeyInput { + /** + *

The key policy to attach to the CMK.

If you specify a policy and do not set BypassPolicyLockoutSafetyCheck to true, the policy must meet the following criteria:

  • It must allow the principal that is making the CreateKey request to make a subsequent PutKeyPolicy request on the CMK. This reduces the likelihood that the CMK becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide.

  • The principals that are specified in the key policy must exist and be visible to AWS KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before specifying the new principal in a key policy because the new principal might not immediately be visible to AWS KMS. For more information, see Changes that I make are not always immediately visible in the IAM User Guide.

If you do not specify a policy, AWS KMS attaches a default key policy to the CMK. For more information, see Default Key Policy in the AWS Key Management Service Developer Guide.

The policy size limit is 32 kilobytes (32768 bytes).

+ */ + Policy?: string; + + /** + *

A description of the CMK.

Use a description that helps you decide whether the CMK is appropriate for a task.

+ */ + Description?: string; + + /** + *

The intended use of the CMK.

You can use CMKs only for symmetric encryption and decryption.

+ */ + KeyUsage?: "ENCRYPT_DECRYPT" | string; + + /** + *

The source of the CMK's key material.

The default is AWS_KMS, which means AWS KMS creates the key material. When this parameter is set to EXTERNAL, the request creates a CMK without key material so that you can import key material from your existing key management infrastructure. For more information about importing key material into AWS KMS, see Importing Key Material in the AWS Key Management Service Developer Guide.

The CMK's Origin is immutable and is set when the CMK is created.

+ */ + Origin?: "AWS_KMS" | "EXTERNAL" | string; + + /** + *

A flag to indicate whether to bypass the key policy lockout safety check.

Setting this value to true increases the likelihood that the CMK becomes unmanageable. Do not set this value to true indiscriminately.

For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide.

Use this parameter only when you include a policy in the request and you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the CMK.

The default value is false.

+ */ + BypassPolicyLockoutSafetyCheck?: boolean; + + /** + *

One or more tags. Each tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.

Use this parameter to tag the CMK when it is created. Alternately, you can omit this parameter and instead tag the CMK after it is created using TagResource.

+ */ + Tags?: Array<_Tag> | Iterable<_Tag>; +} diff --git a/packages/sdk-kms-node/types/CreateKeyOutput.ts b/packages/sdk-kms-node/types/CreateKeyOutput.ts new file mode 100644 index 0000000000000..31d69606a8583 --- /dev/null +++ b/packages/sdk-kms-node/types/CreateKeyOutput.ts @@ -0,0 +1,18 @@ +import { _UnmarshalledKeyMetadata } from "./_KeyMetadata"; +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * CreateKeyOutput shape + */ +export interface CreateKeyOutput { + /** + *

Metadata associated with the CMK.

+ */ + KeyMetadata?: _UnmarshalledKeyMetadata; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/DecryptInput.ts b/packages/sdk-kms-node/types/DecryptInput.ts new file mode 100644 index 0000000000000..72676ae69aa11 --- /dev/null +++ b/packages/sdk-kms-node/types/DecryptInput.ts @@ -0,0 +1,19 @@ +/** + * DecryptInput shape + */ +export interface DecryptInput { + /** + *

Ciphertext to be decrypted. The blob includes metadata.

+ */ + CiphertextBlob: ArrayBuffer | ArrayBufferView | string; + + /** + *

The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.

+ */ + EncryptionContext?: { [key: string]: string } | Iterable<[string, string]>; + + /** + *

A list of grant tokens.

For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.

+ */ + GrantTokens?: Array | Iterable; +} diff --git a/packages/sdk-kms-node/types/DecryptOutput.ts b/packages/sdk-kms-node/types/DecryptOutput.ts new file mode 100644 index 0000000000000..c63f6949bd19e --- /dev/null +++ b/packages/sdk-kms-node/types/DecryptOutput.ts @@ -0,0 +1,22 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * DecryptOutput shape + */ +export interface DecryptOutput { + /** + *

ARN of the key used to perform the decryption. This value is returned if no errors are encountered during the operation.

+ */ + KeyId?: string; + + /** + *

Decrypted plaintext data. When you use the HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise, it is not encoded.

+ */ + Plaintext?: Uint8Array; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/DeleteAliasInput.ts b/packages/sdk-kms-node/types/DeleteAliasInput.ts new file mode 100644 index 0000000000000..5c1f250ef3fc8 --- /dev/null +++ b/packages/sdk-kms-node/types/DeleteAliasInput.ts @@ -0,0 +1,9 @@ +/** + * DeleteAliasInput shape + */ +export interface DeleteAliasInput { + /** + *

The alias to be deleted. The name must start with the word "alias" followed by a forward slash (alias/). Aliases that begin with "alias/aws" are reserved.

+ */ + AliasName: string; +} diff --git a/packages/sdk-kms-node/types/DeleteAliasOutput.ts b/packages/sdk-kms-node/types/DeleteAliasOutput.ts new file mode 100644 index 0000000000000..9d9f3238ff9f1 --- /dev/null +++ b/packages/sdk-kms-node/types/DeleteAliasOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * DeleteAliasOutput shape + */ +export interface DeleteAliasOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/DeleteImportedKeyMaterialInput.ts b/packages/sdk-kms-node/types/DeleteImportedKeyMaterialInput.ts new file mode 100644 index 0000000000000..1726ffb95014b --- /dev/null +++ b/packages/sdk-kms-node/types/DeleteImportedKeyMaterialInput.ts @@ -0,0 +1,9 @@ +/** + * DeleteImportedKeyMaterialInput shape + */ +export interface DeleteImportedKeyMaterialInput { + /** + *

The identifier of the CMK whose key material to delete. The CMK's Origin must be EXTERNAL.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; +} diff --git a/packages/sdk-kms-node/types/DeleteImportedKeyMaterialOutput.ts b/packages/sdk-kms-node/types/DeleteImportedKeyMaterialOutput.ts new file mode 100644 index 0000000000000..2d798d159529c --- /dev/null +++ b/packages/sdk-kms-node/types/DeleteImportedKeyMaterialOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * DeleteImportedKeyMaterialOutput shape + */ +export interface DeleteImportedKeyMaterialOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/DependencyTimeoutException.ts b/packages/sdk-kms-node/types/DependencyTimeoutException.ts new file mode 100644 index 0000000000000..832737edb394a --- /dev/null +++ b/packages/sdk-kms-node/types/DependencyTimeoutException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The system timed out while trying to fulfill the request. The request can be retried.

+ */ +export interface DependencyTimeoutException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/DescribeKeyInput.ts b/packages/sdk-kms-node/types/DescribeKeyInput.ts new file mode 100644 index 0000000000000..e94cb92ab4599 --- /dev/null +++ b/packages/sdk-kms-node/types/DescribeKeyInput.ts @@ -0,0 +1,14 @@ +/** + * DescribeKeyInput shape + */ +export interface DescribeKeyInput { + /** + *

A unique identifier for the customer master key (CMK).

To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a CMK in a different AWS account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

+ */ + KeyId: string; + + /** + *

A list of grant tokens.

For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.

+ */ + GrantTokens?: Array | Iterable; +} diff --git a/packages/sdk-kms-node/types/DescribeKeyOutput.ts b/packages/sdk-kms-node/types/DescribeKeyOutput.ts new file mode 100644 index 0000000000000..2cfcb9a61c828 --- /dev/null +++ b/packages/sdk-kms-node/types/DescribeKeyOutput.ts @@ -0,0 +1,18 @@ +import { _UnmarshalledKeyMetadata } from "./_KeyMetadata"; +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * DescribeKeyOutput shape + */ +export interface DescribeKeyOutput { + /** + *

Metadata associated with the key.

+ */ + KeyMetadata?: _UnmarshalledKeyMetadata; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/DisableKeyInput.ts b/packages/sdk-kms-node/types/DisableKeyInput.ts new file mode 100644 index 0000000000000..10d61177cde5f --- /dev/null +++ b/packages/sdk-kms-node/types/DisableKeyInput.ts @@ -0,0 +1,9 @@ +/** + * DisableKeyInput shape + */ +export interface DisableKeyInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; +} diff --git a/packages/sdk-kms-node/types/DisableKeyOutput.ts b/packages/sdk-kms-node/types/DisableKeyOutput.ts new file mode 100644 index 0000000000000..a81cbb35dbf0f --- /dev/null +++ b/packages/sdk-kms-node/types/DisableKeyOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * DisableKeyOutput shape + */ +export interface DisableKeyOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/DisableKeyRotationInput.ts b/packages/sdk-kms-node/types/DisableKeyRotationInput.ts new file mode 100644 index 0000000000000..4cfde03a96d81 --- /dev/null +++ b/packages/sdk-kms-node/types/DisableKeyRotationInput.ts @@ -0,0 +1,9 @@ +/** + * DisableKeyRotationInput shape + */ +export interface DisableKeyRotationInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; +} diff --git a/packages/sdk-kms-node/types/DisableKeyRotationOutput.ts b/packages/sdk-kms-node/types/DisableKeyRotationOutput.ts new file mode 100644 index 0000000000000..c3bb2c6c2fe42 --- /dev/null +++ b/packages/sdk-kms-node/types/DisableKeyRotationOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * DisableKeyRotationOutput shape + */ +export interface DisableKeyRotationOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/DisabledException.ts b/packages/sdk-kms-node/types/DisabledException.ts new file mode 100644 index 0000000000000..7d08aced8698a --- /dev/null +++ b/packages/sdk-kms-node/types/DisabledException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the specified CMK is not enabled.

+ */ +export interface DisabledException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/EnableKeyInput.ts b/packages/sdk-kms-node/types/EnableKeyInput.ts new file mode 100644 index 0000000000000..f825a01cd7601 --- /dev/null +++ b/packages/sdk-kms-node/types/EnableKeyInput.ts @@ -0,0 +1,9 @@ +/** + * EnableKeyInput shape + */ +export interface EnableKeyInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; +} diff --git a/packages/sdk-kms-node/types/EnableKeyOutput.ts b/packages/sdk-kms-node/types/EnableKeyOutput.ts new file mode 100644 index 0000000000000..5639730ba8aee --- /dev/null +++ b/packages/sdk-kms-node/types/EnableKeyOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * EnableKeyOutput shape + */ +export interface EnableKeyOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/EnableKeyRotationInput.ts b/packages/sdk-kms-node/types/EnableKeyRotationInput.ts new file mode 100644 index 0000000000000..f5a8a2f23a7c9 --- /dev/null +++ b/packages/sdk-kms-node/types/EnableKeyRotationInput.ts @@ -0,0 +1,9 @@ +/** + * EnableKeyRotationInput shape + */ +export interface EnableKeyRotationInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; +} diff --git a/packages/sdk-kms-node/types/EnableKeyRotationOutput.ts b/packages/sdk-kms-node/types/EnableKeyRotationOutput.ts new file mode 100644 index 0000000000000..21b31e9ade1c0 --- /dev/null +++ b/packages/sdk-kms-node/types/EnableKeyRotationOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * EnableKeyRotationOutput shape + */ +export interface EnableKeyRotationOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/EncryptInput.ts b/packages/sdk-kms-node/types/EncryptInput.ts new file mode 100644 index 0000000000000..37d46a0a0eb38 --- /dev/null +++ b/packages/sdk-kms-node/types/EncryptInput.ts @@ -0,0 +1,24 @@ +/** + * EncryptInput shape + */ +export interface EncryptInput { + /** + *

A unique identifier for the customer master key (CMK).

To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a CMK in a different AWS account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

+ */ + KeyId: string; + + /** + *

Data to be encrypted.

+ */ + Plaintext: ArrayBuffer | ArrayBufferView | string; + + /** + *

Name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the Decrypt API or decryption will fail. For more information, see Encryption Context.

+ */ + EncryptionContext?: { [key: string]: string } | Iterable<[string, string]>; + + /** + *

A list of grant tokens.

For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.

+ */ + GrantTokens?: Array | Iterable; +} diff --git a/packages/sdk-kms-node/types/EncryptOutput.ts b/packages/sdk-kms-node/types/EncryptOutput.ts new file mode 100644 index 0000000000000..50b48323356d0 --- /dev/null +++ b/packages/sdk-kms-node/types/EncryptOutput.ts @@ -0,0 +1,22 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * EncryptOutput shape + */ +export interface EncryptOutput { + /** + *

The encrypted plaintext. When you use the HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise, it is not encoded.

+ */ + CiphertextBlob?: Uint8Array; + + /** + *

The ID of the key used during encryption.

+ */ + KeyId?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ExpiredImportTokenException.ts b/packages/sdk-kms-node/types/ExpiredImportTokenException.ts new file mode 100644 index 0000000000000..b82fd61eb2237 --- /dev/null +++ b/packages/sdk-kms-node/types/ExpiredImportTokenException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the provided import token is expired. Use GetParametersForImport to get a new import token and public key, use the new public key to encrypt the key material, and then try the request again.

+ */ +export interface ExpiredImportTokenException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/GenerateDataKeyInput.ts b/packages/sdk-kms-node/types/GenerateDataKeyInput.ts new file mode 100644 index 0000000000000..8d20305613521 --- /dev/null +++ b/packages/sdk-kms-node/types/GenerateDataKeyInput.ts @@ -0,0 +1,29 @@ +/** + * GenerateDataKeyInput shape + */ +export interface GenerateDataKeyInput { + /** + *

The identifier of the CMK under which to generate and encrypt the data encryption key.

To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a CMK in a different AWS account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

+ */ + KeyId: string; + + /** + *

A set of key-value pairs that represents additional authenticated data.

For more information, see Encryption Context in the AWS Key Management Service Developer Guide.

+ */ + EncryptionContext?: { [key: string]: string } | Iterable<[string, string]>; + + /** + *

The length of the data encryption key in bytes. For example, use the value 64 to generate a 512-bit data key (64 bytes is 512 bits). For common key lengths (128-bit and 256-bit symmetric keys), we recommend that you use the KeySpec field instead of this one.

+ */ + NumberOfBytes?: number; + + /** + *

The length of the data encryption key. Use AES_128 to generate a 128-bit symmetric key, or AES_256 to generate a 256-bit symmetric key.

+ */ + KeySpec?: "AES_256" | "AES_128" | string; + + /** + *

A list of grant tokens.

For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.

+ */ + GrantTokens?: Array | Iterable; +} diff --git a/packages/sdk-kms-node/types/GenerateDataKeyOutput.ts b/packages/sdk-kms-node/types/GenerateDataKeyOutput.ts new file mode 100644 index 0000000000000..4b72f64760c78 --- /dev/null +++ b/packages/sdk-kms-node/types/GenerateDataKeyOutput.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * GenerateDataKeyOutput shape + */ +export interface GenerateDataKeyOutput { + /** + *

The encrypted data encryption key. When you use the HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise, it is not encoded.

+ */ + CiphertextBlob?: Uint8Array; + + /** + *

The data encryption key. When you use the HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise, it is not encoded. Use this data key for local encryption and decryption, then remove it from memory as soon as possible.

+ */ + Plaintext?: Uint8Array; + + /** + *

The identifier of the CMK under which the data encryption key was generated and encrypted.

+ */ + KeyId?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextInput.ts b/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextInput.ts new file mode 100644 index 0000000000000..f574dc215af66 --- /dev/null +++ b/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextInput.ts @@ -0,0 +1,29 @@ +/** + * GenerateDataKeyWithoutPlaintextInput shape + */ +export interface GenerateDataKeyWithoutPlaintextInput { + /** + *

The identifier of the customer master key (CMK) under which to generate and encrypt the data encryption key.

To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a CMK in a different AWS account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

+ */ + KeyId: string; + + /** + *

A set of key-value pairs that represents additional authenticated data.

For more information, see Encryption Context in the AWS Key Management Service Developer Guide.

+ */ + EncryptionContext?: { [key: string]: string } | Iterable<[string, string]>; + + /** + *

The length of the data encryption key. Use AES_128 to generate a 128-bit symmetric key, or AES_256 to generate a 256-bit symmetric key.

+ */ + KeySpec?: "AES_256" | "AES_128" | string; + + /** + *

The length of the data encryption key in bytes. For example, use the value 64 to generate a 512-bit data key (64 bytes is 512 bits). For common key lengths (128-bit and 256-bit symmetric keys), we recommend that you use the KeySpec field instead of this one.

+ */ + NumberOfBytes?: number; + + /** + *

A list of grant tokens.

For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.

+ */ + GrantTokens?: Array | Iterable; +} diff --git a/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextOutput.ts b/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextOutput.ts new file mode 100644 index 0000000000000..b40ed7056e071 --- /dev/null +++ b/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextOutput.ts @@ -0,0 +1,22 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * GenerateDataKeyWithoutPlaintextOutput shape + */ +export interface GenerateDataKeyWithoutPlaintextOutput { + /** + *

The encrypted data encryption key. When you use the HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise, it is not encoded.

+ */ + CiphertextBlob?: Uint8Array; + + /** + *

The identifier of the CMK under which the data encryption key was generated and encrypted.

+ */ + KeyId?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/GenerateRandomInput.ts b/packages/sdk-kms-node/types/GenerateRandomInput.ts new file mode 100644 index 0000000000000..2645237b400c6 --- /dev/null +++ b/packages/sdk-kms-node/types/GenerateRandomInput.ts @@ -0,0 +1,9 @@ +/** + * GenerateRandomInput shape + */ +export interface GenerateRandomInput { + /** + *

The length of the byte string.

+ */ + NumberOfBytes?: number; +} diff --git a/packages/sdk-kms-node/types/GenerateRandomOutput.ts b/packages/sdk-kms-node/types/GenerateRandomOutput.ts new file mode 100644 index 0000000000000..8be3e3e4f977c --- /dev/null +++ b/packages/sdk-kms-node/types/GenerateRandomOutput.ts @@ -0,0 +1,17 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * GenerateRandomOutput shape + */ +export interface GenerateRandomOutput { + /** + *

The random byte string. When you use the HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise, it is not encoded.

+ */ + Plaintext?: Uint8Array; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/GetKeyPolicyInput.ts b/packages/sdk-kms-node/types/GetKeyPolicyInput.ts new file mode 100644 index 0000000000000..2a261b96539f0 --- /dev/null +++ b/packages/sdk-kms-node/types/GetKeyPolicyInput.ts @@ -0,0 +1,14 @@ +/** + * GetKeyPolicyInput shape + */ +export interface GetKeyPolicyInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

Specifies the name of the policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

+ */ + PolicyName: string; +} diff --git a/packages/sdk-kms-node/types/GetKeyPolicyOutput.ts b/packages/sdk-kms-node/types/GetKeyPolicyOutput.ts new file mode 100644 index 0000000000000..be42580b87f20 --- /dev/null +++ b/packages/sdk-kms-node/types/GetKeyPolicyOutput.ts @@ -0,0 +1,17 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * GetKeyPolicyOutput shape + */ +export interface GetKeyPolicyOutput { + /** + *

A policy document in JSON format.

+ */ + Policy?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/GetKeyRotationStatusInput.ts b/packages/sdk-kms-node/types/GetKeyRotationStatusInput.ts new file mode 100644 index 0000000000000..8c75fd625ab7e --- /dev/null +++ b/packages/sdk-kms-node/types/GetKeyRotationStatusInput.ts @@ -0,0 +1,9 @@ +/** + * GetKeyRotationStatusInput shape + */ +export interface GetKeyRotationStatusInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a different AWS account, you must use the key ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; +} diff --git a/packages/sdk-kms-node/types/GetKeyRotationStatusOutput.ts b/packages/sdk-kms-node/types/GetKeyRotationStatusOutput.ts new file mode 100644 index 0000000000000..8fa5c7d35dab4 --- /dev/null +++ b/packages/sdk-kms-node/types/GetKeyRotationStatusOutput.ts @@ -0,0 +1,17 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * GetKeyRotationStatusOutput shape + */ +export interface GetKeyRotationStatusOutput { + /** + *

A Boolean value that specifies whether key rotation is enabled.

+ */ + KeyRotationEnabled?: boolean; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/GetParametersForImportInput.ts b/packages/sdk-kms-node/types/GetParametersForImportInput.ts new file mode 100644 index 0000000000000..c9844899bc4f8 --- /dev/null +++ b/packages/sdk-kms-node/types/GetParametersForImportInput.ts @@ -0,0 +1,23 @@ +/** + * GetParametersForImportInput shape + */ +export interface GetParametersForImportInput { + /** + *

The identifier of the CMK into which you will import key material. The CMK's Origin must be EXTERNAL.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

The algorithm you will use to encrypt the key material before importing it with ImportKeyMaterial. For more information, see Encrypt the Key Material in the AWS Key Management Service Developer Guide.

+ */ + WrappingAlgorithm: + | "RSAES_PKCS1_V1_5" + | "RSAES_OAEP_SHA_1" + | "RSAES_OAEP_SHA_256" + | string; + + /** + *

The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.

+ */ + WrappingKeySpec: "RSA_2048" | string; +} diff --git a/packages/sdk-kms-node/types/GetParametersForImportOutput.ts b/packages/sdk-kms-node/types/GetParametersForImportOutput.ts new file mode 100644 index 0000000000000..135898c7f8d8a --- /dev/null +++ b/packages/sdk-kms-node/types/GetParametersForImportOutput.ts @@ -0,0 +1,32 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * GetParametersForImportOutput shape + */ +export interface GetParametersForImportOutput { + /** + *

The identifier of the CMK to use in a subsequent ImportKeyMaterial request. This is the same CMK specified in the GetParametersForImport request.

+ */ + KeyId?: string; + + /** + *

The import token to send in a subsequent ImportKeyMaterial request.

+ */ + ImportToken?: Uint8Array; + + /** + *

The public key to use to encrypt the key material before importing it with ImportKeyMaterial.

+ */ + PublicKey?: Uint8Array; + + /** + *

The time at which the import token and public key are no longer valid. After this time, you cannot use them to make an ImportKeyMaterial request and you must send another GetParametersForImport request to get new ones.

+ */ + ParametersValidTo?: Date; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ImportKeyMaterialInput.ts b/packages/sdk-kms-node/types/ImportKeyMaterialInput.ts new file mode 100644 index 0000000000000..39b7521a0acc4 --- /dev/null +++ b/packages/sdk-kms-node/types/ImportKeyMaterialInput.ts @@ -0,0 +1,32 @@ +/** + * ImportKeyMaterialInput shape + */ +export interface ImportKeyMaterialInput { + /** + *

The identifier of the CMK to import the key material into. The CMK's Origin must be EXTERNAL.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

The import token that you received in the response to a previous GetParametersForImport request. It must be from the same response that contained the public key that you used to encrypt the key material.

+ */ + ImportToken: ArrayBuffer | ArrayBufferView | string; + + /** + *

The encrypted key material to import. It must be encrypted with the public key that you received in the response to a previous GetParametersForImport request, using the wrapping algorithm that you specified in that request.

+ */ + EncryptedKeyMaterial: ArrayBuffer | ArrayBufferView | string; + + /** + *

The time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the CMK becomes unusable. You must omit this parameter when the ExpirationModel parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE. Otherwise it is required.

+ */ + ValidTo?: Date | string | number; + + /** + *

Specifies whether the key material expires. The default is KEY_MATERIAL_EXPIRES, in which case you must include the ValidTo parameter. When this parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE, you must omit the ValidTo parameter.

+ */ + ExpirationModel?: + | "KEY_MATERIAL_EXPIRES" + | "KEY_MATERIAL_DOES_NOT_EXPIRE" + | string; +} diff --git a/packages/sdk-kms-node/types/ImportKeyMaterialOutput.ts b/packages/sdk-kms-node/types/ImportKeyMaterialOutput.ts new file mode 100644 index 0000000000000..2abdcd3d3d14b --- /dev/null +++ b/packages/sdk-kms-node/types/ImportKeyMaterialOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * ImportKeyMaterialOutput shape + */ +export interface ImportKeyMaterialOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/IncorrectKeyMaterialException.ts b/packages/sdk-kms-node/types/IncorrectKeyMaterialException.ts new file mode 100644 index 0000000000000..3a42125baadda --- /dev/null +++ b/packages/sdk-kms-node/types/IncorrectKeyMaterialException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the provided key material is invalid or is not the same key material that was previously imported into this customer master key (CMK).

+ */ +export interface IncorrectKeyMaterialException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/InputTypesUnion.ts b/packages/sdk-kms-node/types/InputTypesUnion.ts new file mode 100644 index 0000000000000..8905ee6b956f5 --- /dev/null +++ b/packages/sdk-kms-node/types/InputTypesUnion.ts @@ -0,0 +1,72 @@ +import { CancelKeyDeletionInput } from "./CancelKeyDeletionInput"; +import { CreateAliasInput } from "./CreateAliasInput"; +import { CreateGrantInput } from "./CreateGrantInput"; +import { CreateKeyInput } from "./CreateKeyInput"; +import { DecryptInput } from "./DecryptInput"; +import { DeleteAliasInput } from "./DeleteAliasInput"; +import { DeleteImportedKeyMaterialInput } from "./DeleteImportedKeyMaterialInput"; +import { DescribeKeyInput } from "./DescribeKeyInput"; +import { DisableKeyInput } from "./DisableKeyInput"; +import { DisableKeyRotationInput } from "./DisableKeyRotationInput"; +import { EnableKeyInput } from "./EnableKeyInput"; +import { EnableKeyRotationInput } from "./EnableKeyRotationInput"; +import { EncryptInput } from "./EncryptInput"; +import { GenerateDataKeyInput } from "./GenerateDataKeyInput"; +import { GenerateDataKeyWithoutPlaintextInput } from "./GenerateDataKeyWithoutPlaintextInput"; +import { GenerateRandomInput } from "./GenerateRandomInput"; +import { GetKeyPolicyInput } from "./GetKeyPolicyInput"; +import { GetKeyRotationStatusInput } from "./GetKeyRotationStatusInput"; +import { GetParametersForImportInput } from "./GetParametersForImportInput"; +import { ImportKeyMaterialInput } from "./ImportKeyMaterialInput"; +import { ListAliasesInput } from "./ListAliasesInput"; +import { ListGrantsInput } from "./ListGrantsInput"; +import { ListKeyPoliciesInput } from "./ListKeyPoliciesInput"; +import { ListKeysInput } from "./ListKeysInput"; +import { ListResourceTagsInput } from "./ListResourceTagsInput"; +import { ListRetirableGrantsInput } from "./ListRetirableGrantsInput"; +import { PutKeyPolicyInput } from "./PutKeyPolicyInput"; +import { ReEncryptInput } from "./ReEncryptInput"; +import { RetireGrantInput } from "./RetireGrantInput"; +import { RevokeGrantInput } from "./RevokeGrantInput"; +import { ScheduleKeyDeletionInput } from "./ScheduleKeyDeletionInput"; +import { TagResourceInput } from "./TagResourceInput"; +import { UntagResourceInput } from "./UntagResourceInput"; +import { UpdateAliasInput } from "./UpdateAliasInput"; +import { UpdateKeyDescriptionInput } from "./UpdateKeyDescriptionInput"; + +export type InputTypesUnion = + | CancelKeyDeletionInput + | CreateAliasInput + | CreateGrantInput + | CreateKeyInput + | DecryptInput + | DeleteAliasInput + | DeleteImportedKeyMaterialInput + | DescribeKeyInput + | DisableKeyInput + | DisableKeyRotationInput + | EnableKeyInput + | EnableKeyRotationInput + | EncryptInput + | GenerateDataKeyInput + | GenerateDataKeyWithoutPlaintextInput + | GenerateRandomInput + | GetKeyPolicyInput + | GetKeyRotationStatusInput + | GetParametersForImportInput + | ImportKeyMaterialInput + | ListAliasesInput + | ListGrantsInput + | ListKeyPoliciesInput + | ListKeysInput + | ListResourceTagsInput + | ListRetirableGrantsInput + | PutKeyPolicyInput + | ReEncryptInput + | RetireGrantInput + | RevokeGrantInput + | ScheduleKeyDeletionInput + | TagResourceInput + | UntagResourceInput + | UpdateAliasInput + | UpdateKeyDescriptionInput; diff --git a/packages/sdk-kms-node/types/InvalidAliasNameException.ts b/packages/sdk-kms-node/types/InvalidAliasNameException.ts new file mode 100644 index 0000000000000..229f6b21a037a --- /dev/null +++ b/packages/sdk-kms-node/types/InvalidAliasNameException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the specified alias name is not valid.

+ */ +export interface InvalidAliasNameException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/InvalidArnException.ts b/packages/sdk-kms-node/types/InvalidArnException.ts new file mode 100644 index 0000000000000..0fcf80b162bb0 --- /dev/null +++ b/packages/sdk-kms-node/types/InvalidArnException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because a specified ARN was not valid.

+ */ +export interface InvalidArnException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/InvalidCiphertextException.ts b/packages/sdk-kms-node/types/InvalidCiphertextException.ts new file mode 100644 index 0000000000000..bc21685df0f74 --- /dev/null +++ b/packages/sdk-kms-node/types/InvalidCiphertextException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the specified ciphertext, or additional authenticated data incorporated into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise invalid.

+ */ +export interface InvalidCiphertextException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/InvalidGrantIdException.ts b/packages/sdk-kms-node/types/InvalidGrantIdException.ts new file mode 100644 index 0000000000000..16c81dbf23cf6 --- /dev/null +++ b/packages/sdk-kms-node/types/InvalidGrantIdException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the specified GrantId is not valid.

+ */ +export interface InvalidGrantIdException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/InvalidGrantTokenException.ts b/packages/sdk-kms-node/types/InvalidGrantTokenException.ts new file mode 100644 index 0000000000000..0ee02e144ea68 --- /dev/null +++ b/packages/sdk-kms-node/types/InvalidGrantTokenException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the specified grant token is not valid.

+ */ +export interface InvalidGrantTokenException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/InvalidImportTokenException.ts b/packages/sdk-kms-node/types/InvalidImportTokenException.ts new file mode 100644 index 0000000000000..c710389b75635 --- /dev/null +++ b/packages/sdk-kms-node/types/InvalidImportTokenException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the provided import token is invalid or is associated with a different customer master key (CMK).

+ */ +export interface InvalidImportTokenException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/InvalidKeyUsageException.ts b/packages/sdk-kms-node/types/InvalidKeyUsageException.ts new file mode 100644 index 0000000000000..9017586a1197c --- /dev/null +++ b/packages/sdk-kms-node/types/InvalidKeyUsageException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the specified KeySpec value is not valid.

+ */ +export interface InvalidKeyUsageException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/InvalidMarkerException.ts b/packages/sdk-kms-node/types/InvalidMarkerException.ts new file mode 100644 index 0000000000000..87128bad25f93 --- /dev/null +++ b/packages/sdk-kms-node/types/InvalidMarkerException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the marker that specifies where pagination should next begin is not valid.

+ */ +export interface InvalidMarkerException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/KMSInternalException.ts b/packages/sdk-kms-node/types/KMSInternalException.ts new file mode 100644 index 0000000000000..00fbce61c9b98 --- /dev/null +++ b/packages/sdk-kms-node/types/KMSInternalException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because an internal exception occurred. The request can be retried.

+ */ +export interface KMSInternalException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/KMSInvalidStateException.ts b/packages/sdk-kms-node/types/KMSInvalidStateException.ts new file mode 100644 index 0000000000000..a228176ce447e --- /dev/null +++ b/packages/sdk-kms-node/types/KMSInvalidStateException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ */ +export interface KMSInvalidStateException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/KeyUnavailableException.ts b/packages/sdk-kms-node/types/KeyUnavailableException.ts new file mode 100644 index 0000000000000..e0c185c9afa27 --- /dev/null +++ b/packages/sdk-kms-node/types/KeyUnavailableException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the specified CMK was not available. The request can be retried.

+ */ +export interface KeyUnavailableException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/LimitExceededException.ts b/packages/sdk-kms-node/types/LimitExceededException.ts new file mode 100644 index 0000000000000..7e334651d7a94 --- /dev/null +++ b/packages/sdk-kms-node/types/LimitExceededException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because a limit was exceeded. For more information, see Limits in the AWS Key Management Service Developer Guide.

+ */ +export interface LimitExceededException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ListAliasesInput.ts b/packages/sdk-kms-node/types/ListAliasesInput.ts new file mode 100644 index 0000000000000..387da84bc0c54 --- /dev/null +++ b/packages/sdk-kms-node/types/ListAliasesInput.ts @@ -0,0 +1,14 @@ +/** + * ListAliasesInput shape + */ +export interface ListAliasesInput { + /** + *

Use this parameter to specify the maximum number of items to return. When this value is present, AWS KMS does not return more than the specified number of items, but it might return fewer.

This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.

+ */ + Limit?: number; + + /** + *

Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

+ */ + Marker?: string; +} diff --git a/packages/sdk-kms-node/types/ListAliasesOutput.ts b/packages/sdk-kms-node/types/ListAliasesOutput.ts new file mode 100644 index 0000000000000..568334fea044f --- /dev/null +++ b/packages/sdk-kms-node/types/ListAliasesOutput.ts @@ -0,0 +1,28 @@ +import { _UnmarshalledAliasListEntry } from "./_AliasListEntry"; +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * ListAliasesOutput shape + */ +export interface ListAliasesOutput { + /** + *

A list of aliases.

+ */ + Aliases?: Array<_UnmarshalledAliasListEntry>; + + /** + *

When Truncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent request.

+ */ + NextMarker?: string; + + /** + *

A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in this response to the Marker parameter in a subsequent request.

+ */ + Truncated?: boolean; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ListGrantsInput.ts b/packages/sdk-kms-node/types/ListGrantsInput.ts new file mode 100644 index 0000000000000..95042a6a79e08 --- /dev/null +++ b/packages/sdk-kms-node/types/ListGrantsInput.ts @@ -0,0 +1,19 @@ +/** + * ListGrantsInput shape + */ +export interface ListGrantsInput { + /** + *

Use this parameter to specify the maximum number of items to return. When this value is present, AWS KMS does not return more than the specified number of items, but it might return fewer.

This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.

+ */ + Limit?: number; + + /** + *

Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

+ */ + Marker?: string; + + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a different AWS account, you must use the key ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; +} diff --git a/packages/sdk-kms-node/types/ListGrantsOutput.ts b/packages/sdk-kms-node/types/ListGrantsOutput.ts new file mode 100644 index 0000000000000..711bbdb6981f5 --- /dev/null +++ b/packages/sdk-kms-node/types/ListGrantsOutput.ts @@ -0,0 +1,28 @@ +import { _UnmarshalledGrantListEntry } from "./_GrantListEntry"; +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * ListGrantsOutput shape + */ +export interface ListGrantsOutput { + /** + *

A list of grants.

+ */ + Grants?: Array<_UnmarshalledGrantListEntry>; + + /** + *

When Truncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent request.

+ */ + NextMarker?: string; + + /** + *

A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in this response to the Marker parameter in a subsequent request.

+ */ + Truncated?: boolean; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ListKeyPoliciesInput.ts b/packages/sdk-kms-node/types/ListKeyPoliciesInput.ts new file mode 100644 index 0000000000000..c40b3fd3c699d --- /dev/null +++ b/packages/sdk-kms-node/types/ListKeyPoliciesInput.ts @@ -0,0 +1,19 @@ +/** + * ListKeyPoliciesInput shape + */ +export interface ListKeyPoliciesInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

Use this parameter to specify the maximum number of items to return. When this value is present, AWS KMS does not return more than the specified number of items, but it might return fewer.

This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.

Currently only 1 policy can be attached to a key.

+ */ + Limit?: number; + + /** + *

Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

+ */ + Marker?: string; +} diff --git a/packages/sdk-kms-node/types/ListKeyPoliciesOutput.ts b/packages/sdk-kms-node/types/ListKeyPoliciesOutput.ts new file mode 100644 index 0000000000000..776626c481964 --- /dev/null +++ b/packages/sdk-kms-node/types/ListKeyPoliciesOutput.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * ListKeyPoliciesOutput shape + */ +export interface ListKeyPoliciesOutput { + /** + *

A list of policy names. Currently, there is only one policy and it is named "Default".

+ */ + PolicyNames?: Array; + + /** + *

When Truncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent request.

+ */ + NextMarker?: string; + + /** + *

A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in this response to the Marker parameter in a subsequent request.

+ */ + Truncated?: boolean; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ListKeysInput.ts b/packages/sdk-kms-node/types/ListKeysInput.ts new file mode 100644 index 0000000000000..3171ae702791a --- /dev/null +++ b/packages/sdk-kms-node/types/ListKeysInput.ts @@ -0,0 +1,14 @@ +/** + * ListKeysInput shape + */ +export interface ListKeysInput { + /** + *

Use this parameter to specify the maximum number of items to return. When this value is present, AWS KMS does not return more than the specified number of items, but it might return fewer.

This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.

+ */ + Limit?: number; + + /** + *

Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

+ */ + Marker?: string; +} diff --git a/packages/sdk-kms-node/types/ListKeysOutput.ts b/packages/sdk-kms-node/types/ListKeysOutput.ts new file mode 100644 index 0000000000000..9b8abb58f992a --- /dev/null +++ b/packages/sdk-kms-node/types/ListKeysOutput.ts @@ -0,0 +1,28 @@ +import { _UnmarshalledKeyListEntry } from "./_KeyListEntry"; +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * ListKeysOutput shape + */ +export interface ListKeysOutput { + /** + *

A list of customer master keys (CMKs).

+ */ + Keys?: Array<_UnmarshalledKeyListEntry>; + + /** + *

When Truncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent request.

+ */ + NextMarker?: string; + + /** + *

A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in this response to the Marker parameter in a subsequent request.

+ */ + Truncated?: boolean; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ListResourceTagsInput.ts b/packages/sdk-kms-node/types/ListResourceTagsInput.ts new file mode 100644 index 0000000000000..5d9bf76a7ea88 --- /dev/null +++ b/packages/sdk-kms-node/types/ListResourceTagsInput.ts @@ -0,0 +1,19 @@ +/** + * ListResourceTagsInput shape + */ +export interface ListResourceTagsInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

Use this parameter to specify the maximum number of items to return. When this value is present, AWS KMS does not return more than the specified number of items, but it might return fewer.

This value is optional. If you include a value, it must be between 1 and 50, inclusive. If you do not include a value, it defaults to 50.

+ */ + Limit?: number; + + /** + *

Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

Do not attempt to construct this value. Use only the value of NextMarker from the truncated response you just received.

+ */ + Marker?: string; +} diff --git a/packages/sdk-kms-node/types/ListResourceTagsOutput.ts b/packages/sdk-kms-node/types/ListResourceTagsOutput.ts new file mode 100644 index 0000000000000..a5b2b3989839e --- /dev/null +++ b/packages/sdk-kms-node/types/ListResourceTagsOutput.ts @@ -0,0 +1,28 @@ +import { _UnmarshalledTag } from "./_Tag"; +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * ListResourceTagsOutput shape + */ +export interface ListResourceTagsOutput { + /** + *

A list of tags. Each tag consists of a tag key and a tag value.

+ */ + Tags?: Array<_UnmarshalledTag>; + + /** + *

When Truncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent request.

Do not assume or infer any information from this value.

+ */ + NextMarker?: string; + + /** + *

A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in this response to the Marker parameter in a subsequent request.

+ */ + Truncated?: boolean; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ListRetirableGrantsInput.ts b/packages/sdk-kms-node/types/ListRetirableGrantsInput.ts new file mode 100644 index 0000000000000..cbdd4c317f176 --- /dev/null +++ b/packages/sdk-kms-node/types/ListRetirableGrantsInput.ts @@ -0,0 +1,19 @@ +/** + * ListRetirableGrantsInput shape + */ +export interface ListRetirableGrantsInput { + /** + *

Use this parameter to specify the maximum number of items to return. When this value is present, AWS KMS does not return more than the specified number of items, but it might return fewer.

This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.

+ */ + Limit?: number; + + /** + *

Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

+ */ + Marker?: string; + + /** + *

The retiring principal for which to list grants.

To specify the retiring principal, use the Amazon Resource Name (ARN) of an AWS principal. Valid AWS principals include AWS accounts (root), IAM users, federated users, and assumed role users. For examples of the ARN syntax for specifying a principal, see AWS Identity and Access Management (IAM) in the Example ARNs section of the Amazon Web Services General Reference.

+ */ + RetiringPrincipal: string; +} diff --git a/packages/sdk-kms-node/types/ListRetirableGrantsOutput.ts b/packages/sdk-kms-node/types/ListRetirableGrantsOutput.ts new file mode 100644 index 0000000000000..8b9ea87c6f207 --- /dev/null +++ b/packages/sdk-kms-node/types/ListRetirableGrantsOutput.ts @@ -0,0 +1,28 @@ +import { _UnmarshalledGrantListEntry } from "./_GrantListEntry"; +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * ListRetirableGrantsOutput shape + */ +export interface ListRetirableGrantsOutput { + /** + *

A list of grants.

+ */ + Grants?: Array<_UnmarshalledGrantListEntry>; + + /** + *

When Truncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent request.

+ */ + NextMarker?: string; + + /** + *

A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in this response to the Marker parameter in a subsequent request.

+ */ + Truncated?: boolean; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/MalformedPolicyDocumentException.ts b/packages/sdk-kms-node/types/MalformedPolicyDocumentException.ts new file mode 100644 index 0000000000000..fca1af0b18f50 --- /dev/null +++ b/packages/sdk-kms-node/types/MalformedPolicyDocumentException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the specified policy is not syntactically or semantically correct.

+ */ +export interface MalformedPolicyDocumentException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/NotFoundException.ts b/packages/sdk-kms-node/types/NotFoundException.ts new file mode 100644 index 0000000000000..c757f4ed62840 --- /dev/null +++ b/packages/sdk-kms-node/types/NotFoundException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because the specified entity or resource could not be found.

+ */ +export interface NotFoundException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/OutputTypesUnion.ts b/packages/sdk-kms-node/types/OutputTypesUnion.ts new file mode 100644 index 0000000000000..c41b4a67fa566 --- /dev/null +++ b/packages/sdk-kms-node/types/OutputTypesUnion.ts @@ -0,0 +1,72 @@ +import { CancelKeyDeletionOutput } from "./CancelKeyDeletionOutput"; +import { CreateAliasOutput } from "./CreateAliasOutput"; +import { CreateGrantOutput } from "./CreateGrantOutput"; +import { CreateKeyOutput } from "./CreateKeyOutput"; +import { DecryptOutput } from "./DecryptOutput"; +import { DeleteAliasOutput } from "./DeleteAliasOutput"; +import { DeleteImportedKeyMaterialOutput } from "./DeleteImportedKeyMaterialOutput"; +import { DescribeKeyOutput } from "./DescribeKeyOutput"; +import { DisableKeyOutput } from "./DisableKeyOutput"; +import { DisableKeyRotationOutput } from "./DisableKeyRotationOutput"; +import { EnableKeyOutput } from "./EnableKeyOutput"; +import { EnableKeyRotationOutput } from "./EnableKeyRotationOutput"; +import { EncryptOutput } from "./EncryptOutput"; +import { GenerateDataKeyOutput } from "./GenerateDataKeyOutput"; +import { GenerateDataKeyWithoutPlaintextOutput } from "./GenerateDataKeyWithoutPlaintextOutput"; +import { GenerateRandomOutput } from "./GenerateRandomOutput"; +import { GetKeyPolicyOutput } from "./GetKeyPolicyOutput"; +import { GetKeyRotationStatusOutput } from "./GetKeyRotationStatusOutput"; +import { GetParametersForImportOutput } from "./GetParametersForImportOutput"; +import { ImportKeyMaterialOutput } from "./ImportKeyMaterialOutput"; +import { ListAliasesOutput } from "./ListAliasesOutput"; +import { ListGrantsOutput } from "./ListGrantsOutput"; +import { ListKeyPoliciesOutput } from "./ListKeyPoliciesOutput"; +import { ListKeysOutput } from "./ListKeysOutput"; +import { ListResourceTagsOutput } from "./ListResourceTagsOutput"; +import { ListRetirableGrantsOutput } from "./ListRetirableGrantsOutput"; +import { PutKeyPolicyOutput } from "./PutKeyPolicyOutput"; +import { ReEncryptOutput } from "./ReEncryptOutput"; +import { RetireGrantOutput } from "./RetireGrantOutput"; +import { RevokeGrantOutput } from "./RevokeGrantOutput"; +import { ScheduleKeyDeletionOutput } from "./ScheduleKeyDeletionOutput"; +import { TagResourceOutput } from "./TagResourceOutput"; +import { UntagResourceOutput } from "./UntagResourceOutput"; +import { UpdateAliasOutput } from "./UpdateAliasOutput"; +import { UpdateKeyDescriptionOutput } from "./UpdateKeyDescriptionOutput"; + +export type OutputTypesUnion = + | CancelKeyDeletionOutput + | CreateAliasOutput + | CreateGrantOutput + | CreateKeyOutput + | DecryptOutput + | DeleteAliasOutput + | DeleteImportedKeyMaterialOutput + | DescribeKeyOutput + | DisableKeyOutput + | DisableKeyRotationOutput + | EnableKeyOutput + | EnableKeyRotationOutput + | EncryptOutput + | GenerateDataKeyOutput + | GenerateDataKeyWithoutPlaintextOutput + | GenerateRandomOutput + | GetKeyPolicyOutput + | GetKeyRotationStatusOutput + | GetParametersForImportOutput + | ImportKeyMaterialOutput + | ListAliasesOutput + | ListGrantsOutput + | ListKeyPoliciesOutput + | ListKeysOutput + | ListResourceTagsOutput + | ListRetirableGrantsOutput + | PutKeyPolicyOutput + | ReEncryptOutput + | RetireGrantOutput + | RevokeGrantOutput + | ScheduleKeyDeletionOutput + | TagResourceOutput + | UntagResourceOutput + | UpdateAliasOutput + | UpdateKeyDescriptionOutput; diff --git a/packages/sdk-kms-node/types/PutKeyPolicyInput.ts b/packages/sdk-kms-node/types/PutKeyPolicyInput.ts new file mode 100644 index 0000000000000..c785086d3423c --- /dev/null +++ b/packages/sdk-kms-node/types/PutKeyPolicyInput.ts @@ -0,0 +1,24 @@ +/** + * PutKeyPolicyInput shape + */ +export interface PutKeyPolicyInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

The name of the key policy. The only valid value is default.

+ */ + PolicyName: string; + + /** + *

The key policy to attach to the CMK.

If you do not set BypassPolicyLockoutSafetyCheck to true, the policy must meet the following criteria:

  • It must allow the principal that is making the PutKeyPolicy request to make a subsequent PutKeyPolicy request on the CMK. This reduces the likelihood that the CMK becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide.

  • The principals that are specified in the key policy must exist and be visible to AWS KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before specifying the new principal in a key policy because the new principal might not immediately be visible to AWS KMS. For more information, see Changes that I make are not always immediately visible in the IAM User Guide.

The policy size limit is 32 kilobytes (32768 bytes).

+ */ + Policy: string; + + /** + *

A flag to indicate whether to bypass the key policy lockout safety check.

Setting this value to true increases the likelihood that the CMK becomes unmanageable. Do not set this value to true indiscriminately.

For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide.

Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the CMK.

The default value is false.

+ */ + BypassPolicyLockoutSafetyCheck?: boolean; +} diff --git a/packages/sdk-kms-node/types/PutKeyPolicyOutput.ts b/packages/sdk-kms-node/types/PutKeyPolicyOutput.ts new file mode 100644 index 0000000000000..c4ab0ec5f909e --- /dev/null +++ b/packages/sdk-kms-node/types/PutKeyPolicyOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * PutKeyPolicyOutput shape + */ +export interface PutKeyPolicyOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ReEncryptInput.ts b/packages/sdk-kms-node/types/ReEncryptInput.ts new file mode 100644 index 0000000000000..ef2b6784f8ffe --- /dev/null +++ b/packages/sdk-kms-node/types/ReEncryptInput.ts @@ -0,0 +1,33 @@ +/** + * ReEncryptInput shape + */ +export interface ReEncryptInput { + /** + *

Ciphertext of the data to reencrypt.

+ */ + CiphertextBlob: ArrayBuffer | ArrayBufferView | string; + + /** + *

Encryption context used to encrypt and decrypt the data specified in the CiphertextBlob parameter.

+ */ + SourceEncryptionContext?: + | { [key: string]: string } + | Iterable<[string, string]>; + + /** + *

A unique identifier for the CMK that is used to reencrypt the data.

To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a CMK in a different AWS account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

+ */ + DestinationKeyId: string; + + /** + *

Encryption context to use when the data is reencrypted.

+ */ + DestinationEncryptionContext?: + | { [key: string]: string } + | Iterable<[string, string]>; + + /** + *

A list of grant tokens.

For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.

+ */ + GrantTokens?: Array | Iterable; +} diff --git a/packages/sdk-kms-node/types/ReEncryptOutput.ts b/packages/sdk-kms-node/types/ReEncryptOutput.ts new file mode 100644 index 0000000000000..e4035e9679d7a --- /dev/null +++ b/packages/sdk-kms-node/types/ReEncryptOutput.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * ReEncryptOutput shape + */ +export interface ReEncryptOutput { + /** + *

The reencrypted data. When you use the HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise, it is not encoded.

+ */ + CiphertextBlob?: Uint8Array; + + /** + *

Unique identifier of the CMK used to originally encrypt the data.

+ */ + SourceKeyId?: string; + + /** + *

Unique identifier of the CMK used to reencrypt the data.

+ */ + KeyId?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/RetireGrantInput.ts b/packages/sdk-kms-node/types/RetireGrantInput.ts new file mode 100644 index 0000000000000..2eb81724b199a --- /dev/null +++ b/packages/sdk-kms-node/types/RetireGrantInput.ts @@ -0,0 +1,19 @@ +/** + * RetireGrantInput shape + */ +export interface RetireGrantInput { + /** + *

Token that identifies the grant to be retired.

+ */ + GrantToken?: string; + + /** + *

The Amazon Resource Name (ARN) of the CMK associated with the grant.

For example: arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab

+ */ + KeyId?: string; + + /** + *

Unique identifier of the grant to retire. The grant ID is returned in the response to a CreateGrant operation.

  • Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123

+ */ + GrantId?: string; +} diff --git a/packages/sdk-kms-node/types/RetireGrantOutput.ts b/packages/sdk-kms-node/types/RetireGrantOutput.ts new file mode 100644 index 0000000000000..97304eeaf9ab7 --- /dev/null +++ b/packages/sdk-kms-node/types/RetireGrantOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * RetireGrantOutput shape + */ +export interface RetireGrantOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/RevokeGrantInput.ts b/packages/sdk-kms-node/types/RevokeGrantInput.ts new file mode 100644 index 0000000000000..fda6262f7ef59 --- /dev/null +++ b/packages/sdk-kms-node/types/RevokeGrantInput.ts @@ -0,0 +1,14 @@ +/** + * RevokeGrantInput shape + */ +export interface RevokeGrantInput { + /** + *

A unique identifier for the customer master key associated with the grant.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a different AWS account, you must use the key ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

Identifier of the grant to be revoked.

+ */ + GrantId: string; +} diff --git a/packages/sdk-kms-node/types/RevokeGrantOutput.ts b/packages/sdk-kms-node/types/RevokeGrantOutput.ts new file mode 100644 index 0000000000000..9a22f0a68c329 --- /dev/null +++ b/packages/sdk-kms-node/types/RevokeGrantOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * RevokeGrantOutput shape + */ +export interface RevokeGrantOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/ScheduleKeyDeletionInput.ts b/packages/sdk-kms-node/types/ScheduleKeyDeletionInput.ts new file mode 100644 index 0000000000000..478752f69144b --- /dev/null +++ b/packages/sdk-kms-node/types/ScheduleKeyDeletionInput.ts @@ -0,0 +1,14 @@ +/** + * ScheduleKeyDeletionInput shape + */ +export interface ScheduleKeyDeletionInput { + /** + *

The unique identifier of the customer master key (CMK) to delete.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the customer master key (CMK).

This value is optional. If you include a value, it must be between 7 and 30, inclusive. If you do not include a value, it defaults to 30.

+ */ + PendingWindowInDays?: number; +} diff --git a/packages/sdk-kms-node/types/ScheduleKeyDeletionOutput.ts b/packages/sdk-kms-node/types/ScheduleKeyDeletionOutput.ts new file mode 100644 index 0000000000000..2e1f8247fcc32 --- /dev/null +++ b/packages/sdk-kms-node/types/ScheduleKeyDeletionOutput.ts @@ -0,0 +1,22 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * ScheduleKeyDeletionOutput shape + */ +export interface ScheduleKeyDeletionOutput { + /** + *

The unique identifier of the customer master key (CMK) for which deletion is scheduled.

+ */ + KeyId?: string; + + /** + *

The date and time after which AWS KMS deletes the customer master key (CMK).

+ */ + DeletionDate?: Date; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/TagException.ts b/packages/sdk-kms-node/types/TagException.ts new file mode 100644 index 0000000000000..092f9d66fc713 --- /dev/null +++ b/packages/sdk-kms-node/types/TagException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because one or more tags are not valid.

+ */ +export interface TagException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/TagResourceInput.ts b/packages/sdk-kms-node/types/TagResourceInput.ts new file mode 100644 index 0000000000000..d5343831256c4 --- /dev/null +++ b/packages/sdk-kms-node/types/TagResourceInput.ts @@ -0,0 +1,16 @@ +import { _Tag } from "./_Tag"; + +/** + * TagResourceInput shape + */ +export interface TagResourceInput { + /** + *

A unique identifier for the CMK you are tagging.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

One or more tags. Each tag consists of a tag key and a tag value.

+ */ + Tags: Array<_Tag> | Iterable<_Tag>; +} diff --git a/packages/sdk-kms-node/types/TagResourceOutput.ts b/packages/sdk-kms-node/types/TagResourceOutput.ts new file mode 100644 index 0000000000000..d0e6fc5b7d7b1 --- /dev/null +++ b/packages/sdk-kms-node/types/TagResourceOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * TagResourceOutput shape + */ +export interface TagResourceOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/UnsupportedOperationException.ts b/packages/sdk-kms-node/types/UnsupportedOperationException.ts new file mode 100644 index 0000000000000..28f6c67932cc8 --- /dev/null +++ b/packages/sdk-kms-node/types/UnsupportedOperationException.ts @@ -0,0 +1,27 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + *

The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

+ */ +export interface UnsupportedOperationException { + /** + *

A trace of which functions were called leading to this error being raised.

+ */ + stack?: string; + + /** + *

The species of error returned by the service.

+ */ + name?: string; + + /** + * _ErrorMessageType shape + */ + message?: string; + + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/UntagResourceInput.ts b/packages/sdk-kms-node/types/UntagResourceInput.ts new file mode 100644 index 0000000000000..762f0ca81dd4f --- /dev/null +++ b/packages/sdk-kms-node/types/UntagResourceInput.ts @@ -0,0 +1,14 @@ +/** + * UntagResourceInput shape + */ +export interface UntagResourceInput { + /** + *

A unique identifier for the CMK from which you are removing tags.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

One or more tag keys. Specify only the tag keys, not the tag values.

+ */ + TagKeys: Array | Iterable; +} diff --git a/packages/sdk-kms-node/types/UntagResourceOutput.ts b/packages/sdk-kms-node/types/UntagResourceOutput.ts new file mode 100644 index 0000000000000..d9d9871a77ff9 --- /dev/null +++ b/packages/sdk-kms-node/types/UntagResourceOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * UntagResourceOutput shape + */ +export interface UntagResourceOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/UpdateAliasInput.ts b/packages/sdk-kms-node/types/UpdateAliasInput.ts new file mode 100644 index 0000000000000..7408019b5959a --- /dev/null +++ b/packages/sdk-kms-node/types/UpdateAliasInput.ts @@ -0,0 +1,14 @@ +/** + * UpdateAliasInput shape + */ +export interface UpdateAliasInput { + /** + *

String that contains the name of the alias to be modified. The name must start with the word "alias" followed by a forward slash (alias/). Aliases that begin with "alias/aws" are reserved.

+ */ + AliasName: string; + + /** + *

Unique identifier of the customer master key to be mapped to the alias.

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

To verify that the alias is mapped to the correct CMK, use ListAliases.

+ */ + TargetKeyId: string; +} diff --git a/packages/sdk-kms-node/types/UpdateAliasOutput.ts b/packages/sdk-kms-node/types/UpdateAliasOutput.ts new file mode 100644 index 0000000000000..a37ba51346535 --- /dev/null +++ b/packages/sdk-kms-node/types/UpdateAliasOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * UpdateAliasOutput shape + */ +export interface UpdateAliasOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/UpdateKeyDescriptionInput.ts b/packages/sdk-kms-node/types/UpdateKeyDescriptionInput.ts new file mode 100644 index 0000000000000..02cb89eb666ae --- /dev/null +++ b/packages/sdk-kms-node/types/UpdateKeyDescriptionInput.ts @@ -0,0 +1,14 @@ +/** + * UpdateKeyDescriptionInput shape + */ +export interface UpdateKeyDescriptionInput { + /** + *

A unique identifier for the customer master key (CMK).

Specify the key ID or the Amazon Resource Name (ARN) of the CMK.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.

+ */ + KeyId: string; + + /** + *

New description for the CMK.

+ */ + Description: string; +} diff --git a/packages/sdk-kms-node/types/UpdateKeyDescriptionOutput.ts b/packages/sdk-kms-node/types/UpdateKeyDescriptionOutput.ts new file mode 100644 index 0000000000000..f3a3790b82d65 --- /dev/null +++ b/packages/sdk-kms-node/types/UpdateKeyDescriptionOutput.ts @@ -0,0 +1,12 @@ +import { ResponseMetadata as __ResponseMetadata__ } from "@aws/types"; + +/** + * UpdateKeyDescriptionOutput shape + */ +export interface UpdateKeyDescriptionOutput { + /** + * Metadata about the response received, including the HTTP status code, HTTP + * headers, and any request identifiers recognized by the SDK. + */ + $metadata: __ResponseMetadata__; +} diff --git a/packages/sdk-kms-node/types/_AliasListEntry.ts b/packages/sdk-kms-node/types/_AliasListEntry.ts new file mode 100644 index 0000000000000..016edf723b3fb --- /dev/null +++ b/packages/sdk-kms-node/types/_AliasListEntry.ts @@ -0,0 +1,21 @@ +/** + *

Contains information about an alias.

+ */ +export interface _AliasListEntry { + /** + *

String that contains the alias.

+ */ + AliasName?: string; + + /** + *

String that contains the key ARN.

+ */ + AliasArn?: string; + + /** + *

String that contains the key identifier referred to by the alias.

+ */ + TargetKeyId?: string; +} + +export type _UnmarshalledAliasListEntry = _AliasListEntry; diff --git a/packages/sdk-kms-node/types/_GrantConstraints.ts b/packages/sdk-kms-node/types/_GrantConstraints.ts new file mode 100644 index 0000000000000..9b594d6aafee9 --- /dev/null +++ b/packages/sdk-kms-node/types/_GrantConstraints.ts @@ -0,0 +1,30 @@ +/** + *

A structure that you can use to allow certain operations in the grant only when the desired encryption context is present. For more information about encryption context, see Encryption Context in the AWS Key Management Service Developer Guide.

Grant constraints apply only to operations that accept encryption context as input. For example, the DescribeKey operation does not accept encryption context as input. A grant that allows the DescribeKey operation does so regardless of the grant constraints. In constrast, the Encrypt operation accepts encryption context as input. A grant that allows the Encrypt operation does so only when the encryption context of the Encrypt operation satisfies the grant constraints.

+ */ +export interface _GrantConstraints { + /** + *

A list of key-value pairs, all of which must be present in the encryption context of certain subsequent operations that the grant allows. When certain subsequent operations allowed by the grant include encryption context that matches this list or is a superset of this list, the grant allows the operation. Otherwise, the grant does not allow the operation.

+ */ + EncryptionContextSubset?: + | { [key: string]: string } + | Iterable<[string, string]>; + + /** + *

A list of key-value pairs that must be present in the encryption context of certain subsequent operations that the grant allows. When certain subsequent operations allowed by the grant include encryption context that matches this list, the grant allows the operation. Otherwise, the grant does not allow the operation.

+ */ + EncryptionContextEquals?: + | { [key: string]: string } + | Iterable<[string, string]>; +} + +export interface _UnmarshalledGrantConstraints extends _GrantConstraints { + /** + *

A list of key-value pairs, all of which must be present in the encryption context of certain subsequent operations that the grant allows. When certain subsequent operations allowed by the grant include encryption context that matches this list or is a superset of this list, the grant allows the operation. Otherwise, the grant does not allow the operation.

+ */ + EncryptionContextSubset?: { [key: string]: string }; + + /** + *

A list of key-value pairs that must be present in the encryption context of certain subsequent operations that the grant allows. When certain subsequent operations allowed by the grant include encryption context that matches this list, the grant allows the operation. Otherwise, the grant does not allow the operation.

+ */ + EncryptionContextEquals?: { [key: string]: string }; +} diff --git a/packages/sdk-kms-node/types/_GrantListEntry.ts b/packages/sdk-kms-node/types/_GrantListEntry.ts new file mode 100644 index 0000000000000..c6b5024625cea --- /dev/null +++ b/packages/sdk-kms-node/types/_GrantListEntry.ts @@ -0,0 +1,106 @@ +import { + _GrantConstraints, + _UnmarshalledGrantConstraints +} from "./_GrantConstraints"; + +/** + *

Contains information about an entry in a list of grants.

+ */ +export interface _GrantListEntry { + /** + *

The unique identifier for the customer master key (CMK) to which the grant applies.

+ */ + KeyId?: string; + + /** + *

The unique identifier for the grant.

+ */ + GrantId?: string; + + /** + *

The friendly name that identifies the grant. If a name was provided in the CreateGrant request, that name is returned. Otherwise this value is null.

+ */ + Name?: string; + + /** + *

The date and time when the grant was created.

+ */ + CreationDate?: Date | string | number; + + /** + *

The principal that receives the grant's permissions.

+ */ + GranteePrincipal?: string; + + /** + *

The principal that can retire the grant.

+ */ + RetiringPrincipal?: string; + + /** + *

The AWS account under which the grant was issued.

+ */ + IssuingAccount?: string; + + /** + *

The list of operations permitted by the grant.

+ */ + Operations?: + | Array< + | "Decrypt" + | "Encrypt" + | "GenerateDataKey" + | "GenerateDataKeyWithoutPlaintext" + | "ReEncryptFrom" + | "ReEncryptTo" + | "CreateGrant" + | "RetireGrant" + | "DescribeKey" + | string + > + | Iterable< + | "Decrypt" + | "Encrypt" + | "GenerateDataKey" + | "GenerateDataKeyWithoutPlaintext" + | "ReEncryptFrom" + | "ReEncryptTo" + | "CreateGrant" + | "RetireGrant" + | "DescribeKey" + | string + >; + + /** + *

A list of key-value pairs that must be present in the encryption context of certain subsequent operations that the grant allows.

+ */ + Constraints?: _GrantConstraints; +} + +export interface _UnmarshalledGrantListEntry extends _GrantListEntry { + /** + *

The date and time when the grant was created.

+ */ + CreationDate?: Date; + + /** + *

The list of operations permitted by the grant.

+ */ + Operations?: Array< + | "Decrypt" + | "Encrypt" + | "GenerateDataKey" + | "GenerateDataKeyWithoutPlaintext" + | "ReEncryptFrom" + | "ReEncryptTo" + | "CreateGrant" + | "RetireGrant" + | "DescribeKey" + | string + >; + + /** + *

A list of key-value pairs that must be present in the encryption context of certain subsequent operations that the grant allows.

+ */ + Constraints?: _UnmarshalledGrantConstraints; +} diff --git a/packages/sdk-kms-node/types/_KeyListEntry.ts b/packages/sdk-kms-node/types/_KeyListEntry.ts new file mode 100644 index 0000000000000..53dcc3fa53efd --- /dev/null +++ b/packages/sdk-kms-node/types/_KeyListEntry.ts @@ -0,0 +1,16 @@ +/** + *

Contains information about each entry in the key list.

+ */ +export interface _KeyListEntry { + /** + *

Unique identifier of the key.

+ */ + KeyId?: string; + + /** + *

ARN of the key.

+ */ + KeyArn?: string; +} + +export type _UnmarshalledKeyListEntry = _KeyListEntry; diff --git a/packages/sdk-kms-node/types/_KeyMetadata.ts b/packages/sdk-kms-node/types/_KeyMetadata.ts new file mode 100644 index 0000000000000..32323084da0b6 --- /dev/null +++ b/packages/sdk-kms-node/types/_KeyMetadata.ts @@ -0,0 +1,94 @@ +/** + *

Contains metadata about a customer master key (CMK).

This data type is used as a response element for the CreateKey and DescribeKey operations.

+ */ +export interface _KeyMetadata { + /** + *

The twelve-digit account ID of the AWS account that owns the CMK.

+ */ + AWSAccountId?: string; + + /** + *

The globally unique identifier for the CMK.

+ */ + KeyId: string; + + /** + *

The Amazon Resource Name (ARN) of the CMK. For examples, see AWS Key Management Service (AWS KMS) in the Example ARNs section of the AWS General Reference.

+ */ + Arn?: string; + + /** + *

The date and time when the CMK was created.

+ */ + CreationDate?: Date | string | number; + + /** + *

Specifies whether the CMK is enabled. When KeyState is Enabled this value is true, otherwise it is false.

+ */ + Enabled?: boolean; + + /** + *

The description of the CMK.

+ */ + Description?: string; + + /** + *

The cryptographic operations for which you can use the CMK. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the CMK for the Encrypt and Decrypt operations.

+ */ + KeyUsage?: "ENCRYPT_DECRYPT" | string; + + /** + *

The state of the CMK.

For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.

+ */ + KeyState?: + | "Enabled" + | "Disabled" + | "PendingDeletion" + | "PendingImport" + | string; + + /** + *

The date and time after which AWS KMS deletes the CMK. This value is present only when KeyState is PendingDeletion, otherwise this value is omitted.

+ */ + DeletionDate?: Date | string | number; + + /** + *

The time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the CMK becomes unusable. This value is present only for CMKs whose Origin is EXTERNAL and whose ExpirationModel is KEY_MATERIAL_EXPIRES, otherwise this value is omitted.

+ */ + ValidTo?: Date | string | number; + + /** + *

The source of the CMK's key material. When this value is AWS_KMS, AWS KMS created the key material. When this value is EXTERNAL, the key material was imported from your existing key management infrastructure or the CMK lacks key material.

+ */ + Origin?: "AWS_KMS" | "EXTERNAL" | string; + + /** + *

Specifies whether the CMK's key material expires. This value is present only when Origin is EXTERNAL, otherwise this value is omitted.

+ */ + ExpirationModel?: + | "KEY_MATERIAL_EXPIRES" + | "KEY_MATERIAL_DOES_NOT_EXPIRE" + | string; + + /** + *

The CMK's manager. CMKs are either customer-managed or AWS-managed. For more information about the difference, see Customer Master Keys in the AWS Key Management Service Developer Guide.

+ */ + KeyManager?: "AWS" | "CUSTOMER" | string; +} + +export interface _UnmarshalledKeyMetadata extends _KeyMetadata { + /** + *

The date and time when the CMK was created.

+ */ + CreationDate?: Date; + + /** + *

The date and time after which AWS KMS deletes the CMK. This value is present only when KeyState is PendingDeletion, otherwise this value is omitted.

+ */ + DeletionDate?: Date; + + /** + *

The time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the CMK becomes unusable. This value is present only for CMKs whose Origin is EXTERNAL and whose ExpirationModel is KEY_MATERIAL_EXPIRES, otherwise this value is omitted.

+ */ + ValidTo?: Date; +} diff --git a/packages/sdk-kms-node/types/_Tag.ts b/packages/sdk-kms-node/types/_Tag.ts new file mode 100644 index 0000000000000..7782787856288 --- /dev/null +++ b/packages/sdk-kms-node/types/_Tag.ts @@ -0,0 +1,16 @@ +/** + *

A key-value pair. A tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.

For information about the rules that apply to tag keys and tag values, see User-Defined Tag Restrictions in the AWS Billing and Cost Management User Guide.

+ */ +export interface _Tag { + /** + *

The key of the tag.

+ */ + TagKey: string; + + /** + *

The value of the tag.

+ */ + TagValue: string; +} + +export type _UnmarshalledTag = _Tag; From 3743dedfc34f18b8a2f304abf715eae1ec701ebd Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Sat, 18 Nov 2017 21:55:46 -0800 Subject: [PATCH 3/3] Ensure default assignment polyfill is properly grouped --- packages/region-provider/src/fromSharedConfigFiles.ts | 7 +++++-- packages/region-provider/tsconfig.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/region-provider/src/fromSharedConfigFiles.ts b/packages/region-provider/src/fromSharedConfigFiles.ts index 8c5711901a1d5..13f2d9a4c0ee7 100644 --- a/packages/region-provider/src/fromSharedConfigFiles.ts +++ b/packages/region-provider/src/fromSharedConfigFiles.ts @@ -26,10 +26,13 @@ export function fromSharedConfigFiles( init: SharedConfigInit = {} ): Provider { return () => { - const { + let { loadedConfig = loadSharedConfigFiles(init), - profile = process.env[ENV_PROFILE] || DEFAULT_PROFILE + profile = process.env[ENV_PROFILE] } = init; + if (!profile) { + profile = DEFAULT_PROFILE; + } return loadedConfig.then(({ configFile, credentialsFile }) => { for (let file of [credentialsFile, configFile]) { diff --git a/packages/region-provider/tsconfig.json b/packages/region-provider/tsconfig.json index 5d9bfa14c94ed..50e087f797eaf 100644 --- a/packages/region-provider/tsconfig.json +++ b/packages/region-provider/tsconfig.json @@ -16,4 +16,4 @@ "rootDir": "./src", "outDir": "./build" } -} \ No newline at end of file +}