

Doc AWS SDK Examples GitHub リポジトリには、他にも SDK の例があります。 [AWS](https://github.com/awsdocs/aws-doc-sdk-examples)

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# CLI で `ListBucketInventoryConfigurations` を使用する
<a name="s3_example_s3_ListBucketInventoryConfigurations_section"></a>

次のサンプルコードは、`ListBucketInventoryConfigurations` を使用する方法を説明しています。

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

**AWS CLI**  
**バケットのインベントリ設定のリストを取得するには**  
次の `list-bucket-inventory-configurations` の例では、指定したバケットのインベントリ設定をリスト表示します。  

```
aws s3api list-bucket-inventory-configurations \
    --bucket amzn-s3-demo-bucket
```
出力:  

```
{
    "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
}
```
+  API の詳細については、「**AWS CLI コマンドリファレンス」の「[ListBucketInventoryConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/list-bucket-inventory-configurations.html)」を参照してください。

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

**Tools for PowerShell V4**  
**例 1: このコマンドは、指定した S3 バケットの最初の 100 つのインベントリ設定を返します。**  

```
Get-S3BucketInventoryConfigurationList -BucketName 'amzn-s3-demo-bucket'
```
+  API の詳細については、「*AWS Tools for PowerShell コマンドレットリファレンス (V4)*」の「[ListBucketInventoryConfigurations](https://docs.aws.amazon.com/powershell/v4/reference)」を参照してください。

**Tools for PowerShell V5**  
**例 1: このコマンドは、指定した S3 バケットの最初の 100 つのインベントリ設定を返します。**  

```
Get-S3BucketInventoryConfigurationList -BucketName 'amzn-s3-demo-bucket'
```
+  API の詳細については、**AWS Tools for PowerShell コマンドレットリファレンス (V5) の「[ListBucketInventoryConfigurations](https://docs.aws.amazon.com/powershell/v5/reference)」を参照してください。

------