Class CfnDeliverySource
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.logs.CfnDeliverySource
- All Implemented Interfaces:
IInspectable,ITaggableV2,IDeliverySourceRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:15.207Z")
@Stability(Stable)
public class CfnDeliverySource
extends CfnResource
implements IInspectable, IDeliverySourceRef, ITaggableV2
Creates or updates 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.
- Create a delivery destination , which is a logical object that represents the actual delivery destination. For more information, see AWS::Logs::DeliveryDestination or PutDeliveryDestination .
- Create a delivery by pairing exactly one delivery source and one delivery destination. For more information, see AWS::Logs::Delivery or 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:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.logs.IDeliverySourceRef
IDeliverySourceRef.Jsii$Default, IDeliverySourceRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDeliverySource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDeliverySource(software.amazon.jsii.JsiiObjectRef objRef) CfnDeliverySource(software.constructs.Construct scope, String id, CfnDeliverySourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IDeliverySourceReffromDeliverySourceArn(software.constructs.Construct scope, String id, String arn) Creates a new IDeliverySourceRef from an ARN.static IDeliverySourceReffromDeliverySourceName(software.constructs.Construct scope, String id, String deliverySourceName) Creates a new IDeliverySourceRef from a deliverySourceName.The Amazon Resource Name (ARN) that uniquely identifies this delivery source.This array contains the ARN of the AWS resource that sends logs and is represented by this delivery source.The AWS service that is sending logs.Tag Manager which manages the tags for this resource.A reference to a DeliverySource resource.The type of log that the source is sending.getName()The unique name of the delivery source.The ARN of the AWS resource that is generating and sending logs.getTags()An array of key-value pairs to apply to the delivery source.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetLogType(String value) The type of log that the source is sending.voidThe unique name of the delivery source.voidsetResourceArn(String value) The ARN of the AWS resource that is generating and sending logs.voidAn array of key-value pairs to apply to the delivery source.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
-
fromDeliverySourceArn
@Stability(Stable) @NotNull public static IDeliverySourceRef fromDeliverySourceArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IDeliverySourceRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromDeliverySourceName
@Stability(Stable) @NotNull public static IDeliverySourceRef fromDeliverySourceName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String deliverySourceName) Creates a new IDeliverySourceRef from a deliverySourceName.- Parameters:
scope- This parameter is required.id- This parameter is required.deliverySourceName- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) that uniquely identifies this delivery source. -
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
The AWS service that is sending logs. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDeliverySourceRef
A reference to a DeliverySource resource.- Specified by:
getDeliverySourceRefin interfaceIDeliverySourceRef
-
getName
The unique name of the delivery source. -
setName
The unique name of the delivery source. -
getLogType
The type of log that the source is sending. -
setLogType
The type of log that the source is sending. -
getResourceArn
The ARN of the AWS resource that is generating and sending logs. -
setResourceArn
The ARN of the AWS resource that is generating and sending logs. -
getTags
An array of key-value pairs to apply to the delivery source. -
setTags
An array of key-value pairs to apply to the delivery source.
-