cloud-metadata 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,260 @@
1
+ # Copyright (c) 2026 SUSE LLC. All rights reserved.
2
+ #
3
+ # This file is part of cloud-metadata. cloud-metadata provides one command
4
+ # and one Python API that return the same standard instance metadata on every
5
+ # supported public cloud.
6
+ #
7
+ # This program is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ """Load the built-in provider specs from their JSON data files.
21
+
22
+ The files live in the ``data`` directory next to this module, so other
23
+ implementations of the tool can read the same provider tables. ``index.json``
24
+ lists the providers in registry order, which is also the detection order. Each
25
+ provider has one ``<name>.json`` file.
26
+
27
+ Provider file layout (every field except ``name`` is optional)::
28
+
29
+ {
30
+ "name": "amazon",
31
+ "notes": ["Free text for readers. The loader ignores it."],
32
+ "dmi_match": ["amazon", "ec2"],
33
+ "probes": [{"path": "/latest/meta-data/"}],
34
+ "base_urls": ["http://169.254.169.254"],
35
+ "request_headers": {"Name": "value"},
36
+ "auth": {
37
+ "method": "PUT",
38
+ "path": "/latest/api/token",
39
+ "apply_header": "X-token",
40
+ "request_headers": {"Name": "value"}
41
+ },
42
+ "documents": [
43
+ {"name": "ipv6s", "path": "/x/{mac}", "format": "text",
44
+ "params": {"mac": "mac"}}
45
+ ],
46
+ "keys": {"instance-id": {"document": "identity", "expression": "id"}}
47
+ }
48
+
49
+ ``documents`` is a list, not an object, because the first document is the
50
+ primary one and a list keeps its order in every language. ``expression`` is
51
+ left out for a key that returns the whole document.
52
+ """
53
+
54
+ import json
55
+ from importlib import resources
56
+ from importlib.resources.abc import Traversable
57
+ from typing import TYPE_CHECKING, Any, cast
58
+
59
+ from cloud_metadata.providers._spec import Auth, Document, Probe, ProviderSpec
60
+
61
+ if TYPE_CHECKING:
62
+ from typing import Literal
63
+
64
+ _INDEX = "index.json"
65
+
66
+
67
+ def _fields(
68
+ value: object, where: str, *, required: tuple[str, ...], optional: tuple[str, ...]
69
+ ) -> dict[str, Any]:
70
+ """Check that ``value`` is an object with only the allowed fields."""
71
+ if not isinstance(value, dict):
72
+ msg = f"{where}: must be an object, got {type(value).__name__}"
73
+ raise ValueError(msg)
74
+ for name in required:
75
+ if name not in value:
76
+ msg = f"{where}: missing field {name!r}"
77
+ raise ValueError(msg)
78
+ unknown = sorted(set(value) - set(required) - set(optional))
79
+ if unknown:
80
+ msg = f"{where}: unknown field {unknown[0]!r}"
81
+ raise ValueError(msg)
82
+ return value
83
+
84
+
85
+ def _list(value: object, where: str) -> list[Any]:
86
+ if not isinstance(value, list):
87
+ msg = f"{where}: must be a list, got {type(value).__name__}"
88
+ raise ValueError(msg)
89
+ return value
90
+
91
+
92
+ def _string(value: object, where: str) -> str:
93
+ if not isinstance(value, str):
94
+ msg = f"{where}: must be a string, got {type(value).__name__}"
95
+ raise ValueError(msg)
96
+ return value
97
+
98
+
99
+ def _strings(value: object, where: str) -> tuple[str, ...]:
100
+ items = _list(value, where)
101
+ return tuple(_string(item, f"{where}[{i}]") for i, item in enumerate(items))
102
+
103
+
104
+ def _string_map(value: object, where: str) -> dict[str, str]:
105
+ if not isinstance(value, dict):
106
+ msg = f"{where}: must be an object, got {type(value).__name__}"
107
+ raise ValueError(msg)
108
+ return {
109
+ _string(name, where): _string(item, f"{where}[{name!r}]")
110
+ for name, item in value.items()
111
+ }
112
+
113
+
114
+ def _probes(value: object, where: str) -> tuple[Probe, ...]:
115
+ probes = []
116
+ for index, item in enumerate(_list(value, where)):
117
+ here = f"{where}[{index}]"
118
+ data = _fields(item, here, required=("path",), optional=())
119
+ probes.append(Probe(_string(data["path"], f"{here}.path")))
120
+ return tuple(probes)
121
+
122
+
123
+ def _auth(value: object, where: str) -> Auth:
124
+ data = _fields(
125
+ value,
126
+ where,
127
+ required=("method", "path", "apply_header"),
128
+ optional=("request_headers",),
129
+ )
130
+ return Auth(
131
+ method=_string(data["method"], f"{where}.method"),
132
+ path=_string(data["path"], f"{where}.path"),
133
+ apply_header=_string(data["apply_header"], f"{where}.apply_header"),
134
+ request_headers=_string_map(
135
+ data.get("request_headers", {}), f"{where}.request_headers"
136
+ ),
137
+ )
138
+
139
+
140
+ def _documents(value: object, where: str) -> dict[str, Document]:
141
+ documents: dict[str, Document] = {}
142
+ for index, item in enumerate(_list(value, where)):
143
+ here = f"{where}[{index}]"
144
+ data = _fields(
145
+ item,
146
+ here,
147
+ required=("name", "path", "format"),
148
+ optional=("params",),
149
+ )
150
+ name = _string(data["name"], f"{here}.name")
151
+ if name in documents:
152
+ msg = f"{here}.name: duplicate document {name!r}"
153
+ raise ValueError(msg)
154
+ documents[name] = Document(
155
+ path=_string(data["path"], f"{here}.path"),
156
+ # Not checked here: ProviderSpec validates the format when it is built.
157
+ format=cast(
158
+ "Literal['json', 'text']", _string(data["format"], f"{here}.format")
159
+ ),
160
+ params=_string_map(data.get("params", {}), f"{here}.params"),
161
+ )
162
+ return documents
163
+
164
+
165
+ def _keys(value: object, where: str) -> dict[str, tuple[str, str | None]]:
166
+ if not isinstance(value, dict):
167
+ msg = f"{where}: must be an object, got {type(value).__name__}"
168
+ raise ValueError(msg)
169
+ keys: dict[str, tuple[str, str | None]] = {}
170
+ for key, item in value.items():
171
+ here = f"{where}[{key!r}]"
172
+ data = _fields(item, here, required=("document",), optional=("expression",))
173
+ expression = data.get("expression")
174
+ if expression is not None:
175
+ expression = _string(expression, f"{here}.expression")
176
+ keys[key] = (_string(data["document"], f"{here}.document"), expression)
177
+ return keys
178
+
179
+
180
+ def spec_from_dict(data: object, source: str) -> ProviderSpec:
181
+ """Build a validated ``ProviderSpec`` from decoded provider JSON.
182
+
183
+ Args:
184
+ data: The decoded JSON value of one provider file.
185
+ source: The file name, used to prefix error messages.
186
+
187
+ Raises:
188
+ ValueError: If a field is missing, unknown or of the wrong type, or if
189
+ ``ProviderSpec`` rejects the result. The message names ``source``
190
+ and the field.
191
+ """
192
+ fields = _fields(
193
+ data,
194
+ source,
195
+ required=("name",),
196
+ optional=(
197
+ "notes",
198
+ "dmi_match",
199
+ "probes",
200
+ "base_urls",
201
+ "request_headers",
202
+ "auth",
203
+ "documents",
204
+ "keys",
205
+ ),
206
+ )
207
+ if "notes" in fields:
208
+ _strings(fields["notes"], f"{source}: notes")
209
+ auth = fields.get("auth")
210
+ parts: dict[str, Any] = {
211
+ "name": _string(fields["name"], f"{source}: name"),
212
+ "dmi_match": _strings(fields.get("dmi_match", []), f"{source}: dmi_match"),
213
+ "probes": _probes(fields.get("probes", []), f"{source}: probes"),
214
+ "base_urls": _strings(fields.get("base_urls", []), f"{source}: base_urls"),
215
+ "request_headers": _string_map(
216
+ fields.get("request_headers", {}), f"{source}: request_headers"
217
+ ),
218
+ "auth": None if auth is None else _auth(auth, f"{source}: auth"),
219
+ "documents": _documents(fields.get("documents", []), f"{source}: documents"),
220
+ "keys": _keys(fields.get("keys", {}), f"{source}: keys"),
221
+ }
222
+ try:
223
+ return ProviderSpec(**parts)
224
+ except ValueError as err:
225
+ msg = f"{source}: {err}"
226
+ raise ValueError(msg) from err
227
+
228
+
229
+ def _read_json(directory: Traversable, name: str) -> object:
230
+ try:
231
+ return json.loads((directory / name).read_text(encoding="utf-8"))
232
+ except FileNotFoundError:
233
+ msg = f"{name}: file not found in the provider data directory"
234
+ raise ValueError(msg) from None
235
+ except json.JSONDecodeError as err:
236
+ msg = f"{name}: invalid JSON: {err}"
237
+ raise ValueError(msg) from err
238
+
239
+
240
+ def load_builtins() -> tuple[ProviderSpec, ...]:
241
+ """Return the built-in provider specs in registry order.
242
+
243
+ Raises:
244
+ ValueError: If a data file is malformed, a listed provider has no file,
245
+ or a file's ``name`` does not match its file name.
246
+ """
247
+ directory = resources.files("cloud_metadata.providers") / "data"
248
+ index = _fields(
249
+ _read_json(directory, _INDEX), _INDEX, required=("providers",), optional=()
250
+ )
251
+ names = _strings(index["providers"], f"{_INDEX}: providers")
252
+ specs = []
253
+ for name in names:
254
+ filename = f"{name}.json"
255
+ spec = spec_from_dict(_read_json(directory, filename), filename)
256
+ if spec.name != name:
257
+ msg = f"{filename}: name {spec.name!r} does not match the file name"
258
+ raise ValueError(msg)
259
+ specs.append(spec)
260
+ return tuple(specs)
@@ -0,0 +1,194 @@
1
+ # Copyright (c) 2026 SUSE LLC. All rights reserved.
2
+ #
3
+ # This file is part of cloud-metadata. cloud-metadata provides one command
4
+ # and one Python API that return the same standard instance metadata on every
5
+ # supported public cloud.
6
+ #
7
+ # This program is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ """Data types that describe a cloud provider."""
21
+
22
+ from collections.abc import Mapping
23
+ from dataclasses import dataclass, field
24
+ from string import Formatter
25
+ from typing import Literal
26
+ from urllib.parse import urlsplit
27
+
28
+ STANDARD_KEYS = (
29
+ "instance-id",
30
+ "instance-type",
31
+ "region",
32
+ "zone",
33
+ "private-ipv4",
34
+ "private-ipv6",
35
+ "public-ipv4",
36
+ "public-ipv6",
37
+ "ipv6",
38
+ "hostname",
39
+ "image-id",
40
+ )
41
+ DOCUMENT_FORMATS = ("json", "text")
42
+ AUTH_METHODS = ("GET", "POST", "PUT")
43
+
44
+
45
+ @dataclass(frozen=True)
46
+ class Probe:
47
+ """A path that confirms a provider during detection.
48
+
49
+ The path is resolved against each of the provider's base URLs and sent with
50
+ the same headers and token flow as a normal request.
51
+ """
52
+
53
+ path: str
54
+
55
+
56
+ @dataclass(frozen=True)
57
+ class Auth:
58
+ """A token flow: request a token, then send it on later requests."""
59
+
60
+ method: str
61
+ path: str
62
+ apply_header: str
63
+ request_headers: Mapping[str, str] = field(default_factory=dict)
64
+
65
+
66
+ @dataclass(frozen=True)
67
+ class Document:
68
+ """A named metadata document: its path and body format.
69
+
70
+ A path can contain placeholders such as ``{mac}``. ``params`` maps each
71
+ placeholder to the name of a ``text`` document whose body is put in its
72
+ place, so a path that depends on another value (for example a MAC address)
73
+ stays data.
74
+ """
75
+
76
+ path: str
77
+ format: Literal["json", "text"]
78
+ params: Mapping[str, str] = field(default_factory=dict)
79
+
80
+
81
+ @dataclass(frozen=True)
82
+ class ProviderSpec:
83
+ """Everything the engine and detection need to know about one provider."""
84
+
85
+ name: str
86
+ dmi_match: tuple[str, ...] = ()
87
+ probes: tuple[Probe, ...] = ()
88
+ base_urls: tuple[str, ...] = ()
89
+ request_headers: Mapping[str, str] = field(default_factory=dict)
90
+ auth: Auth | None = None
91
+ documents: Mapping[str, Document] = field(default_factory=dict)
92
+ keys: Mapping[str, tuple[str, str | None]] = field(default_factory=dict)
93
+
94
+ def __post_init__(self) -> None:
95
+ """Validate the spec. Errors are ``ValueError`` naming the bad field."""
96
+ self._check_name()
97
+ self._check_base_urls()
98
+ self._check_probes()
99
+ self._check_auth()
100
+ self._check_documents()
101
+ self._check_keys()
102
+
103
+ def _check_name(self) -> None:
104
+ if not isinstance(self.name, str) or not self.name.strip():
105
+ msg = "name: must be a non-empty string"
106
+ raise ValueError(msg)
107
+
108
+ def _check_base_urls(self) -> None:
109
+ for index, url in enumerate(self.base_urls):
110
+ parts = urlsplit(url)
111
+ if parts.scheme != "http" or not parts.netloc:
112
+ msg = f"base_urls[{index}]: must be an http URL, got {url!r}"
113
+ raise ValueError(msg)
114
+
115
+ def _check_probes(self) -> None:
116
+ for index, probe in enumerate(self.probes):
117
+ _check_path(f"probes[{index}].path", probe.path)
118
+
119
+ def _check_auth(self) -> None:
120
+ auth = self.auth
121
+ if auth is None:
122
+ return
123
+ if auth.method not in AUTH_METHODS:
124
+ msg = f"auth.method: must be one of {AUTH_METHODS}, got {auth.method!r}"
125
+ raise ValueError(msg)
126
+ _check_path("auth.path", auth.path)
127
+ if not auth.apply_header or not auth.apply_header.strip():
128
+ msg = "auth.apply_header: must be a non-empty header name"
129
+ raise ValueError(msg)
130
+
131
+ def _check_documents(self) -> None:
132
+ for name, document in self.documents.items():
133
+ if document.format not in DOCUMENT_FORMATS:
134
+ msg = (
135
+ f"documents[{name!r}].format: must be one of "
136
+ f"{DOCUMENT_FORMATS}, got {document.format!r}"
137
+ )
138
+ raise ValueError(msg)
139
+ _check_path(f"documents[{name!r}].path", document.path)
140
+ self._check_params(name, document)
141
+ self._check_param_cycles()
142
+
143
+ def _check_params(self, name: str, document: Document) -> None:
144
+ placeholders = {
145
+ field_name
146
+ for _, field_name, _, _ in Formatter().parse(document.path)
147
+ if field_name is not None
148
+ }
149
+ declared = set(document.params)
150
+ if placeholders != declared:
151
+ msg = (
152
+ f"documents[{name!r}].params: placeholders {sorted(placeholders)} "
153
+ f"in the path do not match params {sorted(declared)}"
154
+ )
155
+ raise ValueError(msg)
156
+ for param, target in document.params.items():
157
+ where = f"documents[{name!r}].params[{param!r}]"
158
+ referenced = self.documents.get(target)
159
+ if referenced is None:
160
+ msg = f"{where}: unknown document {target!r}"
161
+ raise ValueError(msg)
162
+ if referenced.format != "text":
163
+ msg = f"{where}: document {target!r} must be a text document"
164
+ raise ValueError(msg)
165
+
166
+ def _check_param_cycles(self) -> None:
167
+ for start in self.documents:
168
+ seen: set[str] = set()
169
+ pending = [start]
170
+ while pending:
171
+ current = pending.pop()
172
+ for target in self.documents[current].params.values():
173
+ if target == start:
174
+ msg = f"documents[{start!r}].params: depends on itself"
175
+ raise ValueError(msg)
176
+ if target not in seen:
177
+ seen.add(target)
178
+ pending.append(target)
179
+
180
+ def _check_keys(self) -> None:
181
+ for key, (name, expression) in self.keys.items():
182
+ document = self.documents.get(name)
183
+ if document is None:
184
+ msg = f"keys[{key!r}]: unknown document {name!r}"
185
+ raise ValueError(msg)
186
+ if expression is not None and not isinstance(expression, str):
187
+ msg = f"keys[{key!r}]: expression must be a string or None"
188
+ raise ValueError(msg)
189
+
190
+
191
+ def _check_path(field_name: str, path: str) -> None:
192
+ if not isinstance(path, str) or not path.startswith("/"):
193
+ msg = f"{field_name}: must start with '/', got {path!r}"
194
+ raise ValueError(msg)
@@ -0,0 +1,113 @@
1
+ {
2
+ "name": "alibaba",
3
+ "notes": [
4
+ "Alibaba Cloud ECS instance metadata service (token mode with fallback).",
5
+ "The service answers one plain-text value per path under /latest/meta-data/, so every key has its own text document. Paths, the token flow and the address follow https://www.alibabacloud.com/help/en/ecs/user-guide/view-instance-metadata",
6
+ "public-ipv4 is the public address of the primary network interface. eipv4 (an attached Elastic IP) is not mapped.",
7
+ "IPv6 addresses are at network/interfaces/macs/<mac>/ipv6s, so the mac document is fetched first and put into the path. Nothing in the metadata says whether an address is public or private, so only the scope-less ipv6 key is mapped and private-ipv6 and public-ipv6 stay unavailable. The format of ipv6s is not confirmed on a real instance (the documentation shows an unquoted [2408:...]), so first_ipv6 reads it as text."
8
+ ],
9
+ "dmi_match": [
10
+ "alibaba"
11
+ ],
12
+ "probes": [
13
+ {
14
+ "path": "/latest/meta-data/"
15
+ }
16
+ ],
17
+ "base_urls": [
18
+ "http://100.100.100.200"
19
+ ],
20
+ "auth": {
21
+ "method": "PUT",
22
+ "path": "/latest/api/token",
23
+ "apply_header": "X-aliyun-ecs-metadata-token",
24
+ "request_headers": {
25
+ "X-aliyun-ecs-metadata-token-ttl-seconds": "21600"
26
+ }
27
+ },
28
+ "documents": [
29
+ {
30
+ "name": "instance-id",
31
+ "path": "/latest/meta-data/instance-id",
32
+ "format": "text"
33
+ },
34
+ {
35
+ "name": "instance-type",
36
+ "path": "/latest/meta-data/instance/instance-type",
37
+ "format": "text"
38
+ },
39
+ {
40
+ "name": "region-id",
41
+ "path": "/latest/meta-data/region-id",
42
+ "format": "text"
43
+ },
44
+ {
45
+ "name": "zone-id",
46
+ "path": "/latest/meta-data/zone-id",
47
+ "format": "text"
48
+ },
49
+ {
50
+ "name": "private-ipv4",
51
+ "path": "/latest/meta-data/private-ipv4",
52
+ "format": "text"
53
+ },
54
+ {
55
+ "name": "public-ipv4",
56
+ "path": "/latest/meta-data/public-ipv4",
57
+ "format": "text"
58
+ },
59
+ {
60
+ "name": "hostname",
61
+ "path": "/latest/meta-data/hostname",
62
+ "format": "text"
63
+ },
64
+ {
65
+ "name": "mac",
66
+ "path": "/latest/meta-data/mac",
67
+ "format": "text"
68
+ },
69
+ {
70
+ "name": "ipv6s",
71
+ "path": "/latest/meta-data/network/interfaces/macs/{mac}/ipv6s",
72
+ "format": "text",
73
+ "params": {
74
+ "mac": "mac"
75
+ }
76
+ },
77
+ {
78
+ "name": "image-id",
79
+ "path": "/latest/meta-data/image-id",
80
+ "format": "text"
81
+ }
82
+ ],
83
+ "keys": {
84
+ "instance-id": {
85
+ "document": "instance-id"
86
+ },
87
+ "instance-type": {
88
+ "document": "instance-type"
89
+ },
90
+ "region": {
91
+ "document": "region-id"
92
+ },
93
+ "zone": {
94
+ "document": "zone-id"
95
+ },
96
+ "private-ipv4": {
97
+ "document": "private-ipv4"
98
+ },
99
+ "public-ipv4": {
100
+ "document": "public-ipv4"
101
+ },
102
+ "hostname": {
103
+ "document": "hostname"
104
+ },
105
+ "ipv6": {
106
+ "document": "ipv6s",
107
+ "expression": "first_ipv6(@)"
108
+ },
109
+ "image-id": {
110
+ "document": "image-id"
111
+ }
112
+ }
113
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "amazon",
3
+ "notes": [
4
+ "Amazon EC2 instance metadata service (IMDSv2, with IMDSv1 fallback).",
5
+ "Detection values (base URLs, probe path, token flow) come from provider.py in cloud-registration-engine. Key mappings follow the EC2 User Guide: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html",
6
+ "private-ipv4 uses local-ipv4, not the identity document's privateIp, because privateIp holds the IPv6 address on an IPv6-only instance. local-ipv4 answers 404 there, which is reported as unavailable. public-ipv6 is ipv6 (the first IPv6 address of the primary network interface; AWS IPv6 addresses are globally unique). EC2 has no private IPv6 address, so private-ipv6 is not mapped."
7
+ ],
8
+ "dmi_match": [
9
+ "amazon",
10
+ "ec2"
11
+ ],
12
+ "probes": [
13
+ {
14
+ "path": "/latest/meta-data/"
15
+ }
16
+ ],
17
+ "base_urls": [
18
+ "http://169.254.169.254",
19
+ "http://[fd00:ec2::254]"
20
+ ],
21
+ "auth": {
22
+ "method": "PUT",
23
+ "path": "/latest/api/token",
24
+ "apply_header": "X-aws-ec2-metadata-token",
25
+ "request_headers": {
26
+ "X-aws-ec2-metadata-token-ttl-seconds": "60"
27
+ }
28
+ },
29
+ "documents": [
30
+ {
31
+ "name": "identity",
32
+ "path": "/latest/dynamic/instance-identity/document",
33
+ "format": "json"
34
+ },
35
+ {
36
+ "name": "local-ipv4",
37
+ "path": "/latest/meta-data/local-ipv4",
38
+ "format": "text"
39
+ },
40
+ {
41
+ "name": "public-ipv4",
42
+ "path": "/latest/meta-data/public-ipv4",
43
+ "format": "text"
44
+ },
45
+ {
46
+ "name": "ipv6",
47
+ "path": "/latest/meta-data/ipv6",
48
+ "format": "text"
49
+ },
50
+ {
51
+ "name": "hostname",
52
+ "path": "/latest/meta-data/hostname",
53
+ "format": "text"
54
+ }
55
+ ],
56
+ "keys": {
57
+ "instance-id": {
58
+ "document": "identity",
59
+ "expression": "instanceId"
60
+ },
61
+ "instance-type": {
62
+ "document": "identity",
63
+ "expression": "instanceType"
64
+ },
65
+ "region": {
66
+ "document": "identity",
67
+ "expression": "region"
68
+ },
69
+ "zone": {
70
+ "document": "identity",
71
+ "expression": "availabilityZone"
72
+ },
73
+ "private-ipv4": {
74
+ "document": "local-ipv4"
75
+ },
76
+ "public-ipv4": {
77
+ "document": "public-ipv4"
78
+ },
79
+ "public-ipv6": {
80
+ "document": "ipv6"
81
+ },
82
+ "ipv6": {
83
+ "document": "ipv6"
84
+ },
85
+ "hostname": {
86
+ "document": "hostname"
87
+ },
88
+ "image-id": {
89
+ "document": "identity",
90
+ "expression": "imageId"
91
+ },
92
+ "architecture": {
93
+ "document": "identity",
94
+ "expression": "architecture"
95
+ }
96
+ }
97
+ }