awsdocs / aws-cdk-guide

User guide for the AWS Cloud Development Kit (CDK).
Other
335 stars 222 forks source link

Construct prop defaultArguments? accepts only JSON in AWS Glue #251

Closed prabhacloud closed 4 years ago

prabhacloud commented 4 years ago

CDK Guide says you can pass any type to defaultArguments? when you are creating/updating a Glue job. But when tried passing a string as shown below it throws an error Error: Resolution error: Supplied properties not correct for "CfnJobProps" defaultArguments: "--job-bookmark-option: job-bookmark-enable" should be an 'object'.

default_arguments=str("--job-bookmark-option: job-bookmark-enable") -- doesn't work

But when an object type is passed it works as expected and also this doc says the type for DefaultArguments is JSON.

default_arguments={ '--job-bookmark-option': 'job-bookmark-enable' } -- works fine

ghost commented 4 years ago

@prabhacloud Could you file this over at the CDK GitHub repo? This looks like an API Reference issue, or possibly a bug in how the argument's type is specified in the construct (since the API reference is generated from those). This repo is only for the CDK Developer Guide.

ghost commented 4 years ago

I've reposted this over at the CDK repo. https://github.com/aws/aws-cdk/issues/9781