Resource IDs
Every resource you create (an instance, a volume, a VPC, a tenant) has an id. You use it to address the resource from the fm CLI, the API and access policies.
This page covers:
- the id format;
- ids and UUIDs, and which form you can use where;
- ids in API responses;
- ids in FRNs, the names access policies match.
The id format
An id is a short prefix that names the kind of resource, an underscore, and 22 characters:
ins_LC85LZ7azzJA2W5nEPqZB1- The prefix tells you what the id refers to:
ins_is an instance,vol_a volume. The table below lists the common ones. - The 22 characters use the letters and digits except
0,O,Iandl, so an id is easy to read aloud and copy. They are case-sensitive. - Every id of a kind has the same length. Double-clicking an id selects all of it, prefix included.
| Prefix | Resource | Prefix | Resource |
|---|---|---|---|
org_ | Organization | lb_ | Load balancer |
ten_ | Tenant | dnz_ | DNS zone |
ins_ | Instance | db_ | Database |
img_ | Image | cch_ | Cache |
vol_ | Volume | mq_ | Message broker |
vsn_ | Volume snapshot | k8s_ | Kubernetes cluster |
vpc_ | VPC | np_ | Node pool |
sub_ | Subnet | sec_ | Secret |
sg_ | Security group | agw_ | Application gateway |
pip_ | Public IP | ws_ | Web server |
key_ | API key | pol_ | Access policy |
Some resources are addressed by name, not by id: object-storage buckets, SSH keys and container-registry repositories, for example. A flavor is addressed by its SKU. Names never get a prefix.
Ids and UUIDs
Every id is another way of writing a UUID. These two name the same instance:
ins_LC85LZ7azzJA2W5nEPqZB1
9b6b2d0e-1f4c-4a7e-9c3d-2b8f5e6a1d04Wherever you give an id, both forms are accepted: a CLI argument or flag, an API path or request body, and the id or tenant segment of an FRN in an access policy. So scripts and saved configuration that hold UUIDs keep working.
Two rules apply to what you send:
- A prefixed id must be of the kind expected there. A
vol_id where an instance id is expected is refused, even if the UUID behind it exists. - A UUID must be in its standard form: 36 characters, with hyphens, as in the example above.
Terraform provider releases 0.88.0 and later store and report prefixed ids; earlier releases use UUIDs. Read Upgrading the Terraform provider to public ids before you upgrade.
Ids in API responses
API responses always carry prefixed ids, as described on this page. Requests still accept either form, so a UUID you stored earlier keeps working.
The Frostmoln-Id-Format request header no longer changes the response: a request that sends Frostmoln-Id-Format: uuid also gets prefixed ids. You can stop sending the header.
Ids in FRNs
An FRN (Frostmoln Resource Name) is the name an access policy matches:
frn:<service>:<region>:<tenant>:<type>/<id>The tenant segment is the tenant's id (ten_…). The last segment identifies the resource: for most resources it is the prefixed id, a few keep their UUID there, and a resource addressed by name keeps its name. Copy an FRN from the portal rather than building one by hand.
frn:compute:*:ten_R4QGtXA8ExbdhFzJLJCiHk:instances/ins_2FP6y1umuR5VXWwoLLttRiThe FRN the portal shows for a resource carries its real region. In a policy target the region segment must be * (see Targets — FRN): the portal's policy builder sets it for you when you use a copied FRN, and a target you write by hand must use * there.
You may write a UUID in the tenant or id segment when you save a policy. The policy is stored in canonical form, and you get it back with the same ids as above: prefixed for most resources.