IAM 策略数据类型中的 "Maps" 和 "Structs" 是什么?

What are "Maps" and "Structs" in IAM policies data types?

从这里开始:https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_datatypes.html

This section lists the data types that are supported when you specify values in JSON policies. The policy language doesn't support all types for each policy element; for information about each element, see the preceding sections.

  • Strings

  • Numbers (Ints and Floats)

  • Boolean

  • Null

  • Lists

  • Maps

  • Structs (which are just nested Maps)

问题:什么是 MapsStructs 以及我在哪里可以阅读更多关于它们的信息在 AWS 文档中?

正如页面所说 - 但链接错误且解释不当 - 这些都是简单的 Json 数据类型,并且在 rfc 中有更详细的描述,例如 https://datatracker.ietf.org/doc/html/rfc7159#section-4 ("objects" or maps) and https://datatracker.ietf.org/doc/html/rfc7159#section-5 (“数组”或列表).

该页面真正要表达的是各种 json 数据类型在 IAM 策略中的不同位置使用。您需要遵循规范的详细信息以查看可能使用这些类型的位置。但无论在哪里使用,它们都是由 json 类型定义的。

{
   "object": { "a set of": "key-value pairs" },
   "list": [ "an ordered list of", "values" ]
}