« blib/lib/Paws/WAFV2/CustomRequestHandling.pm
↑ Summary
blib/lib/Paws/WAFV2/CustomResponseBodies.pm »
| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::WAFV2::CustomResponse; | ||
| 3 | use Moose; | ||
| 4 | has CustomResponseBodyKey => (is => 'ro', isa => 'Str'); | ||
| 5 | has ResponseCode => (is => 'ro', isa => 'Int', required => 1); | ||
| 6 | has ResponseHeaders => (is => 'ro', isa => 'ArrayRef[Paws::WAFV2::CustomHTTPHeader]'); | ||
| 7 | |||
| 8 | 1; | ||
| 9 | |||
| 10 | ### main pod documentation begin ### | ||
| 11 | |||
| 12 | =head1 NAME | ||
| 13 | |||
| 14 | Paws::WAFV2::CustomResponse | ||
| 15 | |||
| 16 | =head1 USAGE | ||
| 17 | |||
| 18 | This class represents one of two things: | ||
| 19 | |||
| 20 | =head3 Arguments in a call to a service | ||
| 21 | |||
| 22 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 23 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 24 | |||
| 25 | As an example, if Att1 is expected to be a Paws::WAFV2::CustomResponse object: | ||
| 26 | |||
| 27 | $service_obj->Method(Att1 => { CustomResponseBodyKey => $value, ..., ResponseHeaders => $value }); | ||
| 28 | |||
| 29 | =head3 Results returned from an API call | ||
| 30 | |||
| 31 | Use accessors for each attribute. If Att1 is expected to be an Paws::WAFV2::CustomResponse object: | ||
| 32 | |||
| 33 | $result = $service_obj->Method(...); | ||
| 34 | $result->Att1->CustomResponseBodyKey | ||
| 35 | |||
| 36 | =head1 DESCRIPTION | ||
| 37 | |||
| 38 | A custom response to send to the client. You can define a custom | ||
| 39 | response for rule actions and default web ACL actions that are set to | ||
| 40 | BlockAction. | ||
| 41 | |||
| 42 | For information about customizing web requests and responses, see | ||
| 43 | Customizing web requests and responses in WAF | ||
| 44 | (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) | ||
| 45 | in the WAF Developer Guide | ||
| 46 | (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). | ||
| 47 | |||
| 48 | =head1 ATTRIBUTES | ||
| 49 | |||
| 50 | |||
| 51 | =head2 CustomResponseBodyKey => Str | ||
| 52 | |||
| 53 | References the response body that you want WAF to return to the web | ||
| 54 | request client. You can define a custom response for a rule action or a | ||
| 55 | default web ACL action that is set to block. To do this, you first | ||
| 56 | define the response body key and value in the C<CustomResponseBodies> | ||
| 57 | setting for the WebACL or RuleGroup where you want to use it. Then, in | ||
| 58 | the rule action or web ACL default action C<BlockAction> setting, you | ||
| 59 | reference the response body using this key. | ||
| 60 | |||
| 61 | |||
| 62 | =head2 B<REQUIRED> ResponseCode => Int | ||
| 63 | |||
| 64 | The HTTP status code to return to the client. | ||
| 65 | |||
| 66 | For a list of status codes that you can use in your custom reqponses, | ||
| 67 | see Supported status codes for custom response | ||
| 68 | (https://docs.aws.amazon.com/waf/latest/developerguide/customizing-the-response-status-codes.html) | ||
| 69 | in the WAF Developer Guide | ||
| 70 | (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). | ||
| 71 | |||
| 72 | |||
| 73 | =head2 ResponseHeaders => ArrayRef[L<Paws::WAFV2::CustomHTTPHeader>] | ||
| 74 | |||
| 75 | The HTTP headers to use in the response. Duplicate header names are not | ||
| 76 | allowed. | ||
| 77 | |||
| 78 | For information about the limits on count and size for custom request | ||
| 79 | and response settings, see WAF quotas | ||
| 80 | (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in | ||
| 81 | the WAF Developer Guide | ||
| 82 | (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). | ||
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | =head1 SEE ALSO | ||
| 87 | |||
| 88 | This class forms part of L<Paws>, describing an object used in L<Paws::WAFV2> | ||
| 89 | |||
| 90 | =head1 BUGS and CONTRIBUTIONS | ||
| 91 | |||
| 92 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 93 | |||
| 94 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 95 | |||
| 96 | =cut | ||
| 97 |