@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
87 lines • 3.88 kB
JavaScript
// *** 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.ApplicationSnapshot = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a Kinesis Analytics v2 Application Snapshot.
* Snapshots are the AWS implementation of [Flink Savepoints](https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/state/savepoints.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.kinesisanalyticsv2.ApplicationSnapshot("example", {
* applicationName: exampleAwsKinesisanalyticsv2Application.name,
* snapshotName: "example-snapshot",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_kinesisanalyticsv2_application` using `application_name` together with `snapshot_name`. For example:
*
* ```sh
* $ pulumi import aws:kinesisanalyticsv2/applicationSnapshot:ApplicationSnapshot example example-application/example-snapshot
* ```
*/
class ApplicationSnapshot extends pulumi.CustomResource {
/**
* Get an existing ApplicationSnapshot 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 ApplicationSnapshot(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ApplicationSnapshot. 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'] === ApplicationSnapshot.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applicationName"] = state?.applicationName;
resourceInputs["applicationVersionId"] = state?.applicationVersionId;
resourceInputs["region"] = state?.region;
resourceInputs["snapshotCreationTimestamp"] = state?.snapshotCreationTimestamp;
resourceInputs["snapshotName"] = state?.snapshotName;
}
else {
const args = argsOrState;
if (args?.applicationName === undefined && !opts.urn) {
throw new Error("Missing required property 'applicationName'");
}
if (args?.snapshotName === undefined && !opts.urn) {
throw new Error("Missing required property 'snapshotName'");
}
resourceInputs["applicationName"] = args?.applicationName;
resourceInputs["region"] = args?.region;
resourceInputs["snapshotName"] = args?.snapshotName;
resourceInputs["applicationVersionId"] = undefined /*out*/;
resourceInputs["snapshotCreationTimestamp"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ApplicationSnapshot.__pulumiType, name, resourceInputs, opts);
}
}
exports.ApplicationSnapshot = ApplicationSnapshot;
/** @internal */
ApplicationSnapshot.__pulumiType = 'aws:kinesisanalyticsv2/applicationSnapshot:ApplicationSnapshot';
//# sourceMappingURL=applicationSnapshot.js.map
;