

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh [SDK AWS Doc](https://github.com/awsdocs/aws-doc-sdk-examples). GitHub 

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Gunakan `CreateFileSystem` dengan CLI
<a name="efs_example_efs_CreateFileSystem_section"></a>

Contoh kode berikut menunjukkan cara menggunakan`CreateFileSystem`.

------
#### [ CLI ]

**AWS CLI**  
**Untuk membuat sistem file terenkripsi**  
`create-file-system`Contoh berikut membuat sistem file terenkripsi menggunakan CMK default. Itu juga menambahkan tag`Name=my-file-system`.  

```
aws efs create-file-system \
    --performance-mode generalPurpose \
    --throughput-mode bursting \
    --encrypted \
    --tags Key=Name,Value=my-file-system
```
Output:  

```
{
    "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": "creating",
    "Name": "my-file-system",
    "NumberOfMountTargets": 0,
    "SizeInBytes": {
        "Value": 0,
        "ValueInIA": 0,
        "ValueInStandard": 0
    },
    "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"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Membuat sistem file Amazon EFS](https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html) di *Panduan Pengguna Amazon Elastic File System*.  
+  Untuk detail API, lihat [CreateFileSystem](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/efs/create-file-system.html)di *Referensi AWS CLI Perintah*. 

------
#### [ PowerShell ]

**Alat untuk PowerShell V4**  
**Contoh 1: Membuat sistem file baru yang kosong. Token yang digunakan untuk memastikan pembuatan idempoten akan dihasilkan secara otomatis dan dapat diakses dari `CreationToken` anggota objek yang dikembalikan.**  

```
New-EFSFileSystem
```
**Output:**  

```
CreationTime         : 5/26/2015 4:02:38 PM
CreationToken        : 1a2bff54-85e0-4747-bd95-7bc172c4f555
FileSystemId         : fs-1a2b3c4d
LifeCycleState       : creating
Name                 :
NumberOfMountTargets : 0
OwnerId              : 123456789012
SizeInBytes          : Amazon.ElasticFileSystem.Model.FileSystemSize
```
**Contoh 2: Membuat sistem file baru yang kosong menggunakan token khusus untuk memastikan pembuatan idempoten.**  

```
New-EFSFileSystem -CreationToken "MyUniqueToken"
```
+  Untuk detail API, lihat [CreateFileSystem](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

**Alat untuk PowerShell V5**  
**Contoh 1: Membuat sistem file baru yang kosong. Token yang digunakan untuk memastikan pembuatan idempoten akan dihasilkan secara otomatis dan dapat diakses dari `CreationToken` anggota objek yang dikembalikan.**  

```
New-EFSFileSystem
```
**Output:**  

```
CreationTime         : 5/26/2015 4:02:38 PM
CreationToken        : 1a2bff54-85e0-4747-bd95-7bc172c4f555
FileSystemId         : fs-1a2b3c4d
LifeCycleState       : creating
Name                 :
NumberOfMountTargets : 0
OwnerId              : 123456789012
SizeInBytes          : Amazon.ElasticFileSystem.Model.FileSystemSize
```
**Contoh 2: Membuat sistem file baru yang kosong menggunakan token khusus untuk memastikan pembuatan idempoten.**  

```
New-EFSFileSystem -CreationToken "MyUniqueToken"
```
+  Untuk detail API, lihat [CreateFileSystem](https://docs.aws.amazon.com/powershell/v5/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V5)*. 

------