diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts index e00fd1f25b72f..71792fbd146cf 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts @@ -358,7 +358,7 @@ export class DeliveryStream extends DeliveryStreamBase { readStreamGrant = props.source.grantRead(this._role); } - const destinationConfig = props.destination.bind(this, {}); + const destinationConfig = props.destination._bind(this, {}); const sourceConfig = props.source?._bind(this, this._role?.roleArn); const resource = new CfnDeliveryStream(this, 'Resource', { diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/destination.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/destination.ts index 8993ee66e2352..8a7c6afbf2fab 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/destination.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/destination.ts @@ -34,6 +34,8 @@ export interface IDestination { * Binds this destination to the Kinesis Data Firehose delivery stream. * * Implementers should use this method to bind resources to the stack and initialize values using the provided stream. + * + * @internal */ - bind(scope: Construct, options: DestinationBindOptions): DestinationConfig; + _bind(scope: Construct, options: DestinationBindOptions): DestinationConfig; } diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/lambda-function-processor.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/lambda-function-processor.ts index 447f5e2196521..d8e637bc07a69 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/lambda-function-processor.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/lambda-function-processor.ts @@ -15,7 +15,10 @@ export class LambdaFunctionProcessor implements IDataProcessor { this.props = props; } - public bind(_scope: Construct, options: DataProcessorBindOptions): DataProcessorConfig { + /** + * @internal + */ + public _bind(_scope: Construct, options: DataProcessorBindOptions): DataProcessorConfig { this.lambdaFunction.grantInvoke(options.role); return { diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/processor.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/processor.ts index b5157f5872e01..11f90eacca714 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/processor.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/processor.ts @@ -91,6 +91,8 @@ export interface IDataProcessor { * * Implementers should use this method to grant processor invocation permissions to the provided stream and return the * necessary configuration to register as a processor. + * + * @internal */ - bind(scope: Construct, options: DataProcessorBindOptions): DataProcessorConfig; + _bind(scope: Construct, options: DataProcessorBindOptions): DataProcessorConfig; } diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/delivery-stream.test.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/delivery-stream.test.ts index 8a253966b3158..e5c401a507242 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/delivery-stream.test.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/delivery-stream.test.ts @@ -27,7 +27,7 @@ describe('delivery stream', () => { assumedBy: new iam.ServicePrincipal('firehose.amazonaws.com'), }); mockS3Destination = { - bind(scope: Construct, _options: firehose.DestinationBindOptions): firehose.DestinationConfig { + _bind(scope: Construct, _options: firehose.DestinationBindOptions): firehose.DestinationConfig { dependable = new class extends Construct { constructor(depScope: Construct, id: string) { super(depScope, id); diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.source-stream.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.source-stream.ts index 3d2441f2f018a..f75adb11fdc78 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.source-stream.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.source-stream.ts @@ -20,7 +20,7 @@ const role = new iam.Role(stack, 'Role', { }); const mockS3Destination: firehose.IDestination = { - bind(_scope: constructs.Construct, _options: firehose.DestinationBindOptions): firehose.DestinationConfig { + _bind(_scope: constructs.Construct, _options: firehose.DestinationBindOptions): firehose.DestinationConfig { const bucketGrant = bucket.grantReadWrite(role); return { extendedS3DestinationConfiguration: { diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.ts index 633e1fc0b5b2d..dfcc5d9f8f6a0 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.ts @@ -19,7 +19,7 @@ const role = new iam.Role(stack, 'Role', { }); const mockS3Destination: firehose.IDestination = { - bind(_scope: constructs.Construct, _options: firehose.DestinationBindOptions): firehose.DestinationConfig { + _bind(_scope: constructs.Construct, _options: firehose.DestinationBindOptions): firehose.DestinationConfig { const bucketGrant = bucket.grantReadWrite(role); return { extendedS3DestinationConfiguration: { diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.kinesis-stream-events-target.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.kinesis-stream-events-target.ts index a3d65c30c589d..54b90ad642cf0 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.kinesis-stream-events-target.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.kinesis-stream-events-target.ts @@ -21,7 +21,7 @@ const role = new iam.Role(stack, 'Role', { }); const mockS3Destination: firehose.IDestination = { - bind(_scope: constructs.Construct, _options: firehose.DestinationBindOptions): firehose.DestinationConfig { + _bind(_scope: constructs.Construct, _options: firehose.DestinationBindOptions): firehose.DestinationConfig { const bucketGrant = bucket.grantReadWrite(role); return { extendedS3DestinationConfiguration: { diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/lib/private/helpers.ts b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/lib/private/helpers.ts index 969db751a0283..7da0b01d10824 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/lib/private/helpers.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/lib/private/helpers.ts @@ -115,7 +115,7 @@ function renderDataProcessor( scope: Construct, role: iam.IRole, ): CfnDeliveryStream.ProcessorProperty { - const processorConfig = processor.bind(scope, { role }); + const processorConfig = processor._bind(scope, { role }); const parameters = [{ parameterName: 'RoleArn', parameterValue: role.roleArn }]; parameters.push(processorConfig.processorIdentifier); if (processor.props.bufferInterval) {