ecs

package
v2.35.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoProvisioningGroup added in v2.3.3

type AutoProvisioningGroup struct {
	pulumi.CustomResourceState

	// The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
	AutoProvisioningGroupName pulumi.StringOutput `pulumi:"autoProvisioningGroupName"`
	// The type of the auto provisioning group. Valid values:`request` and `maintain`,Default value: `maintain`.
	AutoProvisioningGroupType pulumi.StringPtrOutput `pulumi:"autoProvisioningGroupType"`
	// The type of supplemental instances. When the total value of `PayAsYouGoTargetCapacity` and `SpotTargetCapacity` is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:`PayAsYouGo`: Pay-as-you-go instances; `Spot`: Preemptible instances, Default value: `Spot`.
	DefaultTargetCapacityType pulumi.StringPtrOutput `pulumi:"defaultTargetCapacityType"`
	// The description of the auto provisioning group.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: `no-termination` and `termination`,Default value: `no-termination`.
	ExcessCapacityTerminationPolicy pulumi.StringPtrOutput `pulumi:"excessCapacityTerminationPolicy"`
	// DataDisk mappings to attach to ecs instance. See Block config below for details.
	LaunchTemplateConfigs AutoProvisioningGroupLaunchTemplateConfigArrayOutput `pulumi:"launchTemplateConfigs"`
	// The ID of the instance launch template associated with the auto provisioning group.
	LaunchTemplateId pulumi.StringOutput `pulumi:"launchTemplateId"`
	// The version of the instance launch template associated with the auto provisioning group.
	LaunchTemplateVersion pulumi.StringOutput `pulumi:"launchTemplateVersion"`
	// The global maximum price for preemptible instances in the auto provisioning group. If both the `MaxSpotPrice` and `LaunchTemplateConfig.N.MaxPrice` parameters are specified, the maximum price is the lower value of the two.
	MaxSpotPrice pulumi.Float64Output `pulumi:"maxSpotPrice"`
	// The scale-out policy for pay-as-you-go instances. Valid values: `lowest-price` and `prioritized`,Default value: `lowest-price`.
	PayAsYouGoAllocationStrategy pulumi.StringPtrOutput `pulumi:"payAsYouGoAllocationStrategy"`
	// The target capacity of pay-as-you-go instances in the auto provisioning group.
	PayAsYouGoTargetCapacity pulumi.StringPtrOutput `pulumi:"payAsYouGoTargetCapacity"`
	// The scale-out policy for preemptible instances. Valid values:`lowest-price` and `diversified`,Default value: `lowest-price`.
	SpotAllocationStrategy pulumi.StringPtrOutput `pulumi:"spotAllocationStrategy"`
	// The default behavior after preemptible instances are shut down. Value values: `stop` and `terminate`,Default value: `stop`.
	SpotInstanceInterruptionBehavior pulumi.StringPtrOutput `pulumi:"spotInstanceInterruptionBehavior"`
	// This parameter takes effect when the `SpotAllocationStrategy` parameter is set to `lowest-price`. The auto provisioning group selects instance types of the lowest cost to create instances.
	SpotInstancePoolsToUseCount pulumi.IntOutput `pulumi:"spotInstancePoolsToUseCount"`
	// The target capacity of preemptible instances in the auto provisioning group.
	SpotTargetCapacity pulumi.StringPtrOutput `pulumi:"spotTargetCapacity"`
	// Specifies whether to release instances of the auto provisioning group. Valid values:`false` and `true`, default value: `false`.
	TerminateInstances pulumi.BoolPtrOutput `pulumi:"terminateInstances"`
	// The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: `false` and `true`, default value: `false`.
	TerminateInstancesWithExpiration pulumi.BoolPtrOutput `pulumi:"terminateInstancesWithExpiration"`
	// The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
	TotalTargetCapacity pulumi.StringOutput `pulumi:"totalTargetCapacity"`
	// The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the `validUntil` parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
	ValidFrom pulumi.StringOutput `pulumi:"validFrom"`
	// The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the `validFrom` parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
	ValidUntil pulumi.StringOutput `pulumi:"validUntil"`
}

Provides a ECS auto provisioning group resource which is a solution that uses preemptive instances and payAsYouGo instances to rapidly deploy clusters.

> **NOTE:** Available in 1.79.0+

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi/config"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "auto_provisioning_group"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		opt0 := "cloud_efficiency"
		opt1 := "VSwitch"
		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableDiskCategory:     &opt0,
			AvailableResourceCreation: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("172.16.0.0/16"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
			VpcId:            defaultNetwork.ID(),
			CidrBlock:        pulumi.String("172.16.0.0/24"),
			AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		opt2 := "^ubuntu_18.*64"
		opt3 := true
		opt4 := "system"
		defaultImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
			NameRegex:  &opt2,
			MostRecent: &opt3,
			Owners:     &opt4,
		}, nil)
		if err != nil {
			return err
		}
		template, err := ecs.NewLaunchTemplate(ctx, "template", &ecs.LaunchTemplateArgs{
			ImageId:         pulumi.String(defaultImages.Images[0].Id),
			InstanceType:    pulumi.String("ecs.n1.tiny"),
			SecurityGroupId: defaultSecurityGroup.ID(),
		})
		if err != nil {
			return err
		}
		_, err = ecs.NewAutoProvisioningGroup(ctx, "defaultAutoProvisioningGroup", &ecs.AutoProvisioningGroupArgs{
			LaunchTemplateId:         template.ID(),
			TotalTargetCapacity:      pulumi.String("4"),
			PayAsYouGoTargetCapacity: pulumi.String("1"),
			SpotTargetCapacity:       pulumi.String("2"),
			LaunchTemplateConfigs: ecs.AutoProvisioningGroupLaunchTemplateConfigArray{
				&ecs.AutoProvisioningGroupLaunchTemplateConfigArgs{
					InstanceType:     pulumi.String("ecs.n1.small"),
					VswitchId:        defaultSwitch.ID(),
					WeightedCapacity: pulumi.String("2"),
					MaxPrice:         pulumi.String("2"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Block config

The config mapping supports the following: * `instanceType` - (Optional) The instance type of the Nth extended configurations of the launch template. * `maxPrice` - (Required) The maximum price of the instance type specified in the Nth extended configurations of the launch template. * `vswitchId` - (Required) The ID of the VSwitch in the Nth extended configurations of the launch template. * `weightedCapacity` - (Required) The weight of the instance type specified in the Nth extended configurations of the launch template. * `priority` - (Optional) The priority of the instance type specified in the Nth extended configurations of the launch template. A value of 0 indicates the highest priority.

## Import

ECS auto provisioning group can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/autoProvisioningGroup:AutoProvisioningGroup example asg-abc123456

```

func GetAutoProvisioningGroup added in v2.3.3

func GetAutoProvisioningGroup(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AutoProvisioningGroupState, opts ...pulumi.ResourceOption) (*AutoProvisioningGroup, error)

GetAutoProvisioningGroup gets an existing AutoProvisioningGroup 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 NewAutoProvisioningGroup added in v2.3.3

func NewAutoProvisioningGroup(ctx *pulumi.Context,
	name string, args *AutoProvisioningGroupArgs, opts ...pulumi.ResourceOption) (*AutoProvisioningGroup, error)

NewAutoProvisioningGroup registers a new resource with the given unique name, arguments, and options.

func (*AutoProvisioningGroup) ElementType added in v2.25.1

func (*AutoProvisioningGroup) ElementType() reflect.Type

func (*AutoProvisioningGroup) ToAutoProvisioningGroupOutput added in v2.25.1

func (i *AutoProvisioningGroup) ToAutoProvisioningGroupOutput() AutoProvisioningGroupOutput

func (*AutoProvisioningGroup) ToAutoProvisioningGroupOutputWithContext added in v2.25.1

func (i *AutoProvisioningGroup) ToAutoProvisioningGroupOutputWithContext(ctx context.Context) AutoProvisioningGroupOutput

func (*AutoProvisioningGroup) ToAutoProvisioningGroupPtrOutput added in v2.35.1

func (i *AutoProvisioningGroup) ToAutoProvisioningGroupPtrOutput() AutoProvisioningGroupPtrOutput

func (*AutoProvisioningGroup) ToAutoProvisioningGroupPtrOutputWithContext added in v2.35.1

func (i *AutoProvisioningGroup) ToAutoProvisioningGroupPtrOutputWithContext(ctx context.Context) AutoProvisioningGroupPtrOutput

type AutoProvisioningGroupArgs added in v2.3.3

type AutoProvisioningGroupArgs struct {
	// The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
	AutoProvisioningGroupName pulumi.StringPtrInput
	// The type of the auto provisioning group. Valid values:`request` and `maintain`,Default value: `maintain`.
	AutoProvisioningGroupType pulumi.StringPtrInput
	// The type of supplemental instances. When the total value of `PayAsYouGoTargetCapacity` and `SpotTargetCapacity` is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:`PayAsYouGo`: Pay-as-you-go instances; `Spot`: Preemptible instances, Default value: `Spot`.
	DefaultTargetCapacityType pulumi.StringPtrInput
	// The description of the auto provisioning group.
	Description pulumi.StringPtrInput
	// The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: `no-termination` and `termination`,Default value: `no-termination`.
	ExcessCapacityTerminationPolicy pulumi.StringPtrInput
	// DataDisk mappings to attach to ecs instance. See Block config below for details.
	LaunchTemplateConfigs AutoProvisioningGroupLaunchTemplateConfigArrayInput
	// The ID of the instance launch template associated with the auto provisioning group.
	LaunchTemplateId pulumi.StringInput
	// The version of the instance launch template associated with the auto provisioning group.
	LaunchTemplateVersion pulumi.StringPtrInput
	// The global maximum price for preemptible instances in the auto provisioning group. If both the `MaxSpotPrice` and `LaunchTemplateConfig.N.MaxPrice` parameters are specified, the maximum price is the lower value of the two.
	MaxSpotPrice pulumi.Float64PtrInput
	// The scale-out policy for pay-as-you-go instances. Valid values: `lowest-price` and `prioritized`,Default value: `lowest-price`.
	PayAsYouGoAllocationStrategy pulumi.StringPtrInput
	// The target capacity of pay-as-you-go instances in the auto provisioning group.
	PayAsYouGoTargetCapacity pulumi.StringPtrInput
	// The scale-out policy for preemptible instances. Valid values:`lowest-price` and `diversified`,Default value: `lowest-price`.
	SpotAllocationStrategy pulumi.StringPtrInput
	// The default behavior after preemptible instances are shut down. Value values: `stop` and `terminate`,Default value: `stop`.
	SpotInstanceInterruptionBehavior pulumi.StringPtrInput
	// This parameter takes effect when the `SpotAllocationStrategy` parameter is set to `lowest-price`. The auto provisioning group selects instance types of the lowest cost to create instances.
	SpotInstancePoolsToUseCount pulumi.IntPtrInput
	// The target capacity of preemptible instances in the auto provisioning group.
	SpotTargetCapacity pulumi.StringPtrInput
	// Specifies whether to release instances of the auto provisioning group. Valid values:`false` and `true`, default value: `false`.
	TerminateInstances pulumi.BoolPtrInput
	// The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: `false` and `true`, default value: `false`.
	TerminateInstancesWithExpiration pulumi.BoolPtrInput
	// The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
	TotalTargetCapacity pulumi.StringInput
	// The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the `validUntil` parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
	ValidFrom pulumi.StringPtrInput
	// The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the `validFrom` parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
	ValidUntil pulumi.StringPtrInput
}

The set of arguments for constructing a AutoProvisioningGroup resource.

func (AutoProvisioningGroupArgs) ElementType added in v2.3.3

func (AutoProvisioningGroupArgs) ElementType() reflect.Type

type AutoProvisioningGroupArray added in v2.35.1

type AutoProvisioningGroupArray []AutoProvisioningGroupInput

func (AutoProvisioningGroupArray) ElementType added in v2.35.1

func (AutoProvisioningGroupArray) ElementType() reflect.Type

func (AutoProvisioningGroupArray) ToAutoProvisioningGroupArrayOutput added in v2.35.1

func (i AutoProvisioningGroupArray) ToAutoProvisioningGroupArrayOutput() AutoProvisioningGroupArrayOutput

func (AutoProvisioningGroupArray) ToAutoProvisioningGroupArrayOutputWithContext added in v2.35.1

func (i AutoProvisioningGroupArray) ToAutoProvisioningGroupArrayOutputWithContext(ctx context.Context) AutoProvisioningGroupArrayOutput

type AutoProvisioningGroupArrayInput added in v2.35.1

type AutoProvisioningGroupArrayInput interface {
	pulumi.Input

	ToAutoProvisioningGroupArrayOutput() AutoProvisioningGroupArrayOutput
	ToAutoProvisioningGroupArrayOutputWithContext(context.Context) AutoProvisioningGroupArrayOutput
}

AutoProvisioningGroupArrayInput is an input type that accepts AutoProvisioningGroupArray and AutoProvisioningGroupArrayOutput values. You can construct a concrete instance of `AutoProvisioningGroupArrayInput` via:

AutoProvisioningGroupArray{ AutoProvisioningGroupArgs{...} }

type AutoProvisioningGroupArrayOutput added in v2.35.1

type AutoProvisioningGroupArrayOutput struct{ *pulumi.OutputState }

func (AutoProvisioningGroupArrayOutput) ElementType added in v2.35.1

func (AutoProvisioningGroupArrayOutput) Index added in v2.35.1

func (AutoProvisioningGroupArrayOutput) ToAutoProvisioningGroupArrayOutput added in v2.35.1

func (o AutoProvisioningGroupArrayOutput) ToAutoProvisioningGroupArrayOutput() AutoProvisioningGroupArrayOutput

func (AutoProvisioningGroupArrayOutput) ToAutoProvisioningGroupArrayOutputWithContext added in v2.35.1

func (o AutoProvisioningGroupArrayOutput) ToAutoProvisioningGroupArrayOutputWithContext(ctx context.Context) AutoProvisioningGroupArrayOutput

type AutoProvisioningGroupInput added in v2.25.1

type AutoProvisioningGroupInput interface {
	pulumi.Input

	ToAutoProvisioningGroupOutput() AutoProvisioningGroupOutput
	ToAutoProvisioningGroupOutputWithContext(ctx context.Context) AutoProvisioningGroupOutput
}

type AutoProvisioningGroupLaunchTemplateConfig added in v2.3.3

type AutoProvisioningGroupLaunchTemplateConfig struct {
	InstanceType     *string `pulumi:"instanceType"`
	MaxPrice         string  `pulumi:"maxPrice"`
	Priority         *string `pulumi:"priority"`
	VswitchId        string  `pulumi:"vswitchId"`
	WeightedCapacity string  `pulumi:"weightedCapacity"`
}

type AutoProvisioningGroupLaunchTemplateConfigArgs added in v2.3.3

type AutoProvisioningGroupLaunchTemplateConfigArgs struct {
	InstanceType     pulumi.StringPtrInput `pulumi:"instanceType"`
	MaxPrice         pulumi.StringInput    `pulumi:"maxPrice"`
	Priority         pulumi.StringPtrInput `pulumi:"priority"`
	VswitchId        pulumi.StringInput    `pulumi:"vswitchId"`
	WeightedCapacity pulumi.StringInput    `pulumi:"weightedCapacity"`
}

func (AutoProvisioningGroupLaunchTemplateConfigArgs) ElementType added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigArgs) ToAutoProvisioningGroupLaunchTemplateConfigOutput added in v2.3.3

func (i AutoProvisioningGroupLaunchTemplateConfigArgs) ToAutoProvisioningGroupLaunchTemplateConfigOutput() AutoProvisioningGroupLaunchTemplateConfigOutput

func (AutoProvisioningGroupLaunchTemplateConfigArgs) ToAutoProvisioningGroupLaunchTemplateConfigOutputWithContext added in v2.3.3

func (i AutoProvisioningGroupLaunchTemplateConfigArgs) ToAutoProvisioningGroupLaunchTemplateConfigOutputWithContext(ctx context.Context) AutoProvisioningGroupLaunchTemplateConfigOutput

type AutoProvisioningGroupLaunchTemplateConfigArray added in v2.3.3

type AutoProvisioningGroupLaunchTemplateConfigArray []AutoProvisioningGroupLaunchTemplateConfigInput

func (AutoProvisioningGroupLaunchTemplateConfigArray) ElementType added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigArray) ToAutoProvisioningGroupLaunchTemplateConfigArrayOutput added in v2.3.3

func (i AutoProvisioningGroupLaunchTemplateConfigArray) ToAutoProvisioningGroupLaunchTemplateConfigArrayOutput() AutoProvisioningGroupLaunchTemplateConfigArrayOutput

func (AutoProvisioningGroupLaunchTemplateConfigArray) ToAutoProvisioningGroupLaunchTemplateConfigArrayOutputWithContext added in v2.3.3

func (i AutoProvisioningGroupLaunchTemplateConfigArray) ToAutoProvisioningGroupLaunchTemplateConfigArrayOutputWithContext(ctx context.Context) AutoProvisioningGroupLaunchTemplateConfigArrayOutput

type AutoProvisioningGroupLaunchTemplateConfigArrayInput added in v2.3.3

type AutoProvisioningGroupLaunchTemplateConfigArrayInput interface {
	pulumi.Input

	ToAutoProvisioningGroupLaunchTemplateConfigArrayOutput() AutoProvisioningGroupLaunchTemplateConfigArrayOutput
	ToAutoProvisioningGroupLaunchTemplateConfigArrayOutputWithContext(context.Context) AutoProvisioningGroupLaunchTemplateConfigArrayOutput
}

AutoProvisioningGroupLaunchTemplateConfigArrayInput is an input type that accepts AutoProvisioningGroupLaunchTemplateConfigArray and AutoProvisioningGroupLaunchTemplateConfigArrayOutput values. You can construct a concrete instance of `AutoProvisioningGroupLaunchTemplateConfigArrayInput` via:

AutoProvisioningGroupLaunchTemplateConfigArray{ AutoProvisioningGroupLaunchTemplateConfigArgs{...} }

type AutoProvisioningGroupLaunchTemplateConfigArrayOutput added in v2.3.3

type AutoProvisioningGroupLaunchTemplateConfigArrayOutput struct{ *pulumi.OutputState }

func (AutoProvisioningGroupLaunchTemplateConfigArrayOutput) ElementType added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigArrayOutput) Index added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigArrayOutput) ToAutoProvisioningGroupLaunchTemplateConfigArrayOutput added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigArrayOutput) ToAutoProvisioningGroupLaunchTemplateConfigArrayOutputWithContext added in v2.3.3

func (o AutoProvisioningGroupLaunchTemplateConfigArrayOutput) ToAutoProvisioningGroupLaunchTemplateConfigArrayOutputWithContext(ctx context.Context) AutoProvisioningGroupLaunchTemplateConfigArrayOutput

type AutoProvisioningGroupLaunchTemplateConfigInput added in v2.3.3

type AutoProvisioningGroupLaunchTemplateConfigInput interface {
	pulumi.Input

	ToAutoProvisioningGroupLaunchTemplateConfigOutput() AutoProvisioningGroupLaunchTemplateConfigOutput
	ToAutoProvisioningGroupLaunchTemplateConfigOutputWithContext(context.Context) AutoProvisioningGroupLaunchTemplateConfigOutput
}

AutoProvisioningGroupLaunchTemplateConfigInput is an input type that accepts AutoProvisioningGroupLaunchTemplateConfigArgs and AutoProvisioningGroupLaunchTemplateConfigOutput values. You can construct a concrete instance of `AutoProvisioningGroupLaunchTemplateConfigInput` via:

AutoProvisioningGroupLaunchTemplateConfigArgs{...}

type AutoProvisioningGroupLaunchTemplateConfigOutput added in v2.3.3

type AutoProvisioningGroupLaunchTemplateConfigOutput struct{ *pulumi.OutputState }

func (AutoProvisioningGroupLaunchTemplateConfigOutput) ElementType added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigOutput) InstanceType added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigOutput) MaxPrice added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigOutput) Priority added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigOutput) ToAutoProvisioningGroupLaunchTemplateConfigOutput added in v2.3.3

func (o AutoProvisioningGroupLaunchTemplateConfigOutput) ToAutoProvisioningGroupLaunchTemplateConfigOutput() AutoProvisioningGroupLaunchTemplateConfigOutput

func (AutoProvisioningGroupLaunchTemplateConfigOutput) ToAutoProvisioningGroupLaunchTemplateConfigOutputWithContext added in v2.3.3

func (o AutoProvisioningGroupLaunchTemplateConfigOutput) ToAutoProvisioningGroupLaunchTemplateConfigOutputWithContext(ctx context.Context) AutoProvisioningGroupLaunchTemplateConfigOutput

func (AutoProvisioningGroupLaunchTemplateConfigOutput) VswitchId added in v2.3.3

func (AutoProvisioningGroupLaunchTemplateConfigOutput) WeightedCapacity added in v2.3.3

type AutoProvisioningGroupMap added in v2.35.1

type AutoProvisioningGroupMap map[string]AutoProvisioningGroupInput

func (AutoProvisioningGroupMap) ElementType added in v2.35.1

func (AutoProvisioningGroupMap) ElementType() reflect.Type

func (AutoProvisioningGroupMap) ToAutoProvisioningGroupMapOutput added in v2.35.1

func (i AutoProvisioningGroupMap) ToAutoProvisioningGroupMapOutput() AutoProvisioningGroupMapOutput

func (AutoProvisioningGroupMap) ToAutoProvisioningGroupMapOutputWithContext added in v2.35.1

func (i AutoProvisioningGroupMap) ToAutoProvisioningGroupMapOutputWithContext(ctx context.Context) AutoProvisioningGroupMapOutput

type AutoProvisioningGroupMapInput added in v2.35.1

type AutoProvisioningGroupMapInput interface {
	pulumi.Input

	ToAutoProvisioningGroupMapOutput() AutoProvisioningGroupMapOutput
	ToAutoProvisioningGroupMapOutputWithContext(context.Context) AutoProvisioningGroupMapOutput
}

AutoProvisioningGroupMapInput is an input type that accepts AutoProvisioningGroupMap and AutoProvisioningGroupMapOutput values. You can construct a concrete instance of `AutoProvisioningGroupMapInput` via:

AutoProvisioningGroupMap{ "key": AutoProvisioningGroupArgs{...} }

type AutoProvisioningGroupMapOutput added in v2.35.1

type AutoProvisioningGroupMapOutput struct{ *pulumi.OutputState }

func (AutoProvisioningGroupMapOutput) ElementType added in v2.35.1

func (AutoProvisioningGroupMapOutput) MapIndex added in v2.35.1

func (AutoProvisioningGroupMapOutput) ToAutoProvisioningGroupMapOutput added in v2.35.1

func (o AutoProvisioningGroupMapOutput) ToAutoProvisioningGroupMapOutput() AutoProvisioningGroupMapOutput

func (AutoProvisioningGroupMapOutput) ToAutoProvisioningGroupMapOutputWithContext added in v2.35.1

func (o AutoProvisioningGroupMapOutput) ToAutoProvisioningGroupMapOutputWithContext(ctx context.Context) AutoProvisioningGroupMapOutput

type AutoProvisioningGroupOutput added in v2.25.1

type AutoProvisioningGroupOutput struct {
	*pulumi.OutputState
}

func (AutoProvisioningGroupOutput) ElementType added in v2.25.1

func (AutoProvisioningGroupOutput) ToAutoProvisioningGroupOutput added in v2.25.1

func (o AutoProvisioningGroupOutput) ToAutoProvisioningGroupOutput() AutoProvisioningGroupOutput

func (AutoProvisioningGroupOutput) ToAutoProvisioningGroupOutputWithContext added in v2.25.1

func (o AutoProvisioningGroupOutput) ToAutoProvisioningGroupOutputWithContext(ctx context.Context) AutoProvisioningGroupOutput

func (AutoProvisioningGroupOutput) ToAutoProvisioningGroupPtrOutput added in v2.35.1

func (o AutoProvisioningGroupOutput) ToAutoProvisioningGroupPtrOutput() AutoProvisioningGroupPtrOutput

func (AutoProvisioningGroupOutput) ToAutoProvisioningGroupPtrOutputWithContext added in v2.35.1

func (o AutoProvisioningGroupOutput) ToAutoProvisioningGroupPtrOutputWithContext(ctx context.Context) AutoProvisioningGroupPtrOutput

type AutoProvisioningGroupPtrInput added in v2.35.1

type AutoProvisioningGroupPtrInput interface {
	pulumi.Input

	ToAutoProvisioningGroupPtrOutput() AutoProvisioningGroupPtrOutput
	ToAutoProvisioningGroupPtrOutputWithContext(ctx context.Context) AutoProvisioningGroupPtrOutput
}

type AutoProvisioningGroupPtrOutput added in v2.35.1

type AutoProvisioningGroupPtrOutput struct {
	*pulumi.OutputState
}

func (AutoProvisioningGroupPtrOutput) ElementType added in v2.35.1

func (AutoProvisioningGroupPtrOutput) ToAutoProvisioningGroupPtrOutput added in v2.35.1

func (o AutoProvisioningGroupPtrOutput) ToAutoProvisioningGroupPtrOutput() AutoProvisioningGroupPtrOutput

func (AutoProvisioningGroupPtrOutput) ToAutoProvisioningGroupPtrOutputWithContext added in v2.35.1

func (o AutoProvisioningGroupPtrOutput) ToAutoProvisioningGroupPtrOutputWithContext(ctx context.Context) AutoProvisioningGroupPtrOutput

type AutoProvisioningGroupState added in v2.3.3

type AutoProvisioningGroupState struct {
	// The name of the auto provisioning group to be created. It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)
	AutoProvisioningGroupName pulumi.StringPtrInput
	// The type of the auto provisioning group. Valid values:`request` and `maintain`,Default value: `maintain`.
	AutoProvisioningGroupType pulumi.StringPtrInput
	// The type of supplemental instances. When the total value of `PayAsYouGoTargetCapacity` and `SpotTargetCapacity` is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:`PayAsYouGo`: Pay-as-you-go instances; `Spot`: Preemptible instances, Default value: `Spot`.
	DefaultTargetCapacityType pulumi.StringPtrInput
	// The description of the auto provisioning group.
	Description pulumi.StringPtrInput
	// The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values: `no-termination` and `termination`,Default value: `no-termination`.
	ExcessCapacityTerminationPolicy pulumi.StringPtrInput
	// DataDisk mappings to attach to ecs instance. See Block config below for details.
	LaunchTemplateConfigs AutoProvisioningGroupLaunchTemplateConfigArrayInput
	// The ID of the instance launch template associated with the auto provisioning group.
	LaunchTemplateId pulumi.StringPtrInput
	// The version of the instance launch template associated with the auto provisioning group.
	LaunchTemplateVersion pulumi.StringPtrInput
	// The global maximum price for preemptible instances in the auto provisioning group. If both the `MaxSpotPrice` and `LaunchTemplateConfig.N.MaxPrice` parameters are specified, the maximum price is the lower value of the two.
	MaxSpotPrice pulumi.Float64PtrInput
	// The scale-out policy for pay-as-you-go instances. Valid values: `lowest-price` and `prioritized`,Default value: `lowest-price`.
	PayAsYouGoAllocationStrategy pulumi.StringPtrInput
	// The target capacity of pay-as-you-go instances in the auto provisioning group.
	PayAsYouGoTargetCapacity pulumi.StringPtrInput
	// The scale-out policy for preemptible instances. Valid values:`lowest-price` and `diversified`,Default value: `lowest-price`.
	SpotAllocationStrategy pulumi.StringPtrInput
	// The default behavior after preemptible instances are shut down. Value values: `stop` and `terminate`,Default value: `stop`.
	SpotInstanceInterruptionBehavior pulumi.StringPtrInput
	// This parameter takes effect when the `SpotAllocationStrategy` parameter is set to `lowest-price`. The auto provisioning group selects instance types of the lowest cost to create instances.
	SpotInstancePoolsToUseCount pulumi.IntPtrInput
	// The target capacity of preemptible instances in the auto provisioning group.
	SpotTargetCapacity pulumi.StringPtrInput
	// Specifies whether to release instances of the auto provisioning group. Valid values:`false` and `true`, default value: `false`.
	TerminateInstances pulumi.BoolPtrInput
	// The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values: `false` and `true`, default value: `false`.
	TerminateInstancesWithExpiration pulumi.BoolPtrInput
	// The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
	TotalTargetCapacity pulumi.StringPtrInput
	// The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the `validUntil` parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
	ValidFrom pulumi.StringPtrInput
	// The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the `validFrom` parameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
	ValidUntil pulumi.StringPtrInput
}

func (AutoProvisioningGroupState) ElementType added in v2.3.3

func (AutoProvisioningGroupState) ElementType() reflect.Type

type CopyImage

type CopyImage struct {
	pulumi.CustomResourceState

	Description pulumi.StringPtrOutput `pulumi:"description"`
	Encrypted   pulumi.BoolPtrOutput   `pulumi:"encrypted"`
	Force       pulumi.BoolPtrOutput   `pulumi:"force"`
	ImageName   pulumi.StringOutput    `pulumi:"imageName"`
	KmsKeyId    pulumi.StringPtrOutput `pulumi:"kmsKeyId"`
	// Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use `image_name` instead.
	Name           pulumi.StringOutput `pulumi:"name"`
	SourceImageId  pulumi.StringOutput `pulumi:"sourceImageId"`
	SourceRegionId pulumi.StringOutput `pulumi:"sourceRegionId"`
	Tags           pulumi.MapOutput    `pulumi:"tags"`
}

func GetCopyImage

func GetCopyImage(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *CopyImageState, opts ...pulumi.ResourceOption) (*CopyImage, error)

GetCopyImage gets an existing CopyImage 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 NewCopyImage

func NewCopyImage(ctx *pulumi.Context,
	name string, args *CopyImageArgs, opts ...pulumi.ResourceOption) (*CopyImage, error)

NewCopyImage registers a new resource with the given unique name, arguments, and options.

func (*CopyImage) ElementType added in v2.25.1

func (*CopyImage) ElementType() reflect.Type

func (*CopyImage) ToCopyImageOutput added in v2.25.1

func (i *CopyImage) ToCopyImageOutput() CopyImageOutput

func (*CopyImage) ToCopyImageOutputWithContext added in v2.25.1

func (i *CopyImage) ToCopyImageOutputWithContext(ctx context.Context) CopyImageOutput

func (*CopyImage) ToCopyImagePtrOutput added in v2.35.1

func (i *CopyImage) ToCopyImagePtrOutput() CopyImagePtrOutput

func (*CopyImage) ToCopyImagePtrOutputWithContext added in v2.35.1

func (i *CopyImage) ToCopyImagePtrOutputWithContext(ctx context.Context) CopyImagePtrOutput

type CopyImageArgs

type CopyImageArgs struct {
	Description pulumi.StringPtrInput
	Encrypted   pulumi.BoolPtrInput
	Force       pulumi.BoolPtrInput
	ImageName   pulumi.StringPtrInput
	KmsKeyId    pulumi.StringPtrInput
	// Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use `image_name` instead.
	Name           pulumi.StringPtrInput
	SourceImageId  pulumi.StringInput
	SourceRegionId pulumi.StringInput
	Tags           pulumi.MapInput
}

The set of arguments for constructing a CopyImage resource.

func (CopyImageArgs) ElementType

func (CopyImageArgs) ElementType() reflect.Type

type CopyImageArray added in v2.35.1

type CopyImageArray []CopyImageInput

func (CopyImageArray) ElementType added in v2.35.1

func (CopyImageArray) ElementType() reflect.Type

func (CopyImageArray) ToCopyImageArrayOutput added in v2.35.1

func (i CopyImageArray) ToCopyImageArrayOutput() CopyImageArrayOutput

func (CopyImageArray) ToCopyImageArrayOutputWithContext added in v2.35.1

func (i CopyImageArray) ToCopyImageArrayOutputWithContext(ctx context.Context) CopyImageArrayOutput

type CopyImageArrayInput added in v2.35.1

type CopyImageArrayInput interface {
	pulumi.Input

	ToCopyImageArrayOutput() CopyImageArrayOutput
	ToCopyImageArrayOutputWithContext(context.Context) CopyImageArrayOutput
}

CopyImageArrayInput is an input type that accepts CopyImageArray and CopyImageArrayOutput values. You can construct a concrete instance of `CopyImageArrayInput` via:

CopyImageArray{ CopyImageArgs{...} }

type CopyImageArrayOutput added in v2.35.1

type CopyImageArrayOutput struct{ *pulumi.OutputState }

func (CopyImageArrayOutput) ElementType added in v2.35.1

func (CopyImageArrayOutput) ElementType() reflect.Type

func (CopyImageArrayOutput) Index added in v2.35.1

func (CopyImageArrayOutput) ToCopyImageArrayOutput added in v2.35.1

func (o CopyImageArrayOutput) ToCopyImageArrayOutput() CopyImageArrayOutput

func (CopyImageArrayOutput) ToCopyImageArrayOutputWithContext added in v2.35.1

func (o CopyImageArrayOutput) ToCopyImageArrayOutputWithContext(ctx context.Context) CopyImageArrayOutput

type CopyImageInput added in v2.25.1

type CopyImageInput interface {
	pulumi.Input

	ToCopyImageOutput() CopyImageOutput
	ToCopyImageOutputWithContext(ctx context.Context) CopyImageOutput
}

type CopyImageMap added in v2.35.1

type CopyImageMap map[string]CopyImageInput

func (CopyImageMap) ElementType added in v2.35.1

func (CopyImageMap) ElementType() reflect.Type

func (CopyImageMap) ToCopyImageMapOutput added in v2.35.1

func (i CopyImageMap) ToCopyImageMapOutput() CopyImageMapOutput

func (CopyImageMap) ToCopyImageMapOutputWithContext added in v2.35.1

func (i CopyImageMap) ToCopyImageMapOutputWithContext(ctx context.Context) CopyImageMapOutput

type CopyImageMapInput added in v2.35.1

type CopyImageMapInput interface {
	pulumi.Input

	ToCopyImageMapOutput() CopyImageMapOutput
	ToCopyImageMapOutputWithContext(context.Context) CopyImageMapOutput
}

CopyImageMapInput is an input type that accepts CopyImageMap and CopyImageMapOutput values. You can construct a concrete instance of `CopyImageMapInput` via:

CopyImageMap{ "key": CopyImageArgs{...} }

type CopyImageMapOutput added in v2.35.1

type CopyImageMapOutput struct{ *pulumi.OutputState }

func (CopyImageMapOutput) ElementType added in v2.35.1

func (CopyImageMapOutput) ElementType() reflect.Type

func (CopyImageMapOutput) MapIndex added in v2.35.1

func (CopyImageMapOutput) ToCopyImageMapOutput added in v2.35.1

func (o CopyImageMapOutput) ToCopyImageMapOutput() CopyImageMapOutput

func (CopyImageMapOutput) ToCopyImageMapOutputWithContext added in v2.35.1

func (o CopyImageMapOutput) ToCopyImageMapOutputWithContext(ctx context.Context) CopyImageMapOutput

type CopyImageOutput added in v2.25.1

type CopyImageOutput struct {
	*pulumi.OutputState
}

func (CopyImageOutput) ElementType added in v2.25.1

func (CopyImageOutput) ElementType() reflect.Type

func (CopyImageOutput) ToCopyImageOutput added in v2.25.1

func (o CopyImageOutput) ToCopyImageOutput() CopyImageOutput

func (CopyImageOutput) ToCopyImageOutputWithContext added in v2.25.1

func (o CopyImageOutput) ToCopyImageOutputWithContext(ctx context.Context) CopyImageOutput

func (CopyImageOutput) ToCopyImagePtrOutput added in v2.35.1

func (o CopyImageOutput) ToCopyImagePtrOutput() CopyImagePtrOutput

func (CopyImageOutput) ToCopyImagePtrOutputWithContext added in v2.35.1

func (o CopyImageOutput) ToCopyImagePtrOutputWithContext(ctx context.Context) CopyImagePtrOutput

type CopyImagePtrInput added in v2.35.1

type CopyImagePtrInput interface {
	pulumi.Input

	ToCopyImagePtrOutput() CopyImagePtrOutput
	ToCopyImagePtrOutputWithContext(ctx context.Context) CopyImagePtrOutput
}

type CopyImagePtrOutput added in v2.35.1

type CopyImagePtrOutput struct {
	*pulumi.OutputState
}

func (CopyImagePtrOutput) ElementType added in v2.35.1

func (CopyImagePtrOutput) ElementType() reflect.Type

func (CopyImagePtrOutput) ToCopyImagePtrOutput added in v2.35.1

func (o CopyImagePtrOutput) ToCopyImagePtrOutput() CopyImagePtrOutput

func (CopyImagePtrOutput) ToCopyImagePtrOutputWithContext added in v2.35.1

func (o CopyImagePtrOutput) ToCopyImagePtrOutputWithContext(ctx context.Context) CopyImagePtrOutput

type CopyImageState

type CopyImageState struct {
	Description pulumi.StringPtrInput
	Encrypted   pulumi.BoolPtrInput
	Force       pulumi.BoolPtrInput
	ImageName   pulumi.StringPtrInput
	KmsKeyId    pulumi.StringPtrInput
	// Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use `image_name` instead.
	Name           pulumi.StringPtrInput
	SourceImageId  pulumi.StringPtrInput
	SourceRegionId pulumi.StringPtrInput
	Tags           pulumi.MapInput
}

func (CopyImageState) ElementType

func (CopyImageState) ElementType() reflect.Type

type DedicatedHost added in v2.13.0

type DedicatedHost struct {
	pulumi.CustomResourceState

	// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: `Migrate`, `Stop`.
	ActionOnMaintenance pulumi.StringPtrOutput `pulumi:"actionOnMaintenance"`
	// Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: `on`, `off`. Default: `on`.
	AutoPlacement pulumi.StringPtrOutput `pulumi:"autoPlacement"`
	// The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
	AutoReleaseTime pulumi.StringPtrOutput `pulumi:"autoReleaseTime"`
	// Specifies whether to automatically renew the subscription dedicated host.
	AutoRenew pulumi.BoolPtrOutput `pulumi:"autoRenew"`
	// The auto-renewal period of the dedicated host. Unit: months. Valid values: `1`, `2`, `3`, `6`, and `12`. takes effect and is required only when the AutoRenew parameter is set to true.
	AutoRenewPeriod pulumi.IntPtrOutput `pulumi:"autoRenewPeriod"`
	// The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
	DedicatedHostName pulumi.StringPtrOutput `pulumi:"dedicatedHostName"`
	// The type of the dedicated host. You can call the [DescribeDedicatedHostTypes](https://www.alibabacloud.com/help/doc-detail/134240.htm) operation to obtain the most recent list of dedicated host types.
	DedicatedHostType pulumi.StringOutput `pulumi:"dedicatedHostType"`
	// The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: `false`.
	DetailFee pulumi.BoolPtrOutput `pulumi:"detailFee"`
	// Specifies whether to only validate the request. Default: `false`.
	DryRun pulumi.BoolPtrOutput `pulumi:"dryRun"`
	// The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
	ExpiredTime pulumi.StringOutput `pulumi:"expiredTime"`
	// dedicated host network parameters. contains the following attributes:
	NetworkAttributes DedicatedHostNetworkAttributeArrayOutput `pulumi:"networkAttributes"`
	// The billing method of the dedicated host. Valid values: `PrePaid`, `PostPaid`. Default: `PostPaid`.
	PaymentType pulumi.StringPtrOutput `pulumi:"paymentType"`
	// The ID of the resource group to which the dedicated host belongs.
	ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"`
	// The unit of the subscription period of the dedicated host.
	SaleCycle pulumi.StringOutput `pulumi:"saleCycle"`
	// The status of the dedicated host.
	Status pulumi.StringOutput `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
	ZoneId pulumi.StringOutput `pulumi:"zoneId"`
}

This resouce used to create a dedicated host and store its initial version. For information about Aliecs Dedicated Host and how to use it, see [What is Resource Aliecs Dedicated Host](https://www.alibabacloud.com/help/doc-detail/134238.htm).

> **NOTE:** Available in 1.91.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewDedicatedHost(ctx, "_default", &ecs.DedicatedHostArgs{
			DedicatedHostName: pulumi.String("dedicated_host_name"),
			DedicatedHostType: pulumi.String("ddh.g5"),
			Description:       pulumi.String("From_Terraform"),
			Tags: pulumi.StringMap{
				"Create": pulumi.String("Terraform"),
				"For":    pulumi.String("DDH"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

Create Prepaid DDH

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewDedicatedHost(ctx, "_default", &ecs.DedicatedHostArgs{
			DedicatedHostName: pulumi.String("dedicated_host_name"),
			DedicatedHostType: pulumi.String("ddh.g5"),
			Description:       pulumi.String("From_Terraform"),
			ExpiredTime:       pulumi.String("1"),
			PaymentType:       pulumi.String("PrePaid"),
			SaleCycle:         pulumi.String("Month"),
			Tags: pulumi.StringMap{
				"Create": pulumi.String("Terraform"),
				"For":    pulumi.String("DDH"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Ecs dedicated host can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/dedicatedHost:DedicatedHost default dh-2zedmxxxx

```

func GetDedicatedHost added in v2.13.0

func GetDedicatedHost(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DedicatedHostState, opts ...pulumi.ResourceOption) (*DedicatedHost, error)

GetDedicatedHost gets an existing DedicatedHost 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 NewDedicatedHost added in v2.13.0

func NewDedicatedHost(ctx *pulumi.Context,
	name string, args *DedicatedHostArgs, opts ...pulumi.ResourceOption) (*DedicatedHost, error)

NewDedicatedHost registers a new resource with the given unique name, arguments, and options.

func (*DedicatedHost) ElementType added in v2.25.1

func (*DedicatedHost) ElementType() reflect.Type

func (*DedicatedHost) ToDedicatedHostOutput added in v2.25.1

func (i *DedicatedHost) ToDedicatedHostOutput() DedicatedHostOutput

func (*DedicatedHost) ToDedicatedHostOutputWithContext added in v2.25.1

func (i *DedicatedHost) ToDedicatedHostOutputWithContext(ctx context.Context) DedicatedHostOutput

func (*DedicatedHost) ToDedicatedHostPtrOutput added in v2.35.1

func (i *DedicatedHost) ToDedicatedHostPtrOutput() DedicatedHostPtrOutput

func (*DedicatedHost) ToDedicatedHostPtrOutputWithContext added in v2.35.1

func (i *DedicatedHost) ToDedicatedHostPtrOutputWithContext(ctx context.Context) DedicatedHostPtrOutput

type DedicatedHostArgs added in v2.13.0

type DedicatedHostArgs struct {
	// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: `Migrate`, `Stop`.
	ActionOnMaintenance pulumi.StringPtrInput
	// Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: `on`, `off`. Default: `on`.
	AutoPlacement pulumi.StringPtrInput
	// The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
	AutoReleaseTime pulumi.StringPtrInput
	// Specifies whether to automatically renew the subscription dedicated host.
	AutoRenew pulumi.BoolPtrInput
	// The auto-renewal period of the dedicated host. Unit: months. Valid values: `1`, `2`, `3`, `6`, and `12`. takes effect and is required only when the AutoRenew parameter is set to true.
	AutoRenewPeriod pulumi.IntPtrInput
	// The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
	DedicatedHostName pulumi.StringPtrInput
	// The type of the dedicated host. You can call the [DescribeDedicatedHostTypes](https://www.alibabacloud.com/help/doc-detail/134240.htm) operation to obtain the most recent list of dedicated host types.
	DedicatedHostType pulumi.StringInput
	// The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
	Description pulumi.StringPtrInput
	// Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: `false`.
	DetailFee pulumi.BoolPtrInput
	// Specifies whether to only validate the request. Default: `false`.
	DryRun pulumi.BoolPtrInput
	// The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
	ExpiredTime pulumi.StringPtrInput
	// dedicated host network parameters. contains the following attributes:
	NetworkAttributes DedicatedHostNetworkAttributeArrayInput
	// The billing method of the dedicated host. Valid values: `PrePaid`, `PostPaid`. Default: `PostPaid`.
	PaymentType pulumi.StringPtrInput
	// The ID of the resource group to which the dedicated host belongs.
	ResourceGroupId pulumi.StringPtrInput
	// The unit of the subscription period of the dedicated host.
	SaleCycle pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
	ZoneId pulumi.StringPtrInput
}

The set of arguments for constructing a DedicatedHost resource.

func (DedicatedHostArgs) ElementType added in v2.13.0

func (DedicatedHostArgs) ElementType() reflect.Type

type DedicatedHostArray added in v2.35.1

type DedicatedHostArray []DedicatedHostInput

func (DedicatedHostArray) ElementType added in v2.35.1

func (DedicatedHostArray) ElementType() reflect.Type

func (DedicatedHostArray) ToDedicatedHostArrayOutput added in v2.35.1

func (i DedicatedHostArray) ToDedicatedHostArrayOutput() DedicatedHostArrayOutput

func (DedicatedHostArray) ToDedicatedHostArrayOutputWithContext added in v2.35.1

func (i DedicatedHostArray) ToDedicatedHostArrayOutputWithContext(ctx context.Context) DedicatedHostArrayOutput

type DedicatedHostArrayInput added in v2.35.1

type DedicatedHostArrayInput interface {
	pulumi.Input

	ToDedicatedHostArrayOutput() DedicatedHostArrayOutput
	ToDedicatedHostArrayOutputWithContext(context.Context) DedicatedHostArrayOutput
}

DedicatedHostArrayInput is an input type that accepts DedicatedHostArray and DedicatedHostArrayOutput values. You can construct a concrete instance of `DedicatedHostArrayInput` via:

DedicatedHostArray{ DedicatedHostArgs{...} }

type DedicatedHostArrayOutput added in v2.35.1

type DedicatedHostArrayOutput struct{ *pulumi.OutputState }

func (DedicatedHostArrayOutput) ElementType added in v2.35.1

func (DedicatedHostArrayOutput) ElementType() reflect.Type

func (DedicatedHostArrayOutput) Index added in v2.35.1

func (DedicatedHostArrayOutput) ToDedicatedHostArrayOutput added in v2.35.1

func (o DedicatedHostArrayOutput) ToDedicatedHostArrayOutput() DedicatedHostArrayOutput

func (DedicatedHostArrayOutput) ToDedicatedHostArrayOutputWithContext added in v2.35.1

func (o DedicatedHostArrayOutput) ToDedicatedHostArrayOutputWithContext(ctx context.Context) DedicatedHostArrayOutput

type DedicatedHostInput added in v2.25.1

type DedicatedHostInput interface {
	pulumi.Input

	ToDedicatedHostOutput() DedicatedHostOutput
	ToDedicatedHostOutputWithContext(ctx context.Context) DedicatedHostOutput
}

type DedicatedHostMap added in v2.35.1

type DedicatedHostMap map[string]DedicatedHostInput

func (DedicatedHostMap) ElementType added in v2.35.1

func (DedicatedHostMap) ElementType() reflect.Type

func (DedicatedHostMap) ToDedicatedHostMapOutput added in v2.35.1

func (i DedicatedHostMap) ToDedicatedHostMapOutput() DedicatedHostMapOutput

func (DedicatedHostMap) ToDedicatedHostMapOutputWithContext added in v2.35.1

func (i DedicatedHostMap) ToDedicatedHostMapOutputWithContext(ctx context.Context) DedicatedHostMapOutput

type DedicatedHostMapInput added in v2.35.1

type DedicatedHostMapInput interface {
	pulumi.Input

	ToDedicatedHostMapOutput() DedicatedHostMapOutput
	ToDedicatedHostMapOutputWithContext(context.Context) DedicatedHostMapOutput
}

DedicatedHostMapInput is an input type that accepts DedicatedHostMap and DedicatedHostMapOutput values. You can construct a concrete instance of `DedicatedHostMapInput` via:

DedicatedHostMap{ "key": DedicatedHostArgs{...} }

type DedicatedHostMapOutput added in v2.35.1

type DedicatedHostMapOutput struct{ *pulumi.OutputState }

func (DedicatedHostMapOutput) ElementType added in v2.35.1

func (DedicatedHostMapOutput) ElementType() reflect.Type

func (DedicatedHostMapOutput) MapIndex added in v2.35.1

func (DedicatedHostMapOutput) ToDedicatedHostMapOutput added in v2.35.1

func (o DedicatedHostMapOutput) ToDedicatedHostMapOutput() DedicatedHostMapOutput

func (DedicatedHostMapOutput) ToDedicatedHostMapOutputWithContext added in v2.35.1

func (o DedicatedHostMapOutput) ToDedicatedHostMapOutputWithContext(ctx context.Context) DedicatedHostMapOutput

type DedicatedHostNetworkAttribute added in v2.13.0

type DedicatedHostNetworkAttribute struct {
	// The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid values: 15 to 310.
	SlbUdpTimeout *int `pulumi:"slbUdpTimeout"`
	// The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310.
	UdpTimeout *int `pulumi:"udpTimeout"`
}

type DedicatedHostNetworkAttributeArgs added in v2.13.0

type DedicatedHostNetworkAttributeArgs struct {
	// The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid values: 15 to 310.
	SlbUdpTimeout pulumi.IntPtrInput `pulumi:"slbUdpTimeout"`
	// The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310.
	UdpTimeout pulumi.IntPtrInput `pulumi:"udpTimeout"`
}

func (DedicatedHostNetworkAttributeArgs) ElementType added in v2.13.0

func (DedicatedHostNetworkAttributeArgs) ToDedicatedHostNetworkAttributeOutput added in v2.13.0

func (i DedicatedHostNetworkAttributeArgs) ToDedicatedHostNetworkAttributeOutput() DedicatedHostNetworkAttributeOutput

func (DedicatedHostNetworkAttributeArgs) ToDedicatedHostNetworkAttributeOutputWithContext added in v2.13.0

func (i DedicatedHostNetworkAttributeArgs) ToDedicatedHostNetworkAttributeOutputWithContext(ctx context.Context) DedicatedHostNetworkAttributeOutput

type DedicatedHostNetworkAttributeArray added in v2.13.0

type DedicatedHostNetworkAttributeArray []DedicatedHostNetworkAttributeInput

func (DedicatedHostNetworkAttributeArray) ElementType added in v2.13.0

func (DedicatedHostNetworkAttributeArray) ToDedicatedHostNetworkAttributeArrayOutput added in v2.13.0

func (i DedicatedHostNetworkAttributeArray) ToDedicatedHostNetworkAttributeArrayOutput() DedicatedHostNetworkAttributeArrayOutput

func (DedicatedHostNetworkAttributeArray) ToDedicatedHostNetworkAttributeArrayOutputWithContext added in v2.13.0

func (i DedicatedHostNetworkAttributeArray) ToDedicatedHostNetworkAttributeArrayOutputWithContext(ctx context.Context) DedicatedHostNetworkAttributeArrayOutput

type DedicatedHostNetworkAttributeArrayInput added in v2.13.0

type DedicatedHostNetworkAttributeArrayInput interface {
	pulumi.Input

	ToDedicatedHostNetworkAttributeArrayOutput() DedicatedHostNetworkAttributeArrayOutput
	ToDedicatedHostNetworkAttributeArrayOutputWithContext(context.Context) DedicatedHostNetworkAttributeArrayOutput
}

DedicatedHostNetworkAttributeArrayInput is an input type that accepts DedicatedHostNetworkAttributeArray and DedicatedHostNetworkAttributeArrayOutput values. You can construct a concrete instance of `DedicatedHostNetworkAttributeArrayInput` via:

DedicatedHostNetworkAttributeArray{ DedicatedHostNetworkAttributeArgs{...} }

type DedicatedHostNetworkAttributeArrayOutput added in v2.13.0

type DedicatedHostNetworkAttributeArrayOutput struct{ *pulumi.OutputState }

func (DedicatedHostNetworkAttributeArrayOutput) ElementType added in v2.13.0

func (DedicatedHostNetworkAttributeArrayOutput) Index added in v2.13.0

func (DedicatedHostNetworkAttributeArrayOutput) ToDedicatedHostNetworkAttributeArrayOutput added in v2.13.0

func (o DedicatedHostNetworkAttributeArrayOutput) ToDedicatedHostNetworkAttributeArrayOutput() DedicatedHostNetworkAttributeArrayOutput

func (DedicatedHostNetworkAttributeArrayOutput) ToDedicatedHostNetworkAttributeArrayOutputWithContext added in v2.13.0

func (o DedicatedHostNetworkAttributeArrayOutput) ToDedicatedHostNetworkAttributeArrayOutputWithContext(ctx context.Context) DedicatedHostNetworkAttributeArrayOutput

type DedicatedHostNetworkAttributeInput added in v2.13.0

type DedicatedHostNetworkAttributeInput interface {
	pulumi.Input

	ToDedicatedHostNetworkAttributeOutput() DedicatedHostNetworkAttributeOutput
	ToDedicatedHostNetworkAttributeOutputWithContext(context.Context) DedicatedHostNetworkAttributeOutput
}

DedicatedHostNetworkAttributeInput is an input type that accepts DedicatedHostNetworkAttributeArgs and DedicatedHostNetworkAttributeOutput values. You can construct a concrete instance of `DedicatedHostNetworkAttributeInput` via:

DedicatedHostNetworkAttributeArgs{...}

type DedicatedHostNetworkAttributeOutput added in v2.13.0

type DedicatedHostNetworkAttributeOutput struct{ *pulumi.OutputState }

func (DedicatedHostNetworkAttributeOutput) ElementType added in v2.13.0

func (DedicatedHostNetworkAttributeOutput) SlbUdpTimeout added in v2.13.0

The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid values: 15 to 310.

func (DedicatedHostNetworkAttributeOutput) ToDedicatedHostNetworkAttributeOutput added in v2.13.0

func (o DedicatedHostNetworkAttributeOutput) ToDedicatedHostNetworkAttributeOutput() DedicatedHostNetworkAttributeOutput

func (DedicatedHostNetworkAttributeOutput) ToDedicatedHostNetworkAttributeOutputWithContext added in v2.13.0

func (o DedicatedHostNetworkAttributeOutput) ToDedicatedHostNetworkAttributeOutputWithContext(ctx context.Context) DedicatedHostNetworkAttributeOutput

func (DedicatedHostNetworkAttributeOutput) UdpTimeout added in v2.13.0

The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310.

type DedicatedHostOutput added in v2.25.1

type DedicatedHostOutput struct {
	*pulumi.OutputState
}

func (DedicatedHostOutput) ElementType added in v2.25.1

func (DedicatedHostOutput) ElementType() reflect.Type

func (DedicatedHostOutput) ToDedicatedHostOutput added in v2.25.1

func (o DedicatedHostOutput) ToDedicatedHostOutput() DedicatedHostOutput

func (DedicatedHostOutput) ToDedicatedHostOutputWithContext added in v2.25.1

func (o DedicatedHostOutput) ToDedicatedHostOutputWithContext(ctx context.Context) DedicatedHostOutput

func (DedicatedHostOutput) ToDedicatedHostPtrOutput added in v2.35.1

func (o DedicatedHostOutput) ToDedicatedHostPtrOutput() DedicatedHostPtrOutput

func (DedicatedHostOutput) ToDedicatedHostPtrOutputWithContext added in v2.35.1

func (o DedicatedHostOutput) ToDedicatedHostPtrOutputWithContext(ctx context.Context) DedicatedHostPtrOutput

type DedicatedHostPtrInput added in v2.35.1

type DedicatedHostPtrInput interface {
	pulumi.Input

	ToDedicatedHostPtrOutput() DedicatedHostPtrOutput
	ToDedicatedHostPtrOutputWithContext(ctx context.Context) DedicatedHostPtrOutput
}

type DedicatedHostPtrOutput added in v2.35.1

type DedicatedHostPtrOutput struct {
	*pulumi.OutputState
}

func (DedicatedHostPtrOutput) ElementType added in v2.35.1

func (DedicatedHostPtrOutput) ElementType() reflect.Type

func (DedicatedHostPtrOutput) ToDedicatedHostPtrOutput added in v2.35.1

func (o DedicatedHostPtrOutput) ToDedicatedHostPtrOutput() DedicatedHostPtrOutput

func (DedicatedHostPtrOutput) ToDedicatedHostPtrOutputWithContext added in v2.35.1

func (o DedicatedHostPtrOutput) ToDedicatedHostPtrOutputWithContext(ctx context.Context) DedicatedHostPtrOutput

type DedicatedHostState added in v2.13.0

type DedicatedHostState struct {
	// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: `Migrate`, `Stop`.
	ActionOnMaintenance pulumi.StringPtrInput
	// Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: `on`, `off`. Default: `on`.
	AutoPlacement pulumi.StringPtrInput
	// The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
	AutoReleaseTime pulumi.StringPtrInput
	// Specifies whether to automatically renew the subscription dedicated host.
	AutoRenew pulumi.BoolPtrInput
	// The auto-renewal period of the dedicated host. Unit: months. Valid values: `1`, `2`, `3`, `6`, and `12`. takes effect and is required only when the AutoRenew parameter is set to true.
	AutoRenewPeriod pulumi.IntPtrInput
	// The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
	DedicatedHostName pulumi.StringPtrInput
	// The type of the dedicated host. You can call the [DescribeDedicatedHostTypes](https://www.alibabacloud.com/help/doc-detail/134240.htm) operation to obtain the most recent list of dedicated host types.
	DedicatedHostType pulumi.StringPtrInput
	// The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
	Description pulumi.StringPtrInput
	// Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: `false`.
	DetailFee pulumi.BoolPtrInput
	// Specifies whether to only validate the request. Default: `false`.
	DryRun pulumi.BoolPtrInput
	// The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
	ExpiredTime pulumi.StringPtrInput
	// dedicated host network parameters. contains the following attributes:
	NetworkAttributes DedicatedHostNetworkAttributeArrayInput
	// The billing method of the dedicated host. Valid values: `PrePaid`, `PostPaid`. Default: `PostPaid`.
	PaymentType pulumi.StringPtrInput
	// The ID of the resource group to which the dedicated host belongs.
	ResourceGroupId pulumi.StringPtrInput
	// The unit of the subscription period of the dedicated host.
	SaleCycle pulumi.StringPtrInput
	// The status of the dedicated host.
	Status pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
	ZoneId pulumi.StringPtrInput
}

func (DedicatedHostState) ElementType added in v2.13.0

func (DedicatedHostState) ElementType() reflect.Type

type Disk

type Disk struct {
	pulumi.CustomResourceState

	// The Zone to create the disk in.
	AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"`
	// Category of the disk. Valid values are `cloud`, `cloudEfficiency`, `cloudSsd`, `cloudEssd`. Default is `cloudEfficiency`.
	Category pulumi.StringPtrOutput `pulumi:"category"`
	// Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
	DeleteAutoSnapshot pulumi.BoolPtrOutput `pulumi:"deleteAutoSnapshot"`
	// Indicates whether the disk is released together with the instance: Default value: false.
	DeleteWithInstance pulumi.BoolPtrOutput `pulumi:"deleteWithInstance"`
	// Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
	EnableAutoSnapshot pulumi.BoolPtrOutput `pulumi:"enableAutoSnapshot"`
	// If true, the disk will be encrypted, conflict with `snapshotId`.
	Encrypted pulumi.BoolPtrOutput `pulumi:"encrypted"`
	// The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
	KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"`
	// Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
	Name pulumi.StringOutput `pulumi:"name"`
	// Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
	// * `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
	// * `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
	// * `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
	PerformanceLevel pulumi.StringPtrOutput `pulumi:"performanceLevel"`
	// The Id of resource group which the disk belongs.
	// > **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloudEfficiency` and `cloudSsd` disk.
	ResourceGroupId pulumi.StringPtrOutput `pulumi:"resourceGroupId"`
	// The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
	Size pulumi.IntOutput `pulumi:"size"`
	// A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
	SnapshotId pulumi.StringPtrOutput `pulumi:"snapshotId"`
	// The disk status.
	Status pulumi.StringOutput `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
}

Provides a ECS disk resource.

> **NOTE:** One of `size` or `snapshotId` is required when specifying an ECS disk. If all of them be specified, `size` must more than the size of snapshot which `snapshotId` represents. Currently, `ecs.Disk` doesn't resize disk.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewDisk(ctx, "ecsDisk", &ecs.DiskArgs{
			AvailabilityZone: pulumi.String("cn-beijing-b"),
			Category:         pulumi.String("cloud_efficiency"),
			Description:      pulumi.String("Hello ecs disk."),
			Encrypted:        pulumi.Bool(true),
			KmsKeyId:         pulumi.String("2a6767f0-a16c-4679-a60f-13bf*****"),
			Size:             pulumi.Int(30),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("TerraformTest"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Cloud disk can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/disk:Disk example d-abc12345678

```

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 added in v2.25.1

func (*Disk) ElementType() reflect.Type

func (*Disk) ToDiskOutput added in v2.25.1

func (i *Disk) ToDiskOutput() DiskOutput

func (*Disk) ToDiskOutputWithContext added in v2.25.1

func (i *Disk) ToDiskOutputWithContext(ctx context.Context) DiskOutput

func (*Disk) ToDiskPtrOutput added in v2.35.1

func (i *Disk) ToDiskPtrOutput() DiskPtrOutput

func (*Disk) ToDiskPtrOutputWithContext added in v2.35.1

func (i *Disk) ToDiskPtrOutputWithContext(ctx context.Context) DiskPtrOutput

type DiskArgs

type DiskArgs struct {
	// The Zone to create the disk in.
	AvailabilityZone pulumi.StringInput
	// Category of the disk. Valid values are `cloud`, `cloudEfficiency`, `cloudSsd`, `cloudEssd`. Default is `cloudEfficiency`.
	Category pulumi.StringPtrInput
	// Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
	DeleteAutoSnapshot pulumi.BoolPtrInput
	// Indicates whether the disk is released together with the instance: Default value: false.
	DeleteWithInstance pulumi.BoolPtrInput
	// Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
	Description pulumi.StringPtrInput
	// Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
	EnableAutoSnapshot pulumi.BoolPtrInput
	// If true, the disk will be encrypted, conflict with `snapshotId`.
	Encrypted pulumi.BoolPtrInput
	// The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
	KmsKeyId pulumi.StringPtrInput
	// Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
	Name pulumi.StringPtrInput
	// Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
	// * `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
	// * `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
	// * `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
	PerformanceLevel pulumi.StringPtrInput
	// The Id of resource group which the disk belongs.
	// > **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloudEfficiency` and `cloudSsd` disk.
	ResourceGroupId pulumi.StringPtrInput
	// The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
	Size pulumi.IntInput
	// A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
	SnapshotId pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
}

The set of arguments for constructing a Disk resource.

func (DiskArgs) ElementType

func (DiskArgs) ElementType() reflect.Type

type DiskArray added in v2.35.1

type DiskArray []DiskInput

func (DiskArray) ElementType added in v2.35.1

func (DiskArray) ElementType() reflect.Type

func (DiskArray) ToDiskArrayOutput added in v2.35.1

func (i DiskArray) ToDiskArrayOutput() DiskArrayOutput

func (DiskArray) ToDiskArrayOutputWithContext added in v2.35.1

func (i DiskArray) ToDiskArrayOutputWithContext(ctx context.Context) DiskArrayOutput

type DiskArrayInput added in v2.35.1

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 added in v2.35.1

type DiskArrayOutput struct{ *pulumi.OutputState }

func (DiskArrayOutput) ElementType added in v2.35.1

func (DiskArrayOutput) ElementType() reflect.Type

func (DiskArrayOutput) Index added in v2.35.1

func (DiskArrayOutput) ToDiskArrayOutput added in v2.35.1

func (o DiskArrayOutput) ToDiskArrayOutput() DiskArrayOutput

func (DiskArrayOutput) ToDiskArrayOutputWithContext added in v2.35.1

func (o DiskArrayOutput) ToDiskArrayOutputWithContext(ctx context.Context) DiskArrayOutput

type DiskAttachment

type DiskAttachment struct {
	pulumi.CustomResourceState

	// The device name has been deprecated, and when attaching disk, it will be allocated automatically by system according to default order from /dev/xvdb to /dev/xvdz.
	//
	// Deprecated: Attribute device_name is deprecated on disk attachment resource. Suggest to remove it from your template.
	DeviceName pulumi.StringOutput `pulumi:"deviceName"`
	// ID of the Disk to be attached.
	DiskId pulumi.StringOutput `pulumi:"diskId"`
	// ID of the Instance to attach to.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
}

Provides an Alicloud ECS Disk Attachment as a resource, to attach and detach disks from ECS Instances.

## Example Usage

Basic usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ecsSg, err := ecs.NewSecurityGroup(ctx, "ecsSg", &ecs.SecurityGroupArgs{
			Description: pulumi.String("New security group"),
		})
		if err != nil {
			return err
		}
		ecsDisk, err := ecs.NewDisk(ctx, "ecsDisk", &ecs.DiskArgs{
			AvailabilityZone: pulumi.String("cn-beijing-a"),
			Size:             pulumi.Int(50),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("TerraformTest-disk"),
			},
		})
		if err != nil {
			return err
		}
		ecsInstance, err := ecs.NewInstance(ctx, "ecsInstance", &ecs.InstanceArgs{
			ImageId:          pulumi.String("ubuntu_18_04_64_20G_alibase_20190624.vhd"),
			InstanceType:     pulumi.String("ecs.n4.small"),
			AvailabilityZone: pulumi.String("cn-beijing-a"),
			SecurityGroups: pulumi.StringArray{
				ecsSg.ID(),
			},
			InstanceName:       pulumi.String("Hello"),
			InternetChargeType: pulumi.String("PayByBandwidth"),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("TerraformTest-instance"),
			},
		})
		if err != nil {
			return err
		}
		_, err = ecs.NewDiskAttachment(ctx, "ecsDiskAtt", &ecs.DiskAttachmentArgs{
			DiskId:     ecsDisk.ID(),
			InstanceId: ecsInstance.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 added in v2.25.1

func (*DiskAttachment) ElementType() reflect.Type

func (*DiskAttachment) ToDiskAttachmentOutput added in v2.25.1

func (i *DiskAttachment) ToDiskAttachmentOutput() DiskAttachmentOutput

func (*DiskAttachment) ToDiskAttachmentOutputWithContext added in v2.25.1

func (i *DiskAttachment) ToDiskAttachmentOutputWithContext(ctx context.Context) DiskAttachmentOutput

func (*DiskAttachment) ToDiskAttachmentPtrOutput added in v2.35.1

func (i *DiskAttachment) ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput

func (*DiskAttachment) ToDiskAttachmentPtrOutputWithContext added in v2.35.1

func (i *DiskAttachment) ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput

type DiskAttachmentArgs

type DiskAttachmentArgs struct {
	// The device name has been deprecated, and when attaching disk, it will be allocated automatically by system according to default order from /dev/xvdb to /dev/xvdz.
	//
	// Deprecated: Attribute device_name is deprecated on disk attachment resource. Suggest to remove it from your template.
	DeviceName pulumi.StringPtrInput
	// ID of the Disk to be attached.
	DiskId pulumi.StringInput
	// ID of the Instance to attach to.
	InstanceId pulumi.StringInput
}

The set of arguments for constructing a DiskAttachment resource.

func (DiskAttachmentArgs) ElementType

func (DiskAttachmentArgs) ElementType() reflect.Type

type DiskAttachmentArray added in v2.35.1

type DiskAttachmentArray []DiskAttachmentInput

func (DiskAttachmentArray) ElementType added in v2.35.1

func (DiskAttachmentArray) ElementType() reflect.Type

func (DiskAttachmentArray) ToDiskAttachmentArrayOutput added in v2.35.1

func (i DiskAttachmentArray) ToDiskAttachmentArrayOutput() DiskAttachmentArrayOutput

func (DiskAttachmentArray) ToDiskAttachmentArrayOutputWithContext added in v2.35.1

func (i DiskAttachmentArray) ToDiskAttachmentArrayOutputWithContext(ctx context.Context) DiskAttachmentArrayOutput

type DiskAttachmentArrayInput added in v2.35.1

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 added in v2.35.1

type DiskAttachmentArrayOutput struct{ *pulumi.OutputState }

func (DiskAttachmentArrayOutput) ElementType added in v2.35.1

func (DiskAttachmentArrayOutput) ElementType() reflect.Type

func (DiskAttachmentArrayOutput) Index added in v2.35.1

func (DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutput added in v2.35.1

func (o DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutput() DiskAttachmentArrayOutput

func (DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutputWithContext added in v2.35.1

func (o DiskAttachmentArrayOutput) ToDiskAttachmentArrayOutputWithContext(ctx context.Context) DiskAttachmentArrayOutput

type DiskAttachmentInput added in v2.25.1

type DiskAttachmentInput interface {
	pulumi.Input

	ToDiskAttachmentOutput() DiskAttachmentOutput
	ToDiskAttachmentOutputWithContext(ctx context.Context) DiskAttachmentOutput
}

type DiskAttachmentMap added in v2.35.1

type DiskAttachmentMap map[string]DiskAttachmentInput

func (DiskAttachmentMap) ElementType added in v2.35.1

func (DiskAttachmentMap) ElementType() reflect.Type

func (DiskAttachmentMap) ToDiskAttachmentMapOutput added in v2.35.1

func (i DiskAttachmentMap) ToDiskAttachmentMapOutput() DiskAttachmentMapOutput

func (DiskAttachmentMap) ToDiskAttachmentMapOutputWithContext added in v2.35.1

func (i DiskAttachmentMap) ToDiskAttachmentMapOutputWithContext(ctx context.Context) DiskAttachmentMapOutput

type DiskAttachmentMapInput added in v2.35.1

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 added in v2.35.1

type DiskAttachmentMapOutput struct{ *pulumi.OutputState }

func (DiskAttachmentMapOutput) ElementType added in v2.35.1

func (DiskAttachmentMapOutput) ElementType() reflect.Type

func (DiskAttachmentMapOutput) MapIndex added in v2.35.1

func (DiskAttachmentMapOutput) ToDiskAttachmentMapOutput added in v2.35.1

func (o DiskAttachmentMapOutput) ToDiskAttachmentMapOutput() DiskAttachmentMapOutput

func (DiskAttachmentMapOutput) ToDiskAttachmentMapOutputWithContext added in v2.35.1

func (o DiskAttachmentMapOutput) ToDiskAttachmentMapOutputWithContext(ctx context.Context) DiskAttachmentMapOutput

type DiskAttachmentOutput added in v2.25.1

type DiskAttachmentOutput struct {
	*pulumi.OutputState
}

func (DiskAttachmentOutput) ElementType added in v2.25.1

func (DiskAttachmentOutput) ElementType() reflect.Type

func (DiskAttachmentOutput) ToDiskAttachmentOutput added in v2.25.1

func (o DiskAttachmentOutput) ToDiskAttachmentOutput() DiskAttachmentOutput

func (DiskAttachmentOutput) ToDiskAttachmentOutputWithContext added in v2.25.1

func (o DiskAttachmentOutput) ToDiskAttachmentOutputWithContext(ctx context.Context) DiskAttachmentOutput

func (DiskAttachmentOutput) ToDiskAttachmentPtrOutput added in v2.35.1

func (o DiskAttachmentOutput) ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput

func (DiskAttachmentOutput) ToDiskAttachmentPtrOutputWithContext added in v2.35.1

func (o DiskAttachmentOutput) ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput

type DiskAttachmentPtrInput added in v2.35.1

type DiskAttachmentPtrInput interface {
	pulumi.Input

	ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput
	ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput
}

type DiskAttachmentPtrOutput added in v2.35.1

type DiskAttachmentPtrOutput struct {
	*pulumi.OutputState
}

func (DiskAttachmentPtrOutput) ElementType added in v2.35.1

func (DiskAttachmentPtrOutput) ElementType() reflect.Type

func (DiskAttachmentPtrOutput) ToDiskAttachmentPtrOutput added in v2.35.1

func (o DiskAttachmentPtrOutput) ToDiskAttachmentPtrOutput() DiskAttachmentPtrOutput

func (DiskAttachmentPtrOutput) ToDiskAttachmentPtrOutputWithContext added in v2.35.1

func (o DiskAttachmentPtrOutput) ToDiskAttachmentPtrOutputWithContext(ctx context.Context) DiskAttachmentPtrOutput

type DiskAttachmentState

type DiskAttachmentState struct {
	// The device name has been deprecated, and when attaching disk, it will be allocated automatically by system according to default order from /dev/xvdb to /dev/xvdz.
	//
	// Deprecated: Attribute device_name is deprecated on disk attachment resource. Suggest to remove it from your template.
	DeviceName pulumi.StringPtrInput
	// ID of the Disk to be attached.
	DiskId pulumi.StringPtrInput
	// ID of the Instance to attach to.
	InstanceId pulumi.StringPtrInput
}

func (DiskAttachmentState) ElementType

func (DiskAttachmentState) ElementType() reflect.Type

type DiskInput added in v2.25.1

type DiskInput interface {
	pulumi.Input

	ToDiskOutput() DiskOutput
	ToDiskOutputWithContext(ctx context.Context) DiskOutput
}

type DiskMap added in v2.35.1

type DiskMap map[string]DiskInput

func (DiskMap) ElementType added in v2.35.1

func (DiskMap) ElementType() reflect.Type

func (DiskMap) ToDiskMapOutput added in v2.35.1

func (i DiskMap) ToDiskMapOutput() DiskMapOutput

func (DiskMap) ToDiskMapOutputWithContext added in v2.35.1

func (i DiskMap) ToDiskMapOutputWithContext(ctx context.Context) DiskMapOutput

type DiskMapInput added in v2.35.1

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 added in v2.35.1

type DiskMapOutput struct{ *pulumi.OutputState }

func (DiskMapOutput) ElementType added in v2.35.1

func (DiskMapOutput) ElementType() reflect.Type

func (DiskMapOutput) MapIndex added in v2.35.1

func (DiskMapOutput) ToDiskMapOutput added in v2.35.1

func (o DiskMapOutput) ToDiskMapOutput() DiskMapOutput

func (DiskMapOutput) ToDiskMapOutputWithContext added in v2.35.1

func (o DiskMapOutput) ToDiskMapOutputWithContext(ctx context.Context) DiskMapOutput

type DiskOutput added in v2.25.1

type DiskOutput struct {
	*pulumi.OutputState
}

func (DiskOutput) ElementType added in v2.25.1

func (DiskOutput) ElementType() reflect.Type

func (DiskOutput) ToDiskOutput added in v2.25.1

func (o DiskOutput) ToDiskOutput() DiskOutput

func (DiskOutput) ToDiskOutputWithContext added in v2.25.1

func (o DiskOutput) ToDiskOutputWithContext(ctx context.Context) DiskOutput

func (DiskOutput) ToDiskPtrOutput added in v2.35.1

func (o DiskOutput) ToDiskPtrOutput() DiskPtrOutput

func (DiskOutput) ToDiskPtrOutputWithContext added in v2.35.1

func (o DiskOutput) ToDiskPtrOutputWithContext(ctx context.Context) DiskPtrOutput

type DiskPtrInput added in v2.35.1

type DiskPtrInput interface {
	pulumi.Input

	ToDiskPtrOutput() DiskPtrOutput
	ToDiskPtrOutputWithContext(ctx context.Context) DiskPtrOutput
}

type DiskPtrOutput added in v2.35.1

type DiskPtrOutput struct {
	*pulumi.OutputState
}

func (DiskPtrOutput) ElementType added in v2.35.1

func (DiskPtrOutput) ElementType() reflect.Type

func (DiskPtrOutput) ToDiskPtrOutput added in v2.35.1

func (o DiskPtrOutput) ToDiskPtrOutput() DiskPtrOutput

func (DiskPtrOutput) ToDiskPtrOutputWithContext added in v2.35.1

func (o DiskPtrOutput) ToDiskPtrOutputWithContext(ctx context.Context) DiskPtrOutput

type DiskState

type DiskState struct {
	// The Zone to create the disk in.
	AvailabilityZone pulumi.StringPtrInput
	// Category of the disk. Valid values are `cloud`, `cloudEfficiency`, `cloudSsd`, `cloudEssd`. Default is `cloudEfficiency`.
	Category pulumi.StringPtrInput
	// Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
	DeleteAutoSnapshot pulumi.BoolPtrInput
	// Indicates whether the disk is released together with the instance: Default value: false.
	DeleteWithInstance pulumi.BoolPtrInput
	// Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
	Description pulumi.StringPtrInput
	// Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
	EnableAutoSnapshot pulumi.BoolPtrInput
	// If true, the disk will be encrypted, conflict with `snapshotId`.
	Encrypted pulumi.BoolPtrInput
	// The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
	KmsKeyId pulumi.StringPtrInput
	// Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
	Name pulumi.StringPtrInput
	// Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
	// * `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
	// * `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
	// * `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
	PerformanceLevel pulumi.StringPtrInput
	// The Id of resource group which the disk belongs.
	// > **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloudEfficiency` and `cloudSsd` disk.
	ResourceGroupId pulumi.StringPtrInput
	// The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
	Size pulumi.IntPtrInput
	// A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
	SnapshotId pulumi.StringPtrInput
	// The disk status.
	Status pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
}

func (DiskState) ElementType

func (DiskState) ElementType() reflect.Type

type Eip

type Eip struct {
	pulumi.CustomResourceState

	// Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). If this value is not specified, then automatically sets it to 5 Mbps.
	Bandwidth pulumi.IntPtrOutput `pulumi:"bandwidth"`
	// Description of the EIP instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Elastic IP instance charge type. Valid values are "PrePaid" and "PostPaid". Default to "PostPaid".
	InstanceChargeType pulumi.StringPtrOutput `pulumi:"instanceChargeType"`
	// Internet charge type of the EIP, Valid values are `PayByBandwidth`, `PayByTraffic`. Default to `PayByBandwidth`. From version `1.7.1`, default to `PayByTraffic`. It is only PayByBandwidth when `instanceChargeType` is PrePaid.
	InternetChargeType pulumi.StringPtrOutput `pulumi:"internetChargeType"`
	// The elastic ip address
	IpAddress pulumi.StringOutput `pulumi:"ipAddress"`
	// The line type of the Elastic IP instance. Default to `BGP`. Other type of the isp need to open a whitelist.
	Isp pulumi.StringOutput `pulumi:"isp"`
	// The name of the EIP instance. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://.
	Name pulumi.StringOutput `pulumi:"name"`
	// The duration that you will buy the resource, in month. It is valid when `instanceChargeType` is `PrePaid`.
	// Default to 1. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console.
	Period pulumi.IntPtrOutput `pulumi:"period"`
	// The Id of resource group which the eip belongs.
	ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"`
	// The EIP current status.
	Status pulumi.StringOutput `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
}

## Import

Elastic IP address can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/eip:Eip example eip-abc12345678

```

func GetEip

func GetEip(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *EipState, opts ...pulumi.ResourceOption) (*Eip, error)

GetEip gets an existing Eip 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 NewEip

func NewEip(ctx *pulumi.Context,
	name string, args *EipArgs, opts ...pulumi.ResourceOption) (*Eip, error)

NewEip registers a new resource with the given unique name, arguments, and options.

func (*Eip) ElementType added in v2.25.1

func (*Eip) ElementType() reflect.Type

func (*Eip) ToEipOutput added in v2.25.1

func (i *Eip) ToEipOutput() EipOutput

func (*Eip) ToEipOutputWithContext added in v2.25.1

func (i *Eip) ToEipOutputWithContext(ctx context.Context) EipOutput

func (*Eip) ToEipPtrOutput added in v2.35.1

func (i *Eip) ToEipPtrOutput() EipPtrOutput

func (*Eip) ToEipPtrOutputWithContext added in v2.35.1

func (i *Eip) ToEipPtrOutputWithContext(ctx context.Context) EipPtrOutput

type EipArgs

type EipArgs struct {
	// Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). If this value is not specified, then automatically sets it to 5 Mbps.
	Bandwidth pulumi.IntPtrInput
	// Description of the EIP instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
	Description pulumi.StringPtrInput
	// Elastic IP instance charge type. Valid values are "PrePaid" and "PostPaid". Default to "PostPaid".
	InstanceChargeType pulumi.StringPtrInput
	// Internet charge type of the EIP, Valid values are `PayByBandwidth`, `PayByTraffic`. Default to `PayByBandwidth`. From version `1.7.1`, default to `PayByTraffic`. It is only PayByBandwidth when `instanceChargeType` is PrePaid.
	InternetChargeType pulumi.StringPtrInput
	// The line type of the Elastic IP instance. Default to `BGP`. Other type of the isp need to open a whitelist.
	Isp pulumi.StringPtrInput
	// The name of the EIP instance. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://.
	Name pulumi.StringPtrInput
	// The duration that you will buy the resource, in month. It is valid when `instanceChargeType` is `PrePaid`.
	// Default to 1. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console.
	Period pulumi.IntPtrInput
	// The Id of resource group which the eip belongs.
	ResourceGroupId pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
}

The set of arguments for constructing a Eip resource.

func (EipArgs) ElementType

func (EipArgs) ElementType() reflect.Type

type EipArray added in v2.35.1

type EipArray []EipInput

func (EipArray) ElementType added in v2.35.1

func (EipArray) ElementType() reflect.Type

func (EipArray) ToEipArrayOutput added in v2.35.1

func (i EipArray) ToEipArrayOutput() EipArrayOutput

func (EipArray) ToEipArrayOutputWithContext added in v2.35.1

func (i EipArray) ToEipArrayOutputWithContext(ctx context.Context) EipArrayOutput

type EipArrayInput added in v2.35.1

type EipArrayInput interface {
	pulumi.Input

	ToEipArrayOutput() EipArrayOutput
	ToEipArrayOutputWithContext(context.Context) EipArrayOutput
}

EipArrayInput is an input type that accepts EipArray and EipArrayOutput values. You can construct a concrete instance of `EipArrayInput` via:

EipArray{ EipArgs{...} }

type EipArrayOutput added in v2.35.1

type EipArrayOutput struct{ *pulumi.OutputState }

func (EipArrayOutput) ElementType added in v2.35.1

func (EipArrayOutput) ElementType() reflect.Type

func (EipArrayOutput) Index added in v2.35.1

func (EipArrayOutput) ToEipArrayOutput added in v2.35.1

func (o EipArrayOutput) ToEipArrayOutput() EipArrayOutput

func (EipArrayOutput) ToEipArrayOutputWithContext added in v2.35.1

func (o EipArrayOutput) ToEipArrayOutputWithContext(ctx context.Context) EipArrayOutput

type EipAssociation

type EipAssociation struct {
	pulumi.CustomResourceState

	// The allocation EIP ID.
	AllocationId pulumi.StringOutput `pulumi:"allocationId"`
	// When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default to `false`.
	Force pulumi.BoolPtrOutput `pulumi:"force"`
	// The ID of the ECS or SLB instance or Nat Gateway.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
	// The type of cloud product that the eip instance to bind.
	InstanceType pulumi.StringOutput `pulumi:"instanceType"`
	// The private IP address in the network segment of the vswitch which has been assigned.
	PrivateIpAddress pulumi.StringOutput `pulumi:"privateIpAddress"`
}

func GetEipAssociation

func GetEipAssociation(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *EipAssociationState, opts ...pulumi.ResourceOption) (*EipAssociation, error)

GetEipAssociation gets an existing EipAssociation 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 NewEipAssociation

func NewEipAssociation(ctx *pulumi.Context,
	name string, args *EipAssociationArgs, opts ...pulumi.ResourceOption) (*EipAssociation, error)

NewEipAssociation registers a new resource with the given unique name, arguments, and options.

func (*EipAssociation) ElementType added in v2.25.1

func (*EipAssociation) ElementType() reflect.Type

func (*EipAssociation) ToEipAssociationOutput added in v2.25.1

func (i *EipAssociation) ToEipAssociationOutput() EipAssociationOutput

func (*EipAssociation) ToEipAssociationOutputWithContext added in v2.25.1

func (i *EipAssociation) ToEipAssociationOutputWithContext(ctx context.Context) EipAssociationOutput

func (*EipAssociation) ToEipAssociationPtrOutput added in v2.35.1

func (i *EipAssociation) ToEipAssociationPtrOutput() EipAssociationPtrOutput

func (*EipAssociation) ToEipAssociationPtrOutputWithContext added in v2.35.1

func (i *EipAssociation) ToEipAssociationPtrOutputWithContext(ctx context.Context) EipAssociationPtrOutput

type EipAssociationArgs

type EipAssociationArgs struct {
	// The allocation EIP ID.
	AllocationId pulumi.StringInput
	// When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default to `false`.
	Force pulumi.BoolPtrInput
	// The ID of the ECS or SLB instance or Nat Gateway.
	InstanceId pulumi.StringInput
	// The type of cloud product that the eip instance to bind.
	InstanceType pulumi.StringPtrInput
	// The private IP address in the network segment of the vswitch which has been assigned.
	PrivateIpAddress pulumi.StringPtrInput
}

The set of arguments for constructing a EipAssociation resource.

func (EipAssociationArgs) ElementType

func (EipAssociationArgs) ElementType() reflect.Type

type EipAssociationArray added in v2.35.1

type EipAssociationArray []EipAssociationInput

func (EipAssociationArray) ElementType added in v2.35.1

func (EipAssociationArray) ElementType() reflect.Type

func (EipAssociationArray) ToEipAssociationArrayOutput added in v2.35.1

func (i EipAssociationArray) ToEipAssociationArrayOutput() EipAssociationArrayOutput

func (EipAssociationArray) ToEipAssociationArrayOutputWithContext added in v2.35.1

func (i EipAssociationArray) ToEipAssociationArrayOutputWithContext(ctx context.Context) EipAssociationArrayOutput

type EipAssociationArrayInput added in v2.35.1

type EipAssociationArrayInput interface {
	pulumi.Input

	ToEipAssociationArrayOutput() EipAssociationArrayOutput
	ToEipAssociationArrayOutputWithContext(context.Context) EipAssociationArrayOutput
}

EipAssociationArrayInput is an input type that accepts EipAssociationArray and EipAssociationArrayOutput values. You can construct a concrete instance of `EipAssociationArrayInput` via:

EipAssociationArray{ EipAssociationArgs{...} }

type EipAssociationArrayOutput added in v2.35.1

type EipAssociationArrayOutput struct{ *pulumi.OutputState }

func (EipAssociationArrayOutput) ElementType added in v2.35.1

func (EipAssociationArrayOutput) ElementType() reflect.Type

func (EipAssociationArrayOutput) Index added in v2.35.1

func (EipAssociationArrayOutput) ToEipAssociationArrayOutput added in v2.35.1

func (o EipAssociationArrayOutput) ToEipAssociationArrayOutput() EipAssociationArrayOutput

func (EipAssociationArrayOutput) ToEipAssociationArrayOutputWithContext added in v2.35.1

func (o EipAssociationArrayOutput) ToEipAssociationArrayOutputWithContext(ctx context.Context) EipAssociationArrayOutput

type EipAssociationInput added in v2.25.1

type EipAssociationInput interface {
	pulumi.Input

	ToEipAssociationOutput() EipAssociationOutput
	ToEipAssociationOutputWithContext(ctx context.Context) EipAssociationOutput
}

type EipAssociationMap added in v2.35.1

type EipAssociationMap map[string]EipAssociationInput

func (EipAssociationMap) ElementType added in v2.35.1

func (EipAssociationMap) ElementType() reflect.Type

func (EipAssociationMap) ToEipAssociationMapOutput added in v2.35.1

func (i EipAssociationMap) ToEipAssociationMapOutput() EipAssociationMapOutput

func (EipAssociationMap) ToEipAssociationMapOutputWithContext added in v2.35.1

func (i EipAssociationMap) ToEipAssociationMapOutputWithContext(ctx context.Context) EipAssociationMapOutput

type EipAssociationMapInput added in v2.35.1

type EipAssociationMapInput interface {
	pulumi.Input

	ToEipAssociationMapOutput() EipAssociationMapOutput
	ToEipAssociationMapOutputWithContext(context.Context) EipAssociationMapOutput
}

EipAssociationMapInput is an input type that accepts EipAssociationMap and EipAssociationMapOutput values. You can construct a concrete instance of `EipAssociationMapInput` via:

EipAssociationMap{ "key": EipAssociationArgs{...} }

type EipAssociationMapOutput added in v2.35.1

type EipAssociationMapOutput struct{ *pulumi.OutputState }

func (EipAssociationMapOutput) ElementType added in v2.35.1

func (EipAssociationMapOutput) ElementType() reflect.Type

func (EipAssociationMapOutput) MapIndex added in v2.35.1

func (EipAssociationMapOutput) ToEipAssociationMapOutput added in v2.35.1

func (o EipAssociationMapOutput) ToEipAssociationMapOutput() EipAssociationMapOutput

func (EipAssociationMapOutput) ToEipAssociationMapOutputWithContext added in v2.35.1

func (o EipAssociationMapOutput) ToEipAssociationMapOutputWithContext(ctx context.Context) EipAssociationMapOutput

type EipAssociationOutput added in v2.25.1

type EipAssociationOutput struct {
	*pulumi.OutputState
}

func (EipAssociationOutput) ElementType added in v2.25.1

func (EipAssociationOutput) ElementType() reflect.Type

func (EipAssociationOutput) ToEipAssociationOutput added in v2.25.1

func (o EipAssociationOutput) ToEipAssociationOutput() EipAssociationOutput

func (EipAssociationOutput) ToEipAssociationOutputWithContext added in v2.25.1

func (o EipAssociationOutput) ToEipAssociationOutputWithContext(ctx context.Context) EipAssociationOutput

func (EipAssociationOutput) ToEipAssociationPtrOutput added in v2.35.1

func (o EipAssociationOutput) ToEipAssociationPtrOutput() EipAssociationPtrOutput

func (EipAssociationOutput) ToEipAssociationPtrOutputWithContext added in v2.35.1

func (o EipAssociationOutput) ToEipAssociationPtrOutputWithContext(ctx context.Context) EipAssociationPtrOutput

type EipAssociationPtrInput added in v2.35.1

type EipAssociationPtrInput interface {
	pulumi.Input

	ToEipAssociationPtrOutput() EipAssociationPtrOutput
	ToEipAssociationPtrOutputWithContext(ctx context.Context) EipAssociationPtrOutput
}

type EipAssociationPtrOutput added in v2.35.1

type EipAssociationPtrOutput struct {
	*pulumi.OutputState
}

func (EipAssociationPtrOutput) ElementType added in v2.35.1

func (EipAssociationPtrOutput) ElementType() reflect.Type

func (EipAssociationPtrOutput) ToEipAssociationPtrOutput added in v2.35.1

func (o EipAssociationPtrOutput) ToEipAssociationPtrOutput() EipAssociationPtrOutput

func (EipAssociationPtrOutput) ToEipAssociationPtrOutputWithContext added in v2.35.1

func (o EipAssociationPtrOutput) ToEipAssociationPtrOutputWithContext(ctx context.Context) EipAssociationPtrOutput

type EipAssociationState

type EipAssociationState struct {
	// The allocation EIP ID.
	AllocationId pulumi.StringPtrInput
	// When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default to `false`.
	Force pulumi.BoolPtrInput
	// The ID of the ECS or SLB instance or Nat Gateway.
	InstanceId pulumi.StringPtrInput
	// The type of cloud product that the eip instance to bind.
	InstanceType pulumi.StringPtrInput
	// The private IP address in the network segment of the vswitch which has been assigned.
	PrivateIpAddress pulumi.StringPtrInput
}

func (EipAssociationState) ElementType

func (EipAssociationState) ElementType() reflect.Type

type EipInput added in v2.25.1

type EipInput interface {
	pulumi.Input

	ToEipOutput() EipOutput
	ToEipOutputWithContext(ctx context.Context) EipOutput
}

type EipMap added in v2.35.1

type EipMap map[string]EipInput

func (EipMap) ElementType added in v2.35.1

func (EipMap) ElementType() reflect.Type

func (EipMap) ToEipMapOutput added in v2.35.1

func (i EipMap) ToEipMapOutput() EipMapOutput

func (EipMap) ToEipMapOutputWithContext added in v2.35.1

func (i EipMap) ToEipMapOutputWithContext(ctx context.Context) EipMapOutput

type EipMapInput added in v2.35.1

type EipMapInput interface {
	pulumi.Input

	ToEipMapOutput() EipMapOutput
	ToEipMapOutputWithContext(context.Context) EipMapOutput
}

EipMapInput is an input type that accepts EipMap and EipMapOutput values. You can construct a concrete instance of `EipMapInput` via:

EipMap{ "key": EipArgs{...} }

type EipMapOutput added in v2.35.1

type EipMapOutput struct{ *pulumi.OutputState }

func (EipMapOutput) ElementType added in v2.35.1

func (EipMapOutput) ElementType() reflect.Type

func (EipMapOutput) MapIndex added in v2.35.1

func (o EipMapOutput) MapIndex(k pulumi.StringInput) EipOutput

func (EipMapOutput) ToEipMapOutput added in v2.35.1

func (o EipMapOutput) ToEipMapOutput() EipMapOutput

func (EipMapOutput) ToEipMapOutputWithContext added in v2.35.1

func (o EipMapOutput) ToEipMapOutputWithContext(ctx context.Context) EipMapOutput

type EipOutput added in v2.25.1

type EipOutput struct {
	*pulumi.OutputState
}

func (EipOutput) ElementType added in v2.25.1

func (EipOutput) ElementType() reflect.Type

func (EipOutput) ToEipOutput added in v2.25.1

func (o EipOutput) ToEipOutput() EipOutput

func (EipOutput) ToEipOutputWithContext added in v2.25.1

func (o EipOutput) ToEipOutputWithContext(ctx context.Context) EipOutput

func (EipOutput) ToEipPtrOutput added in v2.35.1

func (o EipOutput) ToEipPtrOutput() EipPtrOutput

func (EipOutput) ToEipPtrOutputWithContext added in v2.35.1

func (o EipOutput) ToEipPtrOutputWithContext(ctx context.Context) EipPtrOutput

type EipPtrInput added in v2.35.1

type EipPtrInput interface {
	pulumi.Input

	ToEipPtrOutput() EipPtrOutput
	ToEipPtrOutputWithContext(ctx context.Context) EipPtrOutput
}

type EipPtrOutput added in v2.35.1

type EipPtrOutput struct {
	*pulumi.OutputState
}

func (EipPtrOutput) ElementType added in v2.35.1

func (EipPtrOutput) ElementType() reflect.Type

func (EipPtrOutput) ToEipPtrOutput added in v2.35.1

func (o EipPtrOutput) ToEipPtrOutput() EipPtrOutput

func (EipPtrOutput) ToEipPtrOutputWithContext added in v2.35.1

func (o EipPtrOutput) ToEipPtrOutputWithContext(ctx context.Context) EipPtrOutput

type EipState

type EipState struct {
	// Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). If this value is not specified, then automatically sets it to 5 Mbps.
	Bandwidth pulumi.IntPtrInput
	// Description of the EIP instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
	Description pulumi.StringPtrInput
	// Elastic IP instance charge type. Valid values are "PrePaid" and "PostPaid". Default to "PostPaid".
	InstanceChargeType pulumi.StringPtrInput
	// Internet charge type of the EIP, Valid values are `PayByBandwidth`, `PayByTraffic`. Default to `PayByBandwidth`. From version `1.7.1`, default to `PayByTraffic`. It is only PayByBandwidth when `instanceChargeType` is PrePaid.
	InternetChargeType pulumi.StringPtrInput
	// The elastic ip address
	IpAddress pulumi.StringPtrInput
	// The line type of the Elastic IP instance. Default to `BGP`. Other type of the isp need to open a whitelist.
	Isp pulumi.StringPtrInput
	// The name of the EIP instance. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://.
	Name pulumi.StringPtrInput
	// The duration that you will buy the resource, in month. It is valid when `instanceChargeType` is `PrePaid`.
	// Default to 1. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console.
	Period pulumi.IntPtrInput
	// The Id of resource group which the eip belongs.
	ResourceGroupId pulumi.StringPtrInput
	// The EIP current status.
	Status pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
}

func (EipState) ElementType

func (EipState) ElementType() reflect.Type

type GetDedicatedHostsArgs added in v2.13.0

type GetDedicatedHostsArgs struct {
	// The ID of ECS Dedicated Host.
	DedicatedHostId *string `pulumi:"dedicatedHostId"`
	// The name of ECS Dedicated Host.
	DedicatedHostName *string `pulumi:"dedicatedHostName"`
	// The type of the dedicated host.
	DedicatedHostType *string `pulumi:"dedicatedHostType"`
	// A list of ECS Dedicated Host ids.
	Ids []string `pulumi:"ids"`
	// A regex string to filter results by the ECS Dedicated Host name.
	NameRegex *string `pulumi:"nameRegex"`
	// Save the result to the file.
	OutputFile *string `pulumi:"outputFile"`
	// The ID of the resource group to which the ECS Dedicated Host belongs.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// The status of the ECS Dedicated Host. validate value: `Available`, `Creating`, `PermanentFailure`, `Released`, `UnderAssessment`.
	Status *string `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
	// The zone ID of the ECS Dedicated Host.
	ZoneId *string `pulumi:"zoneId"`
}

A collection of arguments for invoking getDedicatedHosts.

type GetDedicatedHostsHost added in v2.13.0

type GetDedicatedHostsHost struct {
	// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online.
	ActionOnMaintenance string `pulumi:"actionOnMaintenance"`
	// Specifies whether to add the dedicated host to the resource pool for automatic deployment.
	AutoPlacement string `pulumi:"autoPlacement"`
	// The automatic release time of the dedicated host.
	AutoReleaseTime string `pulumi:"autoReleaseTime"`
	// A mapping of tags to assign to the resource.
	Cores int `pulumi:"cores"`
	// The ID of ECS Dedicated Host.
	DedicatedHostId string `pulumi:"dedicatedHostId"`
	// The name of ECS Dedicated Host.
	DedicatedHostName string `pulumi:"dedicatedHostName"`
	// The type of the dedicated host.
	DedicatedHostType string `pulumi:"dedicatedHostType"`
	// The description of the dedicated host.
	Description string `pulumi:"description"`
	// The expiration time of the subscription dedicated host.
	ExpiredTime string `pulumi:"expiredTime"`
	// The GPU model.
	GpuSpec string `pulumi:"gpuSpec"`
	// ID of the ECS Dedicated Host.
	Id string `pulumi:"id"`
	// The machine code of the dedicated host.
	MachineId string `pulumi:"machineId"`
	// The billing method of the dedicated host.
	PaymentType string `pulumi:"paymentType"`
	// The number of physical GPUs.
	PhysicalGpus int `pulumi:"physicalGpus"`
	// The ID of the resource group to which the ECS Dedicated Host belongs.
	ResourceGroupId string `pulumi:"resourceGroupId"`
	// The unit of the subscription billing method.
	SaleCycle string `pulumi:"saleCycle"`
	// The number of physical CPUs.
	Sockets int `pulumi:"sockets"`
	// The status of the ECS Dedicated Host. validate value: `Available`, `Creating`, `PermanentFailure`, `Released`, `UnderAssessment`.
	Status string `pulumi:"status"`
	// The list of ECS instanc
	SupportedInstanceTypesLists []string `pulumi:"supportedInstanceTypesLists"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
	// The zone ID of the ECS Dedicated Host.
	ZoneId string `pulumi:"zoneId"`
}

type GetDedicatedHostsHostArgs added in v2.13.0

type GetDedicatedHostsHostArgs struct {
	// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online.
	ActionOnMaintenance pulumi.StringInput `pulumi:"actionOnMaintenance"`
	// Specifies whether to add the dedicated host to the resource pool for automatic deployment.
	AutoPlacement pulumi.StringInput `pulumi:"autoPlacement"`
	// The automatic release time of the dedicated host.
	AutoReleaseTime pulumi.StringInput `pulumi:"autoReleaseTime"`
	// A mapping of tags to assign to the resource.
	Cores pulumi.IntInput `pulumi:"cores"`
	// The ID of ECS Dedicated Host.
	DedicatedHostId pulumi.StringInput `pulumi:"dedicatedHostId"`
	// The name of ECS Dedicated Host.
	DedicatedHostName pulumi.StringInput `pulumi:"dedicatedHostName"`
	// The type of the dedicated host.
	DedicatedHostType pulumi.StringInput `pulumi:"dedicatedHostType"`
	// The description of the dedicated host.
	Description pulumi.StringInput `pulumi:"description"`
	// The expiration time of the subscription dedicated host.
	ExpiredTime pulumi.StringInput `pulumi:"expiredTime"`
	// The GPU model.
	GpuSpec pulumi.StringInput `pulumi:"gpuSpec"`
	// ID of the ECS Dedicated Host.
	Id pulumi.StringInput `pulumi:"id"`
	// The machine code of the dedicated host.
	MachineId pulumi.StringInput `pulumi:"machineId"`
	// The billing method of the dedicated host.
	PaymentType pulumi.StringInput `pulumi:"paymentType"`
	// The number of physical GPUs.
	PhysicalGpus pulumi.IntInput `pulumi:"physicalGpus"`
	// The ID of the resource group to which the ECS Dedicated Host belongs.
	ResourceGroupId pulumi.StringInput `pulumi:"resourceGroupId"`
	// The unit of the subscription billing method.
	SaleCycle pulumi.StringInput `pulumi:"saleCycle"`
	// The number of physical CPUs.
	Sockets pulumi.IntInput `pulumi:"sockets"`
	// The status of the ECS Dedicated Host. validate value: `Available`, `Creating`, `PermanentFailure`, `Released`, `UnderAssessment`.
	Status pulumi.StringInput `pulumi:"status"`
	// The list of ECS instanc
	SupportedInstanceTypesLists pulumi.StringArrayInput `pulumi:"supportedInstanceTypesLists"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput `pulumi:"tags"`
	// The zone ID of the ECS Dedicated Host.
	ZoneId pulumi.StringInput `pulumi:"zoneId"`
}

func (GetDedicatedHostsHostArgs) ElementType added in v2.13.0

func (GetDedicatedHostsHostArgs) ElementType() reflect.Type

func (GetDedicatedHostsHostArgs) ToGetDedicatedHostsHostOutput added in v2.13.0

func (i GetDedicatedHostsHostArgs) ToGetDedicatedHostsHostOutput() GetDedicatedHostsHostOutput

func (GetDedicatedHostsHostArgs) ToGetDedicatedHostsHostOutputWithContext added in v2.13.0

func (i GetDedicatedHostsHostArgs) ToGetDedicatedHostsHostOutputWithContext(ctx context.Context) GetDedicatedHostsHostOutput

type GetDedicatedHostsHostArray added in v2.13.0

type GetDedicatedHostsHostArray []GetDedicatedHostsHostInput

func (GetDedicatedHostsHostArray) ElementType added in v2.13.0

func (GetDedicatedHostsHostArray) ElementType() reflect.Type

func (GetDedicatedHostsHostArray) ToGetDedicatedHostsHostArrayOutput added in v2.13.0

func (i GetDedicatedHostsHostArray) ToGetDedicatedHostsHostArrayOutput() GetDedicatedHostsHostArrayOutput

func (GetDedicatedHostsHostArray) ToGetDedicatedHostsHostArrayOutputWithContext added in v2.13.0

func (i GetDedicatedHostsHostArray) ToGetDedicatedHostsHostArrayOutputWithContext(ctx context.Context) GetDedicatedHostsHostArrayOutput

type GetDedicatedHostsHostArrayInput added in v2.13.0

type GetDedicatedHostsHostArrayInput interface {
	pulumi.Input

	ToGetDedicatedHostsHostArrayOutput() GetDedicatedHostsHostArrayOutput
	ToGetDedicatedHostsHostArrayOutputWithContext(context.Context) GetDedicatedHostsHostArrayOutput
}

GetDedicatedHostsHostArrayInput is an input type that accepts GetDedicatedHostsHostArray and GetDedicatedHostsHostArrayOutput values. You can construct a concrete instance of `GetDedicatedHostsHostArrayInput` via:

GetDedicatedHostsHostArray{ GetDedicatedHostsHostArgs{...} }

type GetDedicatedHostsHostArrayOutput added in v2.13.0

type GetDedicatedHostsHostArrayOutput struct{ *pulumi.OutputState }

func (GetDedicatedHostsHostArrayOutput) ElementType added in v2.13.0

func (GetDedicatedHostsHostArrayOutput) Index added in v2.13.0

func (GetDedicatedHostsHostArrayOutput) ToGetDedicatedHostsHostArrayOutput added in v2.13.0

func (o GetDedicatedHostsHostArrayOutput) ToGetDedicatedHostsHostArrayOutput() GetDedicatedHostsHostArrayOutput

func (GetDedicatedHostsHostArrayOutput) ToGetDedicatedHostsHostArrayOutputWithContext added in v2.13.0

func (o GetDedicatedHostsHostArrayOutput) ToGetDedicatedHostsHostArrayOutputWithContext(ctx context.Context) GetDedicatedHostsHostArrayOutput

type GetDedicatedHostsHostInput added in v2.13.0

type GetDedicatedHostsHostInput interface {
	pulumi.Input

	ToGetDedicatedHostsHostOutput() GetDedicatedHostsHostOutput
	ToGetDedicatedHostsHostOutputWithContext(context.Context) GetDedicatedHostsHostOutput
}

GetDedicatedHostsHostInput is an input type that accepts GetDedicatedHostsHostArgs and GetDedicatedHostsHostOutput values. You can construct a concrete instance of `GetDedicatedHostsHostInput` via:

GetDedicatedHostsHostArgs{...}

type GetDedicatedHostsHostOutput added in v2.13.0

type GetDedicatedHostsHostOutput struct{ *pulumi.OutputState }

func (GetDedicatedHostsHostOutput) ActionOnMaintenance added in v2.13.0

func (o GetDedicatedHostsHostOutput) ActionOnMaintenance() pulumi.StringOutput

The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online.

func (GetDedicatedHostsHostOutput) AutoPlacement added in v2.13.0

Specifies whether to add the dedicated host to the resource pool for automatic deployment.

func (GetDedicatedHostsHostOutput) AutoReleaseTime added in v2.13.0

func (o GetDedicatedHostsHostOutput) AutoReleaseTime() pulumi.StringOutput

The automatic release time of the dedicated host.

func (GetDedicatedHostsHostOutput) Cores added in v2.13.0

A mapping of tags to assign to the resource.

func (GetDedicatedHostsHostOutput) DedicatedHostId added in v2.13.0

func (o GetDedicatedHostsHostOutput) DedicatedHostId() pulumi.StringOutput

The ID of ECS Dedicated Host.

func (GetDedicatedHostsHostOutput) DedicatedHostName added in v2.13.0

func (o GetDedicatedHostsHostOutput) DedicatedHostName() pulumi.StringOutput

The name of ECS Dedicated Host.

func (GetDedicatedHostsHostOutput) DedicatedHostType added in v2.13.0

func (o GetDedicatedHostsHostOutput) DedicatedHostType() pulumi.StringOutput

The type of the dedicated host.

func (GetDedicatedHostsHostOutput) Description added in v2.13.0

The description of the dedicated host.

func (GetDedicatedHostsHostOutput) ElementType added in v2.13.0

func (GetDedicatedHostsHostOutput) ExpiredTime added in v2.13.0

The expiration time of the subscription dedicated host.

func (GetDedicatedHostsHostOutput) GpuSpec added in v2.13.0

The GPU model.

func (GetDedicatedHostsHostOutput) Id added in v2.13.0

ID of the ECS Dedicated Host.

func (GetDedicatedHostsHostOutput) MachineId added in v2.13.0

The machine code of the dedicated host.

func (GetDedicatedHostsHostOutput) PaymentType added in v2.13.0

The billing method of the dedicated host.

func (GetDedicatedHostsHostOutput) PhysicalGpus added in v2.13.0

func (o GetDedicatedHostsHostOutput) PhysicalGpus() pulumi.IntOutput

The number of physical GPUs.

func (GetDedicatedHostsHostOutput) ResourceGroupId added in v2.13.0

func (o GetDedicatedHostsHostOutput) ResourceGroupId() pulumi.StringOutput

The ID of the resource group to which the ECS Dedicated Host belongs.

func (GetDedicatedHostsHostOutput) SaleCycle added in v2.13.0

The unit of the subscription billing method.

func (GetDedicatedHostsHostOutput) Sockets added in v2.13.0

The number of physical CPUs.

func (GetDedicatedHostsHostOutput) Status added in v2.13.0

The status of the ECS Dedicated Host. validate value: `Available`, `Creating`, `PermanentFailure`, `Released`, `UnderAssessment`.

func (GetDedicatedHostsHostOutput) SupportedInstanceTypesLists added in v2.13.0

func (o GetDedicatedHostsHostOutput) SupportedInstanceTypesLists() pulumi.StringArrayOutput

The list of ECS instanc

func (GetDedicatedHostsHostOutput) Tags added in v2.13.0

A mapping of tags to assign to the resource.

func (GetDedicatedHostsHostOutput) ToGetDedicatedHostsHostOutput added in v2.13.0

func (o GetDedicatedHostsHostOutput) ToGetDedicatedHostsHostOutput() GetDedicatedHostsHostOutput

func (GetDedicatedHostsHostOutput) ToGetDedicatedHostsHostOutputWithContext added in v2.13.0

func (o GetDedicatedHostsHostOutput) ToGetDedicatedHostsHostOutputWithContext(ctx context.Context) GetDedicatedHostsHostOutput

func (GetDedicatedHostsHostOutput) ZoneId added in v2.13.0

The zone ID of the ECS Dedicated Host.

type GetDedicatedHostsResult added in v2.13.0

type GetDedicatedHostsResult struct {
	// ID of the ECS Dedicated Host.
	DedicatedHostId *string `pulumi:"dedicatedHostId"`
	// The name of the dedicated host.
	DedicatedHostName *string `pulumi:"dedicatedHostName"`
	// The type of the dedicated host.
	DedicatedHostType *string `pulumi:"dedicatedHostType"`
	// A list of ECS Dedicated Hosts. Each element contains the following attributes:
	Hosts []GetDedicatedHostsHost `pulumi:"hosts"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of ECS Dedicated Host ids.
	Ids       []string `pulumi:"ids"`
	NameRegex *string  `pulumi:"nameRegex"`
	// A list of ECS Dedicated Host names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	// The ID of the resource group to which the dedicated host belongs.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// The service status of the dedicated host.
	Status *string                `pulumi:"status"`
	Tags   map[string]interface{} `pulumi:"tags"`
	ZoneId *string                `pulumi:"zoneId"`
}

A collection of values returned by getDedicatedHosts.

func GetDedicatedHosts added in v2.13.0

func GetDedicatedHosts(ctx *pulumi.Context, args *GetDedicatedHostsArgs, opts ...pulumi.InvokeOption) (*GetDedicatedHostsResult, error)

This data source provides a list of ECS Dedicated Hosts in an Alibaba Cloud account according to the specified filters.

> **NOTE:** Available in v1.91.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "ddh.g5"
		opt1 := "tf-testAcc"
		opt2 := "Available"
		dedicatedHostsDs, err := ecs.GetDedicatedHosts(ctx, &ecs.GetDedicatedHostsArgs{
			DedicatedHostType: &opt0,
			NameRegex:         &opt1,
			Status:            &opt2,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstDedicatedHostsId", dedicatedHostsDs.Hosts[0].Id)
		return nil
	})
}

```

type GetDisksArgs

type GetDisksArgs struct {
	// Disk category. Possible values: `cloud` (basic cloud disk), `cloudEfficiency` (ultra cloud disk), `ephemeralSsd` (local SSD cloud disk), `cloudSsd` (SSD cloud disk), and `cloudEssd` (ESSD cloud disk).
	Category *string `pulumi:"category"`
	// Indicate whether the disk is encrypted or not. Possible values: `on` and `off`.
	Encrypted *string `pulumi:"encrypted"`
	// A list of disks IDs.
	Ids []string `pulumi:"ids"`
	// Filter the results by the specified ECS instance ID.
	InstanceId *string `pulumi:"instanceId"`
	// A regex string to filter results by disk name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// The Id of resource group which the disk belongs.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// A map of tags assigned to the disks. It must be in the format:
	// “`go
	// package main
	//
	// import (
	// 	"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
	// 	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
	// )
	//
	// func main() {
	// 	pulumi.Run(func(ctx *pulumi.Context) error {
	// 		_, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{
	// 			Tags: map[string]interface{}{
	// 				"tagKey1": "tagValue1",
	// 				"tagKey2": "tagValue2",
	// 			},
	// 		}, nil)
	// 		if err != nil {
	// 			return err
	// 		}
	// 		return nil
	// 	})
	// }
	// “`
	Tags map[string]interface{} `pulumi:"tags"`
	// Disk type. Possible values: `system` and `data`.
	Type *string `pulumi:"type"`
}

A collection of arguments for invoking getDisks.

type GetDisksDisk

type GetDisksDisk struct {
	// Disk attachment time.
	AttachedTime string `pulumi:"attachedTime"`
	// Availability zone of the disk.
	AvailabilityZone string `pulumi:"availabilityZone"`
	// Disk category. Possible values: `cloud` (basic cloud disk), `cloudEfficiency` (ultra cloud disk), `ephemeralSsd` (local SSD cloud disk), `cloudSsd` (SSD cloud disk), and `cloudEssd` (ESSD cloud disk).
	Category string `pulumi:"category"`
	// Disk creation time.
	CreationTime string `pulumi:"creationTime"`
	// Disk description.
	Description string `pulumi:"description"`
	// Disk detachment time.
	DetachedTime string `pulumi:"detachedTime"`
	// Indicate whether the disk is encrypted or not. Possible values: `on` and `off`.
	Encrypted string `pulumi:"encrypted"`
	// Disk expiration time.
	ExpirationTime string `pulumi:"expirationTime"`
	// ID of the disk.
	Id string `pulumi:"id"`
	// ID of the image from which the disk is created. It is null unless the disk is created using an image.
	ImageId string `pulumi:"imageId"`
	// Filter the results by the specified ECS instance ID.
	InstanceId string `pulumi:"instanceId"`
	// Disk name.
	Name string `pulumi:"name"`
	// Region ID the disk belongs to.
	RegionId string `pulumi:"regionId"`
	// The Id of resource group which the disk belongs.
	ResourceGroupId string `pulumi:"resourceGroupId"`
	// Disk size in GiB.
	Size int `pulumi:"size"`
	// Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
	SnapshotId string `pulumi:"snapshotId"`
	// Current status. Possible values: `In_use`, `Available`, `Attaching`, `Detaching`, `Creating` and `ReIniting`.
	Status string `pulumi:"status"`
	// A map of tags assigned to the disks. It must be in the format:
	// “`go
	// package main
	//
	// import (
	// 	"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
	// 	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
	// )
	//
	// func main() {
	// 	pulumi.Run(func(ctx *pulumi.Context) error {
	// 		_, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{
	// 			Tags: map[string]interface{}{
	// 				"tagKey1": "tagValue1",
	// 				"tagKey2": "tagValue2",
	// 			},
	// 		}, nil)
	// 		if err != nil {
	// 			return err
	// 		}
	// 		return nil
	// 	})
	// }
	// “`
	Tags map[string]interface{} `pulumi:"tags"`
	// Disk type. Possible values: `system` and `data`.
	Type string `pulumi:"type"`
}

type GetDisksDiskArgs

type GetDisksDiskArgs struct {
	// Disk attachment time.
	AttachedTime pulumi.StringInput `pulumi:"attachedTime"`
	// Availability zone of the disk.
	AvailabilityZone pulumi.StringInput `pulumi:"availabilityZone"`
	// Disk category. Possible values: `cloud` (basic cloud disk), `cloudEfficiency` (ultra cloud disk), `ephemeralSsd` (local SSD cloud disk), `cloudSsd` (SSD cloud disk), and `cloudEssd` (ESSD cloud disk).
	Category pulumi.StringInput `pulumi:"category"`
	// Disk creation time.
	CreationTime pulumi.StringInput `pulumi:"creationTime"`
	// Disk description.
	Description pulumi.StringInput `pulumi:"description"`
	// Disk detachment time.
	DetachedTime pulumi.StringInput `pulumi:"detachedTime"`
	// Indicate whether the disk is encrypted or not. Possible values: `on` and `off`.
	Encrypted pulumi.StringInput `pulumi:"encrypted"`
	// Disk expiration time.
	ExpirationTime pulumi.StringInput `pulumi:"expirationTime"`
	// ID of the disk.
	Id pulumi.StringInput `pulumi:"id"`
	// ID of the image from which the disk is created. It is null unless the disk is created using an image.
	ImageId pulumi.StringInput `pulumi:"imageId"`
	// Filter the results by the specified ECS instance ID.
	InstanceId pulumi.StringInput `pulumi:"instanceId"`
	// Disk name.
	Name pulumi.StringInput `pulumi:"name"`
	// Region ID the disk belongs to.
	RegionId pulumi.StringInput `pulumi:"regionId"`
	// The Id of resource group which the disk belongs.
	ResourceGroupId pulumi.StringInput `pulumi:"resourceGroupId"`
	// Disk size in GiB.
	Size pulumi.IntInput `pulumi:"size"`
	// Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
	SnapshotId pulumi.StringInput `pulumi:"snapshotId"`
	// Current status. Possible values: `In_use`, `Available`, `Attaching`, `Detaching`, `Creating` and `ReIniting`.
	Status pulumi.StringInput `pulumi:"status"`
	// A map of tags assigned to the disks. It must be in the format:
	// “`go
	// package main
	//
	// import (
	// 	"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
	// 	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
	// )
	//
	// func main() {
	// 	pulumi.Run(func(ctx *pulumi.Context) error {
	// 		_, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{
	// 			Tags: map[string]interface{}{
	// 				"tagKey1": "tagValue1",
	// 				"tagKey2": "tagValue2",
	// 			},
	// 		}, nil)
	// 		if err != nil {
	// 			return err
	// 		}
	// 		return nil
	// 	})
	// }
	// “`
	Tags pulumi.MapInput `pulumi:"tags"`
	// Disk type. Possible values: `system` and `data`.
	Type pulumi.StringInput `pulumi:"type"`
}

func (GetDisksDiskArgs) ElementType

func (GetDisksDiskArgs) ElementType() reflect.Type

func (GetDisksDiskArgs) ToGetDisksDiskOutput

func (i GetDisksDiskArgs) ToGetDisksDiskOutput() GetDisksDiskOutput

func (GetDisksDiskArgs) ToGetDisksDiskOutputWithContext

func (i GetDisksDiskArgs) ToGetDisksDiskOutputWithContext(ctx context.Context) GetDisksDiskOutput

type GetDisksDiskArray

type GetDisksDiskArray []GetDisksDiskInput

func (GetDisksDiskArray) ElementType

func (GetDisksDiskArray) ElementType() reflect.Type

func (GetDisksDiskArray) ToGetDisksDiskArrayOutput

func (i GetDisksDiskArray) ToGetDisksDiskArrayOutput() GetDisksDiskArrayOutput

func (GetDisksDiskArray) ToGetDisksDiskArrayOutputWithContext

func (i GetDisksDiskArray) ToGetDisksDiskArrayOutputWithContext(ctx context.Context) GetDisksDiskArrayOutput

type GetDisksDiskArrayInput

type GetDisksDiskArrayInput interface {
	pulumi.Input

	ToGetDisksDiskArrayOutput() GetDisksDiskArrayOutput
	ToGetDisksDiskArrayOutputWithContext(context.Context) GetDisksDiskArrayOutput
}

GetDisksDiskArrayInput is an input type that accepts GetDisksDiskArray and GetDisksDiskArrayOutput values. You can construct a concrete instance of `GetDisksDiskArrayInput` via:

GetDisksDiskArray{ GetDisksDiskArgs{...} }

type GetDisksDiskArrayOutput

type GetDisksDiskArrayOutput struct{ *pulumi.OutputState }

func (GetDisksDiskArrayOutput) ElementType

func (GetDisksDiskArrayOutput) ElementType() reflect.Type

func (GetDisksDiskArrayOutput) Index

func (GetDisksDiskArrayOutput) ToGetDisksDiskArrayOutput

func (o GetDisksDiskArrayOutput) ToGetDisksDiskArrayOutput() GetDisksDiskArrayOutput

func (GetDisksDiskArrayOutput) ToGetDisksDiskArrayOutputWithContext

func (o GetDisksDiskArrayOutput) ToGetDisksDiskArrayOutputWithContext(ctx context.Context) GetDisksDiskArrayOutput

type GetDisksDiskInput

type GetDisksDiskInput interface {
	pulumi.Input

	ToGetDisksDiskOutput() GetDisksDiskOutput
	ToGetDisksDiskOutputWithContext(context.Context) GetDisksDiskOutput
}

GetDisksDiskInput is an input type that accepts GetDisksDiskArgs and GetDisksDiskOutput values. You can construct a concrete instance of `GetDisksDiskInput` via:

GetDisksDiskArgs{...}

type GetDisksDiskOutput

type GetDisksDiskOutput struct{ *pulumi.OutputState }

func (GetDisksDiskOutput) AttachedTime

func (o GetDisksDiskOutput) AttachedTime() pulumi.StringOutput

Disk attachment time.

func (GetDisksDiskOutput) AvailabilityZone

func (o GetDisksDiskOutput) AvailabilityZone() pulumi.StringOutput

Availability zone of the disk.

func (GetDisksDiskOutput) Category

func (o GetDisksDiskOutput) Category() pulumi.StringOutput

Disk category. Possible values: `cloud` (basic cloud disk), `cloudEfficiency` (ultra cloud disk), `ephemeralSsd` (local SSD cloud disk), `cloudSsd` (SSD cloud disk), and `cloudEssd` (ESSD cloud disk).

func (GetDisksDiskOutput) CreationTime

func (o GetDisksDiskOutput) CreationTime() pulumi.StringOutput

Disk creation time.

func (GetDisksDiskOutput) Description

func (o GetDisksDiskOutput) Description() pulumi.StringOutput

Disk description.

func (GetDisksDiskOutput) DetachedTime

func (o GetDisksDiskOutput) DetachedTime() pulumi.StringOutput

Disk detachment time.

func (GetDisksDiskOutput) ElementType

func (GetDisksDiskOutput) ElementType() reflect.Type

func (GetDisksDiskOutput) Encrypted

func (o GetDisksDiskOutput) Encrypted() pulumi.StringOutput

Indicate whether the disk is encrypted or not. Possible values: `on` and `off`.

func (GetDisksDiskOutput) ExpirationTime

func (o GetDisksDiskOutput) ExpirationTime() pulumi.StringOutput

Disk expiration time.

func (GetDisksDiskOutput) Id

ID of the disk.

func (GetDisksDiskOutput) ImageId

ID of the image from which the disk is created. It is null unless the disk is created using an image.

func (GetDisksDiskOutput) InstanceId

func (o GetDisksDiskOutput) InstanceId() pulumi.StringOutput

Filter the results by the specified ECS instance ID.

func (GetDisksDiskOutput) Name

Disk name.

func (GetDisksDiskOutput) RegionId

func (o GetDisksDiskOutput) RegionId() pulumi.StringOutput

Region ID the disk belongs to.

func (GetDisksDiskOutput) ResourceGroupId

func (o GetDisksDiskOutput) ResourceGroupId() pulumi.StringOutput

The Id of resource group which the disk belongs.

func (GetDisksDiskOutput) Size

Disk size in GiB.

func (GetDisksDiskOutput) SnapshotId

func (o GetDisksDiskOutput) SnapshotId() pulumi.StringOutput

Snapshot used to create the disk. It is null if no snapshot is used to create the disk.

func (GetDisksDiskOutput) Status

Current status. Possible values: `In_use`, `Available`, `Attaching`, `Detaching`, `Creating` and `ReIniting`.

func (GetDisksDiskOutput) Tags

A map of tags assigned to the disks. It must be in the format: ```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{
			Tags: map[string]interface{}{
				"tagKey1": "tagValue1",
				"tagKey2": "tagValue2",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

func (GetDisksDiskOutput) ToGetDisksDiskOutput

func (o GetDisksDiskOutput) ToGetDisksDiskOutput() GetDisksDiskOutput

func (GetDisksDiskOutput) ToGetDisksDiskOutputWithContext

func (o GetDisksDiskOutput) ToGetDisksDiskOutputWithContext(ctx context.Context) GetDisksDiskOutput

func (GetDisksDiskOutput) Type

Disk type. Possible values: `system` and `data`.

type GetDisksResult

type GetDisksResult struct {
	// Disk category. Possible values: `cloud` (basic cloud disk), `cloudEfficiency` (ultra cloud disk), `ephemeralSsd` (local SSD cloud disk), `cloudSsd` (SSD cloud disk), and `cloudEssd` (ESSD cloud disk).
	Category *string `pulumi:"category"`
	// A list of disks. Each element contains the following attributes:
	Disks []GetDisksDisk `pulumi:"disks"`
	// Indicate whether the disk is encrypted or not. Possible values: `on` and `off`.
	Encrypted *string `pulumi:"encrypted"`
	// The provider-assigned unique ID for this managed resource.
	Id  string   `pulumi:"id"`
	Ids []string `pulumi:"ids"`
	// ID of the related instance. It is `null` unless the `status` is `In_use`.
	InstanceId *string `pulumi:"instanceId"`
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// The Id of resource group.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// A map of tags assigned to the disk.
	Tags map[string]interface{} `pulumi:"tags"`
	// Disk type. Possible values: `system` and `data`.
	Type *string `pulumi:"type"`
}

A collection of values returned by getDisks.

func GetDisks

func GetDisks(ctx *pulumi.Context, args *GetDisksArgs, opts ...pulumi.InvokeOption) (*GetDisksResult, error)

This data source provides the disks of the current Alibaba Cloud user.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "sample_disk"
		disksDs, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{
			NameRegex: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstDiskId", disksDs.Disks[0].Id)
		return nil
	})
}

```

type GetEipsArgs

type GetEipsArgs struct {
	// A list of EIP IDs.
	Ids []string `pulumi:"ids"`
	// Deprecated since the version 1.8.0 of this provider.
	//
	// Deprecated: Field 'in_use' has been deprecated from provider version 1.8.0.
	InUse *bool `pulumi:"inUse"`
	// A list of EIP public IP addresses.
	IpAddresses []string `pulumi:"ipAddresses"`
	OutputFile  *string  `pulumi:"outputFile"`
	// The Id of resource group which the eips belongs.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
}

A collection of arguments for invoking getEips.

type GetEipsEip

type GetEipsEip struct {
	// EIP internet max bandwidth in Mbps.
	Bandwidth string `pulumi:"bandwidth"`
	// Time of creation.
	CreationTime string `pulumi:"creationTime"`
	// ID of the EIP.
	Id string `pulumi:"id"`
	// The ID of the instance that is being bound.
	InstanceId string `pulumi:"instanceId"`
	// The instance type of that the EIP is bound.
	InstanceType string `pulumi:"instanceType"`
	// EIP internet charge type.
	InternetChargeType string `pulumi:"internetChargeType"`
	// Public IP Address of the the EIP.
	IpAddress string `pulumi:"ipAddress"`
	// EIP status. Possible values are: `Associating`, `Unassociating`, `InUse` and `Available`.
	Status string `pulumi:"status"`
}

type GetEipsEipArgs

type GetEipsEipArgs struct {
	// EIP internet max bandwidth in Mbps.
	Bandwidth pulumi.StringInput `pulumi:"bandwidth"`
	// Time of creation.
	CreationTime pulumi.StringInput `pulumi:"creationTime"`
	// ID of the EIP.
	Id pulumi.StringInput `pulumi:"id"`
	// The ID of the instance that is being bound.
	InstanceId pulumi.StringInput `pulumi:"instanceId"`
	// The instance type of that the EIP is bound.
	InstanceType pulumi.StringInput `pulumi:"instanceType"`
	// EIP internet charge type.
	InternetChargeType pulumi.StringInput `pulumi:"internetChargeType"`
	// Public IP Address of the the EIP.
	IpAddress pulumi.StringInput `pulumi:"ipAddress"`
	// EIP status. Possible values are: `Associating`, `Unassociating`, `InUse` and `Available`.
	Status pulumi.StringInput `pulumi:"status"`
}

func (GetEipsEipArgs) ElementType

func (GetEipsEipArgs) ElementType() reflect.Type

func (GetEipsEipArgs) ToGetEipsEipOutput

func (i GetEipsEipArgs) ToGetEipsEipOutput() GetEipsEipOutput

func (GetEipsEipArgs) ToGetEipsEipOutputWithContext

func (i GetEipsEipArgs) ToGetEipsEipOutputWithContext(ctx context.Context) GetEipsEipOutput

type GetEipsEipArray

type GetEipsEipArray []GetEipsEipInput

func (GetEipsEipArray) ElementType

func (GetEipsEipArray) ElementType() reflect.Type

func (GetEipsEipArray) ToGetEipsEipArrayOutput

func (i GetEipsEipArray) ToGetEipsEipArrayOutput() GetEipsEipArrayOutput

func (GetEipsEipArray) ToGetEipsEipArrayOutputWithContext

func (i GetEipsEipArray) ToGetEipsEipArrayOutputWithContext(ctx context.Context) GetEipsEipArrayOutput

type GetEipsEipArrayInput

type GetEipsEipArrayInput interface {
	pulumi.Input

	ToGetEipsEipArrayOutput() GetEipsEipArrayOutput
	ToGetEipsEipArrayOutputWithContext(context.Context) GetEipsEipArrayOutput
}

GetEipsEipArrayInput is an input type that accepts GetEipsEipArray and GetEipsEipArrayOutput values. You can construct a concrete instance of `GetEipsEipArrayInput` via:

GetEipsEipArray{ GetEipsEipArgs{...} }

type GetEipsEipArrayOutput

type GetEipsEipArrayOutput struct{ *pulumi.OutputState }

func (GetEipsEipArrayOutput) ElementType

func (GetEipsEipArrayOutput) ElementType() reflect.Type

func (GetEipsEipArrayOutput) Index

func (GetEipsEipArrayOutput) ToGetEipsEipArrayOutput

func (o GetEipsEipArrayOutput) ToGetEipsEipArrayOutput() GetEipsEipArrayOutput

func (GetEipsEipArrayOutput) ToGetEipsEipArrayOutputWithContext

func (o GetEipsEipArrayOutput) ToGetEipsEipArrayOutputWithContext(ctx context.Context) GetEipsEipArrayOutput

type GetEipsEipInput

type GetEipsEipInput interface {
	pulumi.Input

	ToGetEipsEipOutput() GetEipsEipOutput
	ToGetEipsEipOutputWithContext(context.Context) GetEipsEipOutput
}

GetEipsEipInput is an input type that accepts GetEipsEipArgs and GetEipsEipOutput values. You can construct a concrete instance of `GetEipsEipInput` via:

GetEipsEipArgs{...}

type GetEipsEipOutput

type GetEipsEipOutput struct{ *pulumi.OutputState }

func (GetEipsEipOutput) Bandwidth

func (o GetEipsEipOutput) Bandwidth() pulumi.StringOutput

EIP internet max bandwidth in Mbps.

func (GetEipsEipOutput) CreationTime

func (o GetEipsEipOutput) CreationTime() pulumi.StringOutput

Time of creation.

func (GetEipsEipOutput) ElementType

func (GetEipsEipOutput) ElementType() reflect.Type

func (GetEipsEipOutput) Id

ID of the EIP.

func (GetEipsEipOutput) InstanceId

func (o GetEipsEipOutput) InstanceId() pulumi.StringOutput

The ID of the instance that is being bound.

func (GetEipsEipOutput) InstanceType

func (o GetEipsEipOutput) InstanceType() pulumi.StringOutput

The instance type of that the EIP is bound.

func (GetEipsEipOutput) InternetChargeType

func (o GetEipsEipOutput) InternetChargeType() pulumi.StringOutput

EIP internet charge type.

func (GetEipsEipOutput) IpAddress

func (o GetEipsEipOutput) IpAddress() pulumi.StringOutput

Public IP Address of the the EIP.

func (GetEipsEipOutput) Status

EIP status. Possible values are: `Associating`, `Unassociating`, `InUse` and `Available`.

func (GetEipsEipOutput) ToGetEipsEipOutput

func (o GetEipsEipOutput) ToGetEipsEipOutput() GetEipsEipOutput

func (GetEipsEipOutput) ToGetEipsEipOutputWithContext

func (o GetEipsEipOutput) ToGetEipsEipOutputWithContext(ctx context.Context) GetEipsEipOutput

type GetEipsResult

type GetEipsResult struct {
	// A list of EIPs. Each element contains the following attributes:
	Eips []GetEipsEip `pulumi:"eips"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// (Optional) A list of EIP IDs.
	Ids []string `pulumi:"ids"`
	// Deprecated: Field 'in_use' has been deprecated from provider version 1.8.0.
	InUse       *bool    `pulumi:"inUse"`
	IpAddresses []string `pulumi:"ipAddresses"`
	// (Optional) A list of EIP names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	// The Id of resource group which the eips belongs.
	ResourceGroupId *string                `pulumi:"resourceGroupId"`
	Tags            map[string]interface{} `pulumi:"tags"`
}

A collection of values returned by getEips.

func GetEips

func GetEips(ctx *pulumi.Context, args *GetEipsArgs, opts ...pulumi.InvokeOption) (*GetEipsResult, error)

This data source provides a list of EIPs (Elastic IP address) owned by an Alibaba Cloud account.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		eipsDs, err := ecs.GetEips(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstEipId", eipsDs.Eips[0].Id)
		return nil
	})
}

```

type GetImagesArgs

type GetImagesArgs struct {
	// The scenario in which the image will be used. Default value: `CreateEcs`. Valid values:
	// * `CreateEcs`: instance creation.
	// * `ChangeOS`: replacement of the system disk or operating system.
	ActionType *string `pulumi:"actionType"`
	// The image architecture. Valid values: `i386` and `x8664`.
	Architecture *string `pulumi:"architecture"`
	// Specifies whether the image is running on an ECS instance. Default value: `false`. Valid values:
	// * `true`: The validity of the request is checked but resources are not queried. Check items include whether your AccessKey pair is valid, whether RAM users are authorized, and whether the required parameters are specified. If the check fails, the corresponding error message is returned. If the check succeeds, the DryRunOperation error code is returned.
	// * `false`: The validity of the request is checked, and a 2XX HTTP status code is returned and resources are queried if the check succeeds.
	DryRun *bool `pulumi:"dryRun"`
	// The name of the image family. You can set this parameter to query images of the specified image family. This parameter is empty by default.
	ImageFamily *string `pulumi:"imageFamily"`
	// The instance type for which the image can be used.
	InstanceType *string `pulumi:"instanceType"`
	// Specifies whether the image supports cloud-init.
	IsSupportCloudInit *bool `pulumi:"isSupportCloudInit"`
	// Specifies whether the image can be used on I/O optimized instances.
	IsSupportIoOptimized *bool `pulumi:"isSupportIoOptimized"`
	// If more than one result are returned, select the most recent one.
	MostRecent *bool `pulumi:"mostRecent"`
	// A regex string to filter resulting images by name.
	NameRegex *string `pulumi:"nameRegex"`
	// The operating system type of the image. Valid values: `windows` and `linux`.
	OsType     *string `pulumi:"osType"`
	OutputFile *string `pulumi:"outputFile"`
	// Filter results by a specific image owner. Valid items are `system`, `self`, `others`, `marketplace`.
	Owners *string `pulumi:"owners"`
	// The ID of the resource group to which the custom image belongs.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// The ID of the snapshot used to create the custom image.
	SnapshotId *string `pulumi:"snapshotId"`
	// The status of the image. The following values are available, Separate multiple parameter values by using commas (,). Default value: `Available`. Valid values:
	// * `Creating`: The image is being created.
	// * `Waiting`: The image is waiting to be processed.
	// * `Available`: The image is available.
	// * `UnAvailable`: The image is unavailable.
	// * `CreateFailed`: The image failed to be created.
	// * `Deprecated`: The image is discontinued.
	Status *string `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
	// Specifies whether to check the validity of the request without actually making the request. Valid values:
	// * `instance`: The image is already in use and running on an ECS instance.
	// * `none`: The image is not in use.
	Usage *string `pulumi:"usage"`
}

A collection of arguments for invoking getImages.

type GetImagesImage

type GetImagesImage struct {
	// The image architecture. Valid values: `i386` and `x8664`.
	Architecture string `pulumi:"architecture"`
	// Time of creation.
	CreationTime string `pulumi:"creationTime"`
	// Description of the image.
	Description string `pulumi:"description"`
	// Description of the system with disks and snapshots under the image.
	DiskDeviceMappings []GetImagesImageDiskDeviceMapping `pulumi:"diskDeviceMappings"`
	// ID of the image.
	Id      string `pulumi:"id"`
	ImageId string `pulumi:"imageId"`
	// Alias of the image owner.
	ImageOwnerAlias string `pulumi:"imageOwnerAlias"`
	// Version of the image.
	ImageVersion string `pulumi:"imageVersion"`
	IsCopied     bool   `pulumi:"isCopied"`
	IsSelfShared string `pulumi:"isSelfShared"`
	// Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.
	IsSubscribed bool `pulumi:"isSubscribed"`
	// Specifies whether the image can be used on I/O optimized instances.
	IsSupportIoOptimized bool   `pulumi:"isSupportIoOptimized"`
	Name                 string `pulumi:"name"`
	// Display Chinese name of the OS.
	OsName string `pulumi:"osName"`
	// Display English name of the OS.
	OsNameEn string `pulumi:"osNameEn"`
	// The operating system type of the image. Valid values: `windows` and `linux`.
	OsType   string `pulumi:"osType"`
	Platform string `pulumi:"platform"`
	// Product code of the image on the image market.
	ProductCode string `pulumi:"productCode"`
	// Progress of image creation, presented in percentages.
	Progress string `pulumi:"progress"`
	// Size of the created disk.
	Size  int    `pulumi:"size"`
	State string `pulumi:"state"`
	// The status of the image. The following values are available, Separate multiple parameter values by using commas (,). Default value: `Available`. Valid values:
	// * `Creating`: The image is being created.
	// * `Waiting`: The image is waiting to be processed.
	// * `Available`: The image is available.
	// * `UnAvailable`: The image is unavailable.
	// * `CreateFailed`: The image failed to be created.
	// * `Deprecated`: The image is discontinued.
	Status string `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
	// Specifies whether to check the validity of the request without actually making the request. Valid values:
	// * `instance`: The image is already in use and running on an ECS instance.
	// * `none`: The image is not in use.
	Usage string `pulumi:"usage"`
}

type GetImagesImageArgs

type GetImagesImageArgs struct {
	// The image architecture. Valid values: `i386` and `x8664`.
	Architecture pulumi.StringInput `pulumi:"architecture"`
	// Time of creation.
	CreationTime pulumi.StringInput `pulumi:"creationTime"`
	// Description of the image.
	Description pulumi.StringInput `pulumi:"description"`
	// Description of the system with disks and snapshots under the image.
	DiskDeviceMappings GetImagesImageDiskDeviceMappingArrayInput `pulumi:"diskDeviceMappings"`
	// ID of the image.
	Id      pulumi.StringInput `pulumi:"id"`
	ImageId pulumi.StringInput `pulumi:"imageId"`
	// Alias of the image owner.
	ImageOwnerAlias pulumi.StringInput `pulumi:"imageOwnerAlias"`
	// Version of the image.
	ImageVersion pulumi.StringInput `pulumi:"imageVersion"`
	IsCopied     pulumi.BoolInput   `pulumi:"isCopied"`
	IsSelfShared pulumi.StringInput `pulumi:"isSelfShared"`
	// Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.
	IsSubscribed pulumi.BoolInput `pulumi:"isSubscribed"`
	// Specifies whether the image can be used on I/O optimized instances.
	IsSupportIoOptimized pulumi.BoolInput   `pulumi:"isSupportIoOptimized"`
	Name                 pulumi.StringInput `pulumi:"name"`
	// Display Chinese name of the OS.
	OsName pulumi.StringInput `pulumi:"osName"`
	// Display English name of the OS.
	OsNameEn pulumi.StringInput `pulumi:"osNameEn"`
	// The operating system type of the image. Valid values: `windows` and `linux`.
	OsType   pulumi.StringInput `pulumi:"osType"`
	Platform pulumi.StringInput `pulumi:"platform"`
	// Product code of the image on the image market.
	ProductCode pulumi.StringInput `pulumi:"productCode"`
	// Progress of image creation, presented in percentages.
	Progress pulumi.StringInput `pulumi:"progress"`
	// Size of the created disk.
	Size  pulumi.IntInput    `pulumi:"size"`
	State pulumi.StringInput `pulumi:"state"`
	// The status of the image. The following values are available, Separate multiple parameter values by using commas (,). Default value: `Available`. Valid values:
	// * `Creating`: The image is being created.
	// * `Waiting`: The image is waiting to be processed.
	// * `Available`: The image is available.
	// * `UnAvailable`: The image is unavailable.
	// * `CreateFailed`: The image failed to be created.
	// * `Deprecated`: The image is discontinued.
	Status pulumi.StringInput `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput `pulumi:"tags"`
	// Specifies whether to check the validity of the request without actually making the request. Valid values:
	// * `instance`: The image is already in use and running on an ECS instance.
	// * `none`: The image is not in use.
	Usage pulumi.StringInput `pulumi:"usage"`
}

func (GetImagesImageArgs) ElementType

func (GetImagesImageArgs) ElementType() reflect.Type

func (GetImagesImageArgs) ToGetImagesImageOutput

func (i GetImagesImageArgs) ToGetImagesImageOutput() GetImagesImageOutput

func (GetImagesImageArgs) ToGetImagesImageOutputWithContext

func (i GetImagesImageArgs) ToGetImagesImageOutputWithContext(ctx context.Context) GetImagesImageOutput

type GetImagesImageArray

type GetImagesImageArray []GetImagesImageInput

func (GetImagesImageArray) ElementType

func (GetImagesImageArray) ElementType() reflect.Type

func (GetImagesImageArray) ToGetImagesImageArrayOutput

func (i GetImagesImageArray) ToGetImagesImageArrayOutput() GetImagesImageArrayOutput

func (GetImagesImageArray) ToGetImagesImageArrayOutputWithContext

func (i GetImagesImageArray) ToGetImagesImageArrayOutputWithContext(ctx context.Context) GetImagesImageArrayOutput

type GetImagesImageArrayInput

type GetImagesImageArrayInput interface {
	pulumi.Input

	ToGetImagesImageArrayOutput() GetImagesImageArrayOutput
	ToGetImagesImageArrayOutputWithContext(context.Context) GetImagesImageArrayOutput
}

GetImagesImageArrayInput is an input type that accepts GetImagesImageArray and GetImagesImageArrayOutput values. You can construct a concrete instance of `GetImagesImageArrayInput` via:

GetImagesImageArray{ GetImagesImageArgs{...} }

type GetImagesImageArrayOutput

type GetImagesImageArrayOutput struct{ *pulumi.OutputState }

func (GetImagesImageArrayOutput) ElementType

func (GetImagesImageArrayOutput) ElementType() reflect.Type

func (GetImagesImageArrayOutput) Index

func (GetImagesImageArrayOutput) ToGetImagesImageArrayOutput

func (o GetImagesImageArrayOutput) ToGetImagesImageArrayOutput() GetImagesImageArrayOutput

func (GetImagesImageArrayOutput) ToGetImagesImageArrayOutputWithContext

func (o GetImagesImageArrayOutput) ToGetImagesImageArrayOutputWithContext(ctx context.Context) GetImagesImageArrayOutput

type GetImagesImageDiskDeviceMapping

type GetImagesImageDiskDeviceMapping struct {
	// Device information of the created disk: such as /dev/xvdb.
	Device string `pulumi:"device"`
	// Size of the created disk.
	Size string `pulumi:"size"`
	// The ID of the snapshot used to create the custom image.
	SnapshotId string `pulumi:"snapshotId"`
}

type GetImagesImageDiskDeviceMappingArgs

type GetImagesImageDiskDeviceMappingArgs struct {
	// Device information of the created disk: such as /dev/xvdb.
	Device pulumi.StringInput `pulumi:"device"`
	// Size of the created disk.
	Size pulumi.StringInput `pulumi:"size"`
	// The ID of the snapshot used to create the custom image.
	SnapshotId pulumi.StringInput `pulumi:"snapshotId"`
}

func (GetImagesImageDiskDeviceMappingArgs) ElementType

func (GetImagesImageDiskDeviceMappingArgs) ToGetImagesImageDiskDeviceMappingOutput

func (i GetImagesImageDiskDeviceMappingArgs) ToGetImagesImageDiskDeviceMappingOutput() GetImagesImageDiskDeviceMappingOutput

func (GetImagesImageDiskDeviceMappingArgs) ToGetImagesImageDiskDeviceMappingOutputWithContext

func (i GetImagesImageDiskDeviceMappingArgs) ToGetImagesImageDiskDeviceMappingOutputWithContext(ctx context.Context) GetImagesImageDiskDeviceMappingOutput

type GetImagesImageDiskDeviceMappingArray

type GetImagesImageDiskDeviceMappingArray []GetImagesImageDiskDeviceMappingInput

func (GetImagesImageDiskDeviceMappingArray) ElementType

func (GetImagesImageDiskDeviceMappingArray) ToGetImagesImageDiskDeviceMappingArrayOutput

func (i GetImagesImageDiskDeviceMappingArray) ToGetImagesImageDiskDeviceMappingArrayOutput() GetImagesImageDiskDeviceMappingArrayOutput

func (GetImagesImageDiskDeviceMappingArray) ToGetImagesImageDiskDeviceMappingArrayOutputWithContext

func (i GetImagesImageDiskDeviceMappingArray) ToGetImagesImageDiskDeviceMappingArrayOutputWithContext(ctx context.Context) GetImagesImageDiskDeviceMappingArrayOutput

type GetImagesImageDiskDeviceMappingArrayInput

type GetImagesImageDiskDeviceMappingArrayInput interface {
	pulumi.Input

	ToGetImagesImageDiskDeviceMappingArrayOutput() GetImagesImageDiskDeviceMappingArrayOutput
	ToGetImagesImageDiskDeviceMappingArrayOutputWithContext(context.Context) GetImagesImageDiskDeviceMappingArrayOutput
}

GetImagesImageDiskDeviceMappingArrayInput is an input type that accepts GetImagesImageDiskDeviceMappingArray and GetImagesImageDiskDeviceMappingArrayOutput values. You can construct a concrete instance of `GetImagesImageDiskDeviceMappingArrayInput` via:

GetImagesImageDiskDeviceMappingArray{ GetImagesImageDiskDeviceMappingArgs{...} }

type GetImagesImageDiskDeviceMappingArrayOutput

type GetImagesImageDiskDeviceMappingArrayOutput struct{ *pulumi.OutputState }

func (GetImagesImageDiskDeviceMappingArrayOutput) ElementType

func (GetImagesImageDiskDeviceMappingArrayOutput) Index

func (GetImagesImageDiskDeviceMappingArrayOutput) ToGetImagesImageDiskDeviceMappingArrayOutput

func (o GetImagesImageDiskDeviceMappingArrayOutput) ToGetImagesImageDiskDeviceMappingArrayOutput() GetImagesImageDiskDeviceMappingArrayOutput

func (GetImagesImageDiskDeviceMappingArrayOutput) ToGetImagesImageDiskDeviceMappingArrayOutputWithContext

func (o GetImagesImageDiskDeviceMappingArrayOutput) ToGetImagesImageDiskDeviceMappingArrayOutputWithContext(ctx context.Context) GetImagesImageDiskDeviceMappingArrayOutput

type GetImagesImageDiskDeviceMappingInput

type GetImagesImageDiskDeviceMappingInput interface {
	pulumi.Input

	ToGetImagesImageDiskDeviceMappingOutput() GetImagesImageDiskDeviceMappingOutput
	ToGetImagesImageDiskDeviceMappingOutputWithContext(context.Context) GetImagesImageDiskDeviceMappingOutput
}

GetImagesImageDiskDeviceMappingInput is an input type that accepts GetImagesImageDiskDeviceMappingArgs and GetImagesImageDiskDeviceMappingOutput values. You can construct a concrete instance of `GetImagesImageDiskDeviceMappingInput` via:

GetImagesImageDiskDeviceMappingArgs{...}

type GetImagesImageDiskDeviceMappingOutput

type GetImagesImageDiskDeviceMappingOutput struct{ *pulumi.OutputState }

func (GetImagesImageDiskDeviceMappingOutput) Device

Device information of the created disk: such as /dev/xvdb.

func (GetImagesImageDiskDeviceMappingOutput) ElementType

func (GetImagesImageDiskDeviceMappingOutput) Size

Size of the created disk.

func (GetImagesImageDiskDeviceMappingOutput) SnapshotId

The ID of the snapshot used to create the custom image.

func (GetImagesImageDiskDeviceMappingOutput) ToGetImagesImageDiskDeviceMappingOutput

func (o GetImagesImageDiskDeviceMappingOutput) ToGetImagesImageDiskDeviceMappingOutput() GetImagesImageDiskDeviceMappingOutput

func (GetImagesImageDiskDeviceMappingOutput) ToGetImagesImageDiskDeviceMappingOutputWithContext

func (o GetImagesImageDiskDeviceMappingOutput) ToGetImagesImageDiskDeviceMappingOutputWithContext(ctx context.Context) GetImagesImageDiskDeviceMappingOutput

type GetImagesImageInput

type GetImagesImageInput interface {
	pulumi.Input

	ToGetImagesImageOutput() GetImagesImageOutput
	ToGetImagesImageOutputWithContext(context.Context) GetImagesImageOutput
}

GetImagesImageInput is an input type that accepts GetImagesImageArgs and GetImagesImageOutput values. You can construct a concrete instance of `GetImagesImageInput` via:

GetImagesImageArgs{...}

type GetImagesImageOutput

type GetImagesImageOutput struct{ *pulumi.OutputState }

func (GetImagesImageOutput) Architecture

func (o GetImagesImageOutput) Architecture() pulumi.StringOutput

The image architecture. Valid values: `i386` and `x8664`.

func (GetImagesImageOutput) CreationTime

func (o GetImagesImageOutput) CreationTime() pulumi.StringOutput

Time of creation.

func (GetImagesImageOutput) Description

func (o GetImagesImageOutput) Description() pulumi.StringOutput

Description of the image.

func (GetImagesImageOutput) DiskDeviceMappings

Description of the system with disks and snapshots under the image.

func (GetImagesImageOutput) ElementType

func (GetImagesImageOutput) ElementType() reflect.Type

func (GetImagesImageOutput) Id

ID of the image.

func (GetImagesImageOutput) ImageId

func (GetImagesImageOutput) ImageOwnerAlias

func (o GetImagesImageOutput) ImageOwnerAlias() pulumi.StringOutput

Alias of the image owner.

func (GetImagesImageOutput) ImageVersion

func (o GetImagesImageOutput) ImageVersion() pulumi.StringOutput

Version of the image.

func (GetImagesImageOutput) IsCopied

func (o GetImagesImageOutput) IsCopied() pulumi.BoolOutput

func (GetImagesImageOutput) IsSelfShared

func (o GetImagesImageOutput) IsSelfShared() pulumi.StringOutput

func (GetImagesImageOutput) IsSubscribed

func (o GetImagesImageOutput) IsSubscribed() pulumi.BoolOutput

Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.

func (GetImagesImageOutput) IsSupportIoOptimized

func (o GetImagesImageOutput) IsSupportIoOptimized() pulumi.BoolOutput

Specifies whether the image can be used on I/O optimized instances.

func (GetImagesImageOutput) Name

func (GetImagesImageOutput) OsName

Display Chinese name of the OS.

func (GetImagesImageOutput) OsNameEn

Display English name of the OS.

func (GetImagesImageOutput) OsType

The operating system type of the image. Valid values: `windows` and `linux`.

func (GetImagesImageOutput) Platform

func (GetImagesImageOutput) ProductCode

func (o GetImagesImageOutput) ProductCode() pulumi.StringOutput

Product code of the image on the image market.

func (GetImagesImageOutput) Progress

Progress of image creation, presented in percentages.

func (GetImagesImageOutput) Size

Size of the created disk.

func (GetImagesImageOutput) State

func (GetImagesImageOutput) Status

The status of the image. The following values are available, Separate multiple parameter values by using commas (,). Default value: `Available`. Valid values: * `Creating`: The image is being created. * `Waiting`: The image is waiting to be processed. * `Available`: The image is available. * `UnAvailable`: The image is unavailable. * `CreateFailed`: The image failed to be created. * `Deprecated`: The image is discontinued.

func (GetImagesImageOutput) Tags

A mapping of tags to assign to the resource.

func (GetImagesImageOutput) ToGetImagesImageOutput

func (o GetImagesImageOutput) ToGetImagesImageOutput() GetImagesImageOutput

func (GetImagesImageOutput) ToGetImagesImageOutputWithContext

func (o GetImagesImageOutput) ToGetImagesImageOutputWithContext(ctx context.Context) GetImagesImageOutput

func (GetImagesImageOutput) Usage

Specifies whether to check the validity of the request without actually making the request. Valid values: * `instance`: The image is already in use and running on an ECS instance. * `none`: The image is not in use.

type GetImagesResult

type GetImagesResult struct {
	ActionType *string `pulumi:"actionType"`
	// Platform type of the image system: i386 or x86_64.
	Architecture *string `pulumi:"architecture"`
	DryRun       *bool   `pulumi:"dryRun"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of image IDs.
	Ids         []string `pulumi:"ids"`
	ImageFamily *string  `pulumi:"imageFamily"`
	// A list of images. Each element contains the following attributes:
	Images               []GetImagesImage `pulumi:"images"`
	InstanceType         *string          `pulumi:"instanceType"`
	IsSupportCloudInit   *bool            `pulumi:"isSupportCloudInit"`
	IsSupportIoOptimized *bool            `pulumi:"isSupportIoOptimized"`
	MostRecent           *bool            `pulumi:"mostRecent"`
	NameRegex            *string          `pulumi:"nameRegex"`
	OsType               *string          `pulumi:"osType"`
	OutputFile           *string          `pulumi:"outputFile"`
	Owners               *string          `pulumi:"owners"`
	ResourceGroupId      *string          `pulumi:"resourceGroupId"`
	// Snapshot ID.
	SnapshotId *string `pulumi:"snapshotId"`
	// Status of the image. Possible values: `UnAvailable`, `Available`, `Creating` and `CreateFailed`.
	Status *string                `pulumi:"status"`
	Tags   map[string]interface{} `pulumi:"tags"`
	Usage  *string                `pulumi:"usage"`
}

A collection of values returned by getImages.

func GetImages

func GetImages(ctx *pulumi.Context, args *GetImagesArgs, opts ...pulumi.InvokeOption) (*GetImagesResult, error)

This data source provides available image resources. It contains user's private images, system images provided by Alibaba Cloud, other public images and the ones available on the image market.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "^centos_6"
		opt1 := "system"
		imagesDs, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
			NameRegex: &opt0,
			Owners:    &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstImageId", imagesDs.Images[0].Id)
		return nil
	})
}

```

type GetInstanceTypeFamiliesArgs

type GetInstanceTypeFamiliesArgs struct {
	// The generation of the instance type family, Valid values: `ecs-1`, `ecs-2`, `ecs-3` and `ecs-4`. For more information, see [Instance type families](https://www.alibabacloud.com/help/doc-detail/25378.htm).
	Generation *string `pulumi:"generation"`
	// Valid values are `PrePaid`, `PostPaid`, Default to `PostPaid`.
	InstanceChargeType *string `pulumi:"instanceChargeType"`
	OutputFile         *string `pulumi:"outputFile"`
	// Filter the results by ECS spot type. Valid values: `NoSpot`, `SpotWithPriceLimit` and `SpotAsPriceGo`. Default to `NoSpot`.
	SpotStrategy *string `pulumi:"spotStrategy"`
	// The Zone to launch the instance.
	ZoneId *string `pulumi:"zoneId"`
}

A collection of arguments for invoking getInstanceTypeFamilies.

type GetInstanceTypeFamiliesFamily

type GetInstanceTypeFamiliesFamily struct {
	// The generation of the instance type family, Valid values: `ecs-1`, `ecs-2`, `ecs-3` and `ecs-4`. For more information, see [Instance type families](https://www.alibabacloud.com/help/doc-detail/25378.htm).
	Generation string `pulumi:"generation"`
	// ID of the instance type family.
	Id string `pulumi:"id"`
	// A list of Zone to launch the instance.
	ZoneIds []string `pulumi:"zoneIds"`
}

type GetInstanceTypeFamiliesFamilyArgs

type GetInstanceTypeFamiliesFamilyArgs struct {
	// The generation of the instance type family, Valid values: `ecs-1`, `ecs-2`, `ecs-3` and `ecs-4`. For more information, see [Instance type families](https://www.alibabacloud.com/help/doc-detail/25378.htm).
	Generation pulumi.StringInput `pulumi:"generation"`
	// ID of the instance type family.
	Id pulumi.StringInput `pulumi:"id"`
	// A list of Zone to launch the instance.
	ZoneIds pulumi.StringArrayInput `pulumi:"zoneIds"`
}

func (GetInstanceTypeFamiliesFamilyArgs) ElementType

func (GetInstanceTypeFamiliesFamilyArgs) ToGetInstanceTypeFamiliesFamilyOutput

func (i GetInstanceTypeFamiliesFamilyArgs) ToGetInstanceTypeFamiliesFamilyOutput() GetInstanceTypeFamiliesFamilyOutput

func (GetInstanceTypeFamiliesFamilyArgs) ToGetInstanceTypeFamiliesFamilyOutputWithContext

func (i GetInstanceTypeFamiliesFamilyArgs) ToGetInstanceTypeFamiliesFamilyOutputWithContext(ctx context.Context) GetInstanceTypeFamiliesFamilyOutput

type GetInstanceTypeFamiliesFamilyArray

type GetInstanceTypeFamiliesFamilyArray []GetInstanceTypeFamiliesFamilyInput

func (GetInstanceTypeFamiliesFamilyArray) ElementType

func (GetInstanceTypeFamiliesFamilyArray) ToGetInstanceTypeFamiliesFamilyArrayOutput

func (i GetInstanceTypeFamiliesFamilyArray) ToGetInstanceTypeFamiliesFamilyArrayOutput() GetInstanceTypeFamiliesFamilyArrayOutput

func (GetInstanceTypeFamiliesFamilyArray) ToGetInstanceTypeFamiliesFamilyArrayOutputWithContext

func (i GetInstanceTypeFamiliesFamilyArray) ToGetInstanceTypeFamiliesFamilyArrayOutputWithContext(ctx context.Context) GetInstanceTypeFamiliesFamilyArrayOutput

type GetInstanceTypeFamiliesFamilyArrayInput

type GetInstanceTypeFamiliesFamilyArrayInput interface {
	pulumi.Input

	ToGetInstanceTypeFamiliesFamilyArrayOutput() GetInstanceTypeFamiliesFamilyArrayOutput
	ToGetInstanceTypeFamiliesFamilyArrayOutputWithContext(context.Context) GetInstanceTypeFamiliesFamilyArrayOutput
}

GetInstanceTypeFamiliesFamilyArrayInput is an input type that accepts GetInstanceTypeFamiliesFamilyArray and GetInstanceTypeFamiliesFamilyArrayOutput values. You can construct a concrete instance of `GetInstanceTypeFamiliesFamilyArrayInput` via:

GetInstanceTypeFamiliesFamilyArray{ GetInstanceTypeFamiliesFamilyArgs{...} }

type GetInstanceTypeFamiliesFamilyArrayOutput

type GetInstanceTypeFamiliesFamilyArrayOutput struct{ *pulumi.OutputState }

func (GetInstanceTypeFamiliesFamilyArrayOutput) ElementType

func (GetInstanceTypeFamiliesFamilyArrayOutput) Index

func (GetInstanceTypeFamiliesFamilyArrayOutput) ToGetInstanceTypeFamiliesFamilyArrayOutput

func (o GetInstanceTypeFamiliesFamilyArrayOutput) ToGetInstanceTypeFamiliesFamilyArrayOutput() GetInstanceTypeFamiliesFamilyArrayOutput

func (GetInstanceTypeFamiliesFamilyArrayOutput) ToGetInstanceTypeFamiliesFamilyArrayOutputWithContext

func (o GetInstanceTypeFamiliesFamilyArrayOutput) ToGetInstanceTypeFamiliesFamilyArrayOutputWithContext(ctx context.Context) GetInstanceTypeFamiliesFamilyArrayOutput

type GetInstanceTypeFamiliesFamilyInput

type GetInstanceTypeFamiliesFamilyInput interface {
	pulumi.Input

	ToGetInstanceTypeFamiliesFamilyOutput() GetInstanceTypeFamiliesFamilyOutput
	ToGetInstanceTypeFamiliesFamilyOutputWithContext(context.Context) GetInstanceTypeFamiliesFamilyOutput
}

GetInstanceTypeFamiliesFamilyInput is an input type that accepts GetInstanceTypeFamiliesFamilyArgs and GetInstanceTypeFamiliesFamilyOutput values. You can construct a concrete instance of `GetInstanceTypeFamiliesFamilyInput` via:

GetInstanceTypeFamiliesFamilyArgs{...}

type GetInstanceTypeFamiliesFamilyOutput

type GetInstanceTypeFamiliesFamilyOutput struct{ *pulumi.OutputState }

func (GetInstanceTypeFamiliesFamilyOutput) ElementType

func (GetInstanceTypeFamiliesFamilyOutput) Generation

The generation of the instance type family, Valid values: `ecs-1`, `ecs-2`, `ecs-3` and `ecs-4`. For more information, see [Instance type families](https://www.alibabacloud.com/help/doc-detail/25378.htm).

func (GetInstanceTypeFamiliesFamilyOutput) Id

ID of the instance type family.

func (GetInstanceTypeFamiliesFamilyOutput) ToGetInstanceTypeFamiliesFamilyOutput

func (o GetInstanceTypeFamiliesFamilyOutput) ToGetInstanceTypeFamiliesFamilyOutput() GetInstanceTypeFamiliesFamilyOutput

func (GetInstanceTypeFamiliesFamilyOutput) ToGetInstanceTypeFamiliesFamilyOutputWithContext

func (o GetInstanceTypeFamiliesFamilyOutput) ToGetInstanceTypeFamiliesFamilyOutputWithContext(ctx context.Context) GetInstanceTypeFamiliesFamilyOutput

func (GetInstanceTypeFamiliesFamilyOutput) ZoneIds

A list of Zone to launch the instance.

type GetInstanceTypeFamiliesResult

type GetInstanceTypeFamiliesResult struct {
	Families []GetInstanceTypeFamiliesFamily `pulumi:"families"`
	// The generation of the instance type family.
	Generation *string `pulumi:"generation"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of instance type family IDs.
	Ids                []string `pulumi:"ids"`
	InstanceChargeType *string  `pulumi:"instanceChargeType"`
	OutputFile         *string  `pulumi:"outputFile"`
	SpotStrategy       *string  `pulumi:"spotStrategy"`
	ZoneId             *string  `pulumi:"zoneId"`
}

A collection of values returned by getInstanceTypeFamilies.

func GetInstanceTypeFamilies

func GetInstanceTypeFamilies(ctx *pulumi.Context, args *GetInstanceTypeFamiliesArgs, opts ...pulumi.InvokeOption) (*GetInstanceTypeFamiliesResult, error)

This data source provides the ECS instance type families of Alibaba Cloud.

> **NOTE:** Available in 1.54.0+

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "PrePaid"
		_default, err := ecs.GetInstanceTypeFamilies(ctx, &ecs.GetInstanceTypeFamiliesArgs{
			InstanceChargeType: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstInstanceTypeFamilyId", _default.Families[0].Id)
		ctx.Export("instanceIds", _default.Ids)
		return nil
	})
}

```

type GetInstanceTypesArgs

type GetInstanceTypesArgs struct {
	// The zone where instance types are supported.
	AvailabilityZone *string `pulumi:"availabilityZone"`
	// Filter the results to a specific number of cpu cores.
	CpuCoreCount *int `pulumi:"cpuCoreCount"`
	// Filter the result whose network interface number is no more than `eniAmount`.
	EniAmount *int `pulumi:"eniAmount"`
	// The GPU amount of an instance type.
	GpuAmount *int `pulumi:"gpuAmount"`
	// The GPU spec of an instance type.
	GpuSpec *string `pulumi:"gpuSpec"`
	// Filter the results by charge type. Valid values: `PrePaid` and `PostPaid`. Default to `PostPaid`.
	InstanceChargeType *string `pulumi:"instanceChargeType"`
	// Filter the results based on their family name. For example: 'ecs.n4'.
	InstanceTypeFamily *string `pulumi:"instanceTypeFamily"`
	// If true, outdated instance types are included in the results. Default to false.
	IsOutdated         *bool   `pulumi:"isOutdated"`
	KubernetesNodeRole *string `pulumi:"kubernetesNodeRole"`
	// Filter the results to a specific memory size in GB.
	MemorySize *float64 `pulumi:"memorySize"`
	// Filter the results by network type. Valid values: `Classic` and `Vpc`.
	NetworkType *string `pulumi:"networkType"`
	OutputFile  *string `pulumi:"outputFile"`
	SortedBy    *string `pulumi:"sortedBy"`
	// Filter the results by ECS spot type. Valid values: `NoSpot`, `SpotWithPriceLimit` and `SpotAsPriceGo`. Default to `NoSpot`.
	SpotStrategy *string `pulumi:"spotStrategy"`
}

A collection of arguments for invoking getInstanceTypes.

type GetInstanceTypesInstanceType

type GetInstanceTypesInstanceType struct {
	// List of availability zones that support the instance type.
	AvailabilityZones []string `pulumi:"availabilityZones"`
	// The burstable instance attribution:
	BurstableInstance GetInstanceTypesInstanceTypeBurstableInstance `pulumi:"burstableInstance"`
	// Filter the results to a specific number of cpu cores.
	CpuCoreCount int `pulumi:"cpuCoreCount"`
	// Filter the result whose network interface number is no more than `eniAmount`.
	EniAmount int `pulumi:"eniAmount"`
	// The instance type family.
	Family string `pulumi:"family"`
	// The GPU attribution of an instance type:
	Gpu GetInstanceTypesInstanceTypeGpu `pulumi:"gpu"`
	// ID of the instance type.
	Id string `pulumi:"id"`
	// Local storage of an instance type:
	LocalStorage GetInstanceTypesInstanceTypeLocalStorage `pulumi:"localStorage"`
	// Filter the results to a specific memory size in GB.
	MemorySize float64 `pulumi:"memorySize"`
	Price      string  `pulumi:"price"`
}

type GetInstanceTypesInstanceTypeArgs

type GetInstanceTypesInstanceTypeArgs struct {
	// List of availability zones that support the instance type.
	AvailabilityZones pulumi.StringArrayInput `pulumi:"availabilityZones"`
	// The burstable instance attribution:
	BurstableInstance GetInstanceTypesInstanceTypeBurstableInstanceInput `pulumi:"burstableInstance"`
	// Filter the results to a specific number of cpu cores.
	CpuCoreCount pulumi.IntInput `pulumi:"cpuCoreCount"`
	// Filter the result whose network interface number is no more than `eniAmount`.
	EniAmount pulumi.IntInput `pulumi:"eniAmount"`
	// The instance type family.
	Family pulumi.StringInput `pulumi:"family"`
	// The GPU attribution of an instance type:
	Gpu GetInstanceTypesInstanceTypeGpuInput `pulumi:"gpu"`
	// ID of the instance type.
	Id pulumi.StringInput `pulumi:"id"`
	// Local storage of an instance type:
	LocalStorage GetInstanceTypesInstanceTypeLocalStorageInput `pulumi:"localStorage"`
	// Filter the results to a specific memory size in GB.
	MemorySize pulumi.Float64Input `pulumi:"memorySize"`
	Price      pulumi.StringInput  `pulumi:"price"`
}

func (GetInstanceTypesInstanceTypeArgs) ElementType

func (GetInstanceTypesInstanceTypeArgs) ToGetInstanceTypesInstanceTypeOutput

func (i GetInstanceTypesInstanceTypeArgs) ToGetInstanceTypesInstanceTypeOutput() GetInstanceTypesInstanceTypeOutput

func (GetInstanceTypesInstanceTypeArgs) ToGetInstanceTypesInstanceTypeOutputWithContext

func (i GetInstanceTypesInstanceTypeArgs) ToGetInstanceTypesInstanceTypeOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeOutput

type GetInstanceTypesInstanceTypeArray

type GetInstanceTypesInstanceTypeArray []GetInstanceTypesInstanceTypeInput

func (GetInstanceTypesInstanceTypeArray) ElementType

func (GetInstanceTypesInstanceTypeArray) ToGetInstanceTypesInstanceTypeArrayOutput

func (i GetInstanceTypesInstanceTypeArray) ToGetInstanceTypesInstanceTypeArrayOutput() GetInstanceTypesInstanceTypeArrayOutput

func (GetInstanceTypesInstanceTypeArray) ToGetInstanceTypesInstanceTypeArrayOutputWithContext

func (i GetInstanceTypesInstanceTypeArray) ToGetInstanceTypesInstanceTypeArrayOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeArrayOutput

type GetInstanceTypesInstanceTypeArrayInput

type GetInstanceTypesInstanceTypeArrayInput interface {
	pulumi.Input

	ToGetInstanceTypesInstanceTypeArrayOutput() GetInstanceTypesInstanceTypeArrayOutput
	ToGetInstanceTypesInstanceTypeArrayOutputWithContext(context.Context) GetInstanceTypesInstanceTypeArrayOutput
}

GetInstanceTypesInstanceTypeArrayInput is an input type that accepts GetInstanceTypesInstanceTypeArray and GetInstanceTypesInstanceTypeArrayOutput values. You can construct a concrete instance of `GetInstanceTypesInstanceTypeArrayInput` via:

GetInstanceTypesInstanceTypeArray{ GetInstanceTypesInstanceTypeArgs{...} }

type GetInstanceTypesInstanceTypeArrayOutput

type GetInstanceTypesInstanceTypeArrayOutput struct{ *pulumi.OutputState }

func (GetInstanceTypesInstanceTypeArrayOutput) ElementType

func (GetInstanceTypesInstanceTypeArrayOutput) Index

func (GetInstanceTypesInstanceTypeArrayOutput) ToGetInstanceTypesInstanceTypeArrayOutput

func (o GetInstanceTypesInstanceTypeArrayOutput) ToGetInstanceTypesInstanceTypeArrayOutput() GetInstanceTypesInstanceTypeArrayOutput

func (GetInstanceTypesInstanceTypeArrayOutput) ToGetInstanceTypesInstanceTypeArrayOutputWithContext

func (o GetInstanceTypesInstanceTypeArrayOutput) ToGetInstanceTypesInstanceTypeArrayOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeArrayOutput

type GetInstanceTypesInstanceTypeBurstableInstance

type GetInstanceTypesInstanceTypeBurstableInstance struct {
	// The compute performance benchmark CPU credit of a burstable instance.
	BaselineCredit string `pulumi:"baselineCredit"`
	// The initial CPU credit of a burstable instance.
	InitialCredit string `pulumi:"initialCredit"`
}

type GetInstanceTypesInstanceTypeBurstableInstanceArgs

type GetInstanceTypesInstanceTypeBurstableInstanceArgs struct {
	// The compute performance benchmark CPU credit of a burstable instance.
	BaselineCredit pulumi.StringInput `pulumi:"baselineCredit"`
	// The initial CPU credit of a burstable instance.
	InitialCredit pulumi.StringInput `pulumi:"initialCredit"`
}

func (GetInstanceTypesInstanceTypeBurstableInstanceArgs) ElementType

func (GetInstanceTypesInstanceTypeBurstableInstanceArgs) ToGetInstanceTypesInstanceTypeBurstableInstanceOutput

func (i GetInstanceTypesInstanceTypeBurstableInstanceArgs) ToGetInstanceTypesInstanceTypeBurstableInstanceOutput() GetInstanceTypesInstanceTypeBurstableInstanceOutput

func (GetInstanceTypesInstanceTypeBurstableInstanceArgs) ToGetInstanceTypesInstanceTypeBurstableInstanceOutputWithContext

func (i GetInstanceTypesInstanceTypeBurstableInstanceArgs) ToGetInstanceTypesInstanceTypeBurstableInstanceOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeBurstableInstanceOutput

type GetInstanceTypesInstanceTypeBurstableInstanceInput

type GetInstanceTypesInstanceTypeBurstableInstanceInput interface {
	pulumi.Input

	ToGetInstanceTypesInstanceTypeBurstableInstanceOutput() GetInstanceTypesInstanceTypeBurstableInstanceOutput
	ToGetInstanceTypesInstanceTypeBurstableInstanceOutputWithContext(context.Context) GetInstanceTypesInstanceTypeBurstableInstanceOutput
}

GetInstanceTypesInstanceTypeBurstableInstanceInput is an input type that accepts GetInstanceTypesInstanceTypeBurstableInstanceArgs and GetInstanceTypesInstanceTypeBurstableInstanceOutput values. You can construct a concrete instance of `GetInstanceTypesInstanceTypeBurstableInstanceInput` via:

GetInstanceTypesInstanceTypeBurstableInstanceArgs{...}

type GetInstanceTypesInstanceTypeBurstableInstanceOutput

type GetInstanceTypesInstanceTypeBurstableInstanceOutput struct{ *pulumi.OutputState }

func (GetInstanceTypesInstanceTypeBurstableInstanceOutput) BaselineCredit

The compute performance benchmark CPU credit of a burstable instance.

func (GetInstanceTypesInstanceTypeBurstableInstanceOutput) ElementType

func (GetInstanceTypesInstanceTypeBurstableInstanceOutput) InitialCredit

The initial CPU credit of a burstable instance.

func (GetInstanceTypesInstanceTypeBurstableInstanceOutput) ToGetInstanceTypesInstanceTypeBurstableInstanceOutput

func (o GetInstanceTypesInstanceTypeBurstableInstanceOutput) ToGetInstanceTypesInstanceTypeBurstableInstanceOutput() GetInstanceTypesInstanceTypeBurstableInstanceOutput

func (GetInstanceTypesInstanceTypeBurstableInstanceOutput) ToGetInstanceTypesInstanceTypeBurstableInstanceOutputWithContext

func (o GetInstanceTypesInstanceTypeBurstableInstanceOutput) ToGetInstanceTypesInstanceTypeBurstableInstanceOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeBurstableInstanceOutput

type GetInstanceTypesInstanceTypeGpu

type GetInstanceTypesInstanceTypeGpu struct {
	// The number of local storage devices that an instance has been attached to.
	Amount string `pulumi:"amount"`
	// The category of local storage that an instance has been attached to.
	Category string `pulumi:"category"`
}

type GetInstanceTypesInstanceTypeGpuArgs

type GetInstanceTypesInstanceTypeGpuArgs struct {
	// The number of local storage devices that an instance has been attached to.
	Amount pulumi.StringInput `pulumi:"amount"`
	// The category of local storage that an instance has been attached to.
	Category pulumi.StringInput `pulumi:"category"`
}

func (GetInstanceTypesInstanceTypeGpuArgs) ElementType

func (GetInstanceTypesInstanceTypeGpuArgs) ToGetInstanceTypesInstanceTypeGpuOutput

func (i GetInstanceTypesInstanceTypeGpuArgs) ToGetInstanceTypesInstanceTypeGpuOutput() GetInstanceTypesInstanceTypeGpuOutput

func (GetInstanceTypesInstanceTypeGpuArgs) ToGetInstanceTypesInstanceTypeGpuOutputWithContext

func (i GetInstanceTypesInstanceTypeGpuArgs) ToGetInstanceTypesInstanceTypeGpuOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeGpuOutput

type GetInstanceTypesInstanceTypeGpuInput

type GetInstanceTypesInstanceTypeGpuInput interface {
	pulumi.Input

	ToGetInstanceTypesInstanceTypeGpuOutput() GetInstanceTypesInstanceTypeGpuOutput
	ToGetInstanceTypesInstanceTypeGpuOutputWithContext(context.Context) GetInstanceTypesInstanceTypeGpuOutput
}

GetInstanceTypesInstanceTypeGpuInput is an input type that accepts GetInstanceTypesInstanceTypeGpuArgs and GetInstanceTypesInstanceTypeGpuOutput values. You can construct a concrete instance of `GetInstanceTypesInstanceTypeGpuInput` via:

GetInstanceTypesInstanceTypeGpuArgs{...}

type GetInstanceTypesInstanceTypeGpuOutput

type GetInstanceTypesInstanceTypeGpuOutput struct{ *pulumi.OutputState }

func (GetInstanceTypesInstanceTypeGpuOutput) Amount

The number of local storage devices that an instance has been attached to.

func (GetInstanceTypesInstanceTypeGpuOutput) Category

The category of local storage that an instance has been attached to.

func (GetInstanceTypesInstanceTypeGpuOutput) ElementType

func (GetInstanceTypesInstanceTypeGpuOutput) ToGetInstanceTypesInstanceTypeGpuOutput

func (o GetInstanceTypesInstanceTypeGpuOutput) ToGetInstanceTypesInstanceTypeGpuOutput() GetInstanceTypesInstanceTypeGpuOutput

func (GetInstanceTypesInstanceTypeGpuOutput) ToGetInstanceTypesInstanceTypeGpuOutputWithContext

func (o GetInstanceTypesInstanceTypeGpuOutput) ToGetInstanceTypesInstanceTypeGpuOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeGpuOutput

type GetInstanceTypesInstanceTypeInput

type GetInstanceTypesInstanceTypeInput interface {
	pulumi.Input

	ToGetInstanceTypesInstanceTypeOutput() GetInstanceTypesInstanceTypeOutput
	ToGetInstanceTypesInstanceTypeOutputWithContext(context.Context) GetInstanceTypesInstanceTypeOutput
}

GetInstanceTypesInstanceTypeInput is an input type that accepts GetInstanceTypesInstanceTypeArgs and GetInstanceTypesInstanceTypeOutput values. You can construct a concrete instance of `GetInstanceTypesInstanceTypeInput` via:

GetInstanceTypesInstanceTypeArgs{...}

type GetInstanceTypesInstanceTypeLocalStorage

type GetInstanceTypesInstanceTypeLocalStorage struct {
	// The number of local storage devices that an instance has been attached to.
	Amount string `pulumi:"amount"`
	// The capacity of a local storage in GB.
	Capacity string `pulumi:"capacity"`
	// The category of local storage that an instance has been attached to.
	Category string `pulumi:"category"`
}

type GetInstanceTypesInstanceTypeLocalStorageArgs

type GetInstanceTypesInstanceTypeLocalStorageArgs struct {
	// The number of local storage devices that an instance has been attached to.
	Amount pulumi.StringInput `pulumi:"amount"`
	// The capacity of a local storage in GB.
	Capacity pulumi.StringInput `pulumi:"capacity"`
	// The category of local storage that an instance has been attached to.
	Category pulumi.StringInput `pulumi:"category"`
}

func (GetInstanceTypesInstanceTypeLocalStorageArgs) ElementType

func (GetInstanceTypesInstanceTypeLocalStorageArgs) ToGetInstanceTypesInstanceTypeLocalStorageOutput

func (i GetInstanceTypesInstanceTypeLocalStorageArgs) ToGetInstanceTypesInstanceTypeLocalStorageOutput() GetInstanceTypesInstanceTypeLocalStorageOutput

func (GetInstanceTypesInstanceTypeLocalStorageArgs) ToGetInstanceTypesInstanceTypeLocalStorageOutputWithContext

func (i GetInstanceTypesInstanceTypeLocalStorageArgs) ToGetInstanceTypesInstanceTypeLocalStorageOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeLocalStorageOutput

type GetInstanceTypesInstanceTypeLocalStorageInput

type GetInstanceTypesInstanceTypeLocalStorageInput interface {
	pulumi.Input

	ToGetInstanceTypesInstanceTypeLocalStorageOutput() GetInstanceTypesInstanceTypeLocalStorageOutput
	ToGetInstanceTypesInstanceTypeLocalStorageOutputWithContext(context.Context) GetInstanceTypesInstanceTypeLocalStorageOutput
}

GetInstanceTypesInstanceTypeLocalStorageInput is an input type that accepts GetInstanceTypesInstanceTypeLocalStorageArgs and GetInstanceTypesInstanceTypeLocalStorageOutput values. You can construct a concrete instance of `GetInstanceTypesInstanceTypeLocalStorageInput` via:

GetInstanceTypesInstanceTypeLocalStorageArgs{...}

type GetInstanceTypesInstanceTypeLocalStorageOutput

type GetInstanceTypesInstanceTypeLocalStorageOutput struct{ *pulumi.OutputState }

func (GetInstanceTypesInstanceTypeLocalStorageOutput) Amount

The number of local storage devices that an instance has been attached to.

func (GetInstanceTypesInstanceTypeLocalStorageOutput) Capacity

The capacity of a local storage in GB.

func (GetInstanceTypesInstanceTypeLocalStorageOutput) Category

The category of local storage that an instance has been attached to.

func (GetInstanceTypesInstanceTypeLocalStorageOutput) ElementType

func (GetInstanceTypesInstanceTypeLocalStorageOutput) ToGetInstanceTypesInstanceTypeLocalStorageOutput

func (o GetInstanceTypesInstanceTypeLocalStorageOutput) ToGetInstanceTypesInstanceTypeLocalStorageOutput() GetInstanceTypesInstanceTypeLocalStorageOutput

func (GetInstanceTypesInstanceTypeLocalStorageOutput) ToGetInstanceTypesInstanceTypeLocalStorageOutputWithContext

func (o GetInstanceTypesInstanceTypeLocalStorageOutput) ToGetInstanceTypesInstanceTypeLocalStorageOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeLocalStorageOutput

type GetInstanceTypesInstanceTypeOutput

type GetInstanceTypesInstanceTypeOutput struct{ *pulumi.OutputState }

func (GetInstanceTypesInstanceTypeOutput) AvailabilityZones

List of availability zones that support the instance type.

func (GetInstanceTypesInstanceTypeOutput) BurstableInstance

The burstable instance attribution:

func (GetInstanceTypesInstanceTypeOutput) CpuCoreCount

Filter the results to a specific number of cpu cores.

func (GetInstanceTypesInstanceTypeOutput) ElementType

func (GetInstanceTypesInstanceTypeOutput) EniAmount

Filter the result whose network interface number is no more than `eniAmount`.

func (GetInstanceTypesInstanceTypeOutput) Family

The instance type family.

func (GetInstanceTypesInstanceTypeOutput) Gpu

The GPU attribution of an instance type:

func (GetInstanceTypesInstanceTypeOutput) Id

ID of the instance type.

func (GetInstanceTypesInstanceTypeOutput) LocalStorage

Local storage of an instance type:

func (GetInstanceTypesInstanceTypeOutput) MemorySize

Filter the results to a specific memory size in GB.

func (GetInstanceTypesInstanceTypeOutput) Price

func (GetInstanceTypesInstanceTypeOutput) ToGetInstanceTypesInstanceTypeOutput

func (o GetInstanceTypesInstanceTypeOutput) ToGetInstanceTypesInstanceTypeOutput() GetInstanceTypesInstanceTypeOutput

func (GetInstanceTypesInstanceTypeOutput) ToGetInstanceTypesInstanceTypeOutputWithContext

func (o GetInstanceTypesInstanceTypeOutput) ToGetInstanceTypesInstanceTypeOutputWithContext(ctx context.Context) GetInstanceTypesInstanceTypeOutput

type GetInstanceTypesResult

type GetInstanceTypesResult struct {
	AvailabilityZone *string `pulumi:"availabilityZone"`
	// Number of CPU cores.
	CpuCoreCount *int `pulumi:"cpuCoreCount"`
	// The maximum number of network interfaces that an instance type can be attached to.
	EniAmount *int    `pulumi:"eniAmount"`
	GpuAmount *int    `pulumi:"gpuAmount"`
	GpuSpec   *string `pulumi:"gpuSpec"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of instance type IDs.
	Ids                []string `pulumi:"ids"`
	InstanceChargeType *string  `pulumi:"instanceChargeType"`
	InstanceTypeFamily *string  `pulumi:"instanceTypeFamily"`
	// A list of image types. Each element contains the following attributes:
	InstanceTypes      []GetInstanceTypesInstanceType `pulumi:"instanceTypes"`
	IsOutdated         *bool                          `pulumi:"isOutdated"`
	KubernetesNodeRole *string                        `pulumi:"kubernetesNodeRole"`
	// Size of memory, measured in GB.
	MemorySize   *float64 `pulumi:"memorySize"`
	NetworkType  *string  `pulumi:"networkType"`
	OutputFile   *string  `pulumi:"outputFile"`
	SortedBy     *string  `pulumi:"sortedBy"`
	SpotStrategy *string  `pulumi:"spotStrategy"`
}

A collection of values returned by getInstanceTypes.

func GetInstanceTypes

func GetInstanceTypes(ctx *pulumi.Context, args *GetInstanceTypesArgs, opts ...pulumi.InvokeOption) (*GetInstanceTypesResult, error)

This data source provides the ECS instance types of Alibaba Cloud.

> **NOTE:** By default, only the upgraded instance types are returned. If you want to get outdated instance types, you must set `isOutdated` to true.

> **NOTE:** If one instance type is sold out, it will not be exported.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := 1
		opt1 := 2
		typesDs, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
			CpuCoreCount: &opt0,
			MemorySize:   &opt1,
		}, nil)
		if err != nil {
			return err
		}
		_, err = ecs.NewInstance(ctx, "instance", &ecs.InstanceArgs{
			InstanceType: pulumi.String(typesDs.InstanceTypes[0].Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetInstancesArgs

type GetInstancesArgs struct {
	// Availability zone where instances are located.
	AvailabilityZone *string `pulumi:"availabilityZone"`
	// A list of ECS instance IDs.
	Ids []string `pulumi:"ids"`
	// The image ID of some ECS instance used.
	ImageId *string `pulumi:"imageId"`
	// A regex string to filter results by instance name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// The RAM role name which the instance attaches.
	RamRoleName *string `pulumi:"ramRoleName"`
	// The Id of resource group which the instance belongs.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// Instance status. Valid values: "Creating", "Starting", "Running", "Stopping" and "Stopped". If undefined, all statuses are considered.
	Status *string `pulumi:"status"`
	// A map of tags assigned to the ECS instances. It must be in the format:
	// “`go
	// package main
	//
	// import (
	// 	"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
	// 	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
	// )
	//
	// func main() {
	// 	pulumi.Run(func(ctx *pulumi.Context) error {
	// 		_, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
	// 			Tags: map[string]interface{}{
	// 				"tagKey1": "tagValue1",
	// 				"tagKey2": "tagValue2",
	// 			},
	// 		}, nil)
	// 		if err != nil {
	// 			return err
	// 		}
	// 		return nil
	// 	})
	// }
	// “`
	Tags map[string]interface{} `pulumi:"tags"`
	// ID of the VPC linked to the instances.
	VpcId *string `pulumi:"vpcId"`
	// ID of the VSwitch linked to the instances.
	VswitchId *string `pulumi:"vswitchId"`
}

A collection of arguments for invoking getInstances.

type GetInstancesInstance

type GetInstancesInstance struct {
	// Availability zone where instances are located.
	AvailabilityZone string `pulumi:"availabilityZone"`
	// Instance creation time.
	CreationTime string `pulumi:"creationTime"`
	// Instance description.
	Description string `pulumi:"description"`
	// Description of the attached disks.
	DiskDeviceMappings []GetInstancesInstanceDiskDeviceMapping `pulumi:"diskDeviceMappings"`
	// EIP address the VPC instance is using.
	Eip string `pulumi:"eip"`
	// ID of the instance.
	Id string `pulumi:"id"`
	// The image ID of some ECS instance used.
	ImageId string `pulumi:"imageId"`
	// Instance charge type.
	InstanceChargeType string `pulumi:"instanceChargeType"`
	// Instance type.
	InstanceType string `pulumi:"instanceType"`
	// Instance network charge type.
	InternetChargeType string `pulumi:"internetChargeType"`
	// Max output bandwidth for internet.
	InternetMaxBandwidthOut int `pulumi:"internetMaxBandwidthOut"`
	// Key pair the instance is using.
	KeyName string `pulumi:"keyName"`
	// Instance name.
	Name string `pulumi:"name"`
	// Instance private IP address.
	PrivateIp string `pulumi:"privateIp"`
	// Instance public IP address.
	PublicIp string `pulumi:"publicIp"`
	// The RAM role name which the instance attaches.
	RamRoleName string `pulumi:"ramRoleName"`
	// Region ID the instance belongs to.
	RegionId string `pulumi:"regionId"`
	// The Id of resource group which the instance belongs.
	ResourceGroupId string `pulumi:"resourceGroupId"`
	// List of security group IDs the instance belongs to.
	SecurityGroups []string `pulumi:"securityGroups"`
	// Spot strategy the instance is using.
	SpotStrategy string `pulumi:"spotStrategy"`
	// Instance status. Valid values: "Creating", "Starting", "Running", "Stopping" and "Stopped". If undefined, all statuses are considered.
	Status string `pulumi:"status"`
	// A map of tags assigned to the ECS instances. It must be in the format:
	// “`go
	// package main
	//
	// import (
	// 	"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
	// 	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
	// )
	//
	// func main() {
	// 	pulumi.Run(func(ctx *pulumi.Context) error {
	// 		_, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
	// 			Tags: map[string]interface{}{
	// 				"tagKey1": "tagValue1",
	// 				"tagKey2": "tagValue2",
	// 			},
	// 		}, nil)
	// 		if err != nil {
	// 			return err
	// 		}
	// 		return nil
	// 	})
	// }
	// “`
	Tags map[string]interface{} `pulumi:"tags"`
	// ID of the VPC linked to the instances.
	VpcId string `pulumi:"vpcId"`
	// ID of the VSwitch linked to the instances.
	VswitchId string `pulumi:"vswitchId"`
}

type GetInstancesInstanceArgs

type GetInstancesInstanceArgs struct {
	// Availability zone where instances are located.
	AvailabilityZone pulumi.StringInput `pulumi:"availabilityZone"`
	// Instance creation time.
	CreationTime pulumi.StringInput `pulumi:"creationTime"`
	// Instance description.
	Description pulumi.StringInput `pulumi:"description"`
	// Description of the attached disks.
	DiskDeviceMappings GetInstancesInstanceDiskDeviceMappingArrayInput `pulumi:"diskDeviceMappings"`
	// EIP address the VPC instance is using.
	Eip pulumi.StringInput `pulumi:"eip"`
	// ID of the instance.
	Id pulumi.StringInput `pulumi:"id"`
	// The image ID of some ECS instance used.
	ImageId pulumi.StringInput `pulumi:"imageId"`
	// Instance charge type.
	InstanceChargeType pulumi.StringInput `pulumi:"instanceChargeType"`
	// Instance type.
	InstanceType pulumi.StringInput `pulumi:"instanceType"`
	// Instance network charge type.
	InternetChargeType pulumi.StringInput `pulumi:"internetChargeType"`
	// Max output bandwidth for internet.
	InternetMaxBandwidthOut pulumi.IntInput `pulumi:"internetMaxBandwidthOut"`
	// Key pair the instance is using.
	KeyName pulumi.StringInput `pulumi:"keyName"`
	// Instance name.
	Name pulumi.StringInput `pulumi:"name"`
	// Instance private IP address.
	PrivateIp pulumi.StringInput `pulumi:"privateIp"`
	// Instance public IP address.
	PublicIp pulumi.StringInput `pulumi:"publicIp"`
	// The RAM role name which the instance attaches.
	RamRoleName pulumi.StringInput `pulumi:"ramRoleName"`
	// Region ID the instance belongs to.
	RegionId pulumi.StringInput `pulumi:"regionId"`
	// The Id of resource group which the instance belongs.
	ResourceGroupId pulumi.StringInput `pulumi:"resourceGroupId"`
	// List of security group IDs the instance belongs to.
	SecurityGroups pulumi.StringArrayInput `pulumi:"securityGroups"`
	// Spot strategy the instance is using.
	SpotStrategy pulumi.StringInput `pulumi:"spotStrategy"`
	// Instance status. Valid values: "Creating", "Starting", "Running", "Stopping" and "Stopped". If undefined, all statuses are considered.
	Status pulumi.StringInput `pulumi:"status"`
	// A map of tags assigned to the ECS instances. It must be in the format:
	// “`go
	// package main
	//
	// import (
	// 	"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
	// 	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
	// )
	//
	// func main() {
	// 	pulumi.Run(func(ctx *pulumi.Context) error {
	// 		_, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
	// 			Tags: map[string]interface{}{
	// 				"tagKey1": "tagValue1",
	// 				"tagKey2": "tagValue2",
	// 			},
	// 		}, nil)
	// 		if err != nil {
	// 			return err
	// 		}
	// 		return nil
	// 	})
	// }
	// “`
	Tags pulumi.MapInput `pulumi:"tags"`
	// ID of the VPC linked to the instances.
	VpcId pulumi.StringInput `pulumi:"vpcId"`
	// ID of the VSwitch linked to the instances.
	VswitchId pulumi.StringInput `pulumi:"vswitchId"`
}

func (GetInstancesInstanceArgs) ElementType

func (GetInstancesInstanceArgs) ElementType() reflect.Type

func (GetInstancesInstanceArgs) ToGetInstancesInstanceOutput

func (i GetInstancesInstanceArgs) ToGetInstancesInstanceOutput() GetInstancesInstanceOutput

func (GetInstancesInstanceArgs) ToGetInstancesInstanceOutputWithContext

func (i GetInstancesInstanceArgs) ToGetInstancesInstanceOutputWithContext(ctx context.Context) GetInstancesInstanceOutput

type GetInstancesInstanceArray

type GetInstancesInstanceArray []GetInstancesInstanceInput

func (GetInstancesInstanceArray) ElementType

func (GetInstancesInstanceArray) ElementType() reflect.Type

func (GetInstancesInstanceArray) ToGetInstancesInstanceArrayOutput

func (i GetInstancesInstanceArray) ToGetInstancesInstanceArrayOutput() GetInstancesInstanceArrayOutput

func (GetInstancesInstanceArray) ToGetInstancesInstanceArrayOutputWithContext

func (i GetInstancesInstanceArray) ToGetInstancesInstanceArrayOutputWithContext(ctx context.Context) GetInstancesInstanceArrayOutput

type GetInstancesInstanceArrayInput

type GetInstancesInstanceArrayInput interface {
	pulumi.Input

	ToGetInstancesInstanceArrayOutput() GetInstancesInstanceArrayOutput
	ToGetInstancesInstanceArrayOutputWithContext(context.Context) GetInstancesInstanceArrayOutput
}

GetInstancesInstanceArrayInput is an input type that accepts GetInstancesInstanceArray and GetInstancesInstanceArrayOutput values. You can construct a concrete instance of `GetInstancesInstanceArrayInput` via:

GetInstancesInstanceArray{ GetInstancesInstanceArgs{...} }

type GetInstancesInstanceArrayOutput

type GetInstancesInstanceArrayOutput struct{ *pulumi.OutputState }

func (GetInstancesInstanceArrayOutput) ElementType

func (GetInstancesInstanceArrayOutput) Index

func (GetInstancesInstanceArrayOutput) ToGetInstancesInstanceArrayOutput

func (o GetInstancesInstanceArrayOutput) ToGetInstancesInstanceArrayOutput() GetInstancesInstanceArrayOutput

func (GetInstancesInstanceArrayOutput) ToGetInstancesInstanceArrayOutputWithContext

func (o GetInstancesInstanceArrayOutput) ToGetInstancesInstanceArrayOutputWithContext(ctx context.Context) GetInstancesInstanceArrayOutput

type GetInstancesInstanceDiskDeviceMapping

type GetInstancesInstanceDiskDeviceMapping struct {
	// Cloud disk category.
	Category string `pulumi:"category"`
	// Device information of the created disk: such as /dev/xvdb.
	Device string `pulumi:"device"`
	// Size of the created disk.
	Size int `pulumi:"size"`
	// Cloud disk type: system disk or data disk.
	Type string `pulumi:"type"`
}

type GetInstancesInstanceDiskDeviceMappingArgs

type GetInstancesInstanceDiskDeviceMappingArgs struct {
	// Cloud disk category.
	Category pulumi.StringInput `pulumi:"category"`
	// Device information of the created disk: such as /dev/xvdb.
	Device pulumi.StringInput `pulumi:"device"`
	// Size of the created disk.
	Size pulumi.IntInput `pulumi:"size"`
	// Cloud disk type: system disk or data disk.
	Type pulumi.StringInput `pulumi:"type"`
}

func (GetInstancesInstanceDiskDeviceMappingArgs) ElementType

func (GetInstancesInstanceDiskDeviceMappingArgs) ToGetInstancesInstanceDiskDeviceMappingOutput

func (i GetInstancesInstanceDiskDeviceMappingArgs) ToGetInstancesInstanceDiskDeviceMappingOutput() GetInstancesInstanceDiskDeviceMappingOutput

func (GetInstancesInstanceDiskDeviceMappingArgs) ToGetInstancesInstanceDiskDeviceMappingOutputWithContext

func (i GetInstancesInstanceDiskDeviceMappingArgs) ToGetInstancesInstanceDiskDeviceMappingOutputWithContext(ctx context.Context) GetInstancesInstanceDiskDeviceMappingOutput

type GetInstancesInstanceDiskDeviceMappingArray

type GetInstancesInstanceDiskDeviceMappingArray []GetInstancesInstanceDiskDeviceMappingInput

func (GetInstancesInstanceDiskDeviceMappingArray) ElementType

func (GetInstancesInstanceDiskDeviceMappingArray) ToGetInstancesInstanceDiskDeviceMappingArrayOutput

func (i GetInstancesInstanceDiskDeviceMappingArray) ToGetInstancesInstanceDiskDeviceMappingArrayOutput() GetInstancesInstanceDiskDeviceMappingArrayOutput

func (GetInstancesInstanceDiskDeviceMappingArray) ToGetInstancesInstanceDiskDeviceMappingArrayOutputWithContext

func (i GetInstancesInstanceDiskDeviceMappingArray) ToGetInstancesInstanceDiskDeviceMappingArrayOutputWithContext(ctx context.Context) GetInstancesInstanceDiskDeviceMappingArrayOutput

type GetInstancesInstanceDiskDeviceMappingArrayInput

type GetInstancesInstanceDiskDeviceMappingArrayInput interface {
	pulumi.Input

	ToGetInstancesInstanceDiskDeviceMappingArrayOutput() GetInstancesInstanceDiskDeviceMappingArrayOutput
	ToGetInstancesInstanceDiskDeviceMappingArrayOutputWithContext(context.Context) GetInstancesInstanceDiskDeviceMappingArrayOutput
}

GetInstancesInstanceDiskDeviceMappingArrayInput is an input type that accepts GetInstancesInstanceDiskDeviceMappingArray and GetInstancesInstanceDiskDeviceMappingArrayOutput values. You can construct a concrete instance of `GetInstancesInstanceDiskDeviceMappingArrayInput` via:

GetInstancesInstanceDiskDeviceMappingArray{ GetInstancesInstanceDiskDeviceMappingArgs{...} }

type GetInstancesInstanceDiskDeviceMappingArrayOutput

type GetInstancesInstanceDiskDeviceMappingArrayOutput struct{ *pulumi.OutputState }

func (GetInstancesInstanceDiskDeviceMappingArrayOutput) ElementType

func (GetInstancesInstanceDiskDeviceMappingArrayOutput) Index

func (GetInstancesInstanceDiskDeviceMappingArrayOutput) ToGetInstancesInstanceDiskDeviceMappingArrayOutput

func (o GetInstancesInstanceDiskDeviceMappingArrayOutput) ToGetInstancesInstanceDiskDeviceMappingArrayOutput() GetInstancesInstanceDiskDeviceMappingArrayOutput

func (GetInstancesInstanceDiskDeviceMappingArrayOutput) ToGetInstancesInstanceDiskDeviceMappingArrayOutputWithContext

func (o GetInstancesInstanceDiskDeviceMappingArrayOutput) ToGetInstancesInstanceDiskDeviceMappingArrayOutputWithContext(ctx context.Context) GetInstancesInstanceDiskDeviceMappingArrayOutput

type GetInstancesInstanceDiskDeviceMappingInput

type GetInstancesInstanceDiskDeviceMappingInput interface {
	pulumi.Input

	ToGetInstancesInstanceDiskDeviceMappingOutput() GetInstancesInstanceDiskDeviceMappingOutput
	ToGetInstancesInstanceDiskDeviceMappingOutputWithContext(context.Context) GetInstancesInstanceDiskDeviceMappingOutput
}

GetInstancesInstanceDiskDeviceMappingInput is an input type that accepts GetInstancesInstanceDiskDeviceMappingArgs and GetInstancesInstanceDiskDeviceMappingOutput values. You can construct a concrete instance of `GetInstancesInstanceDiskDeviceMappingInput` via:

GetInstancesInstanceDiskDeviceMappingArgs{...}

type GetInstancesInstanceDiskDeviceMappingOutput

type GetInstancesInstanceDiskDeviceMappingOutput struct{ *pulumi.OutputState }

func (GetInstancesInstanceDiskDeviceMappingOutput) Category

Cloud disk category.

func (GetInstancesInstanceDiskDeviceMappingOutput) Device

Device information of the created disk: such as /dev/xvdb.

func (GetInstancesInstanceDiskDeviceMappingOutput) ElementType

func (GetInstancesInstanceDiskDeviceMappingOutput) Size

Size of the created disk.

func (GetInstancesInstanceDiskDeviceMappingOutput) ToGetInstancesInstanceDiskDeviceMappingOutput

func (o GetInstancesInstanceDiskDeviceMappingOutput) ToGetInstancesInstanceDiskDeviceMappingOutput() GetInstancesInstanceDiskDeviceMappingOutput

func (GetInstancesInstanceDiskDeviceMappingOutput) ToGetInstancesInstanceDiskDeviceMappingOutputWithContext

func (o GetInstancesInstanceDiskDeviceMappingOutput) ToGetInstancesInstanceDiskDeviceMappingOutputWithContext(ctx context.Context) GetInstancesInstanceDiskDeviceMappingOutput

func (GetInstancesInstanceDiskDeviceMappingOutput) Type

Cloud disk type: system disk or data disk.

type GetInstancesInstanceInput

type GetInstancesInstanceInput interface {
	pulumi.Input

	ToGetInstancesInstanceOutput() GetInstancesInstanceOutput
	ToGetInstancesInstanceOutputWithContext(context.Context) GetInstancesInstanceOutput
}

GetInstancesInstanceInput is an input type that accepts GetInstancesInstanceArgs and GetInstancesInstanceOutput values. You can construct a concrete instance of `GetInstancesInstanceInput` via:

GetInstancesInstanceArgs{...}

type GetInstancesInstanceOutput

type GetInstancesInstanceOutput struct{ *pulumi.OutputState }

func (GetInstancesInstanceOutput) AvailabilityZone

func (o GetInstancesInstanceOutput) AvailabilityZone() pulumi.StringOutput

Availability zone where instances are located.

func (GetInstancesInstanceOutput) CreationTime

Instance creation time.

func (GetInstancesInstanceOutput) Description

Instance description.

func (GetInstancesInstanceOutput) DiskDeviceMappings

Description of the attached disks.

func (GetInstancesInstanceOutput) Eip

EIP address the VPC instance is using.

func (GetInstancesInstanceOutput) ElementType

func (GetInstancesInstanceOutput) ElementType() reflect.Type

func (GetInstancesInstanceOutput) Id

ID of the instance.

func (GetInstancesInstanceOutput) ImageId

The image ID of some ECS instance used.

func (GetInstancesInstanceOutput) InstanceChargeType

func (o GetInstancesInstanceOutput) InstanceChargeType() pulumi.StringOutput

Instance charge type.

func (GetInstancesInstanceOutput) InstanceType

Instance type.

func (GetInstancesInstanceOutput) InternetChargeType

func (o GetInstancesInstanceOutput) InternetChargeType() pulumi.StringOutput

Instance network charge type.

func (GetInstancesInstanceOutput) InternetMaxBandwidthOut

func (o GetInstancesInstanceOutput) InternetMaxBandwidthOut() pulumi.IntOutput

Max output bandwidth for internet.

func (GetInstancesInstanceOutput) KeyName

Key pair the instance is using.

func (GetInstancesInstanceOutput) Name

Instance name.

func (GetInstancesInstanceOutput) PrivateIp

Instance private IP address.

func (GetInstancesInstanceOutput) PublicIp

Instance public IP address.

func (GetInstancesInstanceOutput) RamRoleName

The RAM role name which the instance attaches.

func (GetInstancesInstanceOutput) RegionId

Region ID the instance belongs to.

func (GetInstancesInstanceOutput) ResourceGroupId

func (o GetInstancesInstanceOutput) ResourceGroupId() pulumi.StringOutput

The Id of resource group which the instance belongs.

func (GetInstancesInstanceOutput) SecurityGroups

List of security group IDs the instance belongs to.

func (GetInstancesInstanceOutput) SpotStrategy

Spot strategy the instance is using.

func (GetInstancesInstanceOutput) Status

Instance status. Valid values: "Creating", "Starting", "Running", "Stopping" and "Stopped". If undefined, all statuses are considered.

func (GetInstancesInstanceOutput) Tags

A map of tags assigned to the ECS instances. It must be in the format: ```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
			Tags: map[string]interface{}{
				"tagKey1": "tagValue1",
				"tagKey2": "tagValue2",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

func (GetInstancesInstanceOutput) ToGetInstancesInstanceOutput

func (o GetInstancesInstanceOutput) ToGetInstancesInstanceOutput() GetInstancesInstanceOutput

func (GetInstancesInstanceOutput) ToGetInstancesInstanceOutputWithContext

func (o GetInstancesInstanceOutput) ToGetInstancesInstanceOutputWithContext(ctx context.Context) GetInstancesInstanceOutput

func (GetInstancesInstanceOutput) VpcId

ID of the VPC linked to the instances.

func (GetInstancesInstanceOutput) VswitchId

ID of the VSwitch linked to the instances.

type GetInstancesResult

type GetInstancesResult struct {
	// Availability zone the instance belongs to.
	AvailabilityZone *string `pulumi:"availabilityZone"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of ECS instance IDs.
	Ids []string `pulumi:"ids"`
	// Image ID the instance is using.
	ImageId *string `pulumi:"imageId"`
	// A list of instances. Each element contains the following attributes:
	Instances []GetInstancesInstance `pulumi:"instances"`
	NameRegex *string                `pulumi:"nameRegex"`
	// A list of instances names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	// The Ram role name.
	RamRoleName *string `pulumi:"ramRoleName"`
	// The Id of resource group.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// Instance current status.
	Status *string `pulumi:"status"`
	// A map of tags assigned to the ECS instance.
	Tags map[string]interface{} `pulumi:"tags"`
	// ID of the VPC the instance belongs to.
	VpcId *string `pulumi:"vpcId"`
	// ID of the VSwitch the instance belongs to.
	VswitchId *string `pulumi:"vswitchId"`
}

A collection of values returned by getInstances.

func GetInstances

func GetInstances(ctx *pulumi.Context, args *GetInstancesArgs, opts ...pulumi.InvokeOption) (*GetInstancesResult, error)

The Instances data source list ECS instance resources according to their ID, name regex, image id, status and other fields.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "web_server"
		opt1 := "Running"
		instancesDs, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
			NameRegex: &opt0,
			Status:    &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstInstanceId", instancesDs.Instances[0].Id)
		ctx.Export("instanceIds", instancesDs.Ids)
		return nil
	})
}

```

type GetKeyPairsArgs

type GetKeyPairsArgs struct {
	// A finger print used to retrieve specified key pair.
	FingerPrint *string `pulumi:"fingerPrint"`
	// A list of key pair IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to apply to the resulting key pairs.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// The Id of resource group which the key pair belongs.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
}

A collection of arguments for invoking getKeyPairs.

type GetKeyPairsKeyPair

type GetKeyPairsKeyPair struct {
	// A finger print used to retrieve specified key pair.
	FingerPrint string `pulumi:"fingerPrint"`
	// ID of the key pair.
	Id string `pulumi:"id"`
	// A list of ECS instances that has been bound this key pair.
	Instances []GetKeyPairsKeyPairInstance `pulumi:"instances"`
	// Name of the key pair.
	KeyName string `pulumi:"keyName"`
	// The Id of resource group which the key pair belongs.
	ResourceGroupId string `pulumi:"resourceGroupId"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
}

type GetKeyPairsKeyPairArgs

type GetKeyPairsKeyPairArgs struct {
	// A finger print used to retrieve specified key pair.
	FingerPrint pulumi.StringInput `pulumi:"fingerPrint"`
	// ID of the key pair.
	Id pulumi.StringInput `pulumi:"id"`
	// A list of ECS instances that has been bound this key pair.
	Instances GetKeyPairsKeyPairInstanceArrayInput `pulumi:"instances"`
	// Name of the key pair.
	KeyName pulumi.StringInput `pulumi:"keyName"`
	// The Id of resource group which the key pair belongs.
	ResourceGroupId pulumi.StringInput `pulumi:"resourceGroupId"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput `pulumi:"tags"`
}

func (GetKeyPairsKeyPairArgs) ElementType

func (GetKeyPairsKeyPairArgs) ElementType() reflect.Type

func (GetKeyPairsKeyPairArgs) ToGetKeyPairsKeyPairOutput

func (i GetKeyPairsKeyPairArgs) ToGetKeyPairsKeyPairOutput() GetKeyPairsKeyPairOutput

func (GetKeyPairsKeyPairArgs) ToGetKeyPairsKeyPairOutputWithContext

func (i GetKeyPairsKeyPairArgs) ToGetKeyPairsKeyPairOutputWithContext(ctx context.Context) GetKeyPairsKeyPairOutput

type GetKeyPairsKeyPairArray

type GetKeyPairsKeyPairArray []GetKeyPairsKeyPairInput

func (GetKeyPairsKeyPairArray) ElementType

func (GetKeyPairsKeyPairArray) ElementType() reflect.Type

func (GetKeyPairsKeyPairArray) ToGetKeyPairsKeyPairArrayOutput

func (i GetKeyPairsKeyPairArray) ToGetKeyPairsKeyPairArrayOutput() GetKeyPairsKeyPairArrayOutput

func (GetKeyPairsKeyPairArray) ToGetKeyPairsKeyPairArrayOutputWithContext

func (i GetKeyPairsKeyPairArray) ToGetKeyPairsKeyPairArrayOutputWithContext(ctx context.Context) GetKeyPairsKeyPairArrayOutput

type GetKeyPairsKeyPairArrayInput

type GetKeyPairsKeyPairArrayInput interface {
	pulumi.Input

	ToGetKeyPairsKeyPairArrayOutput() GetKeyPairsKeyPairArrayOutput
	ToGetKeyPairsKeyPairArrayOutputWithContext(context.Context) GetKeyPairsKeyPairArrayOutput
}

GetKeyPairsKeyPairArrayInput is an input type that accepts GetKeyPairsKeyPairArray and GetKeyPairsKeyPairArrayOutput values. You can construct a concrete instance of `GetKeyPairsKeyPairArrayInput` via:

GetKeyPairsKeyPairArray{ GetKeyPairsKeyPairArgs{...} }

type GetKeyPairsKeyPairArrayOutput

type GetKeyPairsKeyPairArrayOutput struct{ *pulumi.OutputState }

func (GetKeyPairsKeyPairArrayOutput) ElementType

func (GetKeyPairsKeyPairArrayOutput) Index

func (GetKeyPairsKeyPairArrayOutput) ToGetKeyPairsKeyPairArrayOutput

func (o GetKeyPairsKeyPairArrayOutput) ToGetKeyPairsKeyPairArrayOutput() GetKeyPairsKeyPairArrayOutput

func (GetKeyPairsKeyPairArrayOutput) ToGetKeyPairsKeyPairArrayOutputWithContext

func (o GetKeyPairsKeyPairArrayOutput) ToGetKeyPairsKeyPairArrayOutputWithContext(ctx context.Context) GetKeyPairsKeyPairArrayOutput

type GetKeyPairsKeyPairInput

type GetKeyPairsKeyPairInput interface {
	pulumi.Input

	ToGetKeyPairsKeyPairOutput() GetKeyPairsKeyPairOutput
	ToGetKeyPairsKeyPairOutputWithContext(context.Context) GetKeyPairsKeyPairOutput
}

GetKeyPairsKeyPairInput is an input type that accepts GetKeyPairsKeyPairArgs and GetKeyPairsKeyPairOutput values. You can construct a concrete instance of `GetKeyPairsKeyPairInput` via:

GetKeyPairsKeyPairArgs{...}

type GetKeyPairsKeyPairInstance

type GetKeyPairsKeyPairInstance struct {
	// The ID of the availability zone where the ECS instance is located.
	AvailabilityZone string `pulumi:"availabilityZone"`
	Description      string `pulumi:"description"`
	ImageId          string `pulumi:"imageId"`
	// The ID of the ECS instance.
	InstanceId string `pulumi:"instanceId"`
	// The name of the ECS instance.
	InstanceName string `pulumi:"instanceName"`
	InstanceType string `pulumi:"instanceType"`
	// Name of the key pair.
	KeyName string `pulumi:"keyName"`
	// The private IP address of the ECS instance.
	PrivateIp string `pulumi:"privateIp"`
	// The public IP address or EIP of the ECS instance.
	PublicIp string `pulumi:"publicIp"`
	RegionId string `pulumi:"regionId"`
	Status   string `pulumi:"status"`
	// The ID of the VSwitch attached to the ECS instance.
	VswitchId string `pulumi:"vswitchId"`
}

type GetKeyPairsKeyPairInstanceArgs

type GetKeyPairsKeyPairInstanceArgs struct {
	// The ID of the availability zone where the ECS instance is located.
	AvailabilityZone pulumi.StringInput `pulumi:"availabilityZone"`
	Description      pulumi.StringInput `pulumi:"description"`
	ImageId          pulumi.StringInput `pulumi:"imageId"`
	// The ID of the ECS instance.
	InstanceId pulumi.StringInput `pulumi:"instanceId"`
	// The name of the ECS instance.
	InstanceName pulumi.StringInput `pulumi:"instanceName"`
	InstanceType pulumi.StringInput `pulumi:"instanceType"`
	// Name of the key pair.
	KeyName pulumi.StringInput `pulumi:"keyName"`
	// The private IP address of the ECS instance.
	PrivateIp pulumi.StringInput `pulumi:"privateIp"`
	// The public IP address or EIP of the ECS instance.
	PublicIp pulumi.StringInput `pulumi:"publicIp"`
	RegionId pulumi.StringInput `pulumi:"regionId"`
	Status   pulumi.StringInput `pulumi:"status"`
	// The ID of the VSwitch attached to the ECS instance.
	VswitchId pulumi.StringInput `pulumi:"vswitchId"`
}

func (GetKeyPairsKeyPairInstanceArgs) ElementType

func (GetKeyPairsKeyPairInstanceArgs) ToGetKeyPairsKeyPairInstanceOutput

func (i GetKeyPairsKeyPairInstanceArgs) ToGetKeyPairsKeyPairInstanceOutput() GetKeyPairsKeyPairInstanceOutput

func (GetKeyPairsKeyPairInstanceArgs) ToGetKeyPairsKeyPairInstanceOutputWithContext

func (i GetKeyPairsKeyPairInstanceArgs) ToGetKeyPairsKeyPairInstanceOutputWithContext(ctx context.Context) GetKeyPairsKeyPairInstanceOutput

type GetKeyPairsKeyPairInstanceArray

type GetKeyPairsKeyPairInstanceArray []GetKeyPairsKeyPairInstanceInput

func (GetKeyPairsKeyPairInstanceArray) ElementType

func (GetKeyPairsKeyPairInstanceArray) ToGetKeyPairsKeyPairInstanceArrayOutput

func (i GetKeyPairsKeyPairInstanceArray) ToGetKeyPairsKeyPairInstanceArrayOutput() GetKeyPairsKeyPairInstanceArrayOutput

func (GetKeyPairsKeyPairInstanceArray) ToGetKeyPairsKeyPairInstanceArrayOutputWithContext

func (i GetKeyPairsKeyPairInstanceArray) ToGetKeyPairsKeyPairInstanceArrayOutputWithContext(ctx context.Context) GetKeyPairsKeyPairInstanceArrayOutput

type GetKeyPairsKeyPairInstanceArrayInput

type GetKeyPairsKeyPairInstanceArrayInput interface {
	pulumi.Input

	ToGetKeyPairsKeyPairInstanceArrayOutput() GetKeyPairsKeyPairInstanceArrayOutput
	ToGetKeyPairsKeyPairInstanceArrayOutputWithContext(context.Context) GetKeyPairsKeyPairInstanceArrayOutput
}

GetKeyPairsKeyPairInstanceArrayInput is an input type that accepts GetKeyPairsKeyPairInstanceArray and GetKeyPairsKeyPairInstanceArrayOutput values. You can construct a concrete instance of `GetKeyPairsKeyPairInstanceArrayInput` via:

GetKeyPairsKeyPairInstanceArray{ GetKeyPairsKeyPairInstanceArgs{...} }

type GetKeyPairsKeyPairInstanceArrayOutput

type GetKeyPairsKeyPairInstanceArrayOutput struct{ *pulumi.OutputState }

func (GetKeyPairsKeyPairInstanceArrayOutput) ElementType

func (GetKeyPairsKeyPairInstanceArrayOutput) Index

func (GetKeyPairsKeyPairInstanceArrayOutput) ToGetKeyPairsKeyPairInstanceArrayOutput

func (o GetKeyPairsKeyPairInstanceArrayOutput) ToGetKeyPairsKeyPairInstanceArrayOutput() GetKeyPairsKeyPairInstanceArrayOutput

func (GetKeyPairsKeyPairInstanceArrayOutput) ToGetKeyPairsKeyPairInstanceArrayOutputWithContext

func (o GetKeyPairsKeyPairInstanceArrayOutput) ToGetKeyPairsKeyPairInstanceArrayOutputWithContext(ctx context.Context) GetKeyPairsKeyPairInstanceArrayOutput

type GetKeyPairsKeyPairInstanceInput

type GetKeyPairsKeyPairInstanceInput interface {
	pulumi.Input

	ToGetKeyPairsKeyPairInstanceOutput() GetKeyPairsKeyPairInstanceOutput
	ToGetKeyPairsKeyPairInstanceOutputWithContext(context.Context) GetKeyPairsKeyPairInstanceOutput
}

GetKeyPairsKeyPairInstanceInput is an input type that accepts GetKeyPairsKeyPairInstanceArgs and GetKeyPairsKeyPairInstanceOutput values. You can construct a concrete instance of `GetKeyPairsKeyPairInstanceInput` via:

GetKeyPairsKeyPairInstanceArgs{...}

type GetKeyPairsKeyPairInstanceOutput

type GetKeyPairsKeyPairInstanceOutput struct{ *pulumi.OutputState }

func (GetKeyPairsKeyPairInstanceOutput) AvailabilityZone

The ID of the availability zone where the ECS instance is located.

func (GetKeyPairsKeyPairInstanceOutput) Description

func (GetKeyPairsKeyPairInstanceOutput) ElementType

func (GetKeyPairsKeyPairInstanceOutput) ImageId

func (GetKeyPairsKeyPairInstanceOutput) InstanceId

The ID of the ECS instance.

func (GetKeyPairsKeyPairInstanceOutput) InstanceName

The name of the ECS instance.

func (GetKeyPairsKeyPairInstanceOutput) InstanceType

func (GetKeyPairsKeyPairInstanceOutput) KeyName

Name of the key pair.

func (GetKeyPairsKeyPairInstanceOutput) PrivateIp

The private IP address of the ECS instance.

func (GetKeyPairsKeyPairInstanceOutput) PublicIp

The public IP address or EIP of the ECS instance.

func (GetKeyPairsKeyPairInstanceOutput) RegionId

func (GetKeyPairsKeyPairInstanceOutput) Status

func (GetKeyPairsKeyPairInstanceOutput) ToGetKeyPairsKeyPairInstanceOutput

func (o GetKeyPairsKeyPairInstanceOutput) ToGetKeyPairsKeyPairInstanceOutput() GetKeyPairsKeyPairInstanceOutput

func (GetKeyPairsKeyPairInstanceOutput) ToGetKeyPairsKeyPairInstanceOutputWithContext

func (o GetKeyPairsKeyPairInstanceOutput) ToGetKeyPairsKeyPairInstanceOutputWithContext(ctx context.Context) GetKeyPairsKeyPairInstanceOutput

func (GetKeyPairsKeyPairInstanceOutput) VswitchId

The ID of the VSwitch attached to the ECS instance.

type GetKeyPairsKeyPairOutput

type GetKeyPairsKeyPairOutput struct{ *pulumi.OutputState }

func (GetKeyPairsKeyPairOutput) ElementType

func (GetKeyPairsKeyPairOutput) ElementType() reflect.Type

func (GetKeyPairsKeyPairOutput) FingerPrint

A finger print used to retrieve specified key pair.

func (GetKeyPairsKeyPairOutput) Id

ID of the key pair.

func (GetKeyPairsKeyPairOutput) Instances

A list of ECS instances that has been bound this key pair.

func (GetKeyPairsKeyPairOutput) KeyName

Name of the key pair.

func (GetKeyPairsKeyPairOutput) ResourceGroupId

func (o GetKeyPairsKeyPairOutput) ResourceGroupId() pulumi.StringOutput

The Id of resource group which the key pair belongs.

func (GetKeyPairsKeyPairOutput) Tags

A mapping of tags to assign to the resource.

func (GetKeyPairsKeyPairOutput) ToGetKeyPairsKeyPairOutput

func (o GetKeyPairsKeyPairOutput) ToGetKeyPairsKeyPairOutput() GetKeyPairsKeyPairOutput

func (GetKeyPairsKeyPairOutput) ToGetKeyPairsKeyPairOutputWithContext

func (o GetKeyPairsKeyPairOutput) ToGetKeyPairsKeyPairOutputWithContext(ctx context.Context) GetKeyPairsKeyPairOutput

type GetKeyPairsResult

type GetKeyPairsResult struct {
	// Finger print of the key pair.
	FingerPrint string `pulumi:"fingerPrint"`
	// The provider-assigned unique ID for this managed resource.
	Id  string   `pulumi:"id"`
	Ids []string `pulumi:"ids"`
	// A list of key pairs. Each element contains the following attributes:
	KeyPairs  []GetKeyPairsKeyPair `pulumi:"keyPairs"`
	NameRegex *string              `pulumi:"nameRegex"`
	// A list of key pair names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	// The Id of resource group.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// (Optional, Available in v1.66.0+) A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
}

A collection of values returned by getKeyPairs.

func GetKeyPairs

func GetKeyPairs(ctx *pulumi.Context, args *GetKeyPairsArgs, opts ...pulumi.InvokeOption) (*GetKeyPairsResult, error)

This data source provides a list of key pairs in an Alibaba Cloud account according to the specified filters.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultKeyPair, err := ecs.NewKeyPair(ctx, "defaultKeyPair", &ecs.KeyPairArgs{
			KeyName: pulumi.String("keyPairDatasource"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetNetworkInterfacesArgs

type GetNetworkInterfacesArgs struct {
	Ids []string `pulumi:"ids"`
	// ID of the instance that the ENI is attached to.
	InstanceId *string `pulumi:"instanceId"`
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// Primary private IP of the ENI.
	PrivateIp *string `pulumi:"privateIp"`
	// The Id of resource group.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	SecurityGroupId *string `pulumi:"securityGroupId"`
	// A map of tags assigned to the ENI.
	Tags map[string]interface{} `pulumi:"tags"`
	Type *string                `pulumi:"type"`
	// ID of the VPC that the ENI belongs to.
	VpcId *string `pulumi:"vpcId"`
	// ID of the VSwitch that the ENI is linked to.
	VswitchId *string `pulumi:"vswitchId"`
}

A collection of arguments for invoking getNetworkInterfaces.

type GetNetworkInterfacesInterface

type GetNetworkInterfacesInterface struct {
	// Creation time of the ENI.
	CreationTime string `pulumi:"creationTime"`
	// Description of the ENI.
	Description string `pulumi:"description"`
	// ID of the ENI.
	Id string `pulumi:"id"`
	// ID of the instance that the ENI is attached to.
	InstanceId string `pulumi:"instanceId"`
	// MAC address of the ENI.
	Mac string `pulumi:"mac"`
	// Name of the ENI.
	Name string `pulumi:"name"`
	// Primary private IP of the ENI.
	PrivateIp string `pulumi:"privateIp"`
	// A list of secondary private IP address that is assigned to the ENI.
	PrivateIps []string `pulumi:"privateIps"`
	// Public IP of the ENI.
	PublicIp string `pulumi:"publicIp"`
	// The Id of resource group.
	ResourceGroupId string `pulumi:"resourceGroupId"`
	// A list of security group that the ENI belongs to.
	SecurityGroups []string `pulumi:"securityGroups"`
	// Current status of the ENI.
	Status string `pulumi:"status"`
	// A map of tags assigned to the ENI.
	Tags map[string]interface{} `pulumi:"tags"`
	// ID of the VPC that the ENI belongs to.
	VpcId string `pulumi:"vpcId"`
	// ID of the VSwitch that the ENI is linked to.
	VswitchId string `pulumi:"vswitchId"`
	// ID of the availability zone that the ENI belongs to.
	ZoneId string `pulumi:"zoneId"`
}

type GetNetworkInterfacesInterfaceArgs

type GetNetworkInterfacesInterfaceArgs struct {
	// Creation time of the ENI.
	CreationTime pulumi.StringInput `pulumi:"creationTime"`
	// Description of the ENI.
	Description pulumi.StringInput `pulumi:"description"`
	// ID of the ENI.
	Id pulumi.StringInput `pulumi:"id"`
	// ID of the instance that the ENI is attached to.
	InstanceId pulumi.StringInput `pulumi:"instanceId"`
	// MAC address of the ENI.
	Mac pulumi.StringInput `pulumi:"mac"`
	// Name of the ENI.
	Name pulumi.StringInput `pulumi:"name"`
	// Primary private IP of the ENI.
	PrivateIp pulumi.StringInput `pulumi:"privateIp"`
	// A list of secondary private IP address that is assigned to the ENI.
	PrivateIps pulumi.StringArrayInput `pulumi:"privateIps"`
	// Public IP of the ENI.
	PublicIp pulumi.StringInput `pulumi:"publicIp"`
	// The Id of resource group.
	ResourceGroupId pulumi.StringInput `pulumi:"resourceGroupId"`
	// A list of security group that the ENI belongs to.
	SecurityGroups pulumi.StringArrayInput `pulumi:"securityGroups"`
	// Current status of the ENI.
	Status pulumi.StringInput `pulumi:"status"`
	// A map of tags assigned to the ENI.
	Tags pulumi.MapInput `pulumi:"tags"`
	// ID of the VPC that the ENI belongs to.
	VpcId pulumi.StringInput `pulumi:"vpcId"`
	// ID of the VSwitch that the ENI is linked to.
	VswitchId pulumi.StringInput `pulumi:"vswitchId"`
	// ID of the availability zone that the ENI belongs to.
	ZoneId pulumi.StringInput `pulumi:"zoneId"`
}

func (GetNetworkInterfacesInterfaceArgs) ElementType

func (GetNetworkInterfacesInterfaceArgs) ToGetNetworkInterfacesInterfaceOutput

func (i GetNetworkInterfacesInterfaceArgs) ToGetNetworkInterfacesInterfaceOutput() GetNetworkInterfacesInterfaceOutput

func (GetNetworkInterfacesInterfaceArgs) ToGetNetworkInterfacesInterfaceOutputWithContext

func (i GetNetworkInterfacesInterfaceArgs) ToGetNetworkInterfacesInterfaceOutputWithContext(ctx context.Context) GetNetworkInterfacesInterfaceOutput

type GetNetworkInterfacesInterfaceArray

type GetNetworkInterfacesInterfaceArray []GetNetworkInterfacesInterfaceInput

func (GetNetworkInterfacesInterfaceArray) ElementType

func (GetNetworkInterfacesInterfaceArray) ToGetNetworkInterfacesInterfaceArrayOutput

func (i GetNetworkInterfacesInterfaceArray) ToGetNetworkInterfacesInterfaceArrayOutput() GetNetworkInterfacesInterfaceArrayOutput

func (GetNetworkInterfacesInterfaceArray) ToGetNetworkInterfacesInterfaceArrayOutputWithContext

func (i GetNetworkInterfacesInterfaceArray) ToGetNetworkInterfacesInterfaceArrayOutputWithContext(ctx context.Context) GetNetworkInterfacesInterfaceArrayOutput

type GetNetworkInterfacesInterfaceArrayInput

type GetNetworkInterfacesInterfaceArrayInput interface {
	pulumi.Input

	ToGetNetworkInterfacesInterfaceArrayOutput() GetNetworkInterfacesInterfaceArrayOutput
	ToGetNetworkInterfacesInterfaceArrayOutputWithContext(context.Context) GetNetworkInterfacesInterfaceArrayOutput
}

GetNetworkInterfacesInterfaceArrayInput is an input type that accepts GetNetworkInterfacesInterfaceArray and GetNetworkInterfacesInterfaceArrayOutput values. You can construct a concrete instance of `GetNetworkInterfacesInterfaceArrayInput` via:

GetNetworkInterfacesInterfaceArray{ GetNetworkInterfacesInterfaceArgs{...} }

type GetNetworkInterfacesInterfaceArrayOutput

type GetNetworkInterfacesInterfaceArrayOutput struct{ *pulumi.OutputState }

func (GetNetworkInterfacesInterfaceArrayOutput) ElementType

func (GetNetworkInterfacesInterfaceArrayOutput) Index

func (GetNetworkInterfacesInterfaceArrayOutput) ToGetNetworkInterfacesInterfaceArrayOutput

func (o GetNetworkInterfacesInterfaceArrayOutput) ToGetNetworkInterfacesInterfaceArrayOutput() GetNetworkInterfacesInterfaceArrayOutput

func (GetNetworkInterfacesInterfaceArrayOutput) ToGetNetworkInterfacesInterfaceArrayOutputWithContext

func (o GetNetworkInterfacesInterfaceArrayOutput) ToGetNetworkInterfacesInterfaceArrayOutputWithContext(ctx context.Context) GetNetworkInterfacesInterfaceArrayOutput

type GetNetworkInterfacesInterfaceInput

type GetNetworkInterfacesInterfaceInput interface {
	pulumi.Input

	ToGetNetworkInterfacesInterfaceOutput() GetNetworkInterfacesInterfaceOutput
	ToGetNetworkInterfacesInterfaceOutputWithContext(context.Context) GetNetworkInterfacesInterfaceOutput
}

GetNetworkInterfacesInterfaceInput is an input type that accepts GetNetworkInterfacesInterfaceArgs and GetNetworkInterfacesInterfaceOutput values. You can construct a concrete instance of `GetNetworkInterfacesInterfaceInput` via:

GetNetworkInterfacesInterfaceArgs{...}

type GetNetworkInterfacesInterfaceOutput

type GetNetworkInterfacesInterfaceOutput struct{ *pulumi.OutputState }

func (GetNetworkInterfacesInterfaceOutput) CreationTime

Creation time of the ENI.

func (GetNetworkInterfacesInterfaceOutput) Description

Description of the ENI.

func (GetNetworkInterfacesInterfaceOutput) ElementType

func (GetNetworkInterfacesInterfaceOutput) Id

ID of the ENI.

func (GetNetworkInterfacesInterfaceOutput) InstanceId

ID of the instance that the ENI is attached to.

func (GetNetworkInterfacesInterfaceOutput) Mac

MAC address of the ENI.

func (GetNetworkInterfacesInterfaceOutput) Name

Name of the ENI.

func (GetNetworkInterfacesInterfaceOutput) PrivateIp

Primary private IP of the ENI.

func (GetNetworkInterfacesInterfaceOutput) PrivateIps

A list of secondary private IP address that is assigned to the ENI.

func (GetNetworkInterfacesInterfaceOutput) PublicIp

Public IP of the ENI.

func (GetNetworkInterfacesInterfaceOutput) ResourceGroupId

The Id of resource group.

func (GetNetworkInterfacesInterfaceOutput) SecurityGroups

A list of security group that the ENI belongs to.

func (GetNetworkInterfacesInterfaceOutput) Status

Current status of the ENI.

func (GetNetworkInterfacesInterfaceOutput) Tags

A map of tags assigned to the ENI.

func (GetNetworkInterfacesInterfaceOutput) ToGetNetworkInterfacesInterfaceOutput

func (o GetNetworkInterfacesInterfaceOutput) ToGetNetworkInterfacesInterfaceOutput() GetNetworkInterfacesInterfaceOutput

func (GetNetworkInterfacesInterfaceOutput) ToGetNetworkInterfacesInterfaceOutputWithContext

func (o GetNetworkInterfacesInterfaceOutput) ToGetNetworkInterfacesInterfaceOutputWithContext(ctx context.Context) GetNetworkInterfacesInterfaceOutput

func (GetNetworkInterfacesInterfaceOutput) VpcId

ID of the VPC that the ENI belongs to.

func (GetNetworkInterfacesInterfaceOutput) VswitchId

ID of the VSwitch that the ENI is linked to.

func (GetNetworkInterfacesInterfaceOutput) ZoneId

ID of the availability zone that the ENI belongs to.

type GetNetworkInterfacesResult

type GetNetworkInterfacesResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id  string   `pulumi:"id"`
	Ids []string `pulumi:"ids"`
	// ID of the instance that the ENI is attached to.
	InstanceId *string `pulumi:"instanceId"`
	// A list of ENIs. Each element contains the following attributes:
	Interfaces []GetNetworkInterfacesInterface `pulumi:"interfaces"`
	NameRegex  *string                         `pulumi:"nameRegex"`
	Names      []string                        `pulumi:"names"`
	OutputFile *string                         `pulumi:"outputFile"`
	// Primary private IP of the ENI.
	PrivateIp *string `pulumi:"privateIp"`
	// The Id of resource group.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	SecurityGroupId *string `pulumi:"securityGroupId"`
	// A map of tags assigned to the ENI.
	Tags map[string]interface{} `pulumi:"tags"`
	Type *string                `pulumi:"type"`
	// ID of the VPC that the ENI belongs to.
	VpcId *string `pulumi:"vpcId"`
	// ID of the VSwitch that the ENI is linked to.
	VswitchId *string `pulumi:"vswitchId"`
}

A collection of values returned by getNetworkInterfaces.

func GetNetworkInterfaces

func GetNetworkInterfaces(ctx *pulumi.Context, args *GetNetworkInterfacesArgs, opts ...pulumi.InvokeOption) (*GetNetworkInterfacesResult, error)

Use this data source to get a list of elastic network interfaces according to the specified filters in an Alibaba Cloud account.

For information about elastic network interface and how to use it, see [Elastic Network Interface](https://www.alibabacloud.com/help/doc-detail/58496.html)

## Argument Reference

The following arguments are supported:

* `ids` - (Optional) A list of ENI IDs. * `nameRegex` - (Optional) A regex string to filter results by ENI name. * `vpcId` - (Optional) The VPC ID linked to ENIs. * `vswitchId` - (Optional) The VSwitch ID linked to ENIs. * `privateIp` - (Optional) The primary private IP address of the ENI. * `securityGroupId` - (Optional) The security group ID linked to ENIs. * `name` - (Optional) The name of the ENIs. * `type` - (Optional) The type of ENIs, Only support for "Primary" or "Secondary". * `instanceId` - (Optional) The ECS instance ID that the ENI is attached to. * `tags` - (Optional) A map of tags assigned to ENIs. * `outputFile` - (Optional) The name of output file that saves the filter results. * `resourceGroupId` - (Optional, ForceNew, Available in 1.57.0+) The Id of resource group which the network interface belongs.

type GetSecurityGroupRulesArgs

type GetSecurityGroupRulesArgs struct {
	// Authorization direction. Valid values are: `ingress` or `egress`.
	Direction *string `pulumi:"direction"`
	// The ID of the security group that owns the rules.
	GroupId string `pulumi:"groupId"`
	// The IP protocol. Valid values are: `tcp`, `udp`, `icmp`, `gre` and `all`.
	IpProtocol *string `pulumi:"ipProtocol"`
	// Refers to the network type. Can be either `internet` or `intranet`. The default value is `internet`.
	NicType    *string `pulumi:"nicType"`
	OutputFile *string `pulumi:"outputFile"`
	// Authorization policy. Can be either `accept` or `drop`. The default value is `accept`.
	Policy *string `pulumi:"policy"`
}

A collection of arguments for invoking getSecurityGroupRules.

type GetSecurityGroupRulesResult

type GetSecurityGroupRulesResult struct {
	// Authorization direction, `ingress` or `egress`.
	Direction *string `pulumi:"direction"`
	// The description of the security group that owns the rules.
	GroupDesc string `pulumi:"groupDesc"`
	GroupId   string `pulumi:"groupId"`
	// The name of the security group that owns the rules.
	GroupName string `pulumi:"groupName"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The protocol. Can be `tcp`, `udp`, `icmp`, `gre` or `all`.
	IpProtocol *string `pulumi:"ipProtocol"`
	// Network type, `internet` or `intranet`.
	NicType    *string `pulumi:"nicType"`
	OutputFile *string `pulumi:"outputFile"`
	// Authorization policy. Can be either `accept` or `drop`.
	Policy *string `pulumi:"policy"`
	// A list of security group rules. Each element contains the following attributes:
	Rules []GetSecurityGroupRulesRule `pulumi:"rules"`
}

A collection of values returned by getSecurityGroupRules.

func GetSecurityGroupRules

func GetSecurityGroupRules(ctx *pulumi.Context, args *GetSecurityGroupRulesArgs, opts ...pulumi.InvokeOption) (*GetSecurityGroupRulesResult, error)

The `ecs.getSecurityGroupRules` data source provides a collection of security permissions of a specific security group. Each collection item represents a single `ingress` or `egress` permission rule. The ID of the security group can be provided via a variable or the result from the other data source `ecs.getSecurityGroups`.

## Example Usage

The following example shows how to obtain details about a security group rule and how to pass its data to an instance at launch time.

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi/config"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		securityGroupId := cfg.RequireObject("securityGroupId")
		opt0 := "api"
		groupsDs, err := ecs.GetSecurityGroups(ctx, &ecs.GetSecurityGroupsArgs{
			NameRegex: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		opt1 := "ingress"
		opt2 := "tcp"
		opt3 := "internet"
		ingressRulesDs, err := ecs.GetSecurityGroupRules(ctx, &ecs.GetSecurityGroupRulesArgs{
			Direction:  &opt1,
			GroupId:    groupsDs.Groups[0].Id,
			IpProtocol: &opt2,
			NicType:    &opt3,
		}, nil)
		if err != nil {
			return err
		}
		_, err = ecs.NewInstance(ctx, "backend", &ecs.InstanceArgs{
			UserData: pulumi.String(fmt.Sprintf("%v%v", "config_service.sh --portrange=", ingressRulesDs.Rules[0].PortRange)),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetSecurityGroupRulesRule

type GetSecurityGroupRulesRule struct {
	// The description of the rule.
	Description string `pulumi:"description"`
	// Target IP address segment for egress authorization.
	DestCidrIp string `pulumi:"destCidrIp"`
	// Target security group id for ingress authorization.
	DestGroupId string `pulumi:"destGroupId"`
	// Alibaba Cloud account of the target security group.
	DestGroupOwnerAccount string `pulumi:"destGroupOwnerAccount"`
	// Authorization direction. Valid values are: `ingress` or `egress`.
	Direction string `pulumi:"direction"`
	// The IP protocol. Valid values are: `tcp`, `udp`, `icmp`, `gre` and `all`.
	IpProtocol string `pulumi:"ipProtocol"`
	// Refers to the network type. Can be either `internet` or `intranet`. The default value is `internet`.
	NicType string `pulumi:"nicType"`
	// Authorization policy. Can be either `accept` or `drop`. The default value is `accept`.
	Policy string `pulumi:"policy"`
	// The range of port numbers.
	PortRange string `pulumi:"portRange"`
	// Rule priority.
	Priority int `pulumi:"priority"`
	// Source IP address segment for ingress authorization.
	SourceCidrIp string `pulumi:"sourceCidrIp"`
	// Source security group ID for ingress authorization.
	SourceGroupId string `pulumi:"sourceGroupId"`
	// Alibaba Cloud account of the source security group.
	SourceGroupOwnerAccount string `pulumi:"sourceGroupOwnerAccount"`
}

type GetSecurityGroupRulesRuleArgs

type GetSecurityGroupRulesRuleArgs struct {
	// The description of the rule.
	Description pulumi.StringInput `pulumi:"description"`
	// Target IP address segment for egress authorization.
	DestCidrIp pulumi.StringInput `pulumi:"destCidrIp"`
	// Target security group id for ingress authorization.
	DestGroupId pulumi.StringInput `pulumi:"destGroupId"`
	// Alibaba Cloud account of the target security group.
	DestGroupOwnerAccount pulumi.StringInput `pulumi:"destGroupOwnerAccount"`
	// Authorization direction. Valid values are: `ingress` or `egress`.
	Direction pulumi.StringInput `pulumi:"direction"`
	// The IP protocol. Valid values are: `tcp`, `udp`, `icmp`, `gre` and `all`.
	IpProtocol pulumi.StringInput `pulumi:"ipProtocol"`
	// Refers to the network type. Can be either `internet` or `intranet`. The default value is `internet`.
	NicType pulumi.StringInput `pulumi:"nicType"`
	// Authorization policy. Can be either `accept` or `drop`. The default value is `accept`.
	Policy pulumi.StringInput `pulumi:"policy"`
	// The range of port numbers.
	PortRange pulumi.StringInput `pulumi:"portRange"`
	// Rule priority.
	Priority pulumi.IntInput `pulumi:"priority"`
	// Source IP address segment for ingress authorization.
	SourceCidrIp pulumi.StringInput `pulumi:"sourceCidrIp"`
	// Source security group ID for ingress authorization.
	SourceGroupId pulumi.StringInput `pulumi:"sourceGroupId"`
	// Alibaba Cloud account of the source security group.
	SourceGroupOwnerAccount pulumi.StringInput `pulumi:"sourceGroupOwnerAccount"`
}

func (GetSecurityGroupRulesRuleArgs) ElementType

func (GetSecurityGroupRulesRuleArgs) ToGetSecurityGroupRulesRuleOutput

func (i GetSecurityGroupRulesRuleArgs) ToGetSecurityGroupRulesRuleOutput() GetSecurityGroupRulesRuleOutput

func (GetSecurityGroupRulesRuleArgs) ToGetSecurityGroupRulesRuleOutputWithContext

func (i GetSecurityGroupRulesRuleArgs) ToGetSecurityGroupRulesRuleOutputWithContext(ctx context.Context) GetSecurityGroupRulesRuleOutput

type GetSecurityGroupRulesRuleArray

type GetSecurityGroupRulesRuleArray []GetSecurityGroupRulesRuleInput

func (GetSecurityGroupRulesRuleArray) ElementType

func (GetSecurityGroupRulesRuleArray) ToGetSecurityGroupRulesRuleArrayOutput

func (i GetSecurityGroupRulesRuleArray) ToGetSecurityGroupRulesRuleArrayOutput() GetSecurityGroupRulesRuleArrayOutput

func (GetSecurityGroupRulesRuleArray) ToGetSecurityGroupRulesRuleArrayOutputWithContext

func (i GetSecurityGroupRulesRuleArray) ToGetSecurityGroupRulesRuleArrayOutputWithContext(ctx context.Context) GetSecurityGroupRulesRuleArrayOutput

type GetSecurityGroupRulesRuleArrayInput

type GetSecurityGroupRulesRuleArrayInput interface {
	pulumi.Input

	ToGetSecurityGroupRulesRuleArrayOutput() GetSecurityGroupRulesRuleArrayOutput
	ToGetSecurityGroupRulesRuleArrayOutputWithContext(context.Context) GetSecurityGroupRulesRuleArrayOutput
}

GetSecurityGroupRulesRuleArrayInput is an input type that accepts GetSecurityGroupRulesRuleArray and GetSecurityGroupRulesRuleArrayOutput values. You can construct a concrete instance of `GetSecurityGroupRulesRuleArrayInput` via:

GetSecurityGroupRulesRuleArray{ GetSecurityGroupRulesRuleArgs{...} }

type GetSecurityGroupRulesRuleArrayOutput

type GetSecurityGroupRulesRuleArrayOutput struct{ *pulumi.OutputState }

func (GetSecurityGroupRulesRuleArrayOutput) ElementType

func (GetSecurityGroupRulesRuleArrayOutput) Index

func (GetSecurityGroupRulesRuleArrayOutput) ToGetSecurityGroupRulesRuleArrayOutput

func (o GetSecurityGroupRulesRuleArrayOutput) ToGetSecurityGroupRulesRuleArrayOutput() GetSecurityGroupRulesRuleArrayOutput

func (GetSecurityGroupRulesRuleArrayOutput) ToGetSecurityGroupRulesRuleArrayOutputWithContext

func (o GetSecurityGroupRulesRuleArrayOutput) ToGetSecurityGroupRulesRuleArrayOutputWithContext(ctx context.Context) GetSecurityGroupRulesRuleArrayOutput

type GetSecurityGroupRulesRuleInput

type GetSecurityGroupRulesRuleInput interface {
	pulumi.Input

	ToGetSecurityGroupRulesRuleOutput() GetSecurityGroupRulesRuleOutput
	ToGetSecurityGroupRulesRuleOutputWithContext(context.Context) GetSecurityGroupRulesRuleOutput
}

GetSecurityGroupRulesRuleInput is an input type that accepts GetSecurityGroupRulesRuleArgs and GetSecurityGroupRulesRuleOutput values. You can construct a concrete instance of `GetSecurityGroupRulesRuleInput` via:

GetSecurityGroupRulesRuleArgs{...}

type GetSecurityGroupRulesRuleOutput

type GetSecurityGroupRulesRuleOutput struct{ *pulumi.OutputState }

func (GetSecurityGroupRulesRuleOutput) Description

The description of the rule.

func (GetSecurityGroupRulesRuleOutput) DestCidrIp

Target IP address segment for egress authorization.

func (GetSecurityGroupRulesRuleOutput) DestGroupId

Target security group id for ingress authorization.

func (GetSecurityGroupRulesRuleOutput) DestGroupOwnerAccount

func (o GetSecurityGroupRulesRuleOutput) DestGroupOwnerAccount() pulumi.StringOutput

Alibaba Cloud account of the target security group.

func (GetSecurityGroupRulesRuleOutput) Direction

Authorization direction. Valid values are: `ingress` or `egress`.

func (GetSecurityGroupRulesRuleOutput) ElementType

func (GetSecurityGroupRulesRuleOutput) IpProtocol

The IP protocol. Valid values are: `tcp`, `udp`, `icmp`, `gre` and `all`.

func (GetSecurityGroupRulesRuleOutput) NicType

Refers to the network type. Can be either `internet` or `intranet`. The default value is `internet`.

func (GetSecurityGroupRulesRuleOutput) Policy

Authorization policy. Can be either `accept` or `drop`. The default value is `accept`.

func (GetSecurityGroupRulesRuleOutput) PortRange

The range of port numbers.

func (GetSecurityGroupRulesRuleOutput) Priority

Rule priority.

func (GetSecurityGroupRulesRuleOutput) SourceCidrIp

Source IP address segment for ingress authorization.

func (GetSecurityGroupRulesRuleOutput) SourceGroupId

Source security group ID for ingress authorization.

func (GetSecurityGroupRulesRuleOutput) SourceGroupOwnerAccount

func (o GetSecurityGroupRulesRuleOutput) SourceGroupOwnerAccount() pulumi.StringOutput

Alibaba Cloud account of the source security group.

func (GetSecurityGroupRulesRuleOutput) ToGetSecurityGroupRulesRuleOutput

func (o GetSecurityGroupRulesRuleOutput) ToGetSecurityGroupRulesRuleOutput() GetSecurityGroupRulesRuleOutput

func (GetSecurityGroupRulesRuleOutput) ToGetSecurityGroupRulesRuleOutputWithContext

func (o GetSecurityGroupRulesRuleOutput) ToGetSecurityGroupRulesRuleOutputWithContext(ctx context.Context) GetSecurityGroupRulesRuleOutput

type GetSecurityGroupsArgs

type GetSecurityGroupsArgs struct {
	// A list of Security Group IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to filter the resulting security groups by their names.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// The Id of resource group which the securityGroup belongs.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// A map of tags assigned to the ECS instances. It must be in the format:
	// “`go
	// package main
	//
	// import (
	// 	"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
	// 	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
	// )
	//
	// func main() {
	// 	pulumi.Run(func(ctx *pulumi.Context) error {
	// 		_, err := ecs.GetSecurityGroups(ctx, &ecs.GetSecurityGroupsArgs{
	// 			Tags: map[string]interface{}{
	// 				"tagKey1": "tagValue1",
	// 				"tagKey2": "tagValue2",
	// 			},
	// 		}, nil)
	// 		if err != nil {
	// 			return err
	// 		}
	// 		return nil
	// 	})
	// }
	// “`
	Tags map[string]interface{} `pulumi:"tags"`
	// Used to retrieve security groups that belong to the specified VPC ID.
	VpcId *string `pulumi:"vpcId"`
}

A collection of arguments for invoking getSecurityGroups.

type GetSecurityGroupsGroup

type GetSecurityGroupsGroup struct {
	// Creation time of the security group.
	CreationTime string `pulumi:"creationTime"`
	// The description of the security group.
	Description string `pulumi:"description"`
	// The ID of the security group.
	Id string `pulumi:"id"`
	// Whether to allow inner network access.
	InnerAccess bool `pulumi:"innerAccess"`
	// The name of the security group.
	Name string `pulumi:"name"`
	// The Id of resource group which the securityGroup belongs.
	ResourceGroupId string `pulumi:"resourceGroupId"`
	// The type of the security group.
	SecurityGroupType string `pulumi:"securityGroupType"`
	// A map of tags assigned to the ECS instances. It must be in the format:
	// “`go
	// package main
	//
	// import (
	// 	"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
	// 	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
	// )
	//
	// func main() {
	// 	pulumi.Run(func(ctx *pulumi.Context) error {
	// 		_, err := ecs.GetSecurityGroups(ctx, &ecs.GetSecurityGroupsArgs{
	// 			Tags: map[string]interface{}{
	// 				"tagKey1": "tagValue1",
	// 				"tagKey2": "tagValue2",
	// 			},
	// 		}, nil)
	// 		if err != nil {
	// 			return err
	// 		}
	// 		return nil
	// 	})
	// }
	// “`
	Tags map[string]interface{} `pulumi:"tags"`
	// Used to retrieve security groups that belong to the specified VPC ID.
	VpcId string `pulumi:"vpcId"`
}

type GetSecurityGroupsGroupArgs

type GetSecurityGroupsGroupArgs struct {
	// Creation time of the security group.
	CreationTime pulumi.StringInput `pulumi:"creationTime"`
	// The description of the security group.
	Description pulumi.StringInput `pulumi:"description"`
	// The ID of the security group.
	Id pulumi.StringInput `pulumi:"id"`
	// Whether to allow inner network access.
	InnerAccess pulumi.BoolInput `pulumi:"innerAccess"`
	// The name of the security group.
	Name pulumi.StringInput `pulumi:"name"`
	// The Id of resource group which the securityGroup belongs.
	ResourceGroupId pulumi.StringInput `pulumi:"resourceGroupId"`
	// The type of the security group.
	SecurityGroupType pulumi.StringInput `pulumi:"securityGroupType"`
	// A map of tags assigned to the ECS instances. It must be in the format:
	// “`go
	// package main
	//
	// import (
	// 	"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
	// 	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
	// )
	//
	// func main() {
	// 	pulumi.Run(func(ctx *pulumi.Context) error {
	// 		_, err := ecs.GetSecurityGroups(ctx, &ecs.GetSecurityGroupsArgs{
	// 			Tags: map[string]interface{}{
	// 				"tagKey1": "tagValue1",
	// 				"tagKey2": "tagValue2",
	// 			},
	// 		}, nil)
	// 		if err != nil {
	// 			return err
	// 		}
	// 		return nil
	// 	})
	// }
	// “`
	Tags pulumi.MapInput `pulumi:"tags"`
	// Used to retrieve security groups that belong to the specified VPC ID.
	VpcId pulumi.StringInput `pulumi:"vpcId"`
}

func (GetSecurityGroupsGroupArgs) ElementType

func (GetSecurityGroupsGroupArgs) ElementType() reflect.Type

func (GetSecurityGroupsGroupArgs) ToGetSecurityGroupsGroupOutput

func (i GetSecurityGroupsGroupArgs) ToGetSecurityGroupsGroupOutput() GetSecurityGroupsGroupOutput

func (GetSecurityGroupsGroupArgs) ToGetSecurityGroupsGroupOutputWithContext

func (i GetSecurityGroupsGroupArgs) ToGetSecurityGroupsGroupOutputWithContext(ctx context.Context) GetSecurityGroupsGroupOutput

type GetSecurityGroupsGroupArray

type GetSecurityGroupsGroupArray []GetSecurityGroupsGroupInput

func (GetSecurityGroupsGroupArray) ElementType

func (GetSecurityGroupsGroupArray) ToGetSecurityGroupsGroupArrayOutput

func (i GetSecurityGroupsGroupArray) ToGetSecurityGroupsGroupArrayOutput() GetSecurityGroupsGroupArrayOutput

func (GetSecurityGroupsGroupArray) ToGetSecurityGroupsGroupArrayOutputWithContext

func (i GetSecurityGroupsGroupArray) ToGetSecurityGroupsGroupArrayOutputWithContext(ctx context.Context) GetSecurityGroupsGroupArrayOutput

type GetSecurityGroupsGroupArrayInput

type GetSecurityGroupsGroupArrayInput interface {
	pulumi.Input

	ToGetSecurityGroupsGroupArrayOutput() GetSecurityGroupsGroupArrayOutput
	ToGetSecurityGroupsGroupArrayOutputWithContext(context.Context) GetSecurityGroupsGroupArrayOutput
}

GetSecurityGroupsGroupArrayInput is an input type that accepts GetSecurityGroupsGroupArray and GetSecurityGroupsGroupArrayOutput values. You can construct a concrete instance of `GetSecurityGroupsGroupArrayInput` via:

GetSecurityGroupsGroupArray{ GetSecurityGroupsGroupArgs{...} }

type GetSecurityGroupsGroupArrayOutput

type GetSecurityGroupsGroupArrayOutput struct{ *pulumi.OutputState }

func (GetSecurityGroupsGroupArrayOutput) ElementType

func (GetSecurityGroupsGroupArrayOutput) Index

func (GetSecurityGroupsGroupArrayOutput) ToGetSecurityGroupsGroupArrayOutput

func (o GetSecurityGroupsGroupArrayOutput) ToGetSecurityGroupsGroupArrayOutput() GetSecurityGroupsGroupArrayOutput

func (GetSecurityGroupsGroupArrayOutput) ToGetSecurityGroupsGroupArrayOutputWithContext

func (o GetSecurityGroupsGroupArrayOutput) ToGetSecurityGroupsGroupArrayOutputWithContext(ctx context.Context) GetSecurityGroupsGroupArrayOutput

type GetSecurityGroupsGroupInput

type GetSecurityGroupsGroupInput interface {
	pulumi.Input

	ToGetSecurityGroupsGroupOutput() GetSecurityGroupsGroupOutput
	ToGetSecurityGroupsGroupOutputWithContext(context.Context) GetSecurityGroupsGroupOutput
}

GetSecurityGroupsGroupInput is an input type that accepts GetSecurityGroupsGroupArgs and GetSecurityGroupsGroupOutput values. You can construct a concrete instance of `GetSecurityGroupsGroupInput` via:

GetSecurityGroupsGroupArgs{...}

type GetSecurityGroupsGroupOutput

type GetSecurityGroupsGroupOutput struct{ *pulumi.OutputState }

func (GetSecurityGroupsGroupOutput) CreationTime

Creation time of the security group.

func (GetSecurityGroupsGroupOutput) Description

The description of the security group.

func (GetSecurityGroupsGroupOutput) ElementType

func (GetSecurityGroupsGroupOutput) Id

The ID of the security group.

func (GetSecurityGroupsGroupOutput) InnerAccess

Whether to allow inner network access.

func (GetSecurityGroupsGroupOutput) Name

The name of the security group.

func (GetSecurityGroupsGroupOutput) ResourceGroupId

func (o GetSecurityGroupsGroupOutput) ResourceGroupId() pulumi.StringOutput

The Id of resource group which the securityGroup belongs.

func (GetSecurityGroupsGroupOutput) SecurityGroupType

func (o GetSecurityGroupsGroupOutput) SecurityGroupType() pulumi.StringOutput

The type of the security group.

func (GetSecurityGroupsGroupOutput) Tags

A map of tags assigned to the ECS instances. It must be in the format: ```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.GetSecurityGroups(ctx, &ecs.GetSecurityGroupsArgs{
			Tags: map[string]interface{}{
				"tagKey1": "tagValue1",
				"tagKey2": "tagValue2",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

func (GetSecurityGroupsGroupOutput) ToGetSecurityGroupsGroupOutput

func (o GetSecurityGroupsGroupOutput) ToGetSecurityGroupsGroupOutput() GetSecurityGroupsGroupOutput

func (GetSecurityGroupsGroupOutput) ToGetSecurityGroupsGroupOutputWithContext

func (o GetSecurityGroupsGroupOutput) ToGetSecurityGroupsGroupOutputWithContext(ctx context.Context) GetSecurityGroupsGroupOutput

func (GetSecurityGroupsGroupOutput) VpcId

Used to retrieve security groups that belong to the specified VPC ID.

type GetSecurityGroupsResult

type GetSecurityGroupsResult struct {
	// A list of Security Groups. Each element contains the following attributes:
	Groups []GetSecurityGroupsGroup `pulumi:"groups"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of Security Group IDs.
	Ids       []string `pulumi:"ids"`
	NameRegex *string  `pulumi:"nameRegex"`
	// A list of Security Group names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	// The Id of resource group which the securityGroup belongs.
	ResourceGroupId *string `pulumi:"resourceGroupId"`
	// A map of tags assigned to the ECS instance.
	Tags map[string]interface{} `pulumi:"tags"`
	// The ID of the VPC that owns the security group.
	VpcId *string `pulumi:"vpcId"`
}

A collection of values returned by getSecurityGroups.

func GetSecurityGroups

func GetSecurityGroups(ctx *pulumi.Context, args *GetSecurityGroupsArgs, opts ...pulumi.InvokeOption) (*GetSecurityGroupsResult, error)

This data source provides a list of Security Groups in an Alibaba Cloud account according to the specified filters.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "^web-"
		opt1 := "web_access.json"
		_, err := ecs.GetSecurityGroups(ctx, &ecs.GetSecurityGroupsArgs{
			NameRegex:  &opt0,
			OutputFile: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		primaryVpcDs, err := vpc.NewNetwork(ctx, "primaryVpcDs", nil)
		if err != nil {
			return err
		}
		ctx.Export("firstGroupId", primarySecGroupsDs.ApplyT(func(primarySecGroupsDs ecs.GetSecurityGroupsResult) (string, error) {
			return primarySecGroupsDs.Groups[0].Id, nil
		}).(pulumi.StringOutput))
		return nil
	})
}

```

type GetSnapshotsArgs

type GetSnapshotsArgs struct {
	DiskId *string `pulumi:"diskId"`
	// Whether the snapshot is encrypted or not.
	Encrypted *bool `pulumi:"encrypted"`
	// A list of snapshot IDs.
	Ids        []string `pulumi:"ids"`
	InstanceId *string  `pulumi:"instanceId"`
	NameRegex  *string  `pulumi:"nameRegex"`
	OutputFile *string  `pulumi:"outputFile"`
	// Source disk attribute. Value range: `System`,`Data`.
	SourceDiskType *string `pulumi:"sourceDiskType"`
	// The snapshot status. Value range: `progressing`, `accomplished` and `failed`.
	Status *string `pulumi:"status"`
	// A map of tags assigned to the snapshot.
	Tags map[string]interface{} `pulumi:"tags"`
	Type *string                `pulumi:"type"`
	// Whether the snapshots are used to create resources or not. Value range: `image`, `disk`, `imageDisk` and `none`.
	Usage *string `pulumi:"usage"`
}

A collection of arguments for invoking getSnapshots.

type GetSnapshotsResult

type GetSnapshotsResult struct {
	DiskId *string `pulumi:"diskId"`
	// Whether the snapshot is encrypted or not.
	Encrypted *bool `pulumi:"encrypted"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of snapshot IDs.
	Ids        []string `pulumi:"ids"`
	InstanceId *string  `pulumi:"instanceId"`
	NameRegex  *string  `pulumi:"nameRegex"`
	// A list of snapshots names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	// A list of snapshots. Each element contains the following attributes:
	Snapshots []GetSnapshotsSnapshot `pulumi:"snapshots"`
	// Source disk attribute. Value range: `System`,`Data`.
	SourceDiskType *string `pulumi:"sourceDiskType"`
	// The snapshot status. Value range: `progressing`, `accomplished` and `failed`.
	Status *string `pulumi:"status"`
	// A map of tags assigned to the snapshot.
	Tags map[string]interface{} `pulumi:"tags"`
	Type *string                `pulumi:"type"`
	// Whether the snapshots are used to create resources or not. Value range: `image`, `disk`, `imageDisk` and `none`.
	Usage *string `pulumi:"usage"`
}

A collection of values returned by getSnapshots.

func GetSnapshots

func GetSnapshots(ctx *pulumi.Context, args *GetSnapshotsArgs, opts ...pulumi.InvokeOption) (*GetSnapshotsResult, error)

Use this data source to get a list of snapshot according to the specified filters in an Alibaba Cloud account.

For information about snapshot and how to use it, see Snapshot(https://www.alibabacloud.com/help/doc-detail/25460.html).

> **NOTE:** Available in 1.40.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "tf-testAcc-snapshot"
		_, err := ecs.GetSnapshots(ctx, &ecs.GetSnapshotsArgs{
			Ids: []string{
				"s-123456890abcdef",
			},
			NameRegex: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Argument Reference

The following arguments are supported:

* `instanceId` - (Optional) The specified instance ID. * `diskId` - (Optional) The specified disk ID. * `encrypted` - (Optional) Queries the encrypted snapshots. Optional values: `true`: Encrypted snapshots. `false`: No encryption attribute limit. Default value: `false`. * `ids` - (Optional) A list of snapshot IDs. * `nameRegex` - (Optional) A regex string to filter results by snapshot name. * `status` - (Optional) The specified snapshot status. Default value: `all`. Optional values:

  • progressing: The snapshots are being created.
  • accomplished: The snapshots are ready to use.
  • failed: The snapshot creation failed.
  • all: All status.

* `type` - (Optional) The snapshot category. Default value: `all`. Optional values:

  • auto: Auto snapshots.
  • user: Manual snapshots.
  • all: Auto and manual snapshots.

* `sourceDiskType` - (Optional) The type of source disk:

  • System: The snapshots are created for system disks.
  • Data: The snapshots are created for data disks.

* `usage` - (Optional) The usage of the snapshot:

  • image: The snapshots are used to create custom images.
  • disk: The snapshots are used to CreateDisk.
  • mage_disk: The snapshots are used to create custom images and data disks.
  • none: The snapshots are not used yet.

* `tags` - (Optional) A map of tags assigned to snapshots. * `outputFile` - (Optional) The name of output file that saves the filter results.

type GetSnapshotsSnapshot

type GetSnapshotsSnapshot struct {
	// Creation time. Time of creation. It is represented according to ISO8601, and UTC time is used. Format: YYYY-MM-DDThh:mmZ.
	CreationTime string `pulumi:"creationTime"`
	// Description of the snapshot.
	Description string `pulumi:"description"`
	// Whether the snapshot is encrypted or not.
	Encrypted bool `pulumi:"encrypted"`
	// ID of the snapshot.
	Id string `pulumi:"id"`
	// Name of the snapshot.
	Name string `pulumi:"name"`
	// Product code on the image market place.
	ProductCode string `pulumi:"productCode"`
	// Progress of snapshot creation, presented in percentage.
	Progress string `pulumi:"progress"`
	// The remaining time of a snapshot creation task, in seconds.
	RemainTime int `pulumi:"remainTime"`
	// The number of days that an automatic snapshot retains in the console for your instance.
	RetentionDays int `pulumi:"retentionDays"`
	// Source disk ID, which is retained after the source disk of the snapshot is deleted.
	SourceDiskId string `pulumi:"sourceDiskId"`
	// Size of the source disk, measured in GB.
	SourceDiskSize string `pulumi:"sourceDiskSize"`
	// Source disk attribute. Value range: `System`,`Data`.
	SourceDiskType string `pulumi:"sourceDiskType"`
	// The snapshot status. Value range: `progressing`, `accomplished` and `failed`.
	Status string `pulumi:"status"`
	// A map of tags assigned to the snapshot.
	Tags map[string]interface{} `pulumi:"tags"`
	// Whether the snapshots are used to create resources or not. Value range: `image`, `disk`, `imageDisk` and `none`.
	Usage string `pulumi:"usage"`
}

type GetSnapshotsSnapshotArgs

type GetSnapshotsSnapshotArgs struct {
	// Creation time. Time of creation. It is represented according to ISO8601, and UTC time is used. Format: YYYY-MM-DDThh:mmZ.
	CreationTime pulumi.StringInput `pulumi:"creationTime"`
	// Description of the snapshot.
	Description pulumi.StringInput `pulumi:"description"`
	// Whether the snapshot is encrypted or not.
	Encrypted pulumi.BoolInput `pulumi:"encrypted"`
	// ID of the snapshot.
	Id pulumi.StringInput `pulumi:"id"`
	// Name of the snapshot.
	Name pulumi.StringInput `pulumi:"name"`
	// Product code on the image market place.
	ProductCode pulumi.StringInput `pulumi:"productCode"`
	// Progress of snapshot creation, presented in percentage.
	Progress pulumi.StringInput `pulumi:"progress"`
	// The remaining time of a snapshot creation task, in seconds.
	RemainTime pulumi.IntInput `pulumi:"remainTime"`
	// The number of days that an automatic snapshot retains in the console for your instance.
	RetentionDays pulumi.IntInput `pulumi:"retentionDays"`
	// Source disk ID, which is retained after the source disk of the snapshot is deleted.
	SourceDiskId pulumi.StringInput `pulumi:"sourceDiskId"`
	// Size of the source disk, measured in GB.
	SourceDiskSize pulumi.StringInput `pulumi:"sourceDiskSize"`
	// Source disk attribute. Value range: `System`,`Data`.
	SourceDiskType pulumi.StringInput `pulumi:"sourceDiskType"`
	// The snapshot status. Value range: `progressing`, `accomplished` and `failed`.
	Status pulumi.StringInput `pulumi:"status"`
	// A map of tags assigned to the snapshot.
	Tags pulumi.MapInput `pulumi:"tags"`
	// Whether the snapshots are used to create resources or not. Value range: `image`, `disk`, `imageDisk` and `none`.
	Usage pulumi.StringInput `pulumi:"usage"`
}

func (GetSnapshotsSnapshotArgs) ElementType

func (GetSnapshotsSnapshotArgs) ElementType() reflect.Type

func (GetSnapshotsSnapshotArgs) ToGetSnapshotsSnapshotOutput

func (i GetSnapshotsSnapshotArgs) ToGetSnapshotsSnapshotOutput() GetSnapshotsSnapshotOutput

func (GetSnapshotsSnapshotArgs) ToGetSnapshotsSnapshotOutputWithContext

func (i GetSnapshotsSnapshotArgs) ToGetSnapshotsSnapshotOutputWithContext(ctx context.Context) GetSnapshotsSnapshotOutput

type GetSnapshotsSnapshotArray

type GetSnapshotsSnapshotArray []GetSnapshotsSnapshotInput

func (GetSnapshotsSnapshotArray) ElementType

func (GetSnapshotsSnapshotArray) ElementType() reflect.Type

func (GetSnapshotsSnapshotArray) ToGetSnapshotsSnapshotArrayOutput

func (i GetSnapshotsSnapshotArray) ToGetSnapshotsSnapshotArrayOutput() GetSnapshotsSnapshotArrayOutput

func (GetSnapshotsSnapshotArray) ToGetSnapshotsSnapshotArrayOutputWithContext

func (i GetSnapshotsSnapshotArray) ToGetSnapshotsSnapshotArrayOutputWithContext(ctx context.Context) GetSnapshotsSnapshotArrayOutput

type GetSnapshotsSnapshotArrayInput

type GetSnapshotsSnapshotArrayInput interface {
	pulumi.Input

	ToGetSnapshotsSnapshotArrayOutput() GetSnapshotsSnapshotArrayOutput
	ToGetSnapshotsSnapshotArrayOutputWithContext(context.Context) GetSnapshotsSnapshotArrayOutput
}

GetSnapshotsSnapshotArrayInput is an input type that accepts GetSnapshotsSnapshotArray and GetSnapshotsSnapshotArrayOutput values. You can construct a concrete instance of `GetSnapshotsSnapshotArrayInput` via:

GetSnapshotsSnapshotArray{ GetSnapshotsSnapshotArgs{...} }

type GetSnapshotsSnapshotArrayOutput

type GetSnapshotsSnapshotArrayOutput struct{ *pulumi.OutputState }

func (GetSnapshotsSnapshotArrayOutput) ElementType

func (GetSnapshotsSnapshotArrayOutput) Index

func (GetSnapshotsSnapshotArrayOutput) ToGetSnapshotsSnapshotArrayOutput

func (o GetSnapshotsSnapshotArrayOutput) ToGetSnapshotsSnapshotArrayOutput() GetSnapshotsSnapshotArrayOutput

func (GetSnapshotsSnapshotArrayOutput) ToGetSnapshotsSnapshotArrayOutputWithContext

func (o GetSnapshotsSnapshotArrayOutput) ToGetSnapshotsSnapshotArrayOutputWithContext(ctx context.Context) GetSnapshotsSnapshotArrayOutput

type GetSnapshotsSnapshotInput

type GetSnapshotsSnapshotInput interface {
	pulumi.Input

	ToGetSnapshotsSnapshotOutput() GetSnapshotsSnapshotOutput
	ToGetSnapshotsSnapshotOutputWithContext(context.Context) GetSnapshotsSnapshotOutput
}

GetSnapshotsSnapshotInput is an input type that accepts GetSnapshotsSnapshotArgs and GetSnapshotsSnapshotOutput values. You can construct a concrete instance of `GetSnapshotsSnapshotInput` via:

GetSnapshotsSnapshotArgs{...}

type GetSnapshotsSnapshotOutput

type GetSnapshotsSnapshotOutput struct{ *pulumi.OutputState }

func (GetSnapshotsSnapshotOutput) CreationTime

Creation time. Time of creation. It is represented according to ISO8601, and UTC time is used. Format: YYYY-MM-DDThh:mmZ.

func (GetSnapshotsSnapshotOutput) Description

Description of the snapshot.

func (GetSnapshotsSnapshotOutput) ElementType

func (GetSnapshotsSnapshotOutput) ElementType() reflect.Type

func (GetSnapshotsSnapshotOutput) Encrypted

Whether the snapshot is encrypted or not.

func (GetSnapshotsSnapshotOutput) Id

ID of the snapshot.

func (GetSnapshotsSnapshotOutput) Name

Name of the snapshot.

func (GetSnapshotsSnapshotOutput) ProductCode

Product code on the image market place.

func (GetSnapshotsSnapshotOutput) Progress

Progress of snapshot creation, presented in percentage.

func (GetSnapshotsSnapshotOutput) RemainTime

The remaining time of a snapshot creation task, in seconds.

func (GetSnapshotsSnapshotOutput) RetentionDays

func (o GetSnapshotsSnapshotOutput) RetentionDays() pulumi.IntOutput

The number of days that an automatic snapshot retains in the console for your instance.

func (GetSnapshotsSnapshotOutput) SourceDiskId

Source disk ID, which is retained after the source disk of the snapshot is deleted.

func (GetSnapshotsSnapshotOutput) SourceDiskSize

func (o GetSnapshotsSnapshotOutput) SourceDiskSize() pulumi.StringOutput

Size of the source disk, measured in GB.

func (GetSnapshotsSnapshotOutput) SourceDiskType

func (o GetSnapshotsSnapshotOutput) SourceDiskType() pulumi.StringOutput

Source disk attribute. Value range: `System`,`Data`.

func (GetSnapshotsSnapshotOutput) Status

The snapshot status. Value range: `progressing`, `accomplished` and `failed`.

func (GetSnapshotsSnapshotOutput) Tags added in v2.18.0

A map of tags assigned to the snapshot.

func (GetSnapshotsSnapshotOutput) ToGetSnapshotsSnapshotOutput

func (o GetSnapshotsSnapshotOutput) ToGetSnapshotsSnapshotOutput() GetSnapshotsSnapshotOutput

func (GetSnapshotsSnapshotOutput) ToGetSnapshotsSnapshotOutputWithContext

func (o GetSnapshotsSnapshotOutput) ToGetSnapshotsSnapshotOutputWithContext(ctx context.Context) GetSnapshotsSnapshotOutput

func (GetSnapshotsSnapshotOutput) Usage

Whether the snapshots are used to create resources or not. Value range: `image`, `disk`, `imageDisk` and `none`.

type Image

type Image struct {
	pulumi.CustomResourceState

	// Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `i386` , Default is `x8664`.
	Architecture pulumi.StringPtrOutput `pulumi:"architecture"`
	// The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Description of the system with disks and snapshots under the image.
	DiskDeviceMappings ImageDiskDeviceMappingArrayOutput `pulumi:"diskDeviceMappings"`
	// Indicates whether to force delete the custom image, Default is `false`.
	// - true:Force deletes the custom image, regardless of whether the image is currently being used by other instances.
	// - false:Verifies that the image is not currently in use by any other instances before deleting the image.
	Force pulumi.BoolPtrOutput `pulumi:"force"`
	// The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (_), or hyphens (-). Default value: null.
	ImageName pulumi.StringOutput `pulumi:"imageName"`
	// The instance ID.
	InstanceId pulumi.StringPtrOutput `pulumi:"instanceId"`
	// Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use `image_name` instead.
	Name pulumi.StringOutput `pulumi:"name"`
	// Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `CentOS`, `Ubuntu`, `SUSE`, `OpenSUSE`, `RedHat`, `Debian`, `CoreOS`, `Aliyun Linux`, `Windows Server 2003`, `Windows Server 2008`, `Windows Server 2012`, `Windows 7`, Default is `Others Linux`, `Customized Linux`.
	Platform pulumi.StringPtrOutput `pulumi:"platform"`
	// The ID of the enterprise resource group to which a custom image belongs
	ResourceGroupId pulumi.StringPtrOutput `pulumi:"resourceGroupId"`
	// Specifies a snapshot that is used to create a combined custom image.
	SnapshotId pulumi.StringPtrOutput `pulumi:"snapshotId"`
	// The tag value of an image. The value of N ranges from 1 to 20.
	Tags pulumi.MapOutput `pulumi:"tags"`
}

Creates a custom image. You can then use a custom image to create ECS instances (RunInstances) or change the system disk for an existing instance (ReplaceSystemDisk).

> **NOTE:** If you want to create a template from an ECS instance, you can specify the instance ID (InstanceId) to create a custom image. You must make sure that the status of the specified instance is Running or Stopped. After a successful invocation, each disk of the specified instance has a new snapshot created.

> **NOTE:** If you want to create a custom image based on the system disk of your ECS instance, you can specify one of the system disk snapshots (SnapshotId) to create a custom image. However, the specified snapshot cannot be created on or before July 15, 2013.

> **NOTE:** If you want to combine snapshots of multiple disks into an image template, you can specify DiskDeviceMapping to create a custom image.

> **NOTE:** Available in 1.64.0+

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewImage(ctx, "_default", &ecs.ImageArgs{
			Architecture:    pulumi.String("x86_64"),
			Description:     pulumi.String("test-image"),
			ImageName:       pulumi.String("test-image"),
			InstanceId:      pulumi.String("i-bp1g6zv0ce8oghu7k***"),
			Platform:        pulumi.String("CentOS"),
			ResourceGroupId: pulumi.String("rg-bp67acfmxazb4ph***"),
			Tags: pulumi.StringMap{
				"FinanceDept": pulumi.String("FinanceDeptJoshua"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

image can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/image:Image default m-uf66871ape***yg1q***

```

func GetImage

func GetImage(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ImageState, opts ...pulumi.ResourceOption) (*Image, error)

GetImage gets an existing Image 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 NewImage

func NewImage(ctx *pulumi.Context,
	name string, args *ImageArgs, opts ...pulumi.ResourceOption) (*Image, error)

NewImage registers a new resource with the given unique name, arguments, and options.

func (*Image) ElementType added in v2.25.1

func (*Image) ElementType() reflect.Type

func (*Image) ToImageOutput added in v2.25.1

func (i *Image) ToImageOutput() ImageOutput

func (*Image) ToImageOutputWithContext added in v2.25.1

func (i *Image) ToImageOutputWithContext(ctx context.Context) ImageOutput

func (*Image) ToImagePtrOutput added in v2.35.1

func (i *Image) ToImagePtrOutput() ImagePtrOutput

func (*Image) ToImagePtrOutputWithContext added in v2.35.1

func (i *Image) ToImagePtrOutputWithContext(ctx context.Context) ImagePtrOutput

type ImageArgs

type ImageArgs struct {
	// Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `i386` , Default is `x8664`.
	Architecture pulumi.StringPtrInput
	// The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
	Description pulumi.StringPtrInput
	// Description of the system with disks and snapshots under the image.
	DiskDeviceMappings ImageDiskDeviceMappingArrayInput
	// Indicates whether to force delete the custom image, Default is `false`.
	// - true:Force deletes the custom image, regardless of whether the image is currently being used by other instances.
	// - false:Verifies that the image is not currently in use by any other instances before deleting the image.
	Force pulumi.BoolPtrInput
	// The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (_), or hyphens (-). Default value: null.
	ImageName pulumi.StringPtrInput
	// The instance ID.
	InstanceId pulumi.StringPtrInput
	// Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use `image_name` instead.
	Name pulumi.StringPtrInput
	// Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `CentOS`, `Ubuntu`, `SUSE`, `OpenSUSE`, `RedHat`, `Debian`, `CoreOS`, `Aliyun Linux`, `Windows Server 2003`, `Windows Server 2008`, `Windows Server 2012`, `Windows 7`, Default is `Others Linux`, `Customized Linux`.
	Platform pulumi.StringPtrInput
	// The ID of the enterprise resource group to which a custom image belongs
	ResourceGroupId pulumi.StringPtrInput
	// Specifies a snapshot that is used to create a combined custom image.
	SnapshotId pulumi.StringPtrInput
	// The tag value of an image. The value of N ranges from 1 to 20.
	Tags pulumi.MapInput
}

The set of arguments for constructing a Image resource.

func (ImageArgs) ElementType

func (ImageArgs) ElementType() reflect.Type

type ImageArray added in v2.35.1

type ImageArray []ImageInput

func (ImageArray) ElementType added in v2.35.1

func (ImageArray) ElementType() reflect.Type

func (ImageArray) ToImageArrayOutput added in v2.35.1

func (i ImageArray) ToImageArrayOutput() ImageArrayOutput

func (ImageArray) ToImageArrayOutputWithContext added in v2.35.1

func (i ImageArray) ToImageArrayOutputWithContext(ctx context.Context) ImageArrayOutput

type ImageArrayInput added in v2.35.1

type ImageArrayInput interface {
	pulumi.Input

	ToImageArrayOutput() ImageArrayOutput
	ToImageArrayOutputWithContext(context.Context) ImageArrayOutput
}

ImageArrayInput is an input type that accepts ImageArray and ImageArrayOutput values. You can construct a concrete instance of `ImageArrayInput` via:

ImageArray{ ImageArgs{...} }

type ImageArrayOutput added in v2.35.1

type ImageArrayOutput struct{ *pulumi.OutputState }

func (ImageArrayOutput) ElementType added in v2.35.1

func (ImageArrayOutput) ElementType() reflect.Type

func (ImageArrayOutput) Index added in v2.35.1

func (ImageArrayOutput) ToImageArrayOutput added in v2.35.1

func (o ImageArrayOutput) ToImageArrayOutput() ImageArrayOutput

func (ImageArrayOutput) ToImageArrayOutputWithContext added in v2.35.1

func (o ImageArrayOutput) ToImageArrayOutputWithContext(ctx context.Context) ImageArrayOutput

type ImageCopy

type ImageCopy struct {
	pulumi.CustomResourceState

	// The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Indicates whether to encrypt the image.
	Encrypted pulumi.BoolPtrOutput `pulumi:"encrypted"`
	// Indicates whether to force delete the custom image, Default is `false`.
	// - true:Force deletes the custom image, regardless of whether the image is currently being used by other instances.
	// - false:Verifies that the image is not currently in use by any other instances before deleting the image.
	Force pulumi.BoolPtrOutput `pulumi:"force"`
	// The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (_), or hyphens (-). Default value: null.
	ImageName pulumi.StringOutput `pulumi:"imageName"`
	// Key ID used to encrypt the image.
	KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"`
	// Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use `image_name` instead.
	Name pulumi.StringOutput `pulumi:"name"`
	// The source image ID.
	SourceImageId pulumi.StringOutput `pulumi:"sourceImageId"`
	// The ID of the region to which the source custom image belongs. You can call [DescribeRegions](https://www.alibabacloud.com/help/doc-detail/25609.htm) to view the latest regions of Alibaba Cloud.
	SourceRegionId pulumi.StringOutput `pulumi:"sourceRegionId"`
	// The tag value of an image. The value of N ranges from 1 to 20.
	Tags pulumi.MapOutput `pulumi:"tags"`
}

Copies a custom image from one region to another. You can use copied images to perform operations in the target region, such as creating instances (RunInstances) and replacing system disks (ReplaceSystemDisk).

> **NOTE:** You can only copy the custom image when it is in the Available state.

> **NOTE:** You can only copy the image belonging to your Alibaba Cloud account. Images cannot be copied from one account to another.

> **NOTE:** If the copying is not completed, you cannot call DeleteImage to delete the image but you can call CancelCopyImage to cancel the copying.

> **NOTE:** Available in 1.66.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewImageCopy(ctx, "_default", &ecs.ImageCopyArgs{
			Description:    pulumi.String("test-image"),
			ImageName:      pulumi.String("test-image"),
			SourceImageId:  pulumi.String("m-bp1gxyhdswlsn18tu***"),
			SourceRegionId: pulumi.String("cn-hangzhou"),
			Tags: pulumi.StringMap{
				"FinanceDept": pulumi.String("FinanceDeptJoshua"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Attributes Reference0

The following attributes are exported:

* `id` - ID of the image.

## Import

image can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/imageCopy:ImageCopy default m-uf66871ape***yg1q***

```

func GetImageCopy

func GetImageCopy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ImageCopyState, opts ...pulumi.ResourceOption) (*ImageCopy, error)

GetImageCopy gets an existing ImageCopy 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 NewImageCopy

func NewImageCopy(ctx *pulumi.Context,
	name string, args *ImageCopyArgs, opts ...pulumi.ResourceOption) (*ImageCopy, error)

NewImageCopy registers a new resource with the given unique name, arguments, and options.

func (*ImageCopy) ElementType added in v2.25.1

func (*ImageCopy) ElementType() reflect.Type

func (*ImageCopy) ToImageCopyOutput added in v2.25.1

func (i *ImageCopy) ToImageCopyOutput() ImageCopyOutput

func (*ImageCopy) ToImageCopyOutputWithContext added in v2.25.1

func (i *ImageCopy) ToImageCopyOutputWithContext(ctx context.Context) ImageCopyOutput

func (*ImageCopy) ToImageCopyPtrOutput added in v2.35.1

func (i *ImageCopy) ToImageCopyPtrOutput() ImageCopyPtrOutput

func (*ImageCopy) ToImageCopyPtrOutputWithContext added in v2.35.1

func (i *ImageCopy) ToImageCopyPtrOutputWithContext(ctx context.Context) ImageCopyPtrOutput

type ImageCopyArgs

type ImageCopyArgs struct {
	// The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
	Description pulumi.StringPtrInput
	// Indicates whether to encrypt the image.
	Encrypted pulumi.BoolPtrInput
	// Indicates whether to force delete the custom image, Default is `false`.
	// - true:Force deletes the custom image, regardless of whether the image is currently being used by other instances.
	// - false:Verifies that the image is not currently in use by any other instances before deleting the image.
	Force pulumi.BoolPtrInput
	// The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (_), or hyphens (-). Default value: null.
	ImageName pulumi.StringPtrInput
	// Key ID used to encrypt the image.
	KmsKeyId pulumi.StringPtrInput
	// Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use `image_name` instead.
	Name pulumi.StringPtrInput
	// The source image ID.
	SourceImageId pulumi.StringInput
	// The ID of the region to which the source custom image belongs. You can call [DescribeRegions](https://www.alibabacloud.com/help/doc-detail/25609.htm) to view the latest regions of Alibaba Cloud.
	SourceRegionId pulumi.StringInput
	// The tag value of an image. The value of N ranges from 1 to 20.
	Tags pulumi.MapInput
}

The set of arguments for constructing a ImageCopy resource.

func (ImageCopyArgs) ElementType

func (ImageCopyArgs) ElementType() reflect.Type

type ImageCopyArray added in v2.35.1

type ImageCopyArray []ImageCopyInput

func (ImageCopyArray) ElementType added in v2.35.1

func (ImageCopyArray) ElementType() reflect.Type

func (ImageCopyArray) ToImageCopyArrayOutput added in v2.35.1

func (i ImageCopyArray) ToImageCopyArrayOutput() ImageCopyArrayOutput

func (ImageCopyArray) ToImageCopyArrayOutputWithContext added in v2.35.1

func (i ImageCopyArray) ToImageCopyArrayOutputWithContext(ctx context.Context) ImageCopyArrayOutput

type ImageCopyArrayInput added in v2.35.1

type ImageCopyArrayInput interface {
	pulumi.Input

	ToImageCopyArrayOutput() ImageCopyArrayOutput
	ToImageCopyArrayOutputWithContext(context.Context) ImageCopyArrayOutput
}

ImageCopyArrayInput is an input type that accepts ImageCopyArray and ImageCopyArrayOutput values. You can construct a concrete instance of `ImageCopyArrayInput` via:

ImageCopyArray{ ImageCopyArgs{...} }

type ImageCopyArrayOutput added in v2.35.1

type ImageCopyArrayOutput struct{ *pulumi.OutputState }

func (ImageCopyArrayOutput) ElementType added in v2.35.1

func (ImageCopyArrayOutput) ElementType() reflect.Type

func (ImageCopyArrayOutput) Index added in v2.35.1

func (ImageCopyArrayOutput) ToImageCopyArrayOutput added in v2.35.1

func (o ImageCopyArrayOutput) ToImageCopyArrayOutput() ImageCopyArrayOutput

func (ImageCopyArrayOutput) ToImageCopyArrayOutputWithContext added in v2.35.1

func (o ImageCopyArrayOutput) ToImageCopyArrayOutputWithContext(ctx context.Context) ImageCopyArrayOutput

type ImageCopyInput added in v2.25.1

type ImageCopyInput interface {
	pulumi.Input

	ToImageCopyOutput() ImageCopyOutput
	ToImageCopyOutputWithContext(ctx context.Context) ImageCopyOutput
}

type ImageCopyMap added in v2.35.1

type ImageCopyMap map[string]ImageCopyInput

func (ImageCopyMap) ElementType added in v2.35.1

func (ImageCopyMap) ElementType() reflect.Type

func (ImageCopyMap) ToImageCopyMapOutput added in v2.35.1

func (i ImageCopyMap) ToImageCopyMapOutput() ImageCopyMapOutput

func (ImageCopyMap) ToImageCopyMapOutputWithContext added in v2.35.1

func (i ImageCopyMap) ToImageCopyMapOutputWithContext(ctx context.Context) ImageCopyMapOutput

type ImageCopyMapInput added in v2.35.1

type ImageCopyMapInput interface {
	pulumi.Input

	ToImageCopyMapOutput() ImageCopyMapOutput
	ToImageCopyMapOutputWithContext(context.Context) ImageCopyMapOutput
}

ImageCopyMapInput is an input type that accepts ImageCopyMap and ImageCopyMapOutput values. You can construct a concrete instance of `ImageCopyMapInput` via:

ImageCopyMap{ "key": ImageCopyArgs{...} }

type ImageCopyMapOutput added in v2.35.1

type ImageCopyMapOutput struct{ *pulumi.OutputState }

func (ImageCopyMapOutput) ElementType added in v2.35.1

func (ImageCopyMapOutput) ElementType() reflect.Type

func (ImageCopyMapOutput) MapIndex added in v2.35.1

func (ImageCopyMapOutput) ToImageCopyMapOutput added in v2.35.1

func (o ImageCopyMapOutput) ToImageCopyMapOutput() ImageCopyMapOutput

func (ImageCopyMapOutput) ToImageCopyMapOutputWithContext added in v2.35.1

func (o ImageCopyMapOutput) ToImageCopyMapOutputWithContext(ctx context.Context) ImageCopyMapOutput

type ImageCopyOutput added in v2.25.1

type ImageCopyOutput struct {
	*pulumi.OutputState
}

func (ImageCopyOutput) ElementType added in v2.25.1

func (ImageCopyOutput) ElementType() reflect.Type

func (ImageCopyOutput) ToImageCopyOutput added in v2.25.1

func (o ImageCopyOutput) ToImageCopyOutput() ImageCopyOutput

func (ImageCopyOutput) ToImageCopyOutputWithContext added in v2.25.1

func (o ImageCopyOutput) ToImageCopyOutputWithContext(ctx context.Context) ImageCopyOutput

func (ImageCopyOutput) ToImageCopyPtrOutput added in v2.35.1

func (o ImageCopyOutput) ToImageCopyPtrOutput() ImageCopyPtrOutput

func (ImageCopyOutput) ToImageCopyPtrOutputWithContext added in v2.35.1

func (o ImageCopyOutput) ToImageCopyPtrOutputWithContext(ctx context.Context) ImageCopyPtrOutput

type ImageCopyPtrInput added in v2.35.1

type ImageCopyPtrInput interface {
	pulumi.Input

	ToImageCopyPtrOutput() ImageCopyPtrOutput
	ToImageCopyPtrOutputWithContext(ctx context.Context) ImageCopyPtrOutput
}

type ImageCopyPtrOutput added in v2.35.1

type ImageCopyPtrOutput struct {
	*pulumi.OutputState
}

func (ImageCopyPtrOutput) ElementType added in v2.35.1

func (ImageCopyPtrOutput) ElementType() reflect.Type

func (ImageCopyPtrOutput) ToImageCopyPtrOutput added in v2.35.1

func (o ImageCopyPtrOutput) ToImageCopyPtrOutput() ImageCopyPtrOutput

func (ImageCopyPtrOutput) ToImageCopyPtrOutputWithContext added in v2.35.1

func (o ImageCopyPtrOutput) ToImageCopyPtrOutputWithContext(ctx context.Context) ImageCopyPtrOutput

type ImageCopyState

type ImageCopyState struct {
	// The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
	Description pulumi.StringPtrInput
	// Indicates whether to encrypt the image.
	Encrypted pulumi.BoolPtrInput
	// Indicates whether to force delete the custom image, Default is `false`.
	// - true:Force deletes the custom image, regardless of whether the image is currently being used by other instances.
	// - false:Verifies that the image is not currently in use by any other instances before deleting the image.
	Force pulumi.BoolPtrInput
	// The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (_), or hyphens (-). Default value: null.
	ImageName pulumi.StringPtrInput
	// Key ID used to encrypt the image.
	KmsKeyId pulumi.StringPtrInput
	// Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use `image_name` instead.
	Name pulumi.StringPtrInput
	// The source image ID.
	SourceImageId pulumi.StringPtrInput
	// The ID of the region to which the source custom image belongs. You can call [DescribeRegions](https://www.alibabacloud.com/help/doc-detail/25609.htm) to view the latest regions of Alibaba Cloud.
	SourceRegionId pulumi.StringPtrInput
	// The tag value of an image. The value of N ranges from 1 to 20.
	Tags pulumi.MapInput
}

func (ImageCopyState) ElementType

func (ImageCopyState) ElementType() reflect.Type

type ImageDiskDeviceMapping

type ImageDiskDeviceMapping struct {
	// Specifies the name of a disk in the combined custom image. Value range: /dev/xvda to /dev/xvdz.
	Device *string `pulumi:"device"`
	// Specifies the type of a disk in the combined custom image. If you specify this parameter, you can use a data disk snapshot as the data source of a system disk for creating an image. If it is not specified, the disk type is determined by the corresponding snapshot. Valid values: `system`, `data`,
	DiskType *string `pulumi:"diskType"`
	// Specifies the size of a disk in the combined custom image, in GiB. Value range: 5 to 2000.
	Size *int `pulumi:"size"`
	// Specifies a snapshot that is used to create a combined custom image.
	SnapshotId *string `pulumi:"snapshotId"`
}

type ImageDiskDeviceMappingArgs

type ImageDiskDeviceMappingArgs struct {
	// Specifies the name of a disk in the combined custom image. Value range: /dev/xvda to /dev/xvdz.
	Device pulumi.StringPtrInput `pulumi:"device"`
	// Specifies the type of a disk in the combined custom image. If you specify this parameter, you can use a data disk snapshot as the data source of a system disk for creating an image. If it is not specified, the disk type is determined by the corresponding snapshot. Valid values: `system`, `data`,
	DiskType pulumi.StringPtrInput `pulumi:"diskType"`
	// Specifies the size of a disk in the combined custom image, in GiB. Value range: 5 to 2000.
	Size pulumi.IntPtrInput `pulumi:"size"`
	// Specifies a snapshot that is used to create a combined custom image.
	SnapshotId pulumi.StringPtrInput `pulumi:"snapshotId"`
}

func (ImageDiskDeviceMappingArgs) ElementType

func (ImageDiskDeviceMappingArgs) ElementType() reflect.Type

func (ImageDiskDeviceMappingArgs) ToImageDiskDeviceMappingOutput

func (i ImageDiskDeviceMappingArgs) ToImageDiskDeviceMappingOutput() ImageDiskDeviceMappingOutput

func (ImageDiskDeviceMappingArgs) ToImageDiskDeviceMappingOutputWithContext

func (i ImageDiskDeviceMappingArgs) ToImageDiskDeviceMappingOutputWithContext(ctx context.Context) ImageDiskDeviceMappingOutput

type ImageDiskDeviceMappingArray

type ImageDiskDeviceMappingArray []ImageDiskDeviceMappingInput

func (ImageDiskDeviceMappingArray) ElementType

func (ImageDiskDeviceMappingArray) ToImageDiskDeviceMappingArrayOutput

func (i ImageDiskDeviceMappingArray) ToImageDiskDeviceMappingArrayOutput() ImageDiskDeviceMappingArrayOutput

func (ImageDiskDeviceMappingArray) ToImageDiskDeviceMappingArrayOutputWithContext

func (i ImageDiskDeviceMappingArray) ToImageDiskDeviceMappingArrayOutputWithContext(ctx context.Context) ImageDiskDeviceMappingArrayOutput

type ImageDiskDeviceMappingArrayInput

type ImageDiskDeviceMappingArrayInput interface {
	pulumi.Input

	ToImageDiskDeviceMappingArrayOutput() ImageDiskDeviceMappingArrayOutput
	ToImageDiskDeviceMappingArrayOutputWithContext(context.Context) ImageDiskDeviceMappingArrayOutput
}

ImageDiskDeviceMappingArrayInput is an input type that accepts ImageDiskDeviceMappingArray and ImageDiskDeviceMappingArrayOutput values. You can construct a concrete instance of `ImageDiskDeviceMappingArrayInput` via:

ImageDiskDeviceMappingArray{ ImageDiskDeviceMappingArgs{...} }

type ImageDiskDeviceMappingArrayOutput

type ImageDiskDeviceMappingArrayOutput struct{ *pulumi.OutputState }

func (ImageDiskDeviceMappingArrayOutput) ElementType

func (ImageDiskDeviceMappingArrayOutput) Index

func (ImageDiskDeviceMappingArrayOutput) ToImageDiskDeviceMappingArrayOutput

func (o ImageDiskDeviceMappingArrayOutput) ToImageDiskDeviceMappingArrayOutput() ImageDiskDeviceMappingArrayOutput

func (ImageDiskDeviceMappingArrayOutput) ToImageDiskDeviceMappingArrayOutputWithContext

func (o ImageDiskDeviceMappingArrayOutput) ToImageDiskDeviceMappingArrayOutputWithContext(ctx context.Context) ImageDiskDeviceMappingArrayOutput

type ImageDiskDeviceMappingInput

type ImageDiskDeviceMappingInput interface {
	pulumi.Input

	ToImageDiskDeviceMappingOutput() ImageDiskDeviceMappingOutput
	ToImageDiskDeviceMappingOutputWithContext(context.Context) ImageDiskDeviceMappingOutput
}

ImageDiskDeviceMappingInput is an input type that accepts ImageDiskDeviceMappingArgs and ImageDiskDeviceMappingOutput values. You can construct a concrete instance of `ImageDiskDeviceMappingInput` via:

ImageDiskDeviceMappingArgs{...}

type ImageDiskDeviceMappingOutput

type ImageDiskDeviceMappingOutput struct{ *pulumi.OutputState }

func (ImageDiskDeviceMappingOutput) Device

Specifies the name of a disk in the combined custom image. Value range: /dev/xvda to /dev/xvdz.

func (ImageDiskDeviceMappingOutput) DiskType

Specifies the type of a disk in the combined custom image. If you specify this parameter, you can use a data disk snapshot as the data source of a system disk for creating an image. If it is not specified, the disk type is determined by the corresponding snapshot. Valid values: `system`, `data`,

func (ImageDiskDeviceMappingOutput) ElementType

func (ImageDiskDeviceMappingOutput) Size

Specifies the size of a disk in the combined custom image, in GiB. Value range: 5 to 2000.

func (ImageDiskDeviceMappingOutput) SnapshotId

Specifies a snapshot that is used to create a combined custom image.

func (ImageDiskDeviceMappingOutput) ToImageDiskDeviceMappingOutput

func (o ImageDiskDeviceMappingOutput) ToImageDiskDeviceMappingOutput() ImageDiskDeviceMappingOutput

func (ImageDiskDeviceMappingOutput) ToImageDiskDeviceMappingOutputWithContext

func (o ImageDiskDeviceMappingOutput) ToImageDiskDeviceMappingOutputWithContext(ctx context.Context) ImageDiskDeviceMappingOutput

type ImageExport

type ImageExport struct {
	pulumi.CustomResourceState

	// The source image ID.
	ImageId pulumi.StringOutput `pulumi:"imageId"`
	// Save the exported OSS bucket.
	OssBucket pulumi.StringOutput `pulumi:"ossBucket"`
	// The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.
	OssPrefix pulumi.StringPtrOutput `pulumi:"ossPrefix"`
}

Export a custom image to the OSS bucket in the same region as the custom image.

> **NOTE:** If you create an ECS instance using a mirror image and create a system disk snapshot again, exporting a custom image created from the system disk snapshot is not supported.

> **NOTE:** Support for exporting custom images that include data disk snapshot information in the image. The number of data disks cannot exceed 4 and the maximum capacity of a single data disk cannot exceed 500 GiB.

> **NOTE:** Before exporting the image, you must authorize the cloud server ECS official service account to write OSS permissions through RAM.

> **NOTE:** Available in 1.68.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewImageExport(ctx, "_default", &ecs.ImageExportArgs{
			ImageId:   pulumi.String("m-bp1gxy***"),
			OssBucket: pulumi.String("ecsimageexportconfig"),
			OssPrefix: pulumi.String("ecsExport"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Attributes Reference0

The following attributes are exported:

* `id` - ID of the image.

func GetImageExport

func GetImageExport(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ImageExportState, opts ...pulumi.ResourceOption) (*ImageExport, error)

GetImageExport gets an existing ImageExport 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 NewImageExport

func NewImageExport(ctx *pulumi.Context,
	name string, args *ImageExportArgs, opts ...pulumi.ResourceOption) (*ImageExport, error)

NewImageExport registers a new resource with the given unique name, arguments, and options.

func (*ImageExport) ElementType added in v2.25.1

func (*ImageExport) ElementType() reflect.Type

func (*ImageExport) ToImageExportOutput added in v2.25.1

func (i *ImageExport) ToImageExportOutput() ImageExportOutput

func (*ImageExport) ToImageExportOutputWithContext added in v2.25.1

func (i *ImageExport) ToImageExportOutputWithContext(ctx context.Context) ImageExportOutput

func (*ImageExport) ToImageExportPtrOutput added in v2.35.1

func (i *ImageExport) ToImageExportPtrOutput() ImageExportPtrOutput

func (*ImageExport) ToImageExportPtrOutputWithContext added in v2.35.1

func (i *ImageExport) ToImageExportPtrOutputWithContext(ctx context.Context) ImageExportPtrOutput

type ImageExportArgs

type ImageExportArgs struct {
	// The source image ID.
	ImageId pulumi.StringInput
	// Save the exported OSS bucket.
	OssBucket pulumi.StringInput
	// The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.
	OssPrefix pulumi.StringPtrInput
}

The set of arguments for constructing a ImageExport resource.

func (ImageExportArgs) ElementType

func (ImageExportArgs) ElementType() reflect.Type

type ImageExportArray added in v2.35.1

type ImageExportArray []ImageExportInput

func (ImageExportArray) ElementType added in v2.35.1

func (ImageExportArray) ElementType() reflect.Type

func (ImageExportArray) ToImageExportArrayOutput added in v2.35.1

func (i ImageExportArray) ToImageExportArrayOutput() ImageExportArrayOutput

func (ImageExportArray) ToImageExportArrayOutputWithContext added in v2.35.1

func (i ImageExportArray) ToImageExportArrayOutputWithContext(ctx context.Context) ImageExportArrayOutput

type ImageExportArrayInput added in v2.35.1

type ImageExportArrayInput interface {
	pulumi.Input

	ToImageExportArrayOutput() ImageExportArrayOutput
	ToImageExportArrayOutputWithContext(context.Context) ImageExportArrayOutput
}

ImageExportArrayInput is an input type that accepts ImageExportArray and ImageExportArrayOutput values. You can construct a concrete instance of `ImageExportArrayInput` via:

ImageExportArray{ ImageExportArgs{...} }

type ImageExportArrayOutput added in v2.35.1

type ImageExportArrayOutput struct{ *pulumi.OutputState }

func (ImageExportArrayOutput) ElementType added in v2.35.1

func (ImageExportArrayOutput) ElementType() reflect.Type

func (ImageExportArrayOutput) Index added in v2.35.1

func (ImageExportArrayOutput) ToImageExportArrayOutput added in v2.35.1

func (o ImageExportArrayOutput) ToImageExportArrayOutput() ImageExportArrayOutput

func (ImageExportArrayOutput) ToImageExportArrayOutputWithContext added in v2.35.1

func (o ImageExportArrayOutput) ToImageExportArrayOutputWithContext(ctx context.Context) ImageExportArrayOutput

type ImageExportInput added in v2.25.1

type ImageExportInput interface {
	pulumi.Input

	ToImageExportOutput() ImageExportOutput
	ToImageExportOutputWithContext(ctx context.Context) ImageExportOutput
}

type ImageExportMap added in v2.35.1

type ImageExportMap map[string]ImageExportInput

func (ImageExportMap) ElementType added in v2.35.1

func (ImageExportMap) ElementType() reflect.Type

func (ImageExportMap) ToImageExportMapOutput added in v2.35.1

func (i ImageExportMap) ToImageExportMapOutput() ImageExportMapOutput

func (ImageExportMap) ToImageExportMapOutputWithContext added in v2.35.1

func (i ImageExportMap) ToImageExportMapOutputWithContext(ctx context.Context) ImageExportMapOutput

type ImageExportMapInput added in v2.35.1

type ImageExportMapInput interface {
	pulumi.Input

	ToImageExportMapOutput() ImageExportMapOutput
	ToImageExportMapOutputWithContext(context.Context) ImageExportMapOutput
}

ImageExportMapInput is an input type that accepts ImageExportMap and ImageExportMapOutput values. You can construct a concrete instance of `ImageExportMapInput` via:

ImageExportMap{ "key": ImageExportArgs{...} }

type ImageExportMapOutput added in v2.35.1

type ImageExportMapOutput struct{ *pulumi.OutputState }

func (ImageExportMapOutput) ElementType added in v2.35.1

func (ImageExportMapOutput) ElementType() reflect.Type

func (ImageExportMapOutput) MapIndex added in v2.35.1

func (ImageExportMapOutput) ToImageExportMapOutput added in v2.35.1

func (o ImageExportMapOutput) ToImageExportMapOutput() ImageExportMapOutput

func (ImageExportMapOutput) ToImageExportMapOutputWithContext added in v2.35.1

func (o ImageExportMapOutput) ToImageExportMapOutputWithContext(ctx context.Context) ImageExportMapOutput

type ImageExportOutput added in v2.25.1

type ImageExportOutput struct {
	*pulumi.OutputState
}

func (ImageExportOutput) ElementType added in v2.25.1

func (ImageExportOutput) ElementType() reflect.Type

func (ImageExportOutput) ToImageExportOutput added in v2.25.1

func (o ImageExportOutput) ToImageExportOutput() ImageExportOutput

func (ImageExportOutput) ToImageExportOutputWithContext added in v2.25.1

func (o ImageExportOutput) ToImageExportOutputWithContext(ctx context.Context) ImageExportOutput

func (ImageExportOutput) ToImageExportPtrOutput added in v2.35.1

func (o ImageExportOutput) ToImageExportPtrOutput() ImageExportPtrOutput

func (ImageExportOutput) ToImageExportPtrOutputWithContext added in v2.35.1

func (o ImageExportOutput) ToImageExportPtrOutputWithContext(ctx context.Context) ImageExportPtrOutput

type ImageExportPtrInput added in v2.35.1

type ImageExportPtrInput interface {
	pulumi.Input

	ToImageExportPtrOutput() ImageExportPtrOutput
	ToImageExportPtrOutputWithContext(ctx context.Context) ImageExportPtrOutput
}

type ImageExportPtrOutput added in v2.35.1

type ImageExportPtrOutput struct {
	*pulumi.OutputState
}

func (ImageExportPtrOutput) ElementType added in v2.35.1

func (ImageExportPtrOutput) ElementType() reflect.Type

func (ImageExportPtrOutput) ToImageExportPtrOutput added in v2.35.1

func (o ImageExportPtrOutput) ToImageExportPtrOutput() ImageExportPtrOutput

func (ImageExportPtrOutput) ToImageExportPtrOutputWithContext added in v2.35.1

func (o ImageExportPtrOutput) ToImageExportPtrOutputWithContext(ctx context.Context) ImageExportPtrOutput

type ImageExportState

type ImageExportState struct {
	// The source image ID.
	ImageId pulumi.StringPtrInput
	// Save the exported OSS bucket.
	OssBucket pulumi.StringPtrInput
	// The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.
	OssPrefix pulumi.StringPtrInput
}

func (ImageExportState) ElementType

func (ImageExportState) ElementType() reflect.Type

type ImageImport

type ImageImport struct {
	pulumi.CustomResourceState

	// Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `i386` , Default is `x8664`.
	Architecture pulumi.StringPtrOutput `pulumi:"architecture"`
	// Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Description of the system with disks and snapshots under the image.
	DiskDeviceMappings ImageImportDiskDeviceMappingArrayOutput `pulumi:"diskDeviceMappings"`
	// The image name. The length is 2 ~ 128 English or Chinese characters. Must start with a english letter or Chinese, and cannot start with http: // and https: //. Can contain numbers, colons (:), underscores (_), or hyphens (-).
	ImageName pulumi.StringPtrOutput `pulumi:"imageName"`
	// The type of the license used to activate the operating system after the image is imported. Default value: `Auto`. Valid values: `Auto`,`Aliyun`,`BYOL`.
	LicenseType pulumi.StringPtrOutput `pulumi:"licenseType"`
	// Operating system platform type. Valid values: `windows`, Default is `linux`.
	OsType pulumi.StringPtrOutput `pulumi:"osType"`
	// Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `CentOS`, `Ubuntu`, `SUSE`, `OpenSUSE`, `Debian`, `CoreOS`, `Windows Server 2003`, `Windows Server 2008`, `Windows Server 2012`, `Windows 7`, Default is `Others Linux`, `Customized Linux`.
	Platform pulumi.StringPtrOutput `pulumi:"platform"`
}

Import a copy of your local on-premise file to ECS, and appear as a custom replacement in the corresponding domain.

> **NOTE:** You must upload the image file to the object storage OSS in advance.

> **NOTE:** The region where the image is imported must be the same region as the OSS bucket where the image file is uploaded.

> **NOTE:** Available in 1.69.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewImageImport(ctx, "this", &ecs.ImageImportArgs{
			Architecture: pulumi.String("x86_64"),
			Description:  pulumi.String("test import image"),
			DiskDeviceMappings: ecs.ImageImportDiskDeviceMappingArray{
				&ecs.ImageImportDiskDeviceMappingArgs{
					DiskImageSize: pulumi.Int(5),
					OssBucket:     pulumi.String("testimportimage"),
					OssObject:     pulumi.String("root.img"),
				},
			},
			ImageName:   pulumi.String("test-import-image"),
			LicenseType: pulumi.String("Auto"),
			OsType:      pulumi.String("linux"),
			Platform:    pulumi.String("Ubuntu"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Attributes Reference0

The following attributes are exported:

* `id` - ID of the image.

## Import

image can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/imageImport:ImageImport default m-uf66871ape***yg1q***

```

func GetImageImport

func GetImageImport(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ImageImportState, opts ...pulumi.ResourceOption) (*ImageImport, error)

GetImageImport gets an existing ImageImport 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 NewImageImport

func NewImageImport(ctx *pulumi.Context,
	name string, args *ImageImportArgs, opts ...pulumi.ResourceOption) (*ImageImport, error)

NewImageImport registers a new resource with the given unique name, arguments, and options.

func (*ImageImport) ElementType added in v2.25.1

func (*ImageImport) ElementType() reflect.Type

func (*ImageImport) ToImageImportOutput added in v2.25.1

func (i *ImageImport) ToImageImportOutput() ImageImportOutput

func (*ImageImport) ToImageImportOutputWithContext added in v2.25.1

func (i *ImageImport) ToImageImportOutputWithContext(ctx context.Context) ImageImportOutput

func (*ImageImport) ToImageImportPtrOutput added in v2.35.1

func (i *ImageImport) ToImageImportPtrOutput() ImageImportPtrOutput

func (*ImageImport) ToImageImportPtrOutputWithContext added in v2.35.1

func (i *ImageImport) ToImageImportPtrOutputWithContext(ctx context.Context) ImageImportPtrOutput

type ImageImportArgs

type ImageImportArgs struct {
	// Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `i386` , Default is `x8664`.
	Architecture pulumi.StringPtrInput
	// Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
	Description pulumi.StringPtrInput
	// Description of the system with disks and snapshots under the image.
	DiskDeviceMappings ImageImportDiskDeviceMappingArrayInput
	// The image name. The length is 2 ~ 128 English or Chinese characters. Must start with a english letter or Chinese, and cannot start with http: // and https: //. Can contain numbers, colons (:), underscores (_), or hyphens (-).
	ImageName pulumi.StringPtrInput
	// The type of the license used to activate the operating system after the image is imported. Default value: `Auto`. Valid values: `Auto`,`Aliyun`,`BYOL`.
	LicenseType pulumi.StringPtrInput
	// Operating system platform type. Valid values: `windows`, Default is `linux`.
	OsType pulumi.StringPtrInput
	// Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `CentOS`, `Ubuntu`, `SUSE`, `OpenSUSE`, `Debian`, `CoreOS`, `Windows Server 2003`, `Windows Server 2008`, `Windows Server 2012`, `Windows 7`, Default is `Others Linux`, `Customized Linux`.
	Platform pulumi.StringPtrInput
}

The set of arguments for constructing a ImageImport resource.

func (ImageImportArgs) ElementType

func (ImageImportArgs) ElementType() reflect.Type

type ImageImportArray added in v2.35.1

type ImageImportArray []ImageImportInput

func (ImageImportArray) ElementType added in v2.35.1

func (ImageImportArray) ElementType() reflect.Type

func (ImageImportArray) ToImageImportArrayOutput added in v2.35.1

func (i ImageImportArray) ToImageImportArrayOutput() ImageImportArrayOutput

func (ImageImportArray) ToImageImportArrayOutputWithContext added in v2.35.1

func (i ImageImportArray) ToImageImportArrayOutputWithContext(ctx context.Context) ImageImportArrayOutput

type ImageImportArrayInput added in v2.35.1

type ImageImportArrayInput interface {
	pulumi.Input

	ToImageImportArrayOutput() ImageImportArrayOutput
	ToImageImportArrayOutputWithContext(context.Context) ImageImportArrayOutput
}

ImageImportArrayInput is an input type that accepts ImageImportArray and ImageImportArrayOutput values. You can construct a concrete instance of `ImageImportArrayInput` via:

ImageImportArray{ ImageImportArgs{...} }

type ImageImportArrayOutput added in v2.35.1

type ImageImportArrayOutput struct{ *pulumi.OutputState }

func (ImageImportArrayOutput) ElementType added in v2.35.1

func (ImageImportArrayOutput) ElementType() reflect.Type

func (ImageImportArrayOutput) Index added in v2.35.1

func (ImageImportArrayOutput) ToImageImportArrayOutput added in v2.35.1

func (o ImageImportArrayOutput) ToImageImportArrayOutput() ImageImportArrayOutput

func (ImageImportArrayOutput) ToImageImportArrayOutputWithContext added in v2.35.1

func (o ImageImportArrayOutput) ToImageImportArrayOutputWithContext(ctx context.Context) ImageImportArrayOutput

type ImageImportDiskDeviceMapping

type ImageImportDiskDeviceMapping struct {
	// The name of disk N in the custom image.
	Device *string `pulumi:"device"`
	// Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.
	DiskImageSize *int `pulumi:"diskImageSize"`
	// Image format. Value range: When the `RAW`, `VHD`, `qcow2` is imported into the image, the system automatically detects the image format, whichever comes first.
	Format *string `pulumi:"format"`
	// Save the exported OSS bucket.
	OssBucket *string `pulumi:"ossBucket"`
	// The file name of your OSS Object.
	OssObject *string `pulumi:"ossObject"`
}

type ImageImportDiskDeviceMappingArgs

type ImageImportDiskDeviceMappingArgs struct {
	// The name of disk N in the custom image.
	Device pulumi.StringPtrInput `pulumi:"device"`
	// Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.
	DiskImageSize pulumi.IntPtrInput `pulumi:"diskImageSize"`
	// Image format. Value range: When the `RAW`, `VHD`, `qcow2` is imported into the image, the system automatically detects the image format, whichever comes first.
	Format pulumi.StringPtrInput `pulumi:"format"`
	// Save the exported OSS bucket.
	OssBucket pulumi.StringPtrInput `pulumi:"ossBucket"`
	// The file name of your OSS Object.
	OssObject pulumi.StringPtrInput `pulumi:"ossObject"`
}

func (ImageImportDiskDeviceMappingArgs) ElementType

func (ImageImportDiskDeviceMappingArgs) ToImageImportDiskDeviceMappingOutput

func (i ImageImportDiskDeviceMappingArgs) ToImageImportDiskDeviceMappingOutput() ImageImportDiskDeviceMappingOutput

func (ImageImportDiskDeviceMappingArgs) ToImageImportDiskDeviceMappingOutputWithContext

func (i ImageImportDiskDeviceMappingArgs) ToImageImportDiskDeviceMappingOutputWithContext(ctx context.Context) ImageImportDiskDeviceMappingOutput

type ImageImportDiskDeviceMappingArray

type ImageImportDiskDeviceMappingArray []ImageImportDiskDeviceMappingInput

func (ImageImportDiskDeviceMappingArray) ElementType

func (ImageImportDiskDeviceMappingArray) ToImageImportDiskDeviceMappingArrayOutput

func (i ImageImportDiskDeviceMappingArray) ToImageImportDiskDeviceMappingArrayOutput() ImageImportDiskDeviceMappingArrayOutput

func (ImageImportDiskDeviceMappingArray) ToImageImportDiskDeviceMappingArrayOutputWithContext

func (i ImageImportDiskDeviceMappingArray) ToImageImportDiskDeviceMappingArrayOutputWithContext(ctx context.Context) ImageImportDiskDeviceMappingArrayOutput

type ImageImportDiskDeviceMappingArrayInput

type ImageImportDiskDeviceMappingArrayInput interface {
	pulumi.Input

	ToImageImportDiskDeviceMappingArrayOutput() ImageImportDiskDeviceMappingArrayOutput
	ToImageImportDiskDeviceMappingArrayOutputWithContext(context.Context) ImageImportDiskDeviceMappingArrayOutput
}

ImageImportDiskDeviceMappingArrayInput is an input type that accepts ImageImportDiskDeviceMappingArray and ImageImportDiskDeviceMappingArrayOutput values. You can construct a concrete instance of `ImageImportDiskDeviceMappingArrayInput` via:

ImageImportDiskDeviceMappingArray{ ImageImportDiskDeviceMappingArgs{...} }

type ImageImportDiskDeviceMappingArrayOutput

type ImageImportDiskDeviceMappingArrayOutput struct{ *pulumi.OutputState }

func (ImageImportDiskDeviceMappingArrayOutput) ElementType

func (ImageImportDiskDeviceMappingArrayOutput) Index

func (ImageImportDiskDeviceMappingArrayOutput) ToImageImportDiskDeviceMappingArrayOutput

func (o ImageImportDiskDeviceMappingArrayOutput) ToImageImportDiskDeviceMappingArrayOutput() ImageImportDiskDeviceMappingArrayOutput

func (ImageImportDiskDeviceMappingArrayOutput) ToImageImportDiskDeviceMappingArrayOutputWithContext

func (o ImageImportDiskDeviceMappingArrayOutput) ToImageImportDiskDeviceMappingArrayOutputWithContext(ctx context.Context) ImageImportDiskDeviceMappingArrayOutput

type ImageImportDiskDeviceMappingInput

type ImageImportDiskDeviceMappingInput interface {
	pulumi.Input

	ToImageImportDiskDeviceMappingOutput() ImageImportDiskDeviceMappingOutput
	ToImageImportDiskDeviceMappingOutputWithContext(context.Context) ImageImportDiskDeviceMappingOutput
}

ImageImportDiskDeviceMappingInput is an input type that accepts ImageImportDiskDeviceMappingArgs and ImageImportDiskDeviceMappingOutput values. You can construct a concrete instance of `ImageImportDiskDeviceMappingInput` via:

ImageImportDiskDeviceMappingArgs{...}

type ImageImportDiskDeviceMappingOutput

type ImageImportDiskDeviceMappingOutput struct{ *pulumi.OutputState }

func (ImageImportDiskDeviceMappingOutput) Device

The name of disk N in the custom image.

func (ImageImportDiskDeviceMappingOutput) DiskImageSize

Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.

func (ImageImportDiskDeviceMappingOutput) ElementType

func (ImageImportDiskDeviceMappingOutput) Format

Image format. Value range: When the `RAW`, `VHD`, `qcow2` is imported into the image, the system automatically detects the image format, whichever comes first.

func (ImageImportDiskDeviceMappingOutput) OssBucket

Save the exported OSS bucket.

func (ImageImportDiskDeviceMappingOutput) OssObject

The file name of your OSS Object.

func (ImageImportDiskDeviceMappingOutput) ToImageImportDiskDeviceMappingOutput

func (o ImageImportDiskDeviceMappingOutput) ToImageImportDiskDeviceMappingOutput() ImageImportDiskDeviceMappingOutput

func (ImageImportDiskDeviceMappingOutput) ToImageImportDiskDeviceMappingOutputWithContext

func (o ImageImportDiskDeviceMappingOutput) ToImageImportDiskDeviceMappingOutputWithContext(ctx context.Context) ImageImportDiskDeviceMappingOutput

type ImageImportInput added in v2.25.1

type ImageImportInput interface {
	pulumi.Input

	ToImageImportOutput() ImageImportOutput
	ToImageImportOutputWithContext(ctx context.Context) ImageImportOutput
}

type ImageImportMap added in v2.35.1

type ImageImportMap map[string]ImageImportInput

func (ImageImportMap) ElementType added in v2.35.1

func (ImageImportMap) ElementType() reflect.Type

func (ImageImportMap) ToImageImportMapOutput added in v2.35.1

func (i ImageImportMap) ToImageImportMapOutput() ImageImportMapOutput

func (ImageImportMap) ToImageImportMapOutputWithContext added in v2.35.1

func (i ImageImportMap) ToImageImportMapOutputWithContext(ctx context.Context) ImageImportMapOutput

type ImageImportMapInput added in v2.35.1

type ImageImportMapInput interface {
	pulumi.Input

	ToImageImportMapOutput() ImageImportMapOutput
	ToImageImportMapOutputWithContext(context.Context) ImageImportMapOutput
}

ImageImportMapInput is an input type that accepts ImageImportMap and ImageImportMapOutput values. You can construct a concrete instance of `ImageImportMapInput` via:

ImageImportMap{ "key": ImageImportArgs{...} }

type ImageImportMapOutput added in v2.35.1

type ImageImportMapOutput struct{ *pulumi.OutputState }

func (ImageImportMapOutput) ElementType added in v2.35.1

func (ImageImportMapOutput) ElementType() reflect.Type

func (ImageImportMapOutput) MapIndex added in v2.35.1

func (ImageImportMapOutput) ToImageImportMapOutput added in v2.35.1

func (o ImageImportMapOutput) ToImageImportMapOutput() ImageImportMapOutput

func (ImageImportMapOutput) ToImageImportMapOutputWithContext added in v2.35.1

func (o ImageImportMapOutput) ToImageImportMapOutputWithContext(ctx context.Context) ImageImportMapOutput

type ImageImportOutput added in v2.25.1

type ImageImportOutput struct {
	*pulumi.OutputState
}

func (ImageImportOutput) ElementType added in v2.25.1

func (ImageImportOutput) ElementType() reflect.Type

func (ImageImportOutput) ToImageImportOutput added in v2.25.1

func (o ImageImportOutput) ToImageImportOutput() ImageImportOutput

func (ImageImportOutput) ToImageImportOutputWithContext added in v2.25.1

func (o ImageImportOutput) ToImageImportOutputWithContext(ctx context.Context) ImageImportOutput

func (ImageImportOutput) ToImageImportPtrOutput added in v2.35.1

func (o ImageImportOutput) ToImageImportPtrOutput() ImageImportPtrOutput

func (ImageImportOutput) ToImageImportPtrOutputWithContext added in v2.35.1

func (o ImageImportOutput) ToImageImportPtrOutputWithContext(ctx context.Context) ImageImportPtrOutput

type ImageImportPtrInput added in v2.35.1

type ImageImportPtrInput interface {
	pulumi.Input

	ToImageImportPtrOutput() ImageImportPtrOutput
	ToImageImportPtrOutputWithContext(ctx context.Context) ImageImportPtrOutput
}

type ImageImportPtrOutput added in v2.35.1

type ImageImportPtrOutput struct {
	*pulumi.OutputState
}

func (ImageImportPtrOutput) ElementType added in v2.35.1

func (ImageImportPtrOutput) ElementType() reflect.Type

func (ImageImportPtrOutput) ToImageImportPtrOutput added in v2.35.1

func (o ImageImportPtrOutput) ToImageImportPtrOutput() ImageImportPtrOutput

func (ImageImportPtrOutput) ToImageImportPtrOutputWithContext added in v2.35.1

func (o ImageImportPtrOutput) ToImageImportPtrOutputWithContext(ctx context.Context) ImageImportPtrOutput

type ImageImportState

type ImageImportState struct {
	// Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `i386` , Default is `x8664`.
	Architecture pulumi.StringPtrInput
	// Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
	Description pulumi.StringPtrInput
	// Description of the system with disks and snapshots under the image.
	DiskDeviceMappings ImageImportDiskDeviceMappingArrayInput
	// The image name. The length is 2 ~ 128 English or Chinese characters. Must start with a english letter or Chinese, and cannot start with http: // and https: //. Can contain numbers, colons (:), underscores (_), or hyphens (-).
	ImageName pulumi.StringPtrInput
	// The type of the license used to activate the operating system after the image is imported. Default value: `Auto`. Valid values: `Auto`,`Aliyun`,`BYOL`.
	LicenseType pulumi.StringPtrInput
	// Operating system platform type. Valid values: `windows`, Default is `linux`.
	OsType pulumi.StringPtrInput
	// Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `CentOS`, `Ubuntu`, `SUSE`, `OpenSUSE`, `Debian`, `CoreOS`, `Windows Server 2003`, `Windows Server 2008`, `Windows Server 2012`, `Windows 7`, Default is `Others Linux`, `Customized Linux`.
	Platform pulumi.StringPtrInput
}

func (ImageImportState) ElementType

func (ImageImportState) ElementType() reflect.Type

type ImageInput added in v2.25.1

type ImageInput interface {
	pulumi.Input

	ToImageOutput() ImageOutput
	ToImageOutputWithContext(ctx context.Context) ImageOutput
}

type ImageMap added in v2.35.1

type ImageMap map[string]ImageInput

func (ImageMap) ElementType added in v2.35.1

func (ImageMap) ElementType() reflect.Type

func (ImageMap) ToImageMapOutput added in v2.35.1

func (i ImageMap) ToImageMapOutput() ImageMapOutput

func (ImageMap) ToImageMapOutputWithContext added in v2.35.1

func (i ImageMap) ToImageMapOutputWithContext(ctx context.Context) ImageMapOutput

type ImageMapInput added in v2.35.1

type ImageMapInput interface {
	pulumi.Input

	ToImageMapOutput() ImageMapOutput
	ToImageMapOutputWithContext(context.Context) ImageMapOutput
}

ImageMapInput is an input type that accepts ImageMap and ImageMapOutput values. You can construct a concrete instance of `ImageMapInput` via:

ImageMap{ "key": ImageArgs{...} }

type ImageMapOutput added in v2.35.1

type ImageMapOutput struct{ *pulumi.OutputState }

func (ImageMapOutput) ElementType added in v2.35.1

func (ImageMapOutput) ElementType() reflect.Type

func (ImageMapOutput) MapIndex added in v2.35.1

func (ImageMapOutput) ToImageMapOutput added in v2.35.1

func (o ImageMapOutput) ToImageMapOutput() ImageMapOutput

func (ImageMapOutput) ToImageMapOutputWithContext added in v2.35.1

func (o ImageMapOutput) ToImageMapOutputWithContext(ctx context.Context) ImageMapOutput

type ImageOutput added in v2.25.1

type ImageOutput struct {
	*pulumi.OutputState
}

func (ImageOutput) ElementType added in v2.25.1

func (ImageOutput) ElementType() reflect.Type

func (ImageOutput) ToImageOutput added in v2.25.1

func (o ImageOutput) ToImageOutput() ImageOutput

func (ImageOutput) ToImageOutputWithContext added in v2.25.1

func (o ImageOutput) ToImageOutputWithContext(ctx context.Context) ImageOutput

func (ImageOutput) ToImagePtrOutput added in v2.35.1

func (o ImageOutput) ToImagePtrOutput() ImagePtrOutput

func (ImageOutput) ToImagePtrOutputWithContext added in v2.35.1

func (o ImageOutput) ToImagePtrOutputWithContext(ctx context.Context) ImagePtrOutput

type ImagePtrInput added in v2.35.1

type ImagePtrInput interface {
	pulumi.Input

	ToImagePtrOutput() ImagePtrOutput
	ToImagePtrOutputWithContext(ctx context.Context) ImagePtrOutput
}

type ImagePtrOutput added in v2.35.1

type ImagePtrOutput struct {
	*pulumi.OutputState
}

func (ImagePtrOutput) ElementType added in v2.35.1

func (ImagePtrOutput) ElementType() reflect.Type

func (ImagePtrOutput) ToImagePtrOutput added in v2.35.1

func (o ImagePtrOutput) ToImagePtrOutput() ImagePtrOutput

func (ImagePtrOutput) ToImagePtrOutputWithContext added in v2.35.1

func (o ImagePtrOutput) ToImagePtrOutputWithContext(ctx context.Context) ImagePtrOutput

type ImageSharePermission

type ImageSharePermission struct {
	pulumi.CustomResourceState

	// Alibaba Cloud Account ID. It is used to share images.
	AccountId pulumi.StringOutput `pulumi:"accountId"`
	// The source image ID.
	ImageId pulumi.StringOutput `pulumi:"imageId"`
}

Manage image sharing permissions. You can share your custom image to other Alibaba Cloud users. The user can use the shared custom image to create ECS instances or replace the system disk of the instance.

> **NOTE:** You can only share your own custom images to other Alibaba Cloud users.

> **NOTE:** Each custom image can be shared with up to 50 Alibaba Cloud accounts. You can submit a ticket to share with more users.

> **NOTE:** After creating an ECS instance using a shared image, once the custom image owner releases the image sharing relationship or deletes the custom image, the instance cannot initialize the system disk.

> **NOTE:** Available in 1.68.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewImageSharePermission(ctx, "_default", &ecs.ImageSharePermissionArgs{
			AccountId: pulumi.String("1234567890"),
			ImageId:   pulumi.String("m-bp1gxyh***"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Attributes Reference0

The following attributes are exported:

* `id` - ID of the image. It formats as `<image_id>:<account_id>`

## Import

image can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/imageSharePermission:ImageSharePermission default m-uf66yg1q:123456789

```

func GetImageSharePermission

func GetImageSharePermission(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ImageSharePermissionState, opts ...pulumi.ResourceOption) (*ImageSharePermission, error)

GetImageSharePermission gets an existing ImageSharePermission 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 NewImageSharePermission

func NewImageSharePermission(ctx *pulumi.Context,
	name string, args *ImageSharePermissionArgs, opts ...pulumi.ResourceOption) (*ImageSharePermission, error)

NewImageSharePermission registers a new resource with the given unique name, arguments, and options.

func (*ImageSharePermission) ElementType added in v2.25.1

func (*ImageSharePermission) ElementType() reflect.Type

func (*ImageSharePermission) ToImageSharePermissionOutput added in v2.25.1

func (i *ImageSharePermission) ToImageSharePermissionOutput() ImageSharePermissionOutput

func (*ImageSharePermission) ToImageSharePermissionOutputWithContext added in v2.25.1

func (i *ImageSharePermission) ToImageSharePermissionOutputWithContext(ctx context.Context) ImageSharePermissionOutput

func (*ImageSharePermission) ToImageSharePermissionPtrOutput added in v2.35.1

func (i *ImageSharePermission) ToImageSharePermissionPtrOutput() ImageSharePermissionPtrOutput

func (*ImageSharePermission) ToImageSharePermissionPtrOutputWithContext added in v2.35.1

func (i *ImageSharePermission) ToImageSharePermissionPtrOutputWithContext(ctx context.Context) ImageSharePermissionPtrOutput

type ImageSharePermissionArgs

type ImageSharePermissionArgs struct {
	// Alibaba Cloud Account ID. It is used to share images.
	AccountId pulumi.StringInput
	// The source image ID.
	ImageId pulumi.StringInput
}

The set of arguments for constructing a ImageSharePermission resource.

func (ImageSharePermissionArgs) ElementType

func (ImageSharePermissionArgs) ElementType() reflect.Type

type ImageSharePermissionArray added in v2.35.1

type ImageSharePermissionArray []ImageSharePermissionInput

func (ImageSharePermissionArray) ElementType added in v2.35.1

func (ImageSharePermissionArray) ElementType() reflect.Type

func (ImageSharePermissionArray) ToImageSharePermissionArrayOutput added in v2.35.1

func (i ImageSharePermissionArray) ToImageSharePermissionArrayOutput() ImageSharePermissionArrayOutput

func (ImageSharePermissionArray) ToImageSharePermissionArrayOutputWithContext added in v2.35.1

func (i ImageSharePermissionArray) ToImageSharePermissionArrayOutputWithContext(ctx context.Context) ImageSharePermissionArrayOutput

type ImageSharePermissionArrayInput added in v2.35.1

type ImageSharePermissionArrayInput interface {
	pulumi.Input

	ToImageSharePermissionArrayOutput() ImageSharePermissionArrayOutput
	ToImageSharePermissionArrayOutputWithContext(context.Context) ImageSharePermissionArrayOutput
}

ImageSharePermissionArrayInput is an input type that accepts ImageSharePermissionArray and ImageSharePermissionArrayOutput values. You can construct a concrete instance of `ImageSharePermissionArrayInput` via:

ImageSharePermissionArray{ ImageSharePermissionArgs{...} }

type ImageSharePermissionArrayOutput added in v2.35.1

type ImageSharePermissionArrayOutput struct{ *pulumi.OutputState }

func (ImageSharePermissionArrayOutput) ElementType added in v2.35.1

func (ImageSharePermissionArrayOutput) Index added in v2.35.1

func (ImageSharePermissionArrayOutput) ToImageSharePermissionArrayOutput added in v2.35.1

func (o ImageSharePermissionArrayOutput) ToImageSharePermissionArrayOutput() ImageSharePermissionArrayOutput

func (ImageSharePermissionArrayOutput) ToImageSharePermissionArrayOutputWithContext added in v2.35.1

func (o ImageSharePermissionArrayOutput) ToImageSharePermissionArrayOutputWithContext(ctx context.Context) ImageSharePermissionArrayOutput

type ImageSharePermissionInput added in v2.25.1

type ImageSharePermissionInput interface {
	pulumi.Input

	ToImageSharePermissionOutput() ImageSharePermissionOutput
	ToImageSharePermissionOutputWithContext(ctx context.Context) ImageSharePermissionOutput
}

type ImageSharePermissionMap added in v2.35.1

type ImageSharePermissionMap map[string]ImageSharePermissionInput

func (ImageSharePermissionMap) ElementType added in v2.35.1

func (ImageSharePermissionMap) ElementType() reflect.Type

func (ImageSharePermissionMap) ToImageSharePermissionMapOutput added in v2.35.1

func (i ImageSharePermissionMap) ToImageSharePermissionMapOutput() ImageSharePermissionMapOutput

func (ImageSharePermissionMap) ToImageSharePermissionMapOutputWithContext added in v2.35.1

func (i ImageSharePermissionMap) ToImageSharePermissionMapOutputWithContext(ctx context.Context) ImageSharePermissionMapOutput

type ImageSharePermissionMapInput added in v2.35.1

type ImageSharePermissionMapInput interface {
	pulumi.Input

	ToImageSharePermissionMapOutput() ImageSharePermissionMapOutput
	ToImageSharePermissionMapOutputWithContext(context.Context) ImageSharePermissionMapOutput
}

ImageSharePermissionMapInput is an input type that accepts ImageSharePermissionMap and ImageSharePermissionMapOutput values. You can construct a concrete instance of `ImageSharePermissionMapInput` via:

ImageSharePermissionMap{ "key": ImageSharePermissionArgs{...} }

type ImageSharePermissionMapOutput added in v2.35.1

type ImageSharePermissionMapOutput struct{ *pulumi.OutputState }

func (ImageSharePermissionMapOutput) ElementType added in v2.35.1

func (ImageSharePermissionMapOutput) MapIndex added in v2.35.1

func (ImageSharePermissionMapOutput) ToImageSharePermissionMapOutput added in v2.35.1

func (o ImageSharePermissionMapOutput) ToImageSharePermissionMapOutput() ImageSharePermissionMapOutput

func (ImageSharePermissionMapOutput) ToImageSharePermissionMapOutputWithContext added in v2.35.1

func (o ImageSharePermissionMapOutput) ToImageSharePermissionMapOutputWithContext(ctx context.Context) ImageSharePermissionMapOutput

type ImageSharePermissionOutput added in v2.25.1

type ImageSharePermissionOutput struct {
	*pulumi.OutputState
}

func (ImageSharePermissionOutput) ElementType added in v2.25.1

func (ImageSharePermissionOutput) ElementType() reflect.Type

func (ImageSharePermissionOutput) ToImageSharePermissionOutput added in v2.25.1

func (o ImageSharePermissionOutput) ToImageSharePermissionOutput() ImageSharePermissionOutput

func (ImageSharePermissionOutput) ToImageSharePermissionOutputWithContext added in v2.25.1

func (o ImageSharePermissionOutput) ToImageSharePermissionOutputWithContext(ctx context.Context) ImageSharePermissionOutput

func (ImageSharePermissionOutput) ToImageSharePermissionPtrOutput added in v2.35.1

func (o ImageSharePermissionOutput) ToImageSharePermissionPtrOutput() ImageSharePermissionPtrOutput

func (ImageSharePermissionOutput) ToImageSharePermissionPtrOutputWithContext added in v2.35.1

func (o ImageSharePermissionOutput) ToImageSharePermissionPtrOutputWithContext(ctx context.Context) ImageSharePermissionPtrOutput

type ImageSharePermissionPtrInput added in v2.35.1

type ImageSharePermissionPtrInput interface {
	pulumi.Input

	ToImageSharePermissionPtrOutput() ImageSharePermissionPtrOutput
	ToImageSharePermissionPtrOutputWithContext(ctx context.Context) ImageSharePermissionPtrOutput
}

type ImageSharePermissionPtrOutput added in v2.35.1

type ImageSharePermissionPtrOutput struct {
	*pulumi.OutputState
}

func (ImageSharePermissionPtrOutput) ElementType added in v2.35.1

func (ImageSharePermissionPtrOutput) ToImageSharePermissionPtrOutput added in v2.35.1

func (o ImageSharePermissionPtrOutput) ToImageSharePermissionPtrOutput() ImageSharePermissionPtrOutput

func (ImageSharePermissionPtrOutput) ToImageSharePermissionPtrOutputWithContext added in v2.35.1

func (o ImageSharePermissionPtrOutput) ToImageSharePermissionPtrOutputWithContext(ctx context.Context) ImageSharePermissionPtrOutput

type ImageSharePermissionState

type ImageSharePermissionState struct {
	// Alibaba Cloud Account ID. It is used to share images.
	AccountId pulumi.StringPtrInput
	// The source image ID.
	ImageId pulumi.StringPtrInput
}

func (ImageSharePermissionState) ElementType

func (ImageSharePermissionState) ElementType() reflect.Type

type ImageState

type ImageState struct {
	// Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `i386` , Default is `x8664`.
	Architecture pulumi.StringPtrInput
	// The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
	Description pulumi.StringPtrInput
	// Description of the system with disks and snapshots under the image.
	DiskDeviceMappings ImageDiskDeviceMappingArrayInput
	// Indicates whether to force delete the custom image, Default is `false`.
	// - true:Force deletes the custom image, regardless of whether the image is currently being used by other instances.
	// - false:Verifies that the image is not currently in use by any other instances before deleting the image.
	Force pulumi.BoolPtrInput
	// The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (_), or hyphens (-). Default value: null.
	ImageName pulumi.StringPtrInput
	// The instance ID.
	InstanceId pulumi.StringPtrInput
	// Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use `image_name` instead.
	Name pulumi.StringPtrInput
	// Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: `CentOS`, `Ubuntu`, `SUSE`, `OpenSUSE`, `RedHat`, `Debian`, `CoreOS`, `Aliyun Linux`, `Windows Server 2003`, `Windows Server 2008`, `Windows Server 2012`, `Windows 7`, Default is `Others Linux`, `Customized Linux`.
	Platform pulumi.StringPtrInput
	// The ID of the enterprise resource group to which a custom image belongs
	ResourceGroupId pulumi.StringPtrInput
	// Specifies a snapshot that is used to create a combined custom image.
	SnapshotId pulumi.StringPtrInput
	// The tag value of an image. The value of N ranges from 1 to 20.
	Tags pulumi.MapInput
}

func (ImageState) ElementType

func (ImageState) ElementType() reflect.Type

type Instance

type Instance struct {
	pulumi.CustomResourceState

	// It has been deprecated from version "1.7.0". Setting "internetMaxBandwidthOut" larger than 0 can allocate a public ip address for an instance.
	//
	// Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.
	AllocatePublicIp pulumi.BoolPtrOutput `pulumi:"allocatePublicIp"`
	// The automatic release time of the `PostPaid` instance.
	// The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time.
	// Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.
	AutoReleaseTime pulumi.StringPtrOutput `pulumi:"autoReleaseTime"`
	// Auto renewal period of an instance, in the unit of month. It is valid when `instanceChargeType` is `PrePaid`. Default to 1. Valid value:
	// - [1, 2, 3, 6, 12] when `periodUnit` in "Month"
	// - [1, 2, 3] when `periodUnit` in "Week"
	AutoRenewPeriod pulumi.IntPtrOutput `pulumi:"autoRenewPeriod"`
	// The Zone to start the instance in. It is ignored and will be computed when set `vswitchId`.
	AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"`
	// Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
	CreditSpecification pulumi.StringOutput `pulumi:"creditSpecification"`
	// The list of data disks created with instance.
	DataDisks InstanceDataDiskArrayOutput `pulumi:"dataDisks"`
	// Whether enable the deletion protection or not. Default value: `false`.
	// - true: Enable deletion protection.
	// - false: Disable deletion protection.
	DeletionProtection pulumi.BoolPtrOutput `pulumi:"deletionProtection"`
	// The description of the data disk.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Specifies whether to send a dry-run request. Default to false.
	// - true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the `DryRunOperation` error code is returned.
	// - false: A request is sent. If the validation succeeds, the instance is created.
	DryRun pulumi.BoolPtrOutput `pulumi:"dryRun"`
	// If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly.
	// However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
	ForceDelete pulumi.BoolPtrOutput `pulumi:"forceDelete"`
	// Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect.
	// On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
	HostName pulumi.StringOutput `pulumi:"hostName"`
	// The Image to use for the instance. ECS instance's image can be replaced via changing `imageId`. When it is changed, the instance will reboot to make the change take effect.
	ImageId pulumi.StringOutput `pulumi:"imageId"`
	// Whether to change instance disks charge type when changing instance charge type.
	IncludeDataDisks pulumi.BoolPtrOutput `pulumi:"includeDataDisks"`
	// Valid values are `PrePaid`, `PostPaid`, The default is `PostPaid`.
	InstanceChargeType pulumi.StringPtrOutput `pulumi:"instanceChargeType"`
	InstanceName       pulumi.StringPtrOutput `pulumi:"instanceName"`
	// The type of instance to start. When it is changed, the instance will reboot to make the change take effect.
	InstanceType pulumi.StringOutput `pulumi:"instanceType"`
	// Internet charge type of the instance, Valid values are `PayByBandwidth`, `PayByTraffic`. Default is `PayByTraffic`. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic".
	InternetChargeType pulumi.StringPtrOutput `pulumi:"internetChargeType"`
	// Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
	InternetMaxBandwidthIn pulumi.IntOutput `pulumi:"internetMaxBandwidthIn"`
	// Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range:  [0, 100]. Default to 0 Mbps.
	InternetMaxBandwidthOut pulumi.IntPtrOutput `pulumi:"internetMaxBandwidthOut"`
	// It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.
	//
	// Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.
	IoOptimized pulumi.StringPtrOutput `pulumi:"ioOptimized"`
	// Whether to use outdated instance type. Default to false.
	IsOutdated pulumi.BoolPtrOutput `pulumi:"isOutdated"`
	// The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
	KeyName pulumi.StringOutput `pulumi:"keyName"`
	// An KMS encrypts password used to an instance. If the `password` is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
	KmsEncryptedPassword pulumi.StringPtrOutput `pulumi:"kmsEncryptedPassword"`
	// An KMS encryption context used to decrypt `kmsEncryptedPassword` before creating or updating an instance with `kmsEncryptedPassword`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kmsEncryptedPassword` is set. When it is changed, the instance will reboot to make the change take effect.
	KmsEncryptionContext pulumi.MapOutput `pulumi:"kmsEncryptionContext"`
	// Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
	Password pulumi.StringPtrOutput `pulumi:"password"`
	// The duration that you will buy the resource, in month. It is valid when `instanceChargeType` is `PrePaid`. Default to 1. Valid values:
	// - [1-9, 12, 24, 36, 48, 60] when `periodUnit` in "Month"
	// - [1-3] when `periodUnit` in "Week"
	Period pulumi.IntPtrOutput `pulumi:"period"`
	// The duration unit that you will buy the resource. It is valid when `instanceChargeType` is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
	PeriodUnit pulumi.StringPtrOutput `pulumi:"periodUnit"`
	// Instance private IP address can be specified when you creating new instance. It is valid when `vswitchId` is specified. When it is changed, the instance will reboot to make the change take effect.
	PrivateIp pulumi.StringOutput `pulumi:"privateIp"`
	// The instance public ip.
	PublicIp pulumi.StringOutput `pulumi:"publicIp"`
	// Whether to renew an ECS instance automatically or not. It is valid when `instanceChargeType` is `PrePaid`. Default to "Normal". Valid values:
	// - `AutoRenewal`: Enable auto renewal.
	// - `Normal`: Disable auto renewal.
	// - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
	RenewalStatus pulumi.StringPtrOutput `pulumi:"renewalStatus"`
	// The Id of resource group which the instance belongs.
	ResourceGroupId pulumi.StringPtrOutput `pulumi:"resourceGroupId"`
	// Instance RAM role name. The name is provided and maintained by RAM. You can use `ram.Role` to create a new one.
	RoleName pulumi.StringOutput `pulumi:"roleName"`
	// The security enhancement strategy.
	// - Active: Enable security enhancement strategy, it only works on system images.
	// - Deactive: Disable security enhancement strategy, it works on all images.
	SecurityEnhancementStrategy pulumi.StringPtrOutput `pulumi:"securityEnhancementStrategy"`
	// A list of security group ids to associate with.
	SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"`
	// The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
	SpotPriceLimit pulumi.Float64PtrOutput `pulumi:"spotPriceLimit"`
	// The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter `instanceChargeType` is 'PostPaid'. Value range:
	// - NoSpot: A regular Pay-As-You-Go instance.
	// - SpotWithPriceLimit: A price threshold for a spot instance
	// - SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
	SpotStrategy pulumi.StringPtrOutput `pulumi:"spotStrategy"`
	// The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to `Running`.
	Status   pulumi.StringPtrOutput `pulumi:"status"`
	SubnetId pulumi.StringOutput    `pulumi:"subnetId"`
	// The ID of the automatic snapshot policy applied to the system disk.
	SystemDiskAutoSnapshotPolicyId pulumi.StringPtrOutput `pulumi:"systemDiskAutoSnapshotPolicyId"`
	// Valid values are `ephemeralSsd`, `cloudEfficiency`, `cloudSsd`, `cloudEssd`, `cloud`. `cloud` only is used to some none I/O optimized instance. Default to `cloudEfficiency`.
	SystemDiskCategory pulumi.StringPtrOutput `pulumi:"systemDiskCategory"`
	// The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
	SystemDiskDescription pulumi.StringPtrOutput `pulumi:"systemDiskDescription"`
	// The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
	SystemDiskName pulumi.StringPtrOutput `pulumi:"systemDiskName"`
	// The performance level of the ESSD used as the system disk, Valid values: `PL0`, `PL1`, `PL2`, `PL3`, Default to `PL0`;For more information about ESSD, See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/122389.htm).
	SystemDiskPerformanceLevel pulumi.StringOutput `pulumi:"systemDiskPerformanceLevel"`
	// Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
	SystemDiskSize pulumi.IntPtrOutput `pulumi:"systemDiskSize"`
	// A mapping of tags to assign to the resource.
	// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
	// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on [cloud-init module type](https://cloudinit.readthedocs.io/en/latest/topics/modules.html).
	UserData pulumi.StringPtrOutput `pulumi:"userData"`
	// A mapping of tags to assign to the devices created by the instance at launch time.
	// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
	// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
	VolumeTags pulumi.MapOutput `pulumi:"volumeTags"`
	// The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
	VswitchId pulumi.StringPtrOutput `pulumi:"vswitchId"`
}

## Import

Instance can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/instance:Instance example i-abc12345678

```

func GetInstance

func GetInstance(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error)

GetInstance gets an existing Instance 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 NewInstance

func NewInstance(ctx *pulumi.Context,
	name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error)

NewInstance registers a new resource with the given unique name, arguments, and options.

func (*Instance) ElementType added in v2.25.1

func (*Instance) ElementType() reflect.Type

func (*Instance) ToInstanceOutput added in v2.25.1

func (i *Instance) ToInstanceOutput() InstanceOutput

func (*Instance) ToInstanceOutputWithContext added in v2.25.1

func (i *Instance) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput

func (*Instance) ToInstancePtrOutput added in v2.35.1

func (i *Instance) ToInstancePtrOutput() InstancePtrOutput

func (*Instance) ToInstancePtrOutputWithContext added in v2.35.1

func (i *Instance) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput

type InstanceArgs

type InstanceArgs struct {
	// It has been deprecated from version "1.7.0". Setting "internetMaxBandwidthOut" larger than 0 can allocate a public ip address for an instance.
	//
	// Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.
	AllocatePublicIp pulumi.BoolPtrInput
	// The automatic release time of the `PostPaid` instance.
	// The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time.
	// Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.
	AutoReleaseTime pulumi.StringPtrInput
	// Auto renewal period of an instance, in the unit of month. It is valid when `instanceChargeType` is `PrePaid`. Default to 1. Valid value:
	// - [1, 2, 3, 6, 12] when `periodUnit` in "Month"
	// - [1, 2, 3] when `periodUnit` in "Week"
	AutoRenewPeriod pulumi.IntPtrInput
	// The Zone to start the instance in. It is ignored and will be computed when set `vswitchId`.
	AvailabilityZone pulumi.StringPtrInput
	// Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
	CreditSpecification pulumi.StringPtrInput
	// The list of data disks created with instance.
	DataDisks InstanceDataDiskArrayInput
	// Whether enable the deletion protection or not. Default value: `false`.
	// - true: Enable deletion protection.
	// - false: Disable deletion protection.
	DeletionProtection pulumi.BoolPtrInput
	// The description of the data disk.
	Description pulumi.StringPtrInput
	// Specifies whether to send a dry-run request. Default to false.
	// - true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the `DryRunOperation` error code is returned.
	// - false: A request is sent. If the validation succeeds, the instance is created.
	DryRun pulumi.BoolPtrInput
	// If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly.
	// However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
	ForceDelete pulumi.BoolPtrInput
	// Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect.
	// On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
	HostName pulumi.StringPtrInput
	// The Image to use for the instance. ECS instance's image can be replaced via changing `imageId`. When it is changed, the instance will reboot to make the change take effect.
	ImageId pulumi.StringInput
	// Whether to change instance disks charge type when changing instance charge type.
	IncludeDataDisks pulumi.BoolPtrInput
	// Valid values are `PrePaid`, `PostPaid`, The default is `PostPaid`.
	InstanceChargeType pulumi.StringPtrInput
	InstanceName       pulumi.StringPtrInput
	// The type of instance to start. When it is changed, the instance will reboot to make the change take effect.
	InstanceType pulumi.StringInput
	// Internet charge type of the instance, Valid values are `PayByBandwidth`, `PayByTraffic`. Default is `PayByTraffic`. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic".
	InternetChargeType pulumi.StringPtrInput
	// Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
	InternetMaxBandwidthIn pulumi.IntPtrInput
	// Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range:  [0, 100]. Default to 0 Mbps.
	InternetMaxBandwidthOut pulumi.IntPtrInput
	// It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.
	//
	// Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.
	IoOptimized pulumi.StringPtrInput
	// Whether to use outdated instance type. Default to false.
	IsOutdated pulumi.BoolPtrInput
	// The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
	KeyName pulumi.StringPtrInput
	// An KMS encrypts password used to an instance. If the `password` is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
	KmsEncryptedPassword pulumi.StringPtrInput
	// An KMS encryption context used to decrypt `kmsEncryptedPassword` before creating or updating an instance with `kmsEncryptedPassword`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kmsEncryptedPassword` is set. When it is changed, the instance will reboot to make the change take effect.
	KmsEncryptionContext pulumi.MapInput
	// Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
	Password pulumi.StringPtrInput
	// The duration that you will buy the resource, in month. It is valid when `instanceChargeType` is `PrePaid`. Default to 1. Valid values:
	// - [1-9, 12, 24, 36, 48, 60] when `periodUnit` in "Month"
	// - [1-3] when `periodUnit` in "Week"
	Period pulumi.IntPtrInput
	// The duration unit that you will buy the resource. It is valid when `instanceChargeType` is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
	PeriodUnit pulumi.StringPtrInput
	// Instance private IP address can be specified when you creating new instance. It is valid when `vswitchId` is specified. When it is changed, the instance will reboot to make the change take effect.
	PrivateIp pulumi.StringPtrInput
	// Whether to renew an ECS instance automatically or not. It is valid when `instanceChargeType` is `PrePaid`. Default to "Normal". Valid values:
	// - `AutoRenewal`: Enable auto renewal.
	// - `Normal`: Disable auto renewal.
	// - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
	RenewalStatus pulumi.StringPtrInput
	// The Id of resource group which the instance belongs.
	ResourceGroupId pulumi.StringPtrInput
	// Instance RAM role name. The name is provided and maintained by RAM. You can use `ram.Role` to create a new one.
	RoleName pulumi.StringPtrInput
	// The security enhancement strategy.
	// - Active: Enable security enhancement strategy, it only works on system images.
	// - Deactive: Disable security enhancement strategy, it works on all images.
	SecurityEnhancementStrategy pulumi.StringPtrInput
	// A list of security group ids to associate with.
	SecurityGroups pulumi.StringArrayInput
	// The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
	SpotPriceLimit pulumi.Float64PtrInput
	// The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter `instanceChargeType` is 'PostPaid'. Value range:
	// - NoSpot: A regular Pay-As-You-Go instance.
	// - SpotWithPriceLimit: A price threshold for a spot instance
	// - SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
	SpotStrategy pulumi.StringPtrInput
	// The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to `Running`.
	Status   pulumi.StringPtrInput
	SubnetId pulumi.StringPtrInput
	// The ID of the automatic snapshot policy applied to the system disk.
	SystemDiskAutoSnapshotPolicyId pulumi.StringPtrInput
	// Valid values are `ephemeralSsd`, `cloudEfficiency`, `cloudSsd`, `cloudEssd`, `cloud`. `cloud` only is used to some none I/O optimized instance. Default to `cloudEfficiency`.
	SystemDiskCategory pulumi.StringPtrInput
	// The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
	SystemDiskDescription pulumi.StringPtrInput
	// The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
	SystemDiskName pulumi.StringPtrInput
	// The performance level of the ESSD used as the system disk, Valid values: `PL0`, `PL1`, `PL2`, `PL3`, Default to `PL0`;For more information about ESSD, See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/122389.htm).
	SystemDiskPerformanceLevel pulumi.StringPtrInput
	// Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
	SystemDiskSize pulumi.IntPtrInput
	// A mapping of tags to assign to the resource.
	// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
	// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
	Tags pulumi.StringMapInput
	// User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on [cloud-init module type](https://cloudinit.readthedocs.io/en/latest/topics/modules.html).
	UserData pulumi.StringPtrInput
	// A mapping of tags to assign to the devices created by the instance at launch time.
	// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
	// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
	VolumeTags pulumi.MapInput
	// The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
	VswitchId pulumi.StringPtrInput
}

The set of arguments for constructing a Instance resource.

func (InstanceArgs) ElementType

func (InstanceArgs) ElementType() reflect.Type

type InstanceArray added in v2.35.1

type InstanceArray []InstanceInput

func (InstanceArray) ElementType added in v2.35.1

func (InstanceArray) ElementType() reflect.Type

func (InstanceArray) ToInstanceArrayOutput added in v2.35.1

func (i InstanceArray) ToInstanceArrayOutput() InstanceArrayOutput

func (InstanceArray) ToInstanceArrayOutputWithContext added in v2.35.1

func (i InstanceArray) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput

type InstanceArrayInput added in v2.35.1

type InstanceArrayInput interface {
	pulumi.Input

	ToInstanceArrayOutput() InstanceArrayOutput
	ToInstanceArrayOutputWithContext(context.Context) InstanceArrayOutput
}

InstanceArrayInput is an input type that accepts InstanceArray and InstanceArrayOutput values. You can construct a concrete instance of `InstanceArrayInput` via:

InstanceArray{ InstanceArgs{...} }

type InstanceArrayOutput added in v2.35.1

type InstanceArrayOutput struct{ *pulumi.OutputState }

func (InstanceArrayOutput) ElementType added in v2.35.1

func (InstanceArrayOutput) ElementType() reflect.Type

func (InstanceArrayOutput) Index added in v2.35.1

func (InstanceArrayOutput) ToInstanceArrayOutput added in v2.35.1

func (o InstanceArrayOutput) ToInstanceArrayOutput() InstanceArrayOutput

func (InstanceArrayOutput) ToInstanceArrayOutputWithContext added in v2.35.1

func (o InstanceArrayOutput) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput

type InstanceDataDisk

type InstanceDataDisk struct {
	// The ID of the automatic snapshot policy applied to the system disk.
	AutoSnapshotPolicyId *string `pulumi:"autoSnapshotPolicyId"`
	// The category of the disk:
	// - `cloud`: The general cloud disk.
	// - `cloudEfficiency`: The efficiency cloud disk.
	// - `cloudSsd`: The SSD cloud disk.
	// - `cloudEssd`: The ESSD cloud disk.
	// - `ephemeralSsd`: The local SSD disk.
	//   Default to `cloudEfficiency`.
	Category *string `pulumi:"category"`
	// Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloudSsd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value: `true`.
	DeleteWithInstance *bool `pulumi:"deleteWithInstance"`
	// The description of the data disk.
	Description *string `pulumi:"description"`
	// -(Optional, Bool, ForceNew) Encrypted the data in this disk. Default value: `false`.
	Encrypted *bool `pulumi:"encrypted"`
	// The KMS key ID corresponding to the Nth data disk.
	KmsKeyId *string `pulumi:"kmsKeyId"`
	// The name of the data disk.
	Name *string `pulumi:"name"`
	// The performance level of the ESSD used as data disk:
	// - `PL0`: A single ESSD can deliver up to 10,000 random read/write IOPS.
	// - `PL1`: A single ESSD can deliver up to 50,000 random read/write IOPS.
	// - `PL2`: A single ESSD can deliver up to 100,000 random read/write IOPS.
	// - `PL3`: A single ESSD can deliver up to 1,000,000 random read/write IOPS.
	//   Default to `PL1`.
	PerformanceLevel *string `pulumi:"performanceLevel"`
	// The size of the data disk.
	// - cloud:[5, 2000]
	// - cloud_efficiency:[20, 32768]
	// - cloud_ssd:[20, 32768]
	// - cloud_essd:[20, 32768]
	// - ephemeral_ssd: [5, 800]
	Size int `pulumi:"size"`
	// The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
	SnapshotId *string `pulumi:"snapshotId"`
}

type InstanceDataDiskArgs

type InstanceDataDiskArgs struct {
	// The ID of the automatic snapshot policy applied to the system disk.
	AutoSnapshotPolicyId pulumi.StringPtrInput `pulumi:"autoSnapshotPolicyId"`
	// The category of the disk:
	// - `cloud`: The general cloud disk.
	// - `cloudEfficiency`: The efficiency cloud disk.
	// - `cloudSsd`: The SSD cloud disk.
	// - `cloudEssd`: The ESSD cloud disk.
	// - `ephemeralSsd`: The local SSD disk.
	//   Default to `cloudEfficiency`.
	Category pulumi.StringPtrInput `pulumi:"category"`
	// Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloudSsd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value: `true`.
	DeleteWithInstance pulumi.BoolPtrInput `pulumi:"deleteWithInstance"`
	// The description of the data disk.
	Description pulumi.StringPtrInput `pulumi:"description"`
	// -(Optional, Bool, ForceNew) Encrypted the data in this disk. Default value: `false`.
	Encrypted pulumi.BoolPtrInput `pulumi:"encrypted"`
	// The KMS key ID corresponding to the Nth data disk.
	KmsKeyId pulumi.StringPtrInput `pulumi:"kmsKeyId"`
	// The name of the data disk.
	Name pulumi.StringPtrInput `pulumi:"name"`
	// The performance level of the ESSD used as data disk:
	// - `PL0`: A single ESSD can deliver up to 10,000 random read/write IOPS.
	// - `PL1`: A single ESSD can deliver up to 50,000 random read/write IOPS.
	// - `PL2`: A single ESSD can deliver up to 100,000 random read/write IOPS.
	// - `PL3`: A single ESSD can deliver up to 1,000,000 random read/write IOPS.
	//   Default to `PL1`.
	PerformanceLevel pulumi.StringPtrInput `pulumi:"performanceLevel"`
	// The size of the data disk.
	// - cloud:[5, 2000]
	// - cloud_efficiency:[20, 32768]
	// - cloud_ssd:[20, 32768]
	// - cloud_essd:[20, 32768]
	// - ephemeral_ssd: [5, 800]
	Size pulumi.IntInput `pulumi:"size"`
	// The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
	SnapshotId pulumi.StringPtrInput `pulumi:"snapshotId"`
}

func (InstanceDataDiskArgs) ElementType

func (InstanceDataDiskArgs) ElementType() reflect.Type

func (InstanceDataDiskArgs) ToInstanceDataDiskOutput

func (i InstanceDataDiskArgs) ToInstanceDataDiskOutput() InstanceDataDiskOutput

func (InstanceDataDiskArgs) ToInstanceDataDiskOutputWithContext

func (i InstanceDataDiskArgs) ToInstanceDataDiskOutputWithContext(ctx context.Context) InstanceDataDiskOutput

type InstanceDataDiskArray

type InstanceDataDiskArray []InstanceDataDiskInput

func (InstanceDataDiskArray) ElementType

func (InstanceDataDiskArray) ElementType() reflect.Type

func (InstanceDataDiskArray) ToInstanceDataDiskArrayOutput

func (i InstanceDataDiskArray) ToInstanceDataDiskArrayOutput() InstanceDataDiskArrayOutput

func (InstanceDataDiskArray) ToInstanceDataDiskArrayOutputWithContext

func (i InstanceDataDiskArray) ToInstanceDataDiskArrayOutputWithContext(ctx context.Context) InstanceDataDiskArrayOutput

type InstanceDataDiskArrayInput

type InstanceDataDiskArrayInput interface {
	pulumi.Input

	ToInstanceDataDiskArrayOutput() InstanceDataDiskArrayOutput
	ToInstanceDataDiskArrayOutputWithContext(context.Context) InstanceDataDiskArrayOutput
}

InstanceDataDiskArrayInput is an input type that accepts InstanceDataDiskArray and InstanceDataDiskArrayOutput values. You can construct a concrete instance of `InstanceDataDiskArrayInput` via:

InstanceDataDiskArray{ InstanceDataDiskArgs{...} }

type InstanceDataDiskArrayOutput

type InstanceDataDiskArrayOutput struct{ *pulumi.OutputState }

func (InstanceDataDiskArrayOutput) ElementType

func (InstanceDataDiskArrayOutput) Index

func (InstanceDataDiskArrayOutput) ToInstanceDataDiskArrayOutput

func (o InstanceDataDiskArrayOutput) ToInstanceDataDiskArrayOutput() InstanceDataDiskArrayOutput

func (InstanceDataDiskArrayOutput) ToInstanceDataDiskArrayOutputWithContext

func (o InstanceDataDiskArrayOutput) ToInstanceDataDiskArrayOutputWithContext(ctx context.Context) InstanceDataDiskArrayOutput

type InstanceDataDiskInput

type InstanceDataDiskInput interface {
	pulumi.Input

	ToInstanceDataDiskOutput() InstanceDataDiskOutput
	ToInstanceDataDiskOutputWithContext(context.Context) InstanceDataDiskOutput
}

InstanceDataDiskInput is an input type that accepts InstanceDataDiskArgs and InstanceDataDiskOutput values. You can construct a concrete instance of `InstanceDataDiskInput` via:

InstanceDataDiskArgs{...}

type InstanceDataDiskOutput

type InstanceDataDiskOutput struct{ *pulumi.OutputState }

func (InstanceDataDiskOutput) AutoSnapshotPolicyId

func (o InstanceDataDiskOutput) AutoSnapshotPolicyId() pulumi.StringPtrOutput

The ID of the automatic snapshot policy applied to the system disk.

func (InstanceDataDiskOutput) Category

The category of the disk:

  • `cloud`: The general cloud disk.
  • `cloudEfficiency`: The efficiency cloud disk.
  • `cloudSsd`: The SSD cloud disk.
  • `cloudEssd`: The ESSD cloud disk.
  • `ephemeralSsd`: The local SSD disk. Default to `cloudEfficiency`.

func (InstanceDataDiskOutput) DeleteWithInstance

func (o InstanceDataDiskOutput) DeleteWithInstance() pulumi.BoolPtrOutput

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloudSsd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value: `true`.

func (InstanceDataDiskOutput) Description

The description of the data disk.

func (InstanceDataDiskOutput) ElementType

func (InstanceDataDiskOutput) ElementType() reflect.Type

func (InstanceDataDiskOutput) Encrypted

-(Optional, Bool, ForceNew) Encrypted the data in this disk. Default value: `false`.

func (InstanceDataDiskOutput) KmsKeyId added in v2.12.1

The KMS key ID corresponding to the Nth data disk.

func (InstanceDataDiskOutput) Name

The name of the data disk.

func (InstanceDataDiskOutput) PerformanceLevel added in v2.28.0

func (o InstanceDataDiskOutput) PerformanceLevel() pulumi.StringPtrOutput

The performance level of the ESSD used as data disk:

  • `PL0`: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • `PL1`: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • `PL2`: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • `PL3`: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default to `PL1`.

func (InstanceDataDiskOutput) Size

The size of the data disk. - cloud:[5, 2000] - cloud_efficiency:[20, 32768] - cloud_ssd:[20, 32768] - cloud_essd:[20, 32768] - ephemeral_ssd: [5, 800]

func (InstanceDataDiskOutput) SnapshotId

The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.

func (InstanceDataDiskOutput) ToInstanceDataDiskOutput

func (o InstanceDataDiskOutput) ToInstanceDataDiskOutput() InstanceDataDiskOutput

func (InstanceDataDiskOutput) ToInstanceDataDiskOutputWithContext

func (o InstanceDataDiskOutput) ToInstanceDataDiskOutputWithContext(ctx context.Context) InstanceDataDiskOutput

type InstanceInput added in v2.25.1

type InstanceInput interface {
	pulumi.Input

	ToInstanceOutput() InstanceOutput
	ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
}

type InstanceMap added in v2.35.1

type InstanceMap map[string]InstanceInput

func (InstanceMap) ElementType added in v2.35.1

func (InstanceMap) ElementType() reflect.Type

func (InstanceMap) ToInstanceMapOutput added in v2.35.1

func (i InstanceMap) ToInstanceMapOutput() InstanceMapOutput

func (InstanceMap) ToInstanceMapOutputWithContext added in v2.35.1

func (i InstanceMap) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput

type InstanceMapInput added in v2.35.1

type InstanceMapInput interface {
	pulumi.Input

	ToInstanceMapOutput() InstanceMapOutput
	ToInstanceMapOutputWithContext(context.Context) InstanceMapOutput
}

InstanceMapInput is an input type that accepts InstanceMap and InstanceMapOutput values. You can construct a concrete instance of `InstanceMapInput` via:

InstanceMap{ "key": InstanceArgs{...} }

type InstanceMapOutput added in v2.35.1

type InstanceMapOutput struct{ *pulumi.OutputState }

func (InstanceMapOutput) ElementType added in v2.35.1

func (InstanceMapOutput) ElementType() reflect.Type

func (InstanceMapOutput) MapIndex added in v2.35.1

func (InstanceMapOutput) ToInstanceMapOutput added in v2.35.1

func (o InstanceMapOutput) ToInstanceMapOutput() InstanceMapOutput

func (InstanceMapOutput) ToInstanceMapOutputWithContext added in v2.35.1

func (o InstanceMapOutput) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput

type InstanceOutput added in v2.25.1

type InstanceOutput struct {
	*pulumi.OutputState
}

func (InstanceOutput) ElementType added in v2.25.1

func (InstanceOutput) ElementType() reflect.Type

func (InstanceOutput) ToInstanceOutput added in v2.25.1

func (o InstanceOutput) ToInstanceOutput() InstanceOutput

func (InstanceOutput) ToInstanceOutputWithContext added in v2.25.1

func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput

func (InstanceOutput) ToInstancePtrOutput added in v2.35.1

func (o InstanceOutput) ToInstancePtrOutput() InstancePtrOutput

func (InstanceOutput) ToInstancePtrOutputWithContext added in v2.35.1

func (o InstanceOutput) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput

type InstancePtrInput added in v2.35.1

type InstancePtrInput interface {
	pulumi.Input

	ToInstancePtrOutput() InstancePtrOutput
	ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput
}

type InstancePtrOutput added in v2.35.1

type InstancePtrOutput struct {
	*pulumi.OutputState
}

func (InstancePtrOutput) ElementType added in v2.35.1

func (InstancePtrOutput) ElementType() reflect.Type

func (InstancePtrOutput) ToInstancePtrOutput added in v2.35.1

func (o InstancePtrOutput) ToInstancePtrOutput() InstancePtrOutput

func (InstancePtrOutput) ToInstancePtrOutputWithContext added in v2.35.1

func (o InstancePtrOutput) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput

type InstanceState

type InstanceState struct {
	// It has been deprecated from version "1.7.0". Setting "internetMaxBandwidthOut" larger than 0 can allocate a public ip address for an instance.
	//
	// Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.
	AllocatePublicIp pulumi.BoolPtrInput
	// The automatic release time of the `PostPaid` instance.
	// The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time.
	// Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.
	AutoReleaseTime pulumi.StringPtrInput
	// Auto renewal period of an instance, in the unit of month. It is valid when `instanceChargeType` is `PrePaid`. Default to 1. Valid value:
	// - [1, 2, 3, 6, 12] when `periodUnit` in "Month"
	// - [1, 2, 3] when `periodUnit` in "Week"
	AutoRenewPeriod pulumi.IntPtrInput
	// The Zone to start the instance in. It is ignored and will be computed when set `vswitchId`.
	AvailabilityZone pulumi.StringPtrInput
	// Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
	CreditSpecification pulumi.StringPtrInput
	// The list of data disks created with instance.
	DataDisks InstanceDataDiskArrayInput
	// Whether enable the deletion protection or not. Default value: `false`.
	// - true: Enable deletion protection.
	// - false: Disable deletion protection.
	DeletionProtection pulumi.BoolPtrInput
	// The description of the data disk.
	Description pulumi.StringPtrInput
	// Specifies whether to send a dry-run request. Default to false.
	// - true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the `DryRunOperation` error code is returned.
	// - false: A request is sent. If the validation succeeds, the instance is created.
	DryRun pulumi.BoolPtrInput
	// If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly.
	// However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
	ForceDelete pulumi.BoolPtrInput
	// Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect.
	// On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
	HostName pulumi.StringPtrInput
	// The Image to use for the instance. ECS instance's image can be replaced via changing `imageId`. When it is changed, the instance will reboot to make the change take effect.
	ImageId pulumi.StringPtrInput
	// Whether to change instance disks charge type when changing instance charge type.
	IncludeDataDisks pulumi.BoolPtrInput
	// Valid values are `PrePaid`, `PostPaid`, The default is `PostPaid`.
	InstanceChargeType pulumi.StringPtrInput
	InstanceName       pulumi.StringPtrInput
	// The type of instance to start. When it is changed, the instance will reboot to make the change take effect.
	InstanceType pulumi.StringPtrInput
	// Internet charge type of the instance, Valid values are `PayByBandwidth`, `PayByTraffic`. Default is `PayByTraffic`. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic".
	InternetChargeType pulumi.StringPtrInput
	// Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
	InternetMaxBandwidthIn pulumi.IntPtrInput
	// Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range:  [0, 100]. Default to 0 Mbps.
	InternetMaxBandwidthOut pulumi.IntPtrInput
	// It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.
	//
	// Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.
	IoOptimized pulumi.StringPtrInput
	// Whether to use outdated instance type. Default to false.
	IsOutdated pulumi.BoolPtrInput
	// The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
	KeyName pulumi.StringPtrInput
	// An KMS encrypts password used to an instance. If the `password` is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
	KmsEncryptedPassword pulumi.StringPtrInput
	// An KMS encryption context used to decrypt `kmsEncryptedPassword` before creating or updating an instance with `kmsEncryptedPassword`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kmsEncryptedPassword` is set. When it is changed, the instance will reboot to make the change take effect.
	KmsEncryptionContext pulumi.MapInput
	// Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
	Password pulumi.StringPtrInput
	// The duration that you will buy the resource, in month. It is valid when `instanceChargeType` is `PrePaid`. Default to 1. Valid values:
	// - [1-9, 12, 24, 36, 48, 60] when `periodUnit` in "Month"
	// - [1-3] when `periodUnit` in "Week"
	Period pulumi.IntPtrInput
	// The duration unit that you will buy the resource. It is valid when `instanceChargeType` is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
	PeriodUnit pulumi.StringPtrInput
	// Instance private IP address can be specified when you creating new instance. It is valid when `vswitchId` is specified. When it is changed, the instance will reboot to make the change take effect.
	PrivateIp pulumi.StringPtrInput
	// The instance public ip.
	PublicIp pulumi.StringPtrInput
	// Whether to renew an ECS instance automatically or not. It is valid when `instanceChargeType` is `PrePaid`. Default to "Normal". Valid values:
	// - `AutoRenewal`: Enable auto renewal.
	// - `Normal`: Disable auto renewal.
	// - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
	RenewalStatus pulumi.StringPtrInput
	// The Id of resource group which the instance belongs.
	ResourceGroupId pulumi.StringPtrInput
	// Instance RAM role name. The name is provided and maintained by RAM. You can use `ram.Role` to create a new one.
	RoleName pulumi.StringPtrInput
	// The security enhancement strategy.
	// - Active: Enable security enhancement strategy, it only works on system images.
	// - Deactive: Disable security enhancement strategy, it works on all images.
	SecurityEnhancementStrategy pulumi.StringPtrInput
	// A list of security group ids to associate with.
	SecurityGroups pulumi.StringArrayInput
	// The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
	SpotPriceLimit pulumi.Float64PtrInput
	// The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter `instanceChargeType` is 'PostPaid'. Value range:
	// - NoSpot: A regular Pay-As-You-Go instance.
	// - SpotWithPriceLimit: A price threshold for a spot instance
	// - SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
	SpotStrategy pulumi.StringPtrInput
	// The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to `Running`.
	Status   pulumi.StringPtrInput
	SubnetId pulumi.StringPtrInput
	// The ID of the automatic snapshot policy applied to the system disk.
	SystemDiskAutoSnapshotPolicyId pulumi.StringPtrInput
	// Valid values are `ephemeralSsd`, `cloudEfficiency`, `cloudSsd`, `cloudEssd`, `cloud`. `cloud` only is used to some none I/O optimized instance. Default to `cloudEfficiency`.
	SystemDiskCategory pulumi.StringPtrInput
	// The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
	SystemDiskDescription pulumi.StringPtrInput
	// The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
	SystemDiskName pulumi.StringPtrInput
	// The performance level of the ESSD used as the system disk, Valid values: `PL0`, `PL1`, `PL2`, `PL3`, Default to `PL0`;For more information about ESSD, See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/122389.htm).
	SystemDiskPerformanceLevel pulumi.StringPtrInput
	// Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
	SystemDiskSize pulumi.IntPtrInput
	// A mapping of tags to assign to the resource.
	// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
	// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
	Tags pulumi.StringMapInput
	// User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on [cloud-init module type](https://cloudinit.readthedocs.io/en/latest/topics/modules.html).
	UserData pulumi.StringPtrInput
	// A mapping of tags to assign to the devices created by the instance at launch time.
	// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
	// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
	VolumeTags pulumi.MapInput
	// The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
	VswitchId pulumi.StringPtrInput
}

func (InstanceState) ElementType

func (InstanceState) ElementType() reflect.Type

type KeyPair

type KeyPair struct {
	pulumi.CustomResourceState

	FingerPrint pulumi.StringOutput `pulumi:"fingerPrint"`
	// The name of file to save your new key pair's private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn't get its private key ever.
	KeyFile pulumi.StringPtrOutput `pulumi:"keyFile"`
	// The key pair's name. It is the only in one Alicloud account.
	KeyName       pulumi.StringOutput    `pulumi:"keyName"`
	KeyNamePrefix pulumi.StringPtrOutput `pulumi:"keyNamePrefix"`
	// You can import an existing public key and using Alicloud key pair to manage it. If this parameter is specified, `resourceGroupId` is the key pair belongs.
	PublicKey pulumi.StringPtrOutput `pulumi:"publicKey"`
	// The Id of resource group which the key pair belongs.
	ResourceGroupId pulumi.StringPtrOutput `pulumi:"resourceGroupId"`
	Tags            pulumi.MapOutput       `pulumi:"tags"`
}

Provides a key pair resource.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewKeyPair(ctx, "basic", &ecs.KeyPairArgs{
			KeyName: pulumi.String("terraform-test-key-pair"),
		})
		if err != nil {
			return err
		}
		_, err = ecs.NewKeyPair(ctx, "prefix", &ecs.KeyPairArgs{
			KeyNamePrefix: pulumi.String("terraform-test-key-pair-prefix"),
		})
		if err != nil {
			return err
		}
		_, err = ecs.NewKeyPair(ctx, "publickey", &ecs.KeyPairArgs{
			KeyName:   pulumi.String("my_public_key"),
			PublicKey: pulumi.String("ssh-rsa AAAAB3Nza12345678qwertyuudsfsg"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Key pair can be imported using the name, e.g.

```sh

$ pulumi import alicloud:ecs/keyPair:KeyPair example my_public_key

```

func GetKeyPair

func GetKeyPair(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *KeyPairState, opts ...pulumi.ResourceOption) (*KeyPair, error)

GetKeyPair gets an existing KeyPair 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 NewKeyPair

func NewKeyPair(ctx *pulumi.Context,
	name string, args *KeyPairArgs, opts ...pulumi.ResourceOption) (*KeyPair, error)

NewKeyPair registers a new resource with the given unique name, arguments, and options.

func (*KeyPair) ElementType added in v2.25.1

func (*KeyPair) ElementType() reflect.Type

func (*KeyPair) ToKeyPairOutput added in v2.25.1

func (i *KeyPair) ToKeyPairOutput() KeyPairOutput

func (*KeyPair) ToKeyPairOutputWithContext added in v2.25.1

func (i *KeyPair) ToKeyPairOutputWithContext(ctx context.Context) KeyPairOutput

func (*KeyPair) ToKeyPairPtrOutput added in v2.35.1

func (i *KeyPair) ToKeyPairPtrOutput() KeyPairPtrOutput

func (*KeyPair) ToKeyPairPtrOutputWithContext added in v2.35.1

func (i *KeyPair) ToKeyPairPtrOutputWithContext(ctx context.Context) KeyPairPtrOutput

type KeyPairArgs

type KeyPairArgs struct {
	// The name of file to save your new key pair's private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn't get its private key ever.
	KeyFile pulumi.StringPtrInput
	// The key pair's name. It is the only in one Alicloud account.
	KeyName       pulumi.StringPtrInput
	KeyNamePrefix pulumi.StringPtrInput
	// You can import an existing public key and using Alicloud key pair to manage it. If this parameter is specified, `resourceGroupId` is the key pair belongs.
	PublicKey pulumi.StringPtrInput
	// The Id of resource group which the key pair belongs.
	ResourceGroupId pulumi.StringPtrInput
	Tags            pulumi.MapInput
}

The set of arguments for constructing a KeyPair resource.

func (KeyPairArgs) ElementType

func (KeyPairArgs) ElementType() reflect.Type

type KeyPairArray added in v2.35.1

type KeyPairArray []KeyPairInput

func (KeyPairArray) ElementType added in v2.35.1

func (KeyPairArray) ElementType() reflect.Type

func (KeyPairArray) ToKeyPairArrayOutput added in v2.35.1

func (i KeyPairArray) ToKeyPairArrayOutput() KeyPairArrayOutput

func (KeyPairArray) ToKeyPairArrayOutputWithContext added in v2.35.1

func (i KeyPairArray) ToKeyPairArrayOutputWithContext(ctx context.Context) KeyPairArrayOutput

type KeyPairArrayInput added in v2.35.1

type KeyPairArrayInput interface {
	pulumi.Input

	ToKeyPairArrayOutput() KeyPairArrayOutput
	ToKeyPairArrayOutputWithContext(context.Context) KeyPairArrayOutput
}

KeyPairArrayInput is an input type that accepts KeyPairArray and KeyPairArrayOutput values. You can construct a concrete instance of `KeyPairArrayInput` via:

KeyPairArray{ KeyPairArgs{...} }

type KeyPairArrayOutput added in v2.35.1

type KeyPairArrayOutput struct{ *pulumi.OutputState }

func (KeyPairArrayOutput) ElementType added in v2.35.1

func (KeyPairArrayOutput) ElementType() reflect.Type

func (KeyPairArrayOutput) Index added in v2.35.1

func (KeyPairArrayOutput) ToKeyPairArrayOutput added in v2.35.1

func (o KeyPairArrayOutput) ToKeyPairArrayOutput() KeyPairArrayOutput

func (KeyPairArrayOutput) ToKeyPairArrayOutputWithContext added in v2.35.1

func (o KeyPairArrayOutput) ToKeyPairArrayOutputWithContext(ctx context.Context) KeyPairArrayOutput

type KeyPairAttachment

type KeyPairAttachment struct {
	pulumi.CustomResourceState

	// Set it to true and it will reboot instances which attached with the key pair to make key pair affect immediately.
	Force pulumi.BoolPtrOutput `pulumi:"force"`
	// The list of ECS instance's IDs.
	InstanceIds pulumi.StringArrayOutput `pulumi:"instanceIds"`
	// The name of key pair used to bind.
	KeyName pulumi.StringOutput `pulumi:"keyName"`
}

Provides a key pair attachment resource to bind key pair for several ECS instances.

> **NOTE:** After the key pair is attached with sone instances, there instances must be rebooted to make the key pair affect.

## Example Usage

Basic Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi/config"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "cloud_ssd"
		opt1 := "VSwitch"
		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableDiskCategory:     &opt0,
			AvailableResourceCreation: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		opt2 := _default.Zones[0].Id
		opt3 := 1
		opt4 := 2
		_type, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
			AvailabilityZone: &opt2,
			CpuCoreCount:     &opt3,
			MemorySize:       &opt4,
		}, nil)
		if err != nil {
			return err
		}
		opt5 := "^ubuntu_18.*64"
		opt6 := true
		opt7 := "system"
		images, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
			NameRegex:  &opt5,
			MostRecent: &opt6,
			Owners:     &opt7,
		}, nil)
		if err != nil {
			return err
		}
		cfg := config.New(ctx, "")
		name := "keyPairAttachmentName"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		vpc, err := vpc.NewNetwork(ctx, "vpc", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("10.1.0.0/21"),
		})
		if err != nil {
			return err
		}
		vswitch, err := vpc.NewSwitch(ctx, "vswitch", &vpc.SwitchArgs{
			VpcId:            vpc.ID(),
			CidrBlock:        pulumi.String("10.1.1.0/24"),
			AvailabilityZone: pulumi.String(_default.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		group, err := ecs.NewSecurityGroup(ctx, "group", &ecs.SecurityGroupArgs{
			Description: pulumi.String("New security group"),
			VpcId:       vpc.ID(),
		})
		if err != nil {
			return err
		}
		var instance []*ecs.Instance
		for key0, val0 := range 2 {
			__res, err := ecs.NewInstance(ctx, fmt.Sprintf("instance-%v", key0), &ecs.InstanceArgs{
				InstanceName: pulumi.String(fmt.Sprintf("%v%v%v", name, "-", val0+1)),
				ImageId:      pulumi.String(images.Images[0].Id),
				InstanceType: pulumi.String(_type.InstanceTypes[0].Id),
				SecurityGroups: pulumi.StringArray{
					group.ID(),
				},
				VswitchId:               vswitch.ID(),
				InternetChargeType:      pulumi.String("PayByTraffic"),
				InternetMaxBandwidthOut: pulumi.Int(5),
				Password:                pulumi.String("Test12345"),
				InstanceChargeType:      pulumi.String("PostPaid"),
				SystemDiskCategory:      pulumi.String("cloud_ssd"),
			})
			if err != nil {
				return err
			}
			instance = append(instance, __res)
		}
		pair, err := ecs.NewKeyPair(ctx, "pair", &ecs.KeyPairArgs{
			KeyName: pulumi.String(name),
		})
		if err != nil {
			return err
		}
		var splat0 pulumi.StringArray
		for _, val0 := range instance {
			splat0 = append(splat0, val0.ID())
		}
		_, err = ecs.NewKeyPairAttachment(ctx, "attachment", &ecs.KeyPairAttachmentArgs{
			KeyName:     pair.ID(),
			InstanceIds: toPulumiStringArray(splat0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
func toPulumiStringArray(arr []string) pulumi.StringArray {
	var pulumiArr pulumi.StringArray
	for _, v := range arr {
		pulumiArr = append(pulumiArr, pulumi.String(v))
	}
	return pulumiArr
}

```

func GetKeyPairAttachment

func GetKeyPairAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *KeyPairAttachmentState, opts ...pulumi.ResourceOption) (*KeyPairAttachment, error)

GetKeyPairAttachment gets an existing KeyPairAttachment 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 NewKeyPairAttachment

func NewKeyPairAttachment(ctx *pulumi.Context,
	name string, args *KeyPairAttachmentArgs, opts ...pulumi.ResourceOption) (*KeyPairAttachment, error)

NewKeyPairAttachment registers a new resource with the given unique name, arguments, and options.

func (*KeyPairAttachment) ElementType added in v2.25.1

func (*KeyPairAttachment) ElementType() reflect.Type

func (*KeyPairAttachment) ToKeyPairAttachmentOutput added in v2.25.1

func (i *KeyPairAttachment) ToKeyPairAttachmentOutput() KeyPairAttachmentOutput

func (*KeyPairAttachment) ToKeyPairAttachmentOutputWithContext added in v2.25.1

func (i *KeyPairAttachment) ToKeyPairAttachmentOutputWithContext(ctx context.Context) KeyPairAttachmentOutput

func (*KeyPairAttachment) ToKeyPairAttachmentPtrOutput added in v2.35.1

func (i *KeyPairAttachment) ToKeyPairAttachmentPtrOutput() KeyPairAttachmentPtrOutput

func (*KeyPairAttachment) ToKeyPairAttachmentPtrOutputWithContext added in v2.35.1

func (i *KeyPairAttachment) ToKeyPairAttachmentPtrOutputWithContext(ctx context.Context) KeyPairAttachmentPtrOutput

type KeyPairAttachmentArgs

type KeyPairAttachmentArgs struct {
	// Set it to true and it will reboot instances which attached with the key pair to make key pair affect immediately.
	Force pulumi.BoolPtrInput
	// The list of ECS instance's IDs.
	InstanceIds pulumi.StringArrayInput
	// The name of key pair used to bind.
	KeyName pulumi.StringInput
}

The set of arguments for constructing a KeyPairAttachment resource.

func (KeyPairAttachmentArgs) ElementType

func (KeyPairAttachmentArgs) ElementType() reflect.Type

type KeyPairAttachmentArray added in v2.35.1

type KeyPairAttachmentArray []KeyPairAttachmentInput

func (KeyPairAttachmentArray) ElementType added in v2.35.1

func (KeyPairAttachmentArray) ElementType() reflect.Type

func (KeyPairAttachmentArray) ToKeyPairAttachmentArrayOutput added in v2.35.1

func (i KeyPairAttachmentArray) ToKeyPairAttachmentArrayOutput() KeyPairAttachmentArrayOutput

func (KeyPairAttachmentArray) ToKeyPairAttachmentArrayOutputWithContext added in v2.35.1

func (i KeyPairAttachmentArray) ToKeyPairAttachmentArrayOutputWithContext(ctx context.Context) KeyPairAttachmentArrayOutput

type KeyPairAttachmentArrayInput added in v2.35.1

type KeyPairAttachmentArrayInput interface {
	pulumi.Input

	ToKeyPairAttachmentArrayOutput() KeyPairAttachmentArrayOutput
	ToKeyPairAttachmentArrayOutputWithContext(context.Context) KeyPairAttachmentArrayOutput
}

KeyPairAttachmentArrayInput is an input type that accepts KeyPairAttachmentArray and KeyPairAttachmentArrayOutput values. You can construct a concrete instance of `KeyPairAttachmentArrayInput` via:

KeyPairAttachmentArray{ KeyPairAttachmentArgs{...} }

type KeyPairAttachmentArrayOutput added in v2.35.1

type KeyPairAttachmentArrayOutput struct{ *pulumi.OutputState }

func (KeyPairAttachmentArrayOutput) ElementType added in v2.35.1

func (KeyPairAttachmentArrayOutput) Index added in v2.35.1

func (KeyPairAttachmentArrayOutput) ToKeyPairAttachmentArrayOutput added in v2.35.1

func (o KeyPairAttachmentArrayOutput) ToKeyPairAttachmentArrayOutput() KeyPairAttachmentArrayOutput

func (KeyPairAttachmentArrayOutput) ToKeyPairAttachmentArrayOutputWithContext added in v2.35.1

func (o KeyPairAttachmentArrayOutput) ToKeyPairAttachmentArrayOutputWithContext(ctx context.Context) KeyPairAttachmentArrayOutput

type KeyPairAttachmentInput added in v2.25.1

type KeyPairAttachmentInput interface {
	pulumi.Input

	ToKeyPairAttachmentOutput() KeyPairAttachmentOutput
	ToKeyPairAttachmentOutputWithContext(ctx context.Context) KeyPairAttachmentOutput
}

type KeyPairAttachmentMap added in v2.35.1

type KeyPairAttachmentMap map[string]KeyPairAttachmentInput

func (KeyPairAttachmentMap) ElementType added in v2.35.1

func (KeyPairAttachmentMap) ElementType() reflect.Type

func (KeyPairAttachmentMap) ToKeyPairAttachmentMapOutput added in v2.35.1

func (i KeyPairAttachmentMap) ToKeyPairAttachmentMapOutput() KeyPairAttachmentMapOutput

func (KeyPairAttachmentMap) ToKeyPairAttachmentMapOutputWithContext added in v2.35.1

func (i KeyPairAttachmentMap) ToKeyPairAttachmentMapOutputWithContext(ctx context.Context) KeyPairAttachmentMapOutput

type KeyPairAttachmentMapInput added in v2.35.1

type KeyPairAttachmentMapInput interface {
	pulumi.Input

	ToKeyPairAttachmentMapOutput() KeyPairAttachmentMapOutput
	ToKeyPairAttachmentMapOutputWithContext(context.Context) KeyPairAttachmentMapOutput
}

KeyPairAttachmentMapInput is an input type that accepts KeyPairAttachmentMap and KeyPairAttachmentMapOutput values. You can construct a concrete instance of `KeyPairAttachmentMapInput` via:

KeyPairAttachmentMap{ "key": KeyPairAttachmentArgs{...} }

type KeyPairAttachmentMapOutput added in v2.35.1

type KeyPairAttachmentMapOutput struct{ *pulumi.OutputState }

func (KeyPairAttachmentMapOutput) ElementType added in v2.35.1

func (KeyPairAttachmentMapOutput) ElementType() reflect.Type

func (KeyPairAttachmentMapOutput) MapIndex added in v2.35.1

func (KeyPairAttachmentMapOutput) ToKeyPairAttachmentMapOutput added in v2.35.1

func (o KeyPairAttachmentMapOutput) ToKeyPairAttachmentMapOutput() KeyPairAttachmentMapOutput

func (KeyPairAttachmentMapOutput) ToKeyPairAttachmentMapOutputWithContext added in v2.35.1

func (o KeyPairAttachmentMapOutput) ToKeyPairAttachmentMapOutputWithContext(ctx context.Context) KeyPairAttachmentMapOutput

type KeyPairAttachmentOutput added in v2.25.1

type KeyPairAttachmentOutput struct {
	*pulumi.OutputState
}

func (KeyPairAttachmentOutput) ElementType added in v2.25.1

func (KeyPairAttachmentOutput) ElementType() reflect.Type

func (KeyPairAttachmentOutput) ToKeyPairAttachmentOutput added in v2.25.1

func (o KeyPairAttachmentOutput) ToKeyPairAttachmentOutput() KeyPairAttachmentOutput

func (KeyPairAttachmentOutput) ToKeyPairAttachmentOutputWithContext added in v2.25.1

func (o KeyPairAttachmentOutput) ToKeyPairAttachmentOutputWithContext(ctx context.Context) KeyPairAttachmentOutput

func (KeyPairAttachmentOutput) ToKeyPairAttachmentPtrOutput added in v2.35.1

func (o KeyPairAttachmentOutput) ToKeyPairAttachmentPtrOutput() KeyPairAttachmentPtrOutput

func (KeyPairAttachmentOutput) ToKeyPairAttachmentPtrOutputWithContext added in v2.35.1

func (o KeyPairAttachmentOutput) ToKeyPairAttachmentPtrOutputWithContext(ctx context.Context) KeyPairAttachmentPtrOutput

type KeyPairAttachmentPtrInput added in v2.35.1

type KeyPairAttachmentPtrInput interface {
	pulumi.Input

	ToKeyPairAttachmentPtrOutput() KeyPairAttachmentPtrOutput
	ToKeyPairAttachmentPtrOutputWithContext(ctx context.Context) KeyPairAttachmentPtrOutput
}

type KeyPairAttachmentPtrOutput added in v2.35.1

type KeyPairAttachmentPtrOutput struct {
	*pulumi.OutputState
}

func (KeyPairAttachmentPtrOutput) ElementType added in v2.35.1

func (KeyPairAttachmentPtrOutput) ElementType() reflect.Type

func (KeyPairAttachmentPtrOutput) ToKeyPairAttachmentPtrOutput added in v2.35.1

func (o KeyPairAttachmentPtrOutput) ToKeyPairAttachmentPtrOutput() KeyPairAttachmentPtrOutput

func (KeyPairAttachmentPtrOutput) ToKeyPairAttachmentPtrOutputWithContext added in v2.35.1

func (o KeyPairAttachmentPtrOutput) ToKeyPairAttachmentPtrOutputWithContext(ctx context.Context) KeyPairAttachmentPtrOutput

type KeyPairAttachmentState

type KeyPairAttachmentState struct {
	// Set it to true and it will reboot instances which attached with the key pair to make key pair affect immediately.
	Force pulumi.BoolPtrInput
	// The list of ECS instance's IDs.
	InstanceIds pulumi.StringArrayInput
	// The name of key pair used to bind.
	KeyName pulumi.StringPtrInput
}

func (KeyPairAttachmentState) ElementType

func (KeyPairAttachmentState) ElementType() reflect.Type

type KeyPairInput added in v2.25.1

type KeyPairInput interface {
	pulumi.Input

	ToKeyPairOutput() KeyPairOutput
	ToKeyPairOutputWithContext(ctx context.Context) KeyPairOutput
}

type KeyPairMap added in v2.35.1

type KeyPairMap map[string]KeyPairInput

func (KeyPairMap) ElementType added in v2.35.1

func (KeyPairMap) ElementType() reflect.Type

func (KeyPairMap) ToKeyPairMapOutput added in v2.35.1

func (i KeyPairMap) ToKeyPairMapOutput() KeyPairMapOutput

func (KeyPairMap) ToKeyPairMapOutputWithContext added in v2.35.1

func (i KeyPairMap) ToKeyPairMapOutputWithContext(ctx context.Context) KeyPairMapOutput

type KeyPairMapInput added in v2.35.1

type KeyPairMapInput interface {
	pulumi.Input

	ToKeyPairMapOutput() KeyPairMapOutput
	ToKeyPairMapOutputWithContext(context.Context) KeyPairMapOutput
}

KeyPairMapInput is an input type that accepts KeyPairMap and KeyPairMapOutput values. You can construct a concrete instance of `KeyPairMapInput` via:

KeyPairMap{ "key": KeyPairArgs{...} }

type KeyPairMapOutput added in v2.35.1

type KeyPairMapOutput struct{ *pulumi.OutputState }

func (KeyPairMapOutput) ElementType added in v2.35.1

func (KeyPairMapOutput) ElementType() reflect.Type

func (KeyPairMapOutput) MapIndex added in v2.35.1

func (KeyPairMapOutput) ToKeyPairMapOutput added in v2.35.1

func (o KeyPairMapOutput) ToKeyPairMapOutput() KeyPairMapOutput

func (KeyPairMapOutput) ToKeyPairMapOutputWithContext added in v2.35.1

func (o KeyPairMapOutput) ToKeyPairMapOutputWithContext(ctx context.Context) KeyPairMapOutput

type KeyPairOutput added in v2.25.1

type KeyPairOutput struct {
	*pulumi.OutputState
}

func (KeyPairOutput) ElementType added in v2.25.1

func (KeyPairOutput) ElementType() reflect.Type

func (KeyPairOutput) ToKeyPairOutput added in v2.25.1

func (o KeyPairOutput) ToKeyPairOutput() KeyPairOutput

func (KeyPairOutput) ToKeyPairOutputWithContext added in v2.25.1

func (o KeyPairOutput) ToKeyPairOutputWithContext(ctx context.Context) KeyPairOutput

func (KeyPairOutput) ToKeyPairPtrOutput added in v2.35.1

func (o KeyPairOutput) ToKeyPairPtrOutput() KeyPairPtrOutput

func (KeyPairOutput) ToKeyPairPtrOutputWithContext added in v2.35.1

func (o KeyPairOutput) ToKeyPairPtrOutputWithContext(ctx context.Context) KeyPairPtrOutput

type KeyPairPtrInput added in v2.35.1

type KeyPairPtrInput interface {
	pulumi.Input

	ToKeyPairPtrOutput() KeyPairPtrOutput
	ToKeyPairPtrOutputWithContext(ctx context.Context) KeyPairPtrOutput
}

type KeyPairPtrOutput added in v2.35.1

type KeyPairPtrOutput struct {
	*pulumi.OutputState
}

func (KeyPairPtrOutput) ElementType added in v2.35.1

func (KeyPairPtrOutput) ElementType() reflect.Type

func (KeyPairPtrOutput) ToKeyPairPtrOutput added in v2.35.1

func (o KeyPairPtrOutput) ToKeyPairPtrOutput() KeyPairPtrOutput

func (KeyPairPtrOutput) ToKeyPairPtrOutputWithContext added in v2.35.1

func (o KeyPairPtrOutput) ToKeyPairPtrOutputWithContext(ctx context.Context) KeyPairPtrOutput

type KeyPairState

type KeyPairState struct {
	FingerPrint pulumi.StringPtrInput
	// The name of file to save your new key pair's private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn't get its private key ever.
	KeyFile pulumi.StringPtrInput
	// The key pair's name. It is the only in one Alicloud account.
	KeyName       pulumi.StringPtrInput
	KeyNamePrefix pulumi.StringPtrInput
	// You can import an existing public key and using Alicloud key pair to manage it. If this parameter is specified, `resourceGroupId` is the key pair belongs.
	PublicKey pulumi.StringPtrInput
	// The Id of resource group which the key pair belongs.
	ResourceGroupId pulumi.StringPtrInput
	Tags            pulumi.MapInput
}

func (KeyPairState) ElementType

func (KeyPairState) ElementType() reflect.Type

type LaunchTemplate

type LaunchTemplate struct {
	pulumi.CustomResourceState

	// Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is  YYYY-MM-DDTHH:MM:SSZ.
	AutoReleaseTime pulumi.StringPtrOutput `pulumi:"autoReleaseTime"`
	// The list of data disks created with instance.
	DataDisks LaunchTemplateDataDiskArrayOutput `pulumi:"dataDisks"`
	// The description of the data disk.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be [2, 15] characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be [2, 64] characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).
	HostName pulumi.StringPtrOutput `pulumi:"hostName"`
	// Image ID.
	ImageId         pulumi.StringPtrOutput `pulumi:"imageId"`
	ImageOwnerAlias pulumi.StringPtrOutput `pulumi:"imageOwnerAlias"`
	// Billing methods. Optional values:
	// - PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
	// - PostPaid: Pay-As-You-Go.
	InstanceChargeType pulumi.StringPtrOutput `pulumi:"instanceChargeType"`
	// The name of the instance. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).
	InstanceName pulumi.StringPtrOutput `pulumi:"instanceName"`
	// Instance type. For more information, call resourceAlicloudInstances to obtain the latest instance type list.
	InstanceType pulumi.StringPtrOutput `pulumi:"instanceType"`
	// Internet bandwidth billing method. Optional values: `PayByTraffic` | `PayByBandwidth`.
	InternetChargeType pulumi.StringPtrOutput `pulumi:"internetChargeType"`
	// The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
	InternetMaxBandwidthIn pulumi.IntOutput `pulumi:"internetMaxBandwidthIn"`
	// Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
	InternetMaxBandwidthOut pulumi.IntPtrOutput `pulumi:"internetMaxBandwidthOut"`
	// Whether it is an I/O-optimized instance or not. Optional values:
	// - none
	// - optimized
	IoOptimized pulumi.StringPtrOutput `pulumi:"ioOptimized"`
	// The name of the key pair.
	// - Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the  Password content is used.
	// - The password logon method for Linux instances is set to forbidden upon initialization.
	KeyPairName pulumi.StringPtrOutput `pulumi:"keyPairName"`
	// The name of the data disk.
	Name pulumi.StringOutput `pulumi:"name"`
	// The list of network interfaces created with instance.
	NetworkInterfaces LaunchTemplateNetworkInterfacesPtrOutput `pulumi:"networkInterfaces"`
	// Network type of the instance. Value options: `classic` | `vpc`.
	NetworkType pulumi.StringPtrOutput `pulumi:"networkType"`
	// The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
	RamRoleName     pulumi.StringPtrOutput `pulumi:"ramRoleName"`
	ResourceGroupId pulumi.StringPtrOutput `pulumi:"resourceGroupId"`
	// Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
	SecurityEnhancementStrategy pulumi.StringPtrOutput `pulumi:"securityEnhancementStrategy"`
	// The security group ID must be one in the same VPC.
	SecurityGroupId pulumi.StringPtrOutput `pulumi:"securityGroupId"`
	// -(Optional) 	Sets the maximum hourly instance price. Supports up to three decimal places.
	SpotPriceLimit pulumi.Float64PtrOutput `pulumi:"spotPriceLimit"`
	// The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Value range:
	// - NoSpot: Normal Pay-As-You-Go instance.
	// - SpotWithPriceLimit: Sets the maximum price for a spot instance.
	// - SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
	SpotStrategy pulumi.StringPtrOutput `pulumi:"spotStrategy"`
	// The category of the system disk. System disk type. Optional values:
	// - cloud: Basic cloud disk.
	// - cloud_efficiency: Ultra cloud disk.
	// - cloud_ssd: SSD cloud Disks.
	// - ephemeral_ssd: local SSD Disks
	// - cloud_essd: ESSD cloud Disks.
	SystemDiskCategory pulumi.StringPtrOutput `pulumi:"systemDiskCategory"`
	// System disk description. It cannot begin with http:// or https://.
	SystemDiskDescription pulumi.StringPtrOutput `pulumi:"systemDiskDescription"`
	// System disk name. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).
	SystemDiskName pulumi.StringPtrOutput `pulumi:"systemDiskName"`
	// Size of the system disk, measured in GB. Value range: [20, 500].
	SystemDiskSize pulumi.IntPtrOutput `pulumi:"systemDiskSize"`
	// A mapping of tags to assign to the resource.
	// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
	// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.
	Userdata pulumi.StringPtrOutput `pulumi:"userdata"`
	VpcId    pulumi.StringPtrOutput `pulumi:"vpcId"`
	// The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
	VswitchId pulumi.StringPtrOutput `pulumi:"vswitchId"`
	// The zone ID of the instance.
	ZoneId pulumi.StringPtrOutput `pulumi:"zoneId"`
}

Provides an ECS Launch Template resource.

For information about Launch Template and how to use it, see [Launch Template](https://www.alibabacloud.com/help/doc-detail/73916.html).

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "system"
		images, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
			Owners: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		instances, err := ecs.GetInstances(ctx, nil, nil)
		if err != nil {
			return err
		}
		_, err = ecs.NewLaunchTemplate(ctx, "template", &ecs.LaunchTemplateArgs{
			Description:                 pulumi.String("test1"),
			ImageId:                     pulumi.String(images.Images[0].Id),
			HostName:                    pulumi.String("tf-test-host"),
			InstanceChargeType:          pulumi.String("PrePaid"),
			InstanceName:                pulumi.String("tf-instance-name"),
			InstanceType:                pulumi.String(instances.Instances[0].InstanceType),
			InternetChargeType:          pulumi.String("PayByBandwidth"),
			InternetMaxBandwidthIn:      pulumi.Int(5),
			InternetMaxBandwidthOut:     pulumi.Int(0),
			IoOptimized:                 pulumi.String("none"),
			KeyPairName:                 pulumi.String("test-key-pair"),
			RamRoleName:                 pulumi.String("xxxxx"),
			NetworkType:                 pulumi.String("vpc"),
			SecurityEnhancementStrategy: pulumi.String("Active"),
			SpotPriceLimit:              pulumi.Float64(5),
			SpotStrategy:                pulumi.String("SpotWithPriceLimit"),
			SecurityGroupId:             pulumi.String("sg-zxcvj0lasdf102350asdf9a"),
			SystemDiskCategory:          pulumi.String("cloud_ssd"),
			SystemDiskDescription:       pulumi.String("test disk"),
			SystemDiskName:              pulumi.String("hello"),
			SystemDiskSize:              pulumi.Int(40),
			ResourceGroupId:             pulumi.String("rg-zkdfjahg9zxncv0"),
			Userdata:                    pulumi.String("xxxxxxxxxxxxxx"),
			VswitchId:                   pulumi.String("sw-ljkngaksdjfj0nnasdf"),
			VpcId:                       pulumi.String("vpc-asdfnbg0as8dfk1nb2"),
			ZoneId:                      pulumi.String("beijing-a"),
			Tags: pulumi.StringMap{
				"tag1": pulumi.String("hello"),
				"tag2": pulumi.String("world"),
			},
			NetworkInterfaces: &ecs.LaunchTemplateNetworkInterfacesArgs{
				Name:            pulumi.String("eth0"),
				Description:     pulumi.String("hello1"),
				PrimaryIp:       pulumi.String("10.0.0.2"),
				SecurityGroupId: pulumi.String("xxxx"),
				VswitchId:       pulumi.String("xxxxxxx"),
			},
			DataDisks: ecs.LaunchTemplateDataDiskArray{
				&ecs.LaunchTemplateDataDiskArgs{
					Name:        pulumi.String("disk1"),
					Description: pulumi.String("test1"),
				},
				&ecs.LaunchTemplateDataDiskArgs{
					Name:        pulumi.String("disk2"),
					Description: pulumi.String("test2"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Launch Template can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/launchTemplate:LaunchTemplate lt lt-abc1234567890000

```

func GetLaunchTemplate

func GetLaunchTemplate(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LaunchTemplateState, opts ...pulumi.ResourceOption) (*LaunchTemplate, error)

GetLaunchTemplate gets an existing LaunchTemplate 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 NewLaunchTemplate

func NewLaunchTemplate(ctx *pulumi.Context,
	name string, args *LaunchTemplateArgs, opts ...pulumi.ResourceOption) (*LaunchTemplate, error)

NewLaunchTemplate registers a new resource with the given unique name, arguments, and options.

func (*LaunchTemplate) ElementType added in v2.25.1

func (*LaunchTemplate) ElementType() reflect.Type

func (*LaunchTemplate) ToLaunchTemplateOutput added in v2.25.1

func (i *LaunchTemplate) ToLaunchTemplateOutput() LaunchTemplateOutput

func (*LaunchTemplate) ToLaunchTemplateOutputWithContext added in v2.25.1

func (i *LaunchTemplate) ToLaunchTemplateOutputWithContext(ctx context.Context) LaunchTemplateOutput

func (*LaunchTemplate) ToLaunchTemplatePtrOutput added in v2.35.1

func (i *LaunchTemplate) ToLaunchTemplatePtrOutput() LaunchTemplatePtrOutput

func (*LaunchTemplate) ToLaunchTemplatePtrOutputWithContext added in v2.35.1

func (i *LaunchTemplate) ToLaunchTemplatePtrOutputWithContext(ctx context.Context) LaunchTemplatePtrOutput

type LaunchTemplateArgs

type LaunchTemplateArgs struct {
	// Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is  YYYY-MM-DDTHH:MM:SSZ.
	AutoReleaseTime pulumi.StringPtrInput
	// The list of data disks created with instance.
	DataDisks LaunchTemplateDataDiskArrayInput
	// The description of the data disk.
	Description pulumi.StringPtrInput
	// Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be [2, 15] characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be [2, 64] characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).
	HostName pulumi.StringPtrInput
	// Image ID.
	ImageId         pulumi.StringPtrInput
	ImageOwnerAlias pulumi.StringPtrInput
	// Billing methods. Optional values:
	// - PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
	// - PostPaid: Pay-As-You-Go.
	InstanceChargeType pulumi.StringPtrInput
	// The name of the instance. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).
	InstanceName pulumi.StringPtrInput
	// Instance type. For more information, call resourceAlicloudInstances to obtain the latest instance type list.
	InstanceType pulumi.StringPtrInput
	// Internet bandwidth billing method. Optional values: `PayByTraffic` | `PayByBandwidth`.
	InternetChargeType pulumi.StringPtrInput
	// The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
	InternetMaxBandwidthIn pulumi.IntPtrInput
	// Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
	InternetMaxBandwidthOut pulumi.IntPtrInput
	// Whether it is an I/O-optimized instance or not. Optional values:
	// - none
	// - optimized
	IoOptimized pulumi.StringPtrInput
	// The name of the key pair.
	// - Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the  Password content is used.
	// - The password logon method for Linux instances is set to forbidden upon initialization.
	KeyPairName pulumi.StringPtrInput
	// The name of the data disk.
	Name pulumi.StringPtrInput
	// The list of network interfaces created with instance.
	NetworkInterfaces LaunchTemplateNetworkInterfacesPtrInput
	// Network type of the instance. Value options: `classic` | `vpc`.
	NetworkType pulumi.StringPtrInput
	// The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
	RamRoleName     pulumi.StringPtrInput
	ResourceGroupId pulumi.StringPtrInput
	// Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
	SecurityEnhancementStrategy pulumi.StringPtrInput
	// The security group ID must be one in the same VPC.
	SecurityGroupId pulumi.StringPtrInput
	// -(Optional) 	Sets the maximum hourly instance price. Supports up to three decimal places.
	SpotPriceLimit pulumi.Float64PtrInput
	// The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Value range:
	// - NoSpot: Normal Pay-As-You-Go instance.
	// - SpotWithPriceLimit: Sets the maximum price for a spot instance.
	// - SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
	SpotStrategy pulumi.StringPtrInput
	// The category of the system disk. System disk type. Optional values:
	// - cloud: Basic cloud disk.
	// - cloud_efficiency: Ultra cloud disk.
	// - cloud_ssd: SSD cloud Disks.
	// - ephemeral_ssd: local SSD Disks
	// - cloud_essd: ESSD cloud Disks.
	SystemDiskCategory pulumi.StringPtrInput
	// System disk description. It cannot begin with http:// or https://.
	SystemDiskDescription pulumi.StringPtrInput
	// System disk name. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).
	SystemDiskName pulumi.StringPtrInput
	// Size of the system disk, measured in GB. Value range: [20, 500].
	SystemDiskSize pulumi.IntPtrInput
	// A mapping of tags to assign to the resource.
	// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
	// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
	Tags pulumi.MapInput
	// User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.
	Userdata pulumi.StringPtrInput
	VpcId    pulumi.StringPtrInput
	// The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
	VswitchId pulumi.StringPtrInput
	// The zone ID of the instance.
	ZoneId pulumi.StringPtrInput
}

The set of arguments for constructing a LaunchTemplate resource.

func (LaunchTemplateArgs) ElementType

func (LaunchTemplateArgs) ElementType() reflect.Type

type LaunchTemplateArray added in v2.35.1

type LaunchTemplateArray []LaunchTemplateInput

func (LaunchTemplateArray) ElementType added in v2.35.1

func (LaunchTemplateArray) ElementType() reflect.Type

func (LaunchTemplateArray) ToLaunchTemplateArrayOutput added in v2.35.1

func (i LaunchTemplateArray) ToLaunchTemplateArrayOutput() LaunchTemplateArrayOutput

func (LaunchTemplateArray) ToLaunchTemplateArrayOutputWithContext added in v2.35.1

func (i LaunchTemplateArray) ToLaunchTemplateArrayOutputWithContext(ctx context.Context) LaunchTemplateArrayOutput

type LaunchTemplateArrayInput added in v2.35.1

type LaunchTemplateArrayInput interface {
	pulumi.Input

	ToLaunchTemplateArrayOutput() LaunchTemplateArrayOutput
	ToLaunchTemplateArrayOutputWithContext(context.Context) LaunchTemplateArrayOutput
}

LaunchTemplateArrayInput is an input type that accepts LaunchTemplateArray and LaunchTemplateArrayOutput values. You can construct a concrete instance of `LaunchTemplateArrayInput` via:

LaunchTemplateArray{ LaunchTemplateArgs{...} }

type LaunchTemplateArrayOutput added in v2.35.1

type LaunchTemplateArrayOutput struct{ *pulumi.OutputState }

func (LaunchTemplateArrayOutput) ElementType added in v2.35.1

func (LaunchTemplateArrayOutput) ElementType() reflect.Type

func (LaunchTemplateArrayOutput) Index added in v2.35.1

func (LaunchTemplateArrayOutput) ToLaunchTemplateArrayOutput added in v2.35.1

func (o LaunchTemplateArrayOutput) ToLaunchTemplateArrayOutput() LaunchTemplateArrayOutput

func (LaunchTemplateArrayOutput) ToLaunchTemplateArrayOutputWithContext added in v2.35.1

func (o LaunchTemplateArrayOutput) ToLaunchTemplateArrayOutputWithContext(ctx context.Context) LaunchTemplateArrayOutput

type LaunchTemplateDataDisk

type LaunchTemplateDataDisk struct {
	// The category of the disk:
	// - cloud: Basic cloud disk.
	// - cloud_efficiency: Ultra cloud disk.
	// - cloud_ssd: SSD cloud Disks.
	// - ephemeral_ssd: local SSD Disks
	// - cloud_essd: ESSD cloud Disks.
	Category *string `pulumi:"category"`
	// Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloudSsd and cloudEssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.
	DeleteWithInstance *bool `pulumi:"deleteWithInstance"`
	// The description of the data disk.
	Description *string `pulumi:"description"`
	// -(Optional, Bool) Encrypted the data in this disk.
	Encrypted *bool `pulumi:"encrypted"`
	// The name of the data disk.
	Name *string `pulumi:"name"`
	// The size of the data disk.
	// - cloud:[5, 2000]
	// - cloud_efficiency:[20, 32768]
	// - cloud_ssd:[20, 32768]
	// - cloud_essd:[20, 32768]
	// - ephemeral_ssd: [5, 800]
	Size *int `pulumi:"size"`
	// The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
	SnapshotId *string `pulumi:"snapshotId"`
}

type LaunchTemplateDataDiskArgs

type LaunchTemplateDataDiskArgs struct {
	// The category of the disk:
	// - cloud: Basic cloud disk.
	// - cloud_efficiency: Ultra cloud disk.
	// - cloud_ssd: SSD cloud Disks.
	// - ephemeral_ssd: local SSD Disks
	// - cloud_essd: ESSD cloud Disks.
	Category pulumi.StringPtrInput `pulumi:"category"`
	// Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloudSsd and cloudEssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.
	DeleteWithInstance pulumi.BoolPtrInput `pulumi:"deleteWithInstance"`
	// The description of the data disk.
	Description pulumi.StringPtrInput `pulumi:"description"`
	// -(Optional, Bool) Encrypted the data in this disk.
	Encrypted pulumi.BoolPtrInput `pulumi:"encrypted"`
	// The name of the data disk.
	Name pulumi.StringPtrInput `pulumi:"name"`
	// The size of the data disk.
	// - cloud:[5, 2000]
	// - cloud_efficiency:[20, 32768]
	// - cloud_ssd:[20, 32768]
	// - cloud_essd:[20, 32768]
	// - ephemeral_ssd: [5, 800]
	Size pulumi.IntPtrInput `pulumi:"size"`
	// The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
	SnapshotId pulumi.StringPtrInput `pulumi:"snapshotId"`
}

func (LaunchTemplateDataDiskArgs) ElementType

func (LaunchTemplateDataDiskArgs) ElementType() reflect.Type

func (LaunchTemplateDataDiskArgs) ToLaunchTemplateDataDiskOutput

func (i LaunchTemplateDataDiskArgs) ToLaunchTemplateDataDiskOutput() LaunchTemplateDataDiskOutput

func (LaunchTemplateDataDiskArgs) ToLaunchTemplateDataDiskOutputWithContext

func (i LaunchTemplateDataDiskArgs) ToLaunchTemplateDataDiskOutputWithContext(ctx context.Context) LaunchTemplateDataDiskOutput

type LaunchTemplateDataDiskArray

type LaunchTemplateDataDiskArray []LaunchTemplateDataDiskInput

func (LaunchTemplateDataDiskArray) ElementType

func (LaunchTemplateDataDiskArray) ToLaunchTemplateDataDiskArrayOutput

func (i LaunchTemplateDataDiskArray) ToLaunchTemplateDataDiskArrayOutput() LaunchTemplateDataDiskArrayOutput

func (LaunchTemplateDataDiskArray) ToLaunchTemplateDataDiskArrayOutputWithContext

func (i LaunchTemplateDataDiskArray) ToLaunchTemplateDataDiskArrayOutputWithContext(ctx context.Context) LaunchTemplateDataDiskArrayOutput

type LaunchTemplateDataDiskArrayInput

type LaunchTemplateDataDiskArrayInput interface {
	pulumi.Input

	ToLaunchTemplateDataDiskArrayOutput() LaunchTemplateDataDiskArrayOutput
	ToLaunchTemplateDataDiskArrayOutputWithContext(context.Context) LaunchTemplateDataDiskArrayOutput
}

LaunchTemplateDataDiskArrayInput is an input type that accepts LaunchTemplateDataDiskArray and LaunchTemplateDataDiskArrayOutput values. You can construct a concrete instance of `LaunchTemplateDataDiskArrayInput` via:

LaunchTemplateDataDiskArray{ LaunchTemplateDataDiskArgs{...} }

type LaunchTemplateDataDiskArrayOutput

type LaunchTemplateDataDiskArrayOutput struct{ *pulumi.OutputState }

func (LaunchTemplateDataDiskArrayOutput) ElementType

func (LaunchTemplateDataDiskArrayOutput) Index

func (LaunchTemplateDataDiskArrayOutput) ToLaunchTemplateDataDiskArrayOutput

func (o LaunchTemplateDataDiskArrayOutput) ToLaunchTemplateDataDiskArrayOutput() LaunchTemplateDataDiskArrayOutput

func (LaunchTemplateDataDiskArrayOutput) ToLaunchTemplateDataDiskArrayOutputWithContext

func (o LaunchTemplateDataDiskArrayOutput) ToLaunchTemplateDataDiskArrayOutputWithContext(ctx context.Context) LaunchTemplateDataDiskArrayOutput

type LaunchTemplateDataDiskInput

type LaunchTemplateDataDiskInput interface {
	pulumi.Input

	ToLaunchTemplateDataDiskOutput() LaunchTemplateDataDiskOutput
	ToLaunchTemplateDataDiskOutputWithContext(context.Context) LaunchTemplateDataDiskOutput
}

LaunchTemplateDataDiskInput is an input type that accepts LaunchTemplateDataDiskArgs and LaunchTemplateDataDiskOutput values. You can construct a concrete instance of `LaunchTemplateDataDiskInput` via:

LaunchTemplateDataDiskArgs{...}

type LaunchTemplateDataDiskOutput

type LaunchTemplateDataDiskOutput struct{ *pulumi.OutputState }

func (LaunchTemplateDataDiskOutput) Category

The category of the disk: - cloud: Basic cloud disk. - cloud_efficiency: Ultra cloud disk. - cloud_ssd: SSD cloud Disks. - ephemeral_ssd: local SSD Disks - cloud_essd: ESSD cloud Disks.

func (LaunchTemplateDataDiskOutput) DeleteWithInstance

func (o LaunchTemplateDataDiskOutput) DeleteWithInstance() pulumi.BoolPtrOutput

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloudSsd and cloudEssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

func (LaunchTemplateDataDiskOutput) Description

The description of the data disk.

func (LaunchTemplateDataDiskOutput) ElementType

func (LaunchTemplateDataDiskOutput) Encrypted

-(Optional, Bool) Encrypted the data in this disk.

func (LaunchTemplateDataDiskOutput) Name

The name of the data disk.

func (LaunchTemplateDataDiskOutput) Size

The size of the data disk. - cloud:[5, 2000] - cloud_efficiency:[20, 32768] - cloud_ssd:[20, 32768] - cloud_essd:[20, 32768] - ephemeral_ssd: [5, 800]

func (LaunchTemplateDataDiskOutput) SnapshotId

The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.

func (LaunchTemplateDataDiskOutput) ToLaunchTemplateDataDiskOutput

func (o LaunchTemplateDataDiskOutput) ToLaunchTemplateDataDiskOutput() LaunchTemplateDataDiskOutput

func (LaunchTemplateDataDiskOutput) ToLaunchTemplateDataDiskOutputWithContext

func (o LaunchTemplateDataDiskOutput) ToLaunchTemplateDataDiskOutputWithContext(ctx context.Context) LaunchTemplateDataDiskOutput

type LaunchTemplateInput added in v2.25.1

type LaunchTemplateInput interface {
	pulumi.Input

	ToLaunchTemplateOutput() LaunchTemplateOutput
	ToLaunchTemplateOutputWithContext(ctx context.Context) LaunchTemplateOutput
}

type LaunchTemplateMap added in v2.35.1

type LaunchTemplateMap map[string]LaunchTemplateInput

func (LaunchTemplateMap) ElementType added in v2.35.1

func (LaunchTemplateMap) ElementType() reflect.Type

func (LaunchTemplateMap) ToLaunchTemplateMapOutput added in v2.35.1

func (i LaunchTemplateMap) ToLaunchTemplateMapOutput() LaunchTemplateMapOutput

func (LaunchTemplateMap) ToLaunchTemplateMapOutputWithContext added in v2.35.1

func (i LaunchTemplateMap) ToLaunchTemplateMapOutputWithContext(ctx context.Context) LaunchTemplateMapOutput

type LaunchTemplateMapInput added in v2.35.1

type LaunchTemplateMapInput interface {
	pulumi.Input

	ToLaunchTemplateMapOutput() LaunchTemplateMapOutput
	ToLaunchTemplateMapOutputWithContext(context.Context) LaunchTemplateMapOutput
}

LaunchTemplateMapInput is an input type that accepts LaunchTemplateMap and LaunchTemplateMapOutput values. You can construct a concrete instance of `LaunchTemplateMapInput` via:

LaunchTemplateMap{ "key": LaunchTemplateArgs{...} }

type LaunchTemplateMapOutput added in v2.35.1

type LaunchTemplateMapOutput struct{ *pulumi.OutputState }

func (LaunchTemplateMapOutput) ElementType added in v2.35.1

func (LaunchTemplateMapOutput) ElementType() reflect.Type

func (LaunchTemplateMapOutput) MapIndex added in v2.35.1

func (LaunchTemplateMapOutput) ToLaunchTemplateMapOutput added in v2.35.1

func (o LaunchTemplateMapOutput) ToLaunchTemplateMapOutput() LaunchTemplateMapOutput

func (LaunchTemplateMapOutput) ToLaunchTemplateMapOutputWithContext added in v2.35.1

func (o LaunchTemplateMapOutput) ToLaunchTemplateMapOutputWithContext(ctx context.Context) LaunchTemplateMapOutput

type LaunchTemplateNetworkInterfaces

type LaunchTemplateNetworkInterfaces struct {
	// The description of the data disk.
	Description *string `pulumi:"description"`
	// The name of the data disk.
	Name *string `pulumi:"name"`
	// The primary private IP address of the ENI.
	PrimaryIp *string `pulumi:"primaryIp"`
	// The security group ID must be one in the same VPC.
	SecurityGroupId *string `pulumi:"securityGroupId"`
	// The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
	VswitchId *string `pulumi:"vswitchId"`
}

type LaunchTemplateNetworkInterfacesArgs

type LaunchTemplateNetworkInterfacesArgs struct {
	// The description of the data disk.
	Description pulumi.StringPtrInput `pulumi:"description"`
	// The name of the data disk.
	Name pulumi.StringPtrInput `pulumi:"name"`
	// The primary private IP address of the ENI.
	PrimaryIp pulumi.StringPtrInput `pulumi:"primaryIp"`
	// The security group ID must be one in the same VPC.
	SecurityGroupId pulumi.StringPtrInput `pulumi:"securityGroupId"`
	// The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
	VswitchId pulumi.StringPtrInput `pulumi:"vswitchId"`
}

func (LaunchTemplateNetworkInterfacesArgs) ElementType

func (LaunchTemplateNetworkInterfacesArgs) ToLaunchTemplateNetworkInterfacesOutput

func (i LaunchTemplateNetworkInterfacesArgs) ToLaunchTemplateNetworkInterfacesOutput() LaunchTemplateNetworkInterfacesOutput

func (LaunchTemplateNetworkInterfacesArgs) ToLaunchTemplateNetworkInterfacesOutputWithContext

func (i LaunchTemplateNetworkInterfacesArgs) ToLaunchTemplateNetworkInterfacesOutputWithContext(ctx context.Context) LaunchTemplateNetworkInterfacesOutput

func (LaunchTemplateNetworkInterfacesArgs) ToLaunchTemplateNetworkInterfacesPtrOutput

func (i LaunchTemplateNetworkInterfacesArgs) ToLaunchTemplateNetworkInterfacesPtrOutput() LaunchTemplateNetworkInterfacesPtrOutput

func (LaunchTemplateNetworkInterfacesArgs) ToLaunchTemplateNetworkInterfacesPtrOutputWithContext

func (i LaunchTemplateNetworkInterfacesArgs) ToLaunchTemplateNetworkInterfacesPtrOutputWithContext(ctx context.Context) LaunchTemplateNetworkInterfacesPtrOutput

type LaunchTemplateNetworkInterfacesInput

type LaunchTemplateNetworkInterfacesInput interface {
	pulumi.Input

	ToLaunchTemplateNetworkInterfacesOutput() LaunchTemplateNetworkInterfacesOutput
	ToLaunchTemplateNetworkInterfacesOutputWithContext(context.Context) LaunchTemplateNetworkInterfacesOutput
}

LaunchTemplateNetworkInterfacesInput is an input type that accepts LaunchTemplateNetworkInterfacesArgs and LaunchTemplateNetworkInterfacesOutput values. You can construct a concrete instance of `LaunchTemplateNetworkInterfacesInput` via:

LaunchTemplateNetworkInterfacesArgs{...}

type LaunchTemplateNetworkInterfacesOutput

type LaunchTemplateNetworkInterfacesOutput struct{ *pulumi.OutputState }

func (LaunchTemplateNetworkInterfacesOutput) Description

The description of the data disk.

func (LaunchTemplateNetworkInterfacesOutput) ElementType

func (LaunchTemplateNetworkInterfacesOutput) Name

The name of the data disk.

func (LaunchTemplateNetworkInterfacesOutput) PrimaryIp

The primary private IP address of the ENI.

func (LaunchTemplateNetworkInterfacesOutput) SecurityGroupId

The security group ID must be one in the same VPC.

func (LaunchTemplateNetworkInterfacesOutput) ToLaunchTemplateNetworkInterfacesOutput

func (o LaunchTemplateNetworkInterfacesOutput) ToLaunchTemplateNetworkInterfacesOutput() LaunchTemplateNetworkInterfacesOutput

func (LaunchTemplateNetworkInterfacesOutput) ToLaunchTemplateNetworkInterfacesOutputWithContext

func (o LaunchTemplateNetworkInterfacesOutput) ToLaunchTemplateNetworkInterfacesOutputWithContext(ctx context.Context) LaunchTemplateNetworkInterfacesOutput

func (LaunchTemplateNetworkInterfacesOutput) ToLaunchTemplateNetworkInterfacesPtrOutput

func (o LaunchTemplateNetworkInterfacesOutput) ToLaunchTemplateNetworkInterfacesPtrOutput() LaunchTemplateNetworkInterfacesPtrOutput

func (LaunchTemplateNetworkInterfacesOutput) ToLaunchTemplateNetworkInterfacesPtrOutputWithContext

func (o LaunchTemplateNetworkInterfacesOutput) ToLaunchTemplateNetworkInterfacesPtrOutputWithContext(ctx context.Context) LaunchTemplateNetworkInterfacesPtrOutput

func (LaunchTemplateNetworkInterfacesOutput) VswitchId

The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.

type LaunchTemplateNetworkInterfacesPtrInput

type LaunchTemplateNetworkInterfacesPtrInput interface {
	pulumi.Input

	ToLaunchTemplateNetworkInterfacesPtrOutput() LaunchTemplateNetworkInterfacesPtrOutput
	ToLaunchTemplateNetworkInterfacesPtrOutputWithContext(context.Context) LaunchTemplateNetworkInterfacesPtrOutput
}

LaunchTemplateNetworkInterfacesPtrInput is an input type that accepts LaunchTemplateNetworkInterfacesArgs, LaunchTemplateNetworkInterfacesPtr and LaunchTemplateNetworkInterfacesPtrOutput values. You can construct a concrete instance of `LaunchTemplateNetworkInterfacesPtrInput` via:

        LaunchTemplateNetworkInterfacesArgs{...}

or:

        nil

type LaunchTemplateNetworkInterfacesPtrOutput

type LaunchTemplateNetworkInterfacesPtrOutput struct{ *pulumi.OutputState }

func (LaunchTemplateNetworkInterfacesPtrOutput) Description

The description of the data disk.

func (LaunchTemplateNetworkInterfacesPtrOutput) Elem

func (LaunchTemplateNetworkInterfacesPtrOutput) ElementType

func (LaunchTemplateNetworkInterfacesPtrOutput) Name

The name of the data disk.

func (LaunchTemplateNetworkInterfacesPtrOutput) PrimaryIp

The primary private IP address of the ENI.

func (LaunchTemplateNetworkInterfacesPtrOutput) SecurityGroupId

The security group ID must be one in the same VPC.

func (LaunchTemplateNetworkInterfacesPtrOutput) ToLaunchTemplateNetworkInterfacesPtrOutput

func (o LaunchTemplateNetworkInterfacesPtrOutput) ToLaunchTemplateNetworkInterfacesPtrOutput() LaunchTemplateNetworkInterfacesPtrOutput

func (LaunchTemplateNetworkInterfacesPtrOutput) ToLaunchTemplateNetworkInterfacesPtrOutputWithContext

func (o LaunchTemplateNetworkInterfacesPtrOutput) ToLaunchTemplateNetworkInterfacesPtrOutputWithContext(ctx context.Context) LaunchTemplateNetworkInterfacesPtrOutput

func (LaunchTemplateNetworkInterfacesPtrOutput) VswitchId

The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.

type LaunchTemplateOutput added in v2.25.1

type LaunchTemplateOutput struct {
	*pulumi.OutputState
}

func (LaunchTemplateOutput) ElementType added in v2.25.1

func (LaunchTemplateOutput) ElementType() reflect.Type

func (LaunchTemplateOutput) ToLaunchTemplateOutput added in v2.25.1

func (o LaunchTemplateOutput) ToLaunchTemplateOutput() LaunchTemplateOutput

func (LaunchTemplateOutput) ToLaunchTemplateOutputWithContext added in v2.25.1

func (o LaunchTemplateOutput) ToLaunchTemplateOutputWithContext(ctx context.Context) LaunchTemplateOutput

func (LaunchTemplateOutput) ToLaunchTemplatePtrOutput added in v2.35.1

func (o LaunchTemplateOutput) ToLaunchTemplatePtrOutput() LaunchTemplatePtrOutput

func (LaunchTemplateOutput) ToLaunchTemplatePtrOutputWithContext added in v2.35.1

func (o LaunchTemplateOutput) ToLaunchTemplatePtrOutputWithContext(ctx context.Context) LaunchTemplatePtrOutput

type LaunchTemplatePtrInput added in v2.35.1

type LaunchTemplatePtrInput interface {
	pulumi.Input

	ToLaunchTemplatePtrOutput() LaunchTemplatePtrOutput
	ToLaunchTemplatePtrOutputWithContext(ctx context.Context) LaunchTemplatePtrOutput
}

type LaunchTemplatePtrOutput added in v2.35.1

type LaunchTemplatePtrOutput struct {
	*pulumi.OutputState
}

func (LaunchTemplatePtrOutput) ElementType added in v2.35.1

func (LaunchTemplatePtrOutput) ElementType() reflect.Type

func (LaunchTemplatePtrOutput) ToLaunchTemplatePtrOutput added in v2.35.1

func (o LaunchTemplatePtrOutput) ToLaunchTemplatePtrOutput() LaunchTemplatePtrOutput

func (LaunchTemplatePtrOutput) ToLaunchTemplatePtrOutputWithContext added in v2.35.1

func (o LaunchTemplatePtrOutput) ToLaunchTemplatePtrOutputWithContext(ctx context.Context) LaunchTemplatePtrOutput

type LaunchTemplateState

type LaunchTemplateState struct {
	// Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is  YYYY-MM-DDTHH:MM:SSZ.
	AutoReleaseTime pulumi.StringPtrInput
	// The list of data disks created with instance.
	DataDisks LaunchTemplateDataDiskArrayInput
	// The description of the data disk.
	Description pulumi.StringPtrInput
	// Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be [2, 15] characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be [2, 64] characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).
	HostName pulumi.StringPtrInput
	// Image ID.
	ImageId         pulumi.StringPtrInput
	ImageOwnerAlias pulumi.StringPtrInput
	// Billing methods. Optional values:
	// - PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
	// - PostPaid: Pay-As-You-Go.
	InstanceChargeType pulumi.StringPtrInput
	// The name of the instance. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).
	InstanceName pulumi.StringPtrInput
	// Instance type. For more information, call resourceAlicloudInstances to obtain the latest instance type list.
	InstanceType pulumi.StringPtrInput
	// Internet bandwidth billing method. Optional values: `PayByTraffic` | `PayByBandwidth`.
	InternetChargeType pulumi.StringPtrInput
	// The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
	InternetMaxBandwidthIn pulumi.IntPtrInput
	// Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
	InternetMaxBandwidthOut pulumi.IntPtrInput
	// Whether it is an I/O-optimized instance or not. Optional values:
	// - none
	// - optimized
	IoOptimized pulumi.StringPtrInput
	// The name of the key pair.
	// - Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the  Password content is used.
	// - The password logon method for Linux instances is set to forbidden upon initialization.
	KeyPairName pulumi.StringPtrInput
	// The name of the data disk.
	Name pulumi.StringPtrInput
	// The list of network interfaces created with instance.
	NetworkInterfaces LaunchTemplateNetworkInterfacesPtrInput
	// Network type of the instance. Value options: `classic` | `vpc`.
	NetworkType pulumi.StringPtrInput
	// The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
	RamRoleName     pulumi.StringPtrInput
	ResourceGroupId pulumi.StringPtrInput
	// Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
	SecurityEnhancementStrategy pulumi.StringPtrInput
	// The security group ID must be one in the same VPC.
	SecurityGroupId pulumi.StringPtrInput
	// -(Optional) 	Sets the maximum hourly instance price. Supports up to three decimal places.
	SpotPriceLimit pulumi.Float64PtrInput
	// The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Value range:
	// - NoSpot: Normal Pay-As-You-Go instance.
	// - SpotWithPriceLimit: Sets the maximum price for a spot instance.
	// - SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
	SpotStrategy pulumi.StringPtrInput
	// The category of the system disk. System disk type. Optional values:
	// - cloud: Basic cloud disk.
	// - cloud_efficiency: Ultra cloud disk.
	// - cloud_ssd: SSD cloud Disks.
	// - ephemeral_ssd: local SSD Disks
	// - cloud_essd: ESSD cloud Disks.
	SystemDiskCategory pulumi.StringPtrInput
	// System disk description. It cannot begin with http:// or https://.
	SystemDiskDescription pulumi.StringPtrInput
	// System disk name. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).
	SystemDiskName pulumi.StringPtrInput
	// Size of the system disk, measured in GB. Value range: [20, 500].
	SystemDiskSize pulumi.IntPtrInput
	// A mapping of tags to assign to the resource.
	// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
	// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
	Tags pulumi.MapInput
	// User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.
	Userdata pulumi.StringPtrInput
	VpcId    pulumi.StringPtrInput
	// The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
	VswitchId pulumi.StringPtrInput
	// The zone ID of the instance.
	ZoneId pulumi.StringPtrInput
}

func (LaunchTemplateState) ElementType

func (LaunchTemplateState) ElementType() reflect.Type

type ReservedInstance

type ReservedInstance struct {
	pulumi.CustomResourceState

	// Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
	InstanceAmount pulumi.IntOutput `pulumi:"instanceAmount"`
	// Instance type of the RI. For more information, see [Instance type families](https://www.alibabacloud.com/help/doc-detail/25378.html).
	InstanceType pulumi.StringOutput `pulumi:"instanceType"`
	// Name of the RI. The name must be a string of 2 to 128 characters in length and can contain letters, numbers, colons (:), underscores (_), and hyphens. It must start with a letter. It cannot start with http:// or https://.
	Name pulumi.StringOutput `pulumi:"name"`
	// Payment type of the RI. Optional values: `No Upfront`: No upfront payment is required., `Partial Upfront`: A portion of upfront payment is required.`All Upfront`: Full upfront payment is required.
	OfferingType pulumi.StringPtrOutput `pulumi:"offeringType"`
	Period       pulumi.IntPtrOutput    `pulumi:"period"`
	// Term unit. Optional value: Year.
	PeriodUnit pulumi.StringPtrOutput `pulumi:"periodUnit"`
	// The operating system type of the image used by the instance. Optional values: `Windows`, `Linux`. Default is `Linux`.
	Platform pulumi.StringOutput `pulumi:"platform"`
	// Resource group ID.
	ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"`
	// Scope of the RI. Optional values: `Region`: region-level, `Zone`: zone-level. Default is `Region`.
	Scope pulumi.StringPtrOutput `pulumi:"scope"`
	// ID of the zone to which the RI belongs. When Scope is set to Zone, this parameter is required. For information about the zone list, see [DescribeZones](https://www.alibabacloud.com/help/doc-detail/25610.html).
	ZoneId pulumi.StringPtrOutput `pulumi:"zoneId"`
}

Provides an Reserved Instance resource.

> **NOTE:** Available in 1.65.0+

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewReservedInstance(ctx, "_default", &ecs.ReservedInstanceArgs{
			InstanceType:   pulumi.String("ecs.g6.large"),
			InstanceAmount: pulumi.Int(1),
			PeriodUnit:     pulumi.String("Year"),
			OfferingType:   pulumi.String("All Upfront"),
			Description:    pulumi.String("ReservedInstance"),
			ZoneId:         pulumi.String("cn-hangzhou-h"),
			Scope:          pulumi.String("Zone"),
			Period:         pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

reservedInstance can be imported using id, e.g.

```sh

$ pulumi import alicloud:ecs/reservedInstance:ReservedInstance default ecsri-uf6df4xm0h3licit****

```

func GetReservedInstance

func GetReservedInstance(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ReservedInstanceState, opts ...pulumi.ResourceOption) (*ReservedInstance, error)

GetReservedInstance gets an existing ReservedInstance 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 NewReservedInstance

func NewReservedInstance(ctx *pulumi.Context,
	name string, args *ReservedInstanceArgs, opts ...pulumi.ResourceOption) (*ReservedInstance, error)

NewReservedInstance registers a new resource with the given unique name, arguments, and options.

func (*ReservedInstance) ElementType added in v2.25.1

func (*ReservedInstance) ElementType() reflect.Type

func (*ReservedInstance) ToReservedInstanceOutput added in v2.25.1

func (i *ReservedInstance) ToReservedInstanceOutput() ReservedInstanceOutput

func (*ReservedInstance) ToReservedInstanceOutputWithContext added in v2.25.1

func (i *ReservedInstance) ToReservedInstanceOutputWithContext(ctx context.Context) ReservedInstanceOutput

func (*ReservedInstance) ToReservedInstancePtrOutput added in v2.35.1

func (i *ReservedInstance) ToReservedInstancePtrOutput() ReservedInstancePtrOutput

func (*ReservedInstance) ToReservedInstancePtrOutputWithContext added in v2.35.1

func (i *ReservedInstance) ToReservedInstancePtrOutputWithContext(ctx context.Context) ReservedInstancePtrOutput

type ReservedInstanceArgs

type ReservedInstanceArgs struct {
	// Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
	Description pulumi.StringPtrInput
	// Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
	InstanceAmount pulumi.IntPtrInput
	// Instance type of the RI. For more information, see [Instance type families](https://www.alibabacloud.com/help/doc-detail/25378.html).
	InstanceType pulumi.StringInput
	// Name of the RI. The name must be a string of 2 to 128 characters in length and can contain letters, numbers, colons (:), underscores (_), and hyphens. It must start with a letter. It cannot start with http:// or https://.
	Name pulumi.StringPtrInput
	// Payment type of the RI. Optional values: `No Upfront`: No upfront payment is required., `Partial Upfront`: A portion of upfront payment is required.`All Upfront`: Full upfront payment is required.
	OfferingType pulumi.StringPtrInput
	Period       pulumi.IntPtrInput
	// Term unit. Optional value: Year.
	PeriodUnit pulumi.StringPtrInput
	// The operating system type of the image used by the instance. Optional values: `Windows`, `Linux`. Default is `Linux`.
	Platform pulumi.StringPtrInput
	// Resource group ID.
	ResourceGroupId pulumi.StringPtrInput
	// Scope of the RI. Optional values: `Region`: region-level, `Zone`: zone-level. Default is `Region`.
	Scope pulumi.StringPtrInput
	// ID of the zone to which the RI belongs. When Scope is set to Zone, this parameter is required. For information about the zone list, see [DescribeZones](https://www.alibabacloud.com/help/doc-detail/25610.html).
	ZoneId pulumi.StringPtrInput
}

The set of arguments for constructing a ReservedInstance resource.

func (ReservedInstanceArgs) ElementType

func (ReservedInstanceArgs) ElementType() reflect.Type

type ReservedInstanceArray added in v2.35.1

type ReservedInstanceArray []ReservedInstanceInput

func (ReservedInstanceArray) ElementType added in v2.35.1

func (ReservedInstanceArray) ElementType() reflect.Type

func (ReservedInstanceArray) ToReservedInstanceArrayOutput added in v2.35.1

func (i ReservedInstanceArray) ToReservedInstanceArrayOutput() ReservedInstanceArrayOutput

func (ReservedInstanceArray) ToReservedInstanceArrayOutputWithContext added in v2.35.1

func (i ReservedInstanceArray) ToReservedInstanceArrayOutputWithContext(ctx context.Context) ReservedInstanceArrayOutput

type ReservedInstanceArrayInput added in v2.35.1

type ReservedInstanceArrayInput interface {
	pulumi.Input

	ToReservedInstanceArrayOutput() ReservedInstanceArrayOutput
	ToReservedInstanceArrayOutputWithContext(context.Context) ReservedInstanceArrayOutput
}

ReservedInstanceArrayInput is an input type that accepts ReservedInstanceArray and ReservedInstanceArrayOutput values. You can construct a concrete instance of `ReservedInstanceArrayInput` via:

ReservedInstanceArray{ ReservedInstanceArgs{...} }

type ReservedInstanceArrayOutput added in v2.35.1

type ReservedInstanceArrayOutput struct{ *pulumi.OutputState }

func (ReservedInstanceArrayOutput) ElementType added in v2.35.1

func (ReservedInstanceArrayOutput) Index added in v2.35.1

func (ReservedInstanceArrayOutput) ToReservedInstanceArrayOutput added in v2.35.1

func (o ReservedInstanceArrayOutput) ToReservedInstanceArrayOutput() ReservedInstanceArrayOutput

func (ReservedInstanceArrayOutput) ToReservedInstanceArrayOutputWithContext added in v2.35.1

func (o ReservedInstanceArrayOutput) ToReservedInstanceArrayOutputWithContext(ctx context.Context) ReservedInstanceArrayOutput

type ReservedInstanceInput added in v2.25.1

type ReservedInstanceInput interface {
	pulumi.Input

	ToReservedInstanceOutput() ReservedInstanceOutput
	ToReservedInstanceOutputWithContext(ctx context.Context) ReservedInstanceOutput
}

type ReservedInstanceMap added in v2.35.1

type ReservedInstanceMap map[string]ReservedInstanceInput

func (ReservedInstanceMap) ElementType added in v2.35.1

func (ReservedInstanceMap) ElementType() reflect.Type

func (ReservedInstanceMap) ToReservedInstanceMapOutput added in v2.35.1

func (i ReservedInstanceMap) ToReservedInstanceMapOutput() ReservedInstanceMapOutput

func (ReservedInstanceMap) ToReservedInstanceMapOutputWithContext added in v2.35.1

func (i ReservedInstanceMap) ToReservedInstanceMapOutputWithContext(ctx context.Context) ReservedInstanceMapOutput

type ReservedInstanceMapInput added in v2.35.1

type ReservedInstanceMapInput interface {
	pulumi.Input

	ToReservedInstanceMapOutput() ReservedInstanceMapOutput
	ToReservedInstanceMapOutputWithContext(context.Context) ReservedInstanceMapOutput
}

ReservedInstanceMapInput is an input type that accepts ReservedInstanceMap and ReservedInstanceMapOutput values. You can construct a concrete instance of `ReservedInstanceMapInput` via:

ReservedInstanceMap{ "key": ReservedInstanceArgs{...} }

type ReservedInstanceMapOutput added in v2.35.1

type ReservedInstanceMapOutput struct{ *pulumi.OutputState }

func (ReservedInstanceMapOutput) ElementType added in v2.35.1

func (ReservedInstanceMapOutput) ElementType() reflect.Type

func (ReservedInstanceMapOutput) MapIndex added in v2.35.1

func (ReservedInstanceMapOutput) ToReservedInstanceMapOutput added in v2.35.1

func (o ReservedInstanceMapOutput) ToReservedInstanceMapOutput() ReservedInstanceMapOutput

func (ReservedInstanceMapOutput) ToReservedInstanceMapOutputWithContext added in v2.35.1

func (o ReservedInstanceMapOutput) ToReservedInstanceMapOutputWithContext(ctx context.Context) ReservedInstanceMapOutput

type ReservedInstanceOutput added in v2.25.1

type ReservedInstanceOutput struct {
	*pulumi.OutputState
}

func (ReservedInstanceOutput) ElementType added in v2.25.1

func (ReservedInstanceOutput) ElementType() reflect.Type

func (ReservedInstanceOutput) ToReservedInstanceOutput added in v2.25.1

func (o ReservedInstanceOutput) ToReservedInstanceOutput() ReservedInstanceOutput

func (ReservedInstanceOutput) ToReservedInstanceOutputWithContext added in v2.25.1

func (o ReservedInstanceOutput) ToReservedInstanceOutputWithContext(ctx context.Context) ReservedInstanceOutput

func (ReservedInstanceOutput) ToReservedInstancePtrOutput added in v2.35.1

func (o ReservedInstanceOutput) ToReservedInstancePtrOutput() ReservedInstancePtrOutput

func (ReservedInstanceOutput) ToReservedInstancePtrOutputWithContext added in v2.35.1

func (o ReservedInstanceOutput) ToReservedInstancePtrOutputWithContext(ctx context.Context) ReservedInstancePtrOutput

type ReservedInstancePtrInput added in v2.35.1

type ReservedInstancePtrInput interface {
	pulumi.Input

	ToReservedInstancePtrOutput() ReservedInstancePtrOutput
	ToReservedInstancePtrOutputWithContext(ctx context.Context) ReservedInstancePtrOutput
}

type ReservedInstancePtrOutput added in v2.35.1

type ReservedInstancePtrOutput struct {
	*pulumi.OutputState
}

func (ReservedInstancePtrOutput) ElementType added in v2.35.1

func (ReservedInstancePtrOutput) ElementType() reflect.Type

func (ReservedInstancePtrOutput) ToReservedInstancePtrOutput added in v2.35.1

func (o ReservedInstancePtrOutput) ToReservedInstancePtrOutput() ReservedInstancePtrOutput

func (ReservedInstancePtrOutput) ToReservedInstancePtrOutputWithContext added in v2.35.1

func (o ReservedInstancePtrOutput) ToReservedInstancePtrOutputWithContext(ctx context.Context) ReservedInstancePtrOutput

type ReservedInstanceState

type ReservedInstanceState struct {
	// Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
	Description pulumi.StringPtrInput
	// Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
	InstanceAmount pulumi.IntPtrInput
	// Instance type of the RI. For more information, see [Instance type families](https://www.alibabacloud.com/help/doc-detail/25378.html).
	InstanceType pulumi.StringPtrInput
	// Name of the RI. The name must be a string of 2 to 128 characters in length and can contain letters, numbers, colons (:), underscores (_), and hyphens. It must start with a letter. It cannot start with http:// or https://.
	Name pulumi.StringPtrInput
	// Payment type of the RI. Optional values: `No Upfront`: No upfront payment is required., `Partial Upfront`: A portion of upfront payment is required.`All Upfront`: Full upfront payment is required.
	OfferingType pulumi.StringPtrInput
	Period       pulumi.IntPtrInput
	// Term unit. Optional value: Year.
	PeriodUnit pulumi.StringPtrInput
	// The operating system type of the image used by the instance. Optional values: `Windows`, `Linux`. Default is `Linux`.
	Platform pulumi.StringPtrInput
	// Resource group ID.
	ResourceGroupId pulumi.StringPtrInput
	// Scope of the RI. Optional values: `Region`: region-level, `Zone`: zone-level. Default is `Region`.
	Scope pulumi.StringPtrInput
	// ID of the zone to which the RI belongs. When Scope is set to Zone, this parameter is required. For information about the zone list, see [DescribeZones](https://www.alibabacloud.com/help/doc-detail/25610.html).
	ZoneId pulumi.StringPtrInput
}

func (ReservedInstanceState) ElementType

func (ReservedInstanceState) ElementType() reflect.Type

type SecurityGroup

type SecurityGroup struct {
	pulumi.CustomResourceState

	// The security group description. Defaults to null.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Field 'inner_access' has been deprecated from provider version 1.55.3. Use 'inner_access_policy' replaces it.
	//
	// Deprecated: Field 'inner_access' has been deprecated from provider version 1.55.3. Use 'inner_access_policy' replaces it.
	InnerAccess pulumi.BoolOutput `pulumi:"innerAccess"`
	// Whether to allow both machines to access each other on all ports in the same security group. Valid values: ["Accept", "Drop"]
	InnerAccessPolicy pulumi.StringOutput `pulumi:"innerAccessPolicy"`
	// The name of the security group. Defaults to null.
	Name pulumi.StringOutput `pulumi:"name"`
	// The Id of resource group which the securityGroup belongs.
	ResourceGroupId pulumi.StringPtrOutput `pulumi:"resourceGroupId"`
	// The type of the security group. Valid values:
	// `normal`: basic security group.
	// `enterprise`: advanced security group For more information.
	SecurityGroupType pulumi.StringPtrOutput `pulumi:"securityGroupType"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// The VPC ID.
	VpcId pulumi.StringPtrOutput `pulumi:"vpcId"`
}

## Import

Security Group can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/securityGroup:SecurityGroup example sg-abc123456

```

func GetSecurityGroup

func GetSecurityGroup(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SecurityGroupState, opts ...pulumi.ResourceOption) (*SecurityGroup, error)

GetSecurityGroup gets an existing SecurityGroup 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 NewSecurityGroup

func NewSecurityGroup(ctx *pulumi.Context,
	name string, args *SecurityGroupArgs, opts ...pulumi.ResourceOption) (*SecurityGroup, error)

NewSecurityGroup registers a new resource with the given unique name, arguments, and options.

func (*SecurityGroup) ElementType added in v2.25.1

func (*SecurityGroup) ElementType() reflect.Type

func (*SecurityGroup) ToSecurityGroupOutput added in v2.25.1

func (i *SecurityGroup) ToSecurityGroupOutput() SecurityGroupOutput

func (*SecurityGroup) ToSecurityGroupOutputWithContext added in v2.25.1

func (i *SecurityGroup) ToSecurityGroupOutputWithContext(ctx context.Context) SecurityGroupOutput

func (*SecurityGroup) ToSecurityGroupPtrOutput added in v2.35.1

func (i *SecurityGroup) ToSecurityGroupPtrOutput() SecurityGroupPtrOutput

func (*SecurityGroup) ToSecurityGroupPtrOutputWithContext added in v2.35.1

func (i *SecurityGroup) ToSecurityGroupPtrOutputWithContext(ctx context.Context) SecurityGroupPtrOutput

type SecurityGroupArgs

type SecurityGroupArgs struct {
	// The security group description. Defaults to null.
	Description pulumi.StringPtrInput
	// Field 'inner_access' has been deprecated from provider version 1.55.3. Use 'inner_access_policy' replaces it.
	//
	// Deprecated: Field 'inner_access' has been deprecated from provider version 1.55.3. Use 'inner_access_policy' replaces it.
	InnerAccess pulumi.BoolPtrInput
	// Whether to allow both machines to access each other on all ports in the same security group. Valid values: ["Accept", "Drop"]
	InnerAccessPolicy pulumi.StringPtrInput
	// The name of the security group. Defaults to null.
	Name pulumi.StringPtrInput
	// The Id of resource group which the securityGroup belongs.
	ResourceGroupId pulumi.StringPtrInput
	// The type of the security group. Valid values:
	// `normal`: basic security group.
	// `enterprise`: advanced security group For more information.
	SecurityGroupType pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// The VPC ID.
	VpcId pulumi.StringPtrInput
}

The set of arguments for constructing a SecurityGroup resource.

func (SecurityGroupArgs) ElementType

func (SecurityGroupArgs) ElementType() reflect.Type

type SecurityGroupArray added in v2.35.1

type SecurityGroupArray []SecurityGroupInput

func (SecurityGroupArray) ElementType added in v2.35.1

func (SecurityGroupArray) ElementType() reflect.Type

func (SecurityGroupArray) ToSecurityGroupArrayOutput added in v2.35.1

func (i SecurityGroupArray) ToSecurityGroupArrayOutput() SecurityGroupArrayOutput

func (SecurityGroupArray) ToSecurityGroupArrayOutputWithContext added in v2.35.1

func (i SecurityGroupArray) ToSecurityGroupArrayOutputWithContext(ctx context.Context) SecurityGroupArrayOutput

type SecurityGroupArrayInput added in v2.35.1

type SecurityGroupArrayInput interface {
	pulumi.Input

	ToSecurityGroupArrayOutput() SecurityGroupArrayOutput
	ToSecurityGroupArrayOutputWithContext(context.Context) SecurityGroupArrayOutput
}

SecurityGroupArrayInput is an input type that accepts SecurityGroupArray and SecurityGroupArrayOutput values. You can construct a concrete instance of `SecurityGroupArrayInput` via:

SecurityGroupArray{ SecurityGroupArgs{...} }

type SecurityGroupArrayOutput added in v2.35.1

type SecurityGroupArrayOutput struct{ *pulumi.OutputState }

func (SecurityGroupArrayOutput) ElementType added in v2.35.1

func (SecurityGroupArrayOutput) ElementType() reflect.Type

func (SecurityGroupArrayOutput) Index added in v2.35.1

func (SecurityGroupArrayOutput) ToSecurityGroupArrayOutput added in v2.35.1

func (o SecurityGroupArrayOutput) ToSecurityGroupArrayOutput() SecurityGroupArrayOutput

func (SecurityGroupArrayOutput) ToSecurityGroupArrayOutputWithContext added in v2.35.1

func (o SecurityGroupArrayOutput) ToSecurityGroupArrayOutputWithContext(ctx context.Context) SecurityGroupArrayOutput

type SecurityGroupInput added in v2.25.1

type SecurityGroupInput interface {
	pulumi.Input

	ToSecurityGroupOutput() SecurityGroupOutput
	ToSecurityGroupOutputWithContext(ctx context.Context) SecurityGroupOutput
}

type SecurityGroupMap added in v2.35.1

type SecurityGroupMap map[string]SecurityGroupInput

func (SecurityGroupMap) ElementType added in v2.35.1

func (SecurityGroupMap) ElementType() reflect.Type

func (SecurityGroupMap) ToSecurityGroupMapOutput added in v2.35.1

func (i SecurityGroupMap) ToSecurityGroupMapOutput() SecurityGroupMapOutput

func (SecurityGroupMap) ToSecurityGroupMapOutputWithContext added in v2.35.1

func (i SecurityGroupMap) ToSecurityGroupMapOutputWithContext(ctx context.Context) SecurityGroupMapOutput

type SecurityGroupMapInput added in v2.35.1

type SecurityGroupMapInput interface {
	pulumi.Input

	ToSecurityGroupMapOutput() SecurityGroupMapOutput
	ToSecurityGroupMapOutputWithContext(context.Context) SecurityGroupMapOutput
}

SecurityGroupMapInput is an input type that accepts SecurityGroupMap and SecurityGroupMapOutput values. You can construct a concrete instance of `SecurityGroupMapInput` via:

SecurityGroupMap{ "key": SecurityGroupArgs{...} }

type SecurityGroupMapOutput added in v2.35.1

type SecurityGroupMapOutput struct{ *pulumi.OutputState }

func (SecurityGroupMapOutput) ElementType added in v2.35.1

func (SecurityGroupMapOutput) ElementType() reflect.Type

func (SecurityGroupMapOutput) MapIndex added in v2.35.1

func (SecurityGroupMapOutput) ToSecurityGroupMapOutput added in v2.35.1

func (o SecurityGroupMapOutput) ToSecurityGroupMapOutput() SecurityGroupMapOutput

func (SecurityGroupMapOutput) ToSecurityGroupMapOutputWithContext added in v2.35.1

func (o SecurityGroupMapOutput) ToSecurityGroupMapOutputWithContext(ctx context.Context) SecurityGroupMapOutput

type SecurityGroupOutput added in v2.25.1

type SecurityGroupOutput struct {
	*pulumi.OutputState
}

func (SecurityGroupOutput) ElementType added in v2.25.1

func (SecurityGroupOutput) ElementType() reflect.Type

func (SecurityGroupOutput) ToSecurityGroupOutput added in v2.25.1

func (o SecurityGroupOutput) ToSecurityGroupOutput() SecurityGroupOutput

func (SecurityGroupOutput) ToSecurityGroupOutputWithContext added in v2.25.1

func (o SecurityGroupOutput) ToSecurityGroupOutputWithContext(ctx context.Context) SecurityGroupOutput

func (SecurityGroupOutput) ToSecurityGroupPtrOutput added in v2.35.1

func (o SecurityGroupOutput) ToSecurityGroupPtrOutput() SecurityGroupPtrOutput

func (SecurityGroupOutput) ToSecurityGroupPtrOutputWithContext added in v2.35.1

func (o SecurityGroupOutput) ToSecurityGroupPtrOutputWithContext(ctx context.Context) SecurityGroupPtrOutput

type SecurityGroupPtrInput added in v2.35.1

type SecurityGroupPtrInput interface {
	pulumi.Input

	ToSecurityGroupPtrOutput() SecurityGroupPtrOutput
	ToSecurityGroupPtrOutputWithContext(ctx context.Context) SecurityGroupPtrOutput
}

type SecurityGroupPtrOutput added in v2.35.1

type SecurityGroupPtrOutput struct {
	*pulumi.OutputState
}

func (SecurityGroupPtrOutput) ElementType added in v2.35.1

func (SecurityGroupPtrOutput) ElementType() reflect.Type

func (SecurityGroupPtrOutput) ToSecurityGroupPtrOutput added in v2.35.1

func (o SecurityGroupPtrOutput) ToSecurityGroupPtrOutput() SecurityGroupPtrOutput

func (SecurityGroupPtrOutput) ToSecurityGroupPtrOutputWithContext added in v2.35.1

func (o SecurityGroupPtrOutput) ToSecurityGroupPtrOutputWithContext(ctx context.Context) SecurityGroupPtrOutput

type SecurityGroupRule

type SecurityGroupRule struct {
	pulumi.CustomResourceState

	// The target IP address range. The default value is 0.0.0.0/0 (which means no restriction will be applied). Other supported formats include 10.159.6.18/12. Only IPv4 is supported.
	CidrIp pulumi.StringPtrOutput `pulumi:"cidrIp"`
	// The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The protocol. Can be `tcp`, `udp`, `icmp`, `gre` or `all`.
	IpProtocol pulumi.StringOutput `pulumi:"ipProtocol"`
	// Network type, can be either `internet` or `intranet`, the default value is `internet`.
	NicType pulumi.StringOutput `pulumi:"nicType"`
	// Authorization policy, can be either `accept` or `drop`, the default value is `accept`.
	Policy pulumi.StringPtrOutput `pulumi:"policy"`
	// The range of port numbers relevant to the IP protocol. Default to "-1/-1". When the protocol is tcp or udp, each side port number range from 1 to 65535 and '-1/-1' will be invalid.
	// For example, `1/200` means that the range of the port numbers is 1-200. Other protocols' 'port_range' can only be "-1/-1", and other values will be invalid.
	PortRange pulumi.StringPtrOutput `pulumi:"portRange"`
	// Authorization policy priority, with parameter values: `1-100`, default value: 1.
	Priority pulumi.IntPtrOutput `pulumi:"priority"`
	// The security group to apply this rule to.
	SecurityGroupId pulumi.StringOutput `pulumi:"securityGroupId"`
	// The Alibaba Cloud user account Id of the target security group when security groups are authorized across accounts.  This parameter is invalid if `cidrIp` has already been set.
	SourceGroupOwnerAccount pulumi.StringPtrOutput `pulumi:"sourceGroupOwnerAccount"`
	// The target security group ID within the same region. If this field is specified, the `nicType` can only select `intranet`.
	SourceSecurityGroupId pulumi.StringPtrOutput `pulumi:"sourceSecurityGroupId"`
	// The type of rule being created. Valid options are `ingress` (inbound) or `egress` (outbound).
	Type pulumi.StringOutput `pulumi:"type"`
}

func GetSecurityGroupRule

func GetSecurityGroupRule(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SecurityGroupRuleState, opts ...pulumi.ResourceOption) (*SecurityGroupRule, error)

GetSecurityGroupRule gets an existing SecurityGroupRule 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 NewSecurityGroupRule

func NewSecurityGroupRule(ctx *pulumi.Context,
	name string, args *SecurityGroupRuleArgs, opts ...pulumi.ResourceOption) (*SecurityGroupRule, error)

NewSecurityGroupRule registers a new resource with the given unique name, arguments, and options.

func (*SecurityGroupRule) ElementType added in v2.25.1

func (*SecurityGroupRule) ElementType() reflect.Type

func (*SecurityGroupRule) ToSecurityGroupRuleOutput added in v2.25.1

func (i *SecurityGroupRule) ToSecurityGroupRuleOutput() SecurityGroupRuleOutput

func (*SecurityGroupRule) ToSecurityGroupRuleOutputWithContext added in v2.25.1

func (i *SecurityGroupRule) ToSecurityGroupRuleOutputWithContext(ctx context.Context) SecurityGroupRuleOutput

func (*SecurityGroupRule) ToSecurityGroupRulePtrOutput added in v2.35.1

func (i *SecurityGroupRule) ToSecurityGroupRulePtrOutput() SecurityGroupRulePtrOutput

func (*SecurityGroupRule) ToSecurityGroupRulePtrOutputWithContext added in v2.35.1

func (i *SecurityGroupRule) ToSecurityGroupRulePtrOutputWithContext(ctx context.Context) SecurityGroupRulePtrOutput

type SecurityGroupRuleArgs

type SecurityGroupRuleArgs struct {
	// The target IP address range. The default value is 0.0.0.0/0 (which means no restriction will be applied). Other supported formats include 10.159.6.18/12. Only IPv4 is supported.
	CidrIp pulumi.StringPtrInput
	// The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.
	Description pulumi.StringPtrInput
	// The protocol. Can be `tcp`, `udp`, `icmp`, `gre` or `all`.
	IpProtocol pulumi.StringInput
	// Network type, can be either `internet` or `intranet`, the default value is `internet`.
	NicType pulumi.StringPtrInput
	// Authorization policy, can be either `accept` or `drop`, the default value is `accept`.
	Policy pulumi.StringPtrInput
	// The range of port numbers relevant to the IP protocol. Default to "-1/-1". When the protocol is tcp or udp, each side port number range from 1 to 65535 and '-1/-1' will be invalid.
	// For example, `1/200` means that the range of the port numbers is 1-200. Other protocols' 'port_range' can only be "-1/-1", and other values will be invalid.
	PortRange pulumi.StringPtrInput
	// Authorization policy priority, with parameter values: `1-100`, default value: 1.
	Priority pulumi.IntPtrInput
	// The security group to apply this rule to.
	SecurityGroupId pulumi.StringInput
	// The Alibaba Cloud user account Id of the target security group when security groups are authorized across accounts.  This parameter is invalid if `cidrIp` has already been set.
	SourceGroupOwnerAccount pulumi.StringPtrInput
	// The target security group ID within the same region. If this field is specified, the `nicType` can only select `intranet`.
	SourceSecurityGroupId pulumi.StringPtrInput
	// The type of rule being created. Valid options are `ingress` (inbound) or `egress` (outbound).
	Type pulumi.StringInput
}

The set of arguments for constructing a SecurityGroupRule resource.

func (SecurityGroupRuleArgs) ElementType

func (SecurityGroupRuleArgs) ElementType() reflect.Type

type SecurityGroupRuleArray added in v2.35.1

type SecurityGroupRuleArray []SecurityGroupRuleInput

func (SecurityGroupRuleArray) ElementType added in v2.35.1

func (SecurityGroupRuleArray) ElementType() reflect.Type

func (SecurityGroupRuleArray) ToSecurityGroupRuleArrayOutput added in v2.35.1

func (i SecurityGroupRuleArray) ToSecurityGroupRuleArrayOutput() SecurityGroupRuleArrayOutput

func (SecurityGroupRuleArray) ToSecurityGroupRuleArrayOutputWithContext added in v2.35.1

func (i SecurityGroupRuleArray) ToSecurityGroupRuleArrayOutputWithContext(ctx context.Context) SecurityGroupRuleArrayOutput

type SecurityGroupRuleArrayInput added in v2.35.1

type SecurityGroupRuleArrayInput interface {
	pulumi.Input

	ToSecurityGroupRuleArrayOutput() SecurityGroupRuleArrayOutput
	ToSecurityGroupRuleArrayOutputWithContext(context.Context) SecurityGroupRuleArrayOutput
}

SecurityGroupRuleArrayInput is an input type that accepts SecurityGroupRuleArray and SecurityGroupRuleArrayOutput values. You can construct a concrete instance of `SecurityGroupRuleArrayInput` via:

SecurityGroupRuleArray{ SecurityGroupRuleArgs{...} }

type SecurityGroupRuleArrayOutput added in v2.35.1

type SecurityGroupRuleArrayOutput struct{ *pulumi.OutputState }

func (SecurityGroupRuleArrayOutput) ElementType added in v2.35.1

func (SecurityGroupRuleArrayOutput) Index added in v2.35.1

func (SecurityGroupRuleArrayOutput) ToSecurityGroupRuleArrayOutput added in v2.35.1

func (o SecurityGroupRuleArrayOutput) ToSecurityGroupRuleArrayOutput() SecurityGroupRuleArrayOutput

func (SecurityGroupRuleArrayOutput) ToSecurityGroupRuleArrayOutputWithContext added in v2.35.1

func (o SecurityGroupRuleArrayOutput) ToSecurityGroupRuleArrayOutputWithContext(ctx context.Context) SecurityGroupRuleArrayOutput

type SecurityGroupRuleInput added in v2.25.1

type SecurityGroupRuleInput interface {
	pulumi.Input

	ToSecurityGroupRuleOutput() SecurityGroupRuleOutput
	ToSecurityGroupRuleOutputWithContext(ctx context.Context) SecurityGroupRuleOutput
}

type SecurityGroupRuleMap added in v2.35.1

type SecurityGroupRuleMap map[string]SecurityGroupRuleInput

func (SecurityGroupRuleMap) ElementType added in v2.35.1

func (SecurityGroupRuleMap) ElementType() reflect.Type

func (SecurityGroupRuleMap) ToSecurityGroupRuleMapOutput added in v2.35.1

func (i SecurityGroupRuleMap) ToSecurityGroupRuleMapOutput() SecurityGroupRuleMapOutput

func (SecurityGroupRuleMap) ToSecurityGroupRuleMapOutputWithContext added in v2.35.1

func (i SecurityGroupRuleMap) ToSecurityGroupRuleMapOutputWithContext(ctx context.Context) SecurityGroupRuleMapOutput

type SecurityGroupRuleMapInput added in v2.35.1

type SecurityGroupRuleMapInput interface {
	pulumi.Input

	ToSecurityGroupRuleMapOutput() SecurityGroupRuleMapOutput
	ToSecurityGroupRuleMapOutputWithContext(context.Context) SecurityGroupRuleMapOutput
}

SecurityGroupRuleMapInput is an input type that accepts SecurityGroupRuleMap and SecurityGroupRuleMapOutput values. You can construct a concrete instance of `SecurityGroupRuleMapInput` via:

SecurityGroupRuleMap{ "key": SecurityGroupRuleArgs{...} }

type SecurityGroupRuleMapOutput added in v2.35.1

type SecurityGroupRuleMapOutput struct{ *pulumi.OutputState }

func (SecurityGroupRuleMapOutput) ElementType added in v2.35.1

func (SecurityGroupRuleMapOutput) ElementType() reflect.Type

func (SecurityGroupRuleMapOutput) MapIndex added in v2.35.1

func (SecurityGroupRuleMapOutput) ToSecurityGroupRuleMapOutput added in v2.35.1

func (o SecurityGroupRuleMapOutput) ToSecurityGroupRuleMapOutput() SecurityGroupRuleMapOutput

func (SecurityGroupRuleMapOutput) ToSecurityGroupRuleMapOutputWithContext added in v2.35.1

func (o SecurityGroupRuleMapOutput) ToSecurityGroupRuleMapOutputWithContext(ctx context.Context) SecurityGroupRuleMapOutput

type SecurityGroupRuleOutput added in v2.25.1

type SecurityGroupRuleOutput struct {
	*pulumi.OutputState
}

func (SecurityGroupRuleOutput) ElementType added in v2.25.1

func (SecurityGroupRuleOutput) ElementType() reflect.Type

func (SecurityGroupRuleOutput) ToSecurityGroupRuleOutput added in v2.25.1

func (o SecurityGroupRuleOutput) ToSecurityGroupRuleOutput() SecurityGroupRuleOutput

func (SecurityGroupRuleOutput) ToSecurityGroupRuleOutputWithContext added in v2.25.1

func (o SecurityGroupRuleOutput) ToSecurityGroupRuleOutputWithContext(ctx context.Context) SecurityGroupRuleOutput

func (SecurityGroupRuleOutput) ToSecurityGroupRulePtrOutput added in v2.35.1

func (o SecurityGroupRuleOutput) ToSecurityGroupRulePtrOutput() SecurityGroupRulePtrOutput

func (SecurityGroupRuleOutput) ToSecurityGroupRulePtrOutputWithContext added in v2.35.1

func (o SecurityGroupRuleOutput) ToSecurityGroupRulePtrOutputWithContext(ctx context.Context) SecurityGroupRulePtrOutput

type SecurityGroupRulePtrInput added in v2.35.1

type SecurityGroupRulePtrInput interface {
	pulumi.Input

	ToSecurityGroupRulePtrOutput() SecurityGroupRulePtrOutput
	ToSecurityGroupRulePtrOutputWithContext(ctx context.Context) SecurityGroupRulePtrOutput
}

type SecurityGroupRulePtrOutput added in v2.35.1

type SecurityGroupRulePtrOutput struct {
	*pulumi.OutputState
}

func (SecurityGroupRulePtrOutput) ElementType added in v2.35.1

func (SecurityGroupRulePtrOutput) ElementType() reflect.Type

func (SecurityGroupRulePtrOutput) ToSecurityGroupRulePtrOutput added in v2.35.1

func (o SecurityGroupRulePtrOutput) ToSecurityGroupRulePtrOutput() SecurityGroupRulePtrOutput

func (SecurityGroupRulePtrOutput) ToSecurityGroupRulePtrOutputWithContext added in v2.35.1

func (o SecurityGroupRulePtrOutput) ToSecurityGroupRulePtrOutputWithContext(ctx context.Context) SecurityGroupRulePtrOutput

type SecurityGroupRuleState

type SecurityGroupRuleState struct {
	// The target IP address range. The default value is 0.0.0.0/0 (which means no restriction will be applied). Other supported formats include 10.159.6.18/12. Only IPv4 is supported.
	CidrIp pulumi.StringPtrInput
	// The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.
	Description pulumi.StringPtrInput
	// The protocol. Can be `tcp`, `udp`, `icmp`, `gre` or `all`.
	IpProtocol pulumi.StringPtrInput
	// Network type, can be either `internet` or `intranet`, the default value is `internet`.
	NicType pulumi.StringPtrInput
	// Authorization policy, can be either `accept` or `drop`, the default value is `accept`.
	Policy pulumi.StringPtrInput
	// The range of port numbers relevant to the IP protocol. Default to "-1/-1". When the protocol is tcp or udp, each side port number range from 1 to 65535 and '-1/-1' will be invalid.
	// For example, `1/200` means that the range of the port numbers is 1-200. Other protocols' 'port_range' can only be "-1/-1", and other values will be invalid.
	PortRange pulumi.StringPtrInput
	// Authorization policy priority, with parameter values: `1-100`, default value: 1.
	Priority pulumi.IntPtrInput
	// The security group to apply this rule to.
	SecurityGroupId pulumi.StringPtrInput
	// The Alibaba Cloud user account Id of the target security group when security groups are authorized across accounts.  This parameter is invalid if `cidrIp` has already been set.
	SourceGroupOwnerAccount pulumi.StringPtrInput
	// The target security group ID within the same region. If this field is specified, the `nicType` can only select `intranet`.
	SourceSecurityGroupId pulumi.StringPtrInput
	// The type of rule being created. Valid options are `ingress` (inbound) or `egress` (outbound).
	Type pulumi.StringPtrInput
}

func (SecurityGroupRuleState) ElementType

func (SecurityGroupRuleState) ElementType() reflect.Type

type SecurityGroupState

type SecurityGroupState struct {
	// The security group description. Defaults to null.
	Description pulumi.StringPtrInput
	// Field 'inner_access' has been deprecated from provider version 1.55.3. Use 'inner_access_policy' replaces it.
	//
	// Deprecated: Field 'inner_access' has been deprecated from provider version 1.55.3. Use 'inner_access_policy' replaces it.
	InnerAccess pulumi.BoolPtrInput
	// Whether to allow both machines to access each other on all ports in the same security group. Valid values: ["Accept", "Drop"]
	InnerAccessPolicy pulumi.StringPtrInput
	// The name of the security group. Defaults to null.
	Name pulumi.StringPtrInput
	// The Id of resource group which the securityGroup belongs.
	ResourceGroupId pulumi.StringPtrInput
	// The type of the security group. Valid values:
	// `normal`: basic security group.
	// `enterprise`: advanced security group For more information.
	SecurityGroupType pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// The VPC ID.
	VpcId pulumi.StringPtrInput
}

func (SecurityGroupState) ElementType

func (SecurityGroupState) ElementType() reflect.Type

type Snapshot

type Snapshot struct {
	pulumi.CustomResourceState

	// Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The source disk ID.
	DiskId pulumi.StringOutput `pulumi:"diskId"`
	// The name of the snapshot to be created. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
	// It cannot start with auto, because snapshot names starting with auto are recognized as automatic snapshots.
	Name pulumi.StringOutput `pulumi:"name"`
	// The ID of the resource group.
	ResourceGroupId pulumi.StringPtrOutput `pulumi:"resourceGroupId"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
}

Provides an ECS snapshot resource.

For information about snapshot and how to use it, see Snapshot(https://www.alibabacloud.com/help/doc-detail/25460.html).

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewSnapshot(ctx, "snapshot", &ecs.SnapshotArgs{
			DiskId:      pulumi.Any(alicloud_disk_attachment.Instance - attachment.Disk_id),
			Description: pulumi.String("this snapshot is created for testing"),
			Tags: pulumi.StringMap{
				"version": pulumi.String("1.2"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Snapshot can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/snapshot:Snapshot snapshot s-abc1234567890000

```

func GetSnapshot

func GetSnapshot(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SnapshotState, opts ...pulumi.ResourceOption) (*Snapshot, error)

GetSnapshot gets an existing Snapshot 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 NewSnapshot

func NewSnapshot(ctx *pulumi.Context,
	name string, args *SnapshotArgs, opts ...pulumi.ResourceOption) (*Snapshot, error)

NewSnapshot registers a new resource with the given unique name, arguments, and options.

func (*Snapshot) ElementType added in v2.25.1

func (*Snapshot) ElementType() reflect.Type

func (*Snapshot) ToSnapshotOutput added in v2.25.1

func (i *Snapshot) ToSnapshotOutput() SnapshotOutput

func (*Snapshot) ToSnapshotOutputWithContext added in v2.25.1

func (i *Snapshot) ToSnapshotOutputWithContext(ctx context.Context) SnapshotOutput

func (*Snapshot) ToSnapshotPtrOutput added in v2.35.1

func (i *Snapshot) ToSnapshotPtrOutput() SnapshotPtrOutput

func (*Snapshot) ToSnapshotPtrOutputWithContext added in v2.35.1

func (i *Snapshot) ToSnapshotPtrOutputWithContext(ctx context.Context) SnapshotPtrOutput

type SnapshotArgs

type SnapshotArgs struct {
	// Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
	Description pulumi.StringPtrInput
	// The source disk ID.
	DiskId pulumi.StringInput
	// The name of the snapshot to be created. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
	// It cannot start with auto, because snapshot names starting with auto are recognized as automatic snapshots.
	Name pulumi.StringPtrInput
	// The ID of the resource group.
	ResourceGroupId pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
}

The set of arguments for constructing a Snapshot resource.

func (SnapshotArgs) ElementType

func (SnapshotArgs) ElementType() reflect.Type

type SnapshotArray added in v2.35.1

type SnapshotArray []SnapshotInput

func (SnapshotArray) ElementType added in v2.35.1

func (SnapshotArray) ElementType() reflect.Type

func (SnapshotArray) ToSnapshotArrayOutput added in v2.35.1

func (i SnapshotArray) ToSnapshotArrayOutput() SnapshotArrayOutput

func (SnapshotArray) ToSnapshotArrayOutputWithContext added in v2.35.1

func (i SnapshotArray) ToSnapshotArrayOutputWithContext(ctx context.Context) SnapshotArrayOutput

type SnapshotArrayInput added in v2.35.1

type SnapshotArrayInput interface {
	pulumi.Input

	ToSnapshotArrayOutput() SnapshotArrayOutput
	ToSnapshotArrayOutputWithContext(context.Context) SnapshotArrayOutput
}

SnapshotArrayInput is an input type that accepts SnapshotArray and SnapshotArrayOutput values. You can construct a concrete instance of `SnapshotArrayInput` via:

SnapshotArray{ SnapshotArgs{...} }

type SnapshotArrayOutput added in v2.35.1

type SnapshotArrayOutput struct{ *pulumi.OutputState }

func (SnapshotArrayOutput) ElementType added in v2.35.1

func (SnapshotArrayOutput) ElementType() reflect.Type

func (SnapshotArrayOutput) Index added in v2.35.1

func (SnapshotArrayOutput) ToSnapshotArrayOutput added in v2.35.1

func (o SnapshotArrayOutput) ToSnapshotArrayOutput() SnapshotArrayOutput

func (SnapshotArrayOutput) ToSnapshotArrayOutputWithContext added in v2.35.1

func (o SnapshotArrayOutput) ToSnapshotArrayOutputWithContext(ctx context.Context) SnapshotArrayOutput

type SnapshotInput added in v2.25.1

type SnapshotInput interface {
	pulumi.Input

	ToSnapshotOutput() SnapshotOutput
	ToSnapshotOutputWithContext(ctx context.Context) SnapshotOutput
}

type SnapshotMap added in v2.35.1

type SnapshotMap map[string]SnapshotInput

func (SnapshotMap) ElementType added in v2.35.1

func (SnapshotMap) ElementType() reflect.Type

func (SnapshotMap) ToSnapshotMapOutput added in v2.35.1

func (i SnapshotMap) ToSnapshotMapOutput() SnapshotMapOutput

func (SnapshotMap) ToSnapshotMapOutputWithContext added in v2.35.1

func (i SnapshotMap) ToSnapshotMapOutputWithContext(ctx context.Context) SnapshotMapOutput

type SnapshotMapInput added in v2.35.1

type SnapshotMapInput interface {
	pulumi.Input

	ToSnapshotMapOutput() SnapshotMapOutput
	ToSnapshotMapOutputWithContext(context.Context) SnapshotMapOutput
}

SnapshotMapInput is an input type that accepts SnapshotMap and SnapshotMapOutput values. You can construct a concrete instance of `SnapshotMapInput` via:

SnapshotMap{ "key": SnapshotArgs{...} }

type SnapshotMapOutput added in v2.35.1

type SnapshotMapOutput struct{ *pulumi.OutputState }

func (SnapshotMapOutput) ElementType added in v2.35.1

func (SnapshotMapOutput) ElementType() reflect.Type

func (SnapshotMapOutput) MapIndex added in v2.35.1

func (SnapshotMapOutput) ToSnapshotMapOutput added in v2.35.1

func (o SnapshotMapOutput) ToSnapshotMapOutput() SnapshotMapOutput

func (SnapshotMapOutput) ToSnapshotMapOutputWithContext added in v2.35.1

func (o SnapshotMapOutput) ToSnapshotMapOutputWithContext(ctx context.Context) SnapshotMapOutput

type SnapshotOutput added in v2.25.1

type SnapshotOutput struct {
	*pulumi.OutputState
}

func (SnapshotOutput) ElementType added in v2.25.1

func (SnapshotOutput) ElementType() reflect.Type

func (SnapshotOutput) ToSnapshotOutput added in v2.25.1

func (o SnapshotOutput) ToSnapshotOutput() SnapshotOutput

func (SnapshotOutput) ToSnapshotOutputWithContext added in v2.25.1

func (o SnapshotOutput) ToSnapshotOutputWithContext(ctx context.Context) SnapshotOutput

func (SnapshotOutput) ToSnapshotPtrOutput added in v2.35.1

func (o SnapshotOutput) ToSnapshotPtrOutput() SnapshotPtrOutput

func (SnapshotOutput) ToSnapshotPtrOutputWithContext added in v2.35.1

func (o SnapshotOutput) ToSnapshotPtrOutputWithContext(ctx context.Context) SnapshotPtrOutput

type SnapshotPolicy

type SnapshotPolicy struct {
	pulumi.CustomResourceState

	// The snapshot policy name.
	Name pulumi.StringOutput `pulumi:"name"`
	// The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1  indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.
	// - A maximum of seven time points can be selected.
	// - The format is  an JSON array of ["1", "2", … "7"]  and the time points are separated by commas (,).
	RepeatWeekdays pulumi.StringArrayOutput `pulumi:"repeatWeekdays"`
	// The snapshot retention time, and the unit of measurement is day. Optional values:
	// - -1: The automatic snapshots are retained permanently.
	// - [1, 65536]: The number of days retained.
	RetentionDays pulumi.IntOutput `pulumi:"retentionDays"`
	// The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00,  for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.
	// - A maximum of 24 time points can be selected.
	// - The format is  an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
	TimePoints pulumi.StringArrayOutput `pulumi:"timePoints"`
}

Provides an ECS snapshot policy resource.

For information about snapshot policy and how to use it, see Snapshot(https://www.alibabacloud.com/help/doc-detail/25460.html).

> **NOTE:** Available in 1.42.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecs.NewSnapshotPolicy(ctx, "sp", &ecs.SnapshotPolicyArgs{
			RepeatWeekdays: pulumi.StringArray{
				pulumi.String("1"),
				pulumi.String("2"),
				pulumi.String("3"),
			},
			RetentionDays: pulumi.Int(-1),
			TimePoints: pulumi.StringArray{
				pulumi.String("1"),
				pulumi.String("22"),
				pulumi.String("23"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Snapshot can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ecs/snapshotPolicy:SnapshotPolicy snapshot sp-abc1234567890000

```

func GetSnapshotPolicy

func GetSnapshotPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SnapshotPolicyState, opts ...pulumi.ResourceOption) (*SnapshotPolicy, error)

GetSnapshotPolicy gets an existing SnapshotPolicy 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 NewSnapshotPolicy

func NewSnapshotPolicy(ctx *pulumi.Context,
	name string, args *SnapshotPolicyArgs, opts ...pulumi.ResourceOption) (*SnapshotPolicy, error)

NewSnapshotPolicy registers a new resource with the given unique name, arguments, and options.

func (*SnapshotPolicy) ElementType added in v2.25.1

func (*SnapshotPolicy) ElementType() reflect.Type

func (*SnapshotPolicy) ToSnapshotPolicyOutput added in v2.25.1

func (i *SnapshotPolicy) ToSnapshotPolicyOutput() SnapshotPolicyOutput

func (*SnapshotPolicy) ToSnapshotPolicyOutputWithContext added in v2.25.1

func (i *SnapshotPolicy) ToSnapshotPolicyOutputWithContext(ctx context.Context) SnapshotPolicyOutput

func (*SnapshotPolicy) ToSnapshotPolicyPtrOutput added in v2.35.1

func (i *SnapshotPolicy) ToSnapshotPolicyPtrOutput() SnapshotPolicyPtrOutput

func (*SnapshotPolicy) ToSnapshotPolicyPtrOutputWithContext added in v2.35.1

func (i *SnapshotPolicy) ToSnapshotPolicyPtrOutputWithContext(ctx context.Context) SnapshotPolicyPtrOutput

type SnapshotPolicyArgs

type SnapshotPolicyArgs struct {
	// The snapshot policy name.
	Name pulumi.StringPtrInput
	// The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1  indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.
	// - A maximum of seven time points can be selected.
	// - The format is  an JSON array of ["1", "2", … "7"]  and the time points are separated by commas (,).
	RepeatWeekdays pulumi.StringArrayInput
	// The snapshot retention time, and the unit of measurement is day. Optional values:
	// - -1: The automatic snapshots are retained permanently.
	// - [1, 65536]: The number of days retained.
	RetentionDays pulumi.IntInput
	// The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00,  for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.
	// - A maximum of 24 time points can be selected.
	// - The format is  an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
	TimePoints pulumi.StringArrayInput
}

The set of arguments for constructing a SnapshotPolicy resource.

func (SnapshotPolicyArgs) ElementType

func (SnapshotPolicyArgs) ElementType() reflect.Type

type SnapshotPolicyArray added in v2.35.1

type SnapshotPolicyArray []SnapshotPolicyInput

func (SnapshotPolicyArray) ElementType added in v2.35.1

func (SnapshotPolicyArray) ElementType() reflect.Type

func (SnapshotPolicyArray) ToSnapshotPolicyArrayOutput added in v2.35.1

func (i SnapshotPolicyArray) ToSnapshotPolicyArrayOutput() SnapshotPolicyArrayOutput

func (SnapshotPolicyArray) ToSnapshotPolicyArrayOutputWithContext added in v2.35.1

func (i SnapshotPolicyArray) ToSnapshotPolicyArrayOutputWithContext(ctx context.Context) SnapshotPolicyArrayOutput

type SnapshotPolicyArrayInput added in v2.35.1

type SnapshotPolicyArrayInput interface {
	pulumi.Input

	ToSnapshotPolicyArrayOutput() SnapshotPolicyArrayOutput
	ToSnapshotPolicyArrayOutputWithContext(context.Context) SnapshotPolicyArrayOutput
}

SnapshotPolicyArrayInput is an input type that accepts SnapshotPolicyArray and SnapshotPolicyArrayOutput values. You can construct a concrete instance of `SnapshotPolicyArrayInput` via:

SnapshotPolicyArray{ SnapshotPolicyArgs{...} }

type SnapshotPolicyArrayOutput added in v2.35.1

type SnapshotPolicyArrayOutput struct{ *pulumi.OutputState }

func (SnapshotPolicyArrayOutput) ElementType added in v2.35.1

func (SnapshotPolicyArrayOutput) ElementType() reflect.Type

func (SnapshotPolicyArrayOutput) Index added in v2.35.1

func (SnapshotPolicyArrayOutput) ToSnapshotPolicyArrayOutput added in v2.35.1

func (o SnapshotPolicyArrayOutput) ToSnapshotPolicyArrayOutput() SnapshotPolicyArrayOutput

func (SnapshotPolicyArrayOutput) ToSnapshotPolicyArrayOutputWithContext added in v2.35.1

func (o SnapshotPolicyArrayOutput) ToSnapshotPolicyArrayOutputWithContext(ctx context.Context) SnapshotPolicyArrayOutput

type SnapshotPolicyInput added in v2.25.1

type SnapshotPolicyInput interface {
	pulumi.Input

	ToSnapshotPolicyOutput() SnapshotPolicyOutput
	ToSnapshotPolicyOutputWithContext(ctx context.Context) SnapshotPolicyOutput
}

type SnapshotPolicyMap added in v2.35.1

type SnapshotPolicyMap map[string]SnapshotPolicyInput

func (SnapshotPolicyMap) ElementType added in v2.35.1

func (SnapshotPolicyMap) ElementType() reflect.Type

func (SnapshotPolicyMap) ToSnapshotPolicyMapOutput added in v2.35.1

func (i SnapshotPolicyMap) ToSnapshotPolicyMapOutput() SnapshotPolicyMapOutput

func (SnapshotPolicyMap) ToSnapshotPolicyMapOutputWithContext added in v2.35.1

func (i SnapshotPolicyMap) ToSnapshotPolicyMapOutputWithContext(ctx context.Context) SnapshotPolicyMapOutput

type SnapshotPolicyMapInput added in v2.35.1

type SnapshotPolicyMapInput interface {
	pulumi.Input

	ToSnapshotPolicyMapOutput() SnapshotPolicyMapOutput
	ToSnapshotPolicyMapOutputWithContext(context.Context) SnapshotPolicyMapOutput
}

SnapshotPolicyMapInput is an input type that accepts SnapshotPolicyMap and SnapshotPolicyMapOutput values. You can construct a concrete instance of `SnapshotPolicyMapInput` via:

SnapshotPolicyMap{ "key": SnapshotPolicyArgs{...} }

type SnapshotPolicyMapOutput added in v2.35.1

type SnapshotPolicyMapOutput struct{ *pulumi.OutputState }

func (SnapshotPolicyMapOutput) ElementType added in v2.35.1

func (SnapshotPolicyMapOutput) ElementType() reflect.Type

func (SnapshotPolicyMapOutput) MapIndex added in v2.35.1

func (SnapshotPolicyMapOutput) ToSnapshotPolicyMapOutput added in v2.35.1

func (o SnapshotPolicyMapOutput) ToSnapshotPolicyMapOutput() SnapshotPolicyMapOutput

func (SnapshotPolicyMapOutput) ToSnapshotPolicyMapOutputWithContext added in v2.35.1

func (o SnapshotPolicyMapOutput) ToSnapshotPolicyMapOutputWithContext(ctx context.Context) SnapshotPolicyMapOutput

type SnapshotPolicyOutput added in v2.25.1

type SnapshotPolicyOutput struct {
	*pulumi.OutputState
}

func (SnapshotPolicyOutput) ElementType added in v2.25.1

func (SnapshotPolicyOutput) ElementType() reflect.Type

func (SnapshotPolicyOutput) ToSnapshotPolicyOutput added in v2.25.1

func (o SnapshotPolicyOutput) ToSnapshotPolicyOutput() SnapshotPolicyOutput

func (SnapshotPolicyOutput) ToSnapshotPolicyOutputWithContext added in v2.25.1

func (o SnapshotPolicyOutput) ToSnapshotPolicyOutputWithContext(ctx context.Context) SnapshotPolicyOutput

func (SnapshotPolicyOutput) ToSnapshotPolicyPtrOutput added in v2.35.1

func (o SnapshotPolicyOutput) ToSnapshotPolicyPtrOutput() SnapshotPolicyPtrOutput

func (SnapshotPolicyOutput) ToSnapshotPolicyPtrOutputWithContext added in v2.35.1

func (o SnapshotPolicyOutput) ToSnapshotPolicyPtrOutputWithContext(ctx context.Context) SnapshotPolicyPtrOutput

type SnapshotPolicyPtrInput added in v2.35.1

type SnapshotPolicyPtrInput interface {
	pulumi.Input

	ToSnapshotPolicyPtrOutput() SnapshotPolicyPtrOutput
	ToSnapshotPolicyPtrOutputWithContext(ctx context.Context) SnapshotPolicyPtrOutput
}

type SnapshotPolicyPtrOutput added in v2.35.1

type SnapshotPolicyPtrOutput struct {
	*pulumi.OutputState
}

func (SnapshotPolicyPtrOutput) ElementType added in v2.35.1

func (SnapshotPolicyPtrOutput) ElementType() reflect.Type

func (SnapshotPolicyPtrOutput) ToSnapshotPolicyPtrOutput added in v2.35.1

func (o SnapshotPolicyPtrOutput) ToSnapshotPolicyPtrOutput() SnapshotPolicyPtrOutput

func (SnapshotPolicyPtrOutput) ToSnapshotPolicyPtrOutputWithContext added in v2.35.1

func (o SnapshotPolicyPtrOutput) ToSnapshotPolicyPtrOutputWithContext(ctx context.Context) SnapshotPolicyPtrOutput

type SnapshotPolicyState

type SnapshotPolicyState struct {
	// The snapshot policy name.
	Name pulumi.StringPtrInput
	// The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1  indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.
	// - A maximum of seven time points can be selected.
	// - The format is  an JSON array of ["1", "2", … "7"]  and the time points are separated by commas (,).
	RepeatWeekdays pulumi.StringArrayInput
	// The snapshot retention time, and the unit of measurement is day. Optional values:
	// - -1: The automatic snapshots are retained permanently.
	// - [1, 65536]: The number of days retained.
	RetentionDays pulumi.IntPtrInput
	// The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00,  for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.
	// - A maximum of 24 time points can be selected.
	// - The format is  an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
	TimePoints pulumi.StringArrayInput
}

func (SnapshotPolicyState) ElementType

func (SnapshotPolicyState) ElementType() reflect.Type

type SnapshotPtrInput added in v2.35.1

type SnapshotPtrInput interface {
	pulumi.Input

	ToSnapshotPtrOutput() SnapshotPtrOutput
	ToSnapshotPtrOutputWithContext(ctx context.Context) SnapshotPtrOutput
}

type SnapshotPtrOutput added in v2.35.1

type SnapshotPtrOutput struct {
	*pulumi.OutputState
}

func (SnapshotPtrOutput) ElementType added in v2.35.1

func (SnapshotPtrOutput) ElementType() reflect.Type

func (SnapshotPtrOutput) ToSnapshotPtrOutput added in v2.35.1

func (o SnapshotPtrOutput) ToSnapshotPtrOutput() SnapshotPtrOutput

func (SnapshotPtrOutput) ToSnapshotPtrOutputWithContext added in v2.35.1

func (o SnapshotPtrOutput) ToSnapshotPtrOutputWithContext(ctx context.Context) SnapshotPtrOutput

type SnapshotState

type SnapshotState struct {
	// Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
	Description pulumi.StringPtrInput
	// The source disk ID.
	DiskId pulumi.StringPtrInput
	// The name of the snapshot to be created. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
	// It cannot start with auto, because snapshot names starting with auto are recognized as automatic snapshots.
	Name pulumi.StringPtrInput
	// The ID of the resource group.
	ResourceGroupId pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
}

func (SnapshotState) ElementType

func (SnapshotState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL