1. Packages
  2. Packet
  3. API Docs
  4. Volume
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

packet.Volume

Explore with Pulumi AI

packet logo
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

    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,
               facility: Optional[str] = None,
               plan: Optional[str] = None,
               project_id: Optional[str] = None,
               size: Optional[int] = None,
               billing_cycle: Optional[str] = None,
               description: Optional[str] = None,
               locked: Optional[bool] = None,
               snapshot_policies: Optional[Sequence[VolumeSnapshotPolicyArgs]] = 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: packet: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 Packet.Volume("volumeResource", new()
    {
        Facility = "string",
        Plan = "string",
        ProjectId = "string",
        Size = 0,
        BillingCycle = "string",
        Description = "string",
        Locked = false,
        SnapshotPolicies = new[]
        {
            new Packet.Inputs.VolumeSnapshotPolicyArgs
            {
                SnapshotCount = 0,
                SnapshotFrequency = "string",
            },
        },
    });
    
    example, err := packet.NewVolume(ctx, "volumeResource", &packet.VolumeArgs{
    	Facility:     pulumi.String("string"),
    	Plan:         pulumi.String("string"),
    	ProjectId:    pulumi.String("string"),
    	Size:         pulumi.Int(0),
    	BillingCycle: pulumi.String("string"),
    	Description:  pulumi.String("string"),
    	Locked:       pulumi.Bool(false),
    	SnapshotPolicies: packet.VolumeSnapshotPolicyArray{
    		&packet.VolumeSnapshotPolicyArgs{
    			SnapshotCount:     pulumi.Int(0),
    			SnapshotFrequency: pulumi.String("string"),
    		},
    	},
    })
    
    var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
        .facility("string")
        .plan("string")
        .projectId("string")
        .size(0)
        .billingCycle("string")
        .description("string")
        .locked(false)
        .snapshotPolicies(VolumeSnapshotPolicyArgs.builder()
            .snapshotCount(0)
            .snapshotFrequency("string")
            .build())
        .build());
    
    volume_resource = packet.Volume("volumeResource",
        facility="string",
        plan="string",
        project_id="string",
        size=0,
        billing_cycle="string",
        description="string",
        locked=False,
        snapshot_policies=[{
            "snapshot_count": 0,
            "snapshot_frequency": "string",
        }])
    
    const volumeResource = new packet.Volume("volumeResource", {
        facility: "string",
        plan: "string",
        projectId: "string",
        size: 0,
        billingCycle: "string",
        description: "string",
        locked: false,
        snapshotPolicies: [{
            snapshotCount: 0,
            snapshotFrequency: "string",
        }],
    });
    
    type: packet:Volume
    properties:
        billingCycle: string
        description: string
        facility: string
        locked: false
        plan: string
        projectId: string
        size: 0
        snapshotPolicies:
            - snapshotCount: 0
              snapshotFrequency: 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:

    Facility string
    The facility to create the volume in
    Plan string
    The service plan slug of the volume
    ProjectId string
    The packet project ID to deploy the volume in
    Size int
    The size in GB to make the volume
    BillingCycle string
    The billing cycle, defaults to "hourly"
    Description string
    Optional description for the volume
    Locked bool
    Lock or unlock the volume
    SnapshotPolicies List<VolumeSnapshotPolicy>
    Optional list of snapshot policies
    Facility string
    The facility to create the volume in
    Plan string
    The service plan slug of the volume
    ProjectId string
    The packet project ID to deploy the volume in
    Size int
    The size in GB to make the volume
    BillingCycle string
    The billing cycle, defaults to "hourly"
    Description string
    Optional description for the volume
    Locked bool
    Lock or unlock the volume
    SnapshotPolicies []VolumeSnapshotPolicyArgs
    Optional list of snapshot policies
    facility String
    The facility to create the volume in
    plan String
    The service plan slug of the volume
    projectId String
    The packet project ID to deploy the volume in
    size Integer
    The size in GB to make the volume
    billingCycle String
    The billing cycle, defaults to "hourly"
    description String
    Optional description for the volume
    locked Boolean
    Lock or unlock the volume
    snapshotPolicies List<VolumeSnapshotPolicy>
    Optional list of snapshot policies
    facility Facility
    The facility to create the volume in
    plan string
    The service plan slug of the volume
    projectId string
    The packet project ID to deploy the volume in
    size number
    The size in GB to make the volume
    billingCycle BillingCycle
    The billing cycle, defaults to "hourly"
    description string
    Optional description for the volume
    locked boolean
    Lock or unlock the volume
    snapshotPolicies VolumeSnapshotPolicy[]
    Optional list of snapshot policies
    facility str
    The facility to create the volume in
    plan str
    The service plan slug of the volume
    project_id str
    The packet project ID to deploy the volume in
    size int
    The size in GB to make the volume
    billing_cycle str
    The billing cycle, defaults to "hourly"
    description str
    Optional description for the volume
    locked bool
    Lock or unlock the volume
    snapshot_policies Sequence[VolumeSnapshotPolicyArgs]
    Optional list of snapshot policies
    facility
    The facility to create the volume in
    plan String
    The service plan slug of the volume
    projectId String
    The packet project ID to deploy the volume in
    size Number
    The size in GB to make the volume
    billingCycle
    The billing cycle, defaults to "hourly"
    description String
    Optional description for the volume
    locked Boolean
    Lock or unlock the volume
    snapshotPolicies List<Property Map>
    Optional list of snapshot policies

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Volume resource produces the following output properties:

    Attachments List<VolumeAttachment>
    A list of attachments, each with it's own href attribute
    Created string
    The timestamp for when the volume was created
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the volume
    State string
    The state of the volume
    Updated string
    The timestamp for the last time the volume was updated
    Attachments []VolumeAttachmentType
    A list of attachments, each with it's own href attribute
    Created string
    The timestamp for when the volume was created
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the volume
    State string
    The state of the volume
    Updated string
    The timestamp for the last time the volume was updated
    attachments List<VolumeAttachment>
    A list of attachments, each with it's own href attribute
    created String
    The timestamp for when the volume was created
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the volume
    state String
    The state of the volume
    updated String
    The timestamp for the last time the volume was updated
    attachments VolumeAttachment[]
    A list of attachments, each with it's own href attribute
    created string
    The timestamp for when the volume was created
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the volume
    state string
    The state of the volume
    updated string
    The timestamp for the last time the volume was updated
    attachments Sequence[VolumeAttachment]
    A list of attachments, each with it's own href attribute
    created str
    The timestamp for when the volume was created
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the volume
    state str
    The state of the volume
    updated str
    The timestamp for the last time the volume was updated
    attachments List<Property Map>
    A list of attachments, each with it's own href attribute
    created String
    The timestamp for when the volume was created
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the volume
    state String
    The state of the volume
    updated String
    The timestamp for the last time the volume was updated

    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,
            attachments: Optional[Sequence[VolumeAttachmentArgs]] = None,
            billing_cycle: Optional[str] = None,
            created: Optional[str] = None,
            description: Optional[str] = None,
            facility: Optional[str] = None,
            locked: Optional[bool] = None,
            name: Optional[str] = None,
            plan: Optional[str] = None,
            project_id: Optional[str] = None,
            size: Optional[int] = None,
            snapshot_policies: Optional[Sequence[VolumeSnapshotPolicyArgs]] = None,
            state: Optional[str] = None,
            updated: 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.
    The following state arguments are supported:
    Attachments List<VolumeAttachment>
    A list of attachments, each with it's own href attribute
    BillingCycle string
    The billing cycle, defaults to "hourly"
    Created string
    The timestamp for when the volume was created
    Description string
    Optional description for the volume
    Facility string
    The facility to create the volume in
    Locked bool
    Lock or unlock the volume
    Name string
    The name of the volume
    Plan string
    The service plan slug of the volume
    ProjectId string
    The packet project ID to deploy the volume in
    Size int
    The size in GB to make the volume
    SnapshotPolicies List<VolumeSnapshotPolicy>
    Optional list of snapshot policies
    State string
    The state of the volume
    Updated string
    The timestamp for the last time the volume was updated
    Attachments []VolumeAttachmentTypeArgs
    A list of attachments, each with it's own href attribute
    BillingCycle string
    The billing cycle, defaults to "hourly"
    Created string
    The timestamp for when the volume was created
    Description string
    Optional description for the volume
    Facility string
    The facility to create the volume in
    Locked bool
    Lock or unlock the volume
    Name string
    The name of the volume
    Plan string
    The service plan slug of the volume
    ProjectId string
    The packet project ID to deploy the volume in
    Size int
    The size in GB to make the volume
    SnapshotPolicies []VolumeSnapshotPolicyArgs
    Optional list of snapshot policies
    State string
    The state of the volume
    Updated string
    The timestamp for the last time the volume was updated
    attachments List<VolumeAttachment>
    A list of attachments, each with it's own href attribute
    billingCycle String
    The billing cycle, defaults to "hourly"
    created String
    The timestamp for when the volume was created
    description String
    Optional description for the volume
    facility String
    The facility to create the volume in
    locked Boolean
    Lock or unlock the volume
    name String
    The name of the volume
    plan String
    The service plan slug of the volume
    projectId String
    The packet project ID to deploy the volume in
    size Integer
    The size in GB to make the volume
    snapshotPolicies List<VolumeSnapshotPolicy>
    Optional list of snapshot policies
    state String
    The state of the volume
    updated String
    The timestamp for the last time the volume was updated
    attachments VolumeAttachment[]
    A list of attachments, each with it's own href attribute
    billingCycle BillingCycle
    The billing cycle, defaults to "hourly"
    created string
    The timestamp for when the volume was created
    description string
    Optional description for the volume
    facility Facility
    The facility to create the volume in
    locked boolean
    Lock or unlock the volume
    name string
    The name of the volume
    plan string
    The service plan slug of the volume
    projectId string
    The packet project ID to deploy the volume in
    size number
    The size in GB to make the volume
    snapshotPolicies VolumeSnapshotPolicy[]
    Optional list of snapshot policies
    state string
    The state of the volume
    updated string
    The timestamp for the last time the volume was updated
    attachments Sequence[VolumeAttachmentArgs]
    A list of attachments, each with it's own href attribute
    billing_cycle str
    The billing cycle, defaults to "hourly"
    created str
    The timestamp for when the volume was created
    description str
    Optional description for the volume
    facility str
    The facility to create the volume in
    locked bool
    Lock or unlock the volume
    name str
    The name of the volume
    plan str
    The service plan slug of the volume
    project_id str
    The packet project ID to deploy the volume in
    size int
    The size in GB to make the volume
    snapshot_policies Sequence[VolumeSnapshotPolicyArgs]
    Optional list of snapshot policies
    state str
    The state of the volume
    updated str
    The timestamp for the last time the volume was updated
    attachments List<Property Map>
    A list of attachments, each with it's own href attribute
    billingCycle
    The billing cycle, defaults to "hourly"
    created String
    The timestamp for when the volume was created
    description String
    Optional description for the volume
    facility
    The facility to create the volume in
    locked Boolean
    Lock or unlock the volume
    name String
    The name of the volume
    plan String
    The service plan slug of the volume
    projectId String
    The packet project ID to deploy the volume in
    size Number
    The size in GB to make the volume
    snapshotPolicies List<Property Map>
    Optional list of snapshot policies
    state String
    The state of the volume
    updated String
    The timestamp for the last time the volume was updated

    Supporting Types

    VolumeAttachment, VolumeAttachmentArgs

    Href string
    Href string
    href String
    href string
    href str
    href String

    VolumeSnapshotPolicy, VolumeSnapshotPolicyArgs

    Package Details

    Repository
    Packet pulumi/pulumi-packet
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the packet Terraform Provider.
    packet logo
    Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi