

# AWS IoT Wireless examples using AWS CLI
<a name="cli_iot-wireless_code_examples"></a>

次のコード例では、AWS IoT Wireless で AWS Command Line Interface を使用してアクションを実行し、一般的なシナリオを実装する方法を示しています。

*アクション*はより大きなプログラムからのコードの抜粋であり、コンテキスト内で実行する必要があります。アクションは個々のサービス機能を呼び出す方法を示していますが、コンテキスト内のアクションは、関連するシナリオで確認できます。

各例には完全なソースコードへのリンクが含まれており、コードの設定方法と実行方法に関する手順を確認できます。

**Topics**
+ [アクション](#actions)

## アクション
<a name="actions"></a>

### `associate-aws-account-with-partner-account`
<a name="iot-wireless_AssociateAwsAccountWithPartnerAccount_cli_topic"></a>

次のコード例は、`associate-aws-account-with-partner-account` を使用する方法を示しています。

**AWS CLI**  
**パートナーアカウントを AWS アカウントに関連付けるには**  
次の `associate-aws-account-with-partner-account` の例では、次の Sidewalk アカウントの認証情報を AWS アカウントに関連付けます。  

```
aws iotwireless associate-aws-account-with-partner-account \
    --sidewalk AmazonId="12345678901234",AppServerPrivateKey="a123b45c6d78e9f012a34cd5e6a7890b12c3d45e6f78a1b234c56d7e890a1234"
```
出力:  

```
{
    "Sidewalk": {
        "AmazonId": "12345678901234",
        "AppServerPrivateKey": "a123b45c6d78e9f012a34cd5e6a7890b12c3d45e6f78a1b234c56d7e890a1234"
    }
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[Amazon Sidewalk Integration for AWS IoT Core](https://docs.aws.amazon.com/iot/latest/developerguide/iot-sidewalk.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[AssociateAwsAccountWithPartnerAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/associate-aws-account-with-partner-account.html)」を参照してください。

### `associate-wireless-device-with-thing`
<a name="iot-wireless_AssociateWirelessDeviceWithThing_cli_topic"></a>

次のコード例は、`associate-wireless-device-with-thing` を使用する方法を示しています。

**AWS CLI**  
**モノをワイヤレスデバイスに関連付けるには**  
次の `associate-wireless-device-with-thing` の例では、指定された ID を持つワイヤレスデバイスにモノを関連付けます。  

```
aws iotwireless associate-wireless-device-with-thing \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d" \
    --thing-arn "arn:aws:iot:us-east-1:123456789012:thing/MyIoTWirelessThing"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN にゲートウェイとワイヤレスデバイスを追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-onboard-devices.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[AssociateWirelessDeviceWithThing](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/associate-wireless-device-with-thing.html)」を参照してください。

### `associate-wireless-gateway-with-certificate`
<a name="iot-wireless_AssociateWirelessGatewayWithCertificate_cli_topic"></a>

次のコード例は、`associate-wireless-gateway-with-certificate` を使用する方法を示しています。

**AWS CLI**  
**証明書をワイヤレスゲートウェイに関連付けるには**  
次の `associate-wireless-gateway-with-certificate` は、ワイヤレスゲートウェイを証明書に関連付けます。  

```
aws iotwireless associate-wireless-gateway-with-certificate \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d" \
    --iot-certificate-id "a123b45c6d78e9f012a34cd5e6a7890b12c3d45e6f78a1b234c56d7e890a1234"
```
出力:  

```
{
    "IotCertificateId": "a123b45c6d78e9f012a34cd5e6a7890b12c3d45e6f78a1b234c56d7e890a1234"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN にゲートウェイとワイヤレスデバイスを追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-onboard-devices.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[AssociateWirelessGatewayWithCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/associate-wireless-gateway-with-certificate.html)」を参照してください。

### `associate-wireless-gateway-with-thing`
<a name="iot-wireless_AssociateWirelessGatewayWithThing_cli_topic"></a>

次のコード例は、`associate-wireless-gateway-with-thing` を使用する方法を示しています。

**AWS CLI**  
**モノをワイヤレスゲートウェイに関連付けるには**  
次の `associate-wireless-gateway-with-thing` の例では、モノをワイヤレスゲートウェイに関連付けます。  

```
aws iotwireless associate-wireless-gateway-with-thing \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d" \
    --thing-arn "arn:aws:iot:us-east-1:123456789012:thing/MyIoTWirelessThing"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN にゲートウェイとワイヤレスデバイスを追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-onboard-devices.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[AssociateWirelessGatewayWithThing](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/associate-wireless-gateway-with-thing.html)」を参照してください。

### `create-destination`
<a name="iot-wireless_CreateDestination_cli_topic"></a>

次のコード例は、`create-destination` を使用する方法を示しています。

**AWS CLI**  
**IoT ワイヤレス送信先を作成するには**  
次の `create-destination` の例では、デバイスメッセージを AWS IoT ルールにマッピングするための送信先を作成します。このコマンドを実行する前に、AWS IoT ルールへのデータ送信に必要なアクセス許可を AWS IoT Core for LoRaWAN に付与する IAM ロールを作成しておく必要があります。  

```
aws iotwireless create-destination \
    --name IoTWirelessDestination \
    --expression-type RuleName \
    --expression IoTWirelessRule \
    --role-arn arn:aws:iam::123456789012:role/IoTWirelessDestinationRole
```
出力:  

```
{
    "Arn": "arn:aws:iotwireless:us-east-1:123456789012:Destination/IoTWirelessDestination",
    "Name": "IoTWirelessDestination"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN にデスティネーションを追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-create-destinations.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateDestination](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/create-destination.html)」を参照してください。

### `create-device-profile`
<a name="iot-wireless_CreateDeviceProfile_cli_topic"></a>

次のコード例は、`create-device-profile` を使用する方法を示しています。

**AWS CLI**  
**新しいデバイスプロファイルを作成するには**  
次の `create-device-profile` の例では、新しい IoT ワイヤレスデバイスプロファイルを作成します。  

```
aws iotwireless create-device-profile
```
出力:  

```
{
    "Arn": "arn:aws:iotwireless:us-east-1:123456789012:DeviceProfile/12345678-a1b2-3c45-67d8-e90fa1b2c34d",
    "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[プロファイルを AWS IoT Core for LoRaWAN に追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-define-profiles.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateDeviceProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/create-device-profile.html)」を参照してください。

### `create-service-profile`
<a name="iot-wireless_CreateServiceProfile_cli_topic"></a>

次のコード例は、`create-service-profile` を使用する方法を示しています。

**AWS CLI**  
**新しいサービスプロファイルを作成するには**  
次の `create-service-profile` の例では、新しい IoT ワイヤレスサービスプロファイルを作成します。  

```
aws iotwireless create-service-profile
```
出力:  

```
{
    "Arn": "arn:aws:iotwireless:us-east-1:123456789012:ServiceProfile/12345678-a1b2-3c45-67d8-e90fa1b2c34d",
    "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[プロファイルを AWS IoT Core for LoRaWAN に追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-define-profiles.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateServiceProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/create-service-profile.html)」を参照してください。

### `create-wireless-device`
<a name="iot-wireless_CreateWirelessDevice_cli_topic"></a>

次のコード例は、`create-wireless-device` を使用する方法を示しています。

**AWS CLI**  
**IoT ワイヤレスデバイスを作成するには**  
次の `create-wireless-device` の例では、LoRaWAN タイプのワイヤレスデバイスリソースを作成します。  

```
aws iotwireless create-wireless-device \
    --cli-input-json file://input.json
```
`input.json` の内容:  

```
{
    "Description": "My LoRaWAN wireless device"
    "DestinationName": "IoTWirelessDestination"
    "LoRaWAN": {
        "DeviceProfileId": "ab0c23d3-b001-45ef-6a01-2bc3de4f5333",
        "ServiceProfileId": "fe98dc76-cd12-001e-2d34-5550432da100",
        "OtaaV1_1": {
            "AppKey": "3f4ca100e2fc675ea123f4eb12c4a012",
            "JoinEui": "b4c231a359bc2e3d",
            "NwkKey": "01c3f004a2d6efffe32c4eda14bcd2b4"
        },
        "DevEui": "ac12efc654d23fc2"
    },
    "Name": "SampleIoTWirelessThing"
    "Type": LoRaWAN
}
```
出力:  

```
{
    "Arn": "arn:aws:iotwireless:us-east-1:123456789012:WirelessDevice/1ffd32c8-8130-4194-96df-622f072a315f",
    "Id": "1ffd32c8-8130-4194-96df-622f072a315f"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateWirelessDevice](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/create-wireless-device.html)」を参照してください。

### `create-wireless-gateway-task-definition`
<a name="iot-wireless_CreateWirelessGatewayTaskDefinition_cli_topic"></a>

次のコード例は、`create-wireless-gateway-task-definition` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイタスク定義を作成するには**  
次の `create-wireless-gateway-task-definition` の例では、指定された現在のバージョンを持つすべてのゲートウェイに対して、このタスク定義を使用してタスクを自動的に作成します。  

```
aws iotwireless create-wireless-gateway-task-definition \
    --cli-input-json file://input.json
```
`input.json` の内容:  

```
{
    "AutoCreateTasks": true,
    "Name": "TestAutoUpdate",
    "Update":{
        "UpdateDataSource" : "s3://cupsalphagafirmwarebin/station",
        "UpdateDataRole" : "arn:aws:iam::001234567890:role/SDK_Test_Role",
        "LoRaWAN" :{
            "CurrentVersion" :{
                "PackageVersion" : "1.0.0",
                "Station" : "2.0.5",
                "Model" : "linux"
            },
            "UpdateVersion" :{
                "PackageVersion" : "1.0.1",
                "Station" : "2.0.5",
                "Model" : "minihub"
            }
        }
    }
}
```
出力:  

```
{
    "Id": "b7d3baad-25c7-35e7-a4e1-1683a0d61da9"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateWirelessGatewayTaskDefinition](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/create-wireless-gateway-task-definition.html)」を参照してください。

### `create-wireless-gateway-task`
<a name="iot-wireless_CreateWirelessGatewayTask_cli_topic"></a>

次のコード例は、`create-wireless-gateway-task` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイのタスクを作成するには**  
次の `create-wireless-gateway-task` の例では、ワイヤレスゲートウェイのタスクを作成します。  

```
aws iotwireless create-wireless-gateway-task \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d" \
    --wireless-gateway-task-definition-id "aa000102-0304-b0cd-ef56-a1b23cde456a"
```
出力:  

```
{
    "WirelessGatewayTaskDefinitionId": "aa204003-0604-30fb-ac82-a4f95aaf450a",
    "Status": "Success"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateWirelessGatewayTask](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/create-wireless-gateway-task.html)」を参照してください。

### `create-wireless-gateway`
<a name="iot-wireless_CreateWirelessGateway_cli_topic"></a>

次のコード例は、`create-wireless-gateway` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイを作成するには**  
次の `create-wireless-gateway` の例では、ワイヤレス LoRaWAN デバイスゲートウェイを作成します。  

```
aws iotwireless create-wireless-gateway \
    --lorawan GatewayEui="a1b2c3d4567890ab",RfRegion="US915" \
    --name "myFirstLoRaWANGateway" \
    --description "Using my first LoRaWAN gateway"
```
出力:  

```
{
    "Arn": "arn:aws:iotwireless:us-east-1:123456789012:WirelessGateway/12345678-a1b2-3c45-67d8-e90fa1b2c34d",
    "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateWirelessGateway](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/create-wireless-gateway.html)」を参照してください。

### `delete-destination`
<a name="iot-wireless_DeleteDestination_cli_topic"></a>

次のコード例は、`delete-destination` を使用する方法を示しています。

**AWS CLI**  
**IoT ワイヤレス送信先を削除するには**  
次の `delete-destination` の例では、作成した `IoTWirelessDestination` という名前のワイヤレス送信先リソースを削除します。  

```
aws iotwireless delete-destination \
    --name "IoTWirelessDestination"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN に送信先を追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-create-destinations.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteDestination](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/delete-destination.html)」を参照してください。

### `delete-device-profile`
<a name="iot-wireless_DeleteDeviceProfile_cli_topic"></a>

次のコード例は、`delete-device-profile` を使用する方法を示しています。

**AWS CLI**  
**デバイスプロファイルを削除するには**  
次の `delete-device-profile` の例では、指定された ID を持つ、自分で作成したデバイスプロファイルを削除します。  

```
aws iotwireless delete-device-profile \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[プロファイルを AWS IoT Core for LoRaWAN に追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-define-profiles.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteDeviceProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/delete-device-profile.html)」を参照してください。

### `delete-service-profile`
<a name="iot-wireless_DeleteServiceProfile_cli_topic"></a>

次のコード例は、`delete-service-profile` を使用する方法を示しています。

**AWS CLI**  
**サービスプロファイルを削除するには**  
次の `delete-service-profile` の例では、指定された ID を持つ、自分で作成したサービスプロファイルを削除します。  

```
aws iotwireless delete-service-profile \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[プロファイルを AWS IoT Core for LoRaWAN に追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-define-profiles.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteServiceProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/delete-service-profile.html)」を参照してください。

### `delete-wireless-device`
<a name="iot-wireless_DeleteWirelessDevice_cli_topic"></a>

次のコード例は、`delete-wireless-device` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスデバイスを削除するには**  
次の `delete-wireless-device` の例では、指定された ID を持つワイヤレスデバイスを削除します。  

```
aws iotwireless delete-wireless-device \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteWirelessDevice](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/delete-wireless-device.html)」を参照してください。

### `delete-wireless-gateway-task-definition`
<a name="iot-wireless_DeleteWirelessGatewayTaskDefinition_cli_topic"></a>

次のコード例は、`delete-wireless-gateway-task-definition` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイタスク定義を削除するには**  
次の `delete-wireless-gateway-task-definition` の例では、次の ID で作成したワイヤレスゲートウェイタスク定義を削除します。  

```
aws iotwireless delete-wireless-gateway-task-definition \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteWirelessGatewayTaskDefinition](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/delete-wireless-gateway-task-definition.html)」を参照してください。

### `delete-wireless-gateway-task`
<a name="iot-wireless_DeleteWirelessGatewayTask_cli_topic"></a>

次のコード例は、`delete-wireless-gateway-task` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイタスクを削除するには**  
次の `delete-wireless-gateway-task` の例では、指定された ID を持つワイヤレスゲートウェイタスクを削除します。  

```
aws iotwireless delete-wireless-gateway-task \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteWirelessGatewayTask](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/delete-wireless-gateway-task.html)」を参照してください。

### `delete-wireless-gateway`
<a name="iot-wireless_DeleteWirelessGateway_cli_topic"></a>

次のコード例は、`delete-wireless-gateway` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイを削除するには**  
次の `delete-wireless-gateway` の例では、指定された ID を持つワイヤレスゲートウェイを削除します。  

```
aws iotwireless delete-wireless-gateway \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteWirelessGateway](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/delete-wireless-gateway.html)」を参照してください。

### `disassociate-aws-account-from-partner-account`
<a name="iot-wireless_DisassociateAwsAccountFromPartnerAccount_cli_topic"></a>

次のコード例は、`disassociate-aws-account-from-partner-account` を使用する方法を示しています。

**AWS CLI**  
**AWS アカウントからパートナーアカウントの関連付けを解除するには**  
次の `disassociate-aws-account-from-partner-account` の例では、現在関連付けられている AWS アカウントからパートナーアカウントの関連付けを解除します。  

```
aws iotwireless disassociate-aws-account-from-partner-account \
    --partner-account-id "12345678901234" \
    --partner-type "Sidewalk"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN にゲートウェイとワイヤレスデバイスを追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-onboard-devices.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DisassociateAwsAccountFromPartnerAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/disassociate-aws-account-from-partner-account.html)」を参照してください。

### `disassociate-wireless-device-from-thing`
<a name="iot-wireless_DisassociateWirelessDeviceFromThing_cli_topic"></a>

次のコード例は、`disassociate-wireless-device-from-thing` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスデバイスからモノの関連付けを解除するには**  
次の `disassociate-wireless-device-from-thing` の例では、現在関連付けられているモノからワイヤレスデバイスの関連付けを解除します。  

```
aws iotwireless disassociate-wireless-device-from-thing \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN にゲートウェイとワイヤレスデバイスを追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-onboard-devices.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DisassociateWirelessDeviceFromThing](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/disassociate-wireless-device-from-thing.html)」を参照してください。

### `disassociate-wireless-gateway-from-certificate`
<a name="iot-wireless_DisassociateWirelessGatewayFromCertificate_cli_topic"></a>

次のコード例は、`disassociate-wireless-gateway-from-certificate` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイから証明書の関連付けを解除するには**  
次の `disassociate-wireless-gateway-from-certificate` は、現在関連付けられている証明書からワイヤレスゲートウェイの関連付けを解除します。  

```
aws iotwireless disassociate-wireless-gateway-from-certificate \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN にゲートウェイとワイヤレスデバイスを追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-onboard-devices.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DisassociateWirelessGatewayFromCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/disassociate-wireless-gateway-from-certificate.html)」を参照してください。

### `disassociate-wireless-gateway-from-thing`
<a name="iot-wireless_DisassociateWirelessGatewayFromThing_cli_topic"></a>

次のコード例は、`disassociate-wireless-gateway-from-thing` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイからモノの関連付けを解除するには**  
次の `disassociate-wireless-gateway-from-thing` の例では、現在関連付けられているモノからワイヤレスゲートウェイの関連付け解除します。  

```
aws iotwireless disassociate-wireless-gateway-from-thing \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN にゲートウェイとワイヤレスデバイスを追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-onboard-devices.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DisassociateWirelessGatewayFromThing](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/disassociate-wireless-gateway-from-thing.html)」を参照してください。

### `get-destination`
<a name="iot-wireless_GetDestination_cli_topic"></a>

次のコード例は、`get-destination` を使用する方法を示しています。

**AWS CLI**  
**IoT ワイヤレス送信先に関する情報を取得するには**  
次の `get-destination` の例では、作成した `IoTWirelessDestination` という名前の送信先リソースに関する情報を取得します。  

```
aws iotwireless get-destination \
    --name "IoTWirelessDestination"
```
出力:  

```
{
    "Arn": "arn:aws:iotwireless:us-east-1:123456789012:Destination/IoTWirelessDestination",
    "Name": "IoTWirelessDestination",
    "Expression": "IoTWirelessRule",
    "ExpressionType": "RuleName",
    "RoleArn": "arn:aws:iam::123456789012:role/IoTWirelessDestinationRole"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN に送信先を追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-create-destinations.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetDestination](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-destination.html)」を参照してください。

### `get-device-profile`
<a name="iot-wireless_GetDeviceProfile_cli_topic"></a>

次のコード例は、`get-device-profile` を使用する方法を示しています。

**AWS CLI**  
**デバイスプロファイルに関する情報を取得するには**  
次の `get-device-profile` の例では、指定された ID を持つ、自分で作成したデバイスプロファイルに関する情報を取得します。  

```
aws iotwireless get-device-profile \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
出力:  

```
{
    "Arn": "arn:aws:iotwireless:us-east-1:123456789012:DeviceProfile/12345678-a1b2-3c45-67d8-e90fa1b2c34d",
    "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d",
    "LoRaWAN": {
    "MacVersion": "1.0.3",
    "MaxDutyCycle": 10,
    "Supports32BitFCnt": false,
    "RegParamsRevision": "RP002-1.0.1",
    "SupportsJoin": true,
    "RfRegion": "US915",
    "MaxEirp": 13,
    "SupportsClassB": false,
    "SupportsClassC": false
    }
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[プロファイルを AWS IoT Core for LoRaWAN に追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-define-profiles.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetDeviceProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-device-profile.html)」を参照してください。

### `get-partner-account`
<a name="iot-wireless_GetPartnerAccount_cli_topic"></a>

次のコード例は、`get-partner-account` を使用する方法を示しています。

**AWS CLI**  
**パートナーアカウントの情報を取得するには**  
次の `get-partner-account` の例では、次の ID を持つ Sidewalk アカウントに関する情報を取得します。  

```
aws iotwireless get-partner-account \
    --partner-account-id "12345678901234" \
    --partner-type "Sidewalk"
```
出力:  

```
{
    "Sidewalk": {
        "AmazonId": "12345678901234",
        "Fingerprint": "a123b45c6d78e9f012a34cd5e6a7890b12c3d45e6f78a1b234c56d7e890a1234"
    },
    "AccountLinked": false
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[Amazon Sidewalk Integration for AWS IoT Core](https://docs.aws.amazon.com/iot/latest/developerguide/iot-sidewalk.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetPartnerAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-partner-account.html)」を参照してください。

### `get-service-endpoint`
<a name="iot-wireless_GetServiceEndpoint_cli_topic"></a>

次のコード例は、`get-service-endpoint` を使用する方法を示しています。

**AWS CLI**  
**サービスエンドポイントを取得するには**  
次の `get-service-endpoint` の例では、CUPS プロトコルのアカウント固有のエンドポイントを取得します。  

```
aws iotwireless get-service-endpoint
```
出力:  

```
{
    "ServiceType": "CUPS",
    "ServiceEndpoint": "https://A1RMKZ37ACAGOT.cups.lorawan.us-east-1.amazonaws.com:443",
    "ServerTrust": "-----BEGIN CERTIFICATE-----\n
    MIIESTCCAzGgAwIBAgITBn+UV4WH6Kx33rJTMlu8mYtWDTANBgkqhkiG9w0BAQsF\n
    ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6\n
    b24gUm9vdCBDQSAxMB4XDTE1MTAyMjAwMDAwMFoXDTI1MTAxOTAwMDAwMFowRjEL\n
    MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEVMBMGA1UECxMMU2VydmVyIENB\n
    IDFCMQ8wDQYDVQQDEwZBbWF6b24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\n
    AoIBAQDCThZn3c68asg3Wuw6MLAd5tES6BIoSMzoKcG5blPVo+sDORrMd4f2AbnZ\n
    cMzPa43j4wNxhplty6aUKk4T1qe9BOwKFjwK6zmxxLVYo7bHViXsPlJ6qOMpFge5\n
    blDP+18x+B26A0piiQOuPkfyDyeR4xQghfj66Yo19V+emU3nazfvpFA+ROz6WoVm\n
    B5x+F2pV8xeKNR7u6azDdU5YVX1TawprmxRC1+WsAYmz6qP+z8ArDITC2FMVy2fw\n
    0IjKOtEXc/VfmtTFch5+AfGYMGMqqvJ6LcXiAhqG5TI+Dr0RtM88k+8XUBCeQ8IG\n
    KuANaL7TiItKZYxK1MMuTJtV9IblAgMBAAGjggE7MIIBNzASBgNVHRMBAf8ECDAG\n
    AQH/AgEAMA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUWaRmBlKge5WSPKOUByeW\n
    dFv5PdAwHwYDVR0jBBgwFoAUhBjMhTTsvAyUlC4IWZzHshBOCggwewYIKwYBBQUH\n
    AQEEbzBtMC8GCCsGAQUFBzABhiNodHRwOi8vb2NzcC5yb290Y2ExLmFtYXpvbnRy\n
    dXN0LmNvbTA6BggrBgEFBQcwAoYuaHR0cDovL2NydC5yb290Y2ExLmFtYXpvbnRy\n
    dXN0LmNvbS9yb290Y2ExLmNlcjA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3Js\n
    LnJvb3RjYTEuYW1hem9udHJ1c3QuY29tL3Jvb3RjYTEuY3JsMBMGA1UdIAQMMAow\n
    CAYGZ4EMAQIBMA0GCSqGSIb3DQEBCwUAA4IBAQCFkr41u3nPo4FCHOTjY3NTOVI1\n
    59Gt/a6ZiqyJEi+752+a1U5y6iAwYfmXss2lJwJFqMp2PphKg5625kXg8kP2CN5t\n
    6G7bMQcT8C8xDZNtYTd7WPD8UZiRKAJPBXa30/AbwuZe0GaFEQ8ugcYQgSn+IGBI\n
    8/LwhBNTZTUVEWuCUUBVV18YtbAiPq3yXqMB48Oz+ctBWuZSkbvkNodPLamkB2g1\n
    upRyzQ7qDn1X8nn8N8V7YJ6y68AtkHcNSRAnpTitxBKjtKPISLMVCx7i4hncxHZS\n
    yLyKQXhw2W2Xs0qLeC1etA+jTGDK4UfLeC0SF7FSi8o5LL21L8IzApar2pR/\n
    -----END CERTIFICATE-----\n"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetServiceEndpoint](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-service-endpoint.html)」を参照してください。

### `get-service-profile`
<a name="iot-wireless_GetServiceProfile_cli_topic"></a>

次のコード例は、`get-service-profile` を使用する方法を示しています。

**AWS CLI**  
**サービスプロファイルに関する情報を取得するには**  
次の `get-service-profile` の例では、指定された ID を持つ、自分で作成したサービスプロファイルに関する情報を取得します。  

```
aws iotwireless get-service-profile \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
出力:  

```
{
    "Arn": "arn:aws:iotwireless:us-east-1:651419225604:ServiceProfile/538185bb-d7e7-4b95-96a0-c51aa4a5b9a0",
    "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d",
    "LoRaWAN": {
        "HrAllowed": false,
        "NwkGeoLoc": false,
        "DrMax": 15,
        "UlBucketSize": 4096,
        "PrAllowed": false,
        "ReportDevStatusBattery": false,
        "DrMin": 0,
        "DlRate": 60,
        "AddGwMetadata": false,
        "ReportDevStatusMargin": false,
        "MinGwDiversity": 1,
        "RaAllowed": false,
        "DlBucketSize": 4096,
        "DevStatusReqFreq": 24,
        "TargetPer": 5,
        "UlRate": 60
    }
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[プロファイルを AWS IoT Core for LoRaWAN に追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-define-profiles.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetServiceProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-service-profile.html)」を参照してください。

### `get-wireless-device-statistics`
<a name="iot-wireless_GetWirelessDeviceStatistics_cli_topic"></a>

次のコード例は、`get-wireless-device-statistics` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスデバイスに関する運用情報を取得するには**  
次の `get-wireless-device-statistics` の例では、ワイヤレスデバイスに関する運用情報を取得します。  

```
aws iotwireless get-wireless-device-statistics \
    --wireless-device-id "1ffd32c8-8130-4194-96df-622f072a315f"
```
出力:  

```
{
    "WirelessDeviceId": "1ffd32c8-8130-4194-96df-622f072a315f"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetWirelessDeviceStatistics](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-wireless-device-statistics.html)」を参照してください。

### `get-wireless-device`
<a name="iot-wireless_GetWirelessDevice_cli_topic"></a>

次のコード例は、`get-wireless-device` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスデバイスに関する情報を取得するには**  
次の `get-wireless-device` の例では、AWS アカウントで使用可能なウィジェットを一覧表示します。  

```
aws iotwireless get-wireless-device \
    --identifier "1ffd32c8-8130-4194-96df-622f072a315f" \
    --identifier-type WirelessDeviceID
```
出力:  

```
{
    "Name": "myLoRaWANDevice",
    "ThingArn": "arn:aws:iot:us-east-1:123456789012:thing/44b87eb4-9bce-423d-b5fc-973f5ecc358b",
    "DestinationName": "IoTWirelessDestination",
    "Id": "1ffd32c8-8130-4194-96df-622f072a315f",
    "ThingName": "44b87eb4-9bce-423d-b5fc-973f5ecc358b",
    "Type": "LoRaWAN",
    "LoRaWAN": {
        "DeviceProfileId": "ab0c23d3-b001-45ef-6a01-2bc3de4f5333",
        "ServiceProfileId": "fe98dc76-cd12-001e-2d34-5550432da100",
        "OtaaV1_1": {
            "AppKey": "3f4ca100e2fc675ea123f4eb12c4a012",
            "JoinEui": "b4c231a359bc2e3d",
            "NwkKey": "01c3f004a2d6efffe32c4eda14bcd2b4"
        },
        "DevEui": "ac12efc654d23fc2"
    },
    "Arn": "arn:aws:iotwireless:us-east-1:123456789012:WirelessDevice/1ffd32c8-8130-4194-96df-622f072a315f",
    "Description": "My LoRaWAN wireless device"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetWirelessDevice](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-wireless-device.html)」を参照してください。

### `get-wireless-gateway-certificate`
<a name="iot-wireless_GetWirelessGatewayCertificate_cli_topic"></a>

次のコード例は、`get-wireless-gateway-certificate` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイに関連付けられている証明書の ID を取得するには**  
次の `get-wireless-gateway-certificate` の例では、指定された ID を持つワイヤレスゲートウェイに関連付けられている証明書 ID を取得します。  

```
aws iotwireless get-wireless-gateway-certificate \
    --id "6c44ab31-8b4d-407a-bed3-19b6c7cda551"
```
出力:  

```
{
    "IotCertificateId": "8ea4aeae3db34c78cce75d9abd830356869ead6972997e0603e5fd032c804b6f"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetWirelessGatewayCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-wireless-gateway-certificate.html)」を参照してください。

### `get-wireless-gateway-firmware-information`
<a name="iot-wireless_GetWirelessGatewayFirmwareInformation_cli_topic"></a>

次のコード例は、`get-wireless-gateway-firmware-information` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイに関するファームウェア情報を取得するには**  
次の `get-wireless-gateway-firmware-information` 例では、ワイヤレスゲートウェイに関するファームウェアバージョンとその他の情報を取得します。  

```
aws iotwireless get-wireless-gateway-firmware-information \
    --id "3039b406-5cc9-4307-925b-9948c63da25b"
```
出力:  

```
{
    "LoRaWAN" :{
        "CurrentVersion" :{
            "PackageVersion" : "1.0.0",
            "Station" : "2.0.5",
            "Model" : "linux"
        }
    }
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetWirelessGatewayFirmwareInformation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-wireless-gateway-firmware-information.html)」を参照してください。

### `get-wireless-gateway-statistics`
<a name="iot-wireless_GetWirelessGatewayStatistics_cli_topic"></a>

次のコード例は、`get-wireless-gateway-statistics` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイに関する運用情報を取得するには**  
次の `get-wireless-gateway-statistics` の例では、ワイヤレスゲートウェイに関する運用情報を取得します。  

```
aws iotwireless get-wireless-gateway-statistics \
    --wireless-gateway-id "3039b406-5cc9-4307-925b-9948c63da25b"
```
出力:  

```
{
    "WirelessGatewayId": "3039b406-5cc9-4307-925b-9948c63da25b"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetWirelessGatewayStatistics](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-wireless-gateway-statistics.html)」を参照してください。

### `get-wireless-gateway-task-definition`
<a name="iot-wireless_GetWirelessGatewayTaskDefinition_cli_topic"></a>

次のコード例は、`get-wireless-gateway-task-definition` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイタスク定義に関する情報を取得するには**  
次の `get-wireless-gateway-task-definition` の例では、指定された ID を持つワイヤレスタスク定義に関する情報を取得します。  

```
aws iotwireless get-wireless-gateway-task-definition \
    --id "b7d3baad-25c7-35e7-a4e1-1683a0d61da9"
```
出力:  

```
{
    "AutoCreateTasks": true,
    "Name": "TestAutoUpdate",
    "Update":{
        "UpdateDataSource" : "s3://cupsalphagafirmwarebin/station",
        "UpdateDataRole" : "arn:aws:iam::001234567890:role/SDK_Test_Role",
        "LoRaWAN" :{
            "CurrentVersion" :{
                "PackageVersion" : "1.0.0",
                "Station" : "2.0.5",
                "Model" : "linux"
            },
            "UpdateVersion" :{
                "PackageVersion" : "1.0.1",
                "Station" : "2.0.5",
                "Model" : "minihub"
            }
        }
    }
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetWirelessGatewayTaskDefinition](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-wireless-gateway-task-definition.html)」を参照してください。

### `get-wireless-gateway-task`
<a name="iot-wireless_GetWirelessGatewayTask_cli_topic"></a>

次のコード例は、`get-wireless-gateway-task` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイタスクに関する情報を取得するには**  
次の `get-wireless-gateway-task` の例では、指定された ID を持つワイヤレスゲートウェイタスク定義に関する情報を取得します。  

```
aws iotwireless get-wireless-gateway-task \
    --id "11693a46-6866-47c3-a031-c9a616e7644b"
```
出力:  

```
{
    "WirelessGatewayId": "6c44ab31-8b4d-407a-bed3-19b6c7cda551",
    "WirelessGatewayTaskDefinitionId": "b7d3baad-25c7-35e7-a4e1-1683a0d61da9",
    "Status": "Success"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetWirelessGatewayTask](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-wireless-gateway-task.html)」を参照してください。

### `get-wireless-gateway`
<a name="iot-wireless_GetWirelessGateway_cli_topic"></a>

次のコード例は、`get-wireless-gateway` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイに関する情報を取得するには**  
次の `get-wireless-gateway` の例では、ワイヤレスゲートウェイ `myFirstLoRaWANGateway` に関する情報を取得します。  

```
aws iotwireless get-wireless-gateway \
    --identifier "12345678-a1b2-3c45-67d8-e90fa1b2c34d" \
    --identifier-type WirelessGatewayId
```
出力:  

```
{
    "Description": "My first LoRaWAN gateway",
    "ThingArn": "arn:aws:iot:us-east-1:123456789012:thing/a1b2c3d4-5678-90ab-cdef-12ab345c67de",
    "LoRaWAN": {
        "RfRegion": "US915",
        "GatewayEui": "a1b2c3d4567890ab"
    },
    "ThingName": "a1b2c3d4-5678-90ab-cdef-12ab345c67de",
    "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d",
    "Arn": "arn:aws:iotwireless:us-east-1:123456789012:WirelessGateway/6c44ab31-8b4d-407a-bed3-19b6c7cda551",
    "Name": "myFirstLoRaWANGateway"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetWirelessGateway](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/get-wireless-gateway.html)」を参照してください。

### `list-destinations`
<a name="iot-wireless_ListDestinations_cli_topic"></a>

次のコード例は、`list-destinations` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレス送信先を一覧表示するには**  
次の `list-destinations` の例では、AWS アカウントに登録されている使用可能な送信先を一覧表示します。  

```
aws iotwireless list-destinations
```
出力:  

```
{
    "DestinationList": [
        {
            "Arn": "arn:aws:iotwireless:us-east-1:123456789012:Destination/IoTWirelessDestination",
            "Name": "IoTWirelessDestination",
            "Expression": "IoTWirelessRule",
            "Description": "Destination for messages processed using IoTWirelessRule",
            "RoleArn": "arn:aws:iam::123456789012:role/IoTWirelessDestinationRole"
        },
        {
            "Arn": "arn:aws:iotwireless:us-east-1:123456789012:Destination/IoTWirelessDestination2",
            "Name": "IoTWirelessDestination2",
            "Expression": "IoTWirelessRule2",
            "RoleArn": "arn:aws:iam::123456789012:role/IoTWirelessDestinationRole"
        }
    ]
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN に送信先を追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-create-destinations.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListDestinations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/list-destinations.html)」を参照してください。

### `list-device-profiles`
<a name="iot-wireless_ListDeviceProfiles_cli_topic"></a>

次のコード例は、`list-device-profiles` を使用する方法を示しています。

**AWS CLI**  
**デバイスプロファイルを一覧表示するには**  
次の `list-device-profiles` の例では、AWS アカウントに登録されている使用可能なデバイスプロファイルを一覧表示します。  

```
aws iotwireless list-device-profiles
```
出力:  

```
{
    "DeviceProfileList": [
        {
            "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d",
            "Arn": "arn:aws:iotwireless:us-east-1:123456789012:DeviceProfile/12345678-a1b2-3c45-67d8-e90fa1b2c34d"
        },
        {
            "Id": "a1b2c3d4-5678-90ab-cdef-12ab345c67de",
            "Arn": "arn:aws:iotwireless:us-east-1:123456789012:DeviceProfile/a1b2c3d4-5678-90ab-cdef-12ab345c67de"
        }
    ]
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[プロファイルを AWS IoT Core for LoRaWAN に追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-define-profiles.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListDeviceProfiles](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/list-device-profiles.html)」を参照してください。

### `list-partner-accounts`
<a name="iot-wireless_ListPartnerAccounts_cli_topic"></a>

次のコード例は、`list-partner-accounts` を使用する方法を示しています。

**AWS CLI**  
**パートナーアカウントを一覧表示するには**  
次の `list-partner-accounts` の例では、AWS アカウントに関連付けられている使用可能なパートナーアカウントを一覧表示します。  

```
aws iotwireless list-partner-accounts
```
出力:  

```
{
    "Sidewalk": [
        {
            "AmazonId": "78965678771228",
            "Fingerprint": "bd96d8ef66dbfd2160eb60e156849e82ad7018b8b73c1ba0b4fc65c32498ee35"
        },
        {
            "AmazonId": "89656787651228",
            "Fingerprint": "bc5e99e151c07be14be7e6603e4489c53f858b271213a36ebe3370777ba06e9b"
        }
    ]
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[Amazon Sidewalk Integration for AWS IoT Core](https://docs.aws.amazon.com/iot/latest/developerguide/iot-sidewalk.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListPartnerAccounts](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/list-partner-accounts.html)」を参照してください。

### `list-service-profiles`
<a name="iot-wireless_ListServiceProfiles_cli_topic"></a>

次のコード例は、`list-service-profiles` を使用する方法を示しています。

**AWS CLI**  
**サービスプロファイルを一覧表示するには**  
次の `list-service-profiles` の例では、AWS アカウントに登録されている使用可能なサービスプロファイルを一覧表示します。  

```
aws iotwireless list-service-profiles
```
出力:  

```
{
    "ServiceProfileList": [
        {
            "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d",
            "Arn": "arn:aws:iotwireless:us-east-1:123456789012:ServiceProfile/538185bb-d7e7-4b95-96a0-c51aa4a5b9a0"
        },
        {
            "Id": "a1b2c3d4-5678-90ab-cdef-12ab345c67de",
            "Arn": "arn:aws:iotwireless:us-east-1:123456789012:ServiceProfile/ea8bc823-5d13-472e-8d26-9550737d8100"
        }
    ]
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[プロファイルを AWS IoT Core for LoRaWAN に追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-define-profiles.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListServiceProfiles](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/list-service-profiles.html)」を参照してください。

### `list-tags-for-resource`
<a name="iot-wireless_ListTagsForResource_cli_topic"></a>

次のコード例は、`list-tags-for-resource` を使用する方法を示しています。

**AWS CLI**  
**リソースに割り当てられたタグを一覧表示するには**  
次の `list-tags-for-resource` の例では、ワイヤレス送信先リソースに割り当てられたタグを一覧表示します。  

```
aws iotwireless list-tags-for-resource \
    --resource-arn "arn:aws:iotwireless:us-east-1:123456789012:Destination/IoTWirelessDestination"
```
出力:  

```
{
    "Tags": [
        {
            "Value": "MyValue",
            "Key": "MyTag"
        }
    ]
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN リソースを説明する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-describe-resource.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListTagsForResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/list-tags-for-resource.html)」を参照してください。

### `list-wireless-devices`
<a name="iot-wireless_ListWirelessDevices_cli_topic"></a>

次のコード例は、`list-wireless-devices` を使用する方法を示しています。

**AWS CLI**  
**使用可能なワイヤレスデバイスを一覧表示するには**  
次の `list-wireless-devices` の例では、AWS アカウントに登録されている使用可能なワイヤレスデバイスを一覧表示します。  

```
aws iotwireless list-wireless-devices
```
出力:  

```
{
    "WirelessDeviceList": [
        {
            "Name": "myLoRaWANDevice",
            "DestinationName": "IoTWirelessDestination",
            "Id": "1ffd32c8-8130-4194-96df-622f072a315f",
            "Type": "LoRaWAN",
            "LoRaWAN": {
                "DevEui": "ac12efc654d23fc2"
            },
            "Arn": "arn:aws:iotwireless:us-east-1:123456789012:WirelessDevice/1ffd32c8-8130-4194-96df-622f072a315f"
        }
    ]
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListWirelessDevices](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/list-wireless-devices.html)」を参照してください。

### `list-wireless-gateway-task-definitions`
<a name="iot-wireless_ListWirelessGatewayTaskDefinitions_cli_topic"></a>

次のコード例は、`list-wireless-gateway-task-definitions` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイタスク定義を一覧表示するには**  
次の `list-wireless-gateway-task-definitions` の例では、AWS アカウントに登録されている使用可能なワイヤレスゲートウェイタスク定義を一覧表示します。  

```
aws iotwireless list-wireless-gateway-task-definitions
```
出力:  

```
{
    "TaskDefinitions": [
        {
            "Id": "b7d3baad-25c7-35e7-a4e1-1683a0d61da9",
            "LoRaWAN" :
                {
                "CurrentVersion" :{
                    "PackageVersion" : "1.0.0",
                    "Station" : "2.0.5",
                    "Model" : "linux"
                },
                "UpdateVersion" :{
                    "PackageVersion" : "1.0.1",
                    "Station" : "2.0.5",
                    "Model" : "minihub"
                }
            }
        }
    ]
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListWirelessGatewayTaskDefinitions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/list-wireless-gateway-task-definitions.html)」を参照してください。

### `list-wireless-gateways`
<a name="iot-wireless_ListWirelessGateways_cli_topic"></a>

次のコード例は、`list-wireless-gateways` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイを一覧表示するには**  
次の `list-wireless-gateways` の例では、AWS アカウントで使用可能なワイヤレスゲートウェイを一覧表示します。  

```
aws iotwireless list-wireless-gateways
```
出力:  

```
{
    "WirelessGatewayList": [
        {
            "Description": "My first LoRaWAN gateway",
            "LoRaWAN": {
                "RfRegion": "US915",
                "GatewayEui": "dac632ebc01d23e4"
            },
            "Id": "3039b406-5cc9-4307-925b-9948c63da25b",
            "Arn": "arn:aws:iotwireless:us-east-1:123456789012:WirelessGateway/3039b406-5cc9-4307-925b-9948c63da25b",
            "Name": "myFirstLoRaWANGateway"
        },
        {
            "Description": "My second LoRaWAN gateway",
            "LoRaWAN": {
                "RfRegion": "US915",
                "GatewayEui": "cda123fffe92ecd2"
            },
            "Id": "3285bdc7-5a12-4991-84ed-dadca65e342e",
            "Arn": "arn:aws:iotwireless:us-east-1:123456789012:WirelessGateway/3285bdc7-5a12-4991-84ed-dadca65e342e",
            "Name": "mySecondLoRaWANGateway"
        }
    ]
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListWirelessGateways](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/list-wireless-gateways.html)」を参照してください。

### `send-data-to-wireless-device`
<a name="iot-wireless_SendDataToWirelessDevice_cli_topic"></a>

次のコード例は、`send-data-to-wireless-device` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスデバイスにデータを送信するには**  
次の `send-data-to-wireless-device` の例では、復号されたアプリケーションデータフレームをワイヤレスデバイスに送信します。  

```
aws iotwireless send-data-to-wireless-device \
    --id "11aa5eae-2f56-4b8e-a023-b28d98494e49" \
    --transmit-mode "1" \
    --payload-data "SGVsbG8gVG8gRGV2c2lt" \
    --wireless-metadata LoRaWAN={FPort=1}
```
出力:  

```
{
    MessageId: "6011dd36-0043d6eb-0072-0008"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[SendDataToWirelessDevice](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/send-data-to-wireless-device.html)」を参照してください。

### `tag-resource`
<a name="iot-wireless_TagResource_cli_topic"></a>

次のコード例は、`tag-resource` を使用する方法を示しています。

**AWS CLI**  
**リソースのタグキーと値を指定するには**  
次の `tag-resource` の例では、ワイヤレス送信先 `IoTWirelessDestination` にキー `MyTag` と値 `MyValue` でタグ付けします。  

```
aws iotwireless tag-resource \
    --resource-arn "arn:aws:iotwireless:us-east-1:651419225604:Destination/IoTWirelessDestination" \
    --tags Key="MyTag",Value="MyValue"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN リソースを説明する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-describe-resource.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[TagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/tag-resource.html)」を参照してください。

### `test-wireless-device`
<a name="iot-wireless_TestWirelessDevice_cli_topic"></a>

次のコード例は、`test-wireless-device` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスデバイスをテストするには**  
次の `test-wireless-device` の例では、`Hello` のアップリンクデータを、指定された ID を持つデバイスに送信します。  

```
aws iotwireless test-wireless-device \
    --id "11aa5eae-2f56-4b8e-a023-b28d98494e49"
```
出力:  

```
{
    Result: "Test succeeded. one message is sent with payload: hello"
}
```
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[TestWirelessDevice](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/test-wireless-device.html)」を参照してください。

### `untag-resource`
<a name="iot-wireless_UntagResource_cli_topic"></a>

次のコード例は、`untag-resource` を使用する方法を示しています。

**AWS CLI**  
**リソースから 1 つ以上のタグを削除するには**  
次の `untag-resource` の例では、ワイヤレス送信先 `IoTWirelessDestination` からタグ `MyTag` とその値を削除します。  

```
aws iotwireless untag-resource \
    --resource-arn "arn:aws:iotwireless:us-east-1:123456789012:Destination/IoTWirelessDestination" \
    --tag-keys "MyTag"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN リソースを説明する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-describe-resource.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[UntagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/untag-resource.html)」を参照してください。

### `update-destination`
<a name="iot-wireless_UpdateDestination_cli_topic"></a>

次のコード例は、`update-destination` を使用する方法を示しています。

**AWS CLI**  
**送信先のプロパティを更新するには**  
次の `update-destination` の例では、ワイヤレス送信先の説明プロパティを更新します。  

```
aws iotwireless update-destination \
    --name "IoTWirelessDestination" \
    --description "Destination for messages processed using IoTWirelessRule"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN に送信先を追加する](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-create-destinations.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[UpdateDestination](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/update-destination.html)」を参照してください。

### `update-partner-account`
<a name="iot-wireless_UpdatePartnerAccount_cli_topic"></a>

次のコード例は、`update-partner-account` を使用する方法を示しています。

**AWS CLI**  
**パートナーアカウントのプロパティを更新するには**  
次の `update-partner-account` は、指定された ID を持つアカウントの `AppServerPrivateKey` を更新します。  

```
aws iotwireless update-partner-account \
    --partner-account-id "78965678771228" \
    --partner-type "Sidewalk" \
    --sidewalk AppServerPrivateKey="f798ab4899346a88599180fee9e14fa1ada7b6df989425b7c6d2146dd6c815bb"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[Amazon Sidewalk Integration for AWS IoT Core](https://docs.aws.amazon.com/iot/latest/developerguide/iot-sidewalk.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[UpdatePartnerAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/update-partner-account.html)」を参照してください。

### `update-wireless-device`
<a name="iot-wireless_UpdateWirelessDevice_cli_topic"></a>

次のコード例は、`update-wireless-device` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスデバイスのプロパティを更新するには**  
次の `update-wireless-device` の例では、AWS アカウントに登録されているワイヤレスデバイスのプロパティを更新します。  

```
aws iotwireless update-wireless-device \
    --id "1ffd32c8-8130-4194-96df-622f072a315f" \
    --destination-name IoTWirelessDestination2 \
    --description "Using my first LoRaWAN device"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[UpdateWirelessDevice](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/update-wireless-device.html)」を参照してください。

### `update-wireless-gateway`
<a name="iot-wireless_UpdateWirelessGateway_cli_topic"></a>

次のコード例は、`update-wireless-gateway` を使用する方法を示しています。

**AWS CLI**  
**ワイヤレスゲートウェイを更新するには**  
次の `update-wireless-gateway` の例では、ワイヤレスゲートウェイの説明を更新します。  

```
aws iotwireless update-wireless-gateway \
    --id "3285bdc7-5a12-4991-84ed-dadca65e342e" \
    --description "Using my LoRaWAN gateway"
```
このコマンドでは何も出力されません。  
詳細については、「*AWS IoT デベロッパーガイド*」の「[AWS IoT Core for LoRaWAN へのゲートウェイとデバイスの接続](https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[UpdateWirelessGateway](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iotwireless/update-wireless-gateway.html)」を参照してください。