-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
676b955
commit cb50b20
Showing
2 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/@aws-cdk/aws-pipes-targets-alpha/rosetta/default.ts-fixture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Fixture with packages imported, but nothing else | ||
import * as cdk from 'aws-cdk-lib'; | ||
import * as sqs from 'aws-cdk-lib/aws-sqs'; | ||
import { Construct } from 'constructs'; | ||
import * as pipes from '@aws-cdk/aws-pipes-alpha'; | ||
import * as targets from '@aws-cdk/aws-pipes-targets-alpha'; | ||
|
||
class SomeSource implements pipes.ISource { | ||
sourceArn: string; | ||
sourceParameters = undefined; | ||
constructor(private readonly queue: sqs.Queue) { | ||
this.queue = queue; | ||
this.sourceArn = queue.queueArn; | ||
} | ||
bind(_pipe: pipes.IPipe): pipes.SourceConfig { | ||
return { | ||
sourceParameters: this.sourceParameters, | ||
}; | ||
} | ||
grantRead(pipeRole: cdk.aws_iam.IRole): void { | ||
this.queue.grantConsumeMessages(pipeRole); | ||
} | ||
} | ||
|
||
class Fixture extends cdk.Stack { | ||
constructor(scope: Construct, id: string) { | ||
super(scope, id); | ||
/// here | ||
} | ||
} |