JsonProcessingOptions
- class aws_cdk.aws_s3_deployment.JsonProcessingOptions(*, escape=None)
Bases:
objectDefine options which can be passed using the method
Source.jsonData().- Parameters:
escape (
Optional[bool]) – If set totrue, the marker substitution will make sure the value inserted in the file will be a valid JSON string. Default: - false- ExampleMetadata:
infused
Example:
# bucket: s3.Bucket # param: ssm.StringParameter # Example with a secret value that contains double quotes deployment = s3deploy.BucketDeployment(self, "JsonDeployment", sources=[ s3deploy.Source.json_data("config.json", { "api_endpoint": "https://api.example.com", "secret_value": param.string_value, # value with double quotes "config": { "enabled": True, "features": ["feature1", "feature2"] } }, escape=True) ], destination_bucket=bucket )
Attributes
- escape
If set to
true, the marker substitution will make sure the value inserted in the file will be a valid JSON string.- Default:
false