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

commonMain.aws.sdk.kotlin.services.redshiftserverless.model.TargetAction.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.redshiftserverless.model



/**
 * A JSON format string of the Amazon Redshift Serverless API operation with input parameters. The following is an example of a target action.
 *
 * `"{"CreateSnapshot": {"NamespaceName": "sampleNamespace","SnapshotName": "sampleSnapshot", "retentionPeriod": "1"}}"`
 */
public sealed class TargetAction {
    /**
     * The parameters that you can use to configure a [scheduled action](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_CreateScheduledAction.html) to create a snapshot. For more information about creating a scheduled action, see [CreateScheduledAction](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_CreateScheduledAction.html).
     */
    public data class CreateSnapshot(val value: aws.sdk.kotlin.services.redshiftserverless.model.CreateSnapshotScheduleActionParameters) : aws.sdk.kotlin.services.redshiftserverless.model.TargetAction() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.redshiftserverless.model.TargetAction() {
    }

    /**
     * Casts this [TargetAction] as a [CreateSnapshot] and retrieves its [aws.sdk.kotlin.services.redshiftserverless.model.CreateSnapshotScheduleActionParameters] value. Throws an exception if the [TargetAction] is not a
     * [CreateSnapshot].
     */
    public fun asCreateSnapshot(): aws.sdk.kotlin.services.redshiftserverless.model.CreateSnapshotScheduleActionParameters = (this as TargetAction.CreateSnapshot).value

    /**
     * Casts this [TargetAction] as a [CreateSnapshot] and retrieves its [aws.sdk.kotlin.services.redshiftserverless.model.CreateSnapshotScheduleActionParameters] value. Returns null if the [TargetAction] is not a [CreateSnapshot].
     */
    public fun asCreateSnapshotOrNull(): aws.sdk.kotlin.services.redshiftserverless.model.CreateSnapshotScheduleActionParameters? = (this as? TargetAction.CreateSnapshot)?.value
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy