-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stepfunctions: Operation enum like for dynamodb #29948
Comments
Can you elaborate what exactly do you need with some code snippets or specify which construct class or properties do you need the enum support? |
const dynamodb = require('aws-cdk-lib/aws-dynamodb');
const role = new iam.Role(this, 'MyRole', {
assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com')
});
role.addToPolicy(new iam.PolicyStatement({
resources: [ /* some dynamodb table ARN */ ],
actions: ['dynamodb:' + dynamodb.Operation.PUT_ITEM]
})); Such useful feature is not present in const stepfunctions = require('aws-cdk-lib/aws-stepfunctions');
const role = new iam.Role(this, 'HandleNewAlbumEventRole', {
assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com')
});
role.addToPolicy(new iam.PolicyStatement({
resources: [ /* some stepfunctions state machine arn */ ],
actions: ['states:StartExecution'] // <- HERE
})); |
Hi @xfudox :) I really appreciate the idea of having an enum for the actions, so that an user of the CDK does not need to search for all the available actions in the documentation. What do you think about that? I would be interested in your opinion :) [1] https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachine.html#methods |
@daschaa sorry for the late reply. Thanks for the help and agai, sorry for my late reply. |
@xfudox No worries :) If the issue is resolved for you, can you close the issue? :) |
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the feature
It would be useful to have an
Operation
enum like fordynamodb
that lists all the available operations.Use Case
Without an enum, writing code that assign actions to policies relies on literal strings and so the ide is not capable to suggest autocomplete options.
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.128.0 (build d995261)
Environment details (OS name and version, etc.)
Ubuntu 22.04.4 LTS 64-bit
The text was updated successfully, but these errors were encountered: