Skip to content

Commit 50c9e40

Browse files
committed
refactor: remove v3 suffix to import
1 parent ac949fc commit 50c9e40

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

packages/core/src/awsService/cloudWatchLogs/commands/viewLogStream.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as vscode from 'vscode'
1010
import * as picker from '../../../shared/ui/picker'
1111
import { MultiStepWizard, WIZARD_RETRY, WIZARD_TERMINATE, WizardStep } from '../../../shared/wizards/multiStepWizard'
1212
import { LogGroupNode } from '../explorer/logGroupNode'
13-
import * as CloudWatchLogsV3 from '@aws-sdk/client-cloudwatch-logs'
13+
import * as CloudWatchLogs from '@aws-sdk/client-cloudwatch-logs'
1414
import { CloudWatchLogsClient } from '../../../shared/clients/cloudWatchLogs'
1515
import { getPaginatedAwsCallIter, IteratorTransformer } from '../../../shared/utilities/collectionUtils'
1616
import {
@@ -82,7 +82,7 @@ export class DefaultSelectLogStreamWizardContext implements SelectLogStreamWizar
8282

8383
public async pickLogStream(): Promise<LogSearchChoice> {
8484
const client = new CloudWatchLogsClient(this.regionCode)
85-
const request: CloudWatchLogsV3.DescribeLogStreamsRequest = {
85+
const request: CloudWatchLogs.DescribeLogStreamsRequest = {
8686
logGroupName: this.logGroupName,
8787
orderBy: 'LastEventTime',
8888
descending: true,
@@ -180,7 +180,7 @@ export class DefaultSelectLogStreamWizardContext implements SelectLogStreamWizar
180180
}
181181

182182
export function convertDescribeLogToQuickPickItems(
183-
response: CloudWatchLogsV3.DescribeLogStreamsResponse
183+
response: CloudWatchLogs.DescribeLogStreamsResponse
184184
): vscode.QuickPickItem[] {
185185
return (response.logStreams ?? []).map<vscode.QuickPickItem>((stream) => ({
186186
label: stream.logStreamName!,

packages/core/src/shared/clients/cloudWatchLogs.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import * as CloudWatchLogsV3 from '@aws-sdk/client-cloudwatch-logs'
6+
import * as CloudWatchLogs from '@aws-sdk/client-cloudwatch-logs'
77
import { ClientWrapper } from './clientWrapper'
88

9-
export class CloudWatchLogsClient extends ClientWrapper<CloudWatchLogsV3.CloudWatchLogsClient> {
9+
export class CloudWatchLogsClient extends ClientWrapper<CloudWatchLogs.CloudWatchLogsClient> {
1010
public constructor(regionCode: string) {
11-
super(regionCode, CloudWatchLogsV3.CloudWatchLogsClient)
11+
super(regionCode, CloudWatchLogs.CloudWatchLogsClient)
1212
}
1313

1414
public async *describeLogGroups(
15-
request: CloudWatchLogsV3.DescribeLogGroupsRequest = {}
16-
): AsyncIterableIterator<CloudWatchLogsV3.LogGroup> {
15+
request: CloudWatchLogs.DescribeLogGroupsRequest = {}
16+
): AsyncIterableIterator<CloudWatchLogs.LogGroup> {
1717
do {
18-
const response: CloudWatchLogsV3.DescribeLogGroupsResponse = await this.makeRequest(
19-
CloudWatchLogsV3.DescribeLogGroupsCommand,
18+
const response: CloudWatchLogs.DescribeLogGroupsResponse = await this.makeRequest(
19+
CloudWatchLogs.DescribeLogGroupsCommand,
2020
request
2121
)
2222
if (response.logGroups) {
@@ -27,20 +27,20 @@ export class CloudWatchLogsClient extends ClientWrapper<CloudWatchLogsV3.CloudWa
2727
}
2828

2929
public async describeLogStreams(
30-
request: CloudWatchLogsV3.DescribeLogStreamsRequest
31-
): Promise<CloudWatchLogsV3.DescribeLogStreamsResponse> {
32-
return await this.makeRequest(CloudWatchLogsV3.DescribeLogStreamsCommand, request)
30+
request: CloudWatchLogs.DescribeLogStreamsRequest
31+
): Promise<CloudWatchLogs.DescribeLogStreamsResponse> {
32+
return await this.makeRequest(CloudWatchLogs.DescribeLogStreamsCommand, request)
3333
}
3434

3535
public async getLogEvents(
36-
request: CloudWatchLogsV3.GetLogEventsRequest
37-
): Promise<CloudWatchLogsV3.GetLogEventsResponse> {
38-
return await this.makeRequest(CloudWatchLogsV3.GetLogEventsCommand, request)
36+
request: CloudWatchLogs.GetLogEventsRequest
37+
): Promise<CloudWatchLogs.GetLogEventsResponse> {
38+
return await this.makeRequest(CloudWatchLogs.GetLogEventsCommand, request)
3939
}
4040

4141
public async filterLogEvents(
42-
request: CloudWatchLogsV3.FilterLogEventsRequest
43-
): Promise<CloudWatchLogsV3.FilterLogEventsResponse> {
44-
return await this.makeRequest(CloudWatchLogsV3.FilterLogEventsCommand, request)
42+
request: CloudWatchLogs.FilterLogEventsRequest
43+
): Promise<CloudWatchLogs.FilterLogEventsResponse> {
44+
return await this.makeRequest(CloudWatchLogs.FilterLogEventsCommand, request)
4545
}
4646
}

0 commit comments

Comments
 (0)