Class FlowLogResourceType

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.FlowLogResourceType
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.315Z") @Stability(Stable) public abstract class FlowLogResourceType extends software.amazon.jsii.JsiiObject
The type of resource to create the flow log for.

Example:

 Vpc vpc;
 LogGroup logGroup = new LogGroup(this, "MyCustomLogGroup");
 Role role = Role.Builder.create(this, "MyCustomRole")
         .assumedBy(new ServicePrincipal("vpc-flow-logs.amazonaws.com"))
         .build();
 FlowLog.Builder.create(this, "FlowLog")
         .resourceType(FlowLogResourceType.fromVpc(vpc))
         .destination(FlowLogDestination.toCloudWatchLogs(logGroup, role))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    FlowLogResourceType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    FlowLogResourceType(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The Network Interface to attach the Flow Log to.
    The subnet to attach the Flow Log to.
    The VPC to attach the Flow Log to.
    abstract String
    The Id of the resource that the flow log should be attached to.
    abstract String
    The type of resource to attach a flow log to.
    abstract void
    The Id of the resource that the flow log should be attached to.
    abstract void
    The type of resource to attach a flow log to.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • FlowLogResourceType

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

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

      @Stability(Stable) protected FlowLogResourceType()
  • Method Details

    • fromNetworkInterfaceId

      @Stability(Stable) @NotNull public static FlowLogResourceType fromNetworkInterfaceId(@NotNull String id)
      The Network Interface to attach the Flow Log to.

      Parameters:
      id - This parameter is required.
    • fromSubnet

      @Stability(Stable) @NotNull public static FlowLogResourceType fromSubnet(@NotNull ISubnet subnet)
      The subnet to attach the Flow Log to.

      Parameters:
      subnet - This parameter is required.
    • fromVpc

      @Stability(Stable) @NotNull public static FlowLogResourceType fromVpc(@NotNull IVpc vpc)
      The VPC to attach the Flow Log to.

      Parameters:
      vpc - This parameter is required.
    • getResourceId

      @Stability(Stable) @NotNull public abstract String getResourceId()
      The Id of the resource that the flow log should be attached to.
    • setResourceId

      @Stability(Stable) public abstract void setResourceId(@NotNull String value)
      The Id of the resource that the flow log should be attached to.
    • getResourceType

      @Stability(Stable) @NotNull public abstract String getResourceType()
      The type of resource to attach a flow log to.
    • setResourceType

      @Stability(Stable) public abstract void setResourceType(@NotNull String value)
      The type of resource to attach a flow log to.