DockerSdk
the .NET SDK for Docker
Public Member Functions | List of all members
DockerSdk.Networks.NetworkAccess Class Reference

Provides methods for interacting with Docker networks. More...

Inheritance diagram for DockerSdk.Networks.NetworkAccess:

Public Member Functions

IDisposable Subscribe (IObserver< NetworkEvent > observer)
 Subscribes to events about networks. More...
 
Task< INetworkGetAsync (string network, CancellationToken ct=default)
 Loads an object that can be used to interact with the indicated network. More...
 
async Task< INetworkGetAsync (NetworkReference network, CancellationToken ct=default)
 Loads an object that can be used to interact with the indicated network. More...
 
Task< INetworkInfoGetInfoAsync (string network, CancellationToken ct=default)
 Loads detailed information about a Docker network. More...
 
async Task< INetworkInfoGetInfoAsync (NetworkReference network, CancellationToken ct=default)
 Loads detailed information about a Docker network. More...
 
Task< IReadOnlyList< INetwork > > ListAsync (CancellationToken ct=default)
 Gets a list of Docker networks known to the daemon. More...
 
async Task< IReadOnlyList< INetwork > > ListAsync (ListNetworksOptions options, CancellationToken ct=default)
 Gets a list of Docker networks known to the daemon. More...
 

Detailed Description

Provides methods for interacting with Docker networks.

Member Function Documentation

◆ GetAsync() [1/2]

async Task<INetwork> DockerSdk.Networks.NetworkAccess.GetAsync ( NetworkReference  network,
CancellationToken  ct = default 
)
inline

Loads an object that can be used to interact with the indicated network.

Parameters
networkA network name or ID.
ctA token used to cancel the operation.
Returns
A Task<TResult> that resolves to the network object.
Exceptions
NetworkNotFoundExceptionNo such network exists.
System.Net.Http.HttpRequestExceptionThe request failed due to an underlying issue such as loss of network connectivity.
ArgumentNullExceptionThe network input is null.

◆ GetAsync() [2/2]

Task<INetwork> DockerSdk.Networks.NetworkAccess.GetAsync ( string  network,
CancellationToken  ct = default 
)

Loads an object that can be used to interact with the indicated network.

Parameters
networkA network name or ID.
ctA token used to cancel the operation.
Returns
A Task<TResult> that resolves to the network object.
Exceptions
NetworkNotFoundExceptionNo such network exists.
System.Net.Http.HttpRequestExceptionThe request failed due to an underlying issue such as loss of network connectivity.
MalformedReferenceExceptionThe network reference is improperly formatted.
ArgumentNullExceptionThe network input is null.

◆ GetInfoAsync() [1/2]

async Task<INetworkInfo> DockerSdk.Networks.NetworkAccess.GetInfoAsync ( NetworkReference  network,
CancellationToken  ct = default 
)
inline

Loads detailed information about a Docker network.

Parameters
networkA network name or ID.
ctA token used to cancel the operation.
Returns
A Task<TResult> that resolves to the details.
Exceptions
NetworkNotFoundExceptionNo such network exists.
System.Net.Http.HttpRequestExceptionThe request failed due to an underlying issue such as network connectivity.
ArgumentNullExceptionAn input is null.

◆ GetInfoAsync() [2/2]

Task<INetworkInfo> DockerSdk.Networks.NetworkAccess.GetInfoAsync ( string  network,
CancellationToken  ct = default 
)

Loads detailed information about a Docker network.

Parameters
networkA network name or ID.
ctA token used to cancel the operation.
Returns
A Task<TResult> that resolves to the details.
Exceptions
NetworkNotFoundExceptionNo such network exists.
System.Net.Http.HttpRequestExceptionThe request failed due to an underlying issue such as network connectivity.
MalformedReferenceExceptionThe network reference is improperly formatted.
ArgumentNullExceptionThe network input is null.

◆ ListAsync() [1/2]

Task<IReadOnlyList<INetwork> > DockerSdk.Networks.NetworkAccess.ListAsync ( CancellationToken  ct = default)

Gets a list of Docker networks known to the daemon.

Parameters
ctA token used to cancel the operation.
Returns
A Task<TResult> that resolves to the list of images.

The sequence of the results is undefined.

Exceptions
System.Net.Http.HttpRequestExceptionThe request failed due to an underlying issue such as network connectivity.
ArgumentNullExceptionAn input is null.

◆ ListAsync() [2/2]

async Task<IReadOnlyList<INetwork> > DockerSdk.Networks.NetworkAccess.ListAsync ( ListNetworksOptions  options,
CancellationToken  ct = default 
)
inline

Gets a list of Docker networks known to the daemon.

Parameters
optionsFilters for the search.
ctA token used to cancel the operation.
Returns
A Task<TResult> that resolves to the list of images.

The sequence of the results is undefined.

Exceptions
System.Net.Http.HttpRequestExceptionThe request failed due to an underlying issue such as network connectivity.
ArgumentNullExceptionAn input is null.

◆ Subscribe()

IDisposable DockerSdk.Networks.NetworkAccess.Subscribe ( IObserver< NetworkEvent observer)

Subscribes to events about networks.

Parameters
observerAn object to observe the events.
Returns
An IDisposable representing the subscription. Disposing this unsubscribes and releases resources.

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