AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

SetTimeBasedAutoScalingInput

import "github.com/aws/aws-sdk-go/service/opsworks"

type SetTimeBasedAutoScalingInput struct { AutoScalingSchedule *WeeklyAutoScalingSchedule `type:"structure"` InstanceId *string `type:"string" required:"true"` }

AutoScalingSchedule

Describes a time-based instance's auto scaling schedule. The schedule consists of a set of key-value pairs.

  • The key is the time period (a UTC hour) and must be an integer from 0 - 23.

  • The value indicates whether the instance should be online or offline for the specified period, and must be set to "on" or "off"

The default setting for all time periods is off, so you use the following parameters primarily to specify the online periods. You don't have to explicitly specify offline periods unless you want to change an online period to an offline period.

The following example specifies that the instance should be online for four hours, from UTC 1200 - 1600. It will be off for the remainder of the day.

{ "12":"on", "13":"on", "14":"on", "15":"on" }

InstanceId

Type: *string

The instance ID.

InstanceId is a required field

Method

GoString

func (s SetTimeBasedAutoScalingInput) GoString() string

GoString returns the string representation

SetAutoScalingSchedule

func (s *SetTimeBasedAutoScalingInput) SetAutoScalingSchedule(v *WeeklyAutoScalingSchedule) *SetTimeBasedAutoScalingInput

SetAutoScalingSchedule sets the AutoScalingSchedule field's value.

SetInstanceId

func (s *SetTimeBasedAutoScalingInput) SetInstanceId(v string) *SetTimeBasedAutoScalingInput

SetInstanceId sets the InstanceId field's value.

String

func (s SetTimeBasedAutoScalingInput) String() string

String returns the string representation

Validate

func (s *SetTimeBasedAutoScalingInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: