Class: AWSCDK::ECRAssets::NetworkMode
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::ECRAssets::NetworkMode
- Defined in:
- ecr_assets/network_mode.rb
Overview
networking mode on build time supported by docker.
Class Method Summary collapse
-
.custom(mode) ⇒ AWSCDK::ECRAssets::NetworkMode
Used to specify a custom networking mode Use this if the networking mode name is not yet supported by the CDK.
-
.DEFAULT ⇒ AWSCDK::ECRAssets::NetworkMode
The default networking mode if omitted, create a network stack on the default Docker bridge.
-
.from_container(container_id) ⇒ AWSCDK::ECRAssets::NetworkMode
Reuse another container's network stack.
-
.HOST ⇒ AWSCDK::ECRAssets::NetworkMode
Use the Docker host network stack.
- .jsii_overridable_methods ⇒ Object
-
.NONE ⇒ AWSCDK::ECRAssets::NetworkMode
Disable the network stack, only the loopback device will be created.
Instance Method Summary collapse
-
#initialize(*args) ⇒ NetworkMode
constructor
A new instance of NetworkMode.
-
#mode ⇒ String
The networking mode to use for docker build.
Constructor Details
#initialize(*args) ⇒ NetworkMode
Returns a new instance of NetworkMode.
8 9 10 |
# File 'ecr_assets/network_mode.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_ecr_assets.NetworkMode does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.custom(mode) ⇒ AWSCDK::ECRAssets::NetworkMode
Used to specify a custom networking mode Use this if the networking mode name is not yet supported by the CDK.
22 23 24 25 |
# File 'ecr_assets/network_mode.rb', line 22 def self.custom(mode) Jsii::Type.check_type(mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mode") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecr_assets.NetworkMode", "custom", [mode]) end |
.DEFAULT ⇒ AWSCDK::ECRAssets::NetworkMode
The default networking mode if omitted, create a network stack on the default Docker bridge.
39 40 41 |
# File 'ecr_assets/network_mode.rb', line 39 def self.DEFAULT() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_ecr_assets.NetworkMode", "DEFAULT") end |
.from_container(container_id) ⇒ AWSCDK::ECRAssets::NetworkMode
Reuse another container's network stack.
31 32 33 34 |
# File 'ecr_assets/network_mode.rb', line 31 def self.from_container(container_id) Jsii::Type.check_type(container_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerId") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecr_assets.NetworkMode", "fromContainer", [container_id]) end |
.HOST ⇒ AWSCDK::ECRAssets::NetworkMode
Use the Docker host network stack.
46 47 48 |
# File 'ecr_assets/network_mode.rb', line 46 def self.HOST() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_ecr_assets.NetworkMode", "HOST") end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'ecr_assets/network_mode.rb', line 12 def self.jsii_overridable_methods { :mode => { kind: :property, name: "mode", is_optional: false }, } end |
.NONE ⇒ AWSCDK::ECRAssets::NetworkMode
Disable the network stack, only the loopback device will be created.
53 54 55 |
# File 'ecr_assets/network_mode.rb', line 53 def self.NONE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_ecr_assets.NetworkMode", "NONE") end |
Instance Method Details
#mode ⇒ String
The networking mode to use for docker build.
60 61 62 |
# File 'ecr_assets/network_mode.rb', line 60 def mode() jsii_get_property("mode") end |