Class Beanstalk
Provides a Spotinst AWS group resource using Elastic Beanstalk.
Example Usage
using Pulumi;
using SpotInst = Pulumi.SpotInst;
class MyStack : Stack
{
public MyStack()
{
var elastigoup_aws_beanstalk = new SpotInst.Aws.Beanstalk("elastigoup-aws-beanstalk", new SpotInst.Aws.BeanstalkArgs
{
BeanstalkEnvironmentId = "e-example",
BeanstalkEnvironmentName = "example-env",
DeploymentPreferences = new SpotInst.Aws.Inputs.BeanstalkDeploymentPreferencesArgs
{
AutomaticRoll = true,
BatchSizePercentage = 100,
GracePeriod = 90,
Strategy =
{
{
{ "action", "REPLACE_SERVER" },
{ "shouldDrainInstances", true },
},
},
},
DesiredCapacity = 0,
InstanceTypesSpots =
{
"t2.micro",
"t2.medium",
"t2.large",
},
ManagedActions = new SpotInst.Aws.Inputs.BeanstalkManagedActionsArgs
{
PlatformUpdate = new SpotInst.Aws.Inputs.BeanstalkManagedActionsPlatformUpdateArgs
{
PerformAt = "timeWindow",
TimeWindow = "Mon:23:50-Tue:00:20",
UpdateLevel = "minorAndPatch",
},
},
MaxSize = 1,
MinSize = 0,
Product = "Linux/UNIX",
Region = "us-west-2",
});
}
}
Scheduled Tasks
Each scheduled_task supports the following:
task_type- (Required) The task type to run. Supported task types are:"scale","backup_ami","roll","scaleUp","percentageScaleUp","scaleDown","percentageScaleDown","statefulUpdateCapacity".cron_expression- (Optional; Required if not usingfrequency) A valid cron expression. The cron is running in UTC time zone and is in Unix cron format.start_time- (Optional; Format: ISO 8601) Set a start time for one time tasks.frequency- (Optional; Required if not usingcron_expression) The recurrence frequency to run this task. Supported values are"hourly","daily","weekly"and"continuous".scale_target_capacity- (Optional) The desired number of instances the group should have.scale_min_capacity- (Optional) The minimum number of instances the group should have.scale_max_capacity- (Optional) The maximum number of instances the group should have.is_enabled- (Optional, Default:true) Setting the task to being enabled or disabled.target_capacity- (Optional; Only valid for statefulUpdateCapacity) The desired number of instances the group should have.min_capacity- (Optional; Only valid for statefulUpdateCapacity) The minimum number of instances the group should have.max_capacity- (Optional; Only valid for statefulUpdateCapacity) The maximum number of instances the group should have.batch_size_percentage- (Optional; Required when thetask_typeis"roll".) The percentage size of each batch in the scheduled deployment roll.grace_period- (Optional) The period of time (seconds) to wait before checking a batch's health after it's deployment.adjustment- (Optional; Min 1) The number of instances to add or remove.adjustment_percentage- (Optional; Min 1) The percentage of instances to add or remove.
Usage:
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
Inherited Members
Namespace: Pulumi.SpotInst.Aws
Assembly: Pulumi.SpotInst.dll
Syntax
public class Beanstalk : CustomResource
Constructors
View SourceBeanstalk(String, BeanstalkArgs, CustomResourceOptions)
Create a Beanstalk resource with the given unique name, arguments, and options.
Declaration
public Beanstalk(string name, BeanstalkArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| BeanstalkArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBeanstalkEnvironmentId
The id of an existing Beanstalk environment.
Declaration
public Output<string> BeanstalkEnvironmentId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
BeanstalkEnvironmentName
The name of an existing Beanstalk environment.
Declaration
public Output<string> BeanstalkEnvironmentName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeploymentPreferences
Preferences when performing a roll
Declaration
public Output<BeanstalkDeploymentPreferences> DeploymentPreferences { get; }
Property Value
| Type | Description |
|---|---|
| Output<BeanstalkDeploymentPreferences> |
DesiredCapacity
The desired number of instances the group should have at any time.
Declaration
public Output<int> DesiredCapacity { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
InstanceTypesSpots
One or more instance types. To maximize the availability of Spot instances, select as many instance types as possible.
Declaration
public Output<ImmutableArray<string>> InstanceTypesSpots { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Maintenance
Declaration
public Output<string> Maintenance { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ManagedActions
Managed Actions parameters
Declaration
public Output<BeanstalkManagedActions> ManagedActions { get; }
Property Value
| Type | Description |
|---|---|
| Output<BeanstalkManagedActions> |
MaxSize
The maximum number of instances the group should have at any time.
Declaration
public Output<int> MaxSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
MinSize
The minimum number of instances the group should have at any time.
Declaration
public Output<int> MinSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
The group name.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Product
Operation system type. Valid values: "Linux/UNIX", "SUSE Linux", "Windows".
For EC2 Classic instances: "Linux/UNIX (Amazon VPC)", "SUSE Linux (Amazon VPC)", "Windows (Amazon VPC)".
Declaration
public Output<string> Product { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
The AWS region your group will be created in. Cannot be changed after the group has been created.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ScheduledTasks
Declaration
public Output<ImmutableArray<BeanstalkScheduledTask>> ScheduledTasks { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<BeanstalkScheduledTask>> |
Methods
View SourceGet(String, Input<String>, BeanstalkState, CustomResourceOptions)
Get an existing Beanstalk resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Beanstalk Get(string name, Input<string> id, BeanstalkState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| BeanstalkState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Beanstalk |