java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITriggerRef, IEnvironmentAware, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:07.600Z") @Stability(Stable) public class CfnTrigger extends CfnResource implements IInspectable, ITriggerRef
Resource Type definition for AWS::DevOpsAgent::Trigger.

A trigger defines an automated action that fires on a schedule within an Agent Space.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.devopsagent.*;
 Object action;
 CfnTrigger cfnTrigger = CfnTrigger.Builder.create(this, "MyCfnTrigger")
         .action(action)
         .agentSpaceId("agentSpaceId")
         .condition(ConditionProperty.builder()
                 .schedule(ScheduleProperty.builder()
                         .expression("expression")
                         .build())
                 .build())
         .type("type")
         // the properties below are optional
         .status("status")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTrigger

      protected CfnTrigger(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTrigger

      protected CfnTrigger(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTrigger

      @Stability(Stable) public CfnTrigger(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTriggerProps props)
      Create a new AWS::DevOpsAgent::Trigger.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForTrigger

      @Stability(Stable) @NotNull public static String arnForTrigger(@NotNull ITriggerRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnTrigger

      @Stability(Stable) @NotNull public static Boolean isCfnTrigger(@NotNull Object x)
      Checks whether the given object is a CfnTrigger.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the trigger.

      Nested under the parent Agent Space: arn::aidevops::invalid input: '<'account-id>:agentspace/invalid input: '<'agentspace-id>/trigger/invalid input: '<'trigger-id>.

    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The timestamp when the trigger was created.
    • getAttrTriggerId

      @Stability(Stable) @NotNull public String getAttrTriggerId()
      The unique identifier of the trigger (assigned by the service on Create).
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The timestamp when the trigger was last updated.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getTriggerRef

      @Stability(Stable) @NotNull public TriggerReference getTriggerRef()
      A reference to a Trigger resource.
      Specified by:
      getTriggerRef in interface ITriggerRef
    • getAction

      @Stability(Stable) @NotNull public Object getAction()
      The action to perform when the trigger fires.
    • setAction

      @Stability(Stable) public void setAction(@NotNull Object value)
      The action to perform when the trigger fires.
    • getAgentSpaceId

      @Stability(Stable) @NotNull public String getAgentSpaceId()
      The unique identifier of the parent Agent Space.
    • setAgentSpaceId

      @Stability(Stable) public void setAgentSpaceId(@NotNull String value)
      The unique identifier of the parent Agent Space.
    • getCondition

      @Stability(Stable) @NotNull public Object getCondition()
      The condition that causes the trigger to fire.

      Returns union: either IResolvable or CfnTrigger.ConditionProperty

    • setCondition

      @Stability(Stable) public void setCondition(@NotNull IResolvable value)
      The condition that causes the trigger to fire.
    • setCondition

      @Stability(Stable) public void setCondition(@NotNull CfnTrigger.ConditionProperty value)
      The condition that causes the trigger to fire.
    • getType

      @Stability(Stable) @NotNull public String getType()
      The type of trigger.
    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The type of trigger.
    • getStatus

      @Stability(Stable) @Nullable public String getStatus()
      The status of the trigger.
    • setStatus

      @Stability(Stable) public void setStatus(@Nullable String value)
      The status of the trigger.