Comments (5)
Hi there,
Thanks for reaching out. The SDK did not change the structure for this operation. The behavior you are describing is indeed odd. Looking at the IAM API docs I don't see that Tags were ever a field that the ListRoles
API returned:
<ListRolesResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
<ListRolesResult>
<IsTruncated>false</IsTruncated>
<Roles>
<member>
<Path>/application_abc/component_xyz/</Path>
<Arn>arn:aws:iam::123456789012:role/application_abc/component_xyz/S3Access</Arn>
<RoleName>S3Access</RoleName>
<AssumeRolePolicyDocument>
{"Version":"2012-10-17","Statement":[{"Effect":"Allow",
"Principal":{"Service":["ec2.amazonaws.com"]},"Action":["sts:AssumeRole"]}]}
</AssumeRolePolicyDocument>
<CreateDate>2012-05-09T15:45:35Z</CreateDate>
<RoleId>AROACVSVTSZYEXAMPLEYK</RoleId>
</member>
<member>
<Path>/application_abc/component_xyz/</Path>
<Arn>arn:aws:iam::123456789012:role/application_abc/component_xyz/SDBAccess</Arn>
<RoleName>SDBAccess</RoleName>
<AssumeRolePolicyDocument>
{"Version":"2012-10-17","Statement":[{"Effect":"Allow",
"Principal":{"Service":["ec2.amazonaws.com"]},"Action":["sts:AssumeRole"]}]}
</AssumeRolePolicyDocument>
<CreateDate>2012-05-09T15:45:45Z</CreateDate>
<RoleId>AROAC2ICXG32EXAMPLEWK</RoleId>
</member>
</Roles>
</ListRolesResult>
<ResponseMetadata>
<RequestId>20f7279f-99ee-11e1-a4c3-27EXAMPLE804</RequestId>
</ResponseMetadata>
</ListRolesResponse>
Also, the IAM service uses a REST XML protocol, where is that JSON response coming from in your ticket?
The fact that the IAM API has a separate operation for returning the tags on a role (ListRoleTags) is also contributing to this confusion.
Do you have any sort of cloudwatch logs or request IDs that show the tags being returned?
Thanks,
Ran~
from aws-sdk-go-v2.
Thank you for your confirmation. It's my mistake. Sorry
Before we consume CloudTrail event and for every event we call GetRole to get the iam role data. This is why we can get the tags before.
Besides, we have a job to list all iam roles to do full sync. But unfortunately, it's the first time to carry out this job after we added tag missing alert recently.
This is the root cause. Sorry again.
At last, I want to know if there is any method for us to ListRoles with tags in one request?
Thanks.
from aws-sdk-go-v2.
Thank you for your confirmation. It's my mistake. Sorry Before we consume CloudTrail event and for every event we call GetRole to get the iam role data. This is why we can get the tags before.
Besides, we have a job to list all iam roles to do full sync. But unfortunately, it's the first time to carry out this job after we added tag missing alert recently.
This is the root cause. Sorry again.
At last, I want to know if there is any method for us to ListRoles with tags in one request? Thanks.
If there are no method can do ListRole with tags and we must ListRoleTags one by one after ListRoles, I think we can close this issue. Thank you.
from aws-sdk-go-v2.
Hi @suncle1993 ,
As far as I know, the only way for you to achieve that is to:
- list all roles
- iterate over the list of roles and call
ListRoleTags
on each one of them.
Happy to help,
Ran~
from aws-sdk-go-v2.
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
from aws-sdk-go-v2.
Related Issues (20)
- enum `com.amazonaws.codebuild#WebhookFilterType` missing value `REPOSITORY_NAME` HOT 1
- s3.WithPresignExpires introduces additional http header HOT 3
- Document examples for UnmarshalSmithyDocument don't work HOT 3
- Kinesis sdk panicking HOT 4
- missing PassthroughBehavior enum in types in apigateway(v1) HOT 10
- Flattening out dynamodbattribute.MarshalMap results HOT 3
- High Memory Usage Leading to OOM Killed State HOT 5
- Add Support for AWS Cloud Map Service HOT 3
- Improve SDK docs around support for modeled request compression
- Presign url's require side loading request-payer header HOT 6
- MIGRATION ISSUE: Equivalent way of disabling MD5 (S3DisableContentMD5Validation) HOT 3
- Add support for `dualStackIPv6` ECS account setting HOT 2
- Improve documentation around client/credential caching HOT 3
- Can't use `optFn` to set region for S3 Express operations (credentials issue) HOT 1
- Support the ListDirectoryBuckets API call HOT 2
- Documentation says what not to do, but not what to do HOT 2
- Missing AWS error code support in SDK metrics HOT 2
- DescribeVpcEndpoints returns the State value in lowercase instead of UpperCamelCase HOT 3
- Unable to remove environment variables from `amplify` App HOT 3
- Example links are broken HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-go-v2.