Skip to content

Commit

Permalink
[aws] sso login (withfig#543)
Browse files Browse the repository at this point in the history
* [aws] sso login

* fix: More descriptive arg names
  • Loading branch information
danilofuchs committed Sep 3, 2021
1 parent 7aeee1f commit e57316c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
3 changes: 2 additions & 1 deletion dev/aws/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ const completionSpec: Fig.Spec = {
options: [
{
name: "--profile",
description: "Profile-name",
description:
"The name of the profile to configure.\n\nIf not set, will use the default profile",
},
],
},
Expand Down
29 changes: 22 additions & 7 deletions dev/aws/sso.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ const completionSpec: Fig.Spec = {
description:
"The friendly name of the role that is assigned to the user",
args: {
name: "string",
name: "name",
},
},
{
name: "--account-id",
description:
"The identifier for the AWS account that is assigned to the user",
args: {
name: "string",
name: "account id",
},
},
{
name: "--access-token",
description:
"The token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide",
args: {
name: "string",
name: "token",
},
},
{
Expand Down Expand Up @@ -76,15 +76,15 @@ const completionSpec: Fig.Spec = {
description:
"The token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide",
args: {
name: "string",
name: "token",
},
},
{
name: "--account-id",
description:
"The identifier for the AWS account that is assigned to the user",
args: {
name: "string",
name: "account id",
},
},
{
Expand Down Expand Up @@ -156,7 +156,7 @@ const completionSpec: Fig.Spec = {
description:
"The token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide",
args: {
name: "string",
name: "token",
},
},
{
Expand Down Expand Up @@ -202,6 +202,21 @@ const completionSpec: Fig.Spec = {
},
],
},
{
name: "login",
description:
"Refreshes SSO access tokens and logs in. Required setup using `aws configure sso`",
options: [
{
name: "--profile",
description:
"The name of the profile to use.\n\nIf not set, will use the default profile",
args: {
name: "name",
},
},
],
},
{
name: "logout",
description:
Expand All @@ -212,7 +227,7 @@ const completionSpec: Fig.Spec = {
description:
"The token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide",
args: {
name: "string",
name: "token",
},
},
{
Expand Down

0 comments on commit e57316c

Please sign in to comment.