Most of the Oracle Cloud Infrastructure (OCI) resources are assigned with a unique ID called Oracle Cloud Identifier (OCID). This is used to uniquely identify each resource in a tenancy.
Uses Of OCID
- To perform services through OCI CLI and Terraform.
- To raise Service requests (SR).
- To analyze which resource is having a bug while performing troubleshooting.
OCID Uses Below Syntax:
ocid1.<RESOURCE TYPE>.<REALM>.[REGION][.FUTURE USE].<UNIQUE ID>
(1) ocid1: The numerical value indicates the version of OCID.
(2) Resource Type: Type of resource (eg: instance, volume, VCN, subnet, etc).
(3) Realm: A realm is a set of regions that share Resources. There are 3 types of realms.
- oc1 – Commercial realm
- oc2 – Government Cloud realm
- oc3 – Federal Government Cloud realm
(4) Region: The region in which resource is (eg: phx, eu-frankfurt-1, etc).
(5) Future Use: Reserved for future use.
(6) Unique ID: Unique portion of the ID. (format differ depending on the type of service and resource).
Example:
Tenancy OCID: ocid1.tenancy.oc1..aaaaaaaazaizaakcbfd33qif7atm2a5vwppteukesf6dtyxpxgm66kvx3fmq
Check out: List of Free Oracle Cloud Certification
How To Get OCID From Console
You can find OCID of any resource in Oracle Cloud Infrastructure (OCI) by going to that resource and checking the resource information.
1) OCID Of A Compartment In OCI
Register & Log in to the Oracle Cloud account, cloud.oracle.com
Note: First, you should have an Account at Oracle Cloud and if you don’t have one, then you can register FREE using our step-by-step video & guide that I covered in episode 30. You can get it by visiting k21academy.com/30.
(1) Navigate to identity under Governance & Administration and select Compartment
(2) In Compartment information we will get OCID
Note: When we delete a compartment and restore afterward the OCID of the compartment remains the same, only the name of the compartment changes. That means Oracle is providing the same compartment again rather than creating a new one.
To know more about Restoring Compartments in OCI click here https://k21academy.com/oci53
2) OCID Of A DB System In OCI
(1) Go to the Navigation menu and click on Bare Metal, VM & Exadata under Databases.
(2) Select the compartment and DB System.
(3) You will find the OCID in DB System information
Note: You need to provide a unique name to each IAM services (users, groups, dynamic groups, federations, and policies) but for other services like (compartments, Instances), the name can be the same within a tenancy so to uniquely identify these resources OCID is used.
To know more about IAM services in OCI click here
Conclusion
It is necessary to uniquely identify each resource in an Oracle Cloud Infrastructure. In order to do so, a unique ID is provided to each resource in the infrastructure. In this blog post, I have covered the Overview of OCID, OCID Syntax and explained where to find OCID of each resource. I hope it will help you understand the concept of OCID in OCI.
Related/Further Readings
Begin Your Cloud Journey
Begin your journey towards becoming a Certified Oracle Cloud Infrastructure Architect and earning a lot more in 2022 by joining our FREE CLASS. You will also know more about the Roles and Responsibilities, Job opportunities for OCI Architects in the market, and what to study Including Hands-On labs you must perform to clear the Oracle Cloud Architect Associate Certification (OCI) certification exam by registering for our FREE Masterclass.
Click on the below image to Register Our FREE Class on Master Oracle Cloud (OCI) and Get a Higher Paying Job!
Umer Khitab says
Hi,
Thaks for writing an article about OCID introduction. We are a private organization using Oracle Fusion to maintain the business operations. Could you please explain what activities user can perform if they know the OCID of the company? The context behind this query is that we have advance level customer support (ACS) from oracle and one of the Oracle engineers requested us to provide OCID number to help the us proactively with various cloud maintenance and future upgrade activities.
Rahul Dangayach says
Hi Umar,
An Oracle Cloud Identifier (OCID) is a unique identifier assigned by Oracle to identify resources in the Oracle Cloud Infrastructure (OCI). If someone has the OCID of a company in Oracle Fusion, it means they have access to that company’s resources in OCI, provided that they have the necessary permissions.
1. Depending on the level of permissions assigned to the OCID, a user can perform various activities related to the company’s resources in OCI. Some of these activities could include:
2. Accessing and modifying company data stored in OCI, such as databases, object storage, and file storage.
3. Creating and managing virtual machines, load balancers, and other compute resources used by the company.
4. Managing network resources, such as virtual cloud networks (VCNs), subnets, and security lists.
5. Managing identity and access management (IAM) policies for the company’s users, groups, and resources.
6. Monitoring and analyzing company resource usage and performance data.
If an Oracle engineer has requested your company’s OCID to proactively help with cloud maintenance and future upgrade activities, it is likely that they are looking to perform some or all of these activities on your company’s behalf. It is important to ensure that the engineer has been granted the appropriate level of access to the company’s resources in OCI and that their activities are closely monitored to ensure that they align with your company’s policies and procedures.
Hope this helps.
Thanks and Regards
Rahul Dangayach
Team K21Academy