Show / Hide Table of Contents

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 using frequency) 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 using cron_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 the task_type is "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()
{
}

}
Inheritance
System.Object
Resource
CustomResource
Beanstalk
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.SpotInst.Aws
Assembly: Pulumi.SpotInst.dll
Syntax
public class Beanstalk : CustomResource

Constructors

View Source

Beanstalk(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 Source

BeanstalkEnvironmentId

The id of an existing Beanstalk environment.

Declaration
public Output<string> BeanstalkEnvironmentId { get; }
Property Value
Type Description
Output<System.String>
View Source

BeanstalkEnvironmentName

The name of an existing Beanstalk environment.

Declaration
public Output<string> BeanstalkEnvironmentName { get; }
Property Value
Type Description
Output<System.String>
View Source

DeploymentPreferences

Preferences when performing a roll

Declaration
public Output<BeanstalkDeploymentPreferences> DeploymentPreferences { get; }
Property Value
Type Description
Output<BeanstalkDeploymentPreferences>
View Source

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>
View Source

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>>
View Source

Maintenance

Declaration
public Output<string> Maintenance { get; }
Property Value
Type Description
Output<System.String>
View Source

ManagedActions

Managed Actions parameters

Declaration
public Output<BeanstalkManagedActions> ManagedActions { get; }
Property Value
Type Description
Output<BeanstalkManagedActions>
View Source

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>
View Source

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>
View Source

Name

The group name.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Product

Operation system type. Valid values: &quot;Linux/UNIX&quot;, &quot;SUSE Linux&quot;, &quot;Windows&quot;. For EC2 Classic instances: &quot;Linux/UNIX (Amazon VPC)&quot;, &quot;SUSE Linux (Amazon VPC)&quot;, &quot;Windows (Amazon VPC)&quot;.

Declaration
public Output<string> Product { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

ScheduledTasks

Declaration
public Output<ImmutableArray<BeanstalkScheduledTask>> ScheduledTasks { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<BeanstalkScheduledTask>>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.