Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Artifacts.getContainerImage
Explore with Pulumi AI
This data source provides details about a specific Container Image resource in Oracle Cloud Infrastructure Artifacts service.
Get container image metadata.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testContainerImage = oci.Artifacts.getContainerImage({
    imageId: containerImageId,
});
import pulumi
import pulumi_oci as oci
test_container_image = oci.Artifacts.get_container_image(image_id=container_image_id)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/artifacts"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := artifacts.GetContainerImage(ctx, &artifacts.GetContainerImageArgs{
			ImageId: containerImageId,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testContainerImage = Oci.Artifacts.GetContainerImage.Invoke(new()
    {
        ImageId = containerImageId,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Artifacts.ArtifactsFunctions;
import com.pulumi.oci.Artifacts.inputs.GetContainerImageArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var testContainerImage = ArtifactsFunctions.getContainerImage(GetContainerImageArgs.builder()
            .imageId(containerImageId)
            .build());
    }
}
variables:
  testContainerImage:
    fn::invoke:
      function: oci:Artifacts:getContainerImage
      arguments:
        imageId: ${containerImageId}
Using getContainerImage
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getContainerImage(args: GetContainerImageArgs, opts?: InvokeOptions): Promise<GetContainerImageResult>
function getContainerImageOutput(args: GetContainerImageOutputArgs, opts?: InvokeOptions): Output<GetContainerImageResult>def get_container_image(image_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetContainerImageResult
def get_container_image_output(image_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetContainerImageResult]func GetContainerImage(ctx *Context, args *GetContainerImageArgs, opts ...InvokeOption) (*GetContainerImageResult, error)
func GetContainerImageOutput(ctx *Context, args *GetContainerImageOutputArgs, opts ...InvokeOption) GetContainerImageResultOutput> Note: This function is named GetContainerImage in the Go SDK.
public static class GetContainerImage 
{
    public static Task<GetContainerImageResult> InvokeAsync(GetContainerImageArgs args, InvokeOptions? opts = null)
    public static Output<GetContainerImageResult> Invoke(GetContainerImageInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetContainerImageResult> getContainerImage(GetContainerImageArgs args, InvokeOptions options)
public static Output<GetContainerImageResult> getContainerImage(GetContainerImageArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Artifacts/getContainerImage:getContainerImage
  arguments:
    # arguments dictionaryThe following arguments are supported:
getContainerImage Result
The following output properties are available:
- CompartmentId string
- The compartment OCID to which the container image belongs. Inferred from the container repository.
- CreatedBy string
- The OCID of the user or principal that pushed the version.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Digest string
- The sha256 digest of the image layer.
- DisplayName string
- The repository name and the most recent version associated with the image. If there are no versions associated with the image, then last known version and digest are used instead. If the last known version is unavailable, then 'unknown' is used instead of the version. Example: ubuntu:latestorubuntu:latest@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageId string
- Layers
List<GetContainer Image Layer> 
- Layers of which the image is composed, ordered by the layer digest.
- LayersSize stringIn Bytes 
- The total size of the container image layers in bytes.
- ManifestSize intIn Bytes 
- The size of the container image manifest in bytes.
- PullCount string
- Total number of pulls.
- RepositoryId string
- The OCID of the container repository.
- RepositoryName string
- The container repository name.
- State string
- The current state of the container image.
- Dictionary<string, string>
- The system tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The creation time of the version.
- TimeLast stringPulled 
- An RFC 3339 timestamp indicating when the image was last pulled.
- Version string
- The version name.
- Versions
List<GetContainer Image Version> 
- The versions associated with this image.
- CompartmentId string
- The compartment OCID to which the container image belongs. Inferred from the container repository.
- CreatedBy string
- The OCID of the user or principal that pushed the version.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Digest string
- The sha256 digest of the image layer.
- DisplayName string
- The repository name and the most recent version associated with the image. If there are no versions associated with the image, then last known version and digest are used instead. If the last known version is unavailable, then 'unknown' is used instead of the version. Example: ubuntu:latestorubuntu:latest@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageId string
- Layers
[]GetContainer Image Layer 
- Layers of which the image is composed, ordered by the layer digest.
- LayersSize stringIn Bytes 
- The total size of the container image layers in bytes.
- ManifestSize intIn Bytes 
- The size of the container image manifest in bytes.
- PullCount string
- Total number of pulls.
- RepositoryId string
- The OCID of the container repository.
- RepositoryName string
- The container repository name.
- State string
- The current state of the container image.
- map[string]string
- The system tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The creation time of the version.
- TimeLast stringPulled 
- An RFC 3339 timestamp indicating when the image was last pulled.
- Version string
- The version name.
- Versions
[]GetContainer Image Version 
- The versions associated with this image.
- compartmentId String
- The compartment OCID to which the container image belongs. Inferred from the container repository.
- createdBy String
- The OCID of the user or principal that pushed the version.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- digest String
- The sha256 digest of the image layer.
- displayName String
- The repository name and the most recent version associated with the image. If there are no versions associated with the image, then last known version and digest are used instead. If the last known version is unavailable, then 'unknown' is used instead of the version. Example: ubuntu:latestorubuntu:latest@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- The provider-assigned unique ID for this managed resource.
- imageId String
- layers
List<GetContainer Image Layer> 
- Layers of which the image is composed, ordered by the layer digest.
- layersSize StringIn Bytes 
- The total size of the container image layers in bytes.
- manifestSize IntegerIn Bytes 
- The size of the container image manifest in bytes.
- pullCount String
- Total number of pulls.
- repositoryId String
- The OCID of the container repository.
- repositoryName String
- The container repository name.
- state String
- The current state of the container image.
- Map<String,String>
- The system tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The creation time of the version.
- timeLast StringPulled 
- An RFC 3339 timestamp indicating when the image was last pulled.
- version String
- The version name.
- versions
List<GetContainer Image Version> 
- The versions associated with this image.
- compartmentId string
- The compartment OCID to which the container image belongs. Inferred from the container repository.
- createdBy string
- The OCID of the user or principal that pushed the version.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- digest string
- The sha256 digest of the image layer.
- displayName string
- The repository name and the most recent version associated with the image. If there are no versions associated with the image, then last known version and digest are used instead. If the last known version is unavailable, then 'unknown' is used instead of the version. Example: ubuntu:latestorubuntu:latest@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id string
- The provider-assigned unique ID for this managed resource.
- imageId string
- layers
GetContainer Image Layer[] 
- Layers of which the image is composed, ordered by the layer digest.
- layersSize stringIn Bytes 
- The total size of the container image layers in bytes.
- manifestSize numberIn Bytes 
- The size of the container image manifest in bytes.
- pullCount string
- Total number of pulls.
- repositoryId string
- The OCID of the container repository.
- repositoryName string
- The container repository name.
- state string
- The current state of the container image.
- {[key: string]: string}
- The system tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated string
- The creation time of the version.
- timeLast stringPulled 
- An RFC 3339 timestamp indicating when the image was last pulled.
- version string
- The version name.
- versions
GetContainer Image Version[] 
- The versions associated with this image.
- compartment_id str
- The compartment OCID to which the container image belongs. Inferred from the container repository.
- created_by str
- The OCID of the user or principal that pushed the version.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- digest str
- The sha256 digest of the image layer.
- display_name str
- The repository name and the most recent version associated with the image. If there are no versions associated with the image, then last known version and digest are used instead. If the last known version is unavailable, then 'unknown' is used instead of the version. Example: ubuntu:latestorubuntu:latest@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id str
- The provider-assigned unique ID for this managed resource.
- image_id str
- layers
Sequence[GetContainer Image Layer] 
- Layers of which the image is composed, ordered by the layer digest.
- layers_size_ strin_ bytes 
- The total size of the container image layers in bytes.
- manifest_size_ intin_ bytes 
- The size of the container image manifest in bytes.
- pull_count str
- Total number of pulls.
- repository_id str
- The OCID of the container repository.
- repository_name str
- The container repository name.
- state str
- The current state of the container image.
- Mapping[str, str]
- The system tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- time_created str
- The creation time of the version.
- time_last_ strpulled 
- An RFC 3339 timestamp indicating when the image was last pulled.
- version str
- The version name.
- versions
Sequence[GetContainer Image Version] 
- The versions associated with this image.
- compartmentId String
- The compartment OCID to which the container image belongs. Inferred from the container repository.
- createdBy String
- The OCID of the user or principal that pushed the version.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- digest String
- The sha256 digest of the image layer.
- displayName String
- The repository name and the most recent version associated with the image. If there are no versions associated with the image, then last known version and digest are used instead. If the last known version is unavailable, then 'unknown' is used instead of the version. Example: ubuntu:latestorubuntu:latest@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- The provider-assigned unique ID for this managed resource.
- imageId String
- layers List<Property Map>
- Layers of which the image is composed, ordered by the layer digest.
- layersSize StringIn Bytes 
- The total size of the container image layers in bytes.
- manifestSize NumberIn Bytes 
- The size of the container image manifest in bytes.
- pullCount String
- Total number of pulls.
- repositoryId String
- The OCID of the container repository.
- repositoryName String
- The container repository name.
- state String
- The current state of the container image.
- Map<String>
- The system tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The creation time of the version.
- timeLast StringPulled 
- An RFC 3339 timestamp indicating when the image was last pulled.
- version String
- The version name.
- versions List<Property Map>
- The versions associated with this image.
Supporting Types
GetContainerImageLayer   
- Digest string
- The sha256 digest of the image layer.
- SizeIn stringBytes 
- The size of the layer in bytes.
- TimeCreated string
- The creation time of the version.
- Digest string
- The sha256 digest of the image layer.
- SizeIn stringBytes 
- The size of the layer in bytes.
- TimeCreated string
- The creation time of the version.
- digest String
- The sha256 digest of the image layer.
- sizeIn StringBytes 
- The size of the layer in bytes.
- timeCreated String
- The creation time of the version.
- digest string
- The sha256 digest of the image layer.
- sizeIn stringBytes 
- The size of the layer in bytes.
- timeCreated string
- The creation time of the version.
- digest str
- The sha256 digest of the image layer.
- size_in_ strbytes 
- The size of the layer in bytes.
- time_created str
- The creation time of the version.
- digest String
- The sha256 digest of the image layer.
- sizeIn StringBytes 
- The size of the layer in bytes.
- timeCreated String
- The creation time of the version.
GetContainerImageVersion   
- CreatedBy string
- The OCID of the user or principal that pushed the version.
- TimeCreated string
- The creation time of the version.
- Version string
- The version name.
- CreatedBy string
- The OCID of the user or principal that pushed the version.
- TimeCreated string
- The creation time of the version.
- Version string
- The version name.
- createdBy String
- The OCID of the user or principal that pushed the version.
- timeCreated String
- The creation time of the version.
- version String
- The version name.
- createdBy string
- The OCID of the user or principal that pushed the version.
- timeCreated string
- The creation time of the version.
- version string
- The version name.
- created_by str
- The OCID of the user or principal that pushed the version.
- time_created str
- The creation time of the version.
- version str
- The version name.
- createdBy String
- The OCID of the user or principal that pushed the version.
- timeCreated String
- The creation time of the version.
- version String
- The version name.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.