genesiscloud.Volume
Explore with Pulumi AI
Volume resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as genesiscloud from "@genesiscloud/pulumi-genesiscloud";
const example = new genesiscloud.Volume("example", {
region: "NORD-NO-KRS-1",
size: 50,
type: "hdd",
});
import pulumi
import pulumi_genesiscloud as genesiscloud
example = genesiscloud.Volume("example",
region="NORD-NO-KRS-1",
size=50,
type="hdd")
package main
import (
"github.com/genesiscloud/pulumi-genesiscloud/sdk/go/genesiscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := genesiscloud.NewVolume(ctx, "example", &genesiscloud.VolumeArgs{
Region: pulumi.String("NORD-NO-KRS-1"),
Size: pulumi.Int(50),
Type: pulumi.String("hdd"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Genesiscloud = GenesisCloud.PulumiPackage.Genesiscloud;
return await Deployment.RunAsync(() =>
{
var example = new Genesiscloud.Volume("example", new()
{
Region = "NORD-NO-KRS-1",
Size = 50,
Type = "hdd",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.genesiscloud.Volume;
import com.pulumi.genesiscloud.VolumeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Volume("example", VolumeArgs.builder()
.region("NORD-NO-KRS-1")
.size(50)
.type("hdd")
.build());
}
}
resources:
example:
type: genesiscloud:Volume
properties:
region: NORD-NO-KRS-1
size: 50
type: hdd
Create Volume Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
@overload
def Volume(resource_name: str,
args: VolumeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Volume(resource_name: str,
opts: Optional[ResourceOptions] = None,
region: Optional[str] = None,
size: Optional[int] = None,
type: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
retain_on_delete: Optional[bool] = None,
timeouts: Optional[VolumeTimeoutsArgs] = None)
func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
public Volume(String name, VolumeArgs args)
public Volume(String name, VolumeArgs args, CustomResourceOptions options)
type: genesiscloud:Volume
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VolumeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VolumeArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VolumeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VolumeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VolumeArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var volumeResource = new Genesiscloud.Volume("volumeResource", new()
{
Region = "string",
Size = 0,
Type = "string",
Description = "string",
Name = "string",
RetainOnDelete = false,
Timeouts = new Genesiscloud.Inputs.VolumeTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
Update = "string",
},
});
example, err := genesiscloud.NewVolume(ctx, "volumeResource", &genesiscloud.VolumeArgs{
Region: pulumi.String("string"),
Size: pulumi.Int(0),
Type: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
RetainOnDelete: pulumi.Bool(false),
Timeouts: &genesiscloud.VolumeTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
.region("string")
.size(0)
.type("string")
.description("string")
.name("string")
.retainOnDelete(false)
.timeouts(VolumeTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.update("string")
.build())
.build());
volume_resource = genesiscloud.Volume("volumeResource",
region="string",
size=0,
type="string",
description="string",
name="string",
retain_on_delete=False,
timeouts={
"create": "string",
"delete": "string",
"read": "string",
"update": "string",
})
const volumeResource = new genesiscloud.Volume("volumeResource", {
region: "string",
size: 0,
type: "string",
description: "string",
name: "string",
retainOnDelete: false,
timeouts: {
create: "string",
"delete": "string",
read: "string",
update: "string",
},
});
type: genesiscloud:Volume
properties:
description: string
name: string
region: string
retainOnDelete: false
size: 0
timeouts:
create: string
delete: string
read: string
update: string
type: string
Volume Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Volume resource accepts the following input properties:
- Region string
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- Size int
- The storage size of this volume given in GiB. - The value must be at least 1.
- Type string
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- Description string
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- Name string
- The human-readable name for the volume.
- Retain
On boolDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- Timeouts
Genesis
Cloud. Pulumi Package. Genesiscloud. Inputs. Volume Timeouts
- Region string
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- Size int
- The storage size of this volume given in GiB. - The value must be at least 1.
- Type string
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- Description string
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- Name string
- The human-readable name for the volume.
- Retain
On boolDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- Timeouts
Volume
Timeouts Args
- region String
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- size Integer
- The storage size of this volume given in GiB. - The value must be at least 1.
- type String
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- description String
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- name String
- The human-readable name for the volume.
- retain
On BooleanDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- timeouts
Volume
Timeouts
- region string
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- size number
- The storage size of this volume given in GiB. - The value must be at least 1.
- type string
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- description string
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- name string
- The human-readable name for the volume.
- retain
On booleanDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- timeouts
Volume
Timeouts
- region str
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- size int
- The storage size of this volume given in GiB. - The value must be at least 1.
- type str
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- description str
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- name str
- The human-readable name for the volume.
- retain_
on_ booldelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- timeouts
Volume
Timeouts Args
- region String
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- size Number
- The storage size of this volume given in GiB. - The value must be at least 1.
- type String
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- description String
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- name String
- The human-readable name for the volume.
- retain
On BooleanDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the Volume resource produces the following output properties:
- created_
at str - The timestamp when this volume was created in RFC 3339.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The volume status.
Look up Existing Volume Resource
Get an existing Volume resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VolumeState, opts?: CustomResourceOptions): Volume
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
retain_on_delete: Optional[bool] = None,
size: Optional[int] = None,
status: Optional[str] = None,
timeouts: Optional[VolumeTimeoutsArgs] = None,
type: Optional[str] = None) -> Volume
func GetVolume(ctx *Context, name string, id IDInput, state *VolumeState, opts ...ResourceOption) (*Volume, error)
public static Volume Get(string name, Input<string> id, VolumeState? state, CustomResourceOptions? opts = null)
public static Volume get(String name, Output<String> id, VolumeState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - The timestamp when this volume was created in RFC 3339.
- Description string
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- Name string
- The human-readable name for the volume.
- Region string
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- Retain
On boolDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- Size int
- The storage size of this volume given in GiB. - The value must be at least 1.
- Status string
- The volume status.
- Timeouts
Genesis
Cloud. Pulumi Package. Genesiscloud. Inputs. Volume Timeouts - Type string
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- Created
At string - The timestamp when this volume was created in RFC 3339.
- Description string
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- Name string
- The human-readable name for the volume.
- Region string
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- Retain
On boolDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- Size int
- The storage size of this volume given in GiB. - The value must be at least 1.
- Status string
- The volume status.
- Timeouts
Volume
Timeouts Args - Type string
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- created
At String - The timestamp when this volume was created in RFC 3339.
- description String
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- name String
- The human-readable name for the volume.
- region String
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- retain
On BooleanDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- size Integer
- The storage size of this volume given in GiB. - The value must be at least 1.
- status String
- The volume status.
- timeouts
Volume
Timeouts - type String
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- created
At string - The timestamp when this volume was created in RFC 3339.
- description string
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- name string
- The human-readable name for the volume.
- region string
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- retain
On booleanDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- size number
- The storage size of this volume given in GiB. - The value must be at least 1.
- status string
- The volume status.
- timeouts
Volume
Timeouts - type string
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- created_
at str - The timestamp when this volume was created in RFC 3339.
- description str
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- name str
- The human-readable name for the volume.
- region str
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- retain_
on_ booldelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- size int
- The storage size of this volume given in GiB. - The value must be at least 1.
- status str
- The volume status.
- timeouts
Volume
Timeouts Args - type str
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
- created
At String - The timestamp when this volume was created in RFC 3339.
- description String
- The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
- name String
- The human-readable name for the volume.
- region String
- The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- retain
On BooleanDelete - Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
- size Number
- The storage size of this volume given in GiB. - The value must be at least 1.
- status String
- The volume status.
- timeouts Property Map
- type String
- The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
Supporting Types
VolumeTimeouts, VolumeTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
$ pulumi import genesiscloud:index/volume:Volume example 18efeec8-94f0-4776-8ff2-5e9b49c74608
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- genesiscloud genesiscloud/pulumi-genesiscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
genesiscloud
Terraform Provider.