Class CfnDeliverySource

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-15T10:25:01.958Z") @Stability(Stable) public class CfnDeliverySource extends CfnResource implements IInspectable, ITaggableV2
This structure contains information about one delivery source in your account.

A delivery source is an AWS resource that sends logs to an AWS destination. The destination can be CloudWatch Logs, Amazon S3, or Firehose.

Only some AWS services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at Enabling logging from AWS services.

To configure logs delivery between a supported AWS service and a destination, you must do the following:

  • Create a delivery source, which is a logical object that represents the resource that is actually sending the logs. For more information, see PutDeliverySource .
  • Create a delivery destination , which is a logical object that represents the actual delivery destination. For more information, see PutDeliveryDestination .
  • If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy in the destination account to assign an IAM policy to the destination. This policy allows delivery to that destination.
  • Create a delivery by pairing exactly one delivery source and one delivery destination. For more information, see CreateDelivery .

You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

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.*;
 CfnDeliverySource cfnDeliverySource = CfnDeliverySource.Builder.create(this, "MyCfnDeliverySource")
         .name("name")
         // the properties below are optional
         .logType("logType")
         .resourceArn("resourceArn")
         .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

    • CfnDeliverySource

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

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

      @Stability(Stable) public CfnDeliverySource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDeliverySourceProps props)
      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

    • 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) that uniquely identifies this delivery source.
    • getAttrResourceArns

      @Stability(Stable) @NotNull public List<String> getAttrResourceArns()
      This array contains the ARN of the AWS resource that sends logs and is represented by this delivery source.

      Currently, only one ARN can be in the array.

    • getAttrService

      @Stability(Stable) @NotNull public String getAttrService()
      The AWS service that is sending logs.
    • 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
    • getName

      @Stability(Stable) @NotNull public String getName()
      The unique name of the delivery source.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The unique name of the delivery source.
    • getLogType

      @Stability(Stable) @Nullable public String getLogType()
      The type of log that the source is sending.
    • setLogType

      @Stability(Stable) public void setLogType(@Nullable String value)
      The type of log that the source is sending.
    • getResourceArn

      @Stability(Stable) @Nullable public String getResourceArn()
      The Amazon Resource Name (ARN) that uniquely identifies this delivery source.
    • setResourceArn

      @Stability(Stable) public void setResourceArn(@Nullable String value)
      The Amazon Resource Name (ARN) that uniquely identifies this delivery source.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags that have been assigned to this delivery source.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags that have been assigned to this delivery source.