Closed MushiTheMoshi closed 1 year ago
additionally I am reading this piece of doc: https://github.com/hashicorp/vault-client-go/blob/main/docs/AuthApi.md#awswriteauthrole
Hi @MushiTheMoshi,
The generated docs are not quite correct here. Currently the request is passed by value. We are considering changing that in the future versions. The current syntax is:
resp2, err := client.Auth.AwsWriteAuthRole(
context.Background(),
role,
*request,
vault.WithToken(resp.Auth.ClientToken),
vault.WithMountPath("aws"),
)
Alternatively:
resp2, err := client.Auth.AwsWriteAuthRole(
context.Background(),
role,
AwsWriteRoleRequest{
// populate request parameters
},
vault.WithToken(resp.Auth.ClientToken),
vault.WithMountPath("aws"),
)
Hi there, that fixed the issue, though I just realize that the method I needed is client.Auth.AwsListAuthRoles
which is having the same problem documentation is not having correct info, can you please share how should I use client.Auth.AwsListAuthRoles
?
getting:
cannot use ROLE (variable of type string) as type vault.RequestOption in argument to client.Auth.AwsListAuthRoles
Expected Behavior
I can read auth/aws/role/ROLE like vault read auth/aws/role/ROLE
Current Behavior
Types from the documentation are not matching
Failure Information
Please include the version of Vault binary and the version of
vault-client-go
you're using. github.com/hashicorp/vault-client-go v0.3.0Error:
Hope you can help me.
Regards, Julio