@@ -13,7 +13,6 @@ import {
1313 codeScanState ,
1414 CodeScanStoppedError ,
1515 onDemandFileScanState ,
16- RegionProfile ,
1716} from '../models/model'
1817import { sleep } from '../../shared/utilities/timeoutUtils'
1918import * as codewhispererClient from '../client/codewhisperer'
@@ -51,18 +50,13 @@ export async function listScanResults(
5150 codeScanFindingsSchema : string ,
5251 projectPaths : string [ ] ,
5352 scope : CodeWhispererConstants . CodeAnalysisScope ,
54- editor : vscode . TextEditor | undefined ,
55- profile ?: RegionProfile
53+ editor : vscode . TextEditor | undefined
5654) {
5755 const logger = getLoggerForScope ( scope )
5856 const codeScanIssueMap : Map < string , RawCodeScanIssue [ ] > = new Map ( )
5957 const aggregatedCodeScanIssueList : AggregatedCodeScanIssue [ ] = [ ]
6058 const requester = ( request : codewhispererClient . ListCodeScanFindingsRequest ) => client . listCodeScanFindings ( request )
61- const request : codewhispererClient . ListCodeScanFindingsRequest = {
62- jobId,
63- codeAnalysisFindingsSchema : codeScanFindingsSchema ,
64- profileArn : profile ?. arn ,
65- }
59+ const request : codewhispererClient . ListCodeScanFindingsRequest = { jobId, codeScanFindingsSchema }
6660 const collection = pageableToCollection ( requester , request , 'nextToken' )
6761 const issues = await collection
6862 . flatten ( )
@@ -209,8 +203,7 @@ export async function pollScanJobStatus(
209203 client : DefaultCodeWhispererClient ,
210204 jobId : string ,
211205 scope : CodeWhispererConstants . CodeAnalysisScope ,
212- codeScanStartTime : number ,
213- profile ?: RegionProfile
206+ codeScanStartTime : number
214207) {
215208 const pollingStartTime = performance . now ( )
216209 // We don't expect to get results immediately, so sleep for some time initially to not make unnecessary calls
@@ -223,7 +216,6 @@ export async function pollScanJobStatus(
223216 throwIfCancelled ( scope , codeScanStartTime )
224217 const req : codewhispererClient . GetCodeScanRequest = {
225218 jobId : jobId ,
226- profileArn : profile ?. arn ,
227219 }
228220 const resp = await client . getCodeScan ( req )
229221 logger . verbose ( `GetCodeScanRequest requestId: ${ resp . $response . requestId } ` )
@@ -250,8 +242,7 @@ export async function createScanJob(
250242 artifactMap : codewhispererClient . ArtifactMap ,
251243 languageId : string ,
252244 scope : CodeWhispererConstants . CodeAnalysisScope ,
253- scanName : string ,
254- profile ?: RegionProfile
245+ scanName : string
255246) {
256247 const logger = getLoggerForScope ( scope )
257248 logger . verbose ( `Creating scan job...` )
@@ -263,7 +254,6 @@ export async function createScanJob(
263254 } ,
264255 scope : codeAnalysisScope ,
265256 codeScanName : scanName ,
266- profileArn : profile ?. arn ,
267257 }
268258 const resp = await client . createCodeScan ( req ) . catch ( ( err ) => {
269259 getLogger ( ) . error ( `Failed creating scan job. Request id: ${ err . requestId } ` )
@@ -286,8 +276,7 @@ export async function getPresignedUrlAndUpload(
286276 client : DefaultCodeWhispererClient ,
287277 zipMetadata : ZipMetadata ,
288278 scope : CodeWhispererConstants . CodeAnalysisScope ,
289- scanName : string ,
290- profile ?: RegionProfile
279+ scanName : string
291280) {
292281 const artifactMap = await telemetry . amazonq_createUpload . run ( async ( span ) => {
293282 const logger = getLoggerForScope ( scope )
@@ -310,7 +299,6 @@ export async function getPresignedUrlAndUpload(
310299 codeScanName : scanName ,
311300 } ,
312301 } ,
313- profileArn : profile ?. arn ,
314302 }
315303 logger . verbose ( `Prepare for uploading src context...` )
316304 const srcResp = await client . createUploadUrl ( srcReq ) . catch ( ( err ) => {
0 commit comments