aws_cloudwatch_metric_alarm

package
v0.0.0-...-4deecce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	// ActionsEnabled: bool, optional
	ActionsEnabled terra.BoolValue `hcl:"actions_enabled,attr"`
	// AlarmActions: set of string, optional
	AlarmActions terra.SetValue[terra.StringValue] `hcl:"alarm_actions,attr"`
	// AlarmDescription: string, optional
	AlarmDescription terra.StringValue `hcl:"alarm_description,attr"`
	// AlarmName: string, required
	AlarmName terra.StringValue `hcl:"alarm_name,attr" validate:"required"`
	// ComparisonOperator: string, required
	ComparisonOperator terra.StringValue `hcl:"comparison_operator,attr" validate:"required"`
	// DatapointsToAlarm: number, optional
	DatapointsToAlarm terra.NumberValue `hcl:"datapoints_to_alarm,attr"`
	// Dimensions: map of string, optional
	Dimensions terra.MapValue[terra.StringValue] `hcl:"dimensions,attr"`
	// EvaluateLowSampleCountPercentiles: string, optional
	EvaluateLowSampleCountPercentiles terra.StringValue `hcl:"evaluate_low_sample_count_percentiles,attr"`
	// EvaluationPeriods: number, required
	EvaluationPeriods terra.NumberValue `hcl:"evaluation_periods,attr" validate:"required"`
	// ExtendedStatistic: string, optional
	ExtendedStatistic terra.StringValue `hcl:"extended_statistic,attr"`
	// Id: string, optional
	Id terra.StringValue `hcl:"id,attr"`
	// InsufficientDataActions: set of string, optional
	InsufficientDataActions terra.SetValue[terra.StringValue] `hcl:"insufficient_data_actions,attr"`
	// MetricName: string, optional
	MetricName terra.StringValue `hcl:"metric_name,attr"`
	// Namespace: string, optional
	Namespace terra.StringValue `hcl:"namespace,attr"`
	// OkActions: set of string, optional
	OkActions terra.SetValue[terra.StringValue] `hcl:"ok_actions,attr"`
	// Period: number, optional
	Period terra.NumberValue `hcl:"period,attr"`
	// Statistic: string, optional
	Statistic terra.StringValue `hcl:"statistic,attr"`
	// Tags: map of string, optional
	Tags terra.MapValue[terra.StringValue] `hcl:"tags,attr"`
	// TagsAll: map of string, optional
	TagsAll terra.MapValue[terra.StringValue] `hcl:"tags_all,attr"`
	// Threshold: number, optional
	Threshold terra.NumberValue `hcl:"threshold,attr"`
	// ThresholdMetricId: string, optional
	ThresholdMetricId terra.StringValue `hcl:"threshold_metric_id,attr"`
	// TreatMissingData: string, optional
	TreatMissingData terra.StringValue `hcl:"treat_missing_data,attr"`
	// Unit: string, optional
	Unit terra.StringValue `hcl:"unit,attr"`
	// MetricQuery: min=0
	MetricQuery []MetricQuery `hcl:"metric_query,block" validate:"min=0"`
}

Args contains the configurations for aws_cloudwatch_metric_alarm.

type MetricQuery

type MetricQuery struct {
	// AccountId: string, optional
	AccountId terra.StringValue `hcl:"account_id,attr"`
	// Expression: string, optional
	Expression terra.StringValue `hcl:"expression,attr"`
	// Id: string, required
	Id terra.StringValue `hcl:"id,attr" validate:"required"`
	// Label: string, optional
	Label terra.StringValue `hcl:"label,attr"`
	// Period: number, optional
	Period terra.NumberValue `hcl:"period,attr"`
	// ReturnData: bool, optional
	ReturnData terra.BoolValue `hcl:"return_data,attr"`
	// MetricQueryMetric: optional
	Metric *MetricQueryMetric `hcl:"metric,block"`
}

type MetricQueryAttributes

type MetricQueryAttributes struct {
	// contains filtered or unexported fields
}

func (MetricQueryAttributes) AccountId

func (mq MetricQueryAttributes) AccountId() terra.StringValue

func (MetricQueryAttributes) Expression

func (mq MetricQueryAttributes) Expression() terra.StringValue

func (MetricQueryAttributes) Id

func (MetricQueryAttributes) InternalRef

func (mq MetricQueryAttributes) InternalRef() (terra.Reference, error)

func (MetricQueryAttributes) InternalTokens

func (mq MetricQueryAttributes) InternalTokens() (hclwrite.Tokens, error)

func (MetricQueryAttributes) InternalWithRef

func (MetricQueryAttributes) Label

func (MetricQueryAttributes) Metric

func (MetricQueryAttributes) Period

func (MetricQueryAttributes) ReturnData

func (mq MetricQueryAttributes) ReturnData() terra.BoolValue

type MetricQueryMetric

type MetricQueryMetric struct {
	// Dimensions: map of string, optional
	Dimensions terra.MapValue[terra.StringValue] `hcl:"dimensions,attr"`
	// MetricName: string, required
	MetricName terra.StringValue `hcl:"metric_name,attr" validate:"required"`
	// Namespace: string, optional
	Namespace terra.StringValue `hcl:"namespace,attr"`
	// Period: number, required
	Period terra.NumberValue `hcl:"period,attr" validate:"required"`
	// Stat: string, required
	Stat terra.StringValue `hcl:"stat,attr" validate:"required"`
	// Unit: string, optional
	Unit terra.StringValue `hcl:"unit,attr"`
}

type MetricQueryMetricAttributes

type MetricQueryMetricAttributes struct {
	// contains filtered or unexported fields
}

func (MetricQueryMetricAttributes) Dimensions

func (MetricQueryMetricAttributes) InternalRef

func (m MetricQueryMetricAttributes) InternalRef() (terra.Reference, error)

func (MetricQueryMetricAttributes) InternalTokens

func (m MetricQueryMetricAttributes) InternalTokens() (hclwrite.Tokens, error)

func (MetricQueryMetricAttributes) InternalWithRef

func (MetricQueryMetricAttributes) MetricName

func (MetricQueryMetricAttributes) Namespace

func (MetricQueryMetricAttributes) Period

func (MetricQueryMetricAttributes) Stat

func (MetricQueryMetricAttributes) Unit

type MetricQueryMetricState

type MetricQueryMetricState struct {
	Dimensions map[string]string `json:"dimensions"`
	MetricName string            `json:"metric_name"`
	Namespace  string            `json:"namespace"`
	Period     float64           `json:"period"`
	Stat       string            `json:"stat"`
	Unit       string            `json:"unit"`
}

type MetricQueryState

type MetricQueryState struct {
	AccountId  string                   `json:"account_id"`
	Expression string                   `json:"expression"`
	Id         string                   `json:"id"`
	Label      string                   `json:"label"`
	Period     float64                  `json:"period"`
	ReturnData bool                     `json:"return_data"`
	Metric     []MetricQueryMetricState `json:"metric"`
}

type Resource

type Resource struct {
	Name string
	Args Args

	DependsOn terra.Dependencies
	Lifecycle *terra.Lifecycle
	// contains filtered or unexported fields
}

Resource represents the Terraform resource aws_cloudwatch_metric_alarm.

func New

func New(name string, args Args) *Resource

New creates a new instance of Resource.

func (*Resource) Attributes

func (acma *Resource) Attributes() awsCloudwatchMetricAlarmAttributes

Attributes returns the attributes for Resource.

func (*Resource) Configuration

func (acma *Resource) Configuration() interface{}

Configuration returns the configuration (args) for Resource.

func (*Resource) DependOn

func (acma *Resource) DependOn() terra.Reference

DependOn is used for other resources to depend on Resource.

func (*Resource) Dependencies

func (acma *Resource) Dependencies() terra.Dependencies

Dependencies returns the list of resources Resource depends_on.

func (*Resource) ImportState

func (acma *Resource) ImportState(state io.Reader) error

ImportState imports the given attribute values into Resource's state.

func (*Resource) LifecycleManagement

func (acma *Resource) LifecycleManagement() *terra.Lifecycle

LifecycleManagement returns the lifecycle block for Resource.

func (*Resource) LocalName

func (acma *Resource) LocalName() string

LocalName returns the local name for Resource.

func (*Resource) State

func (acma *Resource) State() (*awsCloudwatchMetricAlarmState, bool)

State returns the state and a bool indicating if Resource has state.

func (*Resource) StateMust

func (acma *Resource) StateMust() *awsCloudwatchMetricAlarmState

StateMust returns the state for Resource. Panics if the state is nil.

func (*Resource) Type

func (acma *Resource) Type() string

Type returns the Terraform object type for Resource.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL