exoscale.BlockStorageVolume
Explore with Pulumi AI
Manage Exoscale Block Storage Volume.
Block Storage offers persistent externally attached volumes for your workloads.
Create BlockStorageVolume Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BlockStorageVolume(name: string, args: BlockStorageVolumeArgs, opts?: CustomResourceOptions);
@overload
def BlockStorageVolume(resource_name: str,
args: BlockStorageVolumeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BlockStorageVolume(resource_name: str,
opts: Optional[ResourceOptions] = None,
zone: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
size: Optional[int] = None,
snapshot_target: Optional[BlockStorageVolumeSnapshotTargetArgs] = None,
timeouts: Optional[BlockStorageVolumeTimeoutsArgs] = None)
func NewBlockStorageVolume(ctx *Context, name string, args BlockStorageVolumeArgs, opts ...ResourceOption) (*BlockStorageVolume, error)
public BlockStorageVolume(string name, BlockStorageVolumeArgs args, CustomResourceOptions? opts = null)
public BlockStorageVolume(String name, BlockStorageVolumeArgs args)
public BlockStorageVolume(String name, BlockStorageVolumeArgs args, CustomResourceOptions options)
type: exoscale:BlockStorageVolume
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 BlockStorageVolumeArgs
- 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 BlockStorageVolumeArgs
- 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 BlockStorageVolumeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BlockStorageVolumeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BlockStorageVolumeArgs
- 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 blockStorageVolumeResource = new Exoscale.BlockStorageVolume("blockStorageVolumeResource", new()
{
Zone = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
Size = 0,
SnapshotTarget = new Exoscale.Inputs.BlockStorageVolumeSnapshotTargetArgs
{
Id = "string",
},
Timeouts = new Exoscale.Inputs.BlockStorageVolumeTimeoutsArgs
{
Read = "string",
},
});
example, err := exoscale.NewBlockStorageVolume(ctx, "blockStorageVolumeResource", &exoscale.BlockStorageVolumeArgs{
Zone: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Size: pulumi.Int(0),
SnapshotTarget: &exoscale.BlockStorageVolumeSnapshotTargetArgs{
Id: pulumi.String("string"),
},
Timeouts: &exoscale.BlockStorageVolumeTimeoutsArgs{
Read: pulumi.String("string"),
},
})
var blockStorageVolumeResource = new BlockStorageVolume("blockStorageVolumeResource", BlockStorageVolumeArgs.builder()
.zone("string")
.labels(Map.of("string", "string"))
.name("string")
.size(0)
.snapshotTarget(BlockStorageVolumeSnapshotTargetArgs.builder()
.id("string")
.build())
.timeouts(BlockStorageVolumeTimeoutsArgs.builder()
.read("string")
.build())
.build());
block_storage_volume_resource = exoscale.BlockStorageVolume("blockStorageVolumeResource",
zone="string",
labels={
"string": "string",
},
name="string",
size=0,
snapshot_target={
"id": "string",
},
timeouts={
"read": "string",
})
const blockStorageVolumeResource = new exoscale.BlockStorageVolume("blockStorageVolumeResource", {
zone: "string",
labels: {
string: "string",
},
name: "string",
size: 0,
snapshotTarget: {
id: "string",
},
timeouts: {
read: "string",
},
});
type: exoscale:BlockStorageVolume
properties:
labels:
string: string
name: string
size: 0
snapshotTarget:
id: string
timeouts:
read: string
zone: string
BlockStorageVolume 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 BlockStorageVolume resource accepts the following input properties:
- Zone string
- ❗ The Exoscale Zone name.
- Labels Dictionary<string, string>
- Resource labels.
- Name string
- Volume name.
- Size int
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- Snapshot
Target Pulumiverse.Exoscale. Inputs. Block Storage Volume Snapshot Target - Block storage snapshot to use when creating a volume. Read-only after creation.
- Timeouts
Pulumiverse.
Exoscale. Inputs. Block Storage Volume Timeouts
- Zone string
- ❗ The Exoscale Zone name.
- Labels map[string]string
- Resource labels.
- Name string
- Volume name.
- Size int
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- Snapshot
Target BlockStorage Volume Snapshot Target Args - Block storage snapshot to use when creating a volume. Read-only after creation.
- Timeouts
Block
Storage Volume Timeouts Args
- zone String
- ❗ The Exoscale Zone name.
- labels Map<String,String>
- Resource labels.
- name String
- Volume name.
- size Integer
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- snapshot
Target BlockStorage Volume Snapshot Target - Block storage snapshot to use when creating a volume. Read-only after creation.
- timeouts
Block
Storage Volume Timeouts
- zone string
- ❗ The Exoscale Zone name.
- labels {[key: string]: string}
- Resource labels.
- name string
- Volume name.
- size number
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- snapshot
Target BlockStorage Volume Snapshot Target - Block storage snapshot to use when creating a volume. Read-only after creation.
- timeouts
Block
Storage Volume Timeouts
- zone str
- ❗ The Exoscale Zone name.
- labels Mapping[str, str]
- Resource labels.
- name str
- Volume name.
- size int
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- snapshot_
target BlockStorage Volume Snapshot Target Args - Block storage snapshot to use when creating a volume. Read-only after creation.
- timeouts
Block
Storage Volume Timeouts Args
- zone String
- ❗ The Exoscale Zone name.
- labels Map<String>
- Resource labels.
- name String
- Volume name.
- size Number
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- snapshot
Target Property Map - Block storage snapshot to use when creating a volume. Read-only after creation.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the BlockStorageVolume resource produces the following output properties:
- blocksize int
- Volume block size.
- created_
at str - Volume creation date.
- id str
- The provider-assigned unique ID for this managed resource.
- state str
- Volume state.
Look up Existing BlockStorageVolume Resource
Get an existing BlockStorageVolume 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?: BlockStorageVolumeState, opts?: CustomResourceOptions): BlockStorageVolume
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
blocksize: Optional[int] = None,
created_at: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
size: Optional[int] = None,
snapshot_target: Optional[BlockStorageVolumeSnapshotTargetArgs] = None,
state: Optional[str] = None,
timeouts: Optional[BlockStorageVolumeTimeoutsArgs] = None,
zone: Optional[str] = None) -> BlockStorageVolume
func GetBlockStorageVolume(ctx *Context, name string, id IDInput, state *BlockStorageVolumeState, opts ...ResourceOption) (*BlockStorageVolume, error)
public static BlockStorageVolume Get(string name, Input<string> id, BlockStorageVolumeState? state, CustomResourceOptions? opts = null)
public static BlockStorageVolume get(String name, Output<String> id, BlockStorageVolumeState 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.
- Blocksize int
- Volume block size.
- Created
At string - Volume creation date.
- Labels Dictionary<string, string>
- Resource labels.
- Name string
- Volume name.
- Size int
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- Snapshot
Target Pulumiverse.Exoscale. Inputs. Block Storage Volume Snapshot Target - Block storage snapshot to use when creating a volume. Read-only after creation.
- State string
- Volume state.
- Timeouts
Pulumiverse.
Exoscale. Inputs. Block Storage Volume Timeouts - Zone string
- ❗ The Exoscale Zone name.
- Blocksize int
- Volume block size.
- Created
At string - Volume creation date.
- Labels map[string]string
- Resource labels.
- Name string
- Volume name.
- Size int
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- Snapshot
Target BlockStorage Volume Snapshot Target Args - Block storage snapshot to use when creating a volume. Read-only after creation.
- State string
- Volume state.
- Timeouts
Block
Storage Volume Timeouts Args - Zone string
- ❗ The Exoscale Zone name.
- blocksize Integer
- Volume block size.
- created
At String - Volume creation date.
- labels Map<String,String>
- Resource labels.
- name String
- Volume name.
- size Integer
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- snapshot
Target BlockStorage Volume Snapshot Target - Block storage snapshot to use when creating a volume. Read-only after creation.
- state String
- Volume state.
- timeouts
Block
Storage Volume Timeouts - zone String
- ❗ The Exoscale Zone name.
- blocksize number
- Volume block size.
- created
At string - Volume creation date.
- labels {[key: string]: string}
- Resource labels.
- name string
- Volume name.
- size number
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- snapshot
Target BlockStorage Volume Snapshot Target - Block storage snapshot to use when creating a volume. Read-only after creation.
- state string
- Volume state.
- timeouts
Block
Storage Volume Timeouts - zone string
- ❗ The Exoscale Zone name.
- blocksize int
- Volume block size.
- created_
at str - Volume creation date.
- labels Mapping[str, str]
- Resource labels.
- name str
- Volume name.
- size int
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- snapshot_
target BlockStorage Volume Snapshot Target Args - Block storage snapshot to use when creating a volume. Read-only after creation.
- state str
- Volume state.
- timeouts
Block
Storage Volume Timeouts Args - zone str
- ❗ The Exoscale Zone name.
- blocksize Number
- Volume block size.
- created
At String - Volume creation date.
- labels Map<String>
- Resource labels.
- name String
- Volume name.
- size Number
- Volume size in GB (default 10). If volume is attached, instance must be stopped to update this value. Volume can only grow, cannot be shrunk.
- snapshot
Target Property Map - Block storage snapshot to use when creating a volume. Read-only after creation.
- state String
- Volume state.
- timeouts Property Map
- zone String
- ❗ The Exoscale Zone name.
Supporting Types
BlockStorageVolumeSnapshotTarget, BlockStorageVolumeSnapshotTargetArgs
- Id string
- Snapshot ID.
- Id string
- Snapshot ID.
- id String
- Snapshot ID.
- id string
- Snapshot ID.
- id str
- Snapshot ID.
- id String
- Snapshot ID.
BlockStorageVolumeTimeouts, BlockStorageVolumeTimeoutsArgs
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
Package Details
- Repository
- exoscale pulumiverse/pulumi-exoscale
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
exoscale
Terraform Provider.