I have been trying to enable "Allow" option in Instance metadata tag using boto3 and referred to the below format from link shared below
response = client.modify_instance_metadata_options(
InstanceId='string',
HttpTokens='optional'|'required',
HttpPutResponseHopLimit=123,
HttpEndpoint='disabled'|'enabled',
DryRun=True|False,
HttpProtocolIpv6='disabled'|'enabled',
InstanceMetadataTags='disabled'|'enabled'
)
ref link : https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html?highlight=vpcendpoint#EC2.Client.modify_instance_metadata_options
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html
With the above reference , please find the usage in my case as below
****USAGE : ****
client = self.get_service(service_type, region)
client.modify_instance_metadata_options(InstanceId=resource_id,InstanceMetadataTags="enabled")
While executing the above scenarios, am facing Unknown parameter in input
E botocore.exceptions.ParamValidationError: Parameter validation failed:
E Unknown parameter in input: "InstanceMetadataTags", must be one of: InstanceId, HttpTokens, HttpPutResponseHopLimit, HttpEndpoint, DryRun
It'll be really helpful if anyone could help me in correct usage or in resolving this
TIA