AWS OpsWorks

2015/05/18 - AWS OpsWorks - 1 new 2 updated api methods

GrantAccess (new) Link ¶

Note

This API can be used only with Windows stacks.

Grants RDP access to a Windows instance for a specified time period.

Request Syntax

client.grant_access(
    InstanceId='string',
    ValidForInMinutes=123
)
type InstanceId

string

param InstanceId

[REQUIRED]

The instance's AWS OpsWorks ID.

type ValidForInMinutes

integer

param ValidForInMinutes

The length of time (in minutes) that the grant is valid. When the grant expires at the end of this period, the user will no longer be able to use the credentials to log in. If the user is logged in at the time, he or she automatically will be logged out.

rtype

dict

returns

Response Syntax

{
    'TemporaryCredential': {
        'Username': 'string',
        'Password': 'string',
        'ValidForInMinutes': 123,
        'InstanceId': 'string'
    }
}

Response Structure

  • (dict) --

    Contains the response to a GrantAccess request.

    • TemporaryCredential (dict) --

      A TemporaryCredential object that contains the data needed to log in to the instance by RDP clients, such as the Microsoft Remote Desktop Connection.

      • Username (string) --

        The user name.

      • Password (string) --

        The password.

      • ValidForInMinutes (integer) --

        The length of time (in minutes) that the grant is valid. When the grant expires, at the end of this period, the user will no longer be able to use the credentials to log in. If they are logged in at the time, they will be automatically logged out.

      • InstanceId (string) --

        The instance's AWS OpsWorks ID.

DescribeLoadBasedAutoScaling (updated) Link ¶
Changes (response)
{'LoadBasedAutoScalingConfigurations': {'DownScaling': {'Alarms': ['string']},
                                        'UpScaling': {'Alarms': ['string']}}}

Describes load-based auto scaling configurations for specified layers.

Note

You must specify at least one of the parameters.

Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Request Syntax

client.describe_load_based_auto_scaling(
    LayerIds=[
        'string',
    ]
)
type LayerIds

list

param LayerIds

[REQUIRED]

An array of layer IDs.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'LoadBasedAutoScalingConfigurations': [
        {
            'LayerId': 'string',
            'Enable': True|False,
            'UpScaling': {
                'InstanceCount': 123,
                'ThresholdsWaitTime': 123,
                'IgnoreMetricsTime': 123,
                'CpuThreshold': 123.0,
                'MemoryThreshold': 123.0,
                'LoadThreshold': 123.0,
                'Alarms': [
                    'string',
                ]
            },
            'DownScaling': {
                'InstanceCount': 123,
                'ThresholdsWaitTime': 123,
                'IgnoreMetricsTime': 123,
                'CpuThreshold': 123.0,
                'MemoryThreshold': 123.0,
                'LoadThreshold': 123.0,
                'Alarms': [
                    'string',
                ]
            }
        },
    ]
}

Response Structure

  • (dict) --

    Contains the response to a DescribeLoadBasedAutoScaling request.

    • LoadBasedAutoScalingConfigurations (list) --

      An array of LoadBasedAutoScalingConfiguration objects that describe each layer's configuration.

      • (dict) --

        Describes a layer's load-based auto scaling configuration.

        • LayerId (string) --

          The layer ID.

        • Enable (boolean) --

          Whether load-based auto scaling is enabled for the layer.

        • UpScaling (dict) --

          An AutoScalingThresholds object that describes the upscaling configuration, which defines how and when AWS OpsWorks increases the number of instances.

          • InstanceCount (integer) --

            The number of instances to add or remove when the load exceeds a threshold.

          • ThresholdsWaitTime (integer) --

            The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

          • IgnoreMetricsTime (integer) --

            The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct AWS OpsWorks to suppress scaling events long enough to get the new instances online.

          • CpuThreshold (float) --

            The CPU utilization threshold, as a percent of the available CPU.

          • MemoryThreshold (float) --

            The memory utilization threshold, as a percent of the available memory.

          • LoadThreshold (float) --

            The load threshold. For more information about how load is computed, see Load (computing).

          • Alarms (list) --

            Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.

            Note

            To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms . You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.

            • (string) --

        • DownScaling (dict) --

          An AutoScalingThresholds object that describes the downscaling configuration, which defines how and when AWS OpsWorks reduces the number of instances.

          • InstanceCount (integer) --

            The number of instances to add or remove when the load exceeds a threshold.

          • ThresholdsWaitTime (integer) --

            The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

          • IgnoreMetricsTime (integer) --

            The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct AWS OpsWorks to suppress scaling events long enough to get the new instances online.

          • CpuThreshold (float) --

            The CPU utilization threshold, as a percent of the available CPU.

          • MemoryThreshold (float) --

            The memory utilization threshold, as a percent of the available memory.

          • LoadThreshold (float) --

            The load threshold. For more information about how load is computed, see Load (computing).

          • Alarms (list) --

            Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.

            Note

            To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms . You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.

            • (string) --

SetLoadBasedAutoScaling (updated) Link ¶
Changes (request)
{'DownScaling': {'Alarms': ['string']}, 'UpScaling': {'Alarms': ['string']}}

Specify the load-based auto scaling configuration for a specified layer. For more information, see Managing Load with Time-based and Load-based Instances.

Note

To use load-based auto scaling, you must create a set of load-based auto scaling instances. Load-based auto scaling operates only on the instances from that set, so you must ensure that you have created enough instances to handle the maximum anticipated load.

Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Request Syntax

client.set_load_based_auto_scaling(
    LayerId='string',
    Enable=True|False,
    UpScaling={
        'InstanceCount': 123,
        'ThresholdsWaitTime': 123,
        'IgnoreMetricsTime': 123,
        'CpuThreshold': 123.0,
        'MemoryThreshold': 123.0,
        'LoadThreshold': 123.0,
        'Alarms': [
            'string',
        ]
    },
    DownScaling={
        'InstanceCount': 123,
        'ThresholdsWaitTime': 123,
        'IgnoreMetricsTime': 123,
        'CpuThreshold': 123.0,
        'MemoryThreshold': 123.0,
        'LoadThreshold': 123.0,
        'Alarms': [
            'string',
        ]
    }
)
type LayerId

string

param LayerId

[REQUIRED]

The layer ID.

type Enable

boolean

param Enable

Enables load-based auto scaling for the layer.

type UpScaling

dict

param UpScaling

An AutoScalingThresholds object with the upscaling threshold configuration. If the load exceeds these thresholds for a specified amount of time, AWS OpsWorks starts a specified number of instances.

  • InstanceCount (integer) --

    The number of instances to add or remove when the load exceeds a threshold.

  • ThresholdsWaitTime (integer) --

    The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

  • IgnoreMetricsTime (integer) --

    The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct AWS OpsWorks to suppress scaling events long enough to get the new instances online.

  • CpuThreshold (float) --

    The CPU utilization threshold, as a percent of the available CPU.

  • MemoryThreshold (float) --

    The memory utilization threshold, as a percent of the available memory.

  • LoadThreshold (float) --

    The load threshold. For more information about how load is computed, see Load (computing).

  • Alarms (list) --

    Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.

    Note

    To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms . You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.

    • (string) --

type DownScaling

dict

param DownScaling

An AutoScalingThresholds object with the downscaling threshold configuration. If the load falls below these thresholds for a specified amount of time, AWS OpsWorks stops a specified number of instances.

  • InstanceCount (integer) --

    The number of instances to add or remove when the load exceeds a threshold.

  • ThresholdsWaitTime (integer) --

    The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

  • IgnoreMetricsTime (integer) --

    The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct AWS OpsWorks to suppress scaling events long enough to get the new instances online.

  • CpuThreshold (float) --

    The CPU utilization threshold, as a percent of the available CPU.

  • MemoryThreshold (float) --

    The memory utilization threshold, as a percent of the available memory.

  • LoadThreshold (float) --

    The load threshold. For more information about how load is computed, see Load (computing).

  • Alarms (list) --

    Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.

    Note

    To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms . You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.

    • (string) --

returns

None