diff --git a/packages/config-resolver/src/index.spec.ts b/packages/config-resolver/src/index.spec.ts index a57c3ebd8f78..9a5953fbc749 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 } @@ -15,7 +18,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', @@ -45,7 +54,10 @@ describe('resolveConfiguration', () => { '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, @@ -61,7 +73,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, @@ -79,7 +94,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 2eeded5f3a18..08ac7cdee7ec 100644 --- a/packages/config-resolver/src/index.ts +++ b/packages/config-resolver/src/index.ts @@ -7,12 +7,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, @@ -25,22 +28,20 @@ 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, + input, + out as R, middlewareStack ); } diff --git a/packages/crypto-sha256-node/package.json b/packages/crypto-sha256-node/package.json index f2ff24b76831..6e1be17fec54 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/middleware-stack/src/index.spec.ts b/packages/middleware-stack/src/index.spec.ts index 3ac08116c102..0ddded96280c 100644 --- a/packages/middleware-stack/src/index.spec.ts +++ b/packages/middleware-stack/src/index.spec.ts @@ -6,12 +6,11 @@ import { 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 { @@ -34,7 +33,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')], @@ -75,7 +74,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}); @@ -95,11 +94,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'), @@ -125,7 +124,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")); @@ -150,7 +149,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 990054d0b5b1..5a4fa0859758 100644 --- a/packages/middleware-stack/src/index.ts +++ b/packages/middleware-stack/src/index.ts @@ -9,28 +9,31 @@ import { export type Step = 'initialize'|'build'|'finalize'; interface HandlerListEntry< - T extends Handler + 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, @@ -40,21 +43,23 @@ export class MiddlewareStack> implements }); } - 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(); + 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); @@ -65,7 +70,10 @@ export class MiddlewareStack> implements return this.entries.length < length; } - resolve(handler: T, context: HandlerExecutionContext): T { + resolve( + handler: Handler, + context: HandlerExecutionContext + ): Handler { if (!this.sorted) { this.sort(); } @@ -77,7 +85,9 @@ export class MiddlewareStack> implements 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/BatchGetRepositoriesInput.ts b/packages/model-codecommit-v1/BatchGetRepositoriesInput.ts deleted file mode 100644 index 42ab5c667dfc..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/BatchGetRepositoriesOutput.ts b/packages/model-codecommit-v1/BatchGetRepositoriesOutput.ts deleted file mode 100644 index e9ae93e23525..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/BranchNameRequiredException.ts b/packages/model-codecommit-v1/BranchNameRequiredException.ts deleted file mode 100644 index 1a234524dff8..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/CommitDoesNotExistException.ts b/packages/model-codecommit-v1/CommitDoesNotExistException.ts deleted file mode 100644 index 7a4fa6360536..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/CommitIdDoesNotExistException.ts b/packages/model-codecommit-v1/CommitIdDoesNotExistException.ts deleted file mode 100644 index f35b35019e7a..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/CommitIdRequiredException.ts b/packages/model-codecommit-v1/CommitIdRequiredException.ts deleted file mode 100644 index 3d86bb9acbe2..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/CreateBranchInput.ts b/packages/model-codecommit-v1/CreateBranchInput.ts deleted file mode 100644 index 8c71cda8bebb..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/CreateRepositoryInput.ts b/packages/model-codecommit-v1/CreateRepositoryInput.ts deleted file mode 100644 index 6624e761d466..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/CreateRepositoryOutput.ts b/packages/model-codecommit-v1/CreateRepositoryOutput.ts deleted file mode 100644 index 0b8477d4b4b6..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/DefaultBranchCannotBeDeletedException.ts b/packages/model-codecommit-v1/DefaultBranchCannotBeDeletedException.ts deleted file mode 100644 index b6cc26354a7d..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/DeleteBranchInput.ts b/packages/model-codecommit-v1/DeleteBranchInput.ts deleted file mode 100644 index ee604e3cb30c..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/DeleteBranchOutput.ts b/packages/model-codecommit-v1/DeleteBranchOutput.ts deleted file mode 100644 index 16428118f1dc..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/DeleteRepositoryInput.ts b/packages/model-codecommit-v1/DeleteRepositoryInput.ts deleted file mode 100644 index e1b1572975c9..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/EncryptionIntegrityChecksFailedException.ts b/packages/model-codecommit-v1/EncryptionIntegrityChecksFailedException.ts deleted file mode 100644 index 7b55806bf034..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/EncryptionKeyAccessDeniedException.ts b/packages/model-codecommit-v1/EncryptionKeyAccessDeniedException.ts deleted file mode 100644 index 718d0a45a852..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/EncryptionKeyUnavailableException.ts b/packages/model-codecommit-v1/EncryptionKeyUnavailableException.ts deleted file mode 100644 index e31fe12f1bef..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/FileTooLargeException.ts b/packages/model-codecommit-v1/FileTooLargeException.ts deleted file mode 100644 index 45e6b89d7e5a..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetBlobInput.ts b/packages/model-codecommit-v1/GetBlobInput.ts deleted file mode 100644 index daa47818f008..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetBranchInput.ts b/packages/model-codecommit-v1/GetBranchInput.ts deleted file mode 100644 index f71534943a70..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetCommitInput.ts b/packages/model-codecommit-v1/GetCommitInput.ts deleted file mode 100644 index d0983718b45b..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetCommitOutput.ts b/packages/model-codecommit-v1/GetCommitOutput.ts deleted file mode 100644 index a09202035fc2..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetDifferencesInput.ts b/packages/model-codecommit-v1/GetDifferencesInput.ts deleted file mode 100644 index 03699dfc0270..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetDifferencesOutput.ts b/packages/model-codecommit-v1/GetDifferencesOutput.ts deleted file mode 100644 index 4ccd08b10db1..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetRepositoryInput.ts b/packages/model-codecommit-v1/GetRepositoryInput.ts deleted file mode 100644 index 2c917ae1278c..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetRepositoryOutput.ts b/packages/model-codecommit-v1/GetRepositoryOutput.ts deleted file mode 100644 index 545ca758896e..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetRepositoryTriggersInput.ts b/packages/model-codecommit-v1/GetRepositoryTriggersInput.ts deleted file mode 100644 index ca79f86a7a05..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/GetRepositoryTriggersOutput.ts deleted file mode 100644 index f4c19f0e789c..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InputTypesUnion.ts b/packages/model-codecommit-v1/InputTypesUnion.ts deleted file mode 100644 index ec4e83c362ab..000000000000 --- a/packages/model-codecommit-v1/InputTypesUnion.ts +++ /dev/null @@ -1,37 +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/InvalidBranchNameException.ts b/packages/model-codecommit-v1/InvalidBranchNameException.ts deleted file mode 100644 index 50af9638da59..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidCommitException.ts b/packages/model-codecommit-v1/InvalidCommitException.ts deleted file mode 100644 index 32f45fd4196c..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidCommitIdException.ts b/packages/model-codecommit-v1/InvalidCommitIdException.ts deleted file mode 100644 index 0f67bdc090f3..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidContinuationTokenException.ts b/packages/model-codecommit-v1/InvalidContinuationTokenException.ts deleted file mode 100644 index 8e7b8bf354d3..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidMaxResultsException.ts b/packages/model-codecommit-v1/InvalidMaxResultsException.ts deleted file mode 100644 index c5f6da655851..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidOrderException.ts b/packages/model-codecommit-v1/InvalidOrderException.ts deleted file mode 100644 index 113d99e9808b..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidRepositoryDescriptionException.ts b/packages/model-codecommit-v1/InvalidRepositoryDescriptionException.ts deleted file mode 100644 index 2a106bae48c4..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidRepositoryNameException.ts b/packages/model-codecommit-v1/InvalidRepositoryNameException.ts deleted file mode 100644 index 9efb0a2875f8..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerBranchNameException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerBranchNameException.ts deleted file mode 100644 index 7068cc81958a..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerDestinationArnException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerDestinationArnException.ts deleted file mode 100644 index 5d9cdbcb174d..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerEventsException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerEventsException.ts deleted file mode 100644 index 28ce083bf87b..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerNameException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerNameException.ts deleted file mode 100644 index 993310826e12..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerRegionException.ts b/packages/model-codecommit-v1/InvalidRepositoryTriggerRegionException.ts deleted file mode 100644 index e79b4e100a08..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidSortByException.ts b/packages/model-codecommit-v1/InvalidSortByException.ts deleted file mode 100644 index 3037bb182903..000000000000 --- 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__; -} \ 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 5b867b7c57b1..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/ListRepositoriesInput.ts b/packages/model-codecommit-v1/ListRepositoriesInput.ts deleted file mode 100644 index 5b572f2b3172..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/ListRepositoriesOutput.ts b/packages/model-codecommit-v1/ListRepositoriesOutput.ts deleted file mode 100644 index 81bc4589e750..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/MaximumBranchesExceededException.ts b/packages/model-codecommit-v1/MaximumBranchesExceededException.ts deleted file mode 100644 index 8fab8cba083e..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/MaximumRepositoryNamesExceededException.ts b/packages/model-codecommit-v1/MaximumRepositoryNamesExceededException.ts deleted file mode 100644 index b75ca6df6b2a..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/MaximumRepositoryTriggersExceededException.ts b/packages/model-codecommit-v1/MaximumRepositoryTriggersExceededException.ts deleted file mode 100644 index 720b4f1d0295..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/OutputTypesUnion.ts b/packages/model-codecommit-v1/OutputTypesUnion.ts deleted file mode 100644 index 3bd20ce067ea..000000000000 --- a/packages/model-codecommit-v1/OutputTypesUnion.ts +++ /dev/null @@ -1,37 +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 02330c96b060..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/PutRepositoryTriggersInput.ts b/packages/model-codecommit-v1/PutRepositoryTriggersInput.ts deleted file mode 100644 index 589975e9234c..000000000000 --- 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>; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/README.md b/packages/model-codecommit-v1/README.md deleted file mode 100644 index 2abc3b7c5bae..000000000000 --- 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 6d0d10b146ce..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryLimitExceededException.ts b/packages/model-codecommit-v1/RepositoryLimitExceededException.ts deleted file mode 100644 index 886ccd3d2b8d..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryNameExistsException.ts b/packages/model-codecommit-v1/RepositoryNameExistsException.ts deleted file mode 100644 index 22e063152069..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryNameRequiredException.ts b/packages/model-codecommit-v1/RepositoryNameRequiredException.ts deleted file mode 100644 index d05d787fa56c..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryNamesRequiredException.ts b/packages/model-codecommit-v1/RepositoryNamesRequiredException.ts deleted file mode 100644 index 1b285785432c..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryTriggerBranchNameListRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggerBranchNameListRequiredException.ts deleted file mode 100644 index cc3239d7541b..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryTriggerDestinationArnRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggerDestinationArnRequiredException.ts deleted file mode 100644 index 9082909a302d..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryTriggerEventsListRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggerEventsListRequiredException.ts deleted file mode 100644 index 7a283e9bde3f..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryTriggerNameRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggerNameRequiredException.ts deleted file mode 100644 index a1177cac3992..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/RepositoryTriggersListRequiredException.ts b/packages/model-codecommit-v1/RepositoryTriggersListRequiredException.ts deleted file mode 100644 index 19e913c34bb1..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/TestRepositoryTriggersInput.ts b/packages/model-codecommit-v1/TestRepositoryTriggersInput.ts deleted file mode 100644 index 261b299fa424..000000000000 --- 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>; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/TestRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/TestRepositoryTriggersOutput.ts deleted file mode 100644 index c30cb3b75ea9..000000000000 --- 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__; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/UpdateDefaultBranchInput.ts b/packages/model-codecommit-v1/UpdateDefaultBranchInput.ts deleted file mode 100644 index 416e2cb429a6..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/UpdateRepositoryDescriptionInput.ts b/packages/model-codecommit-v1/UpdateRepositoryDescriptionInput.ts deleted file mode 100644 index 5df971a7204c..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/UpdateRepositoryNameInput.ts b/packages/model-codecommit-v1/UpdateRepositoryNameInput.ts deleted file mode 100644 index d61e93d76308..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/_BlobMetadata.ts b/packages/model-codecommit-v1/_BlobMetadata.ts deleted file mode 100644 index 6b65ee752e08..000000000000 --- 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; \ No newline at end of file diff --git a/packages/model-codecommit-v1/_BranchInfo.ts b/packages/model-codecommit-v1/_BranchInfo.ts deleted file mode 100644 index d95deca93a23..000000000000 --- 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; \ No newline at end of file diff --git a/packages/model-codecommit-v1/_Commit.ts b/packages/model-codecommit-v1/_Commit.ts deleted file mode 100644 index 76457f5cee22..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/_Difference.ts b/packages/model-codecommit-v1/_Difference.ts deleted file mode 100644 index c9a3a8fcb1ce..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/_RepositoryMetadata.ts b/packages/model-codecommit-v1/_RepositoryMetadata.ts deleted file mode 100644 index 0e229930611d..000000000000 --- 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; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/_RepositoryNameIdPair.ts b/packages/model-codecommit-v1/_RepositoryNameIdPair.ts deleted file mode 100644 index e0c7ac9ef8ba..000000000000 --- 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; \ No newline at end of file diff --git a/packages/model-codecommit-v1/_RepositoryTrigger.ts b/packages/model-codecommit-v1/_RepositoryTrigger.ts deleted file mode 100644 index 03cb2e6305cf..000000000000 --- a/packages/model-codecommit-v1/_RepositoryTrigger.ts +++ /dev/null @@ -1,41 +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>; -} \ No newline at end of file diff --git a/packages/model-codecommit-v1/_RepositoryTriggerExecutionFailure.ts b/packages/model-codecommit-v1/_RepositoryTriggerExecutionFailure.ts deleted file mode 100644 index d7b0f03b7f6a..000000000000 --- 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; \ No newline at end of file diff --git a/packages/model-codecommit-v1/_UserInfo.ts b/packages/model-codecommit-v1/_UserInfo.ts deleted file mode 100644 index d1dd855fb4d9..000000000000 --- 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; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/BatchGetRepositories.ts b/packages/model-codecommit-v1/model/BatchGetRepositories.ts deleted file mode 100644 index 529c5a2f5a2b..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/BatchGetRepositoriesInput.ts b/packages/model-codecommit-v1/model/BatchGetRepositoriesInput.ts deleted file mode 100644 index 8456350c1536..000000000000 --- a/packages/model-codecommit-v1/model/BatchGetRepositoriesInput.ts +++ /dev/null @@ -1,14 +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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/BatchGetRepositoriesOutput.ts b/packages/model-codecommit-v1/model/BatchGetRepositoriesOutput.ts deleted file mode 100644 index 2d44a9f7ce3e..000000000000 --- 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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/BlobIdDoesNotExistException.ts b/packages/model-codecommit-v1/model/BlobIdDoesNotExistException.ts deleted file mode 100644 index b195f4b4c945..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/BlobIdRequiredException.ts b/packages/model-codecommit-v1/model/BlobIdRequiredException.ts deleted file mode 100644 index 85e2ffadde52..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/BranchDoesNotExistException.ts b/packages/model-codecommit-v1/model/BranchDoesNotExistException.ts deleted file mode 100644 index 6bc0b06a496e..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/BranchNameExistsException.ts b/packages/model-codecommit-v1/model/BranchNameExistsException.ts deleted file mode 100644 index 7ada791a12ad..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/BranchNameRequiredException.ts b/packages/model-codecommit-v1/model/BranchNameRequiredException.ts deleted file mode 100644 index d9ad3e675c83..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/CommitDoesNotExistException.ts b/packages/model-codecommit-v1/model/CommitDoesNotExistException.ts deleted file mode 100644 index f50520360b31..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/CommitIdDoesNotExistException.ts b/packages/model-codecommit-v1/model/CommitIdDoesNotExistException.ts deleted file mode 100644 index ba1fae9fe520..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/CommitIdRequiredException.ts b/packages/model-codecommit-v1/model/CommitIdRequiredException.ts deleted file mode 100644 index 16cd9f6f9a1b..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/CommitRequiredException.ts b/packages/model-codecommit-v1/model/CommitRequiredException.ts deleted file mode 100644 index c17f92113566..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/CreateBranch.ts b/packages/model-codecommit-v1/model/CreateBranch.ts deleted file mode 100644 index 317f2ad5f600..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/CreateRepository.ts b/packages/model-codecommit-v1/model/CreateRepository.ts deleted file mode 100644 index fe95e141d674..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/CreateRepositoryOutput.ts b/packages/model-codecommit-v1/model/CreateRepositoryOutput.ts deleted file mode 100644 index fae153c405cb..000000000000 --- 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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/DefaultBranchCannotBeDeletedException.ts b/packages/model-codecommit-v1/model/DefaultBranchCannotBeDeletedException.ts deleted file mode 100644 index ab06ef4e0af8..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/DeleteBranch.ts b/packages/model-codecommit-v1/model/DeleteBranch.ts deleted file mode 100644 index 6f8da4c53531..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/DeleteBranchOutput.ts b/packages/model-codecommit-v1/model/DeleteBranchOutput.ts deleted file mode 100644 index 6883462f87cc..000000000000 --- 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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/DeleteRepository.ts b/packages/model-codecommit-v1/model/DeleteRepository.ts deleted file mode 100644 index 811328d50458..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/EncryptionIntegrityChecksFailedException.ts b/packages/model-codecommit-v1/model/EncryptionIntegrityChecksFailedException.ts deleted file mode 100644 index 3f95c8ee1838..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/EncryptionKeyAccessDeniedException.ts b/packages/model-codecommit-v1/model/EncryptionKeyAccessDeniedException.ts deleted file mode 100644 index 0125424f4544..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/EncryptionKeyDisabledException.ts b/packages/model-codecommit-v1/model/EncryptionKeyDisabledException.ts deleted file mode 100644 index ee73ab9bda3d..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/EncryptionKeyNotFoundException.ts b/packages/model-codecommit-v1/model/EncryptionKeyNotFoundException.ts deleted file mode 100644 index 48044fd3b6ff..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/EncryptionKeyUnavailableException.ts b/packages/model-codecommit-v1/model/EncryptionKeyUnavailableException.ts deleted file mode 100644 index 5d3207517693..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/FileTooLargeException.ts b/packages/model-codecommit-v1/model/FileTooLargeException.ts deleted file mode 100644 index feb79783e7cc..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetBlob.ts b/packages/model-codecommit-v1/model/GetBlob.ts deleted file mode 100644 index f3e34b18e5bf..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetBranch.ts b/packages/model-codecommit-v1/model/GetBranch.ts deleted file mode 100644 index fd777b2a4ece..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetBranchOutput.ts b/packages/model-codecommit-v1/model/GetBranchOutput.ts deleted file mode 100644 index e59de8d7c051..000000000000 --- 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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetCommit.ts b/packages/model-codecommit-v1/model/GetCommit.ts deleted file mode 100644 index 7de720d2ecae..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetCommitOutput.ts b/packages/model-codecommit-v1/model/GetCommitOutput.ts deleted file mode 100644 index 395a55df11d3..000000000000 --- a/packages/model-codecommit-v1/model/GetCommitOutput.ts +++ /dev/null @@ -1,14 +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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetDifferences.ts b/packages/model-codecommit-v1/model/GetDifferences.ts deleted file mode 100644 index e6f25453d9b3..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetDifferencesOutput.ts b/packages/model-codecommit-v1/model/GetDifferencesOutput.ts deleted file mode 100644 index 4b198a35b4de..000000000000 --- 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', - }, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetRepository.ts b/packages/model-codecommit-v1/model/GetRepository.ts deleted file mode 100644 index 9dfe9876ada7..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetRepositoryOutput.ts b/packages/model-codecommit-v1/model/GetRepositoryOutput.ts deleted file mode 100644 index dc46a17106f8..000000000000 --- 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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetRepositoryTriggers.ts b/packages/model-codecommit-v1/model/GetRepositoryTriggers.ts deleted file mode 100644 index 4b7d8e0004aa..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/model/GetRepositoryTriggersOutput.ts deleted file mode 100644 index 68300ee78b2d..000000000000 --- 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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidBlobIdException.ts b/packages/model-codecommit-v1/model/InvalidBlobIdException.ts deleted file mode 100644 index 78b759b6a0cd..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidBranchNameException.ts b/packages/model-codecommit-v1/model/InvalidBranchNameException.ts deleted file mode 100644 index 0cac346fbf79..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidCommitException.ts b/packages/model-codecommit-v1/model/InvalidCommitException.ts deleted file mode 100644 index d5bd90c12039..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidCommitIdException.ts b/packages/model-codecommit-v1/model/InvalidCommitIdException.ts deleted file mode 100644 index 6dde5e889209..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidContinuationTokenException.ts b/packages/model-codecommit-v1/model/InvalidContinuationTokenException.ts deleted file mode 100644 index 324180f5206b..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidMaxResultsException.ts b/packages/model-codecommit-v1/model/InvalidMaxResultsException.ts deleted file mode 100644 index 0aadd38672ac..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidOrderException.ts b/packages/model-codecommit-v1/model/InvalidOrderException.ts deleted file mode 100644 index a3a2942428fd..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidPathException.ts b/packages/model-codecommit-v1/model/InvalidPathException.ts deleted file mode 100644 index 3b23eeb92d3e..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryDescriptionException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryDescriptionException.ts deleted file mode 100644 index 9a04f3ca54aa..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryNameException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryNameException.ts deleted file mode 100644 index 32310939a625..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerBranchNameException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerBranchNameException.ts deleted file mode 100644 index 4d411464975c..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerCustomDataException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerCustomDataException.ts deleted file mode 100644 index b22505903ceb..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerDestinationArnException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerDestinationArnException.ts deleted file mode 100644 index f8c564fe30c2..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerEventsException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerEventsException.ts deleted file mode 100644 index 7bc18e0812e8..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerNameException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerNameException.ts deleted file mode 100644 index f03cdac97032..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidRepositoryTriggerRegionException.ts b/packages/model-codecommit-v1/model/InvalidRepositoryTriggerRegionException.ts deleted file mode 100644 index 0b4a947dbafe..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/InvalidSortByException.ts b/packages/model-codecommit-v1/model/InvalidSortByException.ts deleted file mode 100644 index 296c49f9e38c..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/ListBranches.ts b/packages/model-codecommit-v1/model/ListBranches.ts deleted file mode 100644 index ddd3f4848da3..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/ListBranchesOutput.ts b/packages/model-codecommit-v1/model/ListBranchesOutput.ts deleted file mode 100644 index b81135a66928..000000000000 --- 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', - }, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/ListRepositories.ts b/packages/model-codecommit-v1/model/ListRepositories.ts deleted file mode 100644 index cfbd564a9c73..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/ListRepositoriesOutput.ts b/packages/model-codecommit-v1/model/ListRepositoriesOutput.ts deleted file mode 100644 index 2728221ac1a4..000000000000 --- 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', - }, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/MaximumBranchesExceededException.ts b/packages/model-codecommit-v1/model/MaximumBranchesExceededException.ts deleted file mode 100644 index 90b606e8523a..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/MaximumRepositoryNamesExceededException.ts b/packages/model-codecommit-v1/model/MaximumRepositoryNamesExceededException.ts deleted file mode 100644 index 9660ed9466a7..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/MaximumRepositoryTriggersExceededException.ts b/packages/model-codecommit-v1/model/MaximumRepositoryTriggersExceededException.ts deleted file mode 100644 index 5caf0742cfd0..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/PathDoesNotExistException.ts b/packages/model-codecommit-v1/model/PathDoesNotExistException.ts deleted file mode 100644 index af8c0f301f97..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/PutRepositoryTriggers.ts b/packages/model-codecommit-v1/model/PutRepositoryTriggers.ts deleted file mode 100644 index 3ca3e5ecb61b..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/PutRepositoryTriggersInput.ts b/packages/model-codecommit-v1/model/PutRepositoryTriggersInput.ts deleted file mode 100644 index 522b3ce3db54..000000000000 --- a/packages/model-codecommit-v1/model/PutRepositoryTriggersInput.ts +++ /dev/null @@ -1,21 +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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryDoesNotExistException.ts b/packages/model-codecommit-v1/model/RepositoryDoesNotExistException.ts deleted file mode 100644 index 7b43695b82e9..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryLimitExceededException.ts b/packages/model-codecommit-v1/model/RepositoryLimitExceededException.ts deleted file mode 100644 index bac6d2384b22..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryNameExistsException.ts b/packages/model-codecommit-v1/model/RepositoryNameExistsException.ts deleted file mode 100644 index 4b523f3343df..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryNameRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryNameRequiredException.ts deleted file mode 100644 index 6a8876f38119..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryNamesRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryNamesRequiredException.ts deleted file mode 100644 index 89edca64d164..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryTriggerBranchNameListRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggerBranchNameListRequiredException.ts deleted file mode 100644 index 90103b668a16..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryTriggerDestinationArnRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggerDestinationArnRequiredException.ts deleted file mode 100644 index 6a6d1abcfaa7..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryTriggerEventsListRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggerEventsListRequiredException.ts deleted file mode 100644 index cda8597d7fa1..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryTriggerNameRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggerNameRequiredException.ts deleted file mode 100644 index b3e8ffbe8571..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/RepositoryTriggersListRequiredException.ts b/packages/model-codecommit-v1/model/RepositoryTriggersListRequiredException.ts deleted file mode 100644 index dd37846e0bf8..000000000000 --- 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', -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/ServiceMetadata.ts b/packages/model-codecommit-v1/model/ServiceMetadata.ts deleted file mode 100644 index 0111e1a5035a..000000000000 --- 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' -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/TestRepositoryTriggers.ts b/packages/model-codecommit-v1/model/TestRepositoryTriggers.ts deleted file mode 100644 index c1a20325c230..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/TestRepositoryTriggersInput.ts b/packages/model-codecommit-v1/model/TestRepositoryTriggersInput.ts deleted file mode 100644 index 9827b898fa59..000000000000 --- a/packages/model-codecommit-v1/model/TestRepositoryTriggersInput.ts +++ /dev/null @@ -1,21 +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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/TestRepositoryTriggersOutput.ts b/packages/model-codecommit-v1/model/TestRepositoryTriggersOutput.ts deleted file mode 100644 index aa071427c5b1..000000000000 --- 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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/UpdateDefaultBranch.ts b/packages/model-codecommit-v1/model/UpdateDefaultBranch.ts deleted file mode 100644 index 76b2bc0464f6..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryDescription.ts b/packages/model-codecommit-v1/model/UpdateRepositoryDescription.ts deleted file mode 100644 index 3fcf04d75fff..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionInput.ts b/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionInput.ts deleted file mode 100644 index 3b64a29eafa1..000000000000 --- a/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionInput.ts +++ /dev/null @@ -1,21 +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', - }, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryName.ts b/packages/model-codecommit-v1/model/UpdateRepositoryName.ts deleted file mode 100644 index 9499dccc4107..000000000000 --- 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, - }, - ], -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_Difference.ts b/packages/model-codecommit-v1/model/_Difference.ts deleted file mode 100644 index 6ff28dece656..000000000000 --- 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', - }, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_DifferenceList.ts b/packages/model-codecommit-v1/model/_DifferenceList.ts deleted file mode 100644 index a5c93601d760..000000000000 --- 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, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_RepositoryMetadataList.ts b/packages/model-codecommit-v1/model/_RepositoryMetadataList.ts deleted file mode 100644 index 83b87e777dfd..000000000000 --- 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, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_RepositoryNameIdPairList.ts b/packages/model-codecommit-v1/model/_RepositoryNameIdPairList.ts deleted file mode 100644 index e180a4ff72ec..000000000000 --- 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, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_RepositoryTrigger.ts b/packages/model-codecommit-v1/model/_RepositoryTrigger.ts deleted file mode 100644 index ad03ac64a531..000000000000 --- a/packages/model-codecommit-v1/model/_RepositoryTrigger.ts +++ /dev/null @@ -1,35 +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, - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggerEventList.ts b/packages/model-codecommit-v1/model/_RepositoryTriggerEventList.ts deleted file mode 100644 index edf975c4e1d0..000000000000 --- 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', - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailureList.ts b/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailureList.ts deleted file mode 100644 index 5b2db9870cd9..000000000000 --- 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, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggerNameList.ts b/packages/model-codecommit-v1/model/_RepositoryTriggerNameList.ts deleted file mode 100644 index b2f29444e433..000000000000 --- 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', - }, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggersList.ts b/packages/model-codecommit-v1/model/_RepositoryTriggersList.ts deleted file mode 100644 index cc7a18bc132c..000000000000 --- 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, - }, -}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/package.json b/packages/model-codecommit-v1/package.json deleted file mode 100644 index b0a05171938a..000000000000 --- 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/package-generator/package.json b/packages/package-generator/package.json index f6de0c46c0fc..9ff18e5d4da6 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 000000000000..9082de53d0a2 --- /dev/null +++ b/packages/package-generator/src/ClientModuleGenerator.ts @@ -0,0 +1,212 @@ +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 6bcb3ffa6cc0..3957626dd167 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() diff --git a/packages/package-generator/src/commands/CreateClientPackageCommand.ts b/packages/package-generator/src/commands/CreateClientPackageCommand.ts new file mode 100644 index 000000000000..4b63177843b4 --- /dev/null +++ b/packages/package-generator/src/commands/CreateClientPackageCommand.ts @@ -0,0 +1,36 @@ +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 24fd8818a0ec..d9b257f3c45f 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 cd63f1642d76..84f16327b925 100644 --- a/packages/protocol-json-rpc/src/JsonRpcSerializer.ts +++ b/packages/protocol-json-rpc/src/JsonRpcSerializer.ts @@ -6,13 +6,15 @@ 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: { diff --git a/packages/protocol-query/src/QuerySerializer.ts b/packages/protocol-query/src/QuerySerializer.ts index 0dafeecc5c8b..3d22ba8936de 100644 --- a/packages/protocol-query/src/QuerySerializer.ts +++ b/packages/protocol-query/src/QuerySerializer.ts @@ -9,13 +9,15 @@ 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}} = operation; return { ...this.endpoint, @@ -28,4 +30,4 @@ export class QuerySerializer implements RequestSerializer { path: operation.http.requestUri }; } -} \ No newline at end of file +} diff --git a/packages/protocol-rest/src/RestSerializer.ts b/packages/protocol-rest/src/RestSerializer.ts index f2e9e5c44264..c0b69d1f86bd 100644 --- a/packages/protocol-rest/src/RestSerializer.ts +++ b/packages/protocol-rest/src/RestSerializer.ts @@ -25,7 +25,9 @@ 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, @@ -33,7 +35,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 0c307376e890..95d3fccae635 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/region-provider/src/fromSharedConfigFiles.ts b/packages/region-provider/src/fromSharedConfigFiles.ts index 87fdc4dd5adb..2833ed145d56 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 5d9bfa14c94e..50e087f797ea 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 +} diff --git a/packages/model-codecommit-v1/.gitignore b/packages/sdk-kms-node/.gitignore similarity index 100% rename from packages/model-codecommit-v1/.gitignore rename to packages/sdk-kms-node/.gitignore diff --git a/packages/model-codecommit-v1/.npmignore b/packages/sdk-kms-node/.npmignore similarity index 100% rename from packages/model-codecommit-v1/.npmignore rename to packages/sdk-kms-node/.npmignore diff --git a/packages/sdk-kms-node/KMS.ts b/packages/sdk-kms-node/KMS.ts new file mode 100644 index 000000000000..ebfc9c43d5a6 --- /dev/null +++ b/packages/sdk-kms-node/KMS.ts @@ -0,0 +1,966 @@ +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 000000000000..be135fca6cec --- /dev/null +++ b/packages/sdk-kms-node/KMSClient.ts @@ -0,0 +1,463 @@ +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< + 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< + InputType extends InputTypesUnion, + OutputType extends OutputTypesUnion + >( + 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/model-codecommit-v1/LICENSE b/packages/sdk-kms-node/LICENSE similarity index 100% rename from packages/model-codecommit-v1/LICENSE rename to packages/sdk-kms-node/LICENSE diff --git a/packages/sdk-kms-node/README.md b/packages/sdk-kms-node/README.md new file mode 100644 index 000000000000..4241eed99a8d --- /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 000000000000..318ff4a1711e --- /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'; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/AlreadyExistsException.ts b/packages/sdk-kms-node/model/AlreadyExistsException.ts new file mode 100644 index 000000000000..d2a786cec47c --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/CancelKeyDeletion.ts b/packages/sdk-kms-node/model/CancelKeyDeletion.ts new file mode 100644 index 000000000000..c6067ead975d --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetRepositoryInput.ts b/packages/sdk-kms-node/model/CancelKeyDeletionInput.ts similarity index 69% rename from packages/model-codecommit-v1/model/GetRepositoryInput.ts rename to packages/sdk-kms-node/model/CancelKeyDeletionInput.ts index 4b63be4641fc..59eeb57577bb 100644 --- a/packages/model-codecommit-v1/model/GetRepositoryInput.ts +++ b/packages/sdk-kms-node/model/CancelKeyDeletionInput.ts @@ -1,12 +1,12 @@ import {Structure as _Structure_} from '@aws/types'; -export const GetRepositoryInput: _Structure_ = { +export const CancelKeyDeletionInput: _Structure_ = { type: 'structure', required: [ - 'repositoryName', + 'KeyId', ], members: { - repositoryName: { + KeyId: { shape: { type: 'string', min: 1, diff --git a/packages/model-codecommit-v1/model/PutRepositoryTriggersOutput.ts b/packages/sdk-kms-node/model/CancelKeyDeletionOutput.ts similarity index 67% rename from packages/model-codecommit-v1/model/PutRepositoryTriggersOutput.ts rename to packages/sdk-kms-node/model/CancelKeyDeletionOutput.ts index 8706254f46fb..a341826f45d8 100644 --- a/packages/model-codecommit-v1/model/PutRepositoryTriggersOutput.ts +++ b/packages/sdk-kms-node/model/CancelKeyDeletionOutput.ts @@ -1,12 +1,13 @@ import {Structure as _Structure_} from '@aws/types'; -export const PutRepositoryTriggersOutput: _Structure_ = { +export const CancelKeyDeletionOutput: _Structure_ = { type: 'structure', required: [], members: { - configurationId: { + 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 000000000000..91cd0dfba3a3 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/DeleteBranchInput.ts b/packages/sdk-kms-node/model/CreateAliasInput.ts similarity index 69% rename from packages/model-codecommit-v1/model/DeleteBranchInput.ts rename to packages/sdk-kms-node/model/CreateAliasInput.ts index 25ef696f2bd0..fe773e2af5ca 100644 --- a/packages/model-codecommit-v1/model/DeleteBranchInput.ts +++ b/packages/sdk-kms-node/model/CreateAliasInput.ts @@ -1,19 +1,19 @@ import {Structure as _Structure_} from '@aws/types'; -export const DeleteBranchInput: _Structure_ = { +export const CreateAliasInput: _Structure_ = { type: 'structure', required: [ - 'repositoryName', - 'branchName', + 'AliasName', + 'TargetKeyId', ], members: { - repositoryName: { + AliasName: { shape: { type: 'string', min: 1, }, }, - branchName: { + TargetKeyId: { shape: { type: 'string', min: 1, diff --git a/packages/model-codecommit-v1/model/CreateBranchOutput.ts b/packages/sdk-kms-node/model/CreateAliasOutput.ts similarity index 69% rename from packages/model-codecommit-v1/model/CreateBranchOutput.ts rename to packages/sdk-kms-node/model/CreateAliasOutput.ts index e7188a277938..27853350619f 100644 --- a/packages/model-codecommit-v1/model/CreateBranchOutput.ts +++ b/packages/sdk-kms-node/model/CreateAliasOutput.ts @@ -1,6 +1,6 @@ import {Structure as _Structure_} from '@aws/types'; -export const CreateBranchOutput: _Structure_ = { +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 000000000000..047421feeaae --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/CreateGrantInput.ts b/packages/sdk-kms-node/model/CreateGrantInput.ts new file mode 100644 index 000000000000..a958002a745a --- /dev/null +++ b/packages/sdk-kms-node/model/CreateGrantInput.ts @@ -0,0 +1,48 @@ +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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetBranchInput.ts b/packages/sdk-kms-node/model/CreateGrantOutput.ts similarity index 77% rename from packages/model-codecommit-v1/model/GetBranchInput.ts rename to packages/sdk-kms-node/model/CreateGrantOutput.ts index f9a1847cb11f..7ae369f2afa8 100644 --- a/packages/model-codecommit-v1/model/GetBranchInput.ts +++ b/packages/sdk-kms-node/model/CreateGrantOutput.ts @@ -1,16 +1,16 @@ import {Structure as _Structure_} from '@aws/types'; -export const GetBranchInput: _Structure_ = { +export const CreateGrantOutput: _Structure_ = { type: 'structure', required: [], members: { - repositoryName: { + GrantToken: { shape: { type: 'string', min: 1, }, }, - branchName: { + 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 000000000000..c2120d7c9584 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_Commit.ts b/packages/sdk-kms-node/model/CreateKeyInput.ts similarity index 55% rename from packages/model-codecommit-v1/model/_Commit.ts rename to packages/sdk-kms-node/model/CreateKeyInput.ts index 329d0f59cd2a..64a69c4d6029 100644 --- a/packages/model-codecommit-v1/model/_Commit.ts +++ b/packages/sdk-kms-node/model/CreateKeyInput.ts @@ -1,39 +1,38 @@ -import {_ParentList} from './_ParentList'; -import {_UserInfo} from './_UserInfo'; +import {_TagList} from './_TagList'; import {Structure as _Structure_} from '@aws/types'; -export const _Commit: _Structure_ = { +export const CreateKeyInput: _Structure_ = { type: 'structure', required: [], members: { - commitId: { + Policy: { shape: { type: 'string', + min: 1, }, }, - treeId: { + Description: { shape: { type: 'string', }, }, - parents: { - shape: _ParentList, - }, - message: { + KeyUsage: { shape: { type: 'string', }, }, - author: { - shape: _UserInfo, - }, - committer: { - shape: _UserInfo, - }, - additionalData: { + Origin: { shape: { type: 'string', }, }, + BypassPolicyLockoutSafetyCheck: { + shape: { + type: 'boolean', + }, + }, + Tags: { + shape: _TagList, + }, }, }; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/CreateKeyOutput.ts b/packages/sdk-kms-node/model/CreateKeyOutput.ts new file mode 100644 index 000000000000..f918ceff3197 --- /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, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/Decrypt.ts b/packages/sdk-kms-node/model/Decrypt.ts new file mode 100644 index 000000000000..75fb6b5c658e --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DecryptInput.ts b/packages/sdk-kms-node/model/DecryptInput.ts new file mode 100644 index 000000000000..e57a0e8054e0 --- /dev/null +++ b/packages/sdk-kms-node/model/DecryptInput.ts @@ -0,0 +1,23 @@ +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, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DecryptOutput.ts b/packages/sdk-kms-node/model/DecryptOutput.ts new file mode 100644 index 000000000000..63a5b4b61a5c --- /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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DeleteAlias.ts b/packages/sdk-kms-node/model/DeleteAlias.ts new file mode 100644 index 000000000000..7cf4b7df9c53 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/DeleteRepositoryInput.ts b/packages/sdk-kms-node/model/DeleteAliasInput.ts similarity index 68% rename from packages/model-codecommit-v1/model/DeleteRepositoryInput.ts rename to packages/sdk-kms-node/model/DeleteAliasInput.ts index 3cbf6f112d55..5de4e204693b 100644 --- a/packages/model-codecommit-v1/model/DeleteRepositoryInput.ts +++ b/packages/sdk-kms-node/model/DeleteAliasInput.ts @@ -1,12 +1,12 @@ import {Structure as _Structure_} from '@aws/types'; -export const DeleteRepositoryInput: _Structure_ = { +export const DeleteAliasInput: _Structure_ = { type: 'structure', required: [ - 'repositoryName', + 'AliasName', ], members: { - repositoryName: { + AliasName: { shape: { type: 'string', min: 1, diff --git a/packages/model-codecommit-v1/model/UpdateDefaultBranchOutput.ts b/packages/sdk-kms-node/model/DeleteAliasOutput.ts similarity index 67% rename from packages/model-codecommit-v1/model/UpdateDefaultBranchOutput.ts rename to packages/sdk-kms-node/model/DeleteAliasOutput.ts index 4ba49e301013..2a49372fbb59 100644 --- a/packages/model-codecommit-v1/model/UpdateDefaultBranchOutput.ts +++ b/packages/sdk-kms-node/model/DeleteAliasOutput.ts @@ -1,6 +1,6 @@ import {Structure as _Structure_} from '@aws/types'; -export const UpdateDefaultBranchOutput: _Structure_ = { +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 000000000000..d830e75fe6de --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetRepositoryTriggersInput.ts b/packages/sdk-kms-node/model/DeleteImportedKeyMaterialInput.ts similarity index 67% rename from packages/model-codecommit-v1/model/GetRepositoryTriggersInput.ts rename to packages/sdk-kms-node/model/DeleteImportedKeyMaterialInput.ts index c1acdb32e8db..e3510cbe665c 100644 --- a/packages/model-codecommit-v1/model/GetRepositoryTriggersInput.ts +++ b/packages/sdk-kms-node/model/DeleteImportedKeyMaterialInput.ts @@ -1,12 +1,12 @@ import {Structure as _Structure_} from '@aws/types'; -export const GetRepositoryTriggersInput: _Structure_ = { +export const DeleteImportedKeyMaterialInput: _Structure_ = { type: 'structure', required: [ - 'repositoryName', + 'KeyId', ], members: { - repositoryName: { + KeyId: { shape: { type: 'string', min: 1, diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionOutput.ts b/packages/sdk-kms-node/model/DeleteImportedKeyMaterialOutput.ts similarity index 64% rename from packages/model-codecommit-v1/model/UpdateRepositoryDescriptionOutput.ts rename to packages/sdk-kms-node/model/DeleteImportedKeyMaterialOutput.ts index ca80395a29d6..a1a80dc3f848 100644 --- a/packages/model-codecommit-v1/model/UpdateRepositoryDescriptionOutput.ts +++ b/packages/sdk-kms-node/model/DeleteImportedKeyMaterialOutput.ts @@ -1,6 +1,6 @@ import {Structure as _Structure_} from '@aws/types'; -export const UpdateRepositoryDescriptionOutput: _Structure_ = { +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 000000000000..8f066554ffce --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DescribeKey.ts b/packages/sdk-kms-node/model/DescribeKey.ts new file mode 100644 index 000000000000..b0fae6bc1b3c --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetCommitInput.ts b/packages/sdk-kms-node/model/DescribeKeyInput.ts similarity index 53% rename from packages/model-codecommit-v1/model/GetCommitInput.ts rename to packages/sdk-kms-node/model/DescribeKeyInput.ts index 2d48e170f3e6..29c11793be2a 100644 --- a/packages/model-codecommit-v1/model/GetCommitInput.ts +++ b/packages/sdk-kms-node/model/DescribeKeyInput.ts @@ -1,22 +1,20 @@ +import {_GrantTokenList} from './_GrantTokenList'; import {Structure as _Structure_} from '@aws/types'; -export const GetCommitInput: _Structure_ = { +export const DescribeKeyInput: _Structure_ = { type: 'structure', required: [ - 'repositoryName', - 'commitId', + 'KeyId', ], members: { - repositoryName: { + KeyId: { shape: { type: 'string', min: 1, }, }, - commitId: { - shape: { - type: 'string', - }, + GrantTokens: { + shape: _GrantTokenList, }, }, }; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DescribeKeyOutput.ts b/packages/sdk-kms-node/model/DescribeKeyOutput.ts new file mode 100644 index 000000000000..354f80b58948 --- /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, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DisableKey.ts b/packages/sdk-kms-node/model/DisableKey.ts new file mode 100644 index 000000000000..156522845f0a --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DisableKeyInput.ts b/packages/sdk-kms-node/model/DisableKeyInput.ts new file mode 100644 index 000000000000..9ebf7711b0c9 --- /dev/null +++ b/packages/sdk-kms-node/model/DisableKeyInput.ts @@ -0,0 +1,16 @@ +import {Structure as _Structure_} from '@aws/types'; + +export const DisableKeyInput: _Structure_ = { + type: 'structure', + required: [ + 'KeyId', + ], + members: { + KeyId: { + shape: { + type: 'string', + min: 1, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryNameOutput.ts b/packages/sdk-kms-node/model/DisableKeyOutput.ts similarity index 66% rename from packages/model-codecommit-v1/model/UpdateRepositoryNameOutput.ts rename to packages/sdk-kms-node/model/DisableKeyOutput.ts index 5283a87e7cce..897c75e8f7fe 100644 --- a/packages/model-codecommit-v1/model/UpdateRepositoryNameOutput.ts +++ b/packages/sdk-kms-node/model/DisableKeyOutput.ts @@ -1,6 +1,6 @@ import {Structure as _Structure_} from '@aws/types'; -export const UpdateRepositoryNameOutput: _Structure_ = { +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 000000000000..36b52ce60d5f --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DisableKeyRotationInput.ts b/packages/sdk-kms-node/model/DisableKeyRotationInput.ts new file mode 100644 index 000000000000..95305528753d --- /dev/null +++ b/packages/sdk-kms-node/model/DisableKeyRotationInput.ts @@ -0,0 +1,16 @@ +import {Structure as _Structure_} from '@aws/types'; + +export const DisableKeyRotationInput: _Structure_ = { + type: 'structure', + required: [ + 'KeyId', + ], + members: { + KeyId: { + shape: { + type: 'string', + min: 1, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DisableKeyRotationOutput.ts b/packages/sdk-kms-node/model/DisableKeyRotationOutput.ts new file mode 100644 index 000000000000..181cb2d6e7ff --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/DisabledException.ts b/packages/sdk-kms-node/model/DisabledException.ts new file mode 100644 index 000000000000..feaf0558f7dc --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/EnableKey.ts b/packages/sdk-kms-node/model/EnableKey.ts new file mode 100644 index 000000000000..f6f0d3f859c5 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/EnableKeyInput.ts b/packages/sdk-kms-node/model/EnableKeyInput.ts new file mode 100644 index 000000000000..878a3cec0dd5 --- /dev/null +++ b/packages/sdk-kms-node/model/EnableKeyInput.ts @@ -0,0 +1,16 @@ +import {Structure as _Structure_} from '@aws/types'; + +export const EnableKeyInput: _Structure_ = { + type: 'structure', + required: [ + 'KeyId', + ], + members: { + KeyId: { + shape: { + type: 'string', + min: 1, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/EnableKeyOutput.ts b/packages/sdk-kms-node/model/EnableKeyOutput.ts new file mode 100644 index 000000000000..9ab09fac685c --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/EnableKeyRotation.ts b/packages/sdk-kms-node/model/EnableKeyRotation.ts new file mode 100644 index 000000000000..709db469ac2c --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/EnableKeyRotationInput.ts b/packages/sdk-kms-node/model/EnableKeyRotationInput.ts new file mode 100644 index 000000000000..014e8151687e --- /dev/null +++ b/packages/sdk-kms-node/model/EnableKeyRotationInput.ts @@ -0,0 +1,16 @@ +import {Structure as _Structure_} from '@aws/types'; + +export const EnableKeyRotationInput: _Structure_ = { + type: 'structure', + required: [ + 'KeyId', + ], + members: { + KeyId: { + shape: { + type: 'string', + min: 1, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/EnableKeyRotationOutput.ts b/packages/sdk-kms-node/model/EnableKeyRotationOutput.ts new file mode 100644 index 000000000000..8e68fa59d38d --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/Encrypt.ts b/packages/sdk-kms-node/model/Encrypt.ts new file mode 100644 index 000000000000..0f2f9cd3b605 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/EncryptInput.ts b/packages/sdk-kms-node/model/EncryptInput.ts new file mode 100644 index 000000000000..e76cab4e5675 --- /dev/null +++ b/packages/sdk-kms-node/model/EncryptInput.ts @@ -0,0 +1,31 @@ +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, + }, + }, +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_BranchInfo.ts b/packages/sdk-kms-node/model/EncryptOutput.ts similarity index 69% rename from packages/model-codecommit-v1/model/_BranchInfo.ts rename to packages/sdk-kms-node/model/EncryptOutput.ts index f81a9d305b53..02240a8dbaf7 100644 --- a/packages/model-codecommit-v1/model/_BranchInfo.ts +++ b/packages/sdk-kms-node/model/EncryptOutput.ts @@ -1,18 +1,18 @@ import {Structure as _Structure_} from '@aws/types'; -export const _BranchInfo: _Structure_ = { +export const EncryptOutput: _Structure_ = { type: 'structure', required: [], members: { - branchName: { + CiphertextBlob: { shape: { - type: 'string', - min: 1, + type: 'blob', }, }, - commitId: { + 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 000000000000..2cbfeaa3134d --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GenerateDataKey.ts b/packages/sdk-kms-node/model/GenerateDataKey.ts new file mode 100644 index 000000000000..98455ac7694e --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GenerateDataKeyInput.ts b/packages/sdk-kms-node/model/GenerateDataKeyInput.ts new file mode 100644 index 000000000000..d3605ac6b97a --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateDataKeyInput.ts @@ -0,0 +1,35 @@ +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, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GenerateDataKeyOutput.ts b/packages/sdk-kms-node/model/GenerateDataKeyOutput.ts new file mode 100644 index 000000000000..8510b93693a0 --- /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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintext.ts b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintext.ts new file mode 100644 index 000000000000..190db0db71ff --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextInput.ts b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextInput.ts new file mode 100644 index 000000000000..2c99fb38a65d --- /dev/null +++ b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextInput.ts @@ -0,0 +1,35 @@ +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, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextOutput.ts b/packages/sdk-kms-node/model/GenerateDataKeyWithoutPlaintextOutput.ts new file mode 100644 index 000000000000..321cade34ac6 --- /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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GenerateRandom.ts b/packages/sdk-kms-node/model/GenerateRandom.ts new file mode 100644 index 000000000000..e312a3eb9bee --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GenerateRandomInput.ts b/packages/sdk-kms-node/model/GenerateRandomInput.ts new file mode 100644 index 000000000000..3bc7cfbd05e2 --- /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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetBlobOutput.ts b/packages/sdk-kms-node/model/GenerateRandomOutput.ts similarity index 59% rename from packages/model-codecommit-v1/model/GetBlobOutput.ts rename to packages/sdk-kms-node/model/GenerateRandomOutput.ts index f4645a40bcce..b506b1db2e34 100644 --- a/packages/model-codecommit-v1/model/GetBlobOutput.ts +++ b/packages/sdk-kms-node/model/GenerateRandomOutput.ts @@ -1,14 +1,13 @@ import {Structure as _Structure_} from '@aws/types'; -export const GetBlobOutput: _Structure_ = { +export const GenerateRandomOutput: _Structure_ = { type: 'structure', - required: [ - 'content', - ], + required: [], members: { - content: { + 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 000000000000..9d3a5ffe0ff1 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/UpdateRepositoryNameInput.ts b/packages/sdk-kms-node/model/GetKeyPolicyInput.ts similarity index 71% rename from packages/model-codecommit-v1/model/UpdateRepositoryNameInput.ts rename to packages/sdk-kms-node/model/GetKeyPolicyInput.ts index 5993c45c416f..41c0abb3b49b 100644 --- a/packages/model-codecommit-v1/model/UpdateRepositoryNameInput.ts +++ b/packages/sdk-kms-node/model/GetKeyPolicyInput.ts @@ -1,19 +1,19 @@ import {Structure as _Structure_} from '@aws/types'; -export const UpdateRepositoryNameInput: _Structure_ = { +export const GetKeyPolicyInput: _Structure_ = { type: 'structure', required: [ - 'oldName', - 'newName', + 'KeyId', + 'PolicyName', ], members: { - oldName: { + KeyId: { shape: { type: 'string', min: 1, }, }, - newName: { + PolicyName: { shape: { type: 'string', min: 1, diff --git a/packages/model-codecommit-v1/model/DeleteRepositoryOutput.ts b/packages/sdk-kms-node/model/GetKeyPolicyOutput.ts similarity index 68% rename from packages/model-codecommit-v1/model/DeleteRepositoryOutput.ts rename to packages/sdk-kms-node/model/GetKeyPolicyOutput.ts index 45f5631448b8..4a81c933b2eb 100644 --- a/packages/model-codecommit-v1/model/DeleteRepositoryOutput.ts +++ b/packages/sdk-kms-node/model/GetKeyPolicyOutput.ts @@ -1,12 +1,13 @@ import {Structure as _Structure_} from '@aws/types'; -export const DeleteRepositoryOutput: _Structure_ = { +export const GetKeyPolicyOutput: _Structure_ = { type: 'structure', required: [], members: { - repositoryId: { + 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 000000000000..26cc07c40fcd --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GetKeyRotationStatusInput.ts b/packages/sdk-kms-node/model/GetKeyRotationStatusInput.ts new file mode 100644 index 000000000000..e564013cd3f5 --- /dev/null +++ b/packages/sdk-kms-node/model/GetKeyRotationStatusInput.ts @@ -0,0 +1,16 @@ +import {Structure as _Structure_} from '@aws/types'; + +export const GetKeyRotationStatusInput: _Structure_ = { + type: 'structure', + required: [ + 'KeyId', + ], + members: { + KeyId: { + shape: { + type: 'string', + min: 1, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GetKeyRotationStatusOutput.ts b/packages/sdk-kms-node/model/GetKeyRotationStatusOutput.ts new file mode 100644 index 000000000000..0b147f295630 --- /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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/GetParametersForImport.ts b/packages/sdk-kms-node/model/GetParametersForImport.ts new file mode 100644 index 000000000000..2b5ab60c0585 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/CreateBranchInput.ts b/packages/sdk-kms-node/model/GetParametersForImportInput.ts similarity index 64% rename from packages/model-codecommit-v1/model/CreateBranchInput.ts rename to packages/sdk-kms-node/model/GetParametersForImportInput.ts index 7d8dda10a162..47d2e0c82ec0 100644 --- a/packages/model-codecommit-v1/model/CreateBranchInput.ts +++ b/packages/sdk-kms-node/model/GetParametersForImportInput.ts @@ -1,26 +1,25 @@ import {Structure as _Structure_} from '@aws/types'; -export const CreateBranchInput: _Structure_ = { +export const GetParametersForImportInput: _Structure_ = { type: 'structure', required: [ - 'repositoryName', - 'branchName', - 'commitId', + 'KeyId', + 'WrappingAlgorithm', + 'WrappingKeySpec', ], members: { - repositoryName: { + KeyId: { shape: { type: 'string', min: 1, }, }, - branchName: { + WrappingAlgorithm: { shape: { type: 'string', - min: 1, }, }, - commitId: { + 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 000000000000..646d99bd3b8c --- /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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ImportKeyMaterial.ts b/packages/sdk-kms-node/model/ImportKeyMaterial.ts new file mode 100644 index 000000000000..e855312d895c --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ImportKeyMaterialInput.ts b/packages/sdk-kms-node/model/ImportKeyMaterialInput.ts new file mode 100644 index 000000000000..c22e03ec4639 --- /dev/null +++ b/packages/sdk-kms-node/model/ImportKeyMaterialInput.ts @@ -0,0 +1,38 @@ +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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ImportKeyMaterialOutput.ts b/packages/sdk-kms-node/model/ImportKeyMaterialOutput.ts new file mode 100644 index 000000000000..499f60db3343 --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/IncorrectKeyMaterialException.ts b/packages/sdk-kms-node/model/IncorrectKeyMaterialException.ts new file mode 100644 index 000000000000..f53af140b18c --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/InvalidAliasNameException.ts b/packages/sdk-kms-node/model/InvalidAliasNameException.ts new file mode 100644 index 000000000000..8b5f5c6ccf41 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/InvalidArnException.ts b/packages/sdk-kms-node/model/InvalidArnException.ts new file mode 100644 index 000000000000..f1a681906852 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/InvalidCiphertextException.ts b/packages/sdk-kms-node/model/InvalidCiphertextException.ts new file mode 100644 index 000000000000..c84ab53aca8c --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/InvalidGrantIdException.ts b/packages/sdk-kms-node/model/InvalidGrantIdException.ts new file mode 100644 index 000000000000..371c9458aec6 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/InvalidGrantTokenException.ts b/packages/sdk-kms-node/model/InvalidGrantTokenException.ts new file mode 100644 index 000000000000..9e629e6746ca --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/InvalidImportTokenException.ts b/packages/sdk-kms-node/model/InvalidImportTokenException.ts new file mode 100644 index 000000000000..ab8c35f86bf2 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/InvalidKeyUsageException.ts b/packages/sdk-kms-node/model/InvalidKeyUsageException.ts new file mode 100644 index 000000000000..eabd3fd75c16 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/InvalidMarkerException.ts b/packages/sdk-kms-node/model/InvalidMarkerException.ts new file mode 100644 index 000000000000..0b458f50d0f5 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/KMSInternalException.ts b/packages/sdk-kms-node/model/KMSInternalException.ts new file mode 100644 index 000000000000..e639319cfbd3 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/KMSInvalidStateException.ts b/packages/sdk-kms-node/model/KMSInvalidStateException.ts new file mode 100644 index 000000000000..35b78f621f76 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/KeyUnavailableException.ts b/packages/sdk-kms-node/model/KeyUnavailableException.ts new file mode 100644 index 000000000000..855bc03c54cf --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/LimitExceededException.ts b/packages/sdk-kms-node/model/LimitExceededException.ts new file mode 100644 index 000000000000..455f35ab1b26 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListAliases.ts b/packages/sdk-kms-node/model/ListAliases.ts new file mode 100644 index 000000000000..00654ffce733 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListAliasesInput.ts b/packages/sdk-kms-node/model/ListAliasesInput.ts new file mode 100644 index 000000000000..b201110c9da2 --- /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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListAliasesOutput.ts b/packages/sdk-kms-node/model/ListAliasesOutput.ts new file mode 100644 index 000000000000..d810b806a43d --- /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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListGrants.ts b/packages/sdk-kms-node/model/ListGrants.ts new file mode 100644 index 000000000000..35f6079e7cfd --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListGrantsInput.ts b/packages/sdk-kms-node/model/ListGrantsInput.ts new file mode 100644 index 000000000000..6cd1d8967b2c --- /dev/null +++ b/packages/sdk-kms-node/model/ListGrantsInput.ts @@ -0,0 +1,28 @@ +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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListGrantsOutput.ts b/packages/sdk-kms-node/model/ListGrantsOutput.ts new file mode 100644 index 000000000000..94742c6c582d --- /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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListKeyPolicies.ts b/packages/sdk-kms-node/model/ListKeyPolicies.ts new file mode 100644 index 000000000000..c91704ac4ad0 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListKeyPoliciesInput.ts b/packages/sdk-kms-node/model/ListKeyPoliciesInput.ts new file mode 100644 index 000000000000..454f55bd98b7 --- /dev/null +++ b/packages/sdk-kms-node/model/ListKeyPoliciesInput.ts @@ -0,0 +1,28 @@ +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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListKeyPoliciesOutput.ts b/packages/sdk-kms-node/model/ListKeyPoliciesOutput.ts new file mode 100644 index 000000000000..f8eb167d4b33 --- /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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListKeys.ts b/packages/sdk-kms-node/model/ListKeys.ts new file mode 100644 index 000000000000..f8113fed5e85 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListKeysInput.ts b/packages/sdk-kms-node/model/ListKeysInput.ts new file mode 100644 index 000000000000..567f10f48a9d --- /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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListKeysOutput.ts b/packages/sdk-kms-node/model/ListKeysOutput.ts new file mode 100644 index 000000000000..f4ef5066af9e --- /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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListResourceTags.ts b/packages/sdk-kms-node/model/ListResourceTags.ts new file mode 100644 index 000000000000..d96c2bd619fb --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListResourceTagsInput.ts b/packages/sdk-kms-node/model/ListResourceTagsInput.ts new file mode 100644 index 000000000000..c7d8ab05b124 --- /dev/null +++ b/packages/sdk-kms-node/model/ListResourceTagsInput.ts @@ -0,0 +1,28 @@ +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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListResourceTagsOutput.ts b/packages/sdk-kms-node/model/ListResourceTagsOutput.ts new file mode 100644 index 000000000000..46a93e611c12 --- /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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListRetirableGrants.ts b/packages/sdk-kms-node/model/ListRetirableGrants.ts new file mode 100644 index 000000000000..96a8e40de26a --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListRetirableGrantsInput.ts b/packages/sdk-kms-node/model/ListRetirableGrantsInput.ts new file mode 100644 index 000000000000..6c2a5d249926 --- /dev/null +++ b/packages/sdk-kms-node/model/ListRetirableGrantsInput.ts @@ -0,0 +1,28 @@ +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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ListRetirableGrantsOutput.ts b/packages/sdk-kms-node/model/ListRetirableGrantsOutput.ts new file mode 100644 index 000000000000..80268f3b30fd --- /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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/MalformedPolicyDocumentException.ts b/packages/sdk-kms-node/model/MalformedPolicyDocumentException.ts new file mode 100644 index 000000000000..ad7745a68ecb --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/NotFoundException.ts b/packages/sdk-kms-node/model/NotFoundException.ts new file mode 100644 index 000000000000..dfb27883c687 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/PutKeyPolicy.ts b/packages/sdk-kms-node/model/PutKeyPolicy.ts new file mode 100644 index 000000000000..b9313adc6d76 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/PutKeyPolicyInput.ts b/packages/sdk-kms-node/model/PutKeyPolicyInput.ts new file mode 100644 index 000000000000..b789c265ca6e --- /dev/null +++ b/packages/sdk-kms-node/model/PutKeyPolicyInput.ts @@ -0,0 +1,35 @@ +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', + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/PutKeyPolicyOutput.ts b/packages/sdk-kms-node/model/PutKeyPolicyOutput.ts new file mode 100644 index 000000000000..028a0749b0e4 --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ReEncrypt.ts b/packages/sdk-kms-node/model/ReEncrypt.ts new file mode 100644 index 000000000000..563681d45850 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ReEncryptInput.ts b/packages/sdk-kms-node/model/ReEncryptInput.ts new file mode 100644 index 000000000000..a3e9d487f44d --- /dev/null +++ b/packages/sdk-kms-node/model/ReEncryptInput.ts @@ -0,0 +1,33 @@ +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, + }, + }, +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/ListRepositoriesInput.ts b/packages/sdk-kms-node/model/ReEncryptOutput.ts similarity index 63% rename from packages/model-codecommit-v1/model/ListRepositoriesInput.ts rename to packages/sdk-kms-node/model/ReEncryptOutput.ts index 964bc2f4ae65..7bf4756d1839 100644 --- a/packages/model-codecommit-v1/model/ListRepositoriesInput.ts +++ b/packages/sdk-kms-node/model/ReEncryptOutput.ts @@ -1,22 +1,24 @@ import {Structure as _Structure_} from '@aws/types'; -export const ListRepositoriesInput: _Structure_ = { +export const ReEncryptOutput: _Structure_ = { type: 'structure', required: [], members: { - nextToken: { + CiphertextBlob: { shape: { - type: 'string', + type: 'blob', }, }, - sortBy: { + SourceKeyId: { shape: { type: 'string', + min: 1, }, }, - order: { + 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 000000000000..e0c17008f6dd --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_BlobMetadata.ts b/packages/sdk-kms-node/model/RetireGrantInput.ts similarity index 66% rename from packages/model-codecommit-v1/model/_BlobMetadata.ts rename to packages/sdk-kms-node/model/RetireGrantInput.ts index 74473cffd358..bc88b44bf931 100644 --- a/packages/model-codecommit-v1/model/_BlobMetadata.ts +++ b/packages/sdk-kms-node/model/RetireGrantInput.ts @@ -1,22 +1,25 @@ import {Structure as _Structure_} from '@aws/types'; -export const _BlobMetadata: _Structure_ = { +export const RetireGrantInput: _Structure_ = { type: 'structure', required: [], members: { - blobId: { + GrantToken: { shape: { type: 'string', + min: 1, }, }, - path: { + KeyId: { shape: { type: 'string', + min: 1, }, }, - mode: { + 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 000000000000..4e69dcce229b --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/RevokeGrant.ts b/packages/sdk-kms-node/model/RevokeGrant.ts new file mode 100644 index 000000000000..d818458bd2a2 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/CreateRepositoryInput.ts b/packages/sdk-kms-node/model/RevokeGrantInput.ts similarity index 68% rename from packages/model-codecommit-v1/model/CreateRepositoryInput.ts rename to packages/sdk-kms-node/model/RevokeGrantInput.ts index ed1eb23c479f..7e83948d0b10 100644 --- a/packages/model-codecommit-v1/model/CreateRepositoryInput.ts +++ b/packages/sdk-kms-node/model/RevokeGrantInput.ts @@ -1,20 +1,22 @@ import {Structure as _Structure_} from '@aws/types'; -export const CreateRepositoryInput: _Structure_ = { +export const RevokeGrantInput: _Structure_ = { type: 'structure', required: [ - 'repositoryName', + 'KeyId', + 'GrantId', ], members: { - repositoryName: { + KeyId: { shape: { type: 'string', min: 1, }, }, - repositoryDescription: { + 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 000000000000..4dac0c0d583a --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ScheduleKeyDeletion.ts b/packages/sdk-kms-node/model/ScheduleKeyDeletion.ts new file mode 100644 index 000000000000..43dc9c5f289c --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/ScheduleKeyDeletionInput.ts b/packages/sdk-kms-node/model/ScheduleKeyDeletionInput.ts new file mode 100644 index 000000000000..d76afea8d1e6 --- /dev/null +++ b/packages/sdk-kms-node/model/ScheduleKeyDeletionInput.ts @@ -0,0 +1,22 @@ +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, + }, + }, + }, +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailure.ts b/packages/sdk-kms-node/model/ScheduleKeyDeletionOutput.ts similarity index 61% rename from packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailure.ts rename to packages/sdk-kms-node/model/ScheduleKeyDeletionOutput.ts index 8aa816566e8c..7cb9f06d0d1d 100644 --- a/packages/model-codecommit-v1/model/_RepositoryTriggerExecutionFailure.ts +++ b/packages/sdk-kms-node/model/ScheduleKeyDeletionOutput.ts @@ -1,17 +1,18 @@ import {Structure as _Structure_} from '@aws/types'; -export const _RepositoryTriggerExecutionFailure: _Structure_ = { +export const ScheduleKeyDeletionOutput: _Structure_ = { type: 'structure', required: [], members: { - trigger: { + KeyId: { shape: { type: 'string', + min: 1, }, }, - failureMessage: { + DeletionDate: { shape: { - type: 'string', + 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 000000000000..3a7e5bb6af14 --- /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' +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/TagException.ts b/packages/sdk-kms-node/model/TagException.ts new file mode 100644 index 000000000000..f17e90e272f4 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/TagResource.ts b/packages/sdk-kms-node/model/TagResource.ts new file mode 100644 index 000000000000..537b93195c6e --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/TagResourceInput.ts b/packages/sdk-kms-node/model/TagResourceInput.ts new file mode 100644 index 000000000000..032f29d7b85b --- /dev/null +++ b/packages/sdk-kms-node/model/TagResourceInput.ts @@ -0,0 +1,21 @@ +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, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/TagResourceOutput.ts b/packages/sdk-kms-node/model/TagResourceOutput.ts new file mode 100644 index 000000000000..2f0894360690 --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/UnsupportedOperationException.ts b/packages/sdk-kms-node/model/UnsupportedOperationException.ts new file mode 100644 index 000000000000..c3e8b185d4f1 --- /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', +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/UntagResource.ts b/packages/sdk-kms-node/model/UntagResource.ts new file mode 100644 index 000000000000..04c4c4021976 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/UntagResourceInput.ts b/packages/sdk-kms-node/model/UntagResourceInput.ts new file mode 100644 index 000000000000..126c9fe09c02 --- /dev/null +++ b/packages/sdk-kms-node/model/UntagResourceInput.ts @@ -0,0 +1,21 @@ +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, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/UntagResourceOutput.ts b/packages/sdk-kms-node/model/UntagResourceOutput.ts new file mode 100644 index 000000000000..d4fc6991f065 --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/UpdateAlias.ts b/packages/sdk-kms-node/model/UpdateAlias.ts new file mode 100644 index 000000000000..3e128e3e3b65 --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/UpdateDefaultBranchInput.ts b/packages/sdk-kms-node/model/UpdateAliasInput.ts similarity index 66% rename from packages/model-codecommit-v1/model/UpdateDefaultBranchInput.ts rename to packages/sdk-kms-node/model/UpdateAliasInput.ts index d3607d494bc0..f130ee8218c7 100644 --- a/packages/model-codecommit-v1/model/UpdateDefaultBranchInput.ts +++ b/packages/sdk-kms-node/model/UpdateAliasInput.ts @@ -1,19 +1,19 @@ import {Structure as _Structure_} from '@aws/types'; -export const UpdateDefaultBranchInput: _Structure_ = { +export const UpdateAliasInput: _Structure_ = { type: 'structure', required: [ - 'repositoryName', - 'defaultBranchName', + 'AliasName', + 'TargetKeyId', ], members: { - repositoryName: { + AliasName: { shape: { type: 'string', min: 1, }, }, - defaultBranchName: { + 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 000000000000..fc0dea8de07d --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/UpdateKeyDescription.ts b/packages/sdk-kms-node/model/UpdateKeyDescription.ts new file mode 100644 index 000000000000..e4c11b4be5ce --- /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, + }, + ], +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetBlobInput.ts b/packages/sdk-kms-node/model/UpdateKeyDescriptionInput.ts similarity index 69% rename from packages/model-codecommit-v1/model/GetBlobInput.ts rename to packages/sdk-kms-node/model/UpdateKeyDescriptionInput.ts index 85eb8710c58f..8306c79fed82 100644 --- a/packages/model-codecommit-v1/model/GetBlobInput.ts +++ b/packages/sdk-kms-node/model/UpdateKeyDescriptionInput.ts @@ -1,19 +1,19 @@ import {Structure as _Structure_} from '@aws/types'; -export const GetBlobInput: _Structure_ = { +export const UpdateKeyDescriptionInput: _Structure_ = { type: 'structure', required: [ - 'repositoryName', - 'blobId', + 'KeyId', + 'Description', ], members: { - repositoryName: { + KeyId: { shape: { type: 'string', min: 1, }, }, - blobId: { + 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 000000000000..b793457a8348 --- /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: {}, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/_AliasList.ts b/packages/sdk-kms-node/model/_AliasList.ts new file mode 100644 index 000000000000..b8dce2e5e10d --- /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, + }, +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_UserInfo.ts b/packages/sdk-kms-node/model/_AliasListEntry.ts similarity index 66% rename from packages/model-codecommit-v1/model/_UserInfo.ts rename to packages/sdk-kms-node/model/_AliasListEntry.ts index b71ad0b7976a..d0672ceafbe8 100644 --- a/packages/model-codecommit-v1/model/_UserInfo.ts +++ b/packages/sdk-kms-node/model/_AliasListEntry.ts @@ -1,22 +1,25 @@ import {Structure as _Structure_} from '@aws/types'; -export const _UserInfo: _Structure_ = { +export const _AliasListEntry: _Structure_ = { type: 'structure', required: [], members: { - name: { + AliasName: { shape: { type: 'string', + min: 1, }, }, - email: { + AliasArn: { shape: { type: 'string', + min: 20, }, }, - date: { + 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 000000000000..074738066ec7 --- /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', + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/_GrantConstraints.ts b/packages/sdk-kms-node/model/_GrantConstraints.ts new file mode 100644 index 000000000000..7430dadff4f7 --- /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, + }, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/model/_GrantList.ts b/packages/sdk-kms-node/model/_GrantList.ts new file mode 100644 index 000000000000..620d51f150c1 --- /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, + }, +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/GetDifferencesInput.ts b/packages/sdk-kms-node/model/_GrantListEntry.ts similarity index 50% rename from packages/model-codecommit-v1/model/GetDifferencesInput.ts rename to packages/sdk-kms-node/model/_GrantListEntry.ts index 410af2a7e9a6..39a65d01dabd 100644 --- a/packages/model-codecommit-v1/model/GetDifferencesInput.ts +++ b/packages/sdk-kms-node/model/_GrantListEntry.ts @@ -1,47 +1,57 @@ +import {_GrantOperationList} from './_GrantOperationList'; +import {_GrantConstraints} from './_GrantConstraints'; import {Structure as _Structure_} from '@aws/types'; -export const GetDifferencesInput: _Structure_ = { +export const _GrantListEntry: _Structure_ = { type: 'structure', - required: [ - 'repositoryName', - 'afterCommitSpecifier', - ], + required: [], members: { - repositoryName: { + KeyId: { shape: { type: 'string', min: 1, }, }, - beforeCommitSpecifier: { + GrantId: { shape: { type: 'string', + min: 1, }, }, - afterCommitSpecifier: { + Name: { shape: { type: 'string', + min: 1, }, }, - beforePath: { + CreationDate: { shape: { - type: 'string', + type: 'timestamp', }, }, - afterPath: { + GranteePrincipal: { shape: { type: 'string', + min: 1, }, }, - MaxResults: { + RetiringPrincipal: { shape: { - type: 'integer', + type: 'string', + min: 1, }, }, - NextToken: { + IssuingAccount: { shape: { type: 'string', + min: 1, }, }, + Operations: { + shape: _GrantOperationList, + }, + Constraints: { + shape: _GrantConstraints, + }, }, }; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_ParentList.ts b/packages/sdk-kms-node/model/_GrantOperationList.ts similarity index 75% rename from packages/model-codecommit-v1/model/_ParentList.ts rename to packages/sdk-kms-node/model/_GrantOperationList.ts index 3fad99011671..5c806f89fe8e 100644 --- a/packages/model-codecommit-v1/model/_ParentList.ts +++ b/packages/sdk-kms-node/model/_GrantOperationList.ts @@ -1,6 +1,6 @@ import {List as _List_} from '@aws/types'; -export const _ParentList: _List_ = { +export const _GrantOperationList: _List_ = { type: 'list', member: { shape: { diff --git a/packages/model-codecommit-v1/model/_BranchNameList.ts b/packages/sdk-kms-node/model/_GrantTokenList.ts similarity index 79% rename from packages/model-codecommit-v1/model/_BranchNameList.ts rename to packages/sdk-kms-node/model/_GrantTokenList.ts index 1ca1711b47fd..29e100c055ac 100644 --- a/packages/model-codecommit-v1/model/_BranchNameList.ts +++ b/packages/sdk-kms-node/model/_GrantTokenList.ts @@ -1,6 +1,6 @@ import {List as _List_} from '@aws/types'; -export const _BranchNameList: _List_ = { +export const _GrantTokenList: _List_ = { type: 'list', member: { shape: { diff --git a/packages/sdk-kms-node/model/_KeyList.ts b/packages/sdk-kms-node/model/_KeyList.ts new file mode 100644 index 000000000000..73eef9626bdf --- /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, + }, +}; \ No newline at end of file diff --git a/packages/model-codecommit-v1/model/_RepositoryNameIdPair.ts b/packages/sdk-kms-node/model/_KeyListEntry.ts similarity index 74% rename from packages/model-codecommit-v1/model/_RepositoryNameIdPair.ts rename to packages/sdk-kms-node/model/_KeyListEntry.ts index cbe75aaa66ae..28546006e2fc 100644 --- a/packages/model-codecommit-v1/model/_RepositoryNameIdPair.ts +++ b/packages/sdk-kms-node/model/_KeyListEntry.ts @@ -1,18 +1,19 @@ import {Structure as _Structure_} from '@aws/types'; -export const _RepositoryNameIdPair: _Structure_ = { +export const _KeyListEntry: _Structure_ = { type: 'structure', required: [], members: { - repositoryName: { + KeyId: { shape: { type: 'string', min: 1, }, }, - repositoryId: { + KeyArn: { shape: { type: 'string', + min: 20, }, }, }, diff --git a/packages/model-codecommit-v1/model/_RepositoryMetadata.ts b/packages/sdk-kms-node/model/_KeyMetadata.ts similarity index 60% rename from packages/model-codecommit-v1/model/_RepositoryMetadata.ts rename to packages/sdk-kms-node/model/_KeyMetadata.ts index 14a309814cef..74995c7c3500 100644 --- a/packages/model-codecommit-v1/model/_RepositoryMetadata.ts +++ b/packages/sdk-kms-node/model/_KeyMetadata.ts @@ -1,57 +1,74 @@ import {Structure as _Structure_} from '@aws/types'; -export const _RepositoryMetadata: _Structure_ = { +export const _KeyMetadata: _Structure_ = { type: 'structure', - required: [], + required: [ + 'KeyId', + ], members: { - accountId: { + AWSAccountId: { shape: { type: 'string', }, }, - repositoryId: { + KeyId: { shape: { type: 'string', + min: 1, }, }, - repositoryName: { + Arn: { shape: { type: 'string', - min: 1, + min: 20, + }, + }, + CreationDate: { + shape: { + type: 'timestamp', + }, + }, + Enabled: { + shape: { + type: 'boolean', }, }, - repositoryDescription: { + Description: { shape: { type: 'string', }, }, - defaultBranch: { + KeyUsage: { + shape: { + type: 'string', + }, + }, + KeyState: { shape: { type: 'string', - min: 1, }, }, - lastModifiedDate: { + DeletionDate: { shape: { type: 'timestamp', }, }, - creationDate: { + ValidTo: { shape: { type: 'timestamp', }, }, - cloneUrlHttp: { + Origin: { shape: { type: 'string', }, }, - cloneUrlSsh: { + ExpirationModel: { shape: { type: 'string', }, }, - Arn: { + KeyManager: { shape: { type: 'string', }, diff --git a/packages/model-codecommit-v1/model/_RepositoryNameList.ts b/packages/sdk-kms-node/model/_PolicyNameList.ts similarity index 78% rename from packages/model-codecommit-v1/model/_RepositoryNameList.ts rename to packages/sdk-kms-node/model/_PolicyNameList.ts index ab8318ab4a93..077801de721c 100644 --- a/packages/model-codecommit-v1/model/_RepositoryNameList.ts +++ b/packages/sdk-kms-node/model/_PolicyNameList.ts @@ -1,6 +1,6 @@ import {List as _List_} from '@aws/types'; -export const _RepositoryNameList: _List_ = { +export const _PolicyNameList: _List_ = { type: 'list', member: { shape: { diff --git a/packages/model-codecommit-v1/model/ListBranchesInput.ts b/packages/sdk-kms-node/model/_Tag.ts similarity index 71% rename from packages/model-codecommit-v1/model/ListBranchesInput.ts rename to packages/sdk-kms-node/model/_Tag.ts index be50e97c625f..ec5536c639bf 100644 --- a/packages/model-codecommit-v1/model/ListBranchesInput.ts +++ b/packages/sdk-kms-node/model/_Tag.ts @@ -1,18 +1,19 @@ import {Structure as _Structure_} from '@aws/types'; -export const ListBranchesInput: _Structure_ = { +export const _Tag: _Structure_ = { type: 'structure', required: [ - 'repositoryName', + 'TagKey', + 'TagValue', ], members: { - repositoryName: { + TagKey: { shape: { type: 'string', min: 1, }, }, - nextToken: { + TagValue: { shape: { type: 'string', }, diff --git a/packages/model-codecommit-v1/model/_RepositoryNotFoundList.ts b/packages/sdk-kms-node/model/_TagKeyList.ts similarity index 76% rename from packages/model-codecommit-v1/model/_RepositoryNotFoundList.ts rename to packages/sdk-kms-node/model/_TagKeyList.ts index 5a1fa19c577d..289e7c01e49f 100644 --- a/packages/model-codecommit-v1/model/_RepositoryNotFoundList.ts +++ b/packages/sdk-kms-node/model/_TagKeyList.ts @@ -1,6 +1,6 @@ import {List as _List_} from '@aws/types'; -export const _RepositoryNotFoundList: _List_ = { +export const _TagKeyList: _List_ = { type: 'list', member: { shape: { diff --git a/packages/sdk-kms-node/model/_TagList.ts b/packages/sdk-kms-node/model/_TagList.ts new file mode 100644 index 000000000000..af10f8731ce1 --- /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, + }, +}; \ No newline at end of file diff --git a/packages/sdk-kms-node/package.json b/packages/sdk-kms-node/package.json new file mode 100644 index 000000000000..27f93735de40 --- /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/model-codecommit-v1/tsconfig.json b/packages/sdk-kms-node/tsconfig.json similarity index 65% rename from packages/model-codecommit-v1/tsconfig.json rename to packages/sdk-kms-node/tsconfig.json index 55345474dc0b..9e1712ac50a2 100644 --- a/packages/model-codecommit-v1/tsconfig.json +++ b/packages/sdk-kms-node/tsconfig.json @@ -8,7 +8,10 @@ "downlevelIteration": true, "lib": [ "es5", - "es2015.iterable" + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" ] } } \ No newline at end of file diff --git a/packages/model-codecommit-v1/tsconfig.test.json b/packages/sdk-kms-node/tsconfig.test.json similarity index 100% rename from packages/model-codecommit-v1/tsconfig.test.json rename to packages/sdk-kms-node/tsconfig.test.json diff --git a/packages/model-codecommit-v1/BlobIdDoesNotExistException.ts b/packages/sdk-kms-node/types/AlreadyExistsException.ts similarity index 75% rename from packages/model-codecommit-v1/BlobIdDoesNotExistException.ts rename to packages/sdk-kms-node/types/AlreadyExistsException.ts index 8e7d815bbd85..5d183bd3fddc 100644 --- a/packages/model-codecommit-v1/BlobIdDoesNotExistException.ts +++ b/packages/sdk-kms-node/types/AlreadyExistsException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

The specified blob does not exist.

+ *

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

*/ -export interface BlobIdDoesNotExistException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/CancelKeyDeletionInput.ts b/packages/sdk-kms-node/types/CancelKeyDeletionInput.ts new file mode 100644 index 000000000000..16d9fbf4cd6b --- /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; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetBlobOutput.ts b/packages/sdk-kms-node/types/CancelKeyDeletionOutput.ts similarity index 61% rename from packages/model-codecommit-v1/GetBlobOutput.ts rename to packages/sdk-kms-node/types/CancelKeyDeletionOutput.ts index 5d902ca345e3..9f28b0644ec1 100644 --- a/packages/model-codecommit-v1/GetBlobOutput.ts +++ b/packages/sdk-kms-node/types/CancelKeyDeletionOutput.ts @@ -1,14 +1,14 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

Represents the output of a get blob operation.

+ * CancelKeyDeletionOutput shape */ -export interface GetBlobOutput { +export interface CancelKeyDeletionOutput { /** - *

The content of the blob, usually a file.

+ *

The unique identifier of the master key for which deletion is canceled.

*/ - content: Uint8Array; - + KeyId?: string; + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/CreateAliasInput.ts b/packages/sdk-kms-node/types/CreateAliasInput.ts new file mode 100644 index 000000000000..8131b9f252d7 --- /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; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/CreateBranchOutput.ts b/packages/sdk-kms-node/types/CreateAliasOutput.ts similarity index 80% rename from packages/model-codecommit-v1/CreateBranchOutput.ts rename to packages/sdk-kms-node/types/CreateAliasOutput.ts index 0c5a9c8543c1..7adbd6d401bb 100644 --- a/packages/model-codecommit-v1/CreateBranchOutput.ts +++ b/packages/sdk-kms-node/types/CreateAliasOutput.ts @@ -1,9 +1,9 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - * CreateBranchOutput shape + * CreateAliasOutput shape */ -export interface CreateBranchOutput { +export interface CreateAliasOutput { /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/CreateGrantInput.ts b/packages/sdk-kms-node/types/CreateGrantInput.ts new file mode 100644 index 000000000000..1832af84838b --- /dev/null +++ b/packages/sdk-kms-node/types/CreateGrantInput.ts @@ -0,0 +1,41 @@ +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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/CreateGrantOutput.ts b/packages/sdk-kms-node/types/CreateGrantOutput.ts new file mode 100644 index 000000000000..caed2a8b1e09 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/CreateKeyInput.ts b/packages/sdk-kms-node/types/CreateKeyInput.ts new file mode 100644 index 000000000000..58d5a97b3cd8 --- /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>; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/GetBranchOutput.ts b/packages/sdk-kms-node/types/CreateKeyOutput.ts similarity index 56% rename from packages/model-codecommit-v1/GetBranchOutput.ts rename to packages/sdk-kms-node/types/CreateKeyOutput.ts index 4ad09b307829..a0a68f92258d 100644 --- a/packages/model-codecommit-v1/GetBranchOutput.ts +++ b/packages/sdk-kms-node/types/CreateKeyOutput.ts @@ -1,15 +1,15 @@ -import {_UnmarshalledBranchInfo} from './_BranchInfo'; +import {_UnmarshalledKeyMetadata} from './_KeyMetadata'; import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

Represents the output of a get branch operation.

+ * CreateKeyOutput shape */ -export interface GetBranchOutput { +export interface CreateKeyOutput { /** - *

The name of the branch.

+ *

Metadata associated with the CMK.

*/ - branch?: _UnmarshalledBranchInfo; - + KeyMetadata?: _UnmarshalledKeyMetadata; + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/DecryptInput.ts b/packages/sdk-kms-node/types/DecryptInput.ts new file mode 100644 index 000000000000..91715b5e569e --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/DecryptOutput.ts b/packages/sdk-kms-node/types/DecryptOutput.ts new file mode 100644 index 000000000000..bf00bb4ba0e9 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/DeleteAliasInput.ts b/packages/sdk-kms-node/types/DeleteAliasInput.ts new file mode 100644 index 000000000000..bc33d44998f7 --- /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; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/UpdateDefaultBranchOutput.ts b/packages/sdk-kms-node/types/DeleteAliasOutput.ts similarity index 77% rename from packages/model-codecommit-v1/UpdateDefaultBranchOutput.ts rename to packages/sdk-kms-node/types/DeleteAliasOutput.ts index d2e757aa66b4..6c4ab96b9d75 100644 --- a/packages/model-codecommit-v1/UpdateDefaultBranchOutput.ts +++ b/packages/sdk-kms-node/types/DeleteAliasOutput.ts @@ -1,9 +1,9 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - * UpdateDefaultBranchOutput shape + * DeleteAliasOutput shape */ -export interface UpdateDefaultBranchOutput { +export interface DeleteAliasOutput { /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/DeleteImportedKeyMaterialInput.ts b/packages/sdk-kms-node/types/DeleteImportedKeyMaterialInput.ts new file mode 100644 index 000000000000..7dc6b09cb20f --- /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; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/UpdateRepositoryDescriptionOutput.ts b/packages/sdk-kms-node/types/DeleteImportedKeyMaterialOutput.ts similarity index 74% rename from packages/model-codecommit-v1/UpdateRepositoryDescriptionOutput.ts rename to packages/sdk-kms-node/types/DeleteImportedKeyMaterialOutput.ts index 18d28774e278..50104ddd1060 100644 --- a/packages/model-codecommit-v1/UpdateRepositoryDescriptionOutput.ts +++ b/packages/sdk-kms-node/types/DeleteImportedKeyMaterialOutput.ts @@ -1,9 +1,9 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - * UpdateRepositoryDescriptionOutput shape + * DeleteImportedKeyMaterialOutput shape */ -export interface UpdateRepositoryDescriptionOutput { +export interface DeleteImportedKeyMaterialOutput { /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/model-codecommit-v1/BlobIdRequiredException.ts b/packages/sdk-kms-node/types/DependencyTimeoutException.ts similarity index 75% rename from packages/model-codecommit-v1/BlobIdRequiredException.ts rename to packages/sdk-kms-node/types/DependencyTimeoutException.ts index aa29020f0ab6..e62b35f529ed 100644 --- a/packages/model-codecommit-v1/BlobIdRequiredException.ts +++ b/packages/sdk-kms-node/types/DependencyTimeoutException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

A blob ID is required but was not specified.

+ *

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

*/ -export interface BlobIdRequiredException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/DescribeKeyInput.ts b/packages/sdk-kms-node/types/DescribeKeyInput.ts new file mode 100644 index 000000000000..7fbff2b463a9 --- /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; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/PutRepositoryTriggersOutput.ts b/packages/sdk-kms-node/types/DescribeKeyOutput.ts similarity index 55% rename from packages/model-codecommit-v1/PutRepositoryTriggersOutput.ts rename to packages/sdk-kms-node/types/DescribeKeyOutput.ts index b133e8a78c81..ca7b515ff73e 100644 --- a/packages/model-codecommit-v1/PutRepositoryTriggersOutput.ts +++ b/packages/sdk-kms-node/types/DescribeKeyOutput.ts @@ -1,14 +1,15 @@ +import {_UnmarshalledKeyMetadata} from './_KeyMetadata'; import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

Represents the output of a put repository triggers operation.

+ * DescribeKeyOutput shape */ -export interface PutRepositoryTriggersOutput { +export interface DescribeKeyOutput { /** - *

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

+ *

Metadata associated with the key.

*/ - configurationId?: string; - + KeyMetadata?: _UnmarshalledKeyMetadata; + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/DisableKeyInput.ts b/packages/sdk-kms-node/types/DisableKeyInput.ts new file mode 100644 index 000000000000..b60fba125d5a --- /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; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/UpdateRepositoryNameOutput.ts b/packages/sdk-kms-node/types/DisableKeyOutput.ts similarity index 77% rename from packages/model-codecommit-v1/UpdateRepositoryNameOutput.ts rename to packages/sdk-kms-node/types/DisableKeyOutput.ts index 823d4200f19d..4e61109f7637 100644 --- a/packages/model-codecommit-v1/UpdateRepositoryNameOutput.ts +++ b/packages/sdk-kms-node/types/DisableKeyOutput.ts @@ -1,9 +1,9 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - * UpdateRepositoryNameOutput shape + * DisableKeyOutput shape */ -export interface UpdateRepositoryNameOutput { +export interface DisableKeyOutput { /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/DisableKeyRotationInput.ts b/packages/sdk-kms-node/types/DisableKeyRotationInput.ts new file mode 100644 index 000000000000..eddbcc272b2e --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/DisableKeyRotationOutput.ts b/packages/sdk-kms-node/types/DisableKeyRotationOutput.ts new file mode 100644 index 000000000000..0f248093df1b --- /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__; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/CommitRequiredException.ts b/packages/sdk-kms-node/types/DisabledException.ts similarity index 78% rename from packages/model-codecommit-v1/CommitRequiredException.ts rename to packages/sdk-kms-node/types/DisabledException.ts index b13072d36200..0a3c6e4340d1 100644 --- a/packages/model-codecommit-v1/CommitRequiredException.ts +++ b/packages/sdk-kms-node/types/DisabledException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

A commit was not specified.

+ *

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

*/ -export interface CommitRequiredException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/EnableKeyInput.ts b/packages/sdk-kms-node/types/EnableKeyInput.ts new file mode 100644 index 000000000000..f96d2e0132a0 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/EnableKeyOutput.ts b/packages/sdk-kms-node/types/EnableKeyOutput.ts new file mode 100644 index 000000000000..1869b4bdfd7c --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/EnableKeyRotationInput.ts b/packages/sdk-kms-node/types/EnableKeyRotationInput.ts new file mode 100644 index 000000000000..119936a83d8c --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/EnableKeyRotationOutput.ts b/packages/sdk-kms-node/types/EnableKeyRotationOutput.ts new file mode 100644 index 000000000000..fc6f91fce3bd --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/EncryptInput.ts b/packages/sdk-kms-node/types/EncryptInput.ts new file mode 100644 index 000000000000..9adb80ee5388 --- /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; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/ListBranchesOutput.ts b/packages/sdk-kms-node/types/EncryptOutput.ts similarity index 50% rename from packages/model-codecommit-v1/ListBranchesOutput.ts rename to packages/sdk-kms-node/types/EncryptOutput.ts index 0c1a67d51cb0..bf3e79c68858 100644 --- a/packages/model-codecommit-v1/ListBranchesOutput.ts +++ b/packages/sdk-kms-node/types/EncryptOutput.ts @@ -1,19 +1,19 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

Represents the output of a list branches operation.

+ * EncryptOutput shape */ -export interface ListBranchesOutput { +export interface EncryptOutput { /** - *

The list of branch names.

+ *

The encrypted plaintext. When you use the HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise, it is not encoded.

*/ - branches?: Array; - + CiphertextBlob?: Uint8Array; + /** - *

An enumeration token that returns the batch of the results.

+ *

The ID of the key used during encryption.

*/ - nextToken?: string; - + KeyId?: string; + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/ExpiredImportTokenException.ts b/packages/sdk-kms-node/types/ExpiredImportTokenException.ts new file mode 100644 index 000000000000..4ac28fa27b6b --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GenerateDataKeyInput.ts b/packages/sdk-kms-node/types/GenerateDataKeyInput.ts new file mode 100644 index 000000000000..d5024f3d6ce3 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GenerateDataKeyOutput.ts b/packages/sdk-kms-node/types/GenerateDataKeyOutput.ts new file mode 100644 index 000000000000..5e043fbd9b65 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextInput.ts b/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextInput.ts new file mode 100644 index 000000000000..b36087e44ea3 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextOutput.ts b/packages/sdk-kms-node/types/GenerateDataKeyWithoutPlaintextOutput.ts new file mode 100644 index 000000000000..7bc1a06b830c --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GenerateRandomInput.ts b/packages/sdk-kms-node/types/GenerateRandomInput.ts new file mode 100644 index 000000000000..665a99ece3af --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GenerateRandomOutput.ts b/packages/sdk-kms-node/types/GenerateRandomOutput.ts new file mode 100644 index 000000000000..c29f46fd9b55 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GetKeyPolicyInput.ts b/packages/sdk-kms-node/types/GetKeyPolicyInput.ts new file mode 100644 index 000000000000..8d35e34320b4 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GetKeyPolicyOutput.ts b/packages/sdk-kms-node/types/GetKeyPolicyOutput.ts new file mode 100644 index 000000000000..f7e945be293e --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GetKeyRotationStatusInput.ts b/packages/sdk-kms-node/types/GetKeyRotationStatusInput.ts new file mode 100644 index 000000000000..33bba95d0a18 --- /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; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/DeleteRepositoryOutput.ts b/packages/sdk-kms-node/types/GetKeyRotationStatusOutput.ts similarity index 60% rename from packages/model-codecommit-v1/DeleteRepositoryOutput.ts rename to packages/sdk-kms-node/types/GetKeyRotationStatusOutput.ts index 0ffe964d63c2..48b765757057 100644 --- a/packages/model-codecommit-v1/DeleteRepositoryOutput.ts +++ b/packages/sdk-kms-node/types/GetKeyRotationStatusOutput.ts @@ -1,14 +1,14 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

Represents the output of a delete repository operation.

+ * GetKeyRotationStatusOutput shape */ -export interface DeleteRepositoryOutput { +export interface GetKeyRotationStatusOutput { /** - *

The ID of the repository that was deleted.

+ *

A Boolean value that specifies whether key rotation is enabled.

*/ - repositoryId?: string; - + KeyRotationEnabled?: boolean; + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/GetParametersForImportInput.ts b/packages/sdk-kms-node/types/GetParametersForImportInput.ts new file mode 100644 index 000000000000..9fcfcac15725 --- /dev/null +++ b/packages/sdk-kms-node/types/GetParametersForImportInput.ts @@ -0,0 +1,19 @@ +/** + * 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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/GetParametersForImportOutput.ts b/packages/sdk-kms-node/types/GetParametersForImportOutput.ts new file mode 100644 index 000000000000..d83994c0f187 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ImportKeyMaterialInput.ts b/packages/sdk-kms-node/types/ImportKeyMaterialInput.ts new file mode 100644 index 000000000000..7d2ce1e4ae33 --- /dev/null +++ b/packages/sdk-kms-node/types/ImportKeyMaterialInput.ts @@ -0,0 +1,29 @@ +/** + * 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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ImportKeyMaterialOutput.ts b/packages/sdk-kms-node/types/ImportKeyMaterialOutput.ts new file mode 100644 index 000000000000..6addbc50beb0 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/IncorrectKeyMaterialException.ts b/packages/sdk-kms-node/types/IncorrectKeyMaterialException.ts new file mode 100644 index 000000000000..e5d19aaf36d2 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/InputTypesUnion.ts b/packages/sdk-kms-node/types/InputTypesUnion.ts new file mode 100644 index 000000000000..62ba62c2ad5b --- /dev/null +++ b/packages/sdk-kms-node/types/InputTypesUnion.ts @@ -0,0 +1,71 @@ +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/model-codecommit-v1/EncryptionKeyNotFoundException.ts b/packages/sdk-kms-node/types/InvalidAliasNameException.ts similarity index 77% rename from packages/model-codecommit-v1/EncryptionKeyNotFoundException.ts rename to packages/sdk-kms-node/types/InvalidAliasNameException.ts index c62726b842f4..bab4c591dcd7 100644 --- a/packages/model-codecommit-v1/EncryptionKeyNotFoundException.ts +++ b/packages/sdk-kms-node/types/InvalidAliasNameException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

No encryption key was found.

+ *

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

*/ -export interface EncryptionKeyNotFoundException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/model-codecommit-v1/InvalidPathException.ts b/packages/sdk-kms-node/types/InvalidArnException.ts similarity index 77% rename from packages/model-codecommit-v1/InvalidPathException.ts rename to packages/sdk-kms-node/types/InvalidArnException.ts index cb8c234601bf..b6b2b78dbe42 100644 --- a/packages/model-codecommit-v1/InvalidPathException.ts +++ b/packages/sdk-kms-node/types/InvalidArnException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

The specified path is not valid.

+ *

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

*/ -export interface InvalidPathException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/InvalidCiphertextException.ts b/packages/sdk-kms-node/types/InvalidCiphertextException.ts new file mode 100644 index 000000000000..b001bb664bbb --- /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__; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/BranchNameExistsException.ts b/packages/sdk-kms-node/types/InvalidGrantIdException.ts similarity index 76% rename from packages/model-codecommit-v1/BranchNameExistsException.ts rename to packages/sdk-kms-node/types/InvalidGrantIdException.ts index 4cb93a52649f..bcc1ee7edb20 100644 --- a/packages/model-codecommit-v1/BranchNameExistsException.ts +++ b/packages/sdk-kms-node/types/InvalidGrantIdException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

The specified branch name already exists.

+ *

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

*/ -export interface BranchNameExistsException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/model-codecommit-v1/EncryptionKeyDisabledException.ts b/packages/sdk-kms-node/types/InvalidGrantTokenException.ts similarity index 76% rename from packages/model-codecommit-v1/EncryptionKeyDisabledException.ts rename to packages/sdk-kms-node/types/InvalidGrantTokenException.ts index de135f580928..2b1b9fe48575 100644 --- a/packages/model-codecommit-v1/EncryptionKeyDisabledException.ts +++ b/packages/sdk-kms-node/types/InvalidGrantTokenException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

The encryption key is disabled.

+ *

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

*/ -export interface EncryptionKeyDisabledException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/model-codecommit-v1/InvalidRepositoryTriggerCustomDataException.ts b/packages/sdk-kms-node/types/InvalidImportTokenException.ts similarity index 70% rename from packages/model-codecommit-v1/InvalidRepositoryTriggerCustomDataException.ts rename to packages/sdk-kms-node/types/InvalidImportTokenException.ts index 0c6bd4baf3c5..e13253126514 100644 --- a/packages/model-codecommit-v1/InvalidRepositoryTriggerCustomDataException.ts +++ b/packages/sdk-kms-node/types/InvalidImportTokenException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

The custom data provided for the trigger is not valid.

+ *

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

*/ -export interface InvalidRepositoryTriggerCustomDataException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/InvalidKeyUsageException.ts b/packages/sdk-kms-node/types/InvalidKeyUsageException.ts new file mode 100644 index 000000000000..c25ef037064d --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/InvalidMarkerException.ts b/packages/sdk-kms-node/types/InvalidMarkerException.ts new file mode 100644 index 000000000000..ce471805f106 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/KMSInternalException.ts b/packages/sdk-kms-node/types/KMSInternalException.ts new file mode 100644 index 000000000000..2411e46aaba8 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/KMSInvalidStateException.ts b/packages/sdk-kms-node/types/KMSInvalidStateException.ts new file mode 100644 index 000000000000..3b1d58e5ef77 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/KeyUnavailableException.ts b/packages/sdk-kms-node/types/KeyUnavailableException.ts new file mode 100644 index 000000000000..31e1ca0bc402 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/LimitExceededException.ts b/packages/sdk-kms-node/types/LimitExceededException.ts new file mode 100644 index 000000000000..0276908f9272 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListAliasesInput.ts b/packages/sdk-kms-node/types/ListAliasesInput.ts new file mode 100644 index 000000000000..edbe3ac90b44 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListAliasesOutput.ts b/packages/sdk-kms-node/types/ListAliasesOutput.ts new file mode 100644 index 000000000000..49a3a432fbe1 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListGrantsInput.ts b/packages/sdk-kms-node/types/ListGrantsInput.ts new file mode 100644 index 000000000000..2072cc81ce96 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListGrantsOutput.ts b/packages/sdk-kms-node/types/ListGrantsOutput.ts new file mode 100644 index 000000000000..eaaf4f157ae0 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListKeyPoliciesInput.ts b/packages/sdk-kms-node/types/ListKeyPoliciesInput.ts new file mode 100644 index 000000000000..338b0fd3b933 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListKeyPoliciesOutput.ts b/packages/sdk-kms-node/types/ListKeyPoliciesOutput.ts new file mode 100644 index 000000000000..64953ff70b2b --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListKeysInput.ts b/packages/sdk-kms-node/types/ListKeysInput.ts new file mode 100644 index 000000000000..a5cfa35b0e24 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListKeysOutput.ts b/packages/sdk-kms-node/types/ListKeysOutput.ts new file mode 100644 index 000000000000..607ad06aadaf --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListResourceTagsInput.ts b/packages/sdk-kms-node/types/ListResourceTagsInput.ts new file mode 100644 index 000000000000..a437ea8f495f --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListResourceTagsOutput.ts b/packages/sdk-kms-node/types/ListResourceTagsOutput.ts new file mode 100644 index 000000000000..6ddaef9953c2 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListRetirableGrantsInput.ts b/packages/sdk-kms-node/types/ListRetirableGrantsInput.ts new file mode 100644 index 000000000000..cd6a58a601f2 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ListRetirableGrantsOutput.ts b/packages/sdk-kms-node/types/ListRetirableGrantsOutput.ts new file mode 100644 index 000000000000..2c1410bc8365 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/MalformedPolicyDocumentException.ts b/packages/sdk-kms-node/types/MalformedPolicyDocumentException.ts new file mode 100644 index 000000000000..06f6f63d64f9 --- /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__; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/BranchDoesNotExistException.ts b/packages/sdk-kms-node/types/NotFoundException.ts similarity index 76% rename from packages/model-codecommit-v1/BranchDoesNotExistException.ts rename to packages/sdk-kms-node/types/NotFoundException.ts index 13e079294556..352e33639f6a 100644 --- a/packages/model-codecommit-v1/BranchDoesNotExistException.ts +++ b/packages/sdk-kms-node/types/NotFoundException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

The specified branch does not exist.

+ *

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

*/ -export interface BranchDoesNotExistException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/OutputTypesUnion.ts b/packages/sdk-kms-node/types/OutputTypesUnion.ts new file mode 100644 index 000000000000..0fd5f86fd0e1 --- /dev/null +++ b/packages/sdk-kms-node/types/OutputTypesUnion.ts @@ -0,0 +1,71 @@ +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 000000000000..9b36f9fbc3c4 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/PutKeyPolicyOutput.ts b/packages/sdk-kms-node/types/PutKeyPolicyOutput.ts new file mode 100644 index 000000000000..80e12563fddc --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ReEncryptInput.ts b/packages/sdk-kms-node/types/ReEncryptInput.ts new file mode 100644 index 000000000000..0eb44f4d915d --- /dev/null +++ b/packages/sdk-kms-node/types/ReEncryptInput.ts @@ -0,0 +1,29 @@ +/** + * 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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ReEncryptOutput.ts b/packages/sdk-kms-node/types/ReEncryptOutput.ts new file mode 100644 index 000000000000..a8a13cd432ea --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/RetireGrantInput.ts b/packages/sdk-kms-node/types/RetireGrantInput.ts new file mode 100644 index 000000000000..cc83eec9bcba --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/RetireGrantOutput.ts b/packages/sdk-kms-node/types/RetireGrantOutput.ts new file mode 100644 index 000000000000..ea3eae7f141d --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/RevokeGrantInput.ts b/packages/sdk-kms-node/types/RevokeGrantInput.ts new file mode 100644 index 000000000000..ccb6c66bc48d --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/RevokeGrantOutput.ts b/packages/sdk-kms-node/types/RevokeGrantOutput.ts new file mode 100644 index 000000000000..ea5337681641 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ScheduleKeyDeletionInput.ts b/packages/sdk-kms-node/types/ScheduleKeyDeletionInput.ts new file mode 100644 index 000000000000..77aa1fa7a2ad --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/ScheduleKeyDeletionOutput.ts b/packages/sdk-kms-node/types/ScheduleKeyDeletionOutput.ts new file mode 100644 index 000000000000..bff9073f5c7b --- /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__; +} \ No newline at end of file diff --git a/packages/model-codecommit-v1/InvalidBlobIdException.ts b/packages/sdk-kms-node/types/TagException.ts similarity index 77% rename from packages/model-codecommit-v1/InvalidBlobIdException.ts rename to packages/sdk-kms-node/types/TagException.ts index a1cc932daa37..c1822c6b2b46 100644 --- a/packages/model-codecommit-v1/InvalidBlobIdException.ts +++ b/packages/sdk-kms-node/types/TagException.ts @@ -1,24 +1,24 @@ import {ResponseMetadata as __ResponseMetadata__} from '@aws/types'; /** - *

The specified blob is not valid.

+ *

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

*/ -export interface InvalidBlobIdException { +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; - + /** - *

Human-readable description of the error.

+ * _ErrorMessageType shape */ message?: string; - + /** * Metadata about the response received, including the HTTP status code, HTTP * headers, and any request identifiers recognized by the SDK. diff --git a/packages/sdk-kms-node/types/TagResourceInput.ts b/packages/sdk-kms-node/types/TagResourceInput.ts new file mode 100644 index 000000000000..732325754ea5 --- /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>; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/TagResourceOutput.ts b/packages/sdk-kms-node/types/TagResourceOutput.ts new file mode 100644 index 000000000000..113e4332a968 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/UnsupportedOperationException.ts b/packages/sdk-kms-node/types/UnsupportedOperationException.ts new file mode 100644 index 000000000000..c68c6e2e92f2 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/UntagResourceInput.ts b/packages/sdk-kms-node/types/UntagResourceInput.ts new file mode 100644 index 000000000000..18391fea0eb0 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/UntagResourceOutput.ts b/packages/sdk-kms-node/types/UntagResourceOutput.ts new file mode 100644 index 000000000000..109525977157 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/UpdateAliasInput.ts b/packages/sdk-kms-node/types/UpdateAliasInput.ts new file mode 100644 index 000000000000..220e8022f1d7 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/UpdateAliasOutput.ts b/packages/sdk-kms-node/types/UpdateAliasOutput.ts new file mode 100644 index 000000000000..0d531e1e9032 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/UpdateKeyDescriptionInput.ts b/packages/sdk-kms-node/types/UpdateKeyDescriptionInput.ts new file mode 100644 index 000000000000..3975ab3ad5a5 --- /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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/UpdateKeyDescriptionOutput.ts b/packages/sdk-kms-node/types/UpdateKeyDescriptionOutput.ts new file mode 100644 index 000000000000..dea6fe8bcf14 --- /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__; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/_AliasListEntry.ts b/packages/sdk-kms-node/types/_AliasListEntry.ts new file mode 100644 index 000000000000..6057b62bad1e --- /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; \ No newline at end of file diff --git a/packages/sdk-kms-node/types/_GrantConstraints.ts b/packages/sdk-kms-node/types/_GrantConstraints.ts new file mode 100644 index 000000000000..d583899bdc0e --- /dev/null +++ b/packages/sdk-kms-node/types/_GrantConstraints.ts @@ -0,0 +1,26 @@ +/** + *

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}; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/_GrantListEntry.ts b/packages/sdk-kms-node/types/_GrantListEntry.ts new file mode 100644 index 000000000000..0d1e536f95ce --- /dev/null +++ b/packages/sdk-kms-node/types/_GrantListEntry.ts @@ -0,0 +1,68 @@ +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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/_KeyListEntry.ts b/packages/sdk-kms-node/types/_KeyListEntry.ts new file mode 100644 index 000000000000..0525e224289d --- /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; \ No newline at end of file diff --git a/packages/sdk-kms-node/types/_KeyMetadata.ts b/packages/sdk-kms-node/types/_KeyMetadata.ts new file mode 100644 index 000000000000..2762bec3bc57 --- /dev/null +++ b/packages/sdk-kms-node/types/_KeyMetadata.ts @@ -0,0 +1,86 @@ +/** + *

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; +} \ No newline at end of file diff --git a/packages/sdk-kms-node/types/_Tag.ts b/packages/sdk-kms-node/types/_Tag.ts new file mode 100644 index 000000000000..5f78e071aaa5 --- /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; \ 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 68fc0034fcb5..1612aaebd3f9 100644 --- a/packages/service-types-generator/src/ClientGenerator.ts +++ b/packages/service-types-generator/src/ClientGenerator.ts @@ -8,27 +8,31 @@ import { CustomizationDefinition, RuntimeTarget, 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 000000000000..bba860179650 --- /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 938772f12ca3..993876cdc8e8 100644 --- a/packages/service-types-generator/src/Components/Client/ClassicClient.ts +++ b/packages/service-types-generator/src/Components/Client/ClassicClient.ts @@ -45,17 +45,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 282f1f202b1b..a63fa179083a 100644 --- a/packages/service-types-generator/src/Components/Client/Client.spec.ts +++ b/packages/service-types-generator/src/Components/Client/Client.spec.ts @@ -21,7 +21,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 e04706544510..188dc0159b28 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,23 +32,42 @@ 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 ); } @@ -57,16 +79,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 { @@ -75,8 +103,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 @@ -104,40 +132,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] @@ -146,21 +146,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 66f06321a8ad..025947c54459 100644 --- a/packages/service-types-generator/src/Components/Client/Configuration.spec.ts +++ b/packages/service-types-generator/src/Components/Client/Configuration.spec.ts @@ -185,7 +185,10 @@ describe('Configuration', () => { ); 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 092c044f9dd4..77617e649288 100644 --- a/packages/service-types-generator/src/Components/Client/Configuration.ts +++ b/packages/service-types-generator/src/Components/Client/Configuration.ts @@ -24,7 +24,10 @@ export interface ${this.className}ResolvedConfiguration extends ${this.className ${new IndentedSection(this.resolvedConfiguration())} } -const configurationProperties: ${packageNameToVariable('@aws/types')}.ConfigurationDefinition<${this.className}ResolvableConfiguration> = { +const configurationProperties: ${packageNameToVariable('@aws/types')}.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 000000000000..e1e9b2e28fc3 --- /dev/null +++ b/packages/service-types-generator/src/Components/Client/Method.spec.ts @@ -0,0 +1,62 @@ +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 08bdee71f151..469e2262290d 100644 --- a/packages/service-types-generator/src/Components/Client/Method.ts +++ b/packages/service-types-generator/src/Components/Client/Method.ts @@ -14,12 +14,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}( @@ -43,4 +44,4 @@ public ${methodName}( return errors.join('\n'); } -} \ No newline at end of file +} 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 7eae4dd30002..6d1a18028715 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/endpointConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/endpointConfigurationProperties.ts @@ -52,11 +52,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 f8c9badde25d..37c724d0dc96 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/httpConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/httpConfigurationProperties.ts @@ -39,16 +39,16 @@ function httpHandlerProperty( required: false, imports: [IMPORTS['node-http-handler']], default: { - type: 'value', - expression: `${packageNameToVariable('@aws/node-http-handler')}.NodeHttpHandler` + type: 'provider', + expression: `() => new ${packageNameToVariable('@aws/node-http-handler')}.NodeHttpHandler()` } }, browser: { required: false, imports: [IMPORTS['fetch-http-handler']], default: { - type: 'value', - expression: `${packageNameToVariable('@aws/fetch-http-handler')}.FetchHttpHandler` + type: 'provider', + expression: `() => new ${packageNameToVariable('@aws/fetch-http-handler')}.FetchHttpHandler()` } }, @@ -69,7 +69,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']], required: false, @@ -85,8 +85,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 3c8461b13650..c9da5900635b 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 f794e58344cc..793a1ac637fe 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/serializerConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/serializerConfigurationProperties.ts @@ -57,6 +57,7 @@ function parserProperty( inputType: `${typesPackage}.ResponseParser<${streamType}>`, documentation: 'The parser to use when converting HTTP responses to SDK output types', required: false, + internal: true, }; switch (metadata.protocol) { @@ -74,14 +75,14 @@ function parserProperty( `( 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 )` }, @@ -100,14 +101,14 @@ function parserProperty( `( configuration: { base64Decoder: ${typesPackage}.Decoder, - bodyCollector: ${typesPackage}.StreamCollector<${streamType}>, + streamCollector: ${typesPackage}.StreamCollector<${streamType}>, utf8Encoder: ${typesPackage}.Encoder } ) => new ${packageNameToVariable('@aws/protocol-rest')}.RestParser<${streamType}>( new ${packageNameToVariable('@aws/json-parser')}.JsonParser( configuration.base64Decoder ), - configuration.bodyCollector, + configuration.streamCollector, configuration.utf8Encoder )` } @@ -126,14 +127,14 @@ function parserProperty( `( configuration: { base64Decoder: ${typesPackage}.Decoder, - bodyCollector: ${typesPackage}.StreamCollector<${streamType}>, + streamCollector: ${typesPackage}.StreamCollector<${streamType}>, utf8Encoder: ${typesPackage}.Encoder } ) => new ${packageNameToVariable('@aws/protocol-rest')}.RestParser<${streamType}>( new ${packageNameToVariable('@aws/xml-parser')}.XmlParser( configuration.base64Decoder ), - configuration.bodyCollector, + configuration.streamCollector, configuration.utf8Encoder )` } @@ -153,14 +154,14 @@ function parserProperty( `( 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 )` }, @@ -175,11 +176,13 @@ 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, + internal: true, }; switch (metadata.protocol) { @@ -197,16 +200,20 @@ function serializerProperty( `( 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': @@ -223,18 +230,22 @@ function serializerProperty( `( 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': @@ -251,18 +262,22 @@ function serializerProperty( `( 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 +295,21 @@ function serializerProperty( `( 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 1b4c14c6a108..f02426cda1a2 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/signatureConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/signatureConfigurationProperties.ts @@ -75,9 +75,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( middlewareStack.add( class extends ${packageNameToVariable('@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 9f013eb679fa..9aa8cac0c931 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/standardConfigurationProperties.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/standardConfigurationProperties.ts @@ -85,7 +85,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: { @@ -139,18 +139,44 @@ 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 a7b97f7e3a58..02ebd6e4ced5 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 @@ -20,8 +20,8 @@ describe('applyStaticOrProvider', () => { "typeof propertyKey === 'boolean'" )).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 e00fdf6476f5..f0ac8c64f911 100644 --- a/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.ts +++ b/packages/service-types-generator/src/Components/Client/customizationsFromModel/staticOrProvider.ts @@ -13,12 +13,13 @@ 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 2046294d3a47..67f8496c1496 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 547b7b457c53..7c42907743cc 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 fdcaeb1ae979..ca3723bd8ed6 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 98aed400bdcf..d7c77b5de33e 100644 --- a/packages/types/src/http.ts +++ b/packages/types/src/http.ts @@ -71,9 +71,7 @@ export interface HttpResponse extends /** * A class that stores httpOptions and can make requests by calling handle. */ -export declare class HttpHandler { - constructor(httpOptions: HttpOptionsType); - +export interface HttpHandler { /** * 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 bb7fb04274e7..6eef18a9773d 100644 --- a/packages/types/src/middleware.ts +++ b/packages/types/src/middleware.ts @@ -47,7 +47,11 @@ 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. @@ -55,17 +59,23 @@ export interface Middleware> { * @param context */ new ( - next: T, + next: Handler, context: HandlerExecutionContext - ): T; + ): 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; } export type Step = 'initialize'|'build'|'finalize'; @@ -112,7 +122,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. @@ -120,20 +134,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. @@ -143,7 +162,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 @@ -155,7 +176,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 c98688e13b93..c9deeae26daf 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 459092055468..1c89e2d3ad4e 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",