Request you help, the output of the below AWS command displays the value of the field Tags[?Key==`te-name`].Value|[0]
as below but I wanted to display only the partial string.
Tag: te_name
"SYS:DEV ROOM:L1 CHECK:Y""SYS:TRN ROOM:L2 CHECK:N"
Partial String
Tag: te_name
ROOM:L1
ROOM:L2
eg: Tags[?Key==`te-name`].Value(*ROOM*)
AWS command:
/usr/bin/aws ec2 describe-volumes --filters Name=tag:cloud-environment,Values='XXXX' --query 'Volumes[*].[VolumeId,VolumeType,Size,Attachments[0].InstanceId,Attachments[0].Device,State,Tags[?Key==`cloud-environment`]|[0].Value,Tags[?Key==`cip-created-by`]|[0].Value,Tags[?Key==`te-name`].Value|[0],Encrypted,KmsKeyId]' --output text