Skip to content
v2.274.0

Logging Class ​

A class used to configure Logging during AwsCustomResource SDK calls.

Example ​

ts
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,
  }),
});

Methods ​

all(): Logging // chainable@staticmethod def all() -> Loggingpublic static Logging all()public static Logging All()func All() Loggingstatic#
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.

withDataHidden(): Logging // chainable@staticmethod def with_data_hidden() -> Loggingpublic static Logging withDataHidden()public static Logging WithDataHidden()func WithDataHidden() Loggingstatic#
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.