UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

158 lines 6.37 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.TableExport = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.s3.Bucket("example", { * bucketPrefix: "example", * forceDestroy: true, * }); * const exampleTable = new aws.dynamodb.Table("example", { * name: "example-table-1", * billingMode: "PAY_PER_REQUEST", * hashKey: "user_id", * attributes: [{ * name: "user_id", * type: "S", * }], * pointInTimeRecovery: { * enabled: true, * }, * }); * const exampleTableExport = new aws.dynamodb.TableExport("example", { * tableArn: exampleTable.arn, * s3Bucket: example.id, * }); * ``` * * ### Example with export time * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.dynamodb.TableExport("example", { * exportTime: "2023-04-02T11:30:13+01:00", * s3Bucket: exampleAwsS3Bucket.id, * tableArn: exampleAwsDynamodbTable.arn, * }); * ``` * * ### Incremental export * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.dynamodb.TableExport("example", { * exportType: "INCREMENTAL_EXPORT", * s3Bucket: exampleAwsS3Bucket.id, * tableArn: exampleAwsDynamodbTable.arn, * incrementalExportSpecification: { * exportFromTime: "2025-02-09T12:00:00+01:00", * exportToTime: "2025-02-09T13:00:00+01:00", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import DynamoDB table exports using the `arn`. For example: * * ```sh * $ pulumi import aws:dynamodb/tableExport:TableExport example arn:aws:dynamodb:us-west-2:12345678911:table/my-table-1/export/01580735656614-2c2f422e * ``` */ class TableExport extends pulumi.CustomResource { /** * Get an existing TableExport resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new TableExport(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of TableExport. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === TableExport.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["billedSizeInBytes"] = state?.billedSizeInBytes; resourceInputs["endTime"] = state?.endTime; resourceInputs["exportFormat"] = state?.exportFormat; resourceInputs["exportStatus"] = state?.exportStatus; resourceInputs["exportTime"] = state?.exportTime; resourceInputs["exportType"] = state?.exportType; resourceInputs["incrementalExportSpecification"] = state?.incrementalExportSpecification; resourceInputs["itemCount"] = state?.itemCount; resourceInputs["manifestFilesS3Key"] = state?.manifestFilesS3Key; resourceInputs["region"] = state?.region; resourceInputs["s3Bucket"] = state?.s3Bucket; resourceInputs["s3BucketOwner"] = state?.s3BucketOwner; resourceInputs["s3Prefix"] = state?.s3Prefix; resourceInputs["s3SseAlgorithm"] = state?.s3SseAlgorithm; resourceInputs["s3SseKmsKeyId"] = state?.s3SseKmsKeyId; resourceInputs["startTime"] = state?.startTime; resourceInputs["tableArn"] = state?.tableArn; } else { const args = argsOrState; if (args?.s3Bucket === undefined && !opts.urn) { throw new Error("Missing required property 's3Bucket'"); } if (args?.tableArn === undefined && !opts.urn) { throw new Error("Missing required property 'tableArn'"); } resourceInputs["exportFormat"] = args?.exportFormat; resourceInputs["exportTime"] = args?.exportTime; resourceInputs["exportType"] = args?.exportType; resourceInputs["incrementalExportSpecification"] = args?.incrementalExportSpecification; resourceInputs["region"] = args?.region; resourceInputs["s3Bucket"] = args?.s3Bucket; resourceInputs["s3BucketOwner"] = args?.s3BucketOwner; resourceInputs["s3Prefix"] = args?.s3Prefix; resourceInputs["s3SseAlgorithm"] = args?.s3SseAlgorithm; resourceInputs["s3SseKmsKeyId"] = args?.s3SseKmsKeyId; resourceInputs["tableArn"] = args?.tableArn; resourceInputs["arn"] = undefined /*out*/; resourceInputs["billedSizeInBytes"] = undefined /*out*/; resourceInputs["endTime"] = undefined /*out*/; resourceInputs["exportStatus"] = undefined /*out*/; resourceInputs["itemCount"] = undefined /*out*/; resourceInputs["manifestFilesS3Key"] = undefined /*out*/; resourceInputs["startTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(TableExport.__pulumiType, name, resourceInputs, opts); } } exports.TableExport = TableExport; /** @internal */ TableExport.__pulumiType = 'aws:dynamodb/tableExport:TableExport'; //# sourceMappingURL=tableExport.js.map