
com.pulumi.awsnative.dynamodb.kotlin.outputs.GetTableResult.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.dynamodb.kotlin.outputs
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.core.Either
import kotlin.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @property arn The Amazon Resource Name (ARN) of the DynamoDB table, such as `arn:aws:dynamodb:us-east-2:123456789012:table/myDynamoDBTable` .
* @property attributeDefinitions A list of attributes that describe the key schema for the table and indexes.
* This property is required to create a DDB table.
* Update requires: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt). Replacement if you edit an existing AttributeDefinition.
* @property billingMode Specify how you are charged for read and write throughput and how you manage capacity.
* Valid values include:
* + ``PROVISIONED`` - We recommend using ``PROVISIONED`` for predictable workloads. ``PROVISIONED`` sets the billing mode to [Provisioned Mode](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual).
* + ``PAY_PER_REQUEST`` - We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. ``PAY_PER_REQUEST`` sets the billing mode to [On-Demand Mode](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand).
* If not specified, the default is ``PROVISIONED``.
* @property contributorInsightsSpecification The settings used to enable or disable CloudWatch Contributor Insights for the specified table.
* @property deletionProtectionEnabled Determines if a table is protected from deletion. When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see [Using deletion protection](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html#WorkingWithTables.Basics.DeletionProtection) in the *Developer Guide*.
* @property globalSecondaryIndexes Global secondary indexes to be created on the table. You can create up to 20 global secondary indexes.
* If you update a table to include a new global secondary index, CFNlong initiates the index creation and then proceeds with the stack update. CFNlong doesn't wait for the index to complete creation because the backfilling phase can take a long time, depending on the size of the table. You can't use the index or update the table until the index's status is ``ACTIVE``. You can track its status by using the DynamoDB [DescribeTable](https://docs.aws.amazon.com/cli/latest/reference/dynamodb/describe-table.html) command.
* If you add or delete an index during an update, we recommend that you don't update any other resources. If your stack fails to update and is rolled back while adding a new index, you must manually delete the index.
* Updates are not supported. The following are exceptions:
* + If you update either the contributor insights specification or the provisioned throughput values of global secondary indexes, you can update the table without interruption.
* + You can delete or add one global secondary index without interruption. If you do both in the same update (for example, by changing the index's logical ID), the update fails.
* @property keySchema Specifies the attributes that make up the primary key for the table. The attributes in the ``KeySchema`` property must also be defined in the ``AttributeDefinitions`` property.
* @property kinesisStreamSpecification The Kinesis Data Streams configuration for the specified table.
* @property localSecondaryIndexes Local secondary indexes to be created on the table. You can create up to 5 local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes.
* @property onDemandThroughput Sets the maximum number of read and write units for the specified on-demand table. If you use this property, you must specify ``MaxReadRequestUnits``, ``MaxWriteRequestUnits``, or both.
* @property pointInTimeRecoverySpecification The settings used to enable point in time recovery.
* @property provisionedThroughput Throughput for the specified table, which consists of values for ``ReadCapacityUnits`` and ``WriteCapacityUnits``. For more information about the contents of a provisioned throughput structure, see [Amazon DynamoDB Table ProvisionedThroughput](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ProvisionedThroughput.html).
* If you set ``BillingMode`` as ``PROVISIONED``, you must specify this property. If you set ``BillingMode`` as ``PAY_PER_REQUEST``, you cannot specify this property.
* @property resourcePolicy A resource-based policy document that contains permissions to add to the specified table. In a CFNshort template, you can provide the policy in JSON or YAML format because CFNshort converts YAML to JSON before submitting it to DDB. For more information about resource-based policies, see [Using resource-based policies for](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/access-control-resource-based.html) and [Resource-based policy examples](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-examples.html).
* When you attach a resource-based policy while creating a table, the policy creation is *strongly consistent*. For information about the considerations that you should keep in mind while attaching a resource-based policy, see [Resource-based policy considerations](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html).
* @property sseSpecification Specifies the settings to enable server-side encryption.
* @property streamArn The ARN of the DynamoDB stream, such as `arn:aws:dynamodb:us-east-1:123456789012:table/testddbstack-myDynamoDBTable-012A1SL7SMP5Q/stream/2015-11-30T20:10:00.000` .
* > You must specify the `StreamSpecification` property to use this attribute.
* @property streamSpecification The settings for the DDB table stream, which capture changes to items stored in the table.
* @property tableClass The table class of the new table. Valid values are ``STANDARD`` and ``STANDARD_INFREQUENT_ACCESS``.
* @property tags An array of key-value pairs to apply to this resource.
* For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
* @property timeToLiveSpecification Specifies the Time to Live (TTL) settings for the table.
* For detailed information about the limits in DynamoDB, see [Limits in Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) in the Amazon DynamoDB Developer Guide.
*/
public data class GetTableResult(
public val arn: String? = null,
public val attributeDefinitions: List? = null,
public val billingMode: String? = null,
public val contributorInsightsSpecification: TableContributorInsightsSpecification? = null,
public val deletionProtectionEnabled: Boolean? = null,
public val globalSecondaryIndexes: List? = null,
public val keySchema: Either, Any>? = null,
public val kinesisStreamSpecification: TableKinesisStreamSpecification? = null,
public val localSecondaryIndexes: List? = null,
public val onDemandThroughput: TableOnDemandThroughput? = null,
public val pointInTimeRecoverySpecification: TablePointInTimeRecoverySpecification? = null,
public val provisionedThroughput: TableProvisionedThroughput? = null,
public val resourcePolicy: TableResourcePolicy? = null,
public val sseSpecification: TableSseSpecification? = null,
public val streamArn: String? = null,
public val streamSpecification: TableStreamSpecification? = null,
public val tableClass: String? = null,
public val tags: List? = null,
public val timeToLiveSpecification: TableTimeToLiveSpecification? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.dynamodb.outputs.GetTableResult): GetTableResult = GetTableResult(
arn = javaType.arn().map({ args0 -> args0 }).orElse(null),
attributeDefinitions = javaType.attributeDefinitions().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableAttributeDefinition.Companion.toKotlin(args0)
})
}),
billingMode = javaType.billingMode().map({ args0 -> args0 }).orElse(null),
contributorInsightsSpecification = javaType.contributorInsightsSpecification().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableContributorInsightsSpecification.Companion.toKotlin(args0)
})
}).orElse(null),
deletionProtectionEnabled = javaType.deletionProtectionEnabled().map({ args0 ->
args0
}).orElse(null),
globalSecondaryIndexes = javaType.globalSecondaryIndexes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableGlobalSecondaryIndex.Companion.toKotlin(args0)
})
}),
keySchema = javaType.keySchema().map({ args0 ->
args0.transform(
{ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableKeySchema.Companion.toKotlin(args0)
})
})
},
{ args0 -> args0 },
)
}).orElse(null),
kinesisStreamSpecification = javaType.kinesisStreamSpecification().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableKinesisStreamSpecification.Companion.toKotlin(args0)
})
}).orElse(null),
localSecondaryIndexes = javaType.localSecondaryIndexes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableLocalSecondaryIndex.Companion.toKotlin(args0)
})
}),
onDemandThroughput = javaType.onDemandThroughput().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableOnDemandThroughput.Companion.toKotlin(args0)
})
}).orElse(null),
pointInTimeRecoverySpecification = javaType.pointInTimeRecoverySpecification().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TablePointInTimeRecoverySpecification.Companion.toKotlin(args0)
})
}).orElse(null),
provisionedThroughput = javaType.provisionedThroughput().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableProvisionedThroughput.Companion.toKotlin(args0)
})
}).orElse(null),
resourcePolicy = javaType.resourcePolicy().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableResourcePolicy.Companion.toKotlin(args0)
})
}).orElse(null),
sseSpecification = javaType.sseSpecification().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableSseSpecification.Companion.toKotlin(args0)
})
}).orElse(null),
streamArn = javaType.streamArn().map({ args0 -> args0 }).orElse(null),
streamSpecification = javaType.streamSpecification().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableStreamSpecification.Companion.toKotlin(args0)
})
}).orElse(null),
tableClass = javaType.tableClass().map({ args0 -> args0 }).orElse(null),
tags = javaType.tags().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin(args0)
})
}),
timeToLiveSpecification = javaType.timeToLiveSpecification().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.dynamodb.kotlin.outputs.TableTimeToLiveSpecification.Companion.toKotlin(args0)
})
}).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy