class Logging
Language | Type name |
---|---|
![]() | Amazon.CDK.CustomResources.Logging |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/customresources#Logging |
![]() | software.amazon.awscdk.customresources.Logging |
![]() | aws_cdk.custom_resources.Logging |
![]() | aws-cdk-lib » custom_resources » Logging |
A class used to configure Logging during AwsCustomResource SDK calls.
Example
const getParameter = new cr.AwsCustomResource(this, 'GetParameter', {
onUpdate: {
service: 'SSM',
action: 'GetParameter',
parameters: {
Name: 'my-parameter',
WithDecryption: true,
},
physicalResourceId: cr.PhysicalResourceId.of(Date.now().toString()),
logging: cr.Logging.withDataHidden(),
},
policy: cr.AwsCustomResourcePolicy.fromSdkCalls({
resources: cr.AwsCustomResourcePolicy.ANY_RESOURCE,
}),
});
Initializer (protected)
super(props?: LoggingProps)
Parameters
- props
Logging
Props
Methods
Name | Description |
---|---|
static all() | Enables logging of all logged data in the lambda handler. |
static with | Hides logging of data associated with the API call response. |
static all()
public static all(): Logging
Returns
Enables logging of all logged data in the lambda handler.
This includes the event object, the API call response, all fields in the response object returned by the lambda, and any errors encountered.
static withDataHidden()
public static withDataHidden(): Logging
Returns
Hides logging of data associated with the API call response.
This includes hiding the raw API
call response and the Data
field associated with the lambda handler response.