

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 列出與委託人 V2 相關聯的物件
<a name="list-principal-things-v2"></a>

若要列出與指定憑證相關聯的物件，以及附件類型，請執行 [https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iot/list-principal-thingsv2.html](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iot/list-principal-thingsv2.html)命令。連接類型是指憑證如何連接到物件。

```
$ aws iot list-principal-things-v2 \
    --principal "arn:aws:iot:{{us-east-1:123456789012}}:cert/{{2e1eb273792174ec2b9bf4e9b37e6c6c692345499506002a35159767055278e8}}"
```

輸出可能如下所示。

```
{
    "PrincipalThingObjects": [
        {
            "thingPrincipalType": "NON_EXCLUSIVE_THING",
            "thing": "arn:aws:iot:{{us-east-1}}:{{123456789012}}:thing/{{thing_1}}"
        }, 
        {
            "thingPrincipalType": "NON_EXCLUSIVE_THING",
            "thing": "arn:aws:iot:{{us-east-1}}:{{123456789012}}:thing/{{thing_2}}"
        }

    ]
}
```

如需詳細資訊，請參閱 *AWS IoT Core API 參考*中的 [ListPrincipalThingsV2](https://docs.aws.amazon.com//iot/latest/apireference/API_ListPrincipalThingsV2.html)。