1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ecs
  5. Activation
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

alicloud.ecs.Activation

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

    Provides a ECS Activation resource.

    For information about ECS Activation and how to use it, see What is Activation.

    NOTE: Available in v1.177.0+.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AliCloud.Ecs.Activation("example", new()
        {
            Description = "terraform-example",
            InstanceCount = 10,
            InstanceName = "terraform-example",
            IpAddressRange = "0.0.0.0/0",
            TimeToLiveInHours = 4,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewActivation(ctx, "example", &ecs.ActivationArgs{
    			Description:       pulumi.String("terraform-example"),
    			InstanceCount:     pulumi.Int(10),
    			InstanceName:      pulumi.String("terraform-example"),
    			IpAddressRange:    pulumi.String("0.0.0.0/0"),
    			TimeToLiveInHours: pulumi.Int(4),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ecs.Activation;
    import com.pulumi.alicloud.ecs.ActivationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Activation("example", ActivationArgs.builder()        
                .description("terraform-example")
                .instanceCount(10)
                .instanceName("terraform-example")
                .ipAddressRange("0.0.0.0/0")
                .timeToLiveInHours(4)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.ecs.Activation("example",
        description="terraform-example",
        instance_count=10,
        instance_name="terraform-example",
        ip_address_range="0.0.0.0/0",
        time_to_live_in_hours=4)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = new alicloud.ecs.Activation("example", {
        description: "terraform-example",
        instanceCount: 10,
        instanceName: "terraform-example",
        ipAddressRange: "0.0.0.0/0",
        timeToLiveInHours: 4,
    });
    
    resources:
      example:
        type: alicloud:ecs:Activation
        properties:
          description: terraform-example
          instanceCount: 10
          instanceName: terraform-example
          ipAddressRange: 0.0.0.0/0
          timeToLiveInHours: 4
    

    Create Activation Resource

    new Activation(name: string, args?: ActivationArgs, opts?: CustomResourceOptions);
    @overload
    def Activation(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   description: Optional[str] = None,
                   instance_count: Optional[int] = None,
                   instance_name: Optional[str] = None,
                   ip_address_range: Optional[str] = None,
                   time_to_live_in_hours: Optional[int] = None)
    @overload
    def Activation(resource_name: str,
                   args: Optional[ActivationArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    func NewActivation(ctx *Context, name string, args *ActivationArgs, opts ...ResourceOption) (*Activation, error)
    public Activation(string name, ActivationArgs? args = null, CustomResourceOptions? opts = null)
    public Activation(String name, ActivationArgs args)
    public Activation(String name, ActivationArgs args, CustomResourceOptions options)
    
    type: alicloud:ecs:Activation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ActivationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ActivationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ActivationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ActivationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ActivationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Activation Resource Properties

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

    Inputs

    The Activation resource accepts the following input properties:

    Description string

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    InstanceCount int

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    InstanceName string

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    IpAddressRange string

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    TimeToLiveInHours int

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    Description string

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    InstanceCount int

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    InstanceName string

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    IpAddressRange string

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    TimeToLiveInHours int

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    description String

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    instanceCount Integer

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    instanceName String

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    ipAddressRange String

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    timeToLiveInHours Integer

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    description string

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    instanceCount number

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    instanceName string

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    ipAddressRange string

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    timeToLiveInHours number

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    description str

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    instance_count int

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    instance_name str

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    ip_address_range str

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    time_to_live_in_hours int

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    description String

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    instanceCount Number

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    instanceName String

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    ipAddressRange String

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    timeToLiveInHours Number

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing Activation Resource

    Get an existing Activation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ActivationState, opts?: CustomResourceOptions): Activation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            instance_count: Optional[int] = None,
            instance_name: Optional[str] = None,
            ip_address_range: Optional[str] = None,
            time_to_live_in_hours: Optional[int] = None) -> Activation
    func GetActivation(ctx *Context, name string, id IDInput, state *ActivationState, opts ...ResourceOption) (*Activation, error)
    public static Activation Get(string name, Input<string> id, ActivationState? state, CustomResourceOptions? opts = null)
    public static Activation get(String name, Output<String> id, ActivationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    InstanceCount int

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    InstanceName string

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    IpAddressRange string

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    TimeToLiveInHours int

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    Description string

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    InstanceCount int

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    InstanceName string

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    IpAddressRange string

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    TimeToLiveInHours int

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    description String

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    instanceCount Integer

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    instanceName String

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    ipAddressRange String

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    timeToLiveInHours Integer

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    description string

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    instanceCount number

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    instanceName string

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    ipAddressRange string

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    timeToLiveInHours number

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    description str

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    instance_count int

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    instance_name str

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    ip_address_range str

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    time_to_live_in_hours int

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    description String

    The description of the activation code. The description can be 1 to 100 characters in length and cannot start with http:// or https://.

    instanceCount Number

    The maximum number of times that the activation code can be used to register managed instances. Valid values: 1 to 1000. Default value: 10.

    instanceName String

    The default instance name prefix. The instance name prefix must be 1 to 50 characters in length. It must start with a letter and cannot start with http:// or https://. The instance name prefix can contain only letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).

    • If you use the activation code created by the CreateActivation operation to register managed instances, the instances are assigned sequential names that are prefixed by the value of this parameter. You can also specify a new instance name to override the assigned sequential name when you register a managed instance.
    • If you specify InstanceName when you register a managed instance, an instance name in the format of <InstanceName>-<Number> is generated. The number of digits in the value is determined by that in the InstanceCount value. Example: 001. If you do not specify InstanceName, the hostname (Hostname) is used as the instance name.
    ipAddressRange String

    The IP addresses of hosts that are allowed to use the activation code. The value can be IPv4 addresses, IPv6 addresses, or CIDR blocks.

    timeToLiveInHours Number

    The validity period of the activation code. The activation code cannot be used to register new instances after the validity period expires. Unit: hours. Valid values: 1 to 24. Default value: 4.

    Import

    ECS Activation can be imported using the id, e.g.

     $ pulumi import alicloud:ecs/activation:Activation example <id>
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi