diff --git a/packages/amazonq/.changes/next-release/Bug Fix-9b858707-a679-437f-b2f4-c3163d80e1b7.json b/packages/amazonq/.changes/next-release/Bug Fix-9b858707-a679-437f-b2f4-c3163d80e1b7.json new file mode 100644 index 00000000000..1e4b04f2701 --- /dev/null +++ b/packages/amazonq/.changes/next-release/Bug Fix-9b858707-a679-437f-b2f4-c3163d80e1b7.json @@ -0,0 +1,4 @@ +{ + "type": "Bug Fix", + "description": "Amazon q /dev: include granular error handling for code generation failed state" +} diff --git a/packages/core/src/amazonqFeatureDev/client/codewhispererruntime-2022-11-11.json b/packages/core/src/amazonqFeatureDev/client/codewhispererruntime-2022-11-11.json index 58512a292c9..c8690b720ee 100644 --- a/packages/core/src/amazonqFeatureDev/client/codewhispererruntime-2022-11-11.json +++ b/packages/core/src/amazonqFeatureDev/client/codewhispererruntime-2022-11-11.json @@ -2,9 +2,11 @@ "version": "2.0", "metadata": { "apiVersion": "2022-11-11", + "auth": ["smithy.api#httpBearerAuth"], "endpointPrefix": "amazoncodewhispererservice", "jsonVersion": "1.0", "protocol": "json", + "protocols": ["json"], "serviceFullName": "Amazon CodeWhisperer", "serviceId": "CodeWhispererRuntime", "signatureVersion": "bearer", @@ -19,27 +21,14 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "CreateUploadUrlRequest" - }, - "output": { - "shape": "CreateUploadUrlResponse" - }, + "input": { "shape": "CreateUploadUrlRequest" }, + "output": { "shape": "CreateUploadUrlResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } + { "shape": "ThrottlingException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } ], - "documentation": "
Creates a pre-signed, S3 write URL for uploading a repository zip archive.
", "idempotent": true }, "CreateTaskAssistConversation": { @@ -48,27 +37,15 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "CreateTaskAssistConversationRequest" - }, - "output": { - "shape": "CreateTaskAssistConversationResponse" - }, + "input": { "shape": "CreateTaskAssistConversationRequest" }, + "output": { "shape": "CreateTaskAssistConversationResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "API to create task assist conversation.
" + { "shape": "ThrottlingException" }, + { "shape": "ServiceQuotaExceededException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "CreateUploadUrl": { "name": "CreateUploadUrl", @@ -76,33 +53,17 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "CreateUploadUrlRequest" - }, - "output": { - "shape": "CreateUploadUrlResponse" - }, + "input": { "shape": "CreateUploadUrlRequest" }, + "output": { "shape": "CreateUploadUrlResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } + { "shape": "ThrottlingException" }, + { "shape": "ConflictException" }, + { "shape": "ServiceQuotaExceededException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } ], - "documentation": "Creates a pre-signed, S3 write URL for uploading a repository zip archive.
", "idempotent": true }, "DeleteTaskAssistConversation": { @@ -111,30 +72,15 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "DeleteTaskAssistConversationRequest" - }, - "output": { - "shape": "DeleteTaskAssistConversationResponse" - }, + "input": { "shape": "DeleteTaskAssistConversationRequest" }, + "output": { "shape": "DeleteTaskAssistConversationResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "API to delete task assist conversation.
" + { "shape": "ThrottlingException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "GenerateCompletions": { "name": "GenerateCompletions", @@ -142,27 +88,14 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "GenerateCompletionsRequest" - }, - "output": { - "shape": "GenerateCompletionsResponse" - }, + "input": { "shape": "GenerateCompletionsRequest" }, + "output": { "shape": "GenerateCompletionsResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "Generate completions based on the provided file context in a paginated response.
" + { "shape": "ThrottlingException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "GetCodeAnalysis": { "name": "GetCodeAnalysis", @@ -170,30 +103,15 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "GetCodeAnalysisRequest" - }, - "output": { - "shape": "GetCodeAnalysisResponse" - }, + "input": { "shape": "GetCodeAnalysisRequest" }, + "output": { "shape": "GetCodeAnalysisResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "Gets the metadata of a code analysis job.
" + { "shape": "ThrottlingException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "GetTaskAssistCodeGeneration": { "name": "GetTaskAssistCodeGeneration", @@ -201,33 +119,16 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "GetTaskAssistCodeGenerationRequest" - }, - "output": { - "shape": "GetTaskAssistCodeGenerationResponse" - }, + "input": { "shape": "GetTaskAssistCodeGenerationRequest" }, + "output": { "shape": "GetTaskAssistCodeGenerationResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "API to get status of task assist code generation.
" + { "shape": "ThrottlingException" }, + { "shape": "ConflictException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "GetTransformation": { "name": "GetTransformation", @@ -235,27 +136,15 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "GetTransformationRequest" - }, - "output": { - "shape": "GetTransformationResponse" - }, + "input": { "shape": "GetTransformationRequest" }, + "output": { "shape": "GetTransformationResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "API to get code transformation status.
" + { "shape": "ThrottlingException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "GetTransformationPlan": { "name": "GetTransformationPlan", @@ -263,27 +152,15 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "GetTransformationPlanRequest" - }, - "output": { - "shape": "GetTransformationPlanResponse" - }, + "input": { "shape": "GetTransformationPlanRequest" }, + "output": { "shape": "GetTransformationPlanResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "API to get code transformation status.
" + { "shape": "ThrottlingException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "ListAvailableCustomizations": { "name": "ListAvailableCustomizations", @@ -291,25 +168,13 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "ListAvailableCustomizationsRequest" - }, - "output": { - "shape": "ListAvailableCustomizationsResponse" - }, + "input": { "shape": "ListAvailableCustomizationsRequest" }, + "output": { "shape": "ListAvailableCustomizationsResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } + { "shape": "ThrottlingException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } ] }, "ListCodeAnalysisFindings": { @@ -318,30 +183,15 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "ListCodeAnalysisFindingsRequest" - }, - "output": { - "shape": "ListCodeAnalysisFindingsResponse" - }, + "input": { "shape": "ListCodeAnalysisFindingsRequest" }, + "output": { "shape": "ListCodeAnalysisFindingsResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "Lists the findings from a particular code analysis job.
" + { "shape": "ThrottlingException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "ListFeatureEvaluations": { "name": "ListFeatureEvaluations", @@ -349,27 +199,30 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "ListFeatureEvaluationsRequest" - }, - "output": { - "shape": "ListFeatureEvaluationsResponse" + "input": { "shape": "ListFeatureEvaluationsRequest" }, + "output": { "shape": "ListFeatureEvaluationsResponse" }, + "errors": [ + { "shape": "ThrottlingException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] + }, + "ResumeTransformation": { + "name": "ResumeTransformation", + "http": { + "method": "POST", + "requestUri": "/" }, + "input": { "shape": "ResumeTransformationRequest" }, + "output": { "shape": "ResumeTransformationResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "Return configruations for each feature that has been setup for A/B testing.
" + { "shape": "ThrottlingException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "SendTelemetryEvent": { "name": "SendTelemetryEvent", @@ -377,27 +230,14 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "SendTelemetryEventRequest" - }, - "output": { - "shape": "SendTelemetryEventResponse" - }, + "input": { "shape": "SendTelemetryEventRequest" }, + "output": { "shape": "SendTelemetryEventResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } + { "shape": "ThrottlingException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } ], - "documentation": "API to record telemetry events.
", "idempotent": true }, "StartCodeAnalysis": { @@ -406,33 +246,16 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "StartCodeAnalysisRequest" - }, - "output": { - "shape": "StartCodeAnalysisResponse" - }, + "input": { "shape": "StartCodeAnalysisRequest" }, + "output": { "shape": "StartCodeAnalysisResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } + { "shape": "ThrottlingException" }, + { "shape": "ConflictException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } ], - "documentation": "Starts a code analysis job
", "idempotent": true }, "StartTaskAssistCodeGeneration": { @@ -441,33 +264,17 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "StartTaskAssistCodeGenerationRequest" - }, - "output": { - "shape": "StartTaskAssistCodeGenerationResponse" - }, + "input": { "shape": "StartTaskAssistCodeGenerationRequest" }, + "output": { "shape": "StartTaskAssistCodeGenerationResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "API to start task assist code generation.
" + { "shape": "ThrottlingException" }, + { "shape": "ConflictException" }, + { "shape": "ServiceQuotaExceededException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "StartTransformation": { "name": "StartTransformation", @@ -475,27 +282,15 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "StartTransformationRequest" - }, - "output": { - "shape": "StartTransformationResponse" - }, + "input": { "shape": "StartTransformationRequest" }, + "output": { "shape": "StartTransformationResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "API to start code translation.
" + { "shape": "ThrottlingException" }, + { "shape": "ConflictException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] }, "StopTransformation": { "name": "StopTransformation", @@ -503,27 +298,15 @@ "method": "POST", "requestUri": "/" }, - "input": { - "shape": "StopTransformationRequest" - }, - "output": { - "shape": "StopTransformationResponse" - }, + "input": { "shape": "StopTransformationRequest" }, + "output": { "shape": "StopTransformationResponse" }, "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "API to stop code transformation status.
" + { "shape": "ThrottlingException" }, + { "shape": "ResourceNotFoundException" }, + { "shape": "InternalServerException" }, + { "shape": "ValidationException" }, + { "shape": "AccessDeniedException" } + ] } }, "shapes": { @@ -531,21 +314,59 @@ "type": "structure", "required": ["message"], "members": { - "message": { - "shape": "String" - } + "message": { "shape": "String" }, + "reason": { "shape": "AccessDeniedExceptionReason" } }, - "documentation": "This exception is thrown when the user does not have sufficient access to perform this action.
", "exception": true }, + "AccessDeniedExceptionReason": { + "type": "string", + "enum": ["UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS"] + }, + "AppStudioState": { + "type": "structure", + "required": ["namespace", "propertyName", "propertyContext"], + "members": { + "namespace": { "shape": "AppStudioStateNamespaceString" }, + "propertyName": { "shape": "AppStudioStatePropertyNameString" }, + "propertyValue": { "shape": "AppStudioStatePropertyValueString" }, + "propertyContext": { "shape": "AppStudioStatePropertyContextString" } + } + }, + "AppStudioStateNamespaceString": { + "type": "string", + "max": 1024, + "min": 1, + "sensitive": true + }, + "AppStudioStatePropertyContextString": { + "type": "string", + "max": 1024, + "min": 1, + "sensitive": true + }, + "AppStudioStatePropertyNameString": { + "type": "string", + "max": 1024, + "min": 1, + "sensitive": true + }, + "AppStudioStatePropertyValueString": { + "type": "string", + "max": 1024, + "min": 1, + "sensitive": true + }, + "ArtifactId": { + "type": "string", + "max": 126, + "min": 1, + "pattern": "[a-zA-Z0-9-_]+" + }, "ArtifactMap": { "type": "map", - "key": { - "shape": "ArtifactType" - }, - "value": { - "shape": "UploadId" - }, + "key": { "shape": "ArtifactType" }, + "value": { "shape": "UploadId" }, "max": 64, "min": 1 }, @@ -557,28 +378,12 @@ "type": "structure", "required": ["content"], "members": { - "messageId": { - "shape": "AssistantResponseMessageMessageIdString", - "documentation": "Unique identifier for the chat message
" - }, - "content": { - "shape": "AssistantResponseMessageContentString", - "documentation": "The content of the text message in markdown format.
" - }, - "supplementaryWebLinks": { - "shape": "SupplementaryWebLinks", - "documentation": "Web References
" - }, - "references": { - "shape": "References", - "documentation": "Code References
" - }, - "followupPrompt": { - "shape": "FollowupPrompt", - "documentation": "Followup Prompt
" - } - }, - "documentation": "Markdown text message.
" + "messageId": { "shape": "MessageId" }, + "content": { "shape": "AssistantResponseMessageContentString" }, + "supplementaryWebLinks": { "shape": "SupplementaryWebLinks" }, + "references": { "shape": "References" }, + "followupPrompt": { "shape": "FollowupPrompt" } + } }, "AssistantResponseMessageContentString": { "type": "string", @@ -586,11 +391,6 @@ "min": 0, "sensitive": true }, - "AssistantResponseMessageMessageIdString": { - "type": "string", - "max": 128, - "min": 0 - }, "Base64EncodedPaginationToken": { "type": "string", "max": 2048, @@ -601,64 +401,123 @@ "type": "boolean", "box": true }, + "ChatAddMessageEvent": { + "type": "structure", + "required": ["conversationId", "messageId"], + "members": { + "conversationId": { "shape": "ConversationId" }, + "messageId": { "shape": "MessageId" }, + "customizationArn": { "shape": "CustomizationArn" }, + "userIntent": { "shape": "UserIntent" }, + "hasCodeSnippet": { "shape": "Boolean" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "activeEditorTotalCharacters": { "shape": "Integer" }, + "timeToFirstChunkMilliseconds": { "shape": "Double" }, + "timeBetweenChunks": { "shape": "timeBetweenChunks" }, + "fullResponselatency": { "shape": "Double" }, + "requestLength": { "shape": "Integer" }, + "responseLength": { "shape": "Integer" }, + "numberOfCodeBlocks": { "shape": "Integer" }, + "hasProjectLevelContext": { "shape": "Boolean" } + } + }, "ChatHistory": { "type": "list", - "member": { - "shape": "ChatMessage" - }, - "documentation": "Indicates Participant in Chat conversation
", + "member": { "shape": "ChatMessage" }, "max": 10, "min": 0 }, + "ChatInteractWithMessageEvent": { + "type": "structure", + "required": ["conversationId", "messageId"], + "members": { + "conversationId": { "shape": "ConversationId" }, + "messageId": { "shape": "MessageId" }, + "customizationArn": { "shape": "CustomizationArn" }, + "interactionType": { "shape": "ChatMessageInteractionType" }, + "interactionTarget": { "shape": "ChatInteractWithMessageEventInteractionTargetString" }, + "acceptedCharacterCount": { "shape": "Integer" }, + "acceptedLineCount": { "shape": "Integer" }, + "acceptedSnippetHasReference": { "shape": "Boolean" }, + "hasProjectLevelContext": { "shape": "Boolean" } + } + }, + "ChatInteractWithMessageEventInteractionTargetString": { + "type": "string", + "max": 1024, + "min": 1 + }, "ChatMessage": { "type": "structure", "members": { - "userInputMessage": { - "shape": "UserInputMessage" - }, - "assistantResponseMessage": { - "shape": "AssistantResponseMessage" - } + "userInputMessage": { "shape": "UserInputMessage" }, + "assistantResponseMessage": { "shape": "AssistantResponseMessage" } }, "union": true }, + "ChatMessageInteractionType": { + "type": "string", + "enum": [ + "INSERT_AT_CURSOR", + "COPY_SNIPPET", + "COPY", + "CLICK_LINK", + "CLICK_BODY_LINK", + "CLICK_FOLLOW_UP", + "HOVER_REFERENCE", + "UPVOTE", + "DOWNVOTE" + ] + }, "ChatTriggerType": { "type": "string", - "documentation": "Trigger Reason for Chat
", "enum": ["MANUAL", "DIAGNOSTIC"] }, + "ChatUserModificationEvent": { + "type": "structure", + "required": ["conversationId", "messageId", "modificationPercentage"], + "members": { + "conversationId": { "shape": "ConversationId" }, + "customizationArn": { "shape": "CustomizationArn" }, + "messageId": { "shape": "MessageId" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "modificationPercentage": { "shape": "Double" }, + "hasProjectLevelContext": { "shape": "Boolean" } + } + }, "CodeAnalysisFindingsSchema": { "type": "string", "enum": ["codeanalysis/findings/1.0"] }, + "CodeAnalysisScope": { + "type": "string", + "enum": ["FILE", "PROJECT"] + }, "CodeAnalysisStatus": { "type": "string", "enum": ["Completed", "Pending", "Failed"] }, + "CodeAnalysisUploadContext": { + "type": "structure", + "required": ["codeScanName"], + "members": { + "codeScanName": { "shape": "CodeScanName" } + } + }, "CodeCoverageEvent": { "type": "structure", "required": ["programmingLanguage", "acceptedCharacterCount", "totalCharacterCount", "timestamp"], "members": { - "customizationArn": { - "shape": "CustomizationArn" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "acceptedCharacterCount": { - "shape": "PrimitiveInteger" - }, - "totalCharacterCount": { - "shape": "PrimitiveInteger" - }, - "timestamp": { - "shape": "Timestamp" - } + "customizationArn": { "shape": "CustomizationArn" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "acceptedCharacterCount": { "shape": "PrimitiveInteger" }, + "totalCharacterCount": { "shape": "PrimitiveInteger" }, + "timestamp": { "shape": "Timestamp" }, + "unmodifiedAcceptedCharacterCount": { "shape": "PrimitiveInteger" } } }, "CodeGenerationId": { "type": "string", - "documentation": "ID which represents a single code generation in a conversation
", "max": 128, "min": 1 }, @@ -666,14 +525,14 @@ "type": "structure", "required": ["status", "currentStage"], "members": { - "status": { - "shape": "CodeGenerationWorkflowStatus" - }, - "currentStage": { - "shape": "CodeGenerationWorkflowStage" - } + "status": { "shape": "CodeGenerationWorkflowStatus" }, + "currentStage": { "shape": "CodeGenerationWorkflowStage" } } }, + "CodeGenerationStatusDetail": { + "type": "string", + "sensitive": true + }, "CodeGenerationWorkflowStage": { "type": "string", "enum": ["InitialCodeGeneration", "CodeRefinement"] @@ -686,15 +545,10 @@ "type": "structure", "required": ["programmingLanguage", "codeScanJobId", "timestamp"], "members": { - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "codeScanJobId": { - "shape": "CodeScanJobId" - }, - "timestamp": { - "shape": "Timestamp" - } + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "codeScanJobId": { "shape": "CodeScanJobId" }, + "timestamp": { "shape": "Timestamp" }, + "codeAnalysisScope": { "shape": "CodeAnalysisScope" } } }, "CodeScanJobId": { @@ -702,19 +556,37 @@ "max": 128, "min": 1 }, + "CodeScanName": { + "type": "string", + "max": 128, + "min": 1 + }, + "CodeScanRemediationsEvent": { + "type": "structure", + "members": { + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "CodeScanRemediationsEventType": { "shape": "CodeScanRemediationsEventType" }, + "timestamp": { "shape": "Timestamp" }, + "detectorId": { "shape": "String" }, + "findingId": { "shape": "String" }, + "ruleId": { "shape": "String" }, + "component": { "shape": "String" }, + "reason": { "shape": "String" }, + "result": { "shape": "String" }, + "includesFix": { "shape": "Boolean" } + } + }, + "CodeScanRemediationsEventType": { + "type": "string", + "enum": ["CODESCAN_ISSUE_HOVER", "CODESCAN_ISSUE_APPLY_FIX", "CODESCAN_ISSUE_VIEW_DETAILS"] + }, "Completion": { "type": "structure", "required": ["content"], "members": { - "content": { - "shape": "CompletionContentString" - }, - "references": { - "shape": "References" - }, - "mostRelevantMissingImports": { - "shape": "Imports" - } + "content": { "shape": "CompletionContentString" }, + "references": { "shape": "References" }, + "mostRelevantMissingImports": { "shape": "Imports" } } }, "CompletionContentString": { @@ -729,9 +601,7 @@ }, "Completions": { "type": "list", - "member": { - "shape": "Completion" - }, + "member": { "shape": "Completion" }, "max": 10, "min": 0 }, @@ -739,11 +609,8 @@ "type": "structure", "required": ["message"], "members": { - "message": { - "shape": "String" - } + "message": { "shape": "String" } }, - "documentation": "This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state.
", "exception": true }, "ContentChecksumType": { @@ -752,12 +619,10 @@ }, "ContextTruncationScheme": { "type": "string", - "documentation": "Workspace context truncation schemes based on usecase
", "enum": ["ANALYSIS", "GUMBY"] }, "ConversationId": { "type": "string", - "documentation": "ID which represents a multi-turn conversation
", "max": 128, "min": 1 }, @@ -765,64 +630,34 @@ "type": "structure", "required": ["currentMessage", "chatTriggerType"], "members": { - "conversationId": { - "shape": "ConversationId", - "documentation": "Unique identifier for the chat conversation stream
" - }, - "history": { - "shape": "ChatHistory", - "documentation": "Holds the history of chat messages.
" - }, - "currentMessage": { - "shape": "ChatMessage", - "documentation": "Holds the current message being processed or displayed.
" - }, - "chatTriggerType": { - "shape": "ChatTriggerType", - "documentation": "Trigger Reason for Chat
" - } - }, - "documentation": "Structure to represent the current state of a chat conversation.
" + "conversationId": { "shape": "ConversationId" }, + "history": { "shape": "ChatHistory" }, + "currentMessage": { "shape": "ChatMessage" }, + "chatTriggerType": { "shape": "ChatTriggerType" }, + "customizationArn": { "shape": "ResourceArn" } + } }, "CreateTaskAssistConversationRequest": { "type": "structure", - "members": {}, - "documentation": "Structure to represent bootstrap conversation request.
" + "members": {} }, "CreateTaskAssistConversationResponse": { "type": "structure", "required": ["conversationId"], "members": { - "conversationId": { - "shape": "ConversationId" - } - }, - "documentation": "Structure to represent bootstrap conversation response.
" + "conversationId": { "shape": "ConversationId" } + } }, "CreateUploadUrlRequest": { "type": "structure", "members": { - "contentMd5": { - "shape": "CreateUploadUrlRequestContentMd5String" - }, - "contentChecksum": { - "shape": "CreateUploadUrlRequestContentChecksumString" - }, - "contentChecksumType": { - "shape": "ContentChecksumType" - }, - "contentLength": { - "shape": "CreateUploadUrlRequestContentLengthLong" - }, - "artifactType": { - "shape": "ArtifactType" - }, - "uploadIntent": { - "shape": "UploadIntent" - }, - "uploadContext": { - "shape": "UploadContext" - } + "contentMd5": { "shape": "CreateUploadUrlRequestContentMd5String" }, + "contentChecksum": { "shape": "CreateUploadUrlRequestContentChecksumString" }, + "contentChecksumType": { "shape": "ContentChecksumType" }, + "contentLength": { "shape": "CreateUploadUrlRequestContentLengthLong" }, + "artifactType": { "shape": "ArtifactType" }, + "uploadIntent": { "shape": "UploadIntent" }, + "uploadContext": { "shape": "UploadContext" } } }, "CreateUploadUrlRequestContentChecksumString": { @@ -846,52 +681,34 @@ "type": "structure", "required": ["uploadId", "uploadUrl"], "members": { - "uploadId": { - "shape": "UploadId" - }, - "uploadUrl": { - "shape": "PreSignedUrl" - }, - "kmsKeyArn": { - "shape": "ResourceArn" - } + "uploadId": { "shape": "UploadId" }, + "uploadUrl": { "shape": "PreSignedUrl" }, + "kmsKeyArn": { "shape": "ResourceArn" }, + "requestHeaders": { "shape": "RequestHeaders" } } }, "CursorState": { "type": "structure", "members": { - "position": { - "shape": "Position", - "documentation": "Represents a cursor position in a Text Document
" - }, - "range": { - "shape": "Range", - "documentation": "Represents a text selection in a Text Document
" - } + "position": { "shape": "Position" }, + "range": { "shape": "Range" } }, - "documentation": "Represents the state of the Cursor in an Editor
", "union": true }, "Customization": { "type": "structure", "required": ["arn"], "members": { - "arn": { - "shape": "CustomizationArn" - }, - "name": { - "shape": "CustomizationName" - }, - "description": { - "shape": "Description" - } + "arn": { "shape": "CustomizationArn" }, + "name": { "shape": "CustomizationName" }, + "description": { "shape": "Description" } } }, "CustomizationArn": { "type": "string", "max": 950, "min": 0, - "pattern": "$|^arn:[-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}" + "pattern": "arn:[-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}" }, "CustomizationName": { "type": "string", @@ -901,29 +718,21 @@ }, "Customizations": { "type": "list", - "member": { - "shape": "Customization" - } + "member": { "shape": "Customization" } }, "DeleteTaskAssistConversationRequest": { "type": "structure", "required": ["conversationId"], "members": { - "conversationId": { - "shape": "ConversationId" - } - }, - "documentation": "Structure to represent bootstrap conversation request.
" + "conversationId": { "shape": "ConversationId" } + } }, "DeleteTaskAssistConversationResponse": { "type": "structure", "required": ["conversationId"], "members": { - "conversationId": { - "shape": "ConversationId" - } - }, - "documentation": "Structure to represent bootstrap conversation response.
" + "conversationId": { "shape": "ConversationId" } + } }, "Description": { "type": "string", @@ -934,39 +743,25 @@ "Diagnostic": { "type": "structure", "members": { - "textDocumentDiagnostic": { - "shape": "TextDocumentDiagnostic", - "documentation": "Diagnostics originating from a TextDocument
" - }, - "runtimeDiagnostic": { - "shape": "RuntimeDiagnostic", - "documentation": "Diagnostics originating from a Runtime
" - } + "textDocumentDiagnostic": { "shape": "TextDocumentDiagnostic" }, + "runtimeDiagnostic": { "shape": "RuntimeDiagnostic" } }, - "documentation": "Represents a Diagnostic message
", "union": true }, "DiagnosticSeverity": { "type": "string", - "documentation": "Diagnostic Error types
", "enum": ["ERROR", "WARNING", "INFORMATION", "HINT"] }, "Dimension": { "type": "structure", "members": { - "name": { - "shape": "DimensionNameString" - }, - "value": { - "shape": "DimensionValueString" - } + "name": { "shape": "DimensionNameString" }, + "value": { "shape": "DimensionValueString" } } }, "DimensionList": { "type": "list", - "member": { - "shape": "Dimension" - }, + "member": { "shape": "Dimension" }, "max": 30, "min": 0 }, @@ -986,18 +781,9 @@ "type": "structure", "required": ["name", "type"], "members": { - "name": { - "shape": "DocumentSymbolNameString", - "documentation": "Name of the Document Symbol
" - }, - "type": { - "shape": "SymbolType", - "documentation": "Symbol type - DECLARATION / USAGE
" - }, - "source": { - "shape": "DocumentSymbolSourceString", - "documentation": "Symbol package / source for FullyQualified names
" - } + "name": { "shape": "DocumentSymbolNameString" }, + "type": { "shape": "SymbolType" }, + "source": { "shape": "DocumentSymbolSourceString" } } }, "DocumentSymbolNameString": { @@ -1012,9 +798,7 @@ }, "DocumentSymbols": { "type": "list", - "member": { - "shape": "DocumentSymbol" - }, + "member": { "shape": "DocumentSymbol" }, "max": 1000, "min": 0 }, @@ -1025,46 +809,75 @@ "EditorState": { "type": "structure", "members": { - "document": { - "shape": "TextDocument", - "documentation": "Represents currently edited file
" - }, - "cursorState": { - "shape": "CursorState", - "documentation": "Position of the cursor
" - } - }, - "documentation": "Represents the state of an Editor
" + "document": { "shape": "TextDocument" }, + "cursorState": { "shape": "CursorState" }, + "relevantDocuments": { "shape": "RelevantDocumentList" } + } + }, + "EnvState": { + "type": "structure", + "members": { + "operatingSystem": { "shape": "EnvStateOperatingSystemString" }, + "currentWorkingDirectory": { "shape": "EnvStateCurrentWorkingDirectoryString" }, + "environmentVariables": { "shape": "EnvironmentVariables" } + } + }, + "EnvStateCurrentWorkingDirectoryString": { + "type": "string", + "max": 256, + "min": 1, + "sensitive": true + }, + "EnvStateOperatingSystemString": { + "type": "string", + "max": 32, + "min": 1, + "pattern": "(macos|linux|windows)" + }, + "EnvironmentVariable": { + "type": "structure", + "members": { + "key": { "shape": "EnvironmentVariableKeyString" }, + "value": { "shape": "EnvironmentVariableValueString" } + } + }, + "EnvironmentVariableKeyString": { + "type": "string", + "max": 256, + "min": 1, + "sensitive": true + }, + "EnvironmentVariableValueString": { + "type": "string", + "max": 1024, + "min": 1, + "sensitive": true + }, + "EnvironmentVariables": { + "type": "list", + "member": { "shape": "EnvironmentVariable" }, + "max": 100, + "min": 0 }, "FeatureDevEvent": { "type": "structure", "required": ["conversationId"], "members": { - "conversationId": { - "shape": "ConversationId" - } + "conversationId": { "shape": "ConversationId" } } }, "FeatureEvaluation": { "type": "structure", "required": ["feature", "variation", "value"], "members": { - "feature": { - "shape": "FeatureName" - }, - "variation": { - "shape": "FeatureVariation" - }, - "value": { - "shape": "FeatureValue" - } + "feature": { "shape": "FeatureName" }, + "variation": { "shape": "FeatureVariation" }, + "value": { "shape": "FeatureValue" } } }, "FeatureEvaluationsList": { "type": "list", - "member": { - "shape": "FeatureEvaluation" - }, + "member": { "shape": "FeatureEvaluation" }, "max": 50, "min": 0 }, @@ -1077,18 +890,10 @@ "FeatureValue": { "type": "structure", "members": { - "boolValue": { - "shape": "Boolean" - }, - "doubleValue": { - "shape": "Double" - }, - "longValue": { - "shape": "Long" - }, - "stringValue": { - "shape": "FeatureValueStringType" - } + "boolValue": { "shape": "Boolean" }, + "doubleValue": { "shape": "Double" }, + "longValue": { "shape": "Long" }, + "stringValue": { "shape": "FeatureValueStringType" } }, "union": true }, @@ -1107,18 +912,10 @@ "type": "structure", "required": ["leftFileContent", "rightFileContent", "filename", "programmingLanguage"], "members": { - "leftFileContent": { - "shape": "FileContextLeftFileContentString" - }, - "rightFileContent": { - "shape": "FileContextRightFileContentString" - }, - "filename": { - "shape": "FileContextFilenameString" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - } + "leftFileContent": { "shape": "FileContextLeftFileContentString" }, + "rightFileContent": { "shape": "FileContextRightFileContentString" }, + "filename": { "shape": "FileContextFilenameString" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" } } }, "FileContextFilenameString": { @@ -1143,16 +940,9 @@ "type": "structure", "required": ["content"], "members": { - "content": { - "shape": "FollowupPromptContentString", - "documentation": "The content of the text message in markdown format.
" - }, - "userIntent": { - "shape": "UserIntent", - "documentation": "User Intent
" - } - }, - "documentation": "Followup Prompt for the Assistant Response
" + "content": { "shape": "FollowupPromptContentString" }, + "userIntent": { "shape": "UserIntent" } + } }, "FollowupPromptContentString": { "type": "string", @@ -1164,30 +954,15 @@ "type": "structure", "required": ["fileContext"], "members": { - "fileContext": { - "shape": "FileContext" - }, - "maxResults": { - "shape": "GenerateCompletionsRequestMaxResultsInteger" - }, - "nextToken": { - "shape": "GenerateCompletionsRequestNextTokenString" - }, - "referenceTrackerConfiguration": { - "shape": "ReferenceTrackerConfiguration" - }, - "supplementalContexts": { - "shape": "SupplementalContextList" - }, - "customizationArn": { - "shape": "CustomizationArn" - }, - "optOutPreference": { - "shape": "OptOutPreference" - }, - "userContext": { - "shape": "UserContext" - } + "fileContext": { "shape": "FileContext" }, + "maxResults": { "shape": "GenerateCompletionsRequestMaxResultsInteger" }, + "nextToken": { "shape": "GenerateCompletionsRequestNextTokenString" }, + "referenceTrackerConfiguration": { "shape": "ReferenceTrackerConfiguration" }, + "supplementalContexts": { "shape": "SupplementalContextList" }, + "customizationArn": { "shape": "CustomizationArn" }, + "optOutPreference": { "shape": "OptOutPreference" }, + "userContext": { "shape": "UserContext" }, + "profileArn": { "shape": "ProfileArn" } } }, "GenerateCompletionsRequestMaxResultsInteger": { @@ -1206,21 +981,15 @@ "GenerateCompletionsResponse": { "type": "structure", "members": { - "completions": { - "shape": "Completions" - }, - "nextToken": { - "shape": "SensitiveString" - } + "completions": { "shape": "Completions" }, + "nextToken": { "shape": "SensitiveString" } } }, "GetCodeAnalysisRequest": { "type": "structure", "required": ["jobId"], "members": { - "jobId": { - "shape": "GetCodeAnalysisRequestJobIdString" - } + "jobId": { "shape": "GetCodeAnalysisRequestJobIdString" } } }, "GetCodeAnalysisRequestJobIdString": { @@ -1232,89 +1001,72 @@ "type": "structure", "required": ["status"], "members": { - "status": { - "shape": "CodeAnalysisStatus" - }, - "errorMessage": { - "shape": "SensitiveString" - } + "status": { "shape": "CodeAnalysisStatus" }, + "errorMessage": { "shape": "SensitiveString" } } }, "GetTaskAssistCodeGenerationRequest": { "type": "structure", "required": ["conversationId", "codeGenerationId"], "members": { - "conversationId": { - "shape": "ConversationId" - }, - "codeGenerationId": { - "shape": "CodeGenerationId" - } - }, - "documentation": "Request for getting task assist code generation.
" + "conversationId": { "shape": "ConversationId" }, + "codeGenerationId": { "shape": "CodeGenerationId" } + } }, "GetTaskAssistCodeGenerationResponse": { "type": "structure", "required": ["conversationId", "codeGenerationStatus"], "members": { - "conversationId": { - "shape": "ConversationId" - }, - "codeGenerationStatus": { - "shape": "CodeGenerationStatus" - }, - "codeGenerationRemainingIterationCount": { - "shape": "Integer" - }, - "codeGenerationTotalIterationCount": { - "shape": "Integer" - } - }, - "documentation": "Response for getting task assist code generation status.
" + "conversationId": { "shape": "ConversationId" }, + "codeGenerationStatus": { "shape": "CodeGenerationStatus" }, + "codeGenerationStatusDetail": { "shape": "CodeGenerationStatusDetail" }, + "codeGenerationRemainingIterationCount": { "shape": "Integer" }, + "codeGenerationTotalIterationCount": { "shape": "Integer" } + } }, "GetTransformationPlanRequest": { "type": "structure", "required": ["transformationJobId"], "members": { - "transformationJobId": { - "shape": "TransformationJobId" - } - }, - "documentation": "Structure to represent get code transformation plan request.
" + "transformationJobId": { "shape": "TransformationJobId" } + } }, "GetTransformationPlanResponse": { "type": "structure", "required": ["transformationPlan"], "members": { - "transformationPlan": { - "shape": "TransformationPlan" - } - }, - "documentation": "Structure to represent get code transformation plan response.
" + "transformationPlan": { "shape": "TransformationPlan" } + } }, "GetTransformationRequest": { "type": "structure", "required": ["transformationJobId"], "members": { - "transformationJobId": { - "shape": "TransformationJobId" - } - }, - "documentation": "Structure to represent get code transformation request.
" + "transformationJobId": { "shape": "TransformationJobId" } + } }, "GetTransformationResponse": { "type": "structure", "required": ["transformationJob"], "members": { - "transformationJob": { - "shape": "TransformationJob" - } - }, - "documentation": "Structure to represent get code transformation response.
" + "transformationJob": { "shape": "TransformationJob" } + } + }, + "GitState": { + "type": "structure", + "members": { + "status": { "shape": "GitStateStatusString" } + } + }, + "GitStateStatusString": { + "type": "string", + "max": 4096, + "min": 0, + "sensitive": true }, "IdeCategory": { "type": "string", - "enum": ["JETBRAINS", "VSCODE"], + "enum": ["JETBRAINS", "VSCODE", "CLI", "JUPYTER_MD", "JUPYTER_SM"], "max": 64, "min": 1 }, @@ -1326,9 +1078,7 @@ "Import": { "type": "structure", "members": { - "statement": { - "shape": "ImportStatementString" - } + "statement": { "shape": "ImportStatementString" } } }, "ImportStatementString": { @@ -1339,9 +1089,7 @@ }, "Imports": { "type": "list", - "member": { - "shape": "Import" - }, + "member": { "shape": "Import" }, "max": 10, "min": 0 }, @@ -1353,26 +1101,17 @@ "type": "structure", "required": ["message"], "members": { - "message": { - "shape": "String" - } + "message": { "shape": "String" } }, - "documentation": "This exception is thrown when an unexpected error occurred during the processing of a request.
", "exception": true, "fault": true, - "retryable": { - "throttling": false - } + "retryable": { "throttling": false } }, "ListAvailableCustomizationsRequest": { "type": "structure", "members": { - "maxResults": { - "shape": "ListAvailableCustomizationsRequestMaxResultsInteger" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } + "maxResults": { "shape": "ListAvailableCustomizationsRequestMaxResultsInteger" }, + "nextToken": { "shape": "Base64EncodedPaginationToken" } } }, "ListAvailableCustomizationsRequestMaxResultsInteger": { @@ -1385,27 +1124,17 @@ "type": "structure", "required": ["customizations"], "members": { - "customizations": { - "shape": "Customizations" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } + "customizations": { "shape": "Customizations" }, + "nextToken": { "shape": "Base64EncodedPaginationToken" } } }, "ListCodeAnalysisFindingsRequest": { "type": "structure", "required": ["jobId", "codeAnalysisFindingsSchema"], "members": { - "jobId": { - "shape": "ListCodeAnalysisFindingsRequestJobIdString" - }, - "nextToken": { - "shape": "PaginationToken" - }, - "codeAnalysisFindingsSchema": { - "shape": "CodeAnalysisFindingsSchema" - } + "jobId": { "shape": "ListCodeAnalysisFindingsRequestJobIdString" }, + "nextToken": { "shape": "PaginationToken" }, + "codeAnalysisFindingsSchema": { "shape": "CodeAnalysisFindingsSchema" } } }, "ListCodeAnalysisFindingsRequestJobIdString": { @@ -1417,52 +1146,42 @@ "type": "structure", "required": ["codeAnalysisFindings"], "members": { - "nextToken": { - "shape": "PaginationToken" - }, - "codeAnalysisFindings": { - "shape": "SensitiveString" - } + "nextToken": { "shape": "PaginationToken" }, + "codeAnalysisFindings": { "shape": "SensitiveString" } } }, "ListFeatureEvaluationsRequest": { "type": "structure", "required": ["userContext"], "members": { - "userContext": { - "shape": "UserContext" - } + "userContext": { "shape": "UserContext" } } }, "ListFeatureEvaluationsResponse": { "type": "structure", "required": ["featureEvaluations"], "members": { - "featureEvaluations": { - "shape": "FeatureEvaluationsList" - } + "featureEvaluations": { "shape": "FeatureEvaluationsList" } } }, "Long": { "type": "long", "box": true }, + "MessageId": { + "type": "string", + "max": 128, + "min": 0 + }, "MetricData": { "type": "structure", - "required": ["metricName", "metricValue", "timestamp"], + "required": ["metricName", "metricValue", "timestamp", "product"], "members": { - "metricName": { - "shape": "MetricDataMetricNameString" - }, - "metricValue": { - "shape": "Double" - }, - "timestamp": { - "shape": "Timestamp" - }, - "dimensions": { - "shape": "DimensionList" - } + "metricName": { "shape": "MetricDataMetricNameString" }, + "metricValue": { "shape": "Double" }, + "timestamp": { "shape": "Timestamp" }, + "product": { "shape": "MetricDataProductString" }, + "dimensions": { "shape": "DimensionList" } } }, "MetricDataMetricNameString": { @@ -1471,6 +1190,12 @@ "min": 1, "pattern": "[-a-zA-Z0-9._]*" }, + "MetricDataProductString": { + "type": "string", + "max": 128, + "min": 1, + "pattern": "[-a-zA-Z0-9._]*" + }, "OperatingSystem": { "type": "string", "enum": ["MAC", "WINDOWS", "LINUX"], @@ -1491,16 +1216,9 @@ "type": "structure", "required": ["line", "character"], "members": { - "line": { - "shape": "Integer", - "documentation": "Line position in a document.
" - }, - "character": { - "shape": "Integer", - "documentation": "Character offset on a line in a document (zero-based)
" - } - }, - "documentation": "Indicates Cursor postion in a Text Document
" + "line": { "shape": "Integer" }, + "character": { "shape": "Integer" } + } }, "PreSignedUrl": { "type": "string", @@ -1508,72 +1226,50 @@ "min": 1, "sensitive": true }, - "PrimitiveInteger": { - "type": "integer" + "PrimitiveInteger": { "type": "integer" }, + "ProfileArn": { + "type": "string", + "max": 950, + "min": 0, + "pattern": "arn:aws:codewhisperer:[-.a-z0-9]{1,63}:\\d{12}:profile/([a-zA-Z0-9]){12}" }, "ProgrammingLanguage": { "type": "structure", "required": ["languageName"], "members": { - "languageName": { - "shape": "ProgrammingLanguageLanguageNameString" - } - }, - "documentation": "Programming Languages supported by CodeWhisperer
" + "languageName": { "shape": "ProgrammingLanguageLanguageNameString" } + } }, "ProgrammingLanguageLanguageNameString": { "type": "string", "max": 128, "min": 1, - "pattern": "(python|javascript|java|csharp|typescript|c|cpp|go|kotlin|php|ruby|rust|scala|shell|sql|json|yaml|vue|tf)" + "pattern": "(python|javascript|java|csharp|typescript|c|cpp|go|kotlin|php|ruby|rust|scala|shell|sql|json|yaml|vue|tf|tsx|jsx|plaintext)" }, "ProgressUpdates": { "type": "list", - "member": { - "shape": "TransformationProgressUpdate" - } + "member": { "shape": "TransformationProgressUpdate" } }, "Range": { "type": "structure", "required": ["start", "end"], "members": { - "start": { - "shape": "Position", - "documentation": "The range's start position.
" - }, - "end": { - "shape": "Position", - "documentation": "The range's end position.
" - } - }, - "documentation": "Indicates Range / Span in a Text Document
" + "start": { "shape": "Position" }, + "end": { "shape": "Position" } + } }, "RecommendationsWithReferencesPreference": { "type": "string", - "documentation": "Recommendations with references setting for CodeWhisperer
", "enum": ["BLOCK", "ALLOW"] }, "Reference": { "type": "structure", "members": { - "licenseName": { - "shape": "ReferenceLicenseNameString", - "documentation": "License name
" - }, - "repository": { - "shape": "ReferenceRepositoryString", - "documentation": "Code Repsitory for the associated reference
" - }, - "url": { - "shape": "ReferenceUrlString", - "documentation": "Respository URL
" - }, - "recommendationContentSpan": { - "shape": "Span", - "documentation": "Span / Range for the Reference
" - } - }, - "documentation": "Code Reference / Repository details
" + "licenseName": { "shape": "ReferenceLicenseNameString" }, + "repository": { "shape": "ReferenceRepositoryString" }, + "url": { "shape": "ReferenceUrlString" }, + "recommendationContentSpan": { "shape": "Span" } + } }, "ReferenceLicenseNameString": { "type": "string", @@ -1589,9 +1285,7 @@ "type": "structure", "required": ["recommendationsWithReferences"], "members": { - "recommendationsWithReferences": { - "shape": "RecommendationsWithReferencesPreference" - } + "recommendationsWithReferences": { "shape": "RecommendationsWithReferencesPreference" } } }, "ReferenceUrlString": { @@ -1601,12 +1295,56 @@ }, "References": { "type": "list", - "member": { - "shape": "Reference" - }, + "member": { "shape": "Reference" }, "max": 10, "min": 0 }, + "RelevantDocumentList": { + "type": "list", + "member": { "shape": "RelevantTextDocument" }, + "max": 5, + "min": 0 + }, + "RelevantTextDocument": { + "type": "structure", + "required": ["relativeFilePath"], + "members": { + "relativeFilePath": { "shape": "RelevantTextDocumentRelativeFilePathString" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "text": { "shape": "RelevantTextDocumentTextString" }, + "documentSymbols": { "shape": "DocumentSymbols" } + } + }, + "RelevantTextDocumentRelativeFilePathString": { + "type": "string", + "max": 4096, + "min": 1, + "sensitive": true + }, + "RelevantTextDocumentTextString": { + "type": "string", + "max": 10240, + "min": 0, + "sensitive": true + }, + "RequestHeaderKey": { + "type": "string", + "max": 64, + "min": 1 + }, + "RequestHeaderValue": { + "type": "string", + "max": 256, + "min": 1 + }, + "RequestHeaders": { + "type": "map", + "key": { "shape": "RequestHeaderKey" }, + "value": { "shape": "RequestHeaderValue" }, + "max": 16, + "min": 1, + "sensitive": true + }, "ResourceArn": { "type": "string", "max": 1224, @@ -1617,31 +1355,33 @@ "type": "structure", "required": ["message"], "members": { - "message": { - "shape": "String" - } + "message": { "shape": "String" } }, - "documentation": "This exception is thrown when describing a resource that does not exist.
", "exception": true }, + "ResumeTransformationRequest": { + "type": "structure", + "required": ["transformationJobId"], + "members": { + "transformationJobId": { "shape": "TransformationJobId" }, + "userActionStatus": { "shape": "TransformationUserActionStatus" } + } + }, + "ResumeTransformationResponse": { + "type": "structure", + "required": ["transformationStatus"], + "members": { + "transformationStatus": { "shape": "TransformationStatus" } + } + }, "RuntimeDiagnostic": { "type": "structure", "required": ["source", "severity", "message"], "members": { - "source": { - "shape": "RuntimeDiagnosticSourceString", - "documentation": "A human-readable string describing the source of the diagnostic
" - }, - "severity": { - "shape": "DiagnosticSeverity", - "documentation": "Diagnostic Error type
" - }, - "message": { - "shape": "RuntimeDiagnosticMessageString", - "documentation": "The diagnostic's message.
" - } - }, - "documentation": "Structure to represent metadata about a Runtime Diagnostics
" + "source": { "shape": "RuntimeDiagnosticSourceString" }, + "severity": { "shape": "DiagnosticSeverity" }, + "message": { "shape": "RuntimeDiagnosticMessageString" } + } }, "RuntimeDiagnosticMessageString": { "type": "string", @@ -1663,15 +1403,10 @@ "shape": "IdempotencyToken", "idempotencyToken": true }, - "telemetryEvent": { - "shape": "TelemetryEvent" - }, - "optOutPreference": { - "shape": "OptOutPreference" - }, - "userContext": { - "shape": "UserContext" - } + "telemetryEvent": { "shape": "TelemetryEvent" }, + "optOutPreference": { "shape": "OptOutPreference" }, + "userContext": { "shape": "UserContext" }, + "profileArn": { "shape": "ProfileArn" } } }, "SendTelemetryEventResponse": { @@ -1682,17 +1417,75 @@ "type": "string", "sensitive": true }, - "Span": { + "ServiceQuotaExceededException": { "type": "structure", + "required": ["message"], "members": { - "start": { - "shape": "SpanStartInteger" - }, - "end": { - "shape": "SpanEndInteger" - } + "message": { "shape": "String" } }, - "documentation": "Represents span in a text
" + "exception": true + }, + "ShellHistory": { + "type": "list", + "member": { "shape": "ShellHistoryEntry" }, + "max": 20, + "min": 0 + }, + "ShellHistoryEntry": { + "type": "structure", + "required": ["command"], + "members": { + "command": { "shape": "ShellHistoryEntryCommandString" }, + "directory": { "shape": "ShellHistoryEntryDirectoryString" }, + "exitCode": { "shape": "Integer" }, + "stdout": { "shape": "ShellHistoryEntryStdoutString" }, + "stderr": { "shape": "ShellHistoryEntryStderrString" } + } + }, + "ShellHistoryEntryCommandString": { + "type": "string", + "max": 1024, + "min": 1, + "sensitive": true + }, + "ShellHistoryEntryDirectoryString": { + "type": "string", + "max": 256, + "min": 1, + "sensitive": true + }, + "ShellHistoryEntryStderrString": { + "type": "string", + "max": 4096, + "min": 0, + "sensitive": true + }, + "ShellHistoryEntryStdoutString": { + "type": "string", + "max": 4096, + "min": 0, + "sensitive": true + }, + "ShellState": { + "type": "structure", + "required": ["shellName"], + "members": { + "shellName": { "shape": "ShellStateShellNameString" }, + "shellHistory": { "shape": "ShellHistory" } + } + }, + "ShellStateShellNameString": { + "type": "string", + "max": 32, + "min": 1, + "pattern": "(zsh|bash|fish|pwsh|nu)" + }, + "Span": { + "type": "structure", + "members": { + "start": { "shape": "SpanStartInteger" }, + "end": { "shape": "SpanEndInteger" } + } }, "SpanEndInteger": { "type": "integer", @@ -1708,16 +1501,14 @@ "type": "structure", "required": ["artifacts", "programmingLanguage"], "members": { - "artifacts": { - "shape": "ArtifactMap" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, + "artifacts": { "shape": "ArtifactMap" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" }, "clientToken": { "shape": "StartCodeAnalysisRequestClientTokenString", "idempotencyToken": true - } + }, + "scope": { "shape": "CodeAnalysisScope" }, + "codeScanName": { "shape": "CodeScanName" } } }, "StartCodeAnalysisRequestClientTokenString": { @@ -1729,15 +1520,9 @@ "type": "structure", "required": ["jobId", "status"], "members": { - "jobId": { - "shape": "StartCodeAnalysisResponseJobIdString" - }, - "status": { - "shape": "CodeAnalysisStatus" - }, - "errorMessage": { - "shape": "SensitiveString" - } + "jobId": { "shape": "StartCodeAnalysisResponseJobIdString" }, + "status": { "shape": "CodeAnalysisStatus" }, + "errorMessage": { "shape": "SensitiveString" } } }, "StartCodeAnalysisResponseJobIdString": { @@ -1749,50 +1534,32 @@ "type": "structure", "required": ["conversationState", "workspaceState"], "members": { - "conversationState": { - "shape": "ConversationState" - }, - "workspaceState": { - "shape": "WorkspaceState" - } - }, - "documentation": "Structure to represent start code generation request.
" + "conversationState": { "shape": "ConversationState" }, + "workspaceState": { "shape": "WorkspaceState" } + } }, "StartTaskAssistCodeGenerationResponse": { "type": "structure", "required": ["conversationId", "codeGenerationId"], "members": { - "conversationId": { - "shape": "ConversationId" - }, - "codeGenerationId": { - "shape": "CodeGenerationId" - } - }, - "documentation": "Structure to represent start code generation response.
" + "conversationId": { "shape": "ConversationId" }, + "codeGenerationId": { "shape": "CodeGenerationId" } + } }, "StartTransformationRequest": { "type": "structure", "required": ["workspaceState", "transformationSpec"], "members": { - "workspaceState": { - "shape": "WorkspaceState" - }, - "transformationSpec": { - "shape": "TransformationSpec" - } - }, - "documentation": "Structure to represent code transformation request.
" + "workspaceState": { "shape": "WorkspaceState" }, + "transformationSpec": { "shape": "TransformationSpec" } + } }, "StartTransformationResponse": { "type": "structure", "required": ["transformationJobId"], "members": { - "transformationJobId": { - "shape": "TransformationJobId" - } - }, - "documentation": "Structure to represent code transformation response.
" + "transformationJobId": { "shape": "TransformationJobId" } + } }, "StepId": { "type": "string", @@ -1803,25 +1570,17 @@ "type": "structure", "required": ["transformationJobId"], "members": { - "transformationJobId": { - "shape": "TransformationJobId" - } - }, - "documentation": "Structure to represent stop code transformation request.
" + "transformationJobId": { "shape": "TransformationJobId" } + } }, "StopTransformationResponse": { "type": "structure", "required": ["transformationStatus"], "members": { - "transformationStatus": { - "shape": "TransformationStatus" - } - }, - "documentation": "Structure to represent stop code transformation response.
" - }, - "String": { - "type": "string" + "transformationStatus": { "shape": "TransformationStatus" } + } }, + "String": { "type": "string" }, "SuggestionState": { "type": "string", "enum": ["ACCEPT", "REJECT", "DISCARD", "EMPTY"] @@ -1830,12 +1589,8 @@ "type": "structure", "required": ["filePath", "content"], "members": { - "filePath": { - "shape": "SupplementalContextFilePathString" - }, - "content": { - "shape": "SupplementalContextContentString" - } + "filePath": { "shape": "SupplementalContextFilePathString" }, + "content": { "shape": "SupplementalContextContentString" } } }, "SupplementalContextContentString": { @@ -1852,9 +1607,7 @@ }, "SupplementalContextList": { "type": "list", - "member": { - "shape": "SupplementalContext" - }, + "member": { "shape": "SupplementalContext" }, "max": 5, "min": 0 }, @@ -1862,20 +1615,10 @@ "type": "structure", "required": ["url", "title"], "members": { - "url": { - "shape": "SupplementaryWebLinkUrlString", - "documentation": "URL of the web reference link
" - }, - "title": { - "shape": "SupplementaryWebLinkTitleString", - "documentation": "Title of the web reference link
" - }, - "snippet": { - "shape": "SupplementaryWebLinkSnippetString", - "documentation": "Relevant text snippet from the link
" - } - }, - "documentation": "Represents an additional reference link retured with the Chat message
" + "url": { "shape": "SupplementaryWebLinkUrlString" }, + "title": { "shape": "SupplementaryWebLinkTitleString" }, + "snippet": { "shape": "SupplementaryWebLinkSnippetString" } + } }, "SupplementaryWebLinkSnippetString": { "type": "string", @@ -1897,9 +1640,7 @@ }, "SupplementaryWebLinks": { "type": "list", - "member": { - "shape": "SupplementaryWebLink" - }, + "member": { "shape": "SupplementaryWebLink" }, "max": 10, "min": 0 }, @@ -1911,84 +1652,64 @@ "type": "structure", "required": ["conversationId"], "members": { - "conversationId": { - "shape": "ConversationId" - } + "conversationId": { "shape": "ConversationId" } } }, "TelemetryEvent": { "type": "structure", "members": { - "userTriggerDecisionEvent": { - "shape": "UserTriggerDecisionEvent" - }, - "codeCoverageEvent": { - "shape": "CodeCoverageEvent" - }, - "userModificationEvent": { - "shape": "UserModificationEvent" - }, - "codeScanEvent": { - "shape": "CodeScanEvent" - }, - "metricData": { - "shape": "MetricData" - }, - "featureDevEvent": { - "shape": "FeatureDevEvent" - } + "userTriggerDecisionEvent": { "shape": "UserTriggerDecisionEvent" }, + "codeCoverageEvent": { "shape": "CodeCoverageEvent" }, + "userModificationEvent": { "shape": "UserModificationEvent" }, + "codeScanEvent": { "shape": "CodeScanEvent" }, + "codeScanRemediationsEvent": { "shape": "CodeScanRemediationsEvent" }, + "metricData": { "shape": "MetricData" }, + "chatAddMessageEvent": { "shape": "ChatAddMessageEvent" }, + "chatInteractWithMessageEvent": { "shape": "ChatInteractWithMessageEvent" }, + "chatUserModificationEvent": { "shape": "ChatUserModificationEvent" }, + "terminalUserInteractionEvent": { "shape": "TerminalUserInteractionEvent" }, + "featureDevEvent": { "shape": "FeatureDevEvent" } }, "union": true }, + "TerminalUserInteractionEvent": { + "type": "structure", + "members": { + "terminalUserInteractionEventType": { "shape": "TerminalUserInteractionEventType" }, + "terminal": { "shape": "String" }, + "terminalVersion": { "shape": "String" }, + "shell": { "shape": "String" }, + "shellVersion": { "shape": "String" }, + "duration": { "shape": "Integer" }, + "timeToSuggestion": { "shape": "Integer" }, + "isCompletionAccepted": { "shape": "Boolean" }, + "cliToolCommand": { "shape": "String" } + } + }, + "TerminalUserInteractionEventType": { + "type": "string", + "enum": ["CODEWHISPERER_TERMINAL_TRANSLATION_ACTION", "CODEWHISPERER_TERMINAL_COMPLETION_INSERTED"] + }, "TextDocument": { "type": "structure", "required": ["relativeFilePath"], "members": { - "relativeFilePath": { - "shape": "TextDocumentRelativeFilePathString", - "documentation": "Filepath relative to the root of the workspace
" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage", - "documentation": "The text document's language identifier.
" - }, - "text": { - "shape": "TextDocumentTextString", - "documentation": "Content of the text document
" - }, - "documentSymbols": { - "shape": "DocumentSymbols", - "documentation": "DocumentSymbols parsed from a text document
" - } - }, - "documentation": "Represents a Text Document / File
" + "relativeFilePath": { "shape": "TextDocumentRelativeFilePathString" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "text": { "shape": "TextDocumentTextString" }, + "documentSymbols": { "shape": "DocumentSymbols" } + } }, "TextDocumentDiagnostic": { "type": "structure", "required": ["document", "range", "source", "severity", "message"], "members": { - "document": { - "shape": "TextDocument", - "documentation": "Represents a Text Document associated with Diagnostic
" - }, - "range": { - "shape": "Range", - "documentation": "The range at which the message applies.
" - }, - "source": { - "shape": "SensitiveString", - "documentation": "A human-readable string describing the source of the diagnostic
" - }, - "severity": { - "shape": "DiagnosticSeverity", - "documentation": "Diagnostic Error type
" - }, - "message": { - "shape": "TextDocumentDiagnosticMessageString", - "documentation": "The diagnostic's message.
" - } - }, - "documentation": "Structure to represent metadata about a TextDocument Diagnostic
" + "document": { "shape": "TextDocument" }, + "range": { "shape": "Range" }, + "source": { "shape": "SensitiveString" }, + "severity": { "shape": "DiagnosticSeverity" }, + "message": { "shape": "TextDocumentDiagnosticMessageString" } + } }, "TextDocumentDiagnosticMessageString": { "type": "string", @@ -2012,110 +1733,138 @@ "type": "structure", "required": ["message"], "members": { - "message": { - "shape": "String" - } + "message": { "shape": "String" } }, - "documentation": "This exception is thrown when request was denied due to request throttling.
", "exception": true, - "retryable": { - "throttling": true + "retryable": { "throttling": true } + }, + "Timestamp": { "type": "timestamp" }, + "TransformationDotNetRuntimeEnv": { + "type": "string", + "enum": [ + "NET_FRAMEWORK_V_3_5", + "NET_FRAMEWORK_V_4_0", + "NET_FRAMEWORK_V_4_5", + "NET_FRAMEWORK_V_4_5_1", + "NET_FRAMEWORK_V_4_5_2", + "NET_FRAMEWORK_V_4_6", + "NET_FRAMEWORK_V_4_6_1", + "NET_FRAMEWORK_V_4_6_2", + "NET_FRAMEWORK_V_4_7", + "NET_FRAMEWORK_V_4_7_1", + "NET_FRAMEWORK_V_4_7_2", + "NET_FRAMEWORK_V_4_8", + "NET_FRAMEWORK_V_4_8_1", + "NET_CORE_APP_1_0", + "NET_CORE_APP_1_1", + "NET_CORE_APP_2_0", + "NET_CORE_APP_2_1", + "NET_CORE_APP_2_2", + "NET_CORE_APP_3_0", + "NET_CORE_APP_3_1", + "NET_5_0", + "NET_6_0", + "NET_7_0", + "NET_8_0" + ] + }, + "TransformationDownloadArtifact": { + "type": "structure", + "members": { + "downloadArtifactType": { "shape": "TransformationDownloadArtifactType" }, + "downloadArtifactId": { "shape": "ArtifactId" } } }, - "Timestamp": { - "type": "timestamp" + "TransformationDownloadArtifactType": { + "type": "string", + "enum": ["ClientInstructions", "Logs"] + }, + "TransformationDownloadArtifacts": { + "type": "list", + "member": { "shape": "TransformationDownloadArtifact" }, + "max": 10, + "min": 0 + }, + "TransformationJavaRuntimeEnv": { + "type": "string", + "enum": ["JVM_8", "JVM_11", "JVM_17"] }, "TransformationJob": { "type": "structure", "members": { - "jobId": { - "shape": "TransformationJobId" - }, - "transformationSpec": { - "shape": "TransformationSpec" - }, - "status": { - "shape": "TransformationStatus" - }, - "reason": { - "shape": "String" - }, - "creationTime": { - "shape": "Timestamp" - }, - "startExecutionTime": { - "shape": "Timestamp" - }, - "endExecutionTime": { - "shape": "Timestamp" - } - }, - "documentation": "Represent a Transformation Job
" + "jobId": { "shape": "TransformationJobId" }, + "transformationSpec": { "shape": "TransformationSpec" }, + "status": { "shape": "TransformationStatus" }, + "reason": { "shape": "String" }, + "creationTime": { "shape": "Timestamp" }, + "startExecutionTime": { "shape": "Timestamp" }, + "endExecutionTime": { "shape": "Timestamp" } + } }, "TransformationJobId": { "type": "string", - "documentation": "Identifier for the Transformation Job
", "max": 128, "min": 1 }, "TransformationLanguage": { "type": "string", - "enum": ["JAVA_8", "JAVA_11", "JAVA_17"] + "enum": ["JAVA_8", "JAVA_11", "JAVA_17", "C_SHARP"] + }, + "TransformationOperatingSystemFamily": { + "type": "string", + "enum": ["WINDOWS", "LINUX"] }, "TransformationPlan": { "type": "structure", "required": ["transformationSteps"], "members": { - "transformationSteps": { - "shape": "TransformationSteps" - } + "transformationSteps": { "shape": "TransformationSteps" } + } + }, + "TransformationPlatformConfig": { + "type": "structure", + "members": { + "operatingSystemFamily": { "shape": "TransformationOperatingSystemFamily" } } }, "TransformationProgressUpdate": { "type": "structure", "required": ["name", "status"], "members": { - "name": { - "shape": "String" - }, - "status": { - "shape": "TransformationProgressUpdateStatus" - }, - "description": { - "shape": "String" - }, - "startTime": { - "shape": "Timestamp" - }, - "endTime": { - "shape": "Timestamp" - } + "name": { "shape": "String" }, + "status": { "shape": "TransformationProgressUpdateStatus" }, + "description": { "shape": "String" }, + "startTime": { "shape": "Timestamp" }, + "endTime": { "shape": "Timestamp" }, + "downloadArtifacts": { "shape": "TransformationDownloadArtifacts" } } }, "TransformationProgressUpdateStatus": { "type": "string", - "enum": ["IN_PROGRESS", "COMPLETED", "FAILED"] + "enum": ["IN_PROGRESS", "COMPLETED", "FAILED", "PAUSED"] }, "TransformationProjectState": { "type": "structure", "members": { - "language": { - "shape": "TransformationLanguage" - } + "language": { "shape": "TransformationLanguage" }, + "runtimeEnv": { "shape": "TransformationRuntimeEnv" }, + "platformConfig": { "shape": "TransformationPlatformConfig" } } }, + "TransformationRuntimeEnv": { + "type": "structure", + "members": { + "java": { "shape": "TransformationJavaRuntimeEnv" }, + "dotNet": { "shape": "TransformationDotNetRuntimeEnv" } + }, + "union": true + }, "TransformationSpec": { "type": "structure", "members": { - "transformationType": { - "shape": "TransformationType" - }, - "source": { - "shape": "TransformationProjectState" - }, - "target": { - "shape": "TransformationProjectState" - } + "transformationType": { "shape": "TransformationType" }, + "source": { "shape": "TransformationProjectState" }, + "target": { "shape": "TransformationProjectState" } } }, "TransformationStatus": { @@ -2135,50 +1884,52 @@ "COMPLETED", "PARTIALLY_COMPLETED", "STOPPING", - "STOPPED" + "STOPPED", + "PAUSED", + "RESUMED" ] }, "TransformationStep": { "type": "structure", "required": ["id", "name", "description", "status"], "members": { - "id": { - "shape": "StepId" - }, - "name": { - "shape": "String" - }, - "description": { - "shape": "String" - }, - "status": { - "shape": "TransformationStepStatus" - }, - "progressUpdates": { - "shape": "ProgressUpdates" - }, - "startTime": { - "shape": "Timestamp" - }, - "endTime": { - "shape": "Timestamp" - } + "id": { "shape": "StepId" }, + "name": { "shape": "String" }, + "description": { "shape": "String" }, + "status": { "shape": "TransformationStepStatus" }, + "progressUpdates": { "shape": "ProgressUpdates" }, + "startTime": { "shape": "Timestamp" }, + "endTime": { "shape": "Timestamp" } } }, "TransformationStepStatus": { "type": "string", - "enum": ["CREATED", "COMPLETED", "PARTIALLY_COMPLETED", "STOPPED", "FAILED"] + "enum": ["CREATED", "COMPLETED", "PARTIALLY_COMPLETED", "STOPPED", "FAILED", "PAUSED"] }, "TransformationSteps": { "type": "list", - "member": { - "shape": "TransformationStep" - } + "member": { "shape": "TransformationStep" } }, "TransformationType": { "type": "string", "enum": ["LANGUAGE_UPGRADE"] }, + "TransformationUploadArtifactType": { + "type": "string", + "enum": ["Dependencies"] + }, + "TransformationUploadContext": { + "type": "structure", + "required": ["jobId", "uploadArtifactType"], + "members": { + "jobId": { "shape": "TransformationJobId" }, + "uploadArtifactType": { "shape": "TransformationUploadArtifactType" } + } + }, + "TransformationUserActionStatus": { + "type": "string", + "enum": ["COMPLETED", "REJECTED"] + }, "UUID": { "type": "string", "max": 36, @@ -2187,42 +1938,35 @@ "UploadContext": { "type": "structure", "members": { - "taskAssistPlanningUploadContext": { - "shape": "TaskAssistPlanningUploadContext" - } + "taskAssistPlanningUploadContext": { "shape": "TaskAssistPlanningUploadContext" }, + "transformationUploadContext": { "shape": "TransformationUploadContext" }, + "codeAnalysisUploadContext": { "shape": "CodeAnalysisUploadContext" } }, "union": true }, "UploadId": { "type": "string", - "documentation": "Upload ID returned by CreateUploadUrl API
", "max": 128, "min": 1 }, "UploadIntent": { "type": "string", - "documentation": "Upload Intent
", - "enum": ["TRANSFORMATION", "TASK_ASSIST_PLANNING"] + "enum": [ + "TRANSFORMATION", + "TASK_ASSIST_PLANNING", + "AUTOMATIC_FILE_SECURITY_SCAN", + "FULL_PROJECT_SECURITY_SCAN" + ] }, "UserContext": { "type": "structure", "required": ["ideCategory", "operatingSystem", "product"], "members": { - "ideCategory": { - "shape": "IdeCategory" - }, - "operatingSystem": { - "shape": "OperatingSystem" - }, - "product": { - "shape": "UserContextProductString" - }, - "clientId": { - "shape": "UUID" - }, - "ideVersion": { - "shape": "String" - } + "ideCategory": { "shape": "IdeCategory" }, + "operatingSystem": { "shape": "OperatingSystem" }, + "product": { "shape": "UserContextProductString" }, + "clientId": { "shape": "UUID" }, + "ideVersion": { "shape": "String" } } }, "UserContextProductString": { @@ -2235,20 +1979,10 @@ "type": "structure", "required": ["content"], "members": { - "content": { - "shape": "UserInputMessageContentString", - "documentation": "The content of the chat message.
" - }, - "userInputMessageContext": { - "shape": "UserInputMessageContext", - "documentation": "Chat message context associated with the Chat Message
" - }, - "userIntent": { - "shape": "UserIntent", - "documentation": "User Intent
" - } - }, - "documentation": "Structure to represent a chat input message from User
" + "content": { "shape": "UserInputMessageContentString" }, + "userInputMessageContext": { "shape": "UserInputMessageContext" }, + "userIntent": { "shape": "UserIntent" } + } }, "UserInputMessageContentString": { "type": "string", @@ -2259,20 +1993,16 @@ "UserInputMessageContext": { "type": "structure", "members": { - "editorState": { - "shape": "EditorState", - "documentation": "Editor state chat message context.
" - }, - "diagnostic": { - "shape": "Diagnostic", - "documentation": "Diagnostic chat message context.
" - } - }, - "documentation": "Additional Chat message context associated with the Chat Message
" + "editorState": { "shape": "EditorState" }, + "shellState": { "shape": "ShellState" }, + "gitState": { "shape": "GitState" }, + "envState": { "shape": "EnvState" }, + "appStudioContext": { "shape": "AppStudioState" }, + "diagnostic": { "shape": "Diagnostic" } + } }, "UserIntent": { "type": "string", - "documentation": "User Intent
", "enum": [ "SUGGEST_ALTERNATE_IMPLEMENTATION", "APPLY_COMMON_BEST_PRACTICES", @@ -2280,31 +2010,20 @@ "SHOW_EXAMPLES", "CITE_SOURCES", "EXPLAIN_LINE_BY_LINE", - "EXPLAIN_CODE_SELECTION" + "EXPLAIN_CODE_SELECTION", + "GENERATE_CLOUDFORMATION_TEMPLATE" ] }, "UserModificationEvent": { "type": "structure", "required": ["sessionId", "requestId", "programmingLanguage", "modificationPercentage", "timestamp"], "members": { - "sessionId": { - "shape": "UUID" - }, - "requestId": { - "shape": "UUID" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "modificationPercentage": { - "shape": "Double" - }, - "customizationArn": { - "shape": "CustomizationArn" - }, - "timestamp": { - "shape": "Timestamp" - } + "sessionId": { "shape": "UUID" }, + "requestId": { "shape": "UUID" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "modificationPercentage": { "shape": "Double" }, + "customizationArn": { "shape": "CustomizationArn" }, + "timestamp": { "shape": "Timestamp" } } }, "UserTriggerDecisionEvent": { @@ -2319,75 +2038,47 @@ "timestamp" ], "members": { - "sessionId": { - "shape": "UUID" - }, - "requestId": { - "shape": "UUID" - }, - "customizationArn": { - "shape": "CustomizationArn" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "completionType": { - "shape": "CompletionType" - }, - "suggestionState": { - "shape": "SuggestionState" - }, - "recommendationLatencyMilliseconds": { - "shape": "Double" - }, - "timestamp": { - "shape": "Timestamp" - }, - "suggestionReferenceCount": { - "shape": "PrimitiveInteger" - }, - "generatedLine": { - "shape": "PrimitiveInteger" - } + "sessionId": { "shape": "UUID" }, + "requestId": { "shape": "UUID" }, + "customizationArn": { "shape": "CustomizationArn" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "completionType": { "shape": "CompletionType" }, + "suggestionState": { "shape": "SuggestionState" }, + "recommendationLatencyMilliseconds": { "shape": "Double" }, + "timestamp": { "shape": "Timestamp" }, + "triggerToResponseLatencyMilliseconds": { "shape": "Double" }, + "suggestionReferenceCount": { "shape": "PrimitiveInteger" }, + "generatedLine": { "shape": "PrimitiveInteger" }, + "numberOfRecommendations": { "shape": "PrimitiveInteger" } } }, "ValidationException": { "type": "structure", "required": ["message"], "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "ValidationExceptionReason" - } + "message": { "shape": "String" }, + "reason": { "shape": "ValidationExceptionReason" } }, - "documentation": "This exception is thrown when the input fails to satisfy the constraints specified by the service.
", "exception": true }, "ValidationExceptionReason": { "type": "string", - "documentation": "Reason for ValidationException
", - "enum": ["INVALID_CONVERSATION_ID"] + "enum": ["INVALID_CONVERSATION_ID", "CONTENT_LENGTH_EXCEEDS_THRESHOLD"] }, "WorkspaceState": { "type": "structure", "required": ["uploadId", "programmingLanguage"], "members": { - "uploadId": { - "shape": "UploadId", - "documentation": "Upload ID representing an Upload using a PreSigned URL
" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage", - "documentation": "Primary programming language of the Workspace
" - }, - "contextTruncationScheme": { - "shape": "ContextTruncationScheme", - "documentation": "Workspace context truncation schemes based on usecase
" - } - }, - "documentation": "Represents a Workspace state uploaded to S3 for Async Code Actions
" + "uploadId": { "shape": "UploadId" }, + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "contextTruncationScheme": { "shape": "ContextTruncationScheme" } + } + }, + "timeBetweenChunks": { + "type": "list", + "member": { "shape": "Double" }, + "max": 100, + "min": 0 } } } diff --git a/packages/core/src/amazonqFeatureDev/controllers/chat/controller.ts b/packages/core/src/amazonqFeatureDev/controllers/chat/controller.ts index 296da721f1f..83a0732a4e5 100644 --- a/packages/core/src/amazonqFeatureDev/controllers/chat/controller.ts +++ b/packages/core/src/amazonqFeatureDev/controllers/chat/controller.ts @@ -14,14 +14,17 @@ import { featureDevScheme } from '../../constants' import { CodeIterationLimitError, ContentLengthError, + FeatureDevServiceError, MonthlyConversationLimitError, PlanIterationLimitError, PrepareRepoFailedError, + PromptRefusalException, SelectedFolderNotInWorkspaceFolderError, TabIdNotFoundError, UploadCodeError, UserMessageNotFoundError, WorkspaceFolderNotFoundError, + ZipFileError, createUserFacingErrorMessage, denyListedErrors, } from '../../errors' @@ -263,6 +266,7 @@ export class FeatureDevController { }) break + case FeatureDevServiceError.name: case UploadCodeError.name: case UserMessageNotFoundError.name: case TabIdNotFoundError.name: @@ -274,6 +278,10 @@ export class FeatureDevController { session?.conversationIdUnsafe ) break + case PromptRefusalException.name: + case ZipFileError.name: + this.messenger.sendErrorMessage(errorMessage, message.tabID, 0, session?.conversationIdUnsafe, true) + break case CodeIterationLimitError.name: this.messenger.sendAnswer({ type: 'answer', diff --git a/packages/core/src/amazonqFeatureDev/errors.ts b/packages/core/src/amazonqFeatureDev/errors.ts index 8ff7fd1b7ee..162e8537e0d 100644 --- a/packages/core/src/amazonqFeatureDev/errors.ts +++ b/packages/core/src/amazonqFeatureDev/errors.ts @@ -7,6 +7,8 @@ import { ToolkitError } from '../shared/errors' import { featureName } from './constants' import { uploadCodeError } from './userFacingText' +export const CodeGenerationDefaultError = "I'm sorry, I'm having trouble generating your code." + export class ConversationIdNotFoundError extends ToolkitError { constructor() { super('Conversation id must exist before starting code generation', { code: 'ConversationIdNotFound' }) @@ -57,6 +59,23 @@ export class SelectedFolderNotInWorkspaceFolderError extends ToolkitError { } } +export class PromptRefusalException extends ToolkitError { + constructor() { + super( + 'I\'m sorry, I can\'t generate code for your request. Please make sure your message and code files comply with the AWS Responsible AI Policy.', + { + code: 'PromptRefusalException', + } + ) + } +} + +export class FeatureDevServiceError extends ToolkitError { + constructor(message: string, code: string) { + super(message, { code }) + } +} + export class PrepareRepoFailedError extends ToolkitError { constructor() { super('Sorry, I ran into an issue while trying to upload your code. Please try again.', { @@ -86,6 +105,12 @@ export class ContentLengthError extends ToolkitError { } } +export class ZipFileError extends ToolkitError { + constructor() { + super('The zip file is corrupted', { code: 'ZipFileError' }) + } +} + export class PlanIterationLimitError extends ToolkitError { constructor() { super( diff --git a/packages/core/src/amazonqFeatureDev/session/sessionState.ts b/packages/core/src/amazonqFeatureDev/session/sessionState.ts index d0bbb57e8bc..1b7f7c6151b 100644 --- a/packages/core/src/amazonqFeatureDev/session/sessionState.ts +++ b/packages/core/src/amazonqFeatureDev/session/sessionState.ts @@ -13,8 +13,15 @@ import { telemetry } from '../../shared/telemetry/telemetry' import { VirtualFileSystem } from '../../shared/virtualFilesystem' import { VirtualMemoryFile } from '../../shared/virtualMemoryFile' import { featureDevScheme } from '../constants' -import { IllegalStateTransition, UserMessageNotFoundError } from '../errors' import { + CodeGenerationDefaultError, + FeatureDevServiceError, + IllegalStateTransition, + PromptRefusalException, + UserMessageNotFoundError, +} from '../errors' +import { + CodeGenerationStatus, CurrentWsFolders, DeletedFileInfo, DevPhase, @@ -268,8 +275,8 @@ abstract class CodeGenBase { getLogger().debug(`Codegen response: %O`, codegenResult) telemetry.setCodeGenerationResult(codegenResult.codeGenerationStatus.status) - switch (codegenResult.codeGenerationStatus.status) { - case 'Complete': { + switch (codegenResult.codeGenerationStatus.status as CodeGenerationStatus) { + case CodeGenerationStatus.COMPLETE: { const { newFileContents, deletedFiles, references } = await this.config.proxyClient.exportResultArchive(this.conversationId) const newFileInfo = registerNewFiles(fs, newFileContents, this.uploadId, workspaceFolders) @@ -282,24 +289,34 @@ abstract class CodeGenBase { codeGenerationTotalIterationCount: codeGenerationTotalIterationCount, } } - case 'predict-ready': - case 'InProgress': { + case CodeGenerationStatus.PREDICT_READY: + case CodeGenerationStatus.IN_PROGRESS: { await new Promise((f) => globals.clock.setTimeout(f, this.requestDelay)) break } - case 'predict-failed': - case 'debate-failed': - case 'Failed': { - /** - * - * TODO: Here we need to implement the granular error handling for - * Code generation GuardrailsException - Code generation PromptRefusalException - Code generation EmptyPatchException - Code generation ThrottlingException - * - * */ - throw new ToolkitError('Code generation failed', { code: 'CodeGenFailed' }) + case CodeGenerationStatus.PREDICT_FAILED: + case CodeGenerationStatus.DEBATE_FAILED: + case CodeGenerationStatus.FAILED: { + switch (true) { + case codegenResult.codeGenerationStatusDetail?.includes('Guardrails'): { + throw new FeatureDevServiceError(CodeGenerationDefaultError, 'GuardrailsException') + } + case codegenResult.codeGenerationStatusDetail?.includes('PromptRefusal'): { + throw new PromptRefusalException() + } + case codegenResult.codeGenerationStatusDetail?.includes('EmptyPatch'): { + throw new FeatureDevServiceError(CodeGenerationDefaultError, 'EmptyPatchException') + } + case codegenResult.codeGenerationStatusDetail?.includes('Throttling'): { + throw new FeatureDevServiceError( + "I'm sorry, I'm experiencing high demand at the moment and can't generate your code. This attempt won't count toward usage limits. Please try again.", + 'ThrottlingException' + ) + } + default: { + throw new ToolkitError('Code generation failed', { code: 'CodeGenFailed' }) + } + } } default: { const errorMessage = `Unknown status: ${codegenResult.codeGenerationStatus.status}\n` diff --git a/packages/core/src/amazonqFeatureDev/types.ts b/packages/core/src/amazonqFeatureDev/types.ts index a32bb2286fb..5fb4a9ec6c6 100644 --- a/packages/core/src/amazonqFeatureDev/types.ts +++ b/packages/core/src/amazonqFeatureDev/types.ts @@ -30,6 +30,15 @@ export enum DevPhase { CODEGEN = 'Codegen', } +export enum CodeGenerationStatus { + COMPLETE = 'Complete', + PREDICT_READY = 'predict-ready', + IN_PROGRESS = 'InProgress', + PREDICT_FAILED = 'predict-failed', + DEBATE_FAILED = 'debate-failed', + FAILED = 'Failed', +} + export enum FollowUpTypes { GenerateCode = 'GenerateCode', InsertCode = 'InsertCode',