{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.CloudFormation.Types.StackEvent -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.CloudFormation.Types.StackEvent where import Amazonka.CloudFormation.Types.HookFailureMode import Amazonka.CloudFormation.Types.HookInvocationPoint import Amazonka.CloudFormation.Types.HookStatus import Amazonka.CloudFormation.Types.ResourceStatus import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import qualified Amazonka.Prelude as Prelude -- | The StackEvent data type. -- -- /See:/ 'newStackEvent' smart constructor. data StackEvent = StackEvent' { -- | The token passed to the operation that generated this event. -- -- All events triggered by a given stack operation are assigned the same -- client request token, which you can use to track operations. For -- example, if you execute a @CreateStack@ operation with the token -- @token1@, then all the @StackEvents@ generated by that operation will -- have @ClientRequestToken@ set as @token1@. -- -- In the console, stack operations display the client request token on the -- Events tab. Stack operations that are initiated from the console use the -- token format /Console-StackOperation-ID/, which helps you easily -- identify the stack operation . For example, if you create a stack using -- the console, each stack event would be assigned the same token in the -- following format: -- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@. clientRequestToken :: Prelude.Maybe Prelude.Text, -- | Specify the hook failure mode for non-compliant resources in the -- followings ways. -- -- - @FAIL@ Stops provisioning resources. -- -- - @WARN@ Allows provisioning to continue with a warning message. hookFailureMode :: Prelude.Maybe HookFailureMode, -- | Invocation points are points in provisioning logic where hooks are -- initiated. hookInvocationPoint :: Prelude.Maybe HookInvocationPoint, -- | Provides the status of the change set hook. hookStatus :: Prelude.Maybe HookStatus, -- | Provides the reason for the hook status. hookStatusReason :: Prelude.Maybe Prelude.Text, -- | The name of the hook. hookType :: Prelude.Maybe Prelude.Text, -- | The logical name of the resource specified in the template. logicalResourceId :: Prelude.Maybe Prelude.Text, -- | The name or unique identifier associated with the physical instance of -- the resource. physicalResourceId :: Prelude.Maybe Prelude.Text, -- | BLOB of the properties used to create the resource. resourceProperties :: Prelude.Maybe Prelude.Text, -- | Current status of the resource. resourceStatus :: Prelude.Maybe ResourceStatus, -- | Success\/failure message associated with the resource. resourceStatusReason :: Prelude.Maybe Prelude.Text, -- | Type of resource. (For more information, go to -- -- in the CloudFormation User Guide.) resourceType :: Prelude.Maybe Prelude.Text, -- | The unique ID name of the instance of the stack. stackId :: Prelude.Text, -- | The unique ID of this event. eventId :: Prelude.Text, -- | The name associated with a stack. stackName :: Prelude.Text, -- | Time the status was updated. timestamp :: Data.ISO8601 } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'StackEvent' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'clientRequestToken', 'stackEvent_clientRequestToken' - The token passed to the operation that generated this event. -- -- All events triggered by a given stack operation are assigned the same -- client request token, which you can use to track operations. For -- example, if you execute a @CreateStack@ operation with the token -- @token1@, then all the @StackEvents@ generated by that operation will -- have @ClientRequestToken@ set as @token1@. -- -- In the console, stack operations display the client request token on the -- Events tab. Stack operations that are initiated from the console use the -- token format /Console-StackOperation-ID/, which helps you easily -- identify the stack operation . For example, if you create a stack using -- the console, each stack event would be assigned the same token in the -- following format: -- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@. -- -- 'hookFailureMode', 'stackEvent_hookFailureMode' - Specify the hook failure mode for non-compliant resources in the -- followings ways. -- -- - @FAIL@ Stops provisioning resources. -- -- - @WARN@ Allows provisioning to continue with a warning message. -- -- 'hookInvocationPoint', 'stackEvent_hookInvocationPoint' - Invocation points are points in provisioning logic where hooks are -- initiated. -- -- 'hookStatus', 'stackEvent_hookStatus' - Provides the status of the change set hook. -- -- 'hookStatusReason', 'stackEvent_hookStatusReason' - Provides the reason for the hook status. -- -- 'hookType', 'stackEvent_hookType' - The name of the hook. -- -- 'logicalResourceId', 'stackEvent_logicalResourceId' - The logical name of the resource specified in the template. -- -- 'physicalResourceId', 'stackEvent_physicalResourceId' - The name or unique identifier associated with the physical instance of -- the resource. -- -- 'resourceProperties', 'stackEvent_resourceProperties' - BLOB of the properties used to create the resource. -- -- 'resourceStatus', 'stackEvent_resourceStatus' - Current status of the resource. -- -- 'resourceStatusReason', 'stackEvent_resourceStatusReason' - Success\/failure message associated with the resource. -- -- 'resourceType', 'stackEvent_resourceType' - Type of resource. (For more information, go to -- -- in the CloudFormation User Guide.) -- -- 'stackId', 'stackEvent_stackId' - The unique ID name of the instance of the stack. -- -- 'eventId', 'stackEvent_eventId' - The unique ID of this event. -- -- 'stackName', 'stackEvent_stackName' - The name associated with a stack. -- -- 'timestamp', 'stackEvent_timestamp' - Time the status was updated. newStackEvent :: -- | 'stackId' Prelude.Text -> -- | 'eventId' Prelude.Text -> -- | 'stackName' Prelude.Text -> -- | 'timestamp' Prelude.UTCTime -> StackEvent newStackEvent pStackId_ pEventId_ pStackName_ pTimestamp_ = StackEvent' { clientRequestToken = Prelude.Nothing, hookFailureMode = Prelude.Nothing, hookInvocationPoint = Prelude.Nothing, hookStatus = Prelude.Nothing, hookStatusReason = Prelude.Nothing, hookType = Prelude.Nothing, logicalResourceId = Prelude.Nothing, physicalResourceId = Prelude.Nothing, resourceProperties = Prelude.Nothing, resourceStatus = Prelude.Nothing, resourceStatusReason = Prelude.Nothing, resourceType = Prelude.Nothing, stackId = pStackId_, eventId = pEventId_, stackName = pStackName_, timestamp = Data._Time Lens.# pTimestamp_ } -- | The token passed to the operation that generated this event. -- -- All events triggered by a given stack operation are assigned the same -- client request token, which you can use to track operations. For -- example, if you execute a @CreateStack@ operation with the token -- @token1@, then all the @StackEvents@ generated by that operation will -- have @ClientRequestToken@ set as @token1@. -- -- In the console, stack operations display the client request token on the -- Events tab. Stack operations that are initiated from the console use the -- token format /Console-StackOperation-ID/, which helps you easily -- identify the stack operation . For example, if you create a stack using -- the console, each stack event would be assigned the same token in the -- following format: -- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@. stackEvent_clientRequestToken :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text) stackEvent_clientRequestToken = Lens.lens (\StackEvent' {clientRequestToken} -> clientRequestToken) (\s@StackEvent' {} a -> s {clientRequestToken = a} :: StackEvent) -- | Specify the hook failure mode for non-compliant resources in the -- followings ways. -- -- - @FAIL@ Stops provisioning resources. -- -- - @WARN@ Allows provisioning to continue with a warning message. stackEvent_hookFailureMode :: Lens.Lens' StackEvent (Prelude.Maybe HookFailureMode) stackEvent_hookFailureMode = Lens.lens (\StackEvent' {hookFailureMode} -> hookFailureMode) (\s@StackEvent' {} a -> s {hookFailureMode = a} :: StackEvent) -- | Invocation points are points in provisioning logic where hooks are -- initiated. stackEvent_hookInvocationPoint :: Lens.Lens' StackEvent (Prelude.Maybe HookInvocationPoint) stackEvent_hookInvocationPoint = Lens.lens (\StackEvent' {hookInvocationPoint} -> hookInvocationPoint) (\s@StackEvent' {} a -> s {hookInvocationPoint = a} :: StackEvent) -- | Provides the status of the change set hook. stackEvent_hookStatus :: Lens.Lens' StackEvent (Prelude.Maybe HookStatus) stackEvent_hookStatus = Lens.lens (\StackEvent' {hookStatus} -> hookStatus) (\s@StackEvent' {} a -> s {hookStatus = a} :: StackEvent) -- | Provides the reason for the hook status. stackEvent_hookStatusReason :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text) stackEvent_hookStatusReason = Lens.lens (\StackEvent' {hookStatusReason} -> hookStatusReason) (\s@StackEvent' {} a -> s {hookStatusReason = a} :: StackEvent) -- | The name of the hook. stackEvent_hookType :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text) stackEvent_hookType = Lens.lens (\StackEvent' {hookType} -> hookType) (\s@StackEvent' {} a -> s {hookType = a} :: StackEvent) -- | The logical name of the resource specified in the template. stackEvent_logicalResourceId :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text) stackEvent_logicalResourceId = Lens.lens (\StackEvent' {logicalResourceId} -> logicalResourceId) (\s@StackEvent' {} a -> s {logicalResourceId = a} :: StackEvent) -- | The name or unique identifier associated with the physical instance of -- the resource. stackEvent_physicalResourceId :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text) stackEvent_physicalResourceId = Lens.lens (\StackEvent' {physicalResourceId} -> physicalResourceId) (\s@StackEvent' {} a -> s {physicalResourceId = a} :: StackEvent) -- | BLOB of the properties used to create the resource. stackEvent_resourceProperties :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text) stackEvent_resourceProperties = Lens.lens (\StackEvent' {resourceProperties} -> resourceProperties) (\s@StackEvent' {} a -> s {resourceProperties = a} :: StackEvent) -- | Current status of the resource. stackEvent_resourceStatus :: Lens.Lens' StackEvent (Prelude.Maybe ResourceStatus) stackEvent_resourceStatus = Lens.lens (\StackEvent' {resourceStatus} -> resourceStatus) (\s@StackEvent' {} a -> s {resourceStatus = a} :: StackEvent) -- | Success\/failure message associated with the resource. stackEvent_resourceStatusReason :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text) stackEvent_resourceStatusReason = Lens.lens (\StackEvent' {resourceStatusReason} -> resourceStatusReason) (\s@StackEvent' {} a -> s {resourceStatusReason = a} :: StackEvent) -- | Type of resource. (For more information, go to -- -- in the CloudFormation User Guide.) stackEvent_resourceType :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text) stackEvent_resourceType = Lens.lens (\StackEvent' {resourceType} -> resourceType) (\s@StackEvent' {} a -> s {resourceType = a} :: StackEvent) -- | The unique ID name of the instance of the stack. stackEvent_stackId :: Lens.Lens' StackEvent Prelude.Text stackEvent_stackId = Lens.lens (\StackEvent' {stackId} -> stackId) (\s@StackEvent' {} a -> s {stackId = a} :: StackEvent) -- | The unique ID of this event. stackEvent_eventId :: Lens.Lens' StackEvent Prelude.Text stackEvent_eventId = Lens.lens (\StackEvent' {eventId} -> eventId) (\s@StackEvent' {} a -> s {eventId = a} :: StackEvent) -- | The name associated with a stack. stackEvent_stackName :: Lens.Lens' StackEvent Prelude.Text stackEvent_stackName = Lens.lens (\StackEvent' {stackName} -> stackName) (\s@StackEvent' {} a -> s {stackName = a} :: StackEvent) -- | Time the status was updated. stackEvent_timestamp :: Lens.Lens' StackEvent Prelude.UTCTime stackEvent_timestamp = Lens.lens (\StackEvent' {timestamp} -> timestamp) (\s@StackEvent' {} a -> s {timestamp = a} :: StackEvent) Prelude.. Data._Time instance Data.FromXML StackEvent where parseXML x = StackEvent' Prelude.<$> (x Data..@? "ClientRequestToken") Prelude.<*> (x Data..@? "HookFailureMode") Prelude.<*> (x Data..@? "HookInvocationPoint") Prelude.<*> (x Data..@? "HookStatus") Prelude.<*> (x Data..@? "HookStatusReason") Prelude.<*> (x Data..@? "HookType") Prelude.<*> (x Data..@? "LogicalResourceId") Prelude.<*> (x Data..@? "PhysicalResourceId") Prelude.<*> (x Data..@? "ResourceProperties") Prelude.<*> (x Data..@? "ResourceStatus") Prelude.<*> (x Data..@? "ResourceStatusReason") Prelude.<*> (x Data..@? "ResourceType") Prelude.<*> (x Data..@ "StackId") Prelude.<*> (x Data..@ "EventId") Prelude.<*> (x Data..@ "StackName") Prelude.<*> (x Data..@ "Timestamp") instance Prelude.Hashable StackEvent where hashWithSalt _salt StackEvent' {..} = _salt `Prelude.hashWithSalt` clientRequestToken `Prelude.hashWithSalt` hookFailureMode `Prelude.hashWithSalt` hookInvocationPoint `Prelude.hashWithSalt` hookStatus `Prelude.hashWithSalt` hookStatusReason `Prelude.hashWithSalt` hookType `Prelude.hashWithSalt` logicalResourceId `Prelude.hashWithSalt` physicalResourceId `Prelude.hashWithSalt` resourceProperties `Prelude.hashWithSalt` resourceStatus `Prelude.hashWithSalt` resourceStatusReason `Prelude.hashWithSalt` resourceType `Prelude.hashWithSalt` stackId `Prelude.hashWithSalt` eventId `Prelude.hashWithSalt` stackName `Prelude.hashWithSalt` timestamp instance Prelude.NFData StackEvent where rnf StackEvent' {..} = Prelude.rnf clientRequestToken `Prelude.seq` Prelude.rnf hookFailureMode `Prelude.seq` Prelude.rnf hookInvocationPoint `Prelude.seq` Prelude.rnf hookStatus `Prelude.seq` Prelude.rnf hookStatusReason `Prelude.seq` Prelude.rnf hookType `Prelude.seq` Prelude.rnf logicalResourceId `Prelude.seq` Prelude.rnf physicalResourceId `Prelude.seq` Prelude.rnf resourceProperties `Prelude.seq` Prelude.rnf resourceStatus `Prelude.seq` Prelude.rnf resourceStatusReason `Prelude.seq` Prelude.rnf resourceType `Prelude.seq` Prelude.rnf stackId `Prelude.seq` Prelude.rnf eventId `Prelude.seq` Prelude.rnf stackName `Prelude.seq` Prelude.rnf timestamp