

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à.

# Esempi di utilizzo di Shield AWS CLI
<a name="cli_shield_code_examples"></a>

I seguenti esempi di codice mostrano come eseguire azioni e implementare scenari comuni utilizzando AWS Command Line Interface with Shield.

Le *azioni* sono estratti di codice da programmi più grandi e devono essere eseguite nel contesto. Sebbene le azioni mostrino come richiamare le singole funzioni del servizio, è possibile visualizzarle contestualizzate negli scenari correlati.

Ogni esempio include un link al codice sorgente completo, in cui vengono fornite le istruzioni su come configurare ed eseguire il codice nel contesto.

**Topics**
+ [Azioni](#actions)

## Azioni
<a name="actions"></a>

### `associate-drt-log-bucket`
<a name="shield_AssociateDrtLogBucket_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`associate-drt-log-bucket`.

**AWS CLI**  
**Come autorizzare il DRT ad accedere a un bucket Amazon S3**  
L’esempio `associate-drt-log-bucket` seguente crea un’associazione tra il DRT e il bucket S3 specificato. Ciò consente al DRT di accedere al bucket per conto dell’account:  

```
aws shield associate-drt-log-bucket \
    --log-bucket flow-logs-for-website-lb
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Authorize the DDo S Response Team](https://docs.aws.amazon.com/waf/latest/developerguide/authorize-DRT.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [AssociateDrtLogBucket AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/associate-drt-log-bucket.html)*Command Reference.* 

### `associate-drt-role`
<a name="shield_AssociateDrtRole_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`associate-drt-role`.

**AWS CLI**  
**Come autorizzare il DRT a mitigare gli attacchi potenziali per conto dell’utente**  
L’esempio `associate-drt-role` seguente crea un’associazione tra il DRT e il ruolo specificato. Il DRT può utilizzare il ruolo per accedere e gestire l’account.  

```
aws shield associate-drt-role \
    --role-arn arn:aws:iam::123456789012:role/service-role/DrtRole
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Authorize the DDo S Response Team](https://docs.aws.amazon.com/waf/latest/developerguide/authorize-DRT.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [AssociateDrtRole AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/associate-drt-role.html)*Command Reference.* 

### `create-protection`
<a name="shield_CreateProtection_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`create-protection`.

**AWS CLI**  
**Per abilitare la protezione AWS Shield Advanced per una singola AWS risorsa**  
L'`create-protection`esempio seguente abilita la protezione Shield Advanced per la AWS CloudFront distribuzione specificata.  

```
aws shield create-protection \
    --name "Protection for CloudFront distribution" \
    --resource-arn arn:aws:cloudfront::123456789012:distribution/E198WC25FXOWY8
```
Output:  

```
{
    "ProtectionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
}
```
Per ulteriori informazioni, consulta [Specificare le risorse da proteggere](https://docs.aws.amazon.com/waf/latest/developerguide/ddos-choose-resources.html) nella *Guida per gli sviluppatori di AWS Shield Advanced*.  
+  Per i dettagli sull'API, vedere [CreateProtection](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/create-protection.html)in *AWS CLI Command Reference*. 

### `create-subscription`
<a name="shield_CreateSubscription_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`create-subscription`.

**AWS CLI**  
**Per abilitare la protezione AWS Shield Advanced per un account**  
L’esempio `create-subscription` seguente abilita la protezione Shield Advanced per l’account.  

```
aws shield create-subscription
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Getting Started with AWS Shield Advanced](https://docs.aws.amazon.com/waf/latest/developerguide/getting-started-ddos.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [CreateSubscription AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/create-subscription.html)*Command Reference*. 

### `delete-protection`
<a name="shield_DeleteProtection_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`delete-protection`.

**AWS CLI**  
**Per rimuovere la protezione AWS Shield Advanced da una AWS risorsa**  
L'`delete-protection`esempio seguente rimuove la protezione AWS Shield Advanced specificata.  

```
aws shield delete-protection \
    --protection-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Rimuovere AWS Shield Advanced da una AWS risorsa](https://docs.aws.amazon.com/waf/latest/developerguide/remove-protection.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [DeleteProtection AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/delete-protection.html)*Command Reference*. 

### `describe-attack`
<a name="shield_DescribeAttack_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`describe-attack`.

**AWS CLI**  
**Come recuperare una descrizione dettagliata di un attacco**  
L'`describe-attack`esempio seguente mostra i dettagli sull'attacco DDo S con l'ID di attacco specificato. È possibile ottenere un attacco IDs eseguendo il `list-attacks` comando.  

```
aws shield describe-attack --attack-id a1b2c3d4-5678-90ab-cdef-EXAMPLE22222
```
Output:  

```
{
    "Attack": {
        "AttackId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
        "ResourceArn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/testElb",
        "SubResources": [
            {
                "Type": "IP",
                "Id": "192.0.2.2",
                "AttackVectors": [
                    {
                        "VectorType": "SYN_FLOOD",
                        "VectorCounters": [
                            {
                                "Name": "SYN_FLOOD_BPS",
                                "Max": 982184.0,
                                "Average": 982184.0,
                                "Sum": 11786208.0,
                                "N": 12,
                                "Unit": "BPS"
                            }
                        ]
                    }
                ],
                "Counters": []
            },
            {
                "Type": "IP",
                "Id": "192.0.2.3",
                "AttackVectors": [
                    {
                        "VectorType": "SYN_FLOOD",
                        "VectorCounters": [
                            {
                                "Name": "SYN_FLOOD_BPS",
                                "Max": 982184.0,
                                "Average": 982184.0,
                                "Sum": 9821840.0,
                                "N": 10,
                                "Unit": "BPS"
                            }
                        ]
                    }
                ],
                "Counters": []
            },
            {
                "Type": "IP",
                "Id": "192.0.2.4",
                "AttackVectors": [
                    {
                        "VectorType": "SYN_FLOOD",
                        "VectorCounters": [
                            {
                                "Name": "SYN_FLOOD_BPS",
                                "Max": 982184.0,
                                "Average": 982184.0,
                                "Sum": 7857472.0,
                                "N": 8,
                                "Unit": "BPS"
                            }
                        ]
                    }
                ],
                "Counters": []
            },
            {
                "Type": "IP",
                "Id": "192.0.2.5",
                "AttackVectors": [
                    {
                        "VectorType": "SYN_FLOOD",
                        "VectorCounters": [
                            {
                                "Name": "SYN_FLOOD_BPS",
                                "Max": 982184.0,
                                "Average": 982184.0,
                                "Sum": 1964368.0,
                                "N": 2,
                                "Unit": "BPS"
                            }
                        ]
                    }
                ],
                "Counters": []
            },
            {
                "Type": "IP",
                "Id": "2001:DB8::bcde:4321:8765:0:0",
                "AttackVectors": [
                    {
                        "VectorType": "SYN_FLOOD",
                        "VectorCounters": [
                            {
                                "Name": "SYN_FLOOD_BPS",
                                "Max": 982184.0,
                                "Average": 982184.0,
                                "Sum": 1964368.0,
                                "N": 2,
                                "Unit": "BPS"
                            }
                        ]
                    }
                ],
                "Counters": []
            },
            {
                "Type": "IP",
                "Id": "192.0.2.6",
                "AttackVectors": [
                    {
                        "VectorType": "SYN_FLOOD",
                        "VectorCounters": [
                            {
                                "Name": "SYN_FLOOD_BPS",
                                "Max": 982184.0,
                                "Average": 982184.0,
                                "Sum": 1964368.0,
                                "N": 2,
                                "Unit": "BPS"
                            }
                        ]
                    }
                ],
                "Counters": []
            }
        ],
        "StartTime": 1576024927.457,
        "EndTime": 1576025647.457,
        "AttackCounters": [],
        "AttackProperties": [
            {
                "AttackLayer": "NETWORK",
                "AttackPropertyIdentifier": "SOURCE_IP_ADDRESS",
                "TopContributors": [
                    {
                        "Name": "198.51.100.5",
                        "Value": 2024475682
                    },
                    {
                        "Name": "198.51.100.8",
                        "Value": 1311380863
                    },
                    {
                        "Name": "203.0.113.4",
                        "Value": 900599855
                    },
                    {
                        "Name": "198.51.100.4",
                        "Value": 769417366
                    },
                    {
                        "Name": "203.1.113.13",
                        "Value": 757992847
                    }
                ],
                "Unit": "BYTES",
                "Total": 92773354841
            },
            {
                "AttackLayer": "NETWORK",
                "AttackPropertyIdentifier": "SOURCE_COUNTRY",
                "TopContributors": [
                    {
                        "Name": "United States",
                        "Value": 80938161764
                    },
                    {
                        "Name": "Brazil",
                        "Value": 9929864330
                    },
                    {
                        "Name": "Netherlands",
                        "Value": 1635009446
                    },
                    {
                        "Name": "Mexico",
                        "Value": 144832971
                    },
                    {
                        "Name": "Japan",
                        "Value": 45369000
                    }
                ],
                "Unit": "BYTES",
                "Total": 92773354841
            },
            {
                "AttackLayer": "NETWORK",
                "AttackPropertyIdentifier": "SOURCE_ASN",
                "TopContributors": [
                    {
                        "Name": "12345",
                        "Value": 74953625841
                    },
                    {
                        "Name": "12346",
                        "Value": 4440087595
                    },
                    {
                        "Name": "12347",
                        "Value": 1635009446
                    },
                    {
                        "Name": "12348",
                        "Value": 1221230000
                    },
                    {
                        "Name": "12349",
                        "Value": 1199425294
                    }
                ],
                "Unit": "BYTES",
                "Total": 92755479921
            }
        ],
        "Mitigations": []
    }
}
```
Per ulteriori informazioni, consulta Review [ DDoS Incidents](https://docs.aws.amazon.com/waf/latest/developerguide/using-ddos-reports.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [DescribeAttack AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/describe-attack.html)*Command Reference.* 

### `describe-drt-access`
<a name="shield_DescribeDrtAccess_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`describe-drt-access`.

**AWS CLI**  
**Come recuperare una descrizione delle autorizzazioni, il DRT deve mitigare gli attacchi per tuo conto**  
L’esempio `describe-drt-access` seguente recupera le autorizzazioni relative al ruolo e al bucket S3 di cui dispone il DRT, che gli consentono di rispondere a potenziali attacchi per tuo conto.  

```
aws shield describe-drt-access
```
Output:  

```
{
    "RoleArn": "arn:aws:iam::123456789012:role/service-role/DrtRole",
    "LogBucketList": [
        "flow-logs-for-website-lb"
    ]
}
```
Per ulteriori informazioni, consulta [Authorize the DDo S Response Team](https://docs.aws.amazon.com/waf/latest/developerguide/authorize-DRT.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [DescribeDrtAccess AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/describe-drt-access.html)*Command Reference.* 

### `describe-emergency-contact-settings`
<a name="shield_DescribeEmergencyContactSettings_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`describe-emergency-contact-settings`.

**AWS CLI**  
**Come recuperare gli indirizzi e-mail di emergenza archiviati presso il DRT**  
L’esempio `describe-emergency-contact-settings` seguente recupera gli indirizzi e-mail archiviati nel DRT per l’account. Questi sono gli indirizzi che il DRT deve contattare quando risponde a un attacco sospetto.  

```
aws shield describe-emergency-contact-settings
```
Output:  

```
{
    "EmergencyContactList": [
        {
            "EmailAddress": "ops@example.com"
        },
        {
            "EmailAddress": "ddos-notifications@example.com"
       }
    ]
}
```
*Per ulteriori informazioni, consulta How AWS Shield Works< https://docs.aws.amazon.com/waf/ latest/developerguide/ddos -overview.html> nella Shield Advanced Developer Guide.AWS *  
+  *Per i dettagli sull'API, consulta Command Reference. [DescribeEmergencyContactSettings](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/describe-emergency-contact-settings.html)AWS CLI * 

### `describe-protection`
<a name="shield_DescribeProtection_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`describe-protection`.

**AWS CLI**  
**Per recuperare i dettagli per una AWS protezione Shield Advanced**  
L’esempio `describe-protection` seguente visualizza i dettagli sulla protezione Shield Advanced con l’ID specificato. È possibile ottenere protezione IDs eseguendo il `list-protections` comando.  

```
aws shield describe-protection \
    --protection-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
```
Output:  

```
{
    "Protection": {
        "Id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "Name": "1.2.3.4",
        "ResourceArn": "arn:aws:ec2:us-west-2:123456789012:eip-allocation/eipalloc-0ac1537af40742a6d"
    }
}
```
Per ulteriori informazioni, consulta [Specificare le risorse da proteggere](https://docs.aws.amazon.com/waf/latest/developerguide/ddos-choose-resources.html) nella *Guida per gli sviluppatori di AWS Shield Advanced*.  
+  Per i dettagli sull'API, consulta [DescribeProtection AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/describe-protection.html)*Command Reference*. 

### `describe-subscription`
<a name="shield_DescribeSubscription_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`describe-subscription`.

**AWS CLI**  
**Per recuperare i dettagli della protezione AWS Shield Advanced per l'account**  
L’esempio `describe-subscription` seguente mostra i dettagli sulla protezione Shield Advanced fornita per l’account:  

```
aws shield describe-subscription
```
Output:  

```
{
    "Subscription": {
        "StartTime": 1534368978.0,
        "EndTime": 1597613778.0,
        "TimeCommitmentInSeconds": 63244800,
        "AutoRenew": "ENABLED",
        "Limits": [
            {
                "Type": "GLOBAL_ACCELERATOR",
                "Max": 1000
            },
            {
                "Type": "ROUTE53_HOSTED_ZONE",
                "Max": 1000
            },
            {
                "Type": "CF_DISTRIBUTION",
                "Max": 1000
            },
            {
                "Type": "ELB_LOAD_BALANCER",
                "Max": 1000
            },
            {
                "Type": "EC2_ELASTIC_IP_ALLOCATION",
                "Max": 1000
            }
        ]
    }
}
```
Per ulteriori informazioni, consulta [How AWS Shield Works](https://docs.aws.amazon.com/waf/latest/developerguide/ddos-overview.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [DescribeSubscription AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/describe-subscription.html)*Command Reference*. 

### `disassociate-drt-log-bucket`
<a name="shield_DisassociateDrtLogBucket_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`disassociate-drt-log-bucket`.

**AWS CLI**  
**Come rimuovere l’autorizzazione a DRT ad accedere a un bucket Amazon S3 per tuo conto**  
L’esempio `disassociate-drt-log-bucket` seguente rimuove l’associazione tra il DRT e il bucket S3 specificato. Una volta completato questo comando, il DRT non può più accedere al bucket per conto dell’account.  

```
aws shield disassociate-drt-log-bucket \
    --log-bucket flow-logs-for-website-lb
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Authorize the DDo S Response Team](https://docs.aws.amazon.com/waf/latest/developerguide/authorize-DRT.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [DisassociateDrtLogBucket AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/disassociate-drt-log-bucket.html)*Command Reference.* 

### `disassociate-drt-role`
<a name="shield_DisassociateDrtRole_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`disassociate-drt-role`.

**AWS CLI**  
**Come rimuovere l’autorizzazione al DRT per mitigare gli attacchi potenziali per tuo conto**  
L’esempio `disassociate-drt-role` seguente rimuove l’associazione tra il DRT e l’account. Dopo questa chiamata, il DRT non può più accedere o gestire l’account.  

```
aws shield disassociate-drt-role
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [Authorize the DDo S Response Team](https://docs.aws.amazon.com/waf/latest/developerguide/authorize-DRT.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [DisassociateDrtRole AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/disassociate-drt-role.html)*Command Reference.* 

### `get-subscription-state`
<a name="shield_GetSubscriptionState_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`get-subscription-state`.

**AWS CLI**  
**Per recuperare lo stato attuale dell'abbonamento AWS Shield Advanced dell'account**  
L’esempio `get-subscription-state` seguente recupera lo stato della protezione Shield Advanced per l’account.  

```
aws shield get-subscription-state
```
Output:  

```
{
    "SubscriptionState": "ACTIVE"
}
```
Per ulteriori informazioni, consulta [How AWS Shield Works](https://docs.aws.amazon.com/waf/latest/developerguide/ddos-overview.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [GetSubscriptionState AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/get-subscription-state.html)*Command Reference*. 

### `list-attacks`
<a name="shield_ListAttacks_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`list-attacks`.

**AWS CLI**  
**Per recuperare i riepiloghi degli attacchi da Shield Advanced AWS **  
L'`list-attacks`esempio seguente recupera i riepiloghi degli attacchi per la AWS CloudFront distribuzione specificata durante il periodo di tempo specificato. La risposta include un attacco IDs che è possibile fornire al `describe-attack` comando per ottenere informazioni dettagliate su un attacco.  

```
aws shield list-attacks \
    --resource-arns arn:aws:cloudfront::12345678910:distribution/E1PXMP22ZVFAOR \
    --start-time FromInclusive=1529280000,ToExclusive=1529300000
```
Output:  

```
{
    "AttackSummaries": [
        {
            "AttackId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "ResourceArn": "arn:aws:cloudfront::123456789012:distribution/E1PXMP22ZVFAOR",
            "StartTime": 1529280000.0,
            "EndTime": 1529449200.0,
            "AttackVectors": [
                {
                    "VectorType": "SYN_FLOOD"
                }
            ]
        }
    ]
}
```
Per ulteriori informazioni, consulta Review [ DDoS Incidents](https://docs.aws.amazon.com/waf/latest/developerguide/using-ddos-reports.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [ListAttacks AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/list-attacks.html)*Command Reference.* 

### `list-protections`
<a name="shield_ListProtections_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`list-protections`.

**AWS CLI**  
**Per recuperare i riepiloghi della protezione da Shield Advanced AWS **  
L’esempio `list-protections` seguente recupera i riepiloghi delle protezioni abilitate per l’account.  

```
aws shield list-protections
```
Output:  

```
{
    "Protections": [
        {
            "Id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "Name": "Protection for CloudFront distribution",
            "ResourceArn": "arn:aws:cloudfront::123456789012:distribution/E198WC25FXOWY8"
        }
    ]
}
```
Per ulteriori informazioni, consulta [Specificare le risorse da proteggere](https://docs.aws.amazon.com/waf/latest/developerguide/ddos-choose-resources.html) nella *Guida per gli sviluppatori di AWS Shield Advanced*.  
+  Per i dettagli sull'API, consulta *AWS CLI Command [ListProtections](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/list-protections.html)Reference*. 

### `update-emergency-contact-settings`
<a name="shield_UpdateEmergencyContactSettings_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`update-emergency-contact-settings`.

**AWS CLI**  
**Come definire gli indirizzi e-mail di emergenza archiviati presso il DRT**  
L’esempio `update-emergency-contact-settings` seguente definisce due indirizzi e-mail che il DRT deve contattare quando risponde a un attacco sospetto.  

```
aws shield update-emergency-contact-settings \
        --emergency-contact-list EmailAddress=ops@example.com EmailAddress=ddos-notifications@example.com
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [How AWS Shield Works](https://docs.aws.amazon.com/waf/latest/developerguide/ddos-overview.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [UpdateEmergencyContactSettings AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/update-emergency-contact-settings.html)*Command Reference*. 

### `update-subscription`
<a name="shield_UpdateSubscription_cli_topic"></a>

Il seguente esempio di codice mostra come utilizzare`update-subscription`.

**AWS CLI**  
**Per modificare l'abbonamento AWS Shield Advanced dell'account**  
L'`update-subscription`esempio seguente abilita il rinnovo automatico dell'abbonamento AWS Shield Advanced per l'account.  

```
aws shield update-subscription \
    --auto-renew ENABLED
```
Questo comando non produce alcun output.  
Per ulteriori informazioni, consulta [How AWS Shield Works](https://docs.aws.amazon.com/waf/latest/developerguide/ddos-overview.html) nella *AWS Shield Advanced Developer Guide*.  
+  Per i dettagli sull'API, consulta [UpdateSubscription AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/shield/update-subscription.html)*Command Reference*. 