{"modulePath":"github.com/DevLabFoundry/aws-cli-auth","version":"v0.15.7","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cmd\n\n## Constants\n\n```go\nconst (\n\tUserEndpoint          = \"https://portal.sso.%s.amazonaws.com/user\"\n\tCredsEndpoint         = \"https://portal.sso.%s.amazonaws.com/federation/credentials/\"\n\tSsoCredsEndpointQuery = \"?account_id=%s\u0026role_name=%s\u0026debug=true\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tVersion  string = \"0.0.1\"\n\tRevision string = \"1111aaaa\"\n)\n```\n\n```go\nvar (\n\tClearCmd = \u0026cobra.Command{\n\t\tUse:   \"clear-cache \u003cflags\u003e\",\n\t\tShort: \"Clears any stored credentials in the OS secret store\",\n\t\tRunE:  clear,\n\t}\n)\n```\n\n```go\nvar (\n\tErrUnableToCreateSession = errors.New(\"sts - cannot start a new session\")\n)\n```\n\n```go\nvar (\n\tRootCmd = \u0026cobra.Command{\n\t\tUse:   \"aws-cli-auth\",\n\t\tShort: \"CLI tool for retrieving AWS temporary credentials\",\n\t\tLong: `CLI tool for retrieving AWS temporary credentials using SAML providers, or specified method of retrieval - i.e. force AWS_WEB_IDENTITY.\nUseful in situations like CI jobs or containers where multiple env vars might be present.\nStores them under the $HOME/.aws/credentials file under a specified path or returns the crednetial_process payload for use in config`,\n\t\tVersion: fmt.Sprintf(\"%s-%s\", Version, Revision),\n\t}\n)\n```\n\n```go\nvar (\n\tSamlCmd = \u0026cobra.Command{\n\t\tUse:   \"saml \u003cSAML ProviderUrl\u003e\",\n\t\tShort: \"Get AWS credentials and out to stdout\",\n\t\tLong:  `Get AWS credentials and out to stdout through your SAML provider authentication.`,\n\t\tRunE:  getSaml,\n\t\tPreRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif reloadBeforeTime != 0 \u0026\u0026 reloadBeforeTime \u003e duration {\n\t\t\t\treturn fmt.Errorf(\"reload-before: %v, must be less than duration (-d): %v\", reloadBeforeTime, duration)\n\t\t\t}\n\t\t\tif len(ssoRole) \u003e 0 {\n\t\t\t\tsr := strings.Split(ssoRole, \":\")\n\t\t\t\tif len(sr) != 2 {\n\t\t\t\t\treturn fmt.Errorf(\"incorrectly formatted role for AWS SSO - must only be ACCOUNT:ROLE_NAME\")\n\t\t\t\t}\n\t\t\t\tssoRoleAccount, ssoRoleName = sr[0], sr[1]\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t}\n)\n```\n\n```go\nvar (\n\tSpecificCmd = \u0026cobra.Command{\n\t\tUse:   \"specific \u003cflags\u003e\",\n\t\tShort: \"Initiates a specific credential provider\",\n\t\tLong: `Initiates a specific credential provider [WEB_ID] as opposed to relying on the defaultCredentialChain provider.\nThis is useful in CI situations where various authentication forms maybe present from AWS_ACCESS_KEY as env vars to metadata of the node.\nReturns the same JSON object as the call to the AWS CLI for any of the sts AssumeRole* commands`,\n\t\tRunE: specific,\n\t}\n)\n```\n\n## Functions\n\n```go\nfunc Execute(ctx context.Context)\n```\n\n","path":"github.com/DevLabFoundry/aws-cli-auth/cmd","name":"cmd","synopsis":"","isRedistributable":true}
