|
| 1 | +package model |
| 2 | + |
| 3 | +import "time" |
| 4 | + |
| 5 | +const ( |
| 6 | + // CloudFormationRetryMaxAttempts is the maximum number of retries for CloudFormation. |
| 7 | + CloudFormationRetryMaxAttempts int = 2 |
| 8 | +) |
| 9 | + |
| 10 | +// StackStatus is the status of a CloudFormation stack. |
| 11 | +type StackStatus string |
| 12 | + |
| 13 | +// StackDriftInformationSummary contains information about whether the stack's |
| 14 | +// actual configuration differs, or has drifted, from its expected configuration, |
| 15 | +// as defined in the stack template and any values specified as template parameters. |
| 16 | +// A stack is considered to have drifted if one or more of its resources have drifted. |
| 17 | +type StackDriftInformationSummary struct { |
| 18 | + // StackDriftStatus is status of the stack's actual configuration compared to its expected template |
| 19 | + // configuration. |
| 20 | + StackDriftStatus StackDriftStatus |
| 21 | + // LastCheckTimestamp is most recent time when a drift detection operation was |
| 22 | + // initiated on the stack, or any of its individual resources that support drift detection. |
| 23 | + LastCheckTimestamp *time.Time |
| 24 | +} |
| 25 | + |
| 26 | +// StackDriftStatus is the status of a stack's actual configuration compared to |
| 27 | +// its expected template configuration. |
| 28 | +type StackDriftStatus string |
| 29 | + |
| 30 | +const ( |
| 31 | + // StackDriftStatusDrifted is the stack differs from its expected template configuration. |
| 32 | + // A stack is considered to have drifted if one or more of its resources have drifted. |
| 33 | + StackDriftStatusDrifted StackDriftStatus = "DRIFTED" |
| 34 | + // StackDriftStatusInSync is the stack's actual configuration matches its expected template |
| 35 | + // configuration. |
| 36 | + StackDriftStatusInSync StackDriftStatus = "IN_SYNC" |
| 37 | + // StackDriftStatusNotChecked is CloudFormation hasn't checked if the stack differs from its |
| 38 | + // expected template configuration. |
| 39 | + StackDriftStatusNotChecked StackDriftStatus = "NOT_CHECKED" |
| 40 | + // StackDriftStatusUnknown is this value is reserved for future use. |
| 41 | + StackDriftStatusUnknown StackDriftStatus = "UNKNOWN" |
| 42 | +) |
| 43 | + |
| 44 | +// Values returns all known values for StackDriftStatus. Note that this can be |
| 45 | +// expanded in the future, and so it is only as up to date as the client. The |
| 46 | +// ordering of this slice is not guaranteed to be stable across updates. |
| 47 | +func (StackDriftStatus) Values() []StackDriftStatus { |
| 48 | + return []StackDriftStatus{ |
| 49 | + "DRIFTED", |
| 50 | + "IN_SYNC", |
| 51 | + "UNKNOWN", |
| 52 | + "NOT_CHECKED", |
| 53 | + } |
| 54 | +} |
| 55 | + |
| 56 | +// Stack is a CloudFormation stack. It is same as types.StackSummary. |
| 57 | +type Stack struct { |
| 58 | + // CreationTime is the time the stack was created. |
| 59 | + CreationTime *time.Time |
| 60 | + // StackName is the name associated with the stack. |
| 61 | + StackName *string |
| 62 | + // StackStatus is the current status of the stack. |
| 63 | + StackStatus StackStatus |
| 64 | + // DeletionTime is the time the stack was deleted. |
| 65 | + DeletionTime *time.Time |
| 66 | + // DriftInformation is summarizes information about whether a stack's actual |
| 67 | + // configuration differs, or has drifted, from its expected configuration, |
| 68 | + // as defined in the stack template and any values specified as template parameters. |
| 69 | + DriftInformation *StackDriftInformationSummary |
| 70 | + // LastUpdatedTime is the time the stack was last updated. |
| 71 | + LastUpdatedTime *time.Time |
| 72 | + // ParentID is used for nested stacks --stacks created as resources for |
| 73 | + // another stack-- the stack ID of the direct parent of this stack. |
| 74 | + // For the first level of nested stacks, the root stack is also the parent stack. |
| 75 | + ParentID *string |
| 76 | + // RootID id used for nested stacks --stacks created as resources for |
| 77 | + // another stack--the stack ID of the top-level stack to which the nested stack |
| 78 | + // ultimately belongs. |
| 79 | + RootID *string |
| 80 | + // StackID is unique stack identifier. |
| 81 | + StackID *string |
| 82 | + // StackStatusReason is Success/Failure message associated with the stack status. |
| 83 | + StackStatusReason *string |
| 84 | + // TemplateDescription is the template description of the template used to create the stack. |
| 85 | + TemplateDescription *string |
| 86 | +} |
0 commit comments