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

commonMain.aws.sdk.kotlin.services.computeoptimizer.model.ExportRdsDatabaseRecommendationsRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.computeoptimizer.model

import aws.smithy.kotlin.runtime.SdkDsl

public class ExportRdsDatabaseRecommendationsRequest private constructor(builder: Builder) {
    /**
     * The Amazon Web Services account IDs for the export Amazon RDS 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 RDS 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 recommendation preferences to return in the response of a GetAutoScalingGroupRecommendations, GetEC2InstanceRecommendations, GetEC2RecommendationProjectedMetrics, GetRDSDatabaseRecommendations, and GetRDSDatabaseRecommendationProjectedMetrics request.
     */
    public val recommendationPreferences: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationPreferences? = builder.recommendationPreferences
    /**
     * 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.ExportRdsDatabaseRecommendationsRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ExportRdsDatabaseRecommendationsRequest(")
        append("accountIds=$accountIds,")
        append("fieldsToExport=$fieldsToExport,")
        append("fileFormat=$fileFormat,")
        append("filters=$filters,")
        append("includeMemberAccounts=$includeMemberAccounts,")
        append("recommendationPreferences=$recommendationPreferences,")
        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 + (recommendationPreferences?.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 ExportRdsDatabaseRecommendationsRequest

        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 (recommendationPreferences != other.recommendationPreferences) return false
        if (s3DestinationConfig != other.s3DestinationConfig) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.ExportRdsDatabaseRecommendationsRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Web Services account IDs for the export Amazon RDS 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 RDS 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 recommendation preferences to return in the response of a GetAutoScalingGroupRecommendations, GetEC2InstanceRecommendations, GetEC2RecommendationProjectedMetrics, GetRDSDatabaseRecommendations, and GetRDSDatabaseRecommendationProjectedMetrics request.
         */
        public var recommendationPreferences: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationPreferences? = 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.ExportRdsDatabaseRecommendationsRequest) : this() {
            this.accountIds = x.accountIds
            this.fieldsToExport = x.fieldsToExport
            this.fileFormat = x.fileFormat
            this.filters = x.filters
            this.includeMemberAccounts = x.includeMemberAccounts
            this.recommendationPreferences = x.recommendationPreferences
            this.s3DestinationConfig = x.s3DestinationConfig
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.ExportRdsDatabaseRecommendationsRequest = ExportRdsDatabaseRecommendationsRequest(this)

        /**
         * construct an [aws.sdk.kotlin.services.computeoptimizer.model.RecommendationPreferences] inside the given [block]
         */
        public fun recommendationPreferences(block: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationPreferences.Builder.() -> kotlin.Unit) {
            this.recommendationPreferences = aws.sdk.kotlin.services.computeoptimizer.model.RecommendationPreferences.invoke(block)
        }

        /**
         * 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
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy