Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fireflycons committed Jan 7, 2020
1 parent 2c1d98f commit 29bd4d8
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 4 deletions.
8 changes: 8 additions & 0 deletions aws-toolbox/Public/IAM/Get-ATIAMSessionCredentials.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ function Get-ATIAMSessionCredentials
The credentials are set as environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN in the current shell.
Proceed to run your application that supports environment-based credentails in this shell.
.PARAMETER AwsCli
Instructs the command to return a credential source for use with aws cli.
See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html
.PARAMETER Ruby
The credentials are formatted as ENV[] = staements and output to the console
Expand All @@ -42,6 +46,10 @@ function Get-ATIAMSessionCredentials
Get-ATIAMSessionCredentials -Ruby -ClipBoard
Copies ruby ENV statements to create the AWS environment variables for ruby direct to clipboard. Paste into your irb shell environment.
.EXAMPLE
credential_process = powershell.exe -Command "Import-Module aws-toolbox; Set-AWSCredential -ProfileName your_federated_creds_profile; Get-ATIAMSessionCredentials -AwsCli"
This example is a line you would put into your aws/credentials file.
#>
[CmdletBinding(DefaultParameterSetName = 'SetLocal')]
param
Expand Down
52 changes: 51 additions & 1 deletion docs/en-US/Get-ATIAMSessionCredentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ Get-ATIAMSessionCredentials [-Ruby] [-ClipBoard] [<CommonParameters>]
Get-ATIAMSessionCredentials [-Bash] [-ClipBoard] [<CommonParameters>]
```

### DotNet
```
Get-ATIAMSessionCredentials [-DotNetConstructor] [-ClipBoard] [<CommonParameters>]
```

### AwsCli
```
Get-ATIAMSessionCredentials [-AwsCli] [<CommonParameters>]
```

## DESCRIPTION
If your organisation uses federated authentication (SAML etc) for API authentication with AWS,
this cmdlet enables you to get a set of temporary keys for use with applications that do not
Expand Down Expand Up @@ -61,6 +71,13 @@ Get-ATIAMSessionCredentials -Ruby -ClipBoard
Copies ruby ENV statements to create the AWS environment variables for ruby direct to clipboard.
Paste into your irb shell environment.

### EXAMPLE 4
```
credential_process = powershell.exe -Command "Import-Module aws-toolbox; Set-AWSCredential -ProfileName your_federated_creds_profile; Get-ATIAMSessionCredentials -AwsCli"
```

This example is a line you would put into your aws/credentials file.

## PARAMETERS

### -Ruby
Expand Down Expand Up @@ -93,12 +110,45 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -DotNetConstructor
The credentials are formatted as new SessionAWSCredentials(...) and output to the console.
Note that you would not want to store this in any code.
Useful only for quick debugging.
```yaml
Type: SwitchParameter
Parameter Sets: DotNet
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ClipBoard
If set, output of -Ruby or -Bash is copied directly to clipboard, so you can paste them into code or your active Ruby or Shell prompt
```yaml
Type: SwitchParameter
Parameter Sets: Ruby, Shell
Parameter Sets: Ruby, Shell, DotNet
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -AwsCli
Instructs the command to return a credential source for use with aws cli.
See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html
```yaml
Type: SwitchParameter
Parameter Sets: AwsCli
Aliases:

Required: False
Expand Down
6 changes: 3 additions & 3 deletions docs/en-US/Set-ATSSMWindowsAdminUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Use SSM to set up an admin user on one or more Windows instances

## SYNTAX

### ByUserName
### ByUsername
```
Set-ATSSMWindowsAdminUser -InstanceId <String[]> -Username <String> -Password <String> [<CommonParameters>]
```
Expand Down Expand Up @@ -65,7 +65,7 @@ Username to set
```yaml
Type: String
Parameter Sets: ByUserName
Parameter Sets: ByUsername
Aliases:

Required: True
Expand All @@ -80,7 +80,7 @@ Password to set
```yaml
Type: String
Parameter Sets: ByUserName
Parameter Sets: ByUsername
Aliases:

Required: True
Expand Down

0 comments on commit 29bd4d8

Please sign in to comment.