All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.ec2.kotlin.outputs.SecurityGroupEgress.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.ec2.kotlin.outputs

import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property cidrBlocks List of CIDR blocks.
 * @property description Description of this egress rule.
 * @property fromPort Start port (or ICMP type number if protocol is `icmp`)
 * @property ipv6CidrBlocks List of IPv6 CIDR blocks.
 * @property prefixListIds List of Prefix List IDs.
 * @property protocol Protocol. If you select a protocol of `-1` (semantically equivalent to `all`, which is not a valid value here), you must specify a `from_port` and `to_port` equal to 0. The supported values are defined in the `IpProtocol` argument in the [IpPermission](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IpPermission.html) API reference.
 * @property securityGroups List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID.
 * @property self Whether the security group itself will be added as a source to this egress rule.
 * @property toPort End range port (or ICMP code if protocol is `icmp`).
 * The following arguments are optional:
 * > **Note** Although `cidr_blocks`, `ipv6_cidr_blocks`, `prefix_list_ids`, and `security_groups` are all marked as optional, you _must_ provide one of them in order to configure the destination of the traffic.
 */
public data class SecurityGroupEgress(
    public val cidrBlocks: List? = null,
    public val description: String? = null,
    public val fromPort: Int,
    public val ipv6CidrBlocks: List? = null,
    public val prefixListIds: List? = null,
    public val protocol: String,
    public val securityGroups: List? = null,
    public val self: Boolean? = null,
    public val toPort: Int,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.aws.ec2.outputs.SecurityGroupEgress): SecurityGroupEgress = SecurityGroupEgress(
            cidrBlocks = javaType.cidrBlocks().map({ args0 -> args0 }),
            description = javaType.description().map({ args0 -> args0 }).orElse(null),
            fromPort = javaType.fromPort(),
            ipv6CidrBlocks = javaType.ipv6CidrBlocks().map({ args0 -> args0 }),
            prefixListIds = javaType.prefixListIds().map({ args0 -> args0 }),
            protocol = javaType.protocol(),
            securityGroups = javaType.securityGroups().map({ args0 -> args0 }),
            self = javaType.self().map({ args0 -> args0 }).orElse(null),
            toPort = javaType.toPort(),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy