alicloud.ecs.Activation
Explore with Pulumi AI
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
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,
});
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)
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
})
}
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 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());
}
}
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Activation(name: string, args?: ActivationArgs, opts?: CustomResourceOptions);
@overload
def Activation(resource_name: str,
args: Optional[ActivationArgs] = None,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var activationResource = new AliCloud.Ecs.Activation("activationResource", new()
{
Description = "string",
InstanceCount = 0,
InstanceName = "string",
IpAddressRange = "string",
TimeToLiveInHours = 0,
});
example, err := ecs.NewActivation(ctx, "activationResource", &ecs.ActivationArgs{
Description: pulumi.String("string"),
InstanceCount: pulumi.Int(0),
InstanceName: pulumi.String("string"),
IpAddressRange: pulumi.String("string"),
TimeToLiveInHours: pulumi.Int(0),
})
var activationResource = new Activation("activationResource", ActivationArgs.builder()
.description("string")
.instanceCount(0)
.instanceName("string")
.ipAddressRange("string")
.timeToLiveInHours(0)
.build());
activation_resource = alicloud.ecs.Activation("activationResource",
description="string",
instance_count=0,
instance_name="string",
ip_address_range="string",
time_to_live_in_hours=0)
const activationResource = new alicloud.ecs.Activation("activationResource", {
description: "string",
instanceCount: 0,
instanceName: "string",
ipAddressRange: "string",
timeToLiveInHours: 0,
});
type: alicloud:ecs:Activation
properties:
description: string
instanceCount: 0
instanceName: string
ipAddressRange: string
timeToLiveInHours: 0
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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://
orhttps://
. - Instance
Count int - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - Instance
Name 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://
orhttps://
. 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 stringRange - 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 intLive In Hours - 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
to24
. 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://
orhttps://
. - Instance
Count int - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - Instance
Name 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://
orhttps://
. 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 stringRange - 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 intLive In Hours - 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
to24
. 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://
orhttps://
. - instance
Count Integer - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - instance
Name 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://
orhttps://
. 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 StringRange - 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 IntegerLive In Hours - 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
to24
. 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://
orhttps://
. - instance
Count number - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - instance
Name 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://
orhttps://
. 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 stringRange - 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 numberLive In Hours - 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
to24
. 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://
orhttps://
. - instance_
count int - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. 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://
orhttps://
. 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_ strrange - 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_ intlive_ in_ hours - 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
to24
. 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://
orhttps://
. - instance
Count Number - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - instance
Name 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://
orhttps://
. 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 StringRange - 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 NumberLive In Hours - 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
to24
. 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.
- Description string
- The description of the activation code. The description can be 1 to 100 characters in length and cannot start with
http://
orhttps://
. - Instance
Count int - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - Instance
Name 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://
orhttps://
. 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 stringRange - 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 intLive In Hours - 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
to24
. 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://
orhttps://
. - Instance
Count int - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - Instance
Name 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://
orhttps://
. 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 stringRange - 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 intLive In Hours - 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
to24
. 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://
orhttps://
. - instance
Count Integer - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - instance
Name 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://
orhttps://
. 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 StringRange - 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 IntegerLive In Hours - 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
to24
. 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://
orhttps://
. - instance
Count number - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - instance
Name 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://
orhttps://
. 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 stringRange - 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 numberLive In Hours - 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
to24
. 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://
orhttps://
. - instance_
count int - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. 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://
orhttps://
. 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_ strrange - 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_ intlive_ in_ hours - 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
to24
. 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://
orhttps://
. - instance
Count Number - The maximum number of times that the activation code can be used to register managed instances. Valid values:
1
to1000
. Default value:10
. - instance
Name 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://
orhttps://
. 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 StringRange - 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 NumberLive In Hours - 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
to24
. Default value:4
.
Import
ECS Activation can be imported using the id, e.g.
$ pulumi import alicloud:ecs/activation:Activation example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.