0

So trying to list accesspoints via aws cli along with RootDirectory Path:

Here is the output of command:

aws efs describe-access-points --region="us-east-1"

{
"AccessPoints": [
    {
        "ClientToken": "console-3d1f4938-4969-48c2-98e5-a0bcb24ab",
        "Name": "Root-Dummy",
        "Tags": [
            {
                "Key": "Name",
                "Value": "Root-Dummy"
            }
        ],
        "AccessPointId": "fsap-0333cca0bcb24ab",
        "AccessPointArn": "arn:aws:elasticfilesystem:us-east-1:1234567:access-point/fsap-0333cca0bcb24ab",
        "FileSystemId": "fs-dffb782e",
        "RootDirectory": {
            "Path": "/"
        },
        "OwnerId": "1234567",
        "LifeCycleState": "available"
    },
    {
        "ClientToken": "console-789851e7f-5423-4179-bad0-9a5eddd774c80",
        "Name": "dummy-app",
        "Tags": [
            {
                "Key": "Name",
                "Value": "dummy-app"
            }
        ],
        "AccessPointId": "fsap-03443cca0bcb24ab",
        "AccessPointArn": "arn:aws:elasticfilesystem:us-east-1:1234567:access-point/fsap-03443cca0bcb24ab",
        "FileSystemId": "fs-dffb782e",
        "RootDirectory": {
            "Path": "/export/apps/dummy"
        },
        "OwnerId": "1234567",
        "LifeCycleState": "available"
    }
]

}

tried with below but no luck with RootDirectory Path--The command listing out all access points fine if i take out the RootDirectory from the below command

aws efs describe-access-points --query "AccessPoints[*].{AccessPointId:AccessPointId, FileSystemID:FileSystemId, LifeCycleState:LifeCycleState, OwnerId:OwnerId,  Name:Name}, RootDirectory[*].{Path:Path}" --region="us-east-1" --output table

Looking for some inputs here where i can list accespoint ids and even Root Directory Path values

Rczone
  • 493
  • 1
  • 5
  • 18

1 Answers1

0

I got it..this gives the required output

aws efs describe-access-points --query "AccessPoints[*].{AccessPointId:AccessPointId, FileSystemID:FileSystemId, LifeCycleState:LifeCycleState, OwnerId:OwnerId,  Name:Name, Path:RootDirectory.Path}" --region="us-east-1" --output table
Rczone
  • 493
  • 1
  • 5
  • 18