

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

# GetArchiveRule
<a name="API_GetArchiveRule"></a>

检索有关存档规则的信息。

要了解可用于创建存档规则的筛选密钥，请参阅 [IAM **用户指南**中的 IAM Access Analyzer 筛选密钥](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html)。

## 请求语法
<a name="API_GetArchiveRule_RequestSyntax"></a>

```
GET /analyzer/analyzerName/archive-rule/ruleName HTTP/1.1
```

## URI 请求参数
<a name="API_GetArchiveRule_RequestParameters"></a>

请求使用以下 URI 参数。

 ** [analyzerName](#API_GetArchiveRule_RequestSyntax) **   <a name="accessanalyzer-GetArchiveRule-request-uri-analyzerName"></a>
要从中检索规则的分析器的名称。  
长度约束：最小长度为 1。最大长度为 255。  
模式：`[A-Za-z][A-Za-z0-9_.-]*`  
是否必需：是

 ** [ruleName](#API_GetArchiveRule_RequestSyntax) **   <a name="accessanalyzer-GetArchiveRule-request-uri-ruleName"></a>
要检索的规则的名称。  
长度约束：最小长度为 1。最大长度为 255。  
模式：`[A-Za-z][A-Za-z0-9_.-]*`  
必需：是

## 请求体
<a name="API_GetArchiveRule_RequestBody"></a>

该请求没有请求正文。

## 响应语法
<a name="API_GetArchiveRule_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "archiveRule": { 
      "createdAt": "string",
      "filter": { 
         "string" : { 
            "contains": [ "string" ],
            "eq": [ "string" ],
            "exists": boolean,
            "neq": [ "string" ]
         }
      },
      "ruleName": "string",
      "updatedAt": "string"
   }
}
```

## 响应元素
<a name="API_GetArchiveRule_ResponseElements"></a>

如果此操作成功，则该服务将会发送回 HTTP 200 响应。

服务以 JSON 格式返回以下数据。

 ** [archiveRule](#API_GetArchiveRule_ResponseSyntax) **   <a name="accessanalyzer-GetArchiveRule-response-archiveRule"></a>
包含有关存档规则的信息。存档规则会自动存档符合您在创建规则时定义的标准的新发现结果。  
类型：[ArchiveRuleSummary](API_ArchiveRuleSummary.md) 对象

## 错误
<a name="API_GetArchiveRule_Errors"></a>

有关所有操作的常见错误信息，请参阅 [常见错误类型](CommonErrors.md)。

 ** AccessDeniedException **   
您没有足够的访问权限，无法执行该操作。  
HTTP 状态代码：403

 ** InternalServerException **   
内部服务器错误。    
 ** retryAfterSeconds **   
等待重试的秒数。
HTTP 状态代码：500

 ** ResourceNotFoundException **   
找不到指定资源。    
 ** resourceId **   
资源的 ID。  
 ** resourceType **   
资源的类型。
HTTP 状态代码：404

 ** ThrottlingException **   
超过限制限制错误。    
 ** retryAfterSeconds **   
等待重试的秒数。
HTTP 状态代码：429

 ** ValidationException **   
验证异常错误。    
 ** fieldList **   
未验证的字段列表。  
 ** reason **   
异常的原因。
HTTP 状态代码：400

## 另请参阅
<a name="API_GetArchiveRule_SeeAlso"></a>

有关以特定语言之一使用此 API 的更多信息 AWS SDKs，请参阅以下内容：
+  [AWS 命令行界面 V2](https://docs.aws.amazon.com/goto/cli2/accessanalyzer-2019-11-01/GetArchiveRule) 
+  [AWS 适用于.NET 的 SDK V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/accessanalyzer-2019-11-01/GetArchiveRule) 
+  [AWS 适用于 C\$1\$1 的 SDK](https://docs.aws.amazon.com/goto/SdkForCpp/accessanalyzer-2019-11-01/GetArchiveRule) 
+  [AWS 适用于 Go v2 的 SDK](https://docs.aws.amazon.com/goto/SdkForGoV2/accessanalyzer-2019-11-01/GetArchiveRule) 
+  [AWS 适用于 Java 的 SDK V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/accessanalyzer-2019-11-01/GetArchiveRule) 
+  [AWS JavaScript V3 版软件开发工具包](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/accessanalyzer-2019-11-01/GetArchiveRule) 
+  [AWS 适用于 Kotlin 的 SDK](https://docs.aws.amazon.com/goto/SdkForKotlin/accessanalyzer-2019-11-01/GetArchiveRule) 
+  [AWS 适用于 PHP 的 SDK V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/accessanalyzer-2019-11-01/GetArchiveRule) 
+  [AWS Python 软件开发工具包](https://docs.aws.amazon.com/goto/boto3/accessanalyzer-2019-11-01/GetArchiveRule) 
+  [AWS 适用于 Ruby V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForRubyV3/accessanalyzer-2019-11-01/GetArchiveRule) 