

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 `ListCloudFrontOriginAccessIdentities` con una CLI
<a name="cloudfront_example_cloudfront_ListCloudFrontOriginAccessIdentities_section"></a>

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

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

**AWS CLI**  
**Per elencare le identità di accesso all' CloudFront origine**  
L'esempio seguente ottiene un elenco delle identità di accesso di CloudFront origine (OAIs) presenti nel tuo AWS account:  

```
aws cloudfront list-cloud-front-origin-access-identities
```
Output:  

```
{
    "CloudFrontOriginAccessIdentityList": {
        "Items": [
            {
                "Id": "E74FTE3AEXAMPLE",
                "S3CanonicalUserId": "cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE",
                "Comment": "Example OAI"
            },
            {
                "Id": "EH1HDMBEXAMPLE",
                "S3CanonicalUserId": "1489f6f2e6faacaae7ff64c4c3e6956c24f78788abfc1718c3527c263bf7a17EXAMPLE",
                "Comment": "Test OAI"
            },
            {
                "Id": "E2X2C9TEXAMPLE",
                "S3CanonicalUserId": "cbfeebb915a64749f9be546a45b3fcfd3a31c779673c13c4dd460911ae402c2EXAMPLE",
                "Comment": "Example OAI #2"
            }
        ]
    }
}
```
+  Per i dettagli sull'API, consulta [ListCloudFrontOriginAccessIdentities AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-cloud-front-origin-access-identities.html)*Command Reference.* 

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

**Strumenti per PowerShell V4**  
**Esempio 1: questo esempio restituisce un elenco di identità di accesso di CloudFront origine di Amazon. Poiché il MaxItem parametro - specifica il valore 2, i risultati includono due identità.**  

```
Get-CFCloudFrontOriginAccessIdentityList -MaxItem 2
```
**Output:**  

```
IsTruncated : True
Items       : {E326XXXXXXXXXT, E1YWXXXXXXX9B}
Marker      :
MaxItems    : 2
NextMarker  : E1YXXXXXXXXX9B
Quantity    : 2
```
+  Per i dettagli sull'API, vedere [ListCloudFrontOriginAccessIdentities](https://docs.aws.amazon.com/powershell/v4/reference)in *AWS Strumenti per PowerShell Cmdlet Reference* (V4). 

**Strumenti per V5 PowerShell **  
**Esempio 1: questo esempio restituisce un elenco di identità di accesso di CloudFront origine di Amazon. Poiché il MaxItem parametro - specifica il valore 2, i risultati includono due identità.**  

```
Get-CFCloudFrontOriginAccessIdentityList -MaxItem 2
```
**Output:**  

```
IsTruncated : True
Items       : {E326XXXXXXXXXT, E1YWXXXXXXX9B}
Marker      :
MaxItems    : 2
NextMarker  : E1YXXXXXXXXX9B
Quantity    : 2
```
+  Per i dettagli sull'API, vedere [ListCloudFrontOriginAccessIdentities](https://docs.aws.amazon.com/powershell/v5/reference)in *AWS Strumenti per PowerShell Cmdlet Reference* (V5). 

------