@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.128Z") @Stability(value=Stable) public class CfnRequestValidator extends CfnResource implements IInspectable
The AWS::ApiGateway::RequestValidator resource sets up basic validation rules for incoming requests to your API. For more information, see Enable Basic Request Validation for an API in API Gateway in the API Gateway Developer Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigateway.*;
CfnRequestValidator cfnRequestValidator = CfnRequestValidator.Builder.create(this, "MyCfnRequestValidator")
.restApiId("restApiId")
// the properties below are optional
.name("name")
.validateRequestBody(false)
.validateRequestParameters(false)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnRequestValidator.Builder
A fluent builder for
CfnRequestValidator. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnRequestValidator(software.constructs.Construct scope,
String id,
CfnRequestValidatorProps props)
Create a new `AWS::ApiGateway::RequestValidator`.
|
protected |
CfnRequestValidator(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnRequestValidator(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrRequestValidatorId()
The ID for the request validator.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getName()
The name of this request validator.
|
String |
getRestApiId()
The identifier of the targeted API entity.
|
Object |
getValidateRequestBody()
Indicates whether to validate the request body according to the configured schema for the targeted API and method.
|
Object |
getValidateRequestParameters()
Indicates whether to validate request parameters.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setName(String value)
The name of this request validator.
|
void |
setRestApiId(String value)
The identifier of the targeted API entity.
|
void |
setValidateRequestBody(Boolean value)
Indicates whether to validate the request body according to the configured schema for the targeted API and method.
|
void |
setValidateRequestBody(IResolvable value)
Indicates whether to validate the request body according to the configured schema for the targeted API and method.
|
void |
setValidateRequestParameters(Boolean value)
Indicates whether to validate request parameters.
|
void |
setValidateRequestParameters(IResolvable value)
Indicates whether to validate request parameters.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnRequestValidator(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnRequestValidator(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnRequestValidator(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnRequestValidatorProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrRequestValidatorId()
For example: abc123 .
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getRestApiId()
@Stability(value=Stable)
public void setRestApiId(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getName()
@Stability(value=Stable)
public void setName(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getValidateRequestBody()
@Stability(value=Stable)
public void setValidateRequestBody(@Nullable
Boolean value)
@Stability(value=Stable)
public void setValidateRequestBody(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getValidateRequestParameters()
@Stability(value=Stable)
public void setValidateRequestParameters(@Nullable
Boolean value)
@Stability(value=Stable)
public void setValidateRequestParameters(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.