CLI로 DescribeFileSystems 사용 - AWS SDK 코드 예제

AWS SDK 예제 GitHub 리포지토리에 더 많은 AWS문서 SDK 예제가 있습니다.

CLI로 DescribeFileSystems 사용

다음 코드 예시는 DescribeFileSystems의 사용 방법을 보여 줍니다.

CLI
AWS CLI

파일 시스템을 설명하는 방법

다음 describe-file-systems 예제에서는 지정된 파일 시스템을 설명합니다.

aws efs describe-file-systems \ --file-system-id fs-c7a0456e

출력:

{ "FileSystems": [ { "OwnerId": "123456789012", "CreationToken": "console-d7f56c5f-e433-41ca-8307-9d9c0example", "FileSystemId": "fs-c7a0456e", "FileSystemArn": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/fs-48499b4d", "CreationTime": 1595286880.0, "LifeCycleState": "available", "Name": "my-file-system", "NumberOfMountTargets": 3, "SizeInBytes": { "Value": 6144, "Timestamp": 1600991437.0, "ValueInIA": 0, "ValueInStandard": 6144 }, "PerformanceMode": "generalPurpose", "Encrypted": true, "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/a59b3472-e62c-42e4-adcf-30d92example", "ThroughputMode": "bursting", "Tags": [ { "Key": "Name", "Value": "my-file-system" } ] } ] }

자세한 내용은 Amazon Elastic File System 사용 설명서Managing Amazon EFS file systems를 참조하세요.

PowerShell
Tools for PowerShell V4

예제 1: 리전에서 호출자의 계정이 소유한 모든 파일 시스템 컬렉션을 반환합니다.

Get-EFSFileSystem

출력:

CreationTime : 5/26/2015 4:02:38 PM CreationToken : 1a2bff54-85e0-4747-bd95-7bc172c4f555 FileSystemId : fs-1a2b3c4d LifeCycleState : available Name : NumberOfMountTargets : 0 OwnerId : 123456789012 SizeInBytes : Amazon.ElasticFileSystem.Model.FileSystemSize CreationTime : 5/26/2015 4:06:23 PM CreationToken : 2b4daa14-85e0-4747-bd95-7bc172c4f555 FileSystemId : fs-4d3c2b1a ...

예제 2: 지정된 파일 시스템의 세부 정보를 반환합니다.

Get-EFSFileSystem -FileSystemId fs-1a2b3c4d

예제 3: 파일 시스템이 생성될 때 지정된 멱등성 생성 토큰을 사용하여 파일 시스템의 세부 정보를 반환합니다.

Get-EFSFileSystem -CreationToken 1a2bff54-85e0-4747-bd95-7bc172c4f555
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)DescribeFileSystems을 참조하세요.

Tools for PowerShell V5

예제 1: 리전에서 호출자의 계정이 소유한 모든 파일 시스템 컬렉션을 반환합니다.

Get-EFSFileSystem

출력:

CreationTime : 5/26/2015 4:02:38 PM CreationToken : 1a2bff54-85e0-4747-bd95-7bc172c4f555 FileSystemId : fs-1a2b3c4d LifeCycleState : available Name : NumberOfMountTargets : 0 OwnerId : 123456789012 SizeInBytes : Amazon.ElasticFileSystem.Model.FileSystemSize CreationTime : 5/26/2015 4:06:23 PM CreationToken : 2b4daa14-85e0-4747-bd95-7bc172c4f555 FileSystemId : fs-4d3c2b1a ...

예제 2: 지정된 파일 시스템의 세부 정보를 반환합니다.

Get-EFSFileSystem -FileSystemId fs-1a2b3c4d

예제 3: 파일 시스템이 생성될 때 지정된 멱등성 생성 토큰을 사용하여 파일 시스템의 세부 정보를 반환합니다.

Get-EFSFileSystem -CreationToken 1a2bff54-85e0-4747-bd95-7bc172c4f555
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)DescribeFileSystems을 참조하세요.