@pulumiverse/time
Version:
A Pulumi package for creating and managing Time resources
105 lines • 4.98 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Rotating = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as time from "@pulumiverse/time";
*
* const example = new time.Rotating("example", {rotationDays: 30});
* ```
*
* ## Import
*
* This resource can be imported using the base UTC RFC3339 value and rotation years, months, days, hours, and minutes, separated by commas (`,`), e.g. for 30 days
*
* ```sh
* $ pulumi import time:index/rotating:Rotating example 2020-02-12T06:36:13Z,0,0,30,0,0
* ```
*
* Otherwise, to import with the rotation RFC3339 value, the base UTC RFC3339 value and rotation UTC RFC3339 value, separated by commas (`,`), e.g.
*
* ```sh
* $ pulumi import time:index/rotating:Rotating example 2020-02-12T06:36:13Z,2020-02-13T06:36:13Z
* ```
*
* The `triggers` argument cannot be imported.
*/
class Rotating extends pulumi.CustomResource {
/**
* Get an existing Rotating 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 Rotating(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Rotating. 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'] === Rotating.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["day"] = state ? state.day : undefined;
resourceInputs["hour"] = state ? state.hour : undefined;
resourceInputs["minute"] = state ? state.minute : undefined;
resourceInputs["month"] = state ? state.month : undefined;
resourceInputs["rfc3339"] = state ? state.rfc3339 : undefined;
resourceInputs["rotationDays"] = state ? state.rotationDays : undefined;
resourceInputs["rotationHours"] = state ? state.rotationHours : undefined;
resourceInputs["rotationMinutes"] = state ? state.rotationMinutes : undefined;
resourceInputs["rotationMonths"] = state ? state.rotationMonths : undefined;
resourceInputs["rotationRfc3339"] = state ? state.rotationRfc3339 : undefined;
resourceInputs["rotationYears"] = state ? state.rotationYears : undefined;
resourceInputs["second"] = state ? state.second : undefined;
resourceInputs["triggers"] = state ? state.triggers : undefined;
resourceInputs["unix"] = state ? state.unix : undefined;
resourceInputs["year"] = state ? state.year : undefined;
}
else {
const args = argsOrState;
resourceInputs["rfc3339"] = args ? args.rfc3339 : undefined;
resourceInputs["rotationDays"] = args ? args.rotationDays : undefined;
resourceInputs["rotationHours"] = args ? args.rotationHours : undefined;
resourceInputs["rotationMinutes"] = args ? args.rotationMinutes : undefined;
resourceInputs["rotationMonths"] = args ? args.rotationMonths : undefined;
resourceInputs["rotationRfc3339"] = args ? args.rotationRfc3339 : undefined;
resourceInputs["rotationYears"] = args ? args.rotationYears : undefined;
resourceInputs["triggers"] = args ? args.triggers : undefined;
resourceInputs["day"] = undefined /*out*/;
resourceInputs["hour"] = undefined /*out*/;
resourceInputs["minute"] = undefined /*out*/;
resourceInputs["month"] = undefined /*out*/;
resourceInputs["second"] = undefined /*out*/;
resourceInputs["unix"] = undefined /*out*/;
resourceInputs["year"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Rotating.__pulumiType, name, resourceInputs, opts);
}
}
exports.Rotating = Rotating;
/** @internal */
Rotating.__pulumiType = 'time:index/rotating:Rotating';
//# sourceMappingURL=rotating.js.map