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

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-08-10T14:51:07.375Z") @Stability(Stable) public class CfnMonitor extends CfnResource implements IInspectable, IMonitorRef, ITaggableV2
Creates a monitor for specific network flows between local and remote resources to monitor network performance for workloads.

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.networkflowmonitor.*;
 CfnMonitor cfnMonitor = CfnMonitor.Builder.create(this, "MyCfnMonitor")
         .localResources(List.of(MonitorLocalResourceProperty.builder()
                 .identifier("identifier")
                 .type("type")
                 .build()))
         .monitorName("monitorName")
         // the properties below are optional
         .remoteResources(List.of(MonitorRemoteResourceProperty.builder()
                 .identifier("identifier")
                 .type("type")
                 .build()))
         .scopeArn("scopeArn")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .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

    • CfnMonitor

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

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

      @Stability(Stable) public CfnMonitor(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnMonitorProps props)
      Create a new AWS::NetworkFlowMonitor::Monitor.

      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

    • arnForMonitor

      @Stability(Stable) @NotNull public static String arnForMonitor(@NotNull IMonitorRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnMonitor

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

      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 monitor.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The date and time when the monitor was created.
    • getAttrModifiedAt

      @Stability(Stable) @NotNull public String getAttrModifiedAt()
      The date and time when the monitor was last modified.
    • getAttrMonitorStatus

      @Stability(Stable) @NotNull public String getAttrMonitorStatus()
      The status of the monitor.
    • 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
    • getCfnPropertyNames

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

      @Stability(Stable) @NotNull public MonitorReference getMonitorRef()
      A reference to a Monitor resource.
      Specified by:
      getMonitorRef in interface IMonitorRef
    • getLocalResources

      @Stability(Stable) @NotNull public Object getLocalResources()
      The local resources to monitor.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnMonitor.MonitorLocalResourceProperty>

    • setLocalResources

      @Stability(Stable) public void setLocalResources(@NotNull IResolvable value)
      The local resources to monitor.
    • setLocalResources

      @Stability(Stable) public void setLocalResources(@NotNull List<Object> value)
      The local resources to monitor.
    • getMonitorName

      @Stability(Stable) @NotNull public String getMonitorName()
      The name of the monitor.
    • setMonitorName

      @Stability(Stable) public void setMonitorName(@NotNull String value)
      The name of the monitor.
    • getRemoteResources

      @Stability(Stable) @Nullable public Object getRemoteResources()
      The remote resources to monitor.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnMonitor.MonitorRemoteResourceProperty>

    • setRemoteResources

      @Stability(Stable) public void setRemoteResources(@Nullable IResolvable value)
      The remote resources to monitor.
    • setRemoteResources

      @Stability(Stable) public void setRemoteResources(@Nullable List<Object> value)
      The remote resources to monitor.
    • getScopeArn

      @Stability(Stable) @Nullable public String getScopeArn()
      The Amazon Resource Name (ARN) of the scope for the monitor.
    • setScopeArn

      @Stability(Stable) public void setScopeArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the scope for the monitor.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags for the monitor.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags for the monitor.