commonMain.aws.sdk.kotlin.services.computeoptimizer.model.ExportEcsServiceRecommendationsRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of computeoptimizer-jvm Show documentation
Show all versions of computeoptimizer-jvm Show documentation
The AWS SDK for Kotlin client for Compute Optimizer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.computeoptimizer.model
import aws.smithy.kotlin.runtime.SdkDsl
public class ExportEcsServiceRecommendationsRequest private constructor(builder: Builder) {
/**
* The Amazon Web Services account IDs for the export Amazon ECS service recommendations.
*
* If your account is the management account or the delegated administrator of an organization, use this parameter to specify the member account you want to export recommendations to.
*
* This parameter can't be specified together with the include member accounts parameter. The parameters are mutually exclusive.
*
* If this parameter or the include member accounts parameter is omitted, the recommendations for member accounts aren't included in the export.
*
* You can specify multiple account IDs per request.
*/
public val accountIds: List? = builder.accountIds
/**
* The recommendations data to include in the export file. For more information about the fields that can be exported, see [Exported files](https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files) in the *Compute Optimizer User Guide*.
*/
public val fieldsToExport: List? = builder.fieldsToExport
/**
* The format of the export file.
*
* The CSV file is the only export file format currently supported.
*/
public val fileFormat: aws.sdk.kotlin.services.computeoptimizer.model.FileFormat? = builder.fileFormat
/**
* An array of objects to specify a filter that exports a more specific set of Amazon ECS service recommendations.
*/
public val filters: List? = builder.filters
/**
* If your account is the management account or the delegated administrator of an organization, this parameter indicates whether to include recommendations for resources in all member accounts of the organization.
*
* The member accounts must also be opted in to Compute Optimizer, and trusted access for Compute Optimizer must be enabled in the organization account. For more information, see [Compute Optimizer and Amazon Web Services Organizations trusted access](https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access) in the *Compute Optimizer User Guide*.
*
* If this parameter is omitted, recommendations for member accounts of the organization aren't included in the export file.
*
* If this parameter or the account ID parameter is omitted, recommendations for member accounts aren't included in the export.
*/
public val includeMemberAccounts: kotlin.Boolean? = builder.includeMemberAccounts
/**
* Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and key prefix for a recommendations export job.
*
* You must create the destination Amazon S3 bucket for your recommendations export before you create the export job. Compute Optimizer does not create the S3 bucket for you. After you create the S3 bucket, ensure that it has the required permission policy to allow Compute Optimizer to write the export file to it. If you plan to specify an object prefix when you create the export job, you must include the object prefix in the policy that you add to the S3 bucket. For more information, see [Amazon S3 Bucket Policy for Compute Optimizer](https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html) in the *Compute Optimizer User Guide*.
*/
public val s3DestinationConfig: aws.sdk.kotlin.services.computeoptimizer.model.S3DestinationConfig? = builder.s3DestinationConfig
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.ExportEcsServiceRecommendationsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ExportEcsServiceRecommendationsRequest(")
append("accountIds=$accountIds,")
append("fieldsToExport=$fieldsToExport,")
append("fileFormat=$fileFormat,")
append("filters=$filters,")
append("includeMemberAccounts=$includeMemberAccounts,")
append("s3DestinationConfig=$s3DestinationConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accountIds?.hashCode() ?: 0
result = 31 * result + (fieldsToExport?.hashCode() ?: 0)
result = 31 * result + (fileFormat?.hashCode() ?: 0)
result = 31 * result + (filters?.hashCode() ?: 0)
result = 31 * result + (includeMemberAccounts?.hashCode() ?: 0)
result = 31 * result + (s3DestinationConfig?.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 ExportEcsServiceRecommendationsRequest
if (accountIds != other.accountIds) return false
if (fieldsToExport != other.fieldsToExport) return false
if (fileFormat != other.fileFormat) return false
if (filters != other.filters) return false
if (includeMemberAccounts != other.includeMemberAccounts) return false
if (s3DestinationConfig != other.s3DestinationConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.ExportEcsServiceRecommendationsRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Web Services account IDs for the export Amazon ECS service recommendations.
*
* If your account is the management account or the delegated administrator of an organization, use this parameter to specify the member account you want to export recommendations to.
*
* This parameter can't be specified together with the include member accounts parameter. The parameters are mutually exclusive.
*
* If this parameter or the include member accounts parameter is omitted, the recommendations for member accounts aren't included in the export.
*
* You can specify multiple account IDs per request.
*/
public var accountIds: List? = null
/**
* The recommendations data to include in the export file. For more information about the fields that can be exported, see [Exported files](https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files) in the *Compute Optimizer User Guide*.
*/
public var fieldsToExport: List? = null
/**
* The format of the export file.
*
* The CSV file is the only export file format currently supported.
*/
public var fileFormat: aws.sdk.kotlin.services.computeoptimizer.model.FileFormat? = null
/**
* An array of objects to specify a filter that exports a more specific set of Amazon ECS service recommendations.
*/
public var filters: List? = null
/**
* If your account is the management account or the delegated administrator of an organization, this parameter indicates whether to include recommendations for resources in all member accounts of the organization.
*
* The member accounts must also be opted in to Compute Optimizer, and trusted access for Compute Optimizer must be enabled in the organization account. For more information, see [Compute Optimizer and Amazon Web Services Organizations trusted access](https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access) in the *Compute Optimizer User Guide*.
*
* If this parameter is omitted, recommendations for member accounts of the organization aren't included in the export file.
*
* If this parameter or the account ID parameter is omitted, recommendations for member accounts aren't included in the export.
*/
public var includeMemberAccounts: kotlin.Boolean? = null
/**
* Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and key prefix for a recommendations export job.
*
* You must create the destination Amazon S3 bucket for your recommendations export before you create the export job. Compute Optimizer does not create the S3 bucket for you. After you create the S3 bucket, ensure that it has the required permission policy to allow Compute Optimizer to write the export file to it. If you plan to specify an object prefix when you create the export job, you must include the object prefix in the policy that you add to the S3 bucket. For more information, see [Amazon S3 Bucket Policy for Compute Optimizer](https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html) in the *Compute Optimizer User Guide*.
*/
public var s3DestinationConfig: aws.sdk.kotlin.services.computeoptimizer.model.S3DestinationConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.ExportEcsServiceRecommendationsRequest) : this() {
this.accountIds = x.accountIds
this.fieldsToExport = x.fieldsToExport
this.fileFormat = x.fileFormat
this.filters = x.filters
this.includeMemberAccounts = x.includeMemberAccounts
this.s3DestinationConfig = x.s3DestinationConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.ExportEcsServiceRecommendationsRequest = ExportEcsServiceRecommendationsRequest(this)
/**
* construct an [aws.sdk.kotlin.services.computeoptimizer.model.S3DestinationConfig] inside the given [block]
*/
public fun s3DestinationConfig(block: aws.sdk.kotlin.services.computeoptimizer.model.S3DestinationConfig.Builder.() -> kotlin.Unit) {
this.s3DestinationConfig = aws.sdk.kotlin.services.computeoptimizer.model.S3DestinationConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}