Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian authored and yndu13 committed Oct 10, 2024
1 parent bc71f49 commit a4e3229
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,17 @@ import (
func main() {
config := new(credentials.Config).
SetType("oidc_role_arn").
// The ARN of OIDC provider
SetOIDCProviderArn("OIDCProviderArn").
// The path of OIDC token file
SetOIDCTokenFilePath("OIDCTokenFilePath").
// The ARN of role
SetRoleArn("RoleArn").
// The role session name
SetRoleSessionName("RoleSessionName").
// Not required, The RAM policy document.
SetPolicy("Policy").
SetRoleArn("RoleArn").
// Not required, limit the Valid time of STS Token
SetSessionExpiration(3600)
provider, err := credentials.NewCredential(config)
if err != nil {
Expand Down

0 comments on commit a4e3229

Please sign in to comment.