DockerSdk
the .NET SDK for Docker
All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Properties | List of all members
DockerSdk.Containers.ListContainersOptions Class Reference

Filters for container listings. More...

Properties

static ListContainersOptions CommandLineDefaults [get]
 Gets options that are equivalent to the defaults for the docker container ls command. More...
 
string? AncestorFilter [get, set]
 Gets or sets an image reference for filtering. Only containers that have that image as an ancestor will be returned. More...
 
int? ExitCodeFilter [get, set]
 Gets or sets an exit code for filtering. If this is not null, only containers that have exited with the given exit code will be returned. Null means no filtering based on exit code. More...
 
List< string > LabelExistsFilters = new() [get]
 Gets a list of labels to filter by. Only containers that have all of the given labels will be returned. More...
 
Dictionary< string, string > LabelValueFilters = new() [get]
 Gets a set of label-value pairs to filter by. Only containers that have all of the given labels set to the given values will be returned. More...
 
long? MaxResults [get, set]
 Gets or sets the maximum number of containers to return. More...
 
string? NameFilter [get, set]
 Gets or sets a filter for the container name. If this is not null, only containers with this name will be returned. More...
 
bool OnlyRunningContainers [get, set]
 Gets or sets a valid indicating whether to limit results to containers that are currently running. More...
 
ContainerStatusStatusFilter [get, set]
 Gets or sets a filter for the container status. If this is not null, only containers with the given status will be returned. More...
 

Detailed Description

Filters for container listings.

See also
ContainerAccess.ListAsync(ListContainersOptions, System.Threading.CancellationToken)

Property Documentation

◆ AncestorFilter

string? DockerSdk.Containers.ListContainersOptions.AncestorFilter
getset

Gets or sets an image reference for filtering. Only containers that have that image as an ancestor will be returned.

This may be an image name or ID.

◆ CommandLineDefaults

ListContainersOptions DockerSdk.Containers.ListContainersOptions.CommandLineDefaults
staticget

Gets options that are equivalent to the defaults for the docker container ls command.

◆ ExitCodeFilter

int? DockerSdk.Containers.ListContainersOptions.ExitCodeFilter
getset

Gets or sets an exit code for filtering. If this is not null, only containers that have exited with the given exit code will be returned. Null means no filtering based on exit code.

◆ LabelExistsFilters

List<string> DockerSdk.Containers.ListContainersOptions.LabelExistsFilters = new()
get

Gets a list of labels to filter by. Only containers that have all of the given labels will be returned.

If both this setting and LabelValueFilters are set, they are combined with "or" logic.

◆ LabelValueFilters

Dictionary<string, string> DockerSdk.Containers.ListContainersOptions.LabelValueFilters = new()
get

Gets a set of label-value pairs to filter by. Only containers that have all of the given labels set to the given values will be returned.

If both this setting and LabelExistsFilters are set, they are combined with "or" logic.

◆ MaxResults

long? DockerSdk.Containers.ListContainersOptions.MaxResults
getset

Gets or sets the maximum number of containers to return.

This returns the N most recently-created containers that match the filters.

◆ NameFilter

string? DockerSdk.Containers.ListContainersOptions.NameFilter
getset

Gets or sets a filter for the container name. If this is not null, only containers with this name will be returned.

Caution: Container names are not guaranteed to be unique, so this has a small chance of returning multiple containers.

◆ OnlyRunningContainers

bool DockerSdk.Containers.ListContainersOptions.OnlyRunningContainers
getset

Gets or sets a valid indicating whether to limit results to containers that are currently running.

Caution: It's possible for a status to change between the time the filter was applied and when the results are returned to the caller.

◆ StatusFilter

ContainerStatus? DockerSdk.Containers.ListContainersOptions.StatusFilter
getset

Gets or sets a filter for the container status. If this is not null, only containers with the given status will be returned.

Caution: It's possible for a status to change between the time the filter was applied and when the results are returned to the caller.


The documentation for this class was generated from the following file: