python - Not able to get the resources attached with route table -
i using python aws infrastructure automation. need resources attached route table api given
ec2 = boto3.resource('ec2') route_table_association = ec2.routetableassociation('rtb-**********') response=route_table_association.get_available_subresources()
here return type of response giving me empty list time. , response=route_table_association.delete()
gives exception
an error occurred (invalidassociationid.notfound) when calling `disassociateroutetable operation: association id 'rtb-*********' not exist.`
but route tebale exist , attached subnet explicitly
the id required routetableassociationid i.e. rtbassoc-xxxxxx , not route table id.
routetableassociationid inside describe_route_tables response json 'associations' element.
{ 'routetables': [ { 'routetableid': 'string', 'vpcid': 'string', 'routes': [ {....} ], 'associations': [ { 'routetableassociationid': 'string', 'routetableid': 'string', 'subnetid': 'string', 'main': true|false }, ], ..... }
Comments
Post a Comment