Class CfnInstance.PortProperty
Port
is a property of the Networking property. It describes information about ports for an instance.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PortProperty : Object, CfnInstance.IPortProperty
Syntax (vb)
Public Class PortProperty
Inherits Object
Implements CfnInstance.IPortProperty
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lightsail;
var portProperty = new PortProperty {
AccessDirection = "accessDirection",
AccessFrom = "accessFrom",
AccessType = "accessType",
CidrListAliases = new [] { "cidrListAliases" },
Cidrs = new [] { "cidrs" },
CommonName = "commonName",
FromPort = 123,
Ipv6Cidrs = new [] { "ipv6Cidrs" },
Protocol = "protocol",
ToPort = 123
};
Synopsis
Constructors
PortProperty() |
Properties
AccessDirection | The access direction ( |
AccessFrom | The location from which access is allowed. |
AccessType | The type of access ( |
CidrListAliases | An alias that defines access for a preconfigured range of IP addresses. |
Cidrs | The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. |
CommonName | The common name of the port information. |
FromPort | The first port in a range of open ports on an instance. |
Ipv6Cidrs | The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. |
Protocol | The IP protocol name. |
ToPort | The last port in a range of open ports on an instance. |
Constructors
PortProperty()
public PortProperty()
Properties
AccessDirection
The access direction ( inbound
or outbound
).
public string AccessDirection { get; set; }
Property Value
System.String
Remarks
Lightsail currently supports only inbound
access direction.
AccessFrom
The location from which access is allowed.
public string AccessFrom { get; set; }
Property Value
System.String
Remarks
For example, Anywhere (0.0.0.0/0)
, or Custom
if a specific IP address or range of IP addresses is allowed.
AccessType
The type of access ( Public
or Private
).
public string AccessType { get; set; }
Property Value
System.String
Remarks
CidrListAliases
An alias that defines access for a preconfigured range of IP addresses.
public string[] CidrListAliases { get; set; }
Property Value
System.String[]
Remarks
The only alias currently supported is lightsail-connect
, which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.
Cidrs
The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.
public string[] Cidrs { get; set; }
Property Value
System.String[]
Remarks
The ipv6Cidrs
parameter lists the IPv6 addresses that are allowed to connect to an instance.
Examples:
CommonName
The common name of the port information.
public string CommonName { get; set; }
Property Value
System.String
Remarks
FromPort
The first port in a range of open ports on an instance.
public Nullable<double> FromPort { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Ipv6Cidrs
The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.
public string[] Ipv6Cidrs { get; set; }
Property Value
System.String[]
Remarks
Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used.
The cidrs
parameter lists the IPv4 addresses that are allowed to connect to an instance.
Protocol
The IP protocol name.
public string Protocol { get; set; }
Property Value
System.String
Remarks
The name can be one of the following:
ToPort
The last port in a range of open ports on an instance.
public Nullable<double> ToPort { get; set; }
Property Value
System.Nullable<System.Double>