

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

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

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

**AWS CLI**  
**Per descrivere tutti gli attributi del tuo account AWS **  
Questo esempio descrive gli attributi del tuo AWS account.  
Comando:  

```
aws ec2 describe-account-attributes
```
Output:  

```
{
    "AccountAttributes": [
        {
            "AttributeName": "vpc-max-security-groups-per-interface",
            "AttributeValues": [
                {
                    "AttributeValue": "5"
                }
            ]
        },
        {
            "AttributeName": "max-instances",
            "AttributeValues": [
                {
                    "AttributeValue": "20"
                }
            ]
        },
        {
            "AttributeName": "supported-platforms",
            "AttributeValues": [
                {
                    "AttributeValue": "EC2"
                },
                {
                    "AttributeValue": "VPC"
                }
            ]
        },
        {
            "AttributeName": "default-vpc",
            "AttributeValues": [
                {
                    "AttributeValue": "none"
                }
            ]
        },
        {
            "AttributeName": "max-elastic-ips",
            "AttributeValues": [
                {
                    "AttributeValue": "5"
                }
            ]
        },
        {
            "AttributeName": "vpc-max-elastic-ips",
            "AttributeValues": [
                {
                    "AttributeValue": "5"
                }
            ]
        }
    ]
}
```
**Per descrivere un singolo attributo del tuo AWS account**  
Questo esempio descrive l'`supported-platforms`attributo del tuo AWS account.  
Comando:  

```
aws ec2 describe-account-attributes --attribute-names supported-platforms
```
Output:  

```
{
    "AccountAttributes": [
        {
            "AttributeName": "supported-platforms",
            "AttributeValues": [
                {
                    "AttributeValue": "EC2"
                },
                {
                    "AttributeValue": "VPC"
                }
            ]
        }
    ]
}
```
+  Per i dettagli sull'API, consulta [DescribeAccountAttributes AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-account-attributes.html)*Command Reference*. 

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

**Strumenti per PowerShell V4**  
**Esempio 1: questo esempio descrive se è possibile avviare istanze in EC2-Classic ed EC2-VPC nella Regione o solo in EC2-VPC.**  

```
(Get-EC2AccountAttribute -AttributeName supported-platforms).AttributeValues
```
**Output:**  

```
AttributeValue
--------------
EC2
VPC
```
**Esempio 2: questo esempio descrive il VPC predefinito o restituisce “none” se non si dispone di un VPC predefinito nella Regione.**  

```
(Get-EC2AccountAttribute -AttributeName default-vpc).AttributeValues
```
**Output:**  

```
AttributeValue
--------------
vpc-12345678
```
**Esempio 3: questo esempio descrive il numero massimo di istanze on demand che è possibile eseguire.**  

```
(Get-EC2AccountAttribute -AttributeName max-instances).AttributeValues
```
**Output:**  

```
AttributeValue
--------------
20
```
+  Per i dettagli sull'API, vedere [DescribeAccountAttributes](https://docs.aws.amazon.com/powershell/v4/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V4). 

**Strumenti per V5 PowerShell **  
**Esempio 1: questo esempio descrive se è possibile avviare istanze in EC2-Classic ed EC2-VPC nella Regione o solo in EC2-VPC.**  

```
(Get-EC2AccountAttribute -AttributeName supported-platforms).AttributeValues
```
**Output:**  

```
AttributeValue
--------------
EC2
VPC
```
**Esempio 2: questo esempio descrive il VPC predefinito o restituisce “none” se non si dispone di un VPC predefinito nella Regione.**  

```
(Get-EC2AccountAttribute -AttributeName default-vpc).AttributeValues
```
**Output:**  

```
AttributeValue
--------------
vpc-12345678
```
**Esempio 3: questo esempio descrive il numero massimo di istanze on demand che è possibile eseguire.**  

```
(Get-EC2AccountAttribute -AttributeName max-instances).AttributeValues
```
**Output:**  

```
AttributeValue
--------------
20
```
+  Per i dettagli sull'API, vedere [DescribeAccountAttributes](https://docs.aws.amazon.com/powershell/v5/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V5). 

------