Skip to content

Commit 0c643ec

Browse files
committed
update description
1 parent b603c33 commit 0c643ec

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/core/package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"AWS.configuration.description.suppressPrompts": "Prompts which ask for confirmation. Checking an item suppresses the prompt.",
2121
"AWS.configuration.enableCodeLenses": "Enable SAM hints in source code and template.yaml files",
2222
"AWS.configuration.description.resources.enabledResources": "AWS resources to display in the 'Resources' portion of the explorer.",
23-
"AWS.configuration.description.experiments": "Try experimental features and give feedback. Note that experimental features may be removed at any time.\n * `jsonResourceModification` - Enables basic create, update, and delete support for cloud resources via the JSON Resources explorer component.\n * `samSyncCode` - Adds an additional code-only option when synchronizing SAM applications. Code-only synchronizations are faster but can cause drift in the CloudFormation stack. Does nothing when using the legacy SAM deploy feature.\n * `iamPolicyChecks` - Enables IAM Policy Checks feature, allowing users to validate IAM policies against IAM policy grammar, AWS best practices, and specified security standards.",
23+
"AWS.configuration.description.experiments": "Try experimental features and give feedback. Note that experimental features may be removed at any time.\n * `jsonResourceModification` - Enables basic create, update, and delete support for cloud resources via the JSON Resources explorer component.\n * `ec2RemoteConnect` - Allows interfacing with EC2 instances with options to start, stop, and establish remote connections. Remote connections are done over SSM and can be done through a terminal or a remote VSCode window",
2424
"AWS.stepFunctions.asl.format.enable.desc": "Enables the default formatter used with Amazon States Language files",
2525
"AWS.stepFunctions.asl.maxItemsComputed.desc": "The maximum number of outline symbols and folding regions computed (limited for performance reasons).",
2626
"AWS.configuration.description.awssam.debug.api": "API Gateway configuration",

packages/core/src/awsexplorer/regionNode.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ import { DefaultSchemaClient } from '../shared/clients/schemaClient'
2929
import { getEcsRootNode } from '../awsService/ecs/model'
3030
import { compareTreeItems, TreeShim } from '../shared/treeview/utils'
3131
import { Ec2ParentNode } from '../awsService/ec2/explorer/ec2ParentNode'
32-
import { DevSettings } from '../shared/settings'
3332
import { Ec2Client } from '../shared/clients/ec2Client'
3433
import { isCloud9 } from '../shared/extensionUtilities'
34+
import { Experiments } from '../shared/settings'
3535

3636
interface ServiceNode {
3737
allRegions?: boolean
@@ -42,7 +42,7 @@ interface ServiceNode {
4242
* when: () => DevSettings.instance.isDevMode()
4343
* ```
4444
*/
45-
when?: () => boolean
45+
when?: () => boolean | Promise<boolean>
4646
createFn: (regionCode: string, partitionId: string) => any
4747
}
4848

@@ -65,7 +65,7 @@ const serviceCandidates: ServiceNode[] = [
6565
},
6666
{
6767
serviceId: 'ec2',
68-
when: () => DevSettings.instance.isDevMode(),
68+
when: async () => await Experiments.instance.isExperimentEnabled('ec2RemoteConnect'),
6969
createFn: (regionCode: string, partitionId: string) =>
7070
new Ec2ParentNode(regionCode, partitionId, new Ec2Client(regionCode)),
7171
},
@@ -145,7 +145,7 @@ export class RegionNode extends AWSTreeNodeBase {
145145
const partitionId = this.regionProvider.getPartitionId(this.regionCode) ?? defaultPartition
146146
const childNodes: AWSTreeNodeBase[] = []
147147
for (const service of serviceCandidates) {
148-
if (service.when !== undefined && !service.when()) {
148+
if (service.when !== undefined && !(await service.when())) {
149149
continue
150150
}
151151
if (service.allRegions || this.regionProvider.isServiceInRegion(service.serviceId, this.regionCode)) {

0 commit comments

Comments
 (0)