Organizations
OCI Organizations (the Tenant Manager control plane), API version 20230401. A parent
tenancy creates child tenancies; together they form an organization, and each child is linked
to the parent per feature. Real OCI serves it on organizations.{region}.oci.{domain}; floci-oci
serves it on port 4599 with the other services.
Supported operations
| Area | Operations |
|---|---|
| Child tenancies | CreateChildTenancy |
| Organizations | ListOrganizations, GetOrganization, UpdateOrganization |
| Organization tenancies | ListOrganizationTenancies, GetOrganizationTenancy, DeleteOrganizationTenancy, RestoreOrganizationTenancy, ApproveOrganizationTenancyForTransfer, UnapproveOrganizationTenancyForTransfer |
| Links | ListLinks, GetLink, GetLinkWithTenancyNames, DeleteLink, ListLinkFeatures |
| Invitations | CreateSenderInvitation, GetSenderInvitation, ListSenderInvitations, UpdateSenderInvitation, CancelSenderInvitation, GetRecipientInvitation, ListRecipientInvitations, UpdateRecipientInvitation, AcceptRecipientInvitation, IgnoreRecipientInvitation |
| Governance | AddGovernance, RemoveGovernance |
| Work requests | Get, List, errors, logs (/20230401/workRequests) |
How isolation works
A child tenancy is a new tenancy OCID with its own home region. Requests signed with the child
tenancy (its OCID as the first part of the Signature keyId) land in that tenancy's own,
empty storage: they see none of the parent's resources, and GetTenancy reports the child's
name and home region. This mirrors how floci-aws member accounts work.
A child homed in another region reaches that region by default: a request whose Host names
no region (localhost:4599) lands in the signing tenancy's home region. Like any tenancy, the
child can use other regions only after subscribing to them.
Organizations, organization tenancies and links are stored with the parent tenancy, so a child
lists the same organization as its parent. Only the parent can update it, create more
children, terminate or restore a child, or terminate a link: the same calls signed by a child
are 404 NotAuthorizedOrNotFound.
Wire notes
CreateChildTenancy,UpdateOrganization,DeleteOrganizationTenancy,RestoreOrganizationTenancyandDeleteLinkreturn202with anopc-work-request-idheader and no body. The work request is alreadySUCCEEDED; forCreateChildTenancyitsresources[0].identifieris the new child tenancy OCID.- The
organizationTenancyIdpath parameter ofDeleteOrganizationTenancyandRestoreOrganizationTenancyis the child's tenancy OCID. The parent tenancy cannot be terminated this way (400 InvalidParameter). - Terminating needs an
ACTIVEmember, restoring aDELETEDone, andDeleteLinkanACTIVElink; anything else is409 Conflict. All three honourif-match. CreateSenderInvitationreturns200with the invitation, anetagand anopc-work-request-id;CancelSenderInvitationandAcceptRecipientInvitationreturn202with anopc-work-request-id;IgnoreRecipientInvitationand both updates return the invitation with anetag. Invitation lists are wrapped and take the SDK'sstatusandlifecycleStateenums;ListRecipientInvitationshas nolimitor sort, as in the SDK.ListLinksrejects alifecycleStateoutsideCREATING,ACTIVE,INACTIVE,UPDATING,FAILED,TERMINATEDwith400 InvalidParameter.- Lists are wrapped (
{"items":[…]}) and paged withopc-next-page. GetOrganization,GetOrganizationTenancyandGetLinkreturn anetag;UpdateOrganizationhonoursif-match.homeRegionmust be a region the parent tenancy is subscribed to (its home region, or one added withCreateRegionSubscription); otherwise the request fails with400 InvalidParameter.compartmentIdonCreateChildTenancyandListOrganizationsmust be the caller's own tenancy; another tenancy is404 NotAuthorizedOrNotFound.- A
CORElink is always created, plus one link per entry infeatures.
Emulator choices
The OCI SDKs leave these open, so floci-oci picks:
- Organizations data is global. Real OCI serves this API on a regional host and does not say whether its data is shared across regions; floci-oci keeps organizations, organization tenancies, links and their work requests tenancy-wide, like Identity, so every region of the tenancy sees the same organization.
homeRegionaccepts a region name (us-phoenix-1) or a region key (PHX).governanceStatusdefaults toOPTED_INwhen omitted.- Organizations and links get global OCIDs:
ocid1.organization.<realm>..…andocid1.link.<realm>..…. A child tenancy's OCID uses the realm of its home region. - When no
subscriptionIdis given, the organization gets a syntheticocid1.organizationssubscription…default subscription. - The child tenancy limit is not enforced. Oracle's
child-tenancy-countlimit defaults to 0 in every tenancy (service limits, Organizations), so a tenancy needs it raised before its first child; floci-oci behaves as a tenancy whose limit has been raised, and creates any number of children. - A new child starts with an administrator. The SDK only says that
policyNamenames "the administrator policy in the child tenancy". floci-oci seeds the child's IAM with anAdministratorsgroup, a user named afteradminEmail(also its email) in that group, and a policy namedpolicyName(Tenant_Admin_Policywhen omitted) with the single statementALLOW GROUP Administrators to manage all-resources IN TENANCY. Requests signed with the child see them; policies are stored, not evaluated. A tenancy that joins through an invitation already exists and is not seeded. - Termination is immediate and reversible.
DeleteOrganizationTenancymoves the member toDELETEDwithtimeLeftset and terminates its active links, under the work request typeTERMINATE_ORGANIZATION_TENANCY. The child tenancy stays registered and its data is kept, so requests signed with it still work.RestoreOrganizationTenancy(RESTORE_TENANCY) makes itACTIVEagain and reactivates the links its termination ended, but not links terminated on their own before. Real OCI does not document the termination lifecycle or how long a terminated tenancy stays restorable. -
DeleteLinkmoves the link toTERMINATEDwithtimeTerminatedset (TERMINATE_LINK), for any feature,COREincluded; the child stays a member of the organization. -
AddGovernanceandRemoveGovernanceset a member'sgovernanceStatustoOPTED_INorOPTED_OUT. The parent or the member itself may call them; asking for the status a member already has is409 Conflict; the member must be anACTIVEchild (the parent is400 InvalidParameter). Their work requests use the typesSELF_OPT_INandSELF_OPT_OUT, the closest values in the SDK enum (it names no add or remove type). Only membersOPTED_INare governed by the parent's governance rules. -
ApproveOrganizationTenancyForTransferandUnapproveOrganizationTenancyForTransfertake the parent tenancy ascompartmentId(mandatory, as in the SDK) and return the organization tenancy with anetag, synchronously, withisApprovedForTransferset or cleared. Only the parent may call them, on anACTIVEchild; asking for the flag the member already has is409 Conflict. The SDKs do not say who approves a transfer; floci-oci makes it the parent, like every other change to a member. Nothing moves the approved tenancy yet. ListLinkFeaturesreturnsCORE, which every link carries (the one feature the SDK names), followed by each other feature on anACTIVElink of the caller's organization. The SDK request has nopageorlimit, so the list is never paged: every feature comes back at once. Display names repeat the feature; the SDK fixes no catalogue of features or their descriptions.
Invitations
The SDKs give the shapes but not the flow, so floci-oci picks:
- The recipient invitation is delivered at once, with its own OCID
(
ocid1.recipientinvitation…, the sender's isocid1.senderinvitation…); each points at the other. Both startACTIVEwith statusPENDING, andsubjectsdefaults toLINK. - Only a tenancy that is not a child can invite (
404otherwise), and only a tenancy outside any organization can be invited or accept (409 Conflict). A second pending invitation to the same tenancy is also409 Conflict; inviting yourself is400 InvalidParameter. - Accepting makes the recipient a child of the sender: it joins the sender's organization
(created if needed) with a
CORElink plus one link per invitation feature, and both invitations becomeACCEPTED. - Ignoring marks the recipient's side
IGNORED. The sender's side staysPENDING, since its status enum has no ignored value, until the sender cancels it. - Cancel, accept and ignore need a
PENDINGinvitation (409 Conflictotherwise). Accepting is also409 Conflictwhen the recipient has joined another organization, or the sender has become a child, since the invitation was sent. - An invitation without
displayNameuses its own OCID as the name, because the summary shape requires one.
Not implemented yet
Domains, subscriptions and orders.
Quickstart
E="--endpoint http://localhost:4599"
TENANCY=ocid1.tenancy.oc1..flocilocaltenancy0000000000000000000000000000000000000000
oci organizations child-tenancy create $E --compartment-id "$TENANCY" \
--tenancy-name dev --home-region us-ashburn-1 --admin-email admin@example.com
oci organizations organization list $E --compartment-id "$TENANCY"
oci organizations link list $E