Documentation ¶
Index ¶
- type Disk
- type DiskArgs
- type DiskArray
- type DiskArrayInput
- type DiskArrayOutput
- type DiskAttachment
- func (*DiskAttachment) ElementType() reflect.Type
- func (i *DiskAttachment) ToDiskAttachmentOutput() DiskAttachmentOutput
- func (i *DiskAttachment) ToDiskAttachmentOutputWithContext(ctx context.Context) DiskAttachmentOutput
- func (i *DiskAttachment) ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput
- func (i *DiskAttachment) ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput
- type DiskAttachmentArgs
- type DiskAttachmentArray
- type DiskAttachmentArrayInput
- type DiskAttachmentArrayOutput
- func (DiskAttachmentArrayOutput) ElementType() reflect.Type
- func (o DiskAttachmentArrayOutput) Index(i pulumi.IntInput) DiskAttachmentOutput
- func (o DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutput() DiskAttachmentArrayOutput
- func (o DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutputWithContext(ctx context.Context) DiskAttachmentArrayOutput
- type DiskAttachmentInput
- type DiskAttachmentMap
- type DiskAttachmentMapInput
- type DiskAttachmentMapOutput
- func (DiskAttachmentMapOutput) ElementType() reflect.Type
- func (o DiskAttachmentMapOutput) MapIndex(k pulumi.StringInput) DiskAttachmentOutput
- func (o DiskAttachmentMapOutput) ToDiskAttachmentMapOutput() DiskAttachmentMapOutput
- func (o DiskAttachmentMapOutput) ToDiskAttachmentMapOutputWithContext(ctx context.Context) DiskAttachmentMapOutput
- type DiskAttachmentOutput
- func (DiskAttachmentOutput) ElementType() reflect.Type
- func (o DiskAttachmentOutput) ToDiskAttachmentOutput() DiskAttachmentOutput
- func (o DiskAttachmentOutput) ToDiskAttachmentOutputWithContext(ctx context.Context) DiskAttachmentOutput
- func (o DiskAttachmentOutput) ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput
- func (o DiskAttachmentOutput) ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput
- type DiskAttachmentPtrInput
- type DiskAttachmentPtrOutput
- type DiskAttachmentState
- type DiskInput
- type DiskMap
- type DiskMapInput
- type DiskMapOutput
- type DiskOutput
- func (DiskOutput) ElementType() reflect.Type
- func (o DiskOutput) ToDiskOutput() DiskOutput
- func (o DiskOutput) ToDiskOutputWithContext(ctx context.Context) DiskOutput
- func (o DiskOutput) ToDiskPtrOutput() DiskPtrOutput
- func (o DiskOutput) ToDiskPtrOutputWithContext(ctx context.Context) DiskPtrOutput
- type DiskPtrInput
- type DiskPtrOutput
- type DiskState
- type GetDiskDisk
- type GetDiskDiskArgs
- type GetDiskDiskArray
- type GetDiskDiskArrayInput
- type GetDiskDiskArrayOutput
- func (GetDiskDiskArrayOutput) ElementType() reflect.Type
- func (o GetDiskDiskArrayOutput) Index(i pulumi.IntInput) GetDiskDiskOutput
- func (o GetDiskDiskArrayOutput) ToGetDiskDiskArrayOutput() GetDiskDiskArrayOutput
- func (o GetDiskDiskArrayOutput) ToGetDiskDiskArrayOutputWithContext(ctx context.Context) GetDiskDiskArrayOutput
- type GetDiskDiskInput
- type GetDiskDiskOutput
- func (o GetDiskDiskOutput) AvailabilityZone() pulumi.StringOutput
- func (o GetDiskDiskOutput) ChargeType() pulumi.StringOutput
- func (o GetDiskDiskOutput) CreateTime() pulumi.StringOutput
- func (o GetDiskDiskOutput) DiskSize() pulumi.IntOutput
- func (o GetDiskDiskOutput) DiskType() pulumi.StringOutput
- func (GetDiskDiskOutput) ElementType() reflect.Type
- func (o GetDiskDiskOutput) ExpireTime() pulumi.StringOutput
- func (o GetDiskDiskOutput) Id() pulumi.StringOutput
- func (o GetDiskDiskOutput) Name() pulumi.StringOutput
- func (o GetDiskDiskOutput) Status() pulumi.StringOutput
- func (o GetDiskDiskOutput) Tag() pulumi.StringOutput
- func (o GetDiskDiskOutput) ToGetDiskDiskOutput() GetDiskDiskOutput
- func (o GetDiskDiskOutput) ToGetDiskDiskOutputWithContext(ctx context.Context) GetDiskDiskOutput
- type LookupDiskArgs
- type LookupDiskResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Disk ¶
type Disk struct { pulumi.CustomResourceState // Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist). AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"` // Charge type of disk. Possible values are: `year` as pay by year, `month` as pay by month, `dynamic` as pay by hour. (Default: `month`). ChargeType pulumi.StringOutput `pulumi:"chargeType"` // The time of creation of disk, formatted in RFC3339 time string. CreateTime pulumi.StringOutput `pulumi:"createTime"` // The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the `diskSize`. DiskSize pulumi.IntOutput `pulumi:"diskSize"` // The type of disk. Possible values are: `dataDisk`as cloud disk, `ssdDataDisk` as ssd cloud disk, `rssdDataDisk` as RDMA-SSD cloud disk (the `rssdDataDisk` only be supported in `cn-bj2-05`).(Default: `dataDisk`). DiskType pulumi.StringPtrOutput `pulumi:"diskType"` // The duration that you will buy the resource. (Default: `1`). It is not required when `dynamic` (pay by hour), the value is `0` when `month`(pay by month) and the disk will be vaild till the last day of that month. Duration pulumi.IntPtrOutput `pulumi:"duration"` // The expiration time of disk, formatted in RFC3339 time string. ExpireTime pulumi.StringOutput `pulumi:"expireTime"` Name pulumi.StringOutput `pulumi:"name"` // The status of disk. Possible values are: `Available`, `InUse`, `Detaching`, `Initializating`, `Failed`, `Cloning`, `Restoring`, `RestoreFailed`. Status pulumi.StringOutput `pulumi:"status"` // A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: `Default`). Tag pulumi.StringPtrOutput `pulumi:"tag"` }
Provides a Cloud Disk resource.
> **Note** If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the `diskSize`.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-ucloud/sdk/go/ucloud/uaccount" "github.com/pulumi/pulumi-ucloud/sdk/go/ucloud/udisk" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _default, err := uaccount.GetZone(ctx, nil, nil) if err != nil { return err } _, err = udisk.NewDisk(ctx, "example", &udisk.DiskArgs{ AvailabilityZone: pulumi.String(_default.Zones[0].Id), DiskSize: pulumi.Int(10), }) if err != nil { return err } return nil }) }
```
## Import
Disk can be imported using the `id`, e.g.
```sh
$ pulumi import ucloud:udisk/disk:Disk example bsm-abcdefg
```
func GetDisk ¶
func GetDisk(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DiskState, opts ...pulumi.ResourceOption) (*Disk, error)
GetDisk gets an existing Disk resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewDisk ¶
func NewDisk(ctx *pulumi.Context, name string, args *DiskArgs, opts ...pulumi.ResourceOption) (*Disk, error)
NewDisk registers a new resource with the given unique name, arguments, and options.
func (*Disk) ElementType ¶
func (*Disk) ToDiskOutput ¶
func (i *Disk) ToDiskOutput() DiskOutput
func (*Disk) ToDiskOutputWithContext ¶
func (i *Disk) ToDiskOutputWithContext(ctx context.Context) DiskOutput
func (*Disk) ToDiskPtrOutput ¶
func (i *Disk) ToDiskPtrOutput() DiskPtrOutput
func (*Disk) ToDiskPtrOutputWithContext ¶
func (i *Disk) ToDiskPtrOutputWithContext(ctx context.Context) DiskPtrOutput
type DiskArgs ¶
type DiskArgs struct { // Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist). AvailabilityZone pulumi.StringInput // Charge type of disk. Possible values are: `year` as pay by year, `month` as pay by month, `dynamic` as pay by hour. (Default: `month`). ChargeType pulumi.StringPtrInput // The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the `diskSize`. DiskSize pulumi.IntInput // The type of disk. Possible values are: `dataDisk`as cloud disk, `ssdDataDisk` as ssd cloud disk, `rssdDataDisk` as RDMA-SSD cloud disk (the `rssdDataDisk` only be supported in `cn-bj2-05`).(Default: `dataDisk`). DiskType pulumi.StringPtrInput // The duration that you will buy the resource. (Default: `1`). It is not required when `dynamic` (pay by hour), the value is `0` when `month`(pay by month) and the disk will be vaild till the last day of that month. Duration pulumi.IntPtrInput Name pulumi.StringPtrInput // A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: `Default`). Tag pulumi.StringPtrInput }
The set of arguments for constructing a Disk resource.
func (DiskArgs) ElementType ¶
type DiskArray ¶
type DiskArray []DiskInput
func (DiskArray) ElementType ¶
func (DiskArray) ToDiskArrayOutput ¶
func (i DiskArray) ToDiskArrayOutput() DiskArrayOutput
func (DiskArray) ToDiskArrayOutputWithContext ¶
func (i DiskArray) ToDiskArrayOutputWithContext(ctx context.Context) DiskArrayOutput
type DiskArrayInput ¶
type DiskArrayInput interface { pulumi.Input ToDiskArrayOutput() DiskArrayOutput ToDiskArrayOutputWithContext(context.Context) DiskArrayOutput }
DiskArrayInput is an input type that accepts DiskArray and DiskArrayOutput values. You can construct a concrete instance of `DiskArrayInput` via:
DiskArray{ DiskArgs{...} }
type DiskArrayOutput ¶
type DiskArrayOutput struct{ *pulumi.OutputState }
func (DiskArrayOutput) ElementType ¶
func (DiskArrayOutput) ElementType() reflect.Type
func (DiskArrayOutput) Index ¶
func (o DiskArrayOutput) Index(i pulumi.IntInput) DiskOutput
func (DiskArrayOutput) ToDiskArrayOutput ¶
func (o DiskArrayOutput) ToDiskArrayOutput() DiskArrayOutput
func (DiskArrayOutput) ToDiskArrayOutputWithContext ¶
func (o DiskArrayOutput) ToDiskArrayOutputWithContext(ctx context.Context) DiskArrayOutput
type DiskAttachment ¶
type DiskAttachment struct { pulumi.CustomResourceState // The Zone to attach the disk in. AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"` // The ID of disk that needs to be attached DiskId pulumi.StringOutput `pulumi:"diskId"` // The ID of instance. InstanceId pulumi.StringOutput `pulumi:"instanceId"` }
Provides a Cloud Disk Attachment resource for attaching Cloud Disk to UHost Instance.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-ucloud/sdk/go/ucloud/uaccount" "github.com/pulumi/pulumi-ucloud/sdk/go/ucloud/udisk" "github.com/pulumi/pulumi-ucloud/sdk/go/ucloud/uhost" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { defaultZone, err := uaccount.GetZone(ctx, nil, nil) if err != nil { return err } opt0 := defaultZone.Zones[0].Id opt1 := "^CentOS 7.[1-2] 64" opt2 := "base" defaultImage, err := uhost.GetImage(ctx, &uhost.GetImageArgs{ AvailabilityZone: &opt0, NameRegex: &opt1, ImageType: &opt2, }, nil) if err != nil { return err } defaultDisk, err := udisk.NewDisk(ctx, "defaultDisk", &udisk.DiskArgs{ AvailabilityZone: pulumi.String(defaultZone.Zones[0].Id), DiskSize: pulumi.Int(10), }) if err != nil { return err } web, err := uhost.NewInstance(ctx, "web", &uhost.InstanceArgs{ AvailabilityZone: pulumi.String(defaultZone.Zones[0].Id), InstanceType: pulumi.String("n-basic-2"), ImageId: pulumi.String(defaultImage.Images[0].Id), RootPassword: pulumi.String("wA1234567"), Tag: pulumi.String("tf-example"), }) if err != nil { return err } _, err = udisk.NewDiskAttachment(ctx, "defaultDiskAttachment", &udisk.DiskAttachmentArgs{ AvailabilityZone: pulumi.String(defaultZone.Zones[0].Id), DiskId: defaultDisk.ID(), InstanceId: web.ID(), }) if err != nil { return err } return nil }) }
```
func GetDiskAttachment ¶
func GetDiskAttachment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DiskAttachmentState, opts ...pulumi.ResourceOption) (*DiskAttachment, error)
GetDiskAttachment gets an existing DiskAttachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewDiskAttachment ¶
func NewDiskAttachment(ctx *pulumi.Context, name string, args *DiskAttachmentArgs, opts ...pulumi.ResourceOption) (*DiskAttachment, error)
NewDiskAttachment registers a new resource with the given unique name, arguments, and options.
func (*DiskAttachment) ElementType ¶
func (*DiskAttachment) ElementType() reflect.Type
func (*DiskAttachment) ToDiskAttachmentOutput ¶
func (i *DiskAttachment) ToDiskAttachmentOutput() DiskAttachmentOutput
func (*DiskAttachment) ToDiskAttachmentOutputWithContext ¶
func (i *DiskAttachment) ToDiskAttachmentOutputWithContext(ctx context.Context) DiskAttachmentOutput
func (*DiskAttachment) ToDiskAttachmentPtrOutput ¶
func (i *DiskAttachment) ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput
func (*DiskAttachment) ToDiskAttachmentPtrOutputWithContext ¶
func (i *DiskAttachment) ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput
type DiskAttachmentArgs ¶
type DiskAttachmentArgs struct { // The Zone to attach the disk in. AvailabilityZone pulumi.StringInput // The ID of disk that needs to be attached DiskId pulumi.StringInput // The ID of instance. InstanceId pulumi.StringInput }
The set of arguments for constructing a DiskAttachment resource.
func (DiskAttachmentArgs) ElementType ¶
func (DiskAttachmentArgs) ElementType() reflect.Type
type DiskAttachmentArray ¶
type DiskAttachmentArray []DiskAttachmentInput
func (DiskAttachmentArray) ElementType ¶
func (DiskAttachmentArray) ElementType() reflect.Type
func (DiskAttachmentArray) ToDiskAttachmentArrayOutput ¶
func (i DiskAttachmentArray) ToDiskAttachmentArrayOutput() DiskAttachmentArrayOutput
func (DiskAttachmentArray) ToDiskAttachmentArrayOutputWithContext ¶
func (i DiskAttachmentArray) ToDiskAttachmentArrayOutputWithContext(ctx context.Context) DiskAttachmentArrayOutput
type DiskAttachmentArrayInput ¶
type DiskAttachmentArrayInput interface { pulumi.Input ToDiskAttachmentArrayOutput() DiskAttachmentArrayOutput ToDiskAttachmentArrayOutputWithContext(context.Context) DiskAttachmentArrayOutput }
DiskAttachmentArrayInput is an input type that accepts DiskAttachmentArray and DiskAttachmentArrayOutput values. You can construct a concrete instance of `DiskAttachmentArrayInput` via:
DiskAttachmentArray{ DiskAttachmentArgs{...} }
type DiskAttachmentArrayOutput ¶
type DiskAttachmentArrayOutput struct{ *pulumi.OutputState }
func (DiskAttachmentArrayOutput) ElementType ¶
func (DiskAttachmentArrayOutput) ElementType() reflect.Type
func (DiskAttachmentArrayOutput) Index ¶
func (o DiskAttachmentArrayOutput) Index(i pulumi.IntInput) DiskAttachmentOutput
func (DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutput ¶
func (o DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutput() DiskAttachmentArrayOutput
func (DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutputWithContext ¶
func (o DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutputWithContext(ctx context.Context) DiskAttachmentArrayOutput
type DiskAttachmentInput ¶
type DiskAttachmentInput interface { pulumi.Input ToDiskAttachmentOutput() DiskAttachmentOutput ToDiskAttachmentOutputWithContext(ctx context.Context) DiskAttachmentOutput }
type DiskAttachmentMap ¶
type DiskAttachmentMap map[string]DiskAttachmentInput
func (DiskAttachmentMap) ElementType ¶
func (DiskAttachmentMap) ElementType() reflect.Type
func (DiskAttachmentMap) ToDiskAttachmentMapOutput ¶
func (i DiskAttachmentMap) ToDiskAttachmentMapOutput() DiskAttachmentMapOutput
func (DiskAttachmentMap) ToDiskAttachmentMapOutputWithContext ¶
func (i DiskAttachmentMap) ToDiskAttachmentMapOutputWithContext(ctx context.Context) DiskAttachmentMapOutput
type DiskAttachmentMapInput ¶
type DiskAttachmentMapInput interface { pulumi.Input ToDiskAttachmentMapOutput() DiskAttachmentMapOutput ToDiskAttachmentMapOutputWithContext(context.Context) DiskAttachmentMapOutput }
DiskAttachmentMapInput is an input type that accepts DiskAttachmentMap and DiskAttachmentMapOutput values. You can construct a concrete instance of `DiskAttachmentMapInput` via:
DiskAttachmentMap{ "key": DiskAttachmentArgs{...} }
type DiskAttachmentMapOutput ¶
type DiskAttachmentMapOutput struct{ *pulumi.OutputState }
func (DiskAttachmentMapOutput) ElementType ¶
func (DiskAttachmentMapOutput) ElementType() reflect.Type
func (DiskAttachmentMapOutput) MapIndex ¶
func (o DiskAttachmentMapOutput) MapIndex(k pulumi.StringInput) DiskAttachmentOutput
func (DiskAttachmentMapOutput) ToDiskAttachmentMapOutput ¶
func (o DiskAttachmentMapOutput) ToDiskAttachmentMapOutput() DiskAttachmentMapOutput
func (DiskAttachmentMapOutput) ToDiskAttachmentMapOutputWithContext ¶
func (o DiskAttachmentMapOutput) ToDiskAttachmentMapOutputWithContext(ctx context.Context) DiskAttachmentMapOutput
type DiskAttachmentOutput ¶
type DiskAttachmentOutput struct {
*pulumi.OutputState
}
func (DiskAttachmentOutput) ElementType ¶
func (DiskAttachmentOutput) ElementType() reflect.Type
func (DiskAttachmentOutput) ToDiskAttachmentOutput ¶
func (o DiskAttachmentOutput) ToDiskAttachmentOutput() DiskAttachmentOutput
func (DiskAttachmentOutput) ToDiskAttachmentOutputWithContext ¶
func (o DiskAttachmentOutput) ToDiskAttachmentOutputWithContext(ctx context.Context) DiskAttachmentOutput
func (DiskAttachmentOutput) ToDiskAttachmentPtrOutput ¶
func (o DiskAttachmentOutput) ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput
func (DiskAttachmentOutput) ToDiskAttachmentPtrOutputWithContext ¶
func (o DiskAttachmentOutput) ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput
type DiskAttachmentPtrInput ¶
type DiskAttachmentPtrInput interface { pulumi.Input ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput }
type DiskAttachmentPtrOutput ¶
type DiskAttachmentPtrOutput struct {
*pulumi.OutputState
}
func (DiskAttachmentPtrOutput) ElementType ¶
func (DiskAttachmentPtrOutput) ElementType() reflect.Type
func (DiskAttachmentPtrOutput) ToDiskAttachmentPtrOutput ¶
func (o DiskAttachmentPtrOutput) ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput
func (DiskAttachmentPtrOutput) ToDiskAttachmentPtrOutputWithContext ¶
func (o DiskAttachmentPtrOutput) ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput
type DiskAttachmentState ¶
type DiskAttachmentState struct { // The Zone to attach the disk in. AvailabilityZone pulumi.StringPtrInput // The ID of disk that needs to be attached DiskId pulumi.StringPtrInput // The ID of instance. InstanceId pulumi.StringPtrInput }
func (DiskAttachmentState) ElementType ¶
func (DiskAttachmentState) ElementType() reflect.Type
type DiskInput ¶
type DiskInput interface { pulumi.Input ToDiskOutput() DiskOutput ToDiskOutputWithContext(ctx context.Context) DiskOutput }
type DiskMap ¶
func (DiskMap) ElementType ¶
func (DiskMap) ToDiskMapOutput ¶
func (i DiskMap) ToDiskMapOutput() DiskMapOutput
func (DiskMap) ToDiskMapOutputWithContext ¶
func (i DiskMap) ToDiskMapOutputWithContext(ctx context.Context) DiskMapOutput
type DiskMapInput ¶
type DiskMapInput interface { pulumi.Input ToDiskMapOutput() DiskMapOutput ToDiskMapOutputWithContext(context.Context) DiskMapOutput }
DiskMapInput is an input type that accepts DiskMap and DiskMapOutput values. You can construct a concrete instance of `DiskMapInput` via:
DiskMap{ "key": DiskArgs{...} }
type DiskMapOutput ¶
type DiskMapOutput struct{ *pulumi.OutputState }
func (DiskMapOutput) ElementType ¶
func (DiskMapOutput) ElementType() reflect.Type
func (DiskMapOutput) MapIndex ¶
func (o DiskMapOutput) MapIndex(k pulumi.StringInput) DiskOutput
func (DiskMapOutput) ToDiskMapOutput ¶
func (o DiskMapOutput) ToDiskMapOutput() DiskMapOutput
func (DiskMapOutput) ToDiskMapOutputWithContext ¶
func (o DiskMapOutput) ToDiskMapOutputWithContext(ctx context.Context) DiskMapOutput
type DiskOutput ¶
type DiskOutput struct {
*pulumi.OutputState
}
func (DiskOutput) ElementType ¶
func (DiskOutput) ElementType() reflect.Type
func (DiskOutput) ToDiskOutput ¶
func (o DiskOutput) ToDiskOutput() DiskOutput
func (DiskOutput) ToDiskOutputWithContext ¶
func (o DiskOutput) ToDiskOutputWithContext(ctx context.Context) DiskOutput
func (DiskOutput) ToDiskPtrOutput ¶
func (o DiskOutput) ToDiskPtrOutput() DiskPtrOutput
func (DiskOutput) ToDiskPtrOutputWithContext ¶
func (o DiskOutput) ToDiskPtrOutputWithContext(ctx context.Context) DiskPtrOutput
type DiskPtrInput ¶
type DiskPtrInput interface { pulumi.Input ToDiskPtrOutput() DiskPtrOutput ToDiskPtrOutputWithContext(ctx context.Context) DiskPtrOutput }
type DiskPtrOutput ¶
type DiskPtrOutput struct {
*pulumi.OutputState
}
func (DiskPtrOutput) ElementType ¶
func (DiskPtrOutput) ElementType() reflect.Type
func (DiskPtrOutput) ToDiskPtrOutput ¶
func (o DiskPtrOutput) ToDiskPtrOutput() DiskPtrOutput
func (DiskPtrOutput) ToDiskPtrOutputWithContext ¶
func (o DiskPtrOutput) ToDiskPtrOutputWithContext(ctx context.Context) DiskPtrOutput
type DiskState ¶
type DiskState struct { // Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist). AvailabilityZone pulumi.StringPtrInput // Charge type of disk. Possible values are: `year` as pay by year, `month` as pay by month, `dynamic` as pay by hour. (Default: `month`). ChargeType pulumi.StringPtrInput // The time of creation of disk, formatted in RFC3339 time string. CreateTime pulumi.StringPtrInput // The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the `diskSize`. DiskSize pulumi.IntPtrInput // The type of disk. Possible values are: `dataDisk`as cloud disk, `ssdDataDisk` as ssd cloud disk, `rssdDataDisk` as RDMA-SSD cloud disk (the `rssdDataDisk` only be supported in `cn-bj2-05`).(Default: `dataDisk`). DiskType pulumi.StringPtrInput // The duration that you will buy the resource. (Default: `1`). It is not required when `dynamic` (pay by hour), the value is `0` when `month`(pay by month) and the disk will be vaild till the last day of that month. Duration pulumi.IntPtrInput // The expiration time of disk, formatted in RFC3339 time string. ExpireTime pulumi.StringPtrInput Name pulumi.StringPtrInput // The status of disk. Possible values are: `Available`, `InUse`, `Detaching`, `Initializating`, `Failed`, `Cloning`, `Restoring`, `RestoreFailed`. Status pulumi.StringPtrInput // A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: `Default`). Tag pulumi.StringPtrInput }
func (DiskState) ElementType ¶
type GetDiskDisk ¶
type GetDiskDisk struct { // Availability zone where Disk are located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist) AvailabilityZone string `pulumi:"availabilityZone"` // The charge type of disk. Possible values are: `year` as pay by year, `month` as pay by month, `dynamic` as pay by hour. ChargeType string `pulumi:"chargeType"` // The creation time of Disk, formatted in RFC3339 time string. CreateTime string `pulumi:"createTime"` // The size of disk. Purchase the size of disk in GB. DiskSize int `pulumi:"diskSize"` // The type of disk. Possible values are: `dataDisk`as cloud disk, `ssdDataDisk` as SSD cloud disk, `systemDisk`as system disk, `ssdSystemDisk` as SSD system disk, `rssdDataDisk` as RDMA-SSD cloud disk. DiskType string `pulumi:"diskType"` // The expiration time of disk, formatted in RFC3339 time string. ExpireTime string `pulumi:"expireTime"` // The ID of Disk. Id string `pulumi:"id"` // The name of Disk. Name string `pulumi:"name"` // The status of disk. Possible values are: `Available`, `InUse`, `Detaching`, `Initializating`, `Failed`, `Cloning`, `Restoring`, `RestoreFailed`. Status string `pulumi:"status"` // A tag assigned to Disk. Tag string `pulumi:"tag"` }
type GetDiskDiskArgs ¶
type GetDiskDiskArgs struct { // Availability zone where Disk are located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist) AvailabilityZone pulumi.StringInput `pulumi:"availabilityZone"` // The charge type of disk. Possible values are: `year` as pay by year, `month` as pay by month, `dynamic` as pay by hour. ChargeType pulumi.StringInput `pulumi:"chargeType"` // The creation time of Disk, formatted in RFC3339 time string. CreateTime pulumi.StringInput `pulumi:"createTime"` // The size of disk. Purchase the size of disk in GB. DiskSize pulumi.IntInput `pulumi:"diskSize"` // The type of disk. Possible values are: `dataDisk`as cloud disk, `ssdDataDisk` as SSD cloud disk, `systemDisk`as system disk, `ssdSystemDisk` as SSD system disk, `rssdDataDisk` as RDMA-SSD cloud disk. DiskType pulumi.StringInput `pulumi:"diskType"` // The expiration time of disk, formatted in RFC3339 time string. ExpireTime pulumi.StringInput `pulumi:"expireTime"` // The ID of Disk. Id pulumi.StringInput `pulumi:"id"` // The name of Disk. Name pulumi.StringInput `pulumi:"name"` // The status of disk. Possible values are: `Available`, `InUse`, `Detaching`, `Initializating`, `Failed`, `Cloning`, `Restoring`, `RestoreFailed`. Status pulumi.StringInput `pulumi:"status"` // A tag assigned to Disk. Tag pulumi.StringInput `pulumi:"tag"` }
func (GetDiskDiskArgs) ElementType ¶
func (GetDiskDiskArgs) ElementType() reflect.Type
func (GetDiskDiskArgs) ToGetDiskDiskOutput ¶
func (i GetDiskDiskArgs) ToGetDiskDiskOutput() GetDiskDiskOutput
func (GetDiskDiskArgs) ToGetDiskDiskOutputWithContext ¶
func (i GetDiskDiskArgs) ToGetDiskDiskOutputWithContext(ctx context.Context) GetDiskDiskOutput
type GetDiskDiskArray ¶
type GetDiskDiskArray []GetDiskDiskInput
func (GetDiskDiskArray) ElementType ¶
func (GetDiskDiskArray) ElementType() reflect.Type
func (GetDiskDiskArray) ToGetDiskDiskArrayOutput ¶
func (i GetDiskDiskArray) ToGetDiskDiskArrayOutput() GetDiskDiskArrayOutput
func (GetDiskDiskArray) ToGetDiskDiskArrayOutputWithContext ¶
func (i GetDiskDiskArray) ToGetDiskDiskArrayOutputWithContext(ctx context.Context) GetDiskDiskArrayOutput
type GetDiskDiskArrayInput ¶
type GetDiskDiskArrayInput interface { pulumi.Input ToGetDiskDiskArrayOutput() GetDiskDiskArrayOutput ToGetDiskDiskArrayOutputWithContext(context.Context) GetDiskDiskArrayOutput }
GetDiskDiskArrayInput is an input type that accepts GetDiskDiskArray and GetDiskDiskArrayOutput values. You can construct a concrete instance of `GetDiskDiskArrayInput` via:
GetDiskDiskArray{ GetDiskDiskArgs{...} }
type GetDiskDiskArrayOutput ¶
type GetDiskDiskArrayOutput struct{ *pulumi.OutputState }
func (GetDiskDiskArrayOutput) ElementType ¶
func (GetDiskDiskArrayOutput) ElementType() reflect.Type
func (GetDiskDiskArrayOutput) Index ¶
func (o GetDiskDiskArrayOutput) Index(i pulumi.IntInput) GetDiskDiskOutput
func (GetDiskDiskArrayOutput) ToGetDiskDiskArrayOutput ¶
func (o GetDiskDiskArrayOutput) ToGetDiskDiskArrayOutput() GetDiskDiskArrayOutput
func (GetDiskDiskArrayOutput) ToGetDiskDiskArrayOutputWithContext ¶
func (o GetDiskDiskArrayOutput) ToGetDiskDiskArrayOutputWithContext(ctx context.Context) GetDiskDiskArrayOutput
type GetDiskDiskInput ¶
type GetDiskDiskInput interface { pulumi.Input ToGetDiskDiskOutput() GetDiskDiskOutput ToGetDiskDiskOutputWithContext(context.Context) GetDiskDiskOutput }
GetDiskDiskInput is an input type that accepts GetDiskDiskArgs and GetDiskDiskOutput values. You can construct a concrete instance of `GetDiskDiskInput` via:
GetDiskDiskArgs{...}
type GetDiskDiskOutput ¶
type GetDiskDiskOutput struct{ *pulumi.OutputState }
func (GetDiskDiskOutput) AvailabilityZone ¶
func (o GetDiskDiskOutput) AvailabilityZone() pulumi.StringOutput
Availability zone where Disk are located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist)
func (GetDiskDiskOutput) ChargeType ¶
func (o GetDiskDiskOutput) ChargeType() pulumi.StringOutput
The charge type of disk. Possible values are: `year` as pay by year, `month` as pay by month, `dynamic` as pay by hour.
func (GetDiskDiskOutput) CreateTime ¶
func (o GetDiskDiskOutput) CreateTime() pulumi.StringOutput
The creation time of Disk, formatted in RFC3339 time string.
func (GetDiskDiskOutput) DiskSize ¶
func (o GetDiskDiskOutput) DiskSize() pulumi.IntOutput
The size of disk. Purchase the size of disk in GB.
func (GetDiskDiskOutput) DiskType ¶
func (o GetDiskDiskOutput) DiskType() pulumi.StringOutput
The type of disk. Possible values are: `dataDisk`as cloud disk, `ssdDataDisk` as SSD cloud disk, `systemDisk`as system disk, `ssdSystemDisk` as SSD system disk, `rssdDataDisk` as RDMA-SSD cloud disk.
func (GetDiskDiskOutput) ElementType ¶
func (GetDiskDiskOutput) ElementType() reflect.Type
func (GetDiskDiskOutput) ExpireTime ¶
func (o GetDiskDiskOutput) ExpireTime() pulumi.StringOutput
The expiration time of disk, formatted in RFC3339 time string.
func (GetDiskDiskOutput) Name ¶
func (o GetDiskDiskOutput) Name() pulumi.StringOutput
The name of Disk.
func (GetDiskDiskOutput) Status ¶
func (o GetDiskDiskOutput) Status() pulumi.StringOutput
The status of disk. Possible values are: `Available`, `InUse`, `Detaching`, `Initializating`, `Failed`, `Cloning`, `Restoring`, `RestoreFailed`.
func (GetDiskDiskOutput) Tag ¶
func (o GetDiskDiskOutput) Tag() pulumi.StringOutput
A tag assigned to Disk.
func (GetDiskDiskOutput) ToGetDiskDiskOutput ¶
func (o GetDiskDiskOutput) ToGetDiskDiskOutput() GetDiskDiskOutput
func (GetDiskDiskOutput) ToGetDiskDiskOutputWithContext ¶
func (o GetDiskDiskOutput) ToGetDiskDiskOutputWithContext(ctx context.Context) GetDiskDiskOutput
type LookupDiskArgs ¶
type LookupDiskArgs struct { // Availability zone where Disk are located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist) AvailabilityZone *string `pulumi:"availabilityZone"` // The type of disk. Possible values are: `dataDisk`as cloud disk, `ssdDataDisk` as SSD cloud disk, `systemDisk`as system disk, `ssdSystemDisk` as SSD system disk, `rssdDataDisk` as RDMA-SSD cloud disk. DiskType *string `pulumi:"diskType"` // A list of Disk IDs, all the Disks belong to this region will be retrieved if the ID is `[]`. Ids []string `pulumi:"ids"` // A regex string to filter resulting disks by name. NameRegex *string `pulumi:"nameRegex"` OutputFile *string `pulumi:"outputFile"` }
A collection of arguments for invoking getDisk.
type LookupDiskResult ¶
type LookupDiskResult struct { // Availability zone where disk is located. AvailabilityZone *string `pulumi:"availabilityZone"` // The type of disk. DiskType *string `pulumi:"diskType"` // It is a nested type which documented below. Disks []GetDiskDisk `pulumi:"disks"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Ids []string `pulumi:"ids"` NameRegex *string `pulumi:"nameRegex"` OutputFile *string `pulumi:"outputFile"` // Total number of Disks that satisfy the condition. TotalCount int `pulumi:"totalCount"` }
A collection of values returned by getDisk.
func LookupDisk ¶
func LookupDisk(ctx *pulumi.Context, args *LookupDiskArgs, opts ...pulumi.InvokeOption) (*LookupDiskResult, error)
This data source provides a list of Disk resources according to their Disk ID and disk type.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-ucloud/sdk/go/ucloud/udisk" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := udisk.LookupDisk(ctx, nil, nil) if err != nil { return err } ctx.Export("first", example.Disks[0].Id) return nil }) }
```