Table: oci_artifacts_container_repository - Query OCI Artifacts Container Repositories using SQL
Oracle Cloud Infrastructure (OCI) Artifacts is a fully managed, scalable, and secure artifact storage and sharing service. It provides a repository for storing and sharing artifacts like Docker images and helps you manage their deployment. Artifacts Container Repository is a part of OCI Artifacts that stores Docker images.
Table Usage Guide
The oci_artifacts_container_repository
table provides insights into the OCI Artifacts Container Repositories. DevOps engineers, developers, and system administrators can leverage this table to explore and manage Docker images stored in the repositories. It can be used to uncover information about Docker images, such as their tags, layers, and associated metadata.
Examples
Basic info
Explore the basic information of your OCI artifacts container repository to understand its current state and usage. This can be useful in managing resources, assessing security, and tracking changes over time.
select display_name, id, image_count, is_immutable, is_public, layer_count, layers_size_in_bytes, billable_size_in_gbs, time_last_pushed, lifecycle_state as statefrom oci_artifacts_container_repository;
select display_name, id, image_count, is_immutable, is_public, layer_count, layers_size_in_bytes, billable_size_in_gbs, time_last_pushed, lifecycle_state as statefrom oci_artifacts_container_repository;
List repositories that are not public
Discover the segments that contain private repositories in your Oracle Cloud Infrastructure's artifact container. This can be beneficial to assess the elements within your infrastructure that are not publicly accessible, ensuring data privacy and security.
select display_name, id, image_count, is_immutable, is_public, layer_countfrom oci_artifacts_container_repositorywhere not is_public;
select display_name, id, image_count, is_immutable, is_public, layer_countfrom oci_artifacts_container_repositorywhere not is_public;
List repositories that are immutable
Discover the segments that are marked as immutable within a container repository. This is useful for understanding storage details and identifying repositories that cannot be changed, assisting in maintaining data integrity and security.
select display_name, id, is_public, is_immutable, layer_count, layers_size_in_bytesfrom oci_artifacts_container_repositorywhere is_immutable;
select display_name, id, is_public, is_immutable, layer_count, layers_size_in_bytesfrom oci_artifacts_container_repositorywhere is_immutable = 1;
List repositories created in last 30 days
Identify newly created repositories within the past month. This is useful for tracking recent additions and understanding the growth and activity within your system.
select display_name, id, time_created, created_by, lifecycle_statefrom oci_artifacts_container_repositorywhere time_created >= now() - interval '30' day;
select display_name, id, time_created, created_by, lifecycle_statefrom oci_artifacts_container_repositorywhere time_created >= datetime('now', '-30 day');
Get layer details of repositories
Explore the layer details of your repositories to understand their size and count. This can be useful for managing storage and optimizing repository performance.
select display_name, layer_count, layers_size_in_bytesfrom oci_artifacts_container_repository;
select display_name, layer_count, layers_size_in_bytesfrom oci_artifacts_container_repository;
List top 5 billable repositories
Uncover the details of your most resource-intensive repositories. This query helps you identify and prioritize the top five repositories based on their billable size for efficient resource management.
select display_name, is_immutable, is_public, billable_size_in_gbsfrom oci_artifacts_container_repositoryorder by billable_size_in_gbs desclimit 5;
select display_name, is_immutable, is_public, billable_size_in_gbsfrom oci_artifacts_container_repositoryorder by billable_size_in_gbs desclimit 5;
List available repositories
Discover the segments that are readily accessible in your system by exploring the available repositories. This query is particularly useful in instances where you need to manage the lifecycle of your resources and understand who created them and when.
select display_name, id, time_created, created_by, lifecycle_statefrom oci_artifacts_container_repositorywhere lifecycle_state = 'AVAILABLE';
select display_name, id, time_created, created_by, lifecycle_statefrom oci_artifacts_container_repositorywhere lifecycle_state = 'AVAILABLE';
Schema for oci_artifacts_container_repository
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
billable_size_in_gbs | bigint | Total storage size in GBs that will be charged. | |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
created_by | text | The id of the user or principal that created the resource. | |
display_name | text | = | The container repository name. |
id | text | = | The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container repository. |
image_count | bigint | Total number of images. | |
is_immutable | boolean | Whether the repository is immutable. Images cannot be overwritten in an immutable repository. | |
is_public | boolean | = | Whether the repository is public. A public repository allows unauthenticated access. |
layer_count | bigint | Total number of layers. | |
layers_size_in_bytes | bigint | Total storage in bytes consumed by layers. | |
lifecycle_state | text | = | The current state of the container repository. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
time_created | timestamp with time zone | Time that Container Repository was created. | |
time_last_pushed | timestamp with time zone | An RFC 3339 timestamp indicating when an image was last pushed to the repository. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci
You can pass the configuration to the command with the --config
argument:
steampipe_export_oci --config '<your_config>' oci_artifacts_container_repository