Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-AWSProxy Cmdlet examples are wrong. #323

Closed
stknohg opened this issue May 25, 2023 · 2 comments
Closed

Set-AWSProxy Cmdlet examples are wrong. #323

stknohg opened this issue May 25, 2023 · 2 comments
Assignees
Labels
bug This issue is a bug. documentation This is a problem with documentation. p2 This is a standard priority issue queued

Comments

@stknohg
Copy link

stknohg commented May 25, 2023

Describe the issue

In some examples, -BypassList parameter is specified incorrectly.

Example 4

-BypassList is string array, so it is correct to use comma, and IPv4 address should be enclosed in quotes.

# Incorrect :  This example ignore ";169.254.169.251;169.254.169.254" 
Set-AWSProxy -Hostname https://proxy.testserver.com -Port 80 -BypassList 169.254.169.250;169.254.169.251;169.254.169.254

# Only 169.254.169.250 is set in BypassList.
> $AWSProxy                                                                                                         
Hostname      : https://proxy.testserver.com
Port          : 80
Credentials   :
BypassList    : {169.254.169.250}
BypassOnLocal :
# Correct
Set-AWSProxy -Hostname https://proxy.testserver.com -Port 80 -BypassList "169.254.169.250","169.254.169.251","169.254.169.254"

#  BypassList is set expected values.
> $AWSProxy

Hostname      : https://proxy.testserver.com
Port          : 80
Credentials   :
BypassList    : {169.254.169.250, 169.254.169.251, 169.254.169.254}
BypassOnLocal :

quotation marks around the IP address values are not needed.

It is correct, but in some cases PowerShell treats non-quated IP address as scriptblock.
In the example below all IP addresses are ignored.

# With array subexpression operator (`@()`), non-quated IP address are parsed as non-value scritpblock.
Set-AWSProxy -Hostname https://proxy.testserver.com -Port 80 -BypassList @(169.254.169.250, 169.254.169.251, 169.254.169.254)

# All IP address are ignored.
> $AWSProxy

Hostname      : https://proxy.testserver.com
Port          : 80
Credentials   :
BypassList    : {$null, $null, $null}
BypassOnLocal :

Example 7

Same as Example 4.

# Incorrect
Set-AWSProxy -Port 8888 -Hostname 127.0.0.1 -BypassList "127.0.0.1";"ip-ranges.amazonaws.com"

# Correct
Set-AWSProxy -Port 8888 -Hostname 127.0.0.1 -BypassList "127.0.0.1","ip-ranges.amazonaws.com"

Links

https://docs.aws.amazon.com/powershell/latest/reference/items/Set-AWSProxy.html

@stknohg stknohg added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels May 25, 2023
@ashishdhingra ashishdhingra added bug This issue is a bug. needs-review p2 This is a standard priority issue queued and removed needs-triage This issue or PR still needs to be triaged. needs-review labels May 25, 2023
@ashishdhingra ashishdhingra self-assigned this Jul 26, 2023
@ashishdhingra
Copy link
Contributor

This had been fixed at https://docs.aws.amazon.com/powershell/latest/reference/items/Set-AWSProxy.html.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. documentation This is a problem with documentation. p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

2 participants