

Sono disponibili altri esempi AWS SDK nel repository [AWS Doc SDK](https://github.com/awsdocs/aws-doc-sdk-examples) Examples. GitHub 

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# Utilizzare `GetBucketInventoryConfiguration` con una CLI
<a name="s3_example_s3_GetBucketInventoryConfiguration_section"></a>

Gli esempi di codice seguenti mostrano come utilizzare `GetBucketInventoryConfiguration`.

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

**AWS CLI**  
**Come recuperare la configurazione di inventario per un bucket**  
L’esempio `get-bucket-inventory-configuration` seguente recupera la configurazione dell’inventario con ID `1` per il bucket specificato.  

```
aws s3api get-bucket-inventory-configuration \
    --bucket amzn-s3-demo-bucket \
    --id 1
```
Output:  

```
{
    "InventoryConfiguration": {
        "IsEnabled": true,
        "Destination": {
            "S3BucketDestination": {
                "Format": "ORC",
                "Bucket": "arn:aws:s3:::amzn-s3-demo-bucket",
                "AccountId": "123456789012"
            }
        },
        "IncludedObjectVersions": "Current",
        "Id": "1",
        "Schedule": {
            "Frequency": "Weekly"
        }
    }
}
```
+  Per i dettagli sull'API, consulta [GetBucketInventoryConfiguration AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/get-bucket-inventory-configuration.html)*Command Reference.* 

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

**Strumenti per PowerShell V4**  
**Esempio 1: questo comando restituisce i dettagli dell’inventario denominato “testinventory” per il bucket S3 specificato.**  

```
Get-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testinventory'
```
+  Per i dettagli sull'API, vedere [GetBucketInventoryConfiguration](https://docs.aws.amazon.com/powershell/v4/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V4). 

**Strumenti per V5 PowerShell **  
**Esempio 1: questo comando restituisce i dettagli dell’inventario denominato “testinventory” per il bucket S3 specificato.**  

```
Get-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testinventory'
```
+  Per i dettagli sull'API, vedere [GetBucketInventoryConfiguration](https://docs.aws.amazon.com/powershell/v5/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V5). 

------