Documentation ¶
Overview ¶
Package model contains the definitions of domain models and business logic.
Index ¶
- Constants
- type AWSConfig
- type AWSProfile
- type AllowOrigins
- type Bucket
- type BucketPolicy
- type BucketSet
- type BucketSets
- type DeleteObjectsRetryCount
- type Domain
- type Endpoint
- type ModuleInfo
- type Principal
- type Region
- type ResourceStatus
- type S3Key
- type S3Object
- type S3ObjectIdentifier
- type S3ObjectIdentifiers
- type Stack
- type StackDriftInformationSummary
- type StackDriftStatus
- type StackResource
- type StackResourceDriftInformationSummary
- type StackResourceDriftStatus
- type StackStatus
- type Statement
- type ValidationFunc
- type Validator
- type VersionID
Constants ¶
const ( // CloudFormationRetryMaxAttempts is the maximum number of retries for CloudFormation. CloudFormationRetryMaxAttempts int = 2 // CloudFormationWaitNanoSecTime is the time to wait for CloudFormation. // It is 1 hour. CloudFormationWaitNanoSecTime = time.Duration(6000000000000000) )
const ( // S3DeleteObjectChunksSize is the maximum number of objects that can be deleted in a single request. S3DeleteObjectChunksSize = 500 // MaxS3DeleteObjectsParallelsCount is the maximum number of parallel executions of DeleteObjects. MaxS3DeleteObjectsParallelsCount = 5 // MaxS3DeleteObjectsRetryCount is the maximum number of retries for DeleteObjects. MaxS3DeleteObjectsRetryCount = 6 // S3DeleteObjectsDelayTimeSec is the delay time in seconds. S3DeleteObjectsDelayTimeSec = 5 // MaxS3Keys is the maximum number of keys that can be specified in a single request. MaxS3Keys = 1000 )
const ( // MinBucketNameLength is the minimum length of the bucket name. MinBucketNameLength = 3 // MaxBucketNameLength is the maximum length of the bucket name. MaxBucketNameLength = 63 // S3Protocol is the protocol of the S3 bucket. S3Protocol = "s3://" )
const DebugLocalstackEndpoint = "http://localhost:4566"
DebugLocalstackEndpoint is the endpoint for localstack. It's used for testing.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSConfig ¶
AWSConfig is the AWS config.
func NewAWSConfig ¶
NewAWSConfig creates a new AWS config.
type AWSProfile ¶
type AWSProfile string
AWSProfile is the name of the AWS profile.
func NewAWSProfile ¶
func NewAWSProfile(p string) AWSProfile
NewAWSProfile returns a new AWSProfile. If p is empty, read $AWS_PROFILE and return it.
func (AWSProfile) String ¶
func (p AWSProfile) String() string
String returns the string representation of the AWSProfile.
type AllowOrigins ¶
type AllowOrigins []Domain
AllowOrigins is list of origins (domain names) that CloudFront can use as the value for the Access-Control-Allow-Origin HTTP response header.
func (AllowOrigins) String ¶
func (a AllowOrigins) String() string
String returns the string representation of AllowOrigins.
func (AllowOrigins) Validate ¶
func (a AllowOrigins) Validate() (err error)
Validate validates AllowOrigins. If AllowOrigins is invalid, it returns an error.
type Bucket ¶
type Bucket string
Bucket is the name of the S3 bucket.
func NewBucketWithoutProtocol ¶
NewBucketWithoutProtocol creates a new Bucket.
func (Bucket) Split ¶
Split returns the Bucket and the S3Key. If the Bucket does not contain "/", the S3Key is empty.
func (Bucket) Validate ¶
Validate returns true if the Bucket is valid. Bucket naming rules: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
func (Bucket) WithProtocol ¶
WithProtocol returns the Bucket with the protocol.
type BucketPolicy ¶
type BucketPolicy struct { // Version is the policy language version. Version string `json:"Version"` //nolint // Statement is the policy statement. Statement []Statement `json:"Statement"` //nolint }
BucketPolicy is a type that represents a bucket policy.
func NewAllowCloudFrontS3BucketPolicy ¶
func NewAllowCloudFrontS3BucketPolicy(bucket Bucket) *BucketPolicy
NewAllowCloudFrontS3BucketPolicy returns a new BucketPolicy that allows CloudFront to access the S3 bucket.
func (*BucketPolicy) String ¶
func (b *BucketPolicy) String() (string, error)
String returns the string representation of the BucketPolicy.
type BucketSet ¶
type BucketSet struct { // Bucket is the name of the S3 bucket. Bucket Bucket // Region is the name of the AWS region. Region Region // CreationDate is date the bucket was created. // This date can change when making changes to your bucket, such as editing its bucket policy. CreationDate time.Time }
BucketSet is the set of the Bucket and the Region.
type BucketSets ¶
type BucketSets []BucketSet
BucketSets is the set of the BucketSet.
func (BucketSets) Contains ¶
func (b BucketSets) Contains(bucket Bucket) bool
Contains returns true if the BucketSets contains the bucket.
func (BucketSets) Empty ¶
func (b BucketSets) Empty() bool
Empty returns true if the BucketSets is empty.
type DeleteObjectsRetryCount ¶
type DeleteObjectsRetryCount int
DeleteObjectsRetryCount is the number of retries for DeleteObjects.
func NewDeleteRetryCount ¶
func NewDeleteRetryCount(i int) DeleteObjectsRetryCount
NewDeleteRetryCount creates a new DeleteRetryCount. If i is less than 0, it returns 0. If i is greater than MaxS3DeleteObjectsRetryCount, it returns MaxS3DeleteObjectsRetryCount.
type Domain ¶
type Domain string
Domain is a type that represents a domain name.
type Endpoint ¶
type Endpoint string
Endpoint is a type that represents an endpoint.
type ModuleInfo ¶
type ModuleInfo struct { // LogicalIDHierarchy is a concatenated list of the logical IDs of the module // or modules containing the resource. Modules are listed starting with the // inner-most nested module, and separated by / . // In the following example, the resource was created from a module, moduleA, // that's nested inside a parent module, moduleB . moduleA/moduleB For more // information, see Referencing resources in a module // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/modules.html#module-ref-resources) // in the CloudFormation User Guide. LogicalIDHierarchy *string // TypeHierarchy is a concatenated list of the module type or types containing // the resource. Module types are listed starting with the inner-most nested // module, and separated by /. // In the following example, the resource was created from a module of type // AWS::First::Example::MODULE , that's nested inside a parent module of type // AWS::Second::Example::MODULE . // AWS::First::Example::MODULE/AWS::Second::Example::MODULE TypeHierarchy *string }
ModuleInfo is contains information about the module from which the resource was created, if the resource was created from a module included in the stack template. For more information about modules, see Using modules to encapsulate and reuse resource configurations (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/modules.html) in the CloudFormation User Guide.
type Principal ¶
type Principal struct { // Service is the AWS service to which the principal belongs. Service string `json:"Service"` //nolint }
Principal is a type that represents a principal.
type Region ¶
type Region string
Region is the name of the AWS region.
const ( // RegionUSEast1 US East (N. Virginia) RegionUSEast1 Region = "us-east-1" // RegionUSEast2 US East (Ohio) RegionUSEast2 Region = "us-east-2" // RegionUSWest1 US West (N. California) RegionUSWest1 Region = "us-west-1" // RegionUSWest2 US West (Oregon) RegionUSWest2 Region = "us-west-2" // RegionAFSouth1 Africa (Cape Town) RegionAFSouth1 Region = "af-south-1" // RegionAPEast1 Asia Pacific (Hong Kong) RegionAPEast1 Region = "ap-east-1" // RegionAPSouth1 Asia Pacific (Mumbai) RegionAPSouth1 Region = "ap-south-1" // RegionAPNortheast1 Asia Pacific (Tokyo) RegionAPNortheast1 Region = "ap-northeast-1" // RegionAPNortheast2 Asia Pacific (Seoul) RegionAPNortheast2 Region = "ap-northeast-2" // RegionAPNortheast3 Asia Pacific (Osaka-Local) RegionAPNortheast3 Region = "ap-northeast-3" // RegionAPSoutheast1 Asia Pacific (Singapore) RegionAPSoutheast1 Region = "ap-southeast-1" // RegionAPSoutheast2 Asia Pacific (Sydney) RegionAPSoutheast2 Region = "ap-southeast-2" // RegionCACentral1 Canada (Central) RegionCACentral1 Region = "ca-central-1" // RegionCNNorth1 China (Beijing) RegionCNNorth1 Region = "cn-north-1" // RegionCNNorthwest1 China (Ningxia) RegionCNNorthwest1 Region = "cn-northwest-1" // RegionEUCentral1 Europe (Frankfurt) RegionEUCentral1 Region = "eu-central-1" // RegionEUNorth1 Europe (Stockholm) RegionEUNorth1 Region = "eu-north-1" // RegionEUSouth1 Europe (Milan) RegionEUSouth1 Region = "eu-south-1" // RegionEUWest1 Europe (Ireland) RegionEUWest1 Region = "eu-west-1" // RegionEUWest2 Europe (London) RegionEUWest2 Region = "eu-west-2" // RegionEUWest3 Europe (Paris) RegionEUWest3 Region = "eu-west-3" // RegionMESouth1 Middle East (Bahrain) RegionMESouth1 Region = "me-south-1" // RegionSASouth1 South America (São Paulo) RegionSASouth1 Region = "sa-south-1" // RegionUSGovEast1 AWS GovCloud (US-East) RegionUSGovEast1 Region = "us-gov-east-1" // RegionUSGovWest1 AWS GovCloud (US) RegionUSGovWest1 Region = "us-gov-west-1" )
func (Region) Next ¶
Next returns the next region. If the region is the last one, it returns the first region. If the region is invalid, it returns "ap-northeast-1".
func (Region) Prev ¶
Prev returns the previous region. If the region is the first one, it returns the last region. If the region is invalid, it returns "ap-northeast-1".
type ResourceStatus ¶
type ResourceStatus string
ResourceStatus is the status of a CloudFormation stack resource.
const ( // ResourceStatusCreateInProgress is the resource is being created. ResourceStatusCreateInProgress ResourceStatus = "CREATE_IN_PROGRESS" // ResourceStatusCreateFailed is the resource creation failed. ResourceStatusCreateFailed ResourceStatus = "CREATE_FAILED" // ResourceStatusCreateComplete is the resource has been created. ResourceStatusCreateComplete ResourceStatus = "CREATE_COMPLETE" // ResourceStatusDeleteInProgress is the resource is being deleted. ResourceStatusDeleteInProgress ResourceStatus = "DELETE_IN_PROGRESS" // ResourceStatusDeleteFailed is the resource deletion failed. ResourceStatusDeleteFailed ResourceStatus = "DELETE_FAILED" // ResourceStatusDeleteComplete is the resource has been deleted. ResourceStatusDeleteComplete ResourceStatus = "DELETE_COMPLETE" // ResourceStatusDeleteSkipped is the resource was not successfully deleted. It might still be ResourceStatusDeleteSkipped ResourceStatus = "DELETE_SKIPPED" // ResourceStatusUpdateInProgress is the resource is being updated. ResourceStatusUpdateInProgress ResourceStatus = "UPDATE_IN_PROGRESS" // ResourceStatusUpdateFailed is the resource update failed. ResourceStatusUpdateFailed ResourceStatus = "UPDATE_FAILED" // ResourceStatusUpdateComplete is the resource has been updated. ResourceStatusUpdateComplete ResourceStatus = "UPDATE_COMPLETE" // ResourceStatusImportFailed is the resource import failed. ResourceStatusImportFailed ResourceStatus = "IMPORT_FAILED" // ResourceStatusImportComplete is the resource has been imported. ResourceStatusImportComplete ResourceStatus = "IMPORT_COMPLETE" // ResourceStatusImportInProgress is the resource is being imported into a stack. ResourceStatusImportInProgress ResourceStatus = "IMPORT_IN_PROGRESS" // ResourceStatusImportRollbackInProgress is the resource is being rolled back to its previous ResourceStatusImportRollbackInProgress ResourceStatus = "IMPORT_ROLLBACK_IN_PROGRESS" // ResourceStatusImportRollbackFailed is the resource import failed and the resource is ResourceStatusImportRollbackFailed ResourceStatus = "IMPORT_ROLLBACK_FAILED" // ResourceStatusImportRollbackComplete is the resource was rolled back to its previous ResourceStatusImportRollbackComplete ResourceStatus = "IMPORT_ROLLBACK_COMPLETE" // ResourceStatusUpdateRollbackInProgress is the resource is being rolled back as part of a ResourceStatusUpdateRollbackInProgress ResourceStatus = "UPDATE_ROLLBACK_IN_PROGRESS" // ResourceStatusUpdateRollbackComplete is the resource was rolled back to its previous ResourceStatusUpdateRollbackComplete ResourceStatus = "UPDATE_ROLLBACK_COMPLETE" // ResourceStatusUpdateRollbackFailed is the resource update failed and the resource is being rolled back to its previous configuration. ResourceStatusUpdateRollbackFailed ResourceStatus = "UPDATE_ROLLBACK_FAILED" // ResourceStatusRollbackInProgress is the resource is being rolled back. ResourceStatusRollbackInProgress ResourceStatus = "ROLLBACK_IN_PROGRESS" // ResourceStatusRollbackComplete is the resource was rolled back. ResourceStatusRollbackComplete ResourceStatus = "ROLLBACK_COMPLETE" // ResourceStatusRollbackFailed is the resource rollback failed. ResourceStatusRollbackFailed ResourceStatus = "ROLLBACK_FAILED" )
func (ResourceStatus) Values ¶
func (ResourceStatus) Values() []ResourceStatus
Values returns all known values for ResourceStatus. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.
type S3Key ¶
type S3Key string
S3Key is the name of the object. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
type S3Object ¶
S3Object is the object in the S3 bucket.
func (*S3Object) ContentLength ¶
ContentLength returns the content length of the S3Object.
func (*S3Object) ContentType ¶
ContentType returns the content type of the S3Object. If the content type cannot be detected, it returns "plain/text".
type S3ObjectIdentifier ¶
type S3ObjectIdentifier struct { // S3Key is the name of the object. S3Key S3Key // VersionID is the version ID for the specific version of the object to delete. VersionID VersionID }
S3ObjectIdentifier is the object identifier in the S3 bucket.
func (S3ObjectIdentifier) ToAWSS3ObjectIdentifier ¶
func (o S3ObjectIdentifier) ToAWSS3ObjectIdentifier() *types.ObjectIdentifier
ToAWSS3ObjectIdentifier converts the S3ObjectIdentifier to the ObjectIdentifier.
type S3ObjectIdentifiers ¶
type S3ObjectIdentifiers []S3ObjectIdentifier
S3ObjectIdentifiers is the set of the S3ObjectSet.
func (S3ObjectIdentifiers) Len ¶
func (s S3ObjectIdentifiers) Len() int
Len returns the length of the S3ObjectIdentifiers.
func (S3ObjectIdentifiers) Less ¶
func (s S3ObjectIdentifiers) Less(i, j int) bool
Less defines the ordering of S3ObjectIdentifier instances.
func (S3ObjectIdentifiers) Swap ¶
func (s S3ObjectIdentifiers) Swap(i, j int)
Swap swaps the elements with indexes i and j.
func (S3ObjectIdentifiers) ToS3ObjectIdentifiers ¶
func (s S3ObjectIdentifiers) ToS3ObjectIdentifiers() []types.ObjectIdentifier
ToS3ObjectIdentifiers converts the S3ObjectSets to the ObjectIdentifiers.
type Stack ¶
type Stack struct { // CreationTime is the time the stack was created. CreationTime *time.Time // StackName is the name associated with the stack. StackName *string // StackStatus is the current status of the stack. StackStatus StackStatus // DeletionTime is the time the stack was deleted. DeletionTime *time.Time // DriftInformation is summarizes information about whether a stack's actual // configuration differs, or has drifted, from its expected configuration, // as defined in the stack template and any values specified as template parameters. DriftInformation *StackDriftInformationSummary // LastUpdatedTime is the time the stack was last updated. LastUpdatedTime *time.Time // ParentID is used for nested stacks --stacks created as resources for // another stack-- the stack ID of the direct parent of this stack. // For the first level of nested stacks, the root stack is also the parent stack. ParentID *string // RootID id used for nested stacks --stacks created as resources for // another stack--the stack ID of the top-level stack to which the nested stack // ultimately belongs. RootID *string // StackID is unique stack identifier. StackID *string // StackStatusReason is Success/Failure message associated with the stack status. StackStatusReason *string // TemplateDescription is the template description of the template used to create the stack. TemplateDescription *string }
Stack is a CloudFormation stack. It is same as types.StackSummary.
type StackDriftInformationSummary ¶
type StackDriftInformationSummary struct { // StackDriftStatus is status of the stack's actual configuration compared to its expected template // configuration. StackDriftStatus StackDriftStatus // LastCheckTimestamp is most recent time when a drift detection operation was // initiated on the stack, or any of its individual resources that support drift detection. LastCheckTimestamp *time.Time }
StackDriftInformationSummary contains information about whether the stack's actual configuration differs, or has drifted, from its expected configuration, as defined in the stack template and any values specified as template parameters. A stack is considered to have drifted if one or more of its resources have drifted.
type StackDriftStatus ¶
type StackDriftStatus string
StackDriftStatus is the status of a stack's actual configuration compared to its expected template configuration.
const ( // StackDriftStatusDrifted is the stack differs from its expected template configuration. // A stack is considered to have drifted if one or more of its resources have drifted. StackDriftStatusDrifted StackDriftStatus = "DRIFTED" // StackDriftStatusInSync is the stack's actual configuration matches its expected template // configuration. StackDriftStatusInSync StackDriftStatus = "IN_SYNC" // StackDriftStatusNotChecked is CloudFormation hasn't checked if the stack differs from its // expected template configuration. StackDriftStatusNotChecked StackDriftStatus = "NOT_CHECKED" // StackDriftStatusUnknown is this value is reserved for future use. StackDriftStatusUnknown StackDriftStatus = "UNKNOWN" )
func (StackDriftStatus) Values ¶
func (StackDriftStatus) Values() []StackDriftStatus
Values returns all known values for StackDriftStatus. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.
type StackResource ¶
type StackResource struct { // LastUpdatedTimestamp is time the status was updated. LastUpdatedTimestamp *time.Time // LogicalResourceID is the logical name of the resource specified in the template. LogicalResourceID *string // ResourceStatus is current status of the resource. ResourceStatus ResourceStatus // ResourceType is type of resource. For more information, go to Amazon Web Services Resource // Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the CloudFormation User Guide. ResourceType *string // DriftInformation is information about whether the resource's actual // configuration differs, or has drifted, from its expected configuration, // as defined in the stack template and any values specified as template // parameters. For more information, see Detecting Unregulated Configuration // Changes to Stacks and Resources // https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html DriftInformation *StackResourceDriftInformationSummary // ModuleInfo is contains information about the module from which the resource was created, if // the resource was created from a module included in the stack template. ModuleInfo *ModuleInfo // PhysicalResourceID is the name or unique identifier that corresponds to a // physical instance ID of the resource. PhysicalResourceID *string // ResourceStatusReason is success/failure message associated with the resource. ResourceStatusReason *string }
StackResource is a CloudFormation stack resource. It is same as types.StackResourceSummary.
type StackResourceDriftInformationSummary ¶
type StackResourceDriftInformationSummary struct { // StackResourceDriftStatus is status of the resource's actual // configuration compared to its expected configuration. StackResourceDriftStatus StackResourceDriftStatus // LastCheckTimestamp is when CloudFormation last checked if the // resource had drifted from its expected configuration. LastCheckTimestamp *time.Time }
StackResourceDriftInformationSummary is summarizes information about whether the resource's actual configuration differs, or has drifted, from its expected configuration.
type StackResourceDriftStatus ¶
type StackResourceDriftStatus string
StackResourceDriftStatus is status of the resource's actual configuration
const ( // StackResourceDriftStatusInSync is the resource's actual configuration matches its expected StackResourceDriftStatusInSync StackResourceDriftStatus = "IN_SYNC" // StackResourceDriftStatusModified is the resource differs from its expected configuration. StackResourceDriftStatusModified StackResourceDriftStatus = "MODIFIED" // StackResourceDriftStatusDeleted is the resource differs from its expected configuration in that it has been deleted. StackResourceDriftStatusDeleted StackResourceDriftStatus = "DELETED" // StackResourceDriftStatusNotChecked is CloudFormation hasn't checked if the resource differs from its expected configuration. StackResourceDriftStatusNotChecked StackResourceDriftStatus = "NOT_CHECKED" )
func (StackResourceDriftStatus) Values ¶
func (StackResourceDriftStatus) Values() []StackResourceDriftStatus
Values returns all known values for StackResourceDriftStatus. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.
type StackStatus ¶
type StackStatus string
StackStatus is the status of a CloudFormation stack.
const ( // StackStatusCreateInProgress is ongoing creation of one or more stacks. StackStatusCreateInProgress StackStatus = "CREATE_IN_PROGRESS" // StackStatusCreateComplete is successful creation of one or more stacks. StackStatusCreateComplete StackStatus = "CREATE_COMPLETE" // StackStatusCreateFailed is unsuccessful creation of one or more stacks. // View the stack events to see any associated error messages. Possible reasons // for a failed creation include insufficient permissions to work with all // resources in the stack, parameter values rejected by an AWS service, or a // timeout during resource creation. StackStatusCreateFailed StackStatus = "CREATE_FAILED" // StackStatusRollbackInProgress is ongoing removal of one or more stacks after a failed // stack creation or after an explicitly canceled stack creation. StackStatusRollbackInProgress StackStatus = "ROLLBACK_IN_PROGRESS" // StackStatusRollbackComplete is successful removal of one or more stacks after a failed // stack creation or after an explicitly canceled stack creation. The stack returns to // the previous working state. Any resources that were created during the create stack // operation are deleted. // This status exists only after a failed stack creation. It signifies that all operations // from the partially created stack have been appropriately cleaned up. When in this state, // only a delete operation can be performed. StackStatusRollbackComplete StackStatus = "ROLLBACK_COMPLETE" // StackStatusRollbackFailed is unsuccessful removal of one or more stacks after a failed // stack creation or after an explicitly canceled stack creation. Delete the stack or view // the stack events to see any associated error messages. StackStatusRollbackFailed StackStatus = "ROLLBACK_FAILED" // StackStatusDeleteInProgress is ongoing removal of one or more stacks. StackStatusDeleteInProgress StackStatus = "DELETE_IN_PROGRESS" // StackStatusDeleteComplete is successful deletion of one or more stacks. // Deleted stacks are retained and viewable for 90 days. StackStatusDeleteComplete StackStatus = "DELETE_COMPLETE" // StackStatusDeleteFailed is unsuccessful deletion of one or more stacks. // Because the delete failed, you might have some resources that are still // running; however, you can't work with or update the stack. Delete the stack // again or view the stack events to see any associated error messages. StackStatusDeleteFailed StackStatus = "DELETE_FAILED" // StackStatusUpdateInProgress is ongoing creation of one or more stacks with // an expected StackId but without any templates or resources. // A stack with this status code counts against the maximum possible number of stacks. StackStatusReviewInProgress StackStatus = "REVIEW_IN_PROGRESS" // StackStatusUpdateInProgress is ongoing update of one or more stacks. StackStatusUpdateInProgress StackStatus = "UPDATE_IN_PROGRESS" // StackStatusUpdateCompleteCleanupInProgress is ongoing removal of old resources for // one or more stacks after a successful stack update. For stack updates that require // resources to be replaced, CloudFormation creates the new resources first and then // deletes the old resources to help reduce any interruptions with your stack. In this // state, the stack has been updated and is usable, but CloudFormation is still deleting // the old resources. StackStatusUpdateCompleteCleanupInProgress StackStatus = "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS" // StackStatusUpdateComplete is successful update of one or more stacks. StackStatusUpdateComplete StackStatus = "UPDATE_COMPLETE" // StackStatusUpdateFailed is unsuccessful update of one or more stacks. View the stack events // to see any associated error messages. StackStatusUpdateFailed StackStatus = "UPDATE_FAILED" // StackStatusUpdateRollbackComplete is successful return of one or more stacks to a previous // working state after a failed stack update. StackStatusUpdateRollbackComplete StackStatus = "UPDATE_ROLLBACK_COMPLETE" // StackStatusUpdateRollbackCompleteCleanupInProgress is ongoing removal of new resources // for one or more stacks after a failed stack update. In this state, the stack has been // rolled back to its previous working state and is usable, but CloudFormation is still // deleting any new resources it created during the stack update. StackStatusUpdateRollbackCompleteCleanupInProgress StackStatus = "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS" // StackStatusUpdateRollbackFailed is unsuccessful return of one or more stacks to a // previous working state after a failed stack update. When in this state, you can // delete the stack or continue rollback. You might need to fix errors before your // stack can return to a working state. StackStatusUpdateRollbackFailed StackStatus = "UPDATE_ROLLBACK_FAILED" // StackStatusUpdateRollbackInProgress is ongoing return of one or more stacks // to the previous working state after failed stack update. StackStatusUpdateRollbackInProgress StackStatus = "UPDATE_ROLLBACK_IN_PROGRESS" // StackStatusImportInProgress is the import operation is currently in progress. StackStatusImportInProgress StackStatus = "IMPORT_IN_PROGRESS" // StackStatusImportComplete is the import operation successfully completed for // all resources in the stack that support resource import. StackStatusImportComplete StackStatus = "IMPORT_COMPLETE" // StackStatusImportRollbackInProgress is import will roll back to the previous // template configuration. StackStatusImportRollbackInProgress StackStatus = "IMPORT_ROLLBACK_IN_PROGRESS" // StackStatusImportRollbackComplete is import successfully rolled back to the previous template configuration. StackStatusImportRollbackComplete StackStatus = "IMPORT_ROLLBACK_COMPLETE" // StackStatusImportRollbackFailed is the import rollback operation failed for at // least one resource in the stack. Results will be available for the resources // CloudFormation successfully imported. StackStatusImportRollbackFailed StackStatus = "IMPORT_ROLLBACK_FAILED" )
CloudFormation stack status constants Ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html
func (StackStatus) String ¶
func (s StackStatus) String() string
String returns the string representation of StackStatus.
type Statement ¶
type Statement struct { // Sid is an identifier for the statement. Sid string `json:"Sid"` //nolint // Effect is whether the statement allows or denies access. Effect string `json:"Effect"` //nolint // Principal is the AWS account, IAM user, IAM role, federated user, or assumed-role user that the statement applies to. Principal Principal `json:"Principal"` //nolint // Action is the specific action or actions that will be allowed or denied. Action []string `json:"Action"` //nolint // Resource is the specific Amazon S3 resources that the statement covers. Resource []string `json:"Resource"` //nolint // The Condition element (or Condition block) lets you specify conditions for when a policy is in effect. // https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html Condition map[string]map[string]string `json:"Condition,omitempty"` //nolint }
Statement is a type that represents a statement.
type ValidationFunc ¶
type ValidationFunc func() error
ValidationFunc is a type that represents a validation function.