Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { ChildNodeLoader, ChildNodePage } from '../../../awsexplorer/childNodeLo
import { DefaultRedshiftClient } from '../../../shared/clients/redshiftClient'
import { deleteConnection, ConnectionParams, ConnectionType, RedshiftWarehouseType } from '../models/models'
import { RedshiftNodeConnectionWizard } from '../wizards/connectionWizard'
import { ListDatabasesResponse } from 'aws-sdk/clients/redshiftdata'
import { ListDatabasesResponse } from '@aws-sdk/client-redshift-data'
import { getIcon } from '../../../shared/icons'
import { AWSCommandTreeNode } from '../../../shared/treeview/nodes/awsCommandTreeNode'
import { telemetry } from '../../../shared/telemetry/telemetry'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { DefaultRedshiftClient } from '../../../shared/clients/redshiftClient'
import { Region } from '../../../shared/regions/endpoints'
import { RegionProvider } from '../../../shared/regions/regionProvider'
import { createRegionPrompter } from '../../../shared/ui/common/region'
import { ClustersMessage } from 'aws-sdk/clients/redshift'
import { ClustersMessage } from '@aws-sdk/client-redshift'
import { Prompter } from '../../../shared/ui/prompter'
import { ListSecretsResponse } from '@aws-sdk/client-secrets-manager'
import { SecretsManagerClient } from '../../../shared/clients/secretsManagerClient'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import * as vscode from 'vscode'
import { GetCallerIdentityResponse } from 'aws-sdk/clients/sts'
import { GetCallerIdentityCommandOutput } from '@aws-sdk/client-sts'
import { DescribeDomainResponse } from '@amzn/sagemaker-client'
import { SagemakerClient, SagemakerSpaceApp } from '../../../shared/clients/sagemaker'
import { DefaultStsClient } from '../../../shared/clients/stsClient'
Expand Down Expand Up @@ -34,7 +34,7 @@ export class SagemakerParentNode extends AWSTreeNodeBase {
public override readonly contextValue: string = parentContextValue
domainUserProfiles: Map<string, UserProfileMetadata> = new Map()
spaceApps: Map<string, SagemakerSpaceApp> = new Map()
callerIdentity: GetCallerIdentityResponse = {}
callerIdentity: Partial<GetCallerIdentityCommandOutput> = {}
public readonly pollingSet: PollingSet<string> = new PollingSet(5000, this.updatePendingNodes.bind(this))

public constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import {
import globals from '../../shared/extensionGlobals'
import { once } from '../../shared/utilities/functionUtils'
import CodeWhispererUserClient from '../client/codewhispereruserclient'
import { Credentials, Service } from 'aws-sdk'
import { AwsCredentialIdentity } from '@aws-sdk/types'
import { Service } from 'aws-sdk'
import { ServiceOptions } from '../../shared/awsClientBuilder'
import userApiConfig = require('../client/user-service-2.json')
import { createConstantMap } from '../../shared/utilities/tsUtils'
Expand Down Expand Up @@ -394,7 +395,7 @@ export class RegionProfileManager {
apiConfig: userApiConfig,
region: region,
endpoint: endpoint,
credentials: new Credentials({ accessKeyId: 'xxx', secretAccessKey: 'xxx' }),
credentials: { accessKeyId: 'xxx', secretAccessKey: 'xxx' } as AwsCredentialIdentity,
onRequestSetup: [
(req) => {
req.on('build', ({ httpRequest }) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/dynamicResources/commands/saveResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ResourceNode } from '../explorer/nodes/resourceNode'
import { ResourceTypeNode } from '../explorer/nodes/resourceTypeNode'
import { AwsResourceManager } from '../awsResourceManager'
import { CloudControlClient } from '../../shared/clients/cloudControl'
import { CloudControl } from 'aws-sdk'
import { ResourceDescription } from '@aws-sdk/client-cloudcontrol'
import globals from '../../shared/extensionGlobals'
import { telemetry } from '../../shared/telemetry/telemetry'

Expand Down Expand Up @@ -224,7 +224,7 @@ export async function updateResource(
)
}

function computeDiff(currentDefinition: CloudControl.ResourceDescription, updatedDefinition: string): Operation[] {
function computeDiff(currentDefinition: ResourceDescription, updatedDefinition: string): Operation[] {
const current = JSON.parse(currentDefinition.Properties!)
const updated = JSON.parse(updatedDefinition)
return compare(current, updated)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { localize } from '../../../shared/utilities/vsCodeUtils'
import { ResourcesNode } from './resourcesNode'
import { ResourceNode } from './resourceNode'
import { Result } from '../../../shared/telemetry/telemetry'
import { CloudControl } from 'aws-sdk'
import { ResourceDescription } from '@aws-sdk/client-cloudcontrol'
import { ResourceTypeMetadata } from '../../model/resources'
import { S3Client } from '../../../shared/clients/s3'
import { telemetry } from '../../../shared/telemetry/telemetry'
Expand Down Expand Up @@ -123,15 +123,12 @@ export class ResourceTypeNode extends AWSTreeNodeBase implements LoadMoreNode {
})

newResources = response.ResourceDescriptions
? response.ResourceDescriptions.reduce(
(accumulator: ResourceNode[], current: CloudControl.ResourceDescription) => {
if (current.Identifier) {
accumulator.push(new ResourceNode(this, current.Identifier, this.childContextValue))
}
return accumulator
},
[]
)
? response.ResourceDescriptions.reduce((accumulator: ResourceNode[], current: ResourceDescription) => {
if (current.Identifier) {
accumulator.push(new ResourceNode(this, current.Identifier, this.childContextValue))
}
return accumulator
}, [])
: []
nextToken = response.NextToken
}
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/stepFunctions/workflowStudio/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import { IAM } from 'aws-sdk'
import * as StepFunctions from '@aws-sdk/client-sfn'
import { ListRolesCommandInput } from '@aws-sdk/client-iam'
import { TestStateInput } from '@aws-sdk/client-sfn'
import * as vscode from 'vscode'

export enum WorkflowMode {
Expand Down Expand Up @@ -94,8 +94,8 @@ export enum ApiAction {
}

type ApiCallRequestMapping = {
[ApiAction.IAMListRoles]: IAM.ListRolesRequest
[ApiAction.SFNTestState]: StepFunctions.TestStateInput
[ApiAction.IAMListRoles]: ListRolesCommandInput
[ApiAction.SFNTestState]: TestStateInput
}

interface ApiCallRequestMessageBase<ApiName extends ApiAction> extends Message {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import { Settings } from '../../../../shared/settings'
import { LogDataCodeLensProvider } from '../../../../awsService/cloudWatchLogs/document/logDataCodeLensProvider'
import { CLOUDWATCH_LOGS_SCHEME } from '../../../../shared/constants'
import { FilteredLogEvent } from 'aws-sdk/clients/cloudwatchlogs'
import { FilteredLogEvent } from '@aws-sdk/client-cloudwatch-logs'

const getLogEventsMessage = 'This is from getLogEvents'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
testLogData,
unregisteredData,
} from '../utils.test'
import { FilteredLogEvents } from 'aws-sdk/clients/cloudwatchlogs'
import { FilteredLogEvent } from '@aws-sdk/client-cloudwatch-logs'
import { formatDateTimestamp } from '../../../../shared/datetime'

describe('LogDataRegistry', async function () {
Expand Down Expand Up @@ -128,8 +128,8 @@ describe('LogDataRegistry', async function () {
const pageToken1 = 'page1Token'
const pageToken2 = 'page2Token'

function createCwlEvents(id: string, count: number): FilteredLogEvents {
let events: FilteredLogEvents = []
function createCwlEvents(id: string, count: number): FilteredLogEvent[] {
let events: FilteredLogEvent[] = []
for (let i = 0; i < count; i++) {
events = events.concat({ message: `message-${id}`, logStreamName: `stream-${id}` })
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*/

import assert from 'assert'
import { Credentials } from 'aws-sdk'
import { AwsCredentialIdentity } from '@aws-sdk/types'
import { EcsCredentialsProvider } from '../../../auth/providers/ecsCredentialsProvider'
import { EnvironmentVariables } from '../../../shared/environmentVariables'

describe('EcsCredentialsProvider', function () {
const dummyUri = 'dummyUri'
const dummyRegion = 'dummmyRegion'
const dummyCredentials = { accessKeyId: 'dummyKey' } as Credentials
const dummyCredentials = { accessKeyId: 'dummyKey' } as AwsCredentialIdentity
const dummyProvider = () => {
return Promise.resolve(dummyCredentials)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
assertNodeListOnlyHasPlaceholderNode,
} from '../../utilities/explorerNodeAssertions'
import { CloudControlClient } from '../../../shared/clients/cloudControl'
import { CloudControl } from 'aws-sdk'
import { ResourceDescription } from '@aws-sdk/client-cloudcontrol'
import { ResourceTypeMetadata } from '../../../dynamicResources/model/resources'
import sinon from 'sinon'

Expand Down Expand Up @@ -183,7 +183,7 @@ describe('ResourceTypeNode', function () {
cloudControl.listResources = sinon.stub().resolves({
TypeName: fakeTypeName,
NextToken: undefined,
ResourceDescriptions: resourceIdentifiers.map<CloudControl.ResourceDescription>((identifier) => {
ResourceDescriptions: resourceIdentifiers.map<ResourceDescription>((identifier) => {
return {
Identifier: identifier,
ResourceModel: '',
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/test/shared/defaultAwsContext.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import assert from 'assert'
import * as AWS from 'aws-sdk'
import { AwsCredentialIdentity } from '@aws-sdk/types'
import { AwsContextCredentials } from '../../shared/awsContext'
import { DefaultAwsContext } from '../../shared/awsContext'

Expand Down Expand Up @@ -125,7 +125,7 @@ describe('DefaultAwsContext', function () {

function makeSampleAwsContextCredentials(endpointUrl?: string): AwsContextCredentials {
return {
credentials: {} as any as AWS.Credentials,
credentials: {} as AwsCredentialIdentity,
credentialsId: 'qwerty',
accountId: testAccountIdValue,
endpointUrl,
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/test/shared/sam/sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import sinon from 'sinon'
import { getTestWindow } from '../vscode/window'
import { S3Client } from '../../../shared/clients/s3'
import { RequiredProps } from '../../../shared/utilities/tsUtils'
import S3 from 'aws-sdk/clients/s3'
import { Bucket } from '@aws-sdk/client-s3'
import { CloudFormationClient } from '../../../shared/clients/cloudFormation'
import { intoCollection } from '../../../shared/utilities/collectionUtils'
import { SamConfig, Environment, parseConfig } from '../../../shared/sam/config'
Expand Down Expand Up @@ -2174,7 +2174,7 @@ describe('SAM sync helper functions', () => {
})

const s3BucketListSummary: Array<
RequiredProps<S3.Bucket, 'Name'> & {
RequiredProps<Bucket, 'Name'> & {
readonly region: string
}
> = [
Expand Down