@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
83 lines • 3.51 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.SpotDatafeedSubscription = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* > **Note:** There is only a single subscription allowed per account.
*
* To help you understand the charges for your Spot instances, Amazon EC2 provides a data feed that describes your Spot instance usage and pricing.
* This data feed is sent to an Amazon S3 bucket that you specify when you subscribe to the data feed.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const _default = new aws.s3.Bucket("default", {bucket: "tf-spot-datafeed"});
* const defaultSpotDatafeedSubscription = new aws.ec2.SpotDatafeedSubscription("default", {
* bucket: _default.id,
* prefix: "my_subdirectory",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import a Spot Datafeed Subscription using the word `spot-datafeed-subscription`. For example:
*
* ```sh
* $ pulumi import aws:ec2/spotDatafeedSubscription:SpotDatafeedSubscription mysubscription spot-datafeed-subscription
* ```
*/
class SpotDatafeedSubscription extends pulumi.CustomResource {
/**
* Get an existing SpotDatafeedSubscription 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 SpotDatafeedSubscription(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of SpotDatafeedSubscription. 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'] === SpotDatafeedSubscription.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["bucket"] = state?.bucket;
resourceInputs["prefix"] = state?.prefix;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.bucket === undefined && !opts.urn) {
throw new Error("Missing required property 'bucket'");
}
resourceInputs["bucket"] = args?.bucket;
resourceInputs["prefix"] = args?.prefix;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SpotDatafeedSubscription.__pulumiType, name, resourceInputs, opts);
}
}
exports.SpotDatafeedSubscription = SpotDatafeedSubscription;
/** @internal */
SpotDatafeedSubscription.__pulumiType = 'aws:ec2/spotDatafeedSubscription:SpotDatafeedSubscription';
//# sourceMappingURL=spotDatafeedSubscription.js.map