diff --git a/clients/client-codecommit/src/commands/CreateRepositoryCommand.ts b/clients/client-codecommit/src/commands/CreateRepositoryCommand.ts index e1b54962c966..a23aaa19218f 100644 --- a/clients/client-codecommit/src/commands/CreateRepositoryCommand.ts +++ b/clients/client-codecommit/src/commands/CreateRepositoryCommand.ts @@ -108,6 +108,9 @@ export interface CreateRepositoryCommandOutput extends CreateRepositoryOutput, _ * @throws {@link InvalidTagsMapException} (client fault) *

The map of tags is not valid.

* + * @throws {@link OperationNotAllowedException} (client fault) + *

The requested action is not allowed.

+ * * @throws {@link RepositoryLimitExceededException} (client fault) *

A repository resource limit was exceeded.

* diff --git a/clients/client-codecommit/src/models/models_0.ts b/clients/client-codecommit/src/models/models_0.ts index 93cc2e981d73..9f3ca42581a1 100644 --- a/clients/client-codecommit/src/models/models_0.ts +++ b/clients/client-codecommit/src/models/models_0.ts @@ -4034,7 +4034,7 @@ export interface CreateRepositoryInput { /** *

The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to * programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see - * KeyId in the Decrypt API description in + * KeyId in the Decrypt API description in * the Key Management Service API Reference.

*

If no key is specified, the default aws/codecommit Amazon Web Services managed key is used.

* @public @@ -4155,6 +4155,26 @@ export class InvalidTagsMapException extends __BaseException { } } +/** + *

The requested action is not allowed.

+ * @public + */ +export class OperationNotAllowedException extends __BaseException { + readonly name: "OperationNotAllowedException" = "OperationNotAllowedException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "OperationNotAllowedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, OperationNotAllowedException.prototype); + } +} + /** *

A repository resource limit was exceeded.

* @public @@ -7182,34 +7202,3 @@ export interface ListFileCommitHistoryRequest { */ nextToken?: string; } - -/** - *

Information about a version of a file.

- * @public - */ -export interface FileVersion { - /** - *

Returns information about a specific commit.

- * @public - */ - commit?: Commit; - - /** - *

The blob ID of the object that represents the content of the file in this version.

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

The name and path of the file at which this blob is indexed which contains the data for this version of the file. This value will - * vary between file versions if a file is renamed or if its path changes.

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

An array of commit IDs that contain more recent versions of this file. If there are no additional versions of the file, this array will be empty.

- * @public - */ - revisionChildren?: string[]; -} diff --git a/clients/client-codecommit/src/models/models_1.ts b/clients/client-codecommit/src/models/models_1.ts index ec84b9ca83d1..e24a9432a0c5 100644 --- a/clients/client-codecommit/src/models/models_1.ts +++ b/clients/client-codecommit/src/models/models_1.ts @@ -8,11 +8,11 @@ import { ApprovalRuleTemplate, ApprovalState, Comment, + Commit, ConflictDetailLevelTypeEnum, ConflictResolution, ConflictResolutionStrategyTypeEnum, FileModeTypeEnum, - FileVersion, Location, OverrideStatus, PullRequest, @@ -20,6 +20,37 @@ import { RepositoryTrigger, } from "./models_0"; +/** + *

Information about a version of a file.

+ * @public + */ +export interface FileVersion { + /** + *

Returns information about a specific commit.

+ * @public + */ + commit?: Commit; + + /** + *

The blob ID of the object that represents the content of the file in this version.

+ * @public + */ + blobId?: string; + + /** + *

The name and path of the file at which this blob is indexed which contains the data for this version of the file. This value will + * vary between file versions if a file is renamed or if its path changes.

+ * @public + */ + path?: string; + + /** + *

An array of commit IDs that contain more recent versions of this file. If there are no additional versions of the file, this array will be empty.

+ * @public + */ + revisionChildren?: string[]; +} + /** * @public */ @@ -2509,7 +2540,7 @@ export interface UpdateRepositoryEncryptionKeyInput { /** *

The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to * programmatically retrieve a key ID. For more information about acceptable values for keyID, see - * KeyId in the Decrypt API description in + * KeyId in the Decrypt API description in * the Key Management Service API Reference.

* @public */ diff --git a/clients/client-codecommit/src/protocols/Aws_json1_1.ts b/clients/client-codecommit/src/protocols/Aws_json1_1.ts index 7a698e0ac3fe..c9600de119a6 100644 --- a/clients/client-codecommit/src/protocols/Aws_json1_1.ts +++ b/clients/client-codecommit/src/protocols/Aws_json1_1.ts @@ -432,6 +432,7 @@ import { NoChangeException, NumberOfRulesExceededException, NumberOfRuleTemplatesExceededException, + OperationNotAllowedException, ParentCommitDoesNotExistException, ParentCommitIdOutdatedException, ParentCommitIdRequiredException, @@ -3452,6 +3453,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "InvalidTagsMapException": case "com.amazonaws.codecommit#InvalidTagsMapException": throw await de_InvalidTagsMapExceptionRes(parsedOutput, context); + case "OperationNotAllowedException": + case "com.amazonaws.codecommit#OperationNotAllowedException": + throw await de_OperationNotAllowedExceptionRes(parsedOutput, context); case "RepositoryLimitExceededException": case "com.amazonaws.codecommit#RepositoryLimitExceededException": throw await de_RepositoryLimitExceededExceptionRes(parsedOutput, context); @@ -5950,6 +5954,22 @@ const de_NumberOfRuleTemplatesExceededExceptionRes = async ( return __decorateServiceException(exception, body); }; +/** + * deserializeAws_json1_1OperationNotAllowedExceptionRes + */ +const de_OperationNotAllowedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new OperationNotAllowedException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_json1_1OverrideAlreadySetExceptionRes */ @@ -7906,6 +7926,8 @@ const de_MergePullRequestByThreeWayOutput = ( // de_ObjectTypes omitted. +// de_OperationNotAllowedException omitted. + // de_OriginApprovalRuleTemplate omitted. // de_OverrideAlreadySetException omitted. diff --git a/codegen/sdk-codegen/aws-models/codecommit.json b/codegen/sdk-codegen/aws-models/codecommit.json index 409dc82586c2..d9b35b9b1b76 100644 --- a/codegen/sdk-codegen/aws-models/codecommit.json +++ b/codegen/sdk-codegen/aws-models/codecommit.json @@ -4174,6 +4174,9 @@ { "target": "com.amazonaws.codecommit#InvalidTagsMapException" }, + { + "target": "com.amazonaws.codecommit#OperationNotAllowedException" + }, { "target": "com.amazonaws.codecommit#RepositoryLimitExceededException" }, @@ -4219,7 +4222,7 @@ "kmsKeyId": { "target": "com.amazonaws.codecommit#KmsKeyId", "traits": { - "smithy.api#documentation": "

The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to\n programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see \n KeyId in the Decrypt API description in \n the Key Management Service API Reference.

\n

If no key is specified, the default aws/codecommit Amazon Web Services managed key is used.

" + "smithy.api#documentation": "

The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to\n programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see \n KeyId in the Decrypt API description in \n the Key Management Service API Reference.

\n

If no key is specified, the default aws/codecommit Amazon Web Services managed key is used.

" } } }, @@ -11528,6 +11531,21 @@ "smithy.api#documentation": "

Information about the type of an object in a merge operation.

" } }, + "com.amazonaws.codecommit#OperationNotAllowedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.codecommit#Message", + "traits": { + "smithy.api#documentation": "

Any message associated with the exception.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The requested action is not allowed.

", + "smithy.api#error": "client" + } + }, "com.amazonaws.codecommit#OrderEnum": { "type": "enum", "members": { @@ -15511,7 +15529,7 @@ "kmsKeyId": { "target": "com.amazonaws.codecommit#KmsKeyId", "traits": { - "smithy.api#documentation": "

The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to\n programmatically retrieve a key ID. For more information about acceptable values for keyID, see \n KeyId in the Decrypt API description in \n the Key Management Service API Reference.

", + "smithy.api#documentation": "

The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to\n programmatically retrieve a key ID. For more information about acceptable values for keyID, see \n KeyId in the Decrypt API description in \n the Key Management Service API Reference.

", "smithy.api#required": {} } }