commonMain.aws.sdk.kotlin.services.redshiftserverless.model.TargetAction.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshiftserverless-jvm Show documentation
Show all versions of redshiftserverless-jvm Show documentation
The AWS SDK for Kotlin client for Redshift Serverless
// 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
}