PortSpecification

sealed class PortSpecification

Specifies which ports are accessible on a MicroVM. Only one of the port specification options can be set.

Inheritors

Types

Link copied to clipboard
data class AllPorts(val value: Unit) : PortSpecification

Indicates that all ports are accessible.

Link copied to clipboard
data class Port(val value: Int) : PortSpecification

A single port number.

Link copied to clipboard
data class Range(val value: PortRange) : PortSpecification

A range of ports.

Link copied to clipboard

Functions

Link copied to clipboard

Casts this PortSpecification as a AllPorts and retrieves its aws.sdk.kotlin.services.lambdamicrovms.model.Unit value. Throws an exception if the PortSpecification is not a AllPorts.

Link copied to clipboard

Casts this PortSpecification as a AllPorts and retrieves its aws.sdk.kotlin.services.lambdamicrovms.model.Unit value. Returns null if the PortSpecification is not a AllPorts.

Link copied to clipboard
fun asPort(): Int

Casts this PortSpecification as a Port and retrieves its kotlin.Int value. Throws an exception if the PortSpecification is not a Port.

Link copied to clipboard

Casts this PortSpecification as a Port and retrieves its kotlin.Int value. Returns null if the PortSpecification is not a Port.

Link copied to clipboard

Casts this PortSpecification as a Range and retrieves its aws.sdk.kotlin.services.lambdamicrovms.model.PortRange value. Throws an exception if the PortSpecification is not a Range.

Link copied to clipboard

Casts this PortSpecification as a Range and retrieves its aws.sdk.kotlin.services.lambdamicrovms.model.PortRange value. Returns null if the PortSpecification is not a Range.