commonMain.aws.sdk.kotlin.services.transfer.model.EndpointDetails.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transfer-jvm Show documentation
Show all versions of transfer-jvm Show documentation
The AWS SDK for Kotlin client for Transfer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transfer.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The virtual private cloud (VPC) endpoint settings that are configured for your file transfer protocol-enabled server. With a VPC endpoint, you can restrict access to your server and resources only within your VPC. To control incoming internet traffic, invoke the `UpdateServer` API and attach an Elastic IP address to your server's endpoint.
*
* After May 19, 2021, you won't be able to create a server using `EndpointType=VPC_ENDPOINT` in your Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you have already created servers with `EndpointType=VPC_ENDPOINT` in your Amazon Web Servicesaccount on or before May 19, 2021, you will not be affected. After this date, use `EndpointType`=`VPC`.
*
* For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.
*/
public class EndpointDetails private constructor(builder: Builder) {
/**
* A list of address allocation IDs that are required to attach an Elastic IP address to your server's endpoint.
*
* An address allocation ID corresponds to the allocation ID of an Elastic IP address. This value can be retrieved from the `allocationId` field from the Amazon EC2 [Address](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Address.html) data type. One way to retrieve this value is by calling the EC2 [DescribeAddresses](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAddresses.html) API.
*
* This parameter is optional. Set this parameter if you want to make your VPC endpoint public-facing. For details, see [Create an internet-facing endpoint for your server](https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#create-internet-facing-endpoint).
*
* This property can only be set as follows:
* + `EndpointType` must be set to `VPC`
* + The Transfer Family server must be offline.
* + You cannot set this parameter for Transfer Family servers that use the FTP protocol.
* + The server must already have `SubnetIds` populated (`SubnetIds` and `AddressAllocationIds` cannot be updated simultaneously).
* + `AddressAllocationIds` can't contain duplicates, and must be equal in length to `SubnetIds`. For example, if you have three subnet IDs, you must also specify three address allocation IDs.
* + Call the `UpdateServer` API to set or change this parameter.
*/
public val addressAllocationIds: List? = builder.addressAllocationIds
/**
* A list of security groups IDs that are available to attach to your server's endpoint.
*
* This property can only be set when `EndpointType` is set to `VPC`.
*
* You can edit the `SecurityGroupIds` property in the [UpdateServer](https://docs.aws.amazon.com/transfer/latest/userguide/API_UpdateServer.html) API only if you are changing the `EndpointType` from `PUBLIC` or `VPC_ENDPOINT` to `VPC`. To change security groups associated with your server's VPC endpoint after creation, use the Amazon EC2 [ModifyVpcEndpoint](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyVpcEndpoint.html) API.
*/
public val securityGroupIds: List? = builder.securityGroupIds
/**
* A list of subnet IDs that are required to host your server endpoint in your VPC.
*
* This property can only be set when `EndpointType` is set to `VPC`.
*/
public val subnetIds: List? = builder.subnetIds
/**
* The identifier of the VPC endpoint.
*
* This property can only be set when `EndpointType` is set to `VPC_ENDPOINT`.
*
* For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.
*/
public val vpcEndpointId: kotlin.String? = builder.vpcEndpointId
/**
* The VPC identifier of the VPC in which a server's endpoint will be hosted.
*
* This property can only be set when `EndpointType` is set to `VPC`.
*/
public val vpcId: kotlin.String? = builder.vpcId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transfer.model.EndpointDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EndpointDetails(")
append("addressAllocationIds=$addressAllocationIds,")
append("securityGroupIds=$securityGroupIds,")
append("subnetIds=$subnetIds,")
append("vpcEndpointId=$vpcEndpointId,")
append("vpcId=$vpcId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = addressAllocationIds?.hashCode() ?: 0
result = 31 * result + (securityGroupIds?.hashCode() ?: 0)
result = 31 * result + (subnetIds?.hashCode() ?: 0)
result = 31 * result + (vpcEndpointId?.hashCode() ?: 0)
result = 31 * result + (vpcId?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as EndpointDetails
if (addressAllocationIds != other.addressAllocationIds) return false
if (securityGroupIds != other.securityGroupIds) return false
if (subnetIds != other.subnetIds) return false
if (vpcEndpointId != other.vpcEndpointId) return false
if (vpcId != other.vpcId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transfer.model.EndpointDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of address allocation IDs that are required to attach an Elastic IP address to your server's endpoint.
*
* An address allocation ID corresponds to the allocation ID of an Elastic IP address. This value can be retrieved from the `allocationId` field from the Amazon EC2 [Address](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Address.html) data type. One way to retrieve this value is by calling the EC2 [DescribeAddresses](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAddresses.html) API.
*
* This parameter is optional. Set this parameter if you want to make your VPC endpoint public-facing. For details, see [Create an internet-facing endpoint for your server](https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#create-internet-facing-endpoint).
*
* This property can only be set as follows:
* + `EndpointType` must be set to `VPC`
* + The Transfer Family server must be offline.
* + You cannot set this parameter for Transfer Family servers that use the FTP protocol.
* + The server must already have `SubnetIds` populated (`SubnetIds` and `AddressAllocationIds` cannot be updated simultaneously).
* + `AddressAllocationIds` can't contain duplicates, and must be equal in length to `SubnetIds`. For example, if you have three subnet IDs, you must also specify three address allocation IDs.
* + Call the `UpdateServer` API to set or change this parameter.
*/
public var addressAllocationIds: List? = null
/**
* A list of security groups IDs that are available to attach to your server's endpoint.
*
* This property can only be set when `EndpointType` is set to `VPC`.
*
* You can edit the `SecurityGroupIds` property in the [UpdateServer](https://docs.aws.amazon.com/transfer/latest/userguide/API_UpdateServer.html) API only if you are changing the `EndpointType` from `PUBLIC` or `VPC_ENDPOINT` to `VPC`. To change security groups associated with your server's VPC endpoint after creation, use the Amazon EC2 [ModifyVpcEndpoint](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyVpcEndpoint.html) API.
*/
public var securityGroupIds: List? = null
/**
* A list of subnet IDs that are required to host your server endpoint in your VPC.
*
* This property can only be set when `EndpointType` is set to `VPC`.
*/
public var subnetIds: List? = null
/**
* The identifier of the VPC endpoint.
*
* This property can only be set when `EndpointType` is set to `VPC_ENDPOINT`.
*
* For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.
*/
public var vpcEndpointId: kotlin.String? = null
/**
* The VPC identifier of the VPC in which a server's endpoint will be hosted.
*
* This property can only be set when `EndpointType` is set to `VPC`.
*/
public var vpcId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transfer.model.EndpointDetails) : this() {
this.addressAllocationIds = x.addressAllocationIds
this.securityGroupIds = x.securityGroupIds
this.subnetIds = x.subnetIds
this.vpcEndpointId = x.vpcEndpointId
this.vpcId = x.vpcId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transfer.model.EndpointDetails = EndpointDetails(this)
internal fun correctErrors(): Builder {
return this
}
}
}