Class CfnScheduledQuery

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

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-23T18:58:22.068Z") @Stability(Stable) public class CfnScheduledQuery extends CfnResource implements IInspectable, IScheduledQueryRef, ITaggableV2
Creates a new Scheduled Query that allows you to define a Logs Insights query that will run on a schedule and configure actions to take with the query results.

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.logs.*;
 CfnScheduledQuery cfnScheduledQuery = CfnScheduledQuery.Builder.create(this, "MyCfnScheduledQuery")
         .executionRoleArn("executionRoleArn")
         .name("name")
         .queryLanguage("queryLanguage")
         .queryString("queryString")
         .scheduleExpression("scheduleExpression")
         // the properties below are optional
         .description("description")
         .destinationConfiguration(DestinationConfigurationProperty.builder()
                 .s3Configuration(S3ConfigurationProperty.builder()
                         .destinationIdentifier("destinationIdentifier")
                         .roleArn("roleArn")
                         .build())
                 .build())
         .logGroupIdentifiers(List.of("logGroupIdentifiers"))
         .scheduleEndTime(123)
         .scheduleStartTime(123)
         .startTimeOffset(123)
         .state("state")
         .tags(List.of(TagsItemsProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .timezone("timezone")
         .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

    • CfnScheduledQuery

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

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

      @Stability(Stable) public CfnScheduledQuery(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnScheduledQueryProps props)
      Create a new AWS::Logs::ScheduledQuery.

      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

    • arnForScheduledQuery

      @Stability(Stable) @NotNull public static String arnForScheduledQuery(@NotNull IScheduledQueryRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnScheduledQuery

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

      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.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public IResolvable getAttrCreationTime()
    • getAttrLastExecutionStatus

      @Stability(Stable) @NotNull public String getAttrLastExecutionStatus()
    • getAttrLastTriggeredTime

      @Stability(Stable) @NotNull public IResolvable getAttrLastTriggeredTime()
    • getAttrLastUpdatedTime

      @Stability(Stable) @NotNull public IResolvable getAttrLastUpdatedTime()
    • getAttrScheduledQueryArn

      @Stability(Stable) @NotNull public String getAttrScheduledQueryArn()
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

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

      @Stability(Stable) @NotNull public ScheduledQueryReference getScheduledQueryRef()
      A reference to a ScheduledQuery resource.
      Specified by:
      getScheduledQueryRef in interface IScheduledQueryRef
    • getExecutionRoleArn

      @Stability(Stable) @NotNull public String getExecutionRoleArn()
    • setExecutionRoleArn

      @Stability(Stable) public void setExecutionRoleArn(@NotNull String value)
    • getName

      @Stability(Stable) @NotNull public String getName()
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
    • getQueryLanguage

      @Stability(Stable) @NotNull public String getQueryLanguage()
    • setQueryLanguage

      @Stability(Stable) public void setQueryLanguage(@NotNull String value)
    • getQueryString

      @Stability(Stable) @NotNull public String getQueryString()
    • setQueryString

      @Stability(Stable) public void setQueryString(@NotNull String value)
    • getScheduleExpression

      @Stability(Stable) @NotNull public String getScheduleExpression()
    • setScheduleExpression

      @Stability(Stable) public void setScheduleExpression(@NotNull String value)
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
    • getDestinationConfiguration

      @Stability(Stable) @Nullable public Object getDestinationConfiguration()
    • setDestinationConfiguration

      @Stability(Stable) public void setDestinationConfiguration(@Nullable IResolvable value)
    • setDestinationConfiguration

      @Stability(Stable) public void setDestinationConfiguration(@Nullable CfnScheduledQuery.DestinationConfigurationProperty value)
    • getLogGroupIdentifiers

      @Stability(Stable) @Nullable public List<String> getLogGroupIdentifiers()
    • setLogGroupIdentifiers

      @Stability(Stable) public void setLogGroupIdentifiers(@Nullable List<String> value)
    • getScheduleEndTime

      @Stability(Stable) @Nullable public Number getScheduleEndTime()
    • setScheduleEndTime

      @Stability(Stable) public void setScheduleEndTime(@Nullable Number value)
    • getScheduleStartTime

      @Stability(Stable) @Nullable public Number getScheduleStartTime()
    • setScheduleStartTime

      @Stability(Stable) public void setScheduleStartTime(@Nullable Number value)
    • getStartTimeOffset

      @Stability(Stable) @Nullable public Number getStartTimeOffset()
    • setStartTimeOffset

      @Stability(Stable) public void setStartTimeOffset(@Nullable Number value)
    • getState

      @Stability(Stable) @Nullable public String getState()
    • setState

      @Stability(Stable) public void setState(@Nullable String value)
    • getTags

      @Stability(Stable) @Nullable public List<CfnScheduledQuery.TagsItemsProperty> getTags()
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnScheduledQuery.TagsItemsProperty> value)
    • getTimezone

      @Stability(Stable) @Nullable public String getTimezone()
    • setTimezone

      @Stability(Stable) public void setTimezone(@Nullable String value)