1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ecs
  5. StorageCapacityUnit
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

alicloud.ecs.StorageCapacityUnit

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

    Provides a ECS Storage Capacity Unit resource.

    For information about ECS Storage Capacity Unit and how to use it, see What is Storage Capacity Unit.

    NOTE: Available in v1.155.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.ecs.StorageCapacityUnit("default", {
        capacity: 20,
        description: "tftestdescription",
        storageCapacityUnitName: "tftestname",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.ecs.StorageCapacityUnit("default",
        capacity=20,
        description="tftestdescription",
        storage_capacity_unit_name="tftestname")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewStorageCapacityUnit(ctx, "default", &ecs.StorageCapacityUnitArgs{
    			Capacity:                pulumi.Int(20),
    			Description:             pulumi.String("tftestdescription"),
    			StorageCapacityUnitName: pulumi.String("tftestname"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new AliCloud.Ecs.StorageCapacityUnit("default", new()
        {
            Capacity = 20,
            Description = "tftestdescription",
            StorageCapacityUnitName = "tftestname",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ecs.StorageCapacityUnit;
    import com.pulumi.alicloud.ecs.StorageCapacityUnitArgs;
    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 default_ = new StorageCapacityUnit("default", StorageCapacityUnitArgs.builder()
                .capacity(20)
                .description("tftestdescription")
                .storageCapacityUnitName("tftestname")
                .build());
    
        }
    }
    
    resources:
      default:
        type: alicloud:ecs:StorageCapacityUnit
        properties:
          capacity: 20
          description: tftestdescription
          storageCapacityUnitName: tftestname
    

    Create StorageCapacityUnit Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new StorageCapacityUnit(name: string, args: StorageCapacityUnitArgs, opts?: CustomResourceOptions);
    @overload
    def StorageCapacityUnit(resource_name: str,
                            args: StorageCapacityUnitArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def StorageCapacityUnit(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            capacity: Optional[int] = None,
                            description: Optional[str] = None,
                            period: Optional[int] = None,
                            period_unit: Optional[str] = None,
                            start_time: Optional[str] = None,
                            storage_capacity_unit_name: Optional[str] = None)
    func NewStorageCapacityUnit(ctx *Context, name string, args StorageCapacityUnitArgs, opts ...ResourceOption) (*StorageCapacityUnit, error)
    public StorageCapacityUnit(string name, StorageCapacityUnitArgs args, CustomResourceOptions? opts = null)
    public StorageCapacityUnit(String name, StorageCapacityUnitArgs args)
    public StorageCapacityUnit(String name, StorageCapacityUnitArgs args, CustomResourceOptions options)
    
    type: alicloud:ecs:StorageCapacityUnit
    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 StorageCapacityUnitArgs
    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 StorageCapacityUnitArgs
    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 StorageCapacityUnitArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StorageCapacityUnitArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StorageCapacityUnitArgs
    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 storageCapacityUnitResource = new AliCloud.Ecs.StorageCapacityUnit("storageCapacityUnitResource", new()
    {
        Capacity = 0,
        Description = "string",
        Period = 0,
        PeriodUnit = "string",
        StartTime = "string",
        StorageCapacityUnitName = "string",
    });
    
    example, err := ecs.NewStorageCapacityUnit(ctx, "storageCapacityUnitResource", &ecs.StorageCapacityUnitArgs{
    	Capacity:                pulumi.Int(0),
    	Description:             pulumi.String("string"),
    	Period:                  pulumi.Int(0),
    	PeriodUnit:              pulumi.String("string"),
    	StartTime:               pulumi.String("string"),
    	StorageCapacityUnitName: pulumi.String("string"),
    })
    
    var storageCapacityUnitResource = new StorageCapacityUnit("storageCapacityUnitResource", StorageCapacityUnitArgs.builder()
        .capacity(0)
        .description("string")
        .period(0)
        .periodUnit("string")
        .startTime("string")
        .storageCapacityUnitName("string")
        .build());
    
    storage_capacity_unit_resource = alicloud.ecs.StorageCapacityUnit("storageCapacityUnitResource",
        capacity=0,
        description="string",
        period=0,
        period_unit="string",
        start_time="string",
        storage_capacity_unit_name="string")
    
    const storageCapacityUnitResource = new alicloud.ecs.StorageCapacityUnit("storageCapacityUnitResource", {
        capacity: 0,
        description: "string",
        period: 0,
        periodUnit: "string",
        startTime: "string",
        storageCapacityUnitName: "string",
    });
    
    type: alicloud:ecs:StorageCapacityUnit
    properties:
        capacity: 0
        description: string
        period: 0
        periodUnit: string
        startTime: string
        storageCapacityUnitName: string
    

    StorageCapacityUnit Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The StorageCapacityUnit resource accepts the following input properties:

    Capacity int
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    Description string
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    Period int
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    PeriodUnit string
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    StartTime string
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    StorageCapacityUnitName string
    The name of the Storage Capacity Unit.
    Capacity int
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    Description string
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    Period int
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    PeriodUnit string
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    StartTime string
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    StorageCapacityUnitName string
    The name of the Storage Capacity Unit.
    capacity Integer
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    description String
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    period Integer
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    periodUnit String
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    startTime String
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    storageCapacityUnitName String
    The name of the Storage Capacity Unit.
    capacity number
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    description string
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    period number
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    periodUnit string
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    startTime string
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    storageCapacityUnitName string
    The name of the Storage Capacity Unit.
    capacity int
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    description str
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    period int
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    period_unit str
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    start_time str
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    storage_capacity_unit_name str
    The name of the Storage Capacity Unit.
    capacity Number
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    description String
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    period Number
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    periodUnit String
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    startTime String
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    storageCapacityUnitName String
    The name of the Storage Capacity Unit.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of Storage Capacity Unit.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of Storage Capacity Unit.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of Storage Capacity Unit.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of Storage Capacity Unit.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of Storage Capacity Unit.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of Storage Capacity Unit.

    Look up Existing StorageCapacityUnit Resource

    Get an existing StorageCapacityUnit 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?: StorageCapacityUnitState, opts?: CustomResourceOptions): StorageCapacityUnit
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            capacity: Optional[int] = None,
            description: Optional[str] = None,
            period: Optional[int] = None,
            period_unit: Optional[str] = None,
            start_time: Optional[str] = None,
            status: Optional[str] = None,
            storage_capacity_unit_name: Optional[str] = None) -> StorageCapacityUnit
    func GetStorageCapacityUnit(ctx *Context, name string, id IDInput, state *StorageCapacityUnitState, opts ...ResourceOption) (*StorageCapacityUnit, error)
    public static StorageCapacityUnit Get(string name, Input<string> id, StorageCapacityUnitState? state, CustomResourceOptions? opts = null)
    public static StorageCapacityUnit get(String name, Output<String> id, StorageCapacityUnitState 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:
    Capacity int
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    Description string
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    Period int
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    PeriodUnit string
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    StartTime string
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    Status string
    The status of Storage Capacity Unit.
    StorageCapacityUnitName string
    The name of the Storage Capacity Unit.
    Capacity int
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    Description string
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    Period int
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    PeriodUnit string
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    StartTime string
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    Status string
    The status of Storage Capacity Unit.
    StorageCapacityUnitName string
    The name of the Storage Capacity Unit.
    capacity Integer
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    description String
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    period Integer
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    periodUnit String
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    startTime String
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    status String
    The status of Storage Capacity Unit.
    storageCapacityUnitName String
    The name of the Storage Capacity Unit.
    capacity number
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    description string
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    period number
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    periodUnit string
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    startTime string
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    status string
    The status of Storage Capacity Unit.
    storageCapacityUnitName string
    The name of the Storage Capacity Unit.
    capacity int
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    description str
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    period int
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    period_unit str
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    start_time str
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    status str
    The status of Storage Capacity Unit.
    storage_capacity_unit_name str
    The name of the Storage Capacity Unit.
    capacity Number
    The capacity of the Storage Capacity Unit. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.
    description String
    The description of the Storage Capacity Unit. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    period Number
    The validity period of the Storage Capacity Unit. Default value: 1.

    • When PeriodUnit is set to Month, Valid values: 1, 2, 3, 6.
    • When PeriodUnit is set to Year, Valid values: 1, 3, 5.
    periodUnit String
    The unit of the validity period of the Storage Capacity Unit. Default value: Month. Valid values: Month, Year.
    startTime String
    The time when the Storage Capacity Unit takes effect. It cannot be earlier than or more than six months later than the time when the Storage Capacity Unit is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NOTE: This parameter is empty by default. The Storage Capacity Unit immediately takes effect after it is created.
    status String
    The status of Storage Capacity Unit.
    storageCapacityUnitName String
    The name of the Storage Capacity Unit.

    Import

    ECS Storage Capacity Unit can be imported using the id, e.g.

    $ pulumi import alicloud:ecs/storageCapacityUnit:StorageCapacityUnit example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi