Class Network
Manages a Docker Network. This can be used alongside docker_container to create virtual networks within the docker environment.
Example Usage
using Pulumi;
using Docker = Pulumi.Docker;
class MyStack : Stack
{
public MyStack()
{
// Create a new docker network
var privateNetwork = new Docker.Network("privateNetwork", new Docker.NetworkArgs
{
});
}
}
Inherited Members
Namespace: Pulumi.Docker
Assembly: Pulumi.Docker.dll
Syntax
public class Network : CustomResource
Constructors
View SourceNetwork(String, NetworkArgs, CustomResourceOptions)
Create a Network resource with the given unique name, arguments, and options.
Declaration
public Network(string name, NetworkArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| NetworkArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAttachable
Enable manual container attachment to the network.
Defaults to false.
Declaration
public Output<bool?> Attachable { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
CheckDuplicate
Requests daemon to check for networks with same name.
Declaration
public Output<bool?> CheckDuplicate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Driver
Name of the network driver to use. Defaults to
bridge driver.
Declaration
public Output<string> Driver { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ingress
Create swarm routing-mesh network.
Defaults to false.
Declaration
public Output<bool?> Ingress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Internal
Restrict external access to the network.
Defaults to false.
Declaration
public Output<bool> Internal { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
IpamConfigs
See IPAM config below for details.
Declaration
public Output<ImmutableArray<NetworkIpamConfig>> IpamConfigs { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<NetworkIpamConfig>> |
IpamDriver
Driver used by the custom IP scheme of the network.
Declaration
public Output<string> IpamDriver { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ipv6
Enable IPv6 networking.
Defaults to false.
Declaration
public Output<bool?> Ipv6 { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Labels
See Labels below for details.
Declaration
public Output<ImmutableArray<NetworkLabel>> Labels { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<NetworkLabel>> |
Name
The name of the Docker network.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Options
Network specific options to be used by the drivers.
Declaration
public Output<ImmutableDictionary<string, object>> Options { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Scope
Declaration
public Output<string> Scope { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, NetworkState, CustomResourceOptions)
Get an existing Network resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Network Get(string name, Input<string> id, NetworkState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| NetworkState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Network |