

# Utilizar `ListBucketInventoryConfigurations` con una CLI
<a name="s3_example_s3_ListBucketInventoryConfigurations_section"></a>

Los siguientes ejemplos de código muestran cómo utilizar `ListBucketInventoryConfigurations`.

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

**AWS CLI**  
**Recuperar una lista de las configuraciones de inventario de un bucket**  
En el siguiente ejemplo de `list-bucket-inventory-configurations`, se enumeran las configuraciones de inventario del bucket especificado.  

```
aws s3api list-bucket-inventory-configurations \
    --bucket {{amzn-s3-demo-bucket}}
```
Salida:  

```
{
    "InventoryConfigurationList": [
        {
            "IsEnabled": true,
            "Destination": {
                "S3BucketDestination": {
                    "Format": "ORC",
                    "Bucket": "arn:aws:s3:::amzn-s3-demo-bucket",
                    "AccountId": "123456789012"
                }
            },
            "IncludedObjectVersions": "Current",
            "Id": "1",
            "Schedule": {
                "Frequency": "Weekly"
            }
        },
        {
            "IsEnabled": true,
            "Destination": {
                "S3BucketDestination": {
                    "Format": "CSV",
                    "Bucket": "arn:aws:s3:::amzn-s3-demo-bucket",
                    "AccountId": "123456789012"
                }
            },
            "IncludedObjectVersions": "Current",
            "Id": "2",
            "Schedule": {
                "Frequency": "Daily"
            }
        }
    ],
    "IsTruncated": false
}
```
+  Para obtener información sobre la API, consulte [ListBucketInventoryConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/list-bucket-inventory-configurations.html) en la *Referencia de comandos de la AWS CLI*. 

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

**Herramientas para PowerShell V4**  
**Ejemplo 1: este comando devuelve las primeras 100 configuraciones de inventario del bucket de S3 indicado.**  

```
Get-S3BucketInventoryConfigurationList -BucketName 'amzn-s3-demo-bucket'
```
+  Para obtener información sobre la API, consulte [ListBucketInventoryConfigurations](https://docs.aws.amazon.com/powershell/v4/reference) en la *Referencia de cmdlets de Herramientas de AWS para PowerShell (V4)*. 

**Herramientas para PowerShell V5**  
**Ejemplo 1: este comando devuelve las primeras 100 configuraciones de inventario del bucket de S3 indicado.**  

```
Get-S3BucketInventoryConfigurationList -BucketName 'amzn-s3-demo-bucket'
```
+  Para obtener información sobre la API, consulte [ListBucketInventoryConfigurations](https://docs.aws.amazon.com/powershell/v5/reference) en la *Referencia de cmdlets de Herramientas de AWS para PowerShell (V5)*. 

------

Para obtener una lista completa de las guías para desarrolladores de AWS SDK y ejemplos de código, consulte [Desarrollo con Amazon S3 mediante los SDK de AWS](sdk-general-information-section.md). En este tema también se incluye información sobre cómo empezar a utilizar el SDK y detalles sobre sus versiones anteriores.