Update
This commit is contained in:
43
sdk/nodejs/instanceSnapshot.ts
generated
43
sdk/nodejs/instanceSnapshot.ts
generated
@@ -1,4 +1,4 @@
|
||||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
||||
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
@@ -58,30 +58,30 @@ export class InstanceSnapshot extends pulumi.CustomResource {
|
||||
* The time Incus reported the snapshot was successfully created,
|
||||
* in UTC.
|
||||
*/
|
||||
public /*out*/ readonly createdAt!: pulumi.Output<number>;
|
||||
declare public /*out*/ readonly createdAt: pulumi.Output<number>;
|
||||
/**
|
||||
* **Required** - The name of the instance to snapshot.
|
||||
*/
|
||||
public readonly instance!: pulumi.Output<string>;
|
||||
declare public readonly instance: pulumi.Output<string>;
|
||||
/**
|
||||
* **Required** - Name of the snapshot.
|
||||
*/
|
||||
public readonly name!: pulumi.Output<string>;
|
||||
declare public readonly name: pulumi.Output<string>;
|
||||
/**
|
||||
* *Optional* - Name of the project where the snapshot will be stored.
|
||||
*/
|
||||
public readonly project!: pulumi.Output<string>;
|
||||
declare public readonly project: pulumi.Output<string>;
|
||||
/**
|
||||
* *Optional* - The remote in which the resource will be created. If
|
||||
* not provided, the provider's default remote will be used.
|
||||
*/
|
||||
public readonly remote!: pulumi.Output<string | undefined>;
|
||||
declare public readonly remote: pulumi.Output<string | undefined>;
|
||||
/**
|
||||
* *Optional* - Set to `true` to create a stateful snapshot,
|
||||
* `false` for stateless. Stateful snapshots include runtime state. Defaults to
|
||||
* `false`.
|
||||
*/
|
||||
public readonly stateful!: pulumi.Output<boolean>;
|
||||
declare public readonly stateful: pulumi.Output<boolean>;
|
||||
|
||||
/**
|
||||
* Create a InstanceSnapshot resource with the given unique name, arguments, and options.
|
||||
@@ -96,22 +96,25 @@ export class InstanceSnapshot extends pulumi.CustomResource {
|
||||
opts = opts || {};
|
||||
if (opts.id) {
|
||||
const state = argsOrState as InstanceSnapshotState | undefined;
|
||||
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
|
||||
resourceInputs["instance"] = state ? state.instance : undefined;
|
||||
resourceInputs["name"] = state ? state.name : undefined;
|
||||
resourceInputs["project"] = state ? state.project : undefined;
|
||||
resourceInputs["remote"] = state ? state.remote : undefined;
|
||||
resourceInputs["stateful"] = state ? state.stateful : undefined;
|
||||
resourceInputs["createdAt"] = state?.createdAt;
|
||||
resourceInputs["instance"] = state?.instance;
|
||||
resourceInputs["name"] = state?.name;
|
||||
resourceInputs["project"] = state?.project;
|
||||
resourceInputs["remote"] = state?.remote;
|
||||
resourceInputs["stateful"] = state?.stateful;
|
||||
} else {
|
||||
const args = argsOrState as InstanceSnapshotArgs | undefined;
|
||||
if ((!args || args.instance === undefined) && !opts.urn) {
|
||||
if (args?.instance === undefined && !opts.urn) {
|
||||
throw new Error("Missing required property 'instance'");
|
||||
}
|
||||
resourceInputs["instance"] = args ? args.instance : undefined;
|
||||
resourceInputs["name"] = args ? args.name : undefined;
|
||||
resourceInputs["project"] = (args ? args.project : undefined) ?? "default";
|
||||
resourceInputs["remote"] = args ? args.remote : undefined;
|
||||
resourceInputs["stateful"] = args ? args.stateful : undefined;
|
||||
if (args?.name === undefined && !opts.urn) {
|
||||
throw new Error("Missing required property 'name'");
|
||||
}
|
||||
resourceInputs["instance"] = args?.instance;
|
||||
resourceInputs["name"] = args?.name;
|
||||
resourceInputs["project"] = (args?.project) ?? "default";
|
||||
resourceInputs["remote"] = args?.remote;
|
||||
resourceInputs["stateful"] = args?.stateful;
|
||||
resourceInputs["createdAt"] = undefined /*out*/;
|
||||
}
|
||||
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
||||
@@ -164,7 +167,7 @@ export interface InstanceSnapshotArgs {
|
||||
/**
|
||||
* **Required** - Name of the snapshot.
|
||||
*/
|
||||
name?: pulumi.Input<string>;
|
||||
name: pulumi.Input<string>;
|
||||
/**
|
||||
* *Optional* - Name of the project where the snapshot will be stored.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user