Show / Hide Table of Contents

Class JsonWithStandardFieldProps

Properties for controlling items output in JSON standard format.

Inheritance
System.Object
JsonWithStandardFieldProps
Implements
IJsonWithStandardFieldProps
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.AWS.APIGateway.dll
Syntax (csharp)
public class JsonWithStandardFieldProps : Object, IJsonWithStandardFieldProps
Syntax (vb)
Public Class JsonWithStandardFieldProps
    Inherits Object
    Implements IJsonWithStandardFieldProps
Remarks

ExampleMetadata: infused

Examples
// production stage
var prdLogGroup = new LogGroup(this, "PrdLogs");
var api = new RestApi(this, "books", new RestApiProps {
    DeployOptions = new StageOptions {
        AccessLogDestination = new LogGroupLogDestination(prdLogGroup),
        AccessLogFormat = AccessLogFormat.JsonWithStandardFields()
    }
});
var deployment = new Deployment(this, "Deployment", new DeploymentProps { Api = api });

// development stage
var devLogGroup = new LogGroup(this, "DevLogs");
new Stage(this, "dev", new StageProps {
    Deployment = deployment,
    AccessLogDestination = new LogGroupLogDestination(devLogGroup),
    AccessLogFormat = AccessLogFormat.JsonWithStandardFields(new JsonWithStandardFieldProps {
        Caller = false,
        HttpMethod = true,
        Ip = true,
        Protocol = true,
        RequestTime = true,
        ResourcePath = true,
        ResponseLength = true,
        Status = true,
        User = true
    })
});

Synopsis

Constructors

JsonWithStandardFieldProps()

Properties

Caller

If this flag is enabled, the principal identifier of the caller will be output to the log.

HttpMethod

If this flag is enabled, the http method will be output to the log.

Ip

If this flag is enabled, the source IP of request will be output to the log.

Protocol

If this flag is enabled, the request protocol will be output to the log.

RequestTime

If this flag is enabled, the CLF-formatted request time((dd/MMM/yyyy:HH:mm:ss +-hhmm) will be output to the log.

ResourcePath

If this flag is enabled, the path to your resource will be output to the log.

ResponseLength

If this flag is enabled, the response payload length will be output to the log.

Status

If this flag is enabled, the method response status will be output to the log.

User

If this flag is enabled, the principal identifier of the user will be output to the log.

Constructors

JsonWithStandardFieldProps()

public JsonWithStandardFieldProps()

Properties

Caller

If this flag is enabled, the principal identifier of the caller will be output to the log.

public bool Caller { get; set; }
Property Value

System.Boolean

HttpMethod

If this flag is enabled, the http method will be output to the log.

public bool HttpMethod { get; set; }
Property Value

System.Boolean

Ip

If this flag is enabled, the source IP of request will be output to the log.

public bool Ip { get; set; }
Property Value

System.Boolean

Protocol

If this flag is enabled, the request protocol will be output to the log.

public bool Protocol { get; set; }
Property Value

System.Boolean

RequestTime

If this flag is enabled, the CLF-formatted request time((dd/MMM/yyyy:HH:mm:ss +-hhmm) will be output to the log.

public bool RequestTime { get; set; }
Property Value

System.Boolean

ResourcePath

If this flag is enabled, the path to your resource will be output to the log.

public bool ResourcePath { get; set; }
Property Value

System.Boolean

ResponseLength

If this flag is enabled, the response payload length will be output to the log.

public bool ResponseLength { get; set; }
Property Value

System.Boolean

Status

If this flag is enabled, the method response status will be output to the log.

public bool Status { get; set; }
Property Value

System.Boolean

User

If this flag is enabled, the principal identifier of the user will be output to the log.

public bool User { get; set; }
Property Value

System.Boolean

Implements

IJsonWithStandardFieldProps
Back to top Generated by DocFX