Show / Hide Table of Contents

Class FixedResponseOptions

Options for ListenerAction.fixedResponse().

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

ExampleMetadata: infused

Examples
ApplicationListener listener;


listener.AddAction("Fixed", new AddApplicationActionProps {
    Priority = 10,
    Conditions = new [] { ListenerCondition.PathPatterns(new [] { "/ok" }) },
    Action = ListenerAction.FixedResponse(200, new FixedResponseOptions {
        ContentType = ContentType.TEXT_PLAIN,
        MessageBody = "OK"
    })
});

Synopsis

Constructors

FixedResponseOptions()

Properties

ContentType

Content Type of the response.

MessageBody

The response body.

Constructors

FixedResponseOptions()

public FixedResponseOptions()

Properties

ContentType

Content Type of the response.

public string ContentType { get; set; }
Property Value

System.String

Remarks

Valid Values: text/plain | text/css | text/html | application/javascript | application/json

Default: - Automatically determined

MessageBody

The response body.

public string MessageBody { get; set; }
Property Value

System.String

Remarks

Default: - No body

Implements

IFixedResponseOptions
Back to top Generated by DocFX