

文档 AWS SDK 示例 GitHub 存储库中还有更多 [S AWS DK 示例](https://github.com/awsdocs/aws-doc-sdk-examples)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# AWS IoT Wireless 使用示例 AWS CLI
<a name="cli_2_iot-wireless_code_examples"></a>

以下代码示例向您展示了如何使用with来执行操作和实现常见场景 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_2_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"
    }
}
```
有关更多信息，请参阅《物联网*开发人员指南》中的 Amazon Sidewalk I AWS o AWS T* [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_2_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 Io AWS T* Core for LoRa WAN](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_2_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 Io AWS T* Core for LoRa WAN](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_2_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 Io AWS T* Core for LoRa WAN](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_2_topic"></a>

以下代码示例演示了如何使用 `create-destination`。

**AWS CLI**  
**创建 IoT 无线目标**  
以下`create-destination`示例创建用于将设备消息映射到 AWS 物联网规则的目标。在运行此命令之前，您必须创建一个 IAM 角色，该角色向适用于 LoRa WAN 的 I AWS oT Core 授予向 AWS 物联网规则发送数据所需的权限。  

```
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 Core f AWS o* [r LoRa WAN 添加目标](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_2_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 物联网*开发人员指南》中的向适用于 LoRa WAN 的AWS IoT* Core 添加配置文件](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_2_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 物联网*开发人员指南》中的向适用于 LoRa WAN 的AWS IoT* Core 添加配置文件](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_2_topic"></a>

以下代码示例演示了如何使用 `create-wireless-device`。

**AWS CLI**  
**创建 IoT 无线设备**  
以下`create-wireless-device`示例创建 LoRa WAN 类型的无线设备资源。  

```
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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_topic"></a>

以下代码示例演示了如何使用 `create-wireless-gateway`。

**AWS CLI**  
**创建无线网关**  
以下`create-wireless-gateway`示例创建了无线 LoRa WAN 设备网关。  

```
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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_topic"></a>

以下代码示例演示了如何使用 `delete-destination`。

**AWS CLI**  
**删除 IoT 无线目标**  
以下 `delete-destination` 示例删除您创建的名称为 `IoTWirelessDestination` 的无线目标资源。  

```
aws iotwireless delete-destination \
    --name "IoTWirelessDestination"
```
此命令不生成任何输出。  
有关更多信息，请参阅《物联网*开发人员指南》中的向 AWS IoT Core f AWS o* [r LoRa WAN 添加目标](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_2_topic"></a>

以下代码示例演示了如何使用 `delete-device-profile`。

**AWS CLI**  
**删除设备配置文件**  
以下 `delete-device-profile` 示例删除了您创建的具有指定 ID 的设备配置文件。  

```
aws iotwireless delete-device-profile \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
此命令不生成任何输出。  
有关更多信息，请参阅《[AWS 物联网*开发人员指南》中的向适用于 LoRa WAN 的AWS IoT* Core 添加配置文件](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_2_topic"></a>

以下代码示例演示了如何使用 `delete-service-profile`。

**AWS CLI**  
**删除服务配置文件**  
以下 `delete-service-profile` 示例删除了您创建的具有指定 ID 的服务配置文件。  

```
aws iotwireless delete-service-profile \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
此命令不生成任何输出。  
有关更多信息，请参阅《[AWS 物联网*开发人员指南》中的向适用于 LoRa WAN 的AWS IoT* Core 添加配置文件](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_2_topic"></a>

以下代码示例演示了如何使用 `delete-wireless-device`。

**AWS CLI**  
**删除无线设备**  
以下 `delete-wireless-device` 示例删除具有指定 ID 的无线设备。  

```
aws iotwireless delete-wireless-device \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
此命令不生成任何输出。  
有关更多信息，请参阅《[AWS 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_topic"></a>

以下代码示例演示了如何使用 `delete-wireless-gateway`。

**AWS CLI**  
**删除无线网关**  
以下 `delete-wireless-gateway` 示例删除具有指定 ID 的无线网关。  

```
aws iotwireless delete-wireless-gateway \
    --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"
```
此命令不生成任何输出。  
有关更多信息，请参阅《[AWS 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 Io AWS T* Core for LoRa WAN](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_2_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 Io AWS T* Core for LoRa WAN](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_2_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 Io AWS T* Core for LoRa WAN](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_2_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 Io AWS T* Core for LoRa WAN](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_2_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 Core f AWS o* [r LoRa WAN 添加目标](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_2_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 物联网*开发人员指南》中的向适用于 LoRa WAN 的AWS IoT* Core 添加配置文件](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_2_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
}
```
有关更多信息，请参阅《物联网*开发人员指南》中的 Amazon Sidewalk I AWS o AWS T* [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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的向适用于 LoRa WAN 的AWS IoT* Core 添加配置文件](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 Core f AWS o* [r LoRa WAN 添加目标](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_2_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 物联网*开发人员指南》中的向适用于 LoRa WAN 的AWS IoT* Core 添加配置文件](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_2_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"
        }
    ]
}
```
有关更多信息，请参阅《物联网*开发人员指南》中的 Amazon Sidewalk I AWS o AWS T* [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_2_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 物联网*开发人员指南》中的向适用于 LoRa WAN 的AWS IoT* Core 添加配置文件](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_2_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 物联网*开发人员指南》中的 “描述适用于 LoRa WAN 的AWS IoT* Core 资源](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_topic"></a>

以下代码示例演示了如何使用 `tag-resource`。

**AWS CLI**  
**为资源指定标签键和值**  
以下 `tag-resource` 示例标记键为 `MyTag` 且值为 `MyValue` 的无线目标 `IoTWirelessDestination`。  

```
aws iotwireless tag-resource \
    --resource-arn "arn:aws:iotwireless:us-east-1:651419225604:Destination/IoTWirelessDestination" \
    --tags Key="MyTag",Value="MyValue"
```
此命令不生成任何输出。  
有关更多信息，请参阅《[AWS 物联网*开发人员指南》中的 “描述适用于 LoRa WAN 的AWS IoT* Core 资源](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_topic"></a>

以下代码示例演示了如何使用 `untag-resource`。

**AWS CLI**  
**从资源中移除一个或多个标签**  
以下 `untag-resource` 示例从无线目标 `IoTWirelessDestination` 中移除标签 `MyTag` 及其值。  

```
aws iotwireless untag-resource \
    --resource-arn "arn:aws:iotwireless:us-east-1:123456789012:Destination/IoTWirelessDestination" \
    --tag-keys "MyTag"
```
此命令不生成任何输出。  
有关更多信息，请参阅《[AWS 物联网*开发人员指南》中的 “描述适用于 LoRa WAN 的AWS IoT* Core 资源](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_2_topic"></a>

以下代码示例演示了如何使用 `update-destination`。

**AWS CLI**  
**更新目标的属性**  
以下 `update-destination` 示例更新了一个无线目标的描述属性。  

```
aws iotwireless update-destination \
    --name "IoTWirelessDestination" \
    --description "Destination for messages processed using IoTWirelessRule"
```
此命令不生成任何输出。  
有关更多信息，请参阅《物联网*开发人员指南》中的向 AWS IoT Core f AWS o* [r LoRa WAN 添加目标](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_2_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"
```
此命令不生成任何输出。  
有关更多信息，请参阅《物联网*开发人员指南》中的 Amazon Sidewalk I AWS o AWS T* [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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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_2_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 物联网*开发人员指南》中的将设备和网关连接到适用于 LoRa WAN 的AWS IoT* Core](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)*中的。