boto3
boto3 copied to clipboard
EC2.ServiceResource.create_tags documentation is incorrect
The documentation for the create_tags function says "Returns None".
This function actually returns a list of ec2.Tag For example:
import boto3
ec2 = boto3.resource("ec2")
response = ec2.create_tags(
Resources=["i-123"],
Tags=[{"Key":"foo", "Value": "bar"}]
)
print (type(response))
print (response)
Output:
<type 'list'>
[ec2.Tag(resource_id='i-123', key='foo', value='bar')]
Thanks, Juan
Ah, I see what happened. We inject the tag response here, but don't put in a corresponding doc change. Thanks for the feedback!
I'm checking in as this issue hasn't has any activity in a while. I think this issue can be closed now as it seems like the documentation for create_tags has been updated. Please let us know if you have any concerns.
Edit: Reached out to EC2 Docs team to confirm the update internally. We'll keep the issue open until we get more clarification. P75661630
The boto3 team has recently announced that the Resource interface has entered a feature freeze and won’t be accepting new changes at this time: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html. We’ll be closing existing feature requests, such as this issue, to avoid any confusion on current implementation status. We do appreciate your feedback and will ensure it’s considered in future feature decisions.
We’d like to highlight that all existing code using resources is supported and will continue to work in Boto3. No action is needed from users of the library.