Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.digitalocean;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.digitalocean.Utilities;
import com.pulumi.digitalocean.VolumeSnapshotArgs;
import com.pulumi.digitalocean.inputs.VolumeSnapshotState;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a DigitalOcean Volume Snapshot which can be used to create a snapshot from an existing volume.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Volume Snapshots can be imported using the `snapshot id`, e.g.
*
* ```sh
* $ pulumi import digitalocean:index/volumeSnapshot:VolumeSnapshot snapshot 506f78a4-e098-11e5-ad9f-000f53306ae1
* ```
*
*/
@ResourceType(type="digitalocean:index/volumeSnapshot:VolumeSnapshot")
public class VolumeSnapshot extends com.pulumi.resources.CustomResource {
/**
* The date and time the volume snapshot was created.
*
*/
@Export(name="createdAt", refs={String.class}, tree="[0]")
private Output createdAt;
/**
* @return The date and time the volume snapshot was created.
*
*/
public Output createdAt() {
return this.createdAt;
}
/**
* The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
*
*/
@Export(name="minDiskSize", refs={Integer.class}, tree="[0]")
private Output minDiskSize;
/**
* @return The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
*
*/
public Output minDiskSize() {
return this.minDiskSize;
}
/**
* A name for the volume snapshot.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return A name for the volume snapshot.
*
*/
public Output name() {
return this.name;
}
/**
* A list of DigitalOcean region "slugs" indicating where the volume snapshot is available.
*
*/
@Export(name="regions", refs={List.class,String.class}, tree="[0,1]")
private Output> regions;
/**
* @return A list of DigitalOcean region "slugs" indicating where the volume snapshot is available.
*
*/
public Output> regions() {
return this.regions;
}
/**
* The billable size of the volume snapshot in gigabytes.
*
*/
@Export(name="size", refs={Double.class}, tree="[0]")
private Output size;
/**
* @return The billable size of the volume snapshot in gigabytes.
*
*/
public Output size() {
return this.size;
}
/**
* A list of the tags to be applied to this volume snapshot.
*
*/
@Export(name="tags", refs={List.class,String.class}, tree="[0,1]")
private Output> tags;
/**
* @return A list of the tags to be applied to this volume snapshot.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* The ID of the volume from which the volume snapshot originated.
*
*/
@Export(name="volumeId", refs={String.class}, tree="[0]")
private Output volumeId;
/**
* @return The ID of the volume from which the volume snapshot originated.
*
*/
public Output volumeId() {
return this.volumeId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public VolumeSnapshot(String name) {
this(name, VolumeSnapshotArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public VolumeSnapshot(String name, VolumeSnapshotArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public VolumeSnapshot(String name, VolumeSnapshotArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("digitalocean:index/volumeSnapshot:VolumeSnapshot", name, args == null ? VolumeSnapshotArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private VolumeSnapshot(String name, Output id, @Nullable VolumeSnapshotState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("digitalocean:index/volumeSnapshot:VolumeSnapshot", name, state, makeResourceOptions(options, id));
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host 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
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static VolumeSnapshot get(String name, Output id, @Nullable VolumeSnapshotState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new VolumeSnapshot(name, id, state, options);
}
}