

文件 AWS 開發套件範例 GitHub 儲存庫中有更多可用的 [AWS SDK 範例](https://github.com/awsdocs/aws-doc-sdk-examples)。

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

# 搭配使用 `DescribeTrustedAdvisorCheckRefreshStatuses` 與 CLI
<a name="support_example_support_DescribeTrustedAdvisorCheckRefreshStatuses_section"></a>

下列程式碼範例示範如何使用 `DescribeTrustedAdvisorCheckRefreshStatuses`。

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

**AWS CLI**  
**列出 AWS Trusted Advisor 檢查的重新整理狀態**  
下列 `describe-trusted-advisor-check-refresh-statuses` 範例會列出兩個 Trusted Advisor 檢查的重新整理狀態：Amazon S3 儲存貯體許可和 IAM 使用。  

```
aws support describe-trusted-advisor-check-refresh-statuses \
    --check-id "Pfx0RwqBli" "zXCkfM1nI3"
```
輸出：  

```
{
    "statuses": [
        {
            "checkId": "Pfx0RwqBli",
            "status": "none",
            "millisUntilNextRefreshable": 0
        },
        {
            "checkId": "zXCkfM1nI3",
            "status": "none",
            "millisUntilNextRefreshable": 0
        }
    ]
}
```
如需詳細資訊，請參閱《AWS Support 使用者指南》**中的 [AWS Trusted Advisor](https://docs.aws.amazon.com/awssupport/latest/user/trusted-advisor.html)。  
+  如需 API 詳細資訊，請參閱《AWS CLI 命令參考》**中的 [DescribeTrustedAdvisorCheckRefreshStatuses](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/support/describe-trusted-advisor-check-refresh-statuses.html)。

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

**Tools for PowerShell V4**  
**範例 1：傳回指定之檢查的重新整理請求的目前狀態。Request-ASATrustedAdvisorCheckRefresh 可用來請求重新整理檢查的狀態資訊。**  

```
Get-ASATrustedAdvisorCheckRefreshStatus -CheckId @("checkid1", "checkid2")
```
+  如需 API 詳細資訊，請參閱《AWS Tools for PowerShell Cmdlet 參考 (V4)》**中的 [DescribeTrustedAdvisorCheckRefreshStatuses](https://docs.aws.amazon.com/powershell/v4/reference)。

**Tools for PowerShell V5**  
**範例 1：傳回指定之檢查的重新整理請求的目前狀態。Request-ASATrustedAdvisorCheckRefresh 可用來請求重新整理檢查的狀態資訊。**  

```
Get-ASATrustedAdvisorCheckRefreshStatus -CheckId @("checkid1", "checkid2")
```
+  如需 API 詳細資訊，請參閱《AWS Tools for PowerShell Cmdlet 參考 (V5)》**中的 [DescribeTrustedAdvisorCheckRefreshStatuses](https://docs.aws.amazon.com/powershell/v5/reference)。

------