com.pulumi.awsnative.ec2.kotlin.outputs.SecurityGroupEgress.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin.outputs
import kotlin.Int
import kotlin.String
import kotlin.Suppress
/**
*
* @property cidrIp The IPv4 address range, in CIDR format.
* You must specify exactly one of the following: `CidrIp` , `CidrIpv6` , `DestinationPrefixListId` , or `DestinationSecurityGroupId` .
* For examples of rules that you can add to security groups for specific access scenarios, see [Security group rules for different use cases](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html) in the *Amazon EC2 User Guide* .
* @property cidrIpv6 The IPv6 address range, in CIDR format.
* You must specify exactly one of the following: `CidrIp` , `CidrIpv6` , `DestinationPrefixListId` , or `DestinationSecurityGroupId` .
* For examples of rules that you can add to security groups for specific access scenarios, see [Security group rules for different use cases](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html) in the *Amazon EC2 User Guide* .
* @property description A description for the security group rule.
* Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*
* @property destinationPrefixListId The prefix list IDs for the destination AWS service. This is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
* You must specify exactly one of the following: `CidrIp` , `CidrIpv6` , `DestinationPrefixListId` , or `DestinationSecurityGroupId` .
* @property destinationSecurityGroupId The ID of the destination VPC security group.
* You must specify exactly one of the following: `CidrIp` , `CidrIpv6` , `DestinationPrefixListId` , or `DestinationSecurityGroupId` .
* @property fromPort If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).
* @property ipProtocol The IP protocol name ( `tcp` , `udp` , `icmp` , `icmpv6` ) or number (see [Protocol Numbers](https://docs.aws.amazon.com/http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) ).
* Use `-1` to specify all protocols. When authorizing security group rules, specifying `-1` or a protocol number other than `tcp` , `udp` , `icmp` , or `icmpv6` allows traffic on all ports, regardless of any port range you specify. For `tcp` , `udp` , and `icmp` , you must specify a port range. For `icmpv6` , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.
* @property toPort If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
*/
public data class SecurityGroupEgress(
public val cidrIp: String? = null,
public val cidrIpv6: String? = null,
public val description: String? = null,
public val destinationPrefixListId: String? = null,
public val destinationSecurityGroupId: String? = null,
public val fromPort: Int? = null,
public val ipProtocol: String,
public val toPort: Int? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.ec2.outputs.SecurityGroupEgress): SecurityGroupEgress = SecurityGroupEgress(
cidrIp = javaType.cidrIp().map({ args0 -> args0 }).orElse(null),
cidrIpv6 = javaType.cidrIpv6().map({ args0 -> args0 }).orElse(null),
description = javaType.description().map({ args0 -> args0 }).orElse(null),
destinationPrefixListId = javaType.destinationPrefixListId().map({ args0 -> args0 }).orElse(null),
destinationSecurityGroupId = javaType.destinationSecurityGroupId().map({ args0 ->
args0
}).orElse(null),
fromPort = javaType.fromPort().map({ args0 -> args0 }).orElse(null),
ipProtocol = javaType.ipProtocol(),
toPort = javaType.toPort().map({ args0 -> args0 }).orElse(null),
)
}
}