Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getContainerRepositories

This data source provides the list of Container Repositories in Oracle Cloud Infrastructure Artifacts service.

List container repositories in a compartment.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testContainerRepositories = Oci.Artifacts.GetContainerRepositories.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        CompartmentIdInSubtree = @var.Container_repository_compartment_id_in_subtree,
        DisplayName = @var.Container_repository_display_name,
        IsPublic = @var.Container_repository_is_public,
        RepositoryId = oci_artifacts_repository.Test_repository.Id,
        State = @var.Container_repository_state,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Artifacts"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Artifacts.GetContainerRepositories(ctx, &artifacts.GetContainerRepositoriesArgs{
			CompartmentId:          _var.Compartment_id,
			CompartmentIdInSubtree: pulumi.BoolRef(_var.Container_repository_compartment_id_in_subtree),
			DisplayName:            pulumi.StringRef(_var.Container_repository_display_name),
			IsPublic:               pulumi.BoolRef(_var.Container_repository_is_public),
			RepositoryId:           pulumi.StringRef(oci_artifacts_repository.Test_repository.Id),
			State:                  pulumi.StringRef(_var.Container_repository_state),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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.GetContainerRepositoriesArgs;
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 testContainerRepositories = ArtifactsFunctions.getContainerRepositories(GetContainerRepositoriesArgs.builder()
            .compartmentId(var_.compartment_id())
            .compartmentIdInSubtree(var_.container_repository_compartment_id_in_subtree())
            .displayName(var_.container_repository_display_name())
            .isPublic(var_.container_repository_is_public())
            .repositoryId(oci_artifacts_repository.test_repository().id())
            .state(var_.container_repository_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_container_repositories = oci.Artifacts.get_container_repositories(compartment_id=var["compartment_id"],
    compartment_id_in_subtree=var["container_repository_compartment_id_in_subtree"],
    display_name=var["container_repository_display_name"],
    is_public=var["container_repository_is_public"],
    repository_id=oci_artifacts_repository["test_repository"]["id"],
    state=var["container_repository_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testContainerRepositories = oci.Artifacts.getContainerRepositories({
    compartmentId: _var.compartment_id,
    compartmentIdInSubtree: _var.container_repository_compartment_id_in_subtree,
    displayName: _var.container_repository_display_name,
    isPublic: _var.container_repository_is_public,
    repositoryId: oci_artifacts_repository.test_repository.id,
    state: _var.container_repository_state,
});
variables:
  testContainerRepositories:
    Fn::Invoke:
      Function: oci:Artifacts:getContainerRepositories
      Arguments:
        compartmentId: ${var.compartment_id}
        compartmentIdInSubtree: ${var.container_repository_compartment_id_in_subtree}
        displayName: ${var.container_repository_display_name}
        isPublic: ${var.container_repository_is_public}
        repositoryId: ${oci_artifacts_repository.test_repository.id}
        state: ${var.container_repository_state}

Using getContainerRepositories

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 getContainerRepositories(args: GetContainerRepositoriesArgs, opts?: InvokeOptions): Promise<GetContainerRepositoriesResult>
function getContainerRepositoriesOutput(args: GetContainerRepositoriesOutputArgs, opts?: InvokeOptions): Output<GetContainerRepositoriesResult>
def get_container_repositories(compartment_id: Optional[str] = None,
                               compartment_id_in_subtree: Optional[bool] = None,
                               display_name: Optional[str] = None,
                               filters: Optional[Sequence[_artifacts.GetContainerRepositoriesFilter]] = None,
                               is_public: Optional[bool] = None,
                               repository_id: Optional[str] = None,
                               state: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetContainerRepositoriesResult
def get_container_repositories_output(compartment_id: Optional[pulumi.Input[str]] = None,
                               compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                               display_name: Optional[pulumi.Input[str]] = None,
                               filters: Optional[pulumi.Input[Sequence[pulumi.Input[_artifacts.GetContainerRepositoriesFilterArgs]]]] = None,
                               is_public: Optional[pulumi.Input[bool]] = None,
                               repository_id: Optional[pulumi.Input[str]] = None,
                               state: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetContainerRepositoriesResult]
func GetContainerRepositories(ctx *Context, args *GetContainerRepositoriesArgs, opts ...InvokeOption) (*GetContainerRepositoriesResult, error)
func GetContainerRepositoriesOutput(ctx *Context, args *GetContainerRepositoriesOutputArgs, opts ...InvokeOption) GetContainerRepositoriesResultOutput

> Note: This function is named GetContainerRepositories in the Go SDK.

public static class GetContainerRepositories 
{
    public static Task<GetContainerRepositoriesResult> InvokeAsync(GetContainerRepositoriesArgs args, InvokeOptions? opts = null)
    public static Output<GetContainerRepositoriesResult> Invoke(GetContainerRepositoriesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetContainerRepositoriesResult> getContainerRepositories(GetContainerRepositoriesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:Artifacts/getContainerRepositories:getContainerRepositories
  arguments:
    # arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment.

CompartmentIdInSubtree bool

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are inspected depending on the the setting of accessLevel. Default is false. Can only be set to true when calling the API on the tenancy (root compartment).

DisplayName string

A filter to return only resources that match the given display name exactly.

Filters List<GetContainerRepositoriesFilter>
IsPublic bool

A filter to return resources that match the isPublic value.

RepositoryId string

A filter to return container images only for the specified container repository OCID.

State string

A filter to return only resources that match the given lifecycle state name exactly.

CompartmentId string

The OCID of the compartment.

CompartmentIdInSubtree bool

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are inspected depending on the the setting of accessLevel. Default is false. Can only be set to true when calling the API on the tenancy (root compartment).

DisplayName string

A filter to return only resources that match the given display name exactly.

Filters []GetContainerRepositoriesFilter
IsPublic bool

A filter to return resources that match the isPublic value.

RepositoryId string

A filter to return container images only for the specified container repository OCID.

State string

A filter to return only resources that match the given lifecycle state name exactly.

compartmentId String

The OCID of the compartment.

compartmentIdInSubtree Boolean

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are inspected depending on the the setting of accessLevel. Default is false. Can only be set to true when calling the API on the tenancy (root compartment).

displayName String

A filter to return only resources that match the given display name exactly.

filters List<GetContainerRepositoriesFilter>
isPublic Boolean

A filter to return resources that match the isPublic value.

repositoryId String

A filter to return container images only for the specified container repository OCID.

state String

A filter to return only resources that match the given lifecycle state name exactly.

compartmentId string

The OCID of the compartment.

compartmentIdInSubtree boolean

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are inspected depending on the the setting of accessLevel. Default is false. Can only be set to true when calling the API on the tenancy (root compartment).

displayName string

A filter to return only resources that match the given display name exactly.

filters GetContainerRepositoriesFilter[]
isPublic boolean

A filter to return resources that match the isPublic value.

repositoryId string

A filter to return container images only for the specified container repository OCID.

state string

A filter to return only resources that match the given lifecycle state name exactly.

compartment_id str

The OCID of the compartment.

compartment_id_in_subtree bool

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are inspected depending on the the setting of accessLevel. Default is false. Can only be set to true when calling the API on the tenancy (root compartment).

display_name str

A filter to return only resources that match the given display name exactly.

filters GetContainerRepositoriesFilter]
is_public bool

A filter to return resources that match the isPublic value.

repository_id str

A filter to return container images only for the specified container repository OCID.

state str

A filter to return only resources that match the given lifecycle state name exactly.

compartmentId String

The OCID of the compartment.

compartmentIdInSubtree Boolean

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are inspected depending on the the setting of accessLevel. Default is false. Can only be set to true when calling the API on the tenancy (root compartment).

displayName String

A filter to return only resources that match the given display name exactly.

filters List<Property Map>
isPublic Boolean

A filter to return resources that match the isPublic value.

repositoryId String

A filter to return container images only for the specified container repository OCID.

state String

A filter to return only resources that match the given lifecycle state name exactly.

getContainerRepositories Result

The following output properties are available:

CompartmentId string

The OCID of the compartment in which the container repository exists.

ContainerRepositoryCollections List<GetContainerRepositoriesContainerRepositoryCollection>

The list of container_repository_collection.

Id string

The provider-assigned unique ID for this managed resource.

CompartmentIdInSubtree bool
DisplayName string

The container repository name.

Filters List<GetContainerRepositoriesFilter>
IsPublic bool

Whether the repository is public. A public repository allows unauthenticated access.

RepositoryId string
State string

The current state of the container repository.

CompartmentId string

The OCID of the compartment in which the container repository exists.

ContainerRepositoryCollections []GetContainerRepositoriesContainerRepositoryCollection

The list of container_repository_collection.

Id string

The provider-assigned unique ID for this managed resource.

CompartmentIdInSubtree bool
DisplayName string

The container repository name.

Filters []GetContainerRepositoriesFilter
IsPublic bool

Whether the repository is public. A public repository allows unauthenticated access.

RepositoryId string
State string

The current state of the container repository.

compartmentId String

The OCID of the compartment in which the container repository exists.

containerRepositoryCollections List<GetContainerRepositoriesContainerRepositoryCollection>

The list of container_repository_collection.

id String

The provider-assigned unique ID for this managed resource.

compartmentIdInSubtree Boolean
displayName String

The container repository name.

filters List<GetContainerRepositoriesFilter>
isPublic Boolean

Whether the repository is public. A public repository allows unauthenticated access.

repositoryId String
state String

The current state of the container repository.

compartmentId string

The OCID of the compartment in which the container repository exists.

containerRepositoryCollections GetContainerRepositoriesContainerRepositoryCollection[]

The list of container_repository_collection.

id string

The provider-assigned unique ID for this managed resource.

compartmentIdInSubtree boolean
displayName string

The container repository name.

filters GetContainerRepositoriesFilter[]
isPublic boolean

Whether the repository is public. A public repository allows unauthenticated access.

repositoryId string
state string

The current state of the container repository.

compartment_id str

The OCID of the compartment in which the container repository exists.

container_repository_collections GetContainerRepositoriesContainerRepositoryCollection]

The list of container_repository_collection.

id str

The provider-assigned unique ID for this managed resource.

compartment_id_in_subtree bool
display_name str

The container repository name.

filters GetContainerRepositoriesFilter]
is_public bool

Whether the repository is public. A public repository allows unauthenticated access.

repository_id str
state str

The current state of the container repository.

compartmentId String

The OCID of the compartment in which the container repository exists.

containerRepositoryCollections List<Property Map>

The list of container_repository_collection.

id String

The provider-assigned unique ID for this managed resource.

compartmentIdInSubtree Boolean
displayName String

The container repository name.

filters List<Property Map>
isPublic Boolean

Whether the repository is public. A public repository allows unauthenticated access.

repositoryId String
state String

The current state of the container repository.

Supporting Types

GetContainerRepositoriesContainerRepositoryCollection

ImageCount int

Total number of images.

Items List<GetContainerRepositoriesContainerRepositoryCollectionItem>
LayerCount int

Total number of layers.

LayersSizeInBytes string

Total storage in bytes consumed by layers.

RemainingItemsCount int
RepositoryCount int
ImageCount int

Total number of images.

Items []GetContainerRepositoriesContainerRepositoryCollectionItem
LayerCount int

Total number of layers.

LayersSizeInBytes string

Total storage in bytes consumed by layers.

RemainingItemsCount int
RepositoryCount int
imageCount Integer

Total number of images.

items List<GetContainerRepositoriesContainerRepositoryCollectionItem>
layerCount Integer

Total number of layers.

layersSizeInBytes String

Total storage in bytes consumed by layers.

remainingItemsCount Integer
repositoryCount Integer
imageCount number

Total number of images.

items GetContainerRepositoriesContainerRepositoryCollectionItem[]
layerCount number

Total number of layers.

layersSizeInBytes string

Total storage in bytes consumed by layers.

remainingItemsCount number
repositoryCount number
image_count int

Total number of images.

items GetContainerRepositoriesContainerRepositoryCollectionItem]
layer_count int

Total number of layers.

layers_size_in_bytes str

Total storage in bytes consumed by layers.

remaining_items_count int
repository_count int
imageCount Number

Total number of images.

items List<Property Map>
layerCount Number

Total number of layers.

layersSizeInBytes String

Total storage in bytes consumed by layers.

remainingItemsCount Number
repositoryCount Number

GetContainerRepositoriesContainerRepositoryCollectionItem

BillableSizeInGbs string

Total storage size in GBs that will be charged.

CompartmentId string

The OCID of the compartment.

CreatedBy string

The id of the user or principal that created the resource.

DisplayName string

A filter to return only resources that match the given display name exactly.

Id string

The OCID of the container repository. Example: ocid1.containerrepo.oc1..exampleuniqueID

ImageCount int

Total number of images.

IsImmutable bool

Whether the repository is immutable. Images cannot be overwritten in an immutable repository.

IsPublic bool

A filter to return resources that match the isPublic value.

LayerCount int

Total number of layers.

LayersSizeInBytes string

Total storage in bytes consumed by layers.

Readmes List<GetContainerRepositoriesContainerRepositoryCollectionItemReadme>

Container repository readme.

State string

A filter to return only resources that match the given lifecycle state name exactly.

TimeCreated string

An RFC 3339 timestamp indicating when the repository was created.

TimeLastPushed string

An RFC 3339 timestamp indicating when an image was last pushed to the repository.

BillableSizeInGbs string

Total storage size in GBs that will be charged.

CompartmentId string

The OCID of the compartment.

CreatedBy string

The id of the user or principal that created the resource.

DisplayName string

A filter to return only resources that match the given display name exactly.

Id string

The OCID of the container repository. Example: ocid1.containerrepo.oc1..exampleuniqueID

ImageCount int

Total number of images.

IsImmutable bool

Whether the repository is immutable. Images cannot be overwritten in an immutable repository.

IsPublic bool

A filter to return resources that match the isPublic value.

LayerCount int

Total number of layers.

LayersSizeInBytes string

Total storage in bytes consumed by layers.

Readmes []GetContainerRepositoriesContainerRepositoryCollectionItemReadme

Container repository readme.

State string

A filter to return only resources that match the given lifecycle state name exactly.

TimeCreated string

An RFC 3339 timestamp indicating when the repository was created.

TimeLastPushed string

An RFC 3339 timestamp indicating when an image was last pushed to the repository.

billableSizeInGbs String

Total storage size in GBs that will be charged.

compartmentId String

The OCID of the compartment.

createdBy String

The id of the user or principal that created the resource.

displayName String

A filter to return only resources that match the given display name exactly.

id String

The OCID of the container repository. Example: ocid1.containerrepo.oc1..exampleuniqueID

imageCount Integer

Total number of images.

isImmutable Boolean

Whether the repository is immutable. Images cannot be overwritten in an immutable repository.

isPublic Boolean

A filter to return resources that match the isPublic value.

layerCount Integer

Total number of layers.

layersSizeInBytes String

Total storage in bytes consumed by layers.

readmes List<GetContainerRepositoriesContainerRepositoryCollectionItemReadme>

Container repository readme.

state String

A filter to return only resources that match the given lifecycle state name exactly.

timeCreated String

An RFC 3339 timestamp indicating when the repository was created.

timeLastPushed String

An RFC 3339 timestamp indicating when an image was last pushed to the repository.

billableSizeInGbs string

Total storage size in GBs that will be charged.

compartmentId string

The OCID of the compartment.

createdBy string

The id of the user or principal that created the resource.

displayName string

A filter to return only resources that match the given display name exactly.

id string

The OCID of the container repository. Example: ocid1.containerrepo.oc1..exampleuniqueID

imageCount number

Total number of images.

isImmutable boolean

Whether the repository is immutable. Images cannot be overwritten in an immutable repository.

isPublic boolean

A filter to return resources that match the isPublic value.

layerCount number

Total number of layers.

layersSizeInBytes string

Total storage in bytes consumed by layers.

readmes GetContainerRepositoriesContainerRepositoryCollectionItemReadme[]

Container repository readme.

state string

A filter to return only resources that match the given lifecycle state name exactly.

timeCreated string

An RFC 3339 timestamp indicating when the repository was created.

timeLastPushed string

An RFC 3339 timestamp indicating when an image was last pushed to the repository.

billable_size_in_gbs str

Total storage size in GBs that will be charged.

compartment_id str

The OCID of the compartment.

created_by str

The id of the user or principal that created the resource.

display_name str

A filter to return only resources that match the given display name exactly.

id str

The OCID of the container repository. Example: ocid1.containerrepo.oc1..exampleuniqueID

image_count int

Total number of images.

is_immutable bool

Whether the repository is immutable. Images cannot be overwritten in an immutable repository.

is_public bool

A filter to return resources that match the isPublic value.

layer_count int

Total number of layers.

layers_size_in_bytes str

Total storage in bytes consumed by layers.

readmes GetContainerRepositoriesContainerRepositoryCollectionItemReadme]

Container repository readme.

state str

A filter to return only resources that match the given lifecycle state name exactly.

time_created str

An RFC 3339 timestamp indicating when the repository was created.

time_last_pushed str

An RFC 3339 timestamp indicating when an image was last pushed to the repository.

billableSizeInGbs String

Total storage size in GBs that will be charged.

compartmentId String

The OCID of the compartment.

createdBy String

The id of the user or principal that created the resource.

displayName String

A filter to return only resources that match the given display name exactly.

id String

The OCID of the container repository. Example: ocid1.containerrepo.oc1..exampleuniqueID

imageCount Number

Total number of images.

isImmutable Boolean

Whether the repository is immutable. Images cannot be overwritten in an immutable repository.

isPublic Boolean

A filter to return resources that match the isPublic value.

layerCount Number

Total number of layers.

layersSizeInBytes String

Total storage in bytes consumed by layers.

readmes List<Property Map>

Container repository readme.

state String

A filter to return only resources that match the given lifecycle state name exactly.

timeCreated String

An RFC 3339 timestamp indicating when the repository was created.

timeLastPushed String

An RFC 3339 timestamp indicating when an image was last pushed to the repository.

GetContainerRepositoriesContainerRepositoryCollectionItemReadme

Content string

Readme content. Avoid entering confidential information.

Format string

Readme format. Supported formats are text/plain and text/markdown.

Content string

Readme content. Avoid entering confidential information.

Format string

Readme format. Supported formats are text/plain and text/markdown.

content String

Readme content. Avoid entering confidential information.

format String

Readme format. Supported formats are text/plain and text/markdown.

content string

Readme content. Avoid entering confidential information.

format string

Readme format. Supported formats are text/plain and text/markdown.

content str

Readme content. Avoid entering confidential information.

format str

Readme format. Supported formats are text/plain and text/markdown.

content String

Readme content. Avoid entering confidential information.

format String

Readme format. Supported formats are text/plain and text/markdown.

GetContainerRepositoriesFilter

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values List<String>
regex Boolean

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.