@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:47.535Z") 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 . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnRequestValidator(Construct scope,
java.lang.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 |
---|---|
java.lang.String |
getAttrRequestValidatorId()
The ID for the request validator.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getName()
The name of this RequestValidator.
|
java.lang.String |
getRestApiId()
The string identifier of the associated RestApi.
|
java.lang.Object |
getValidateRequestBody()
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
|
java.lang.Object |
getValidateRequestParameters()
A Boolean flag to indicate whether to validate request parameters ( `true` ) or not ( `false` ).
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setName(java.lang.String value)
The name of this RequestValidator.
|
void |
setRestApiId(java.lang.String value)
The string identifier of the associated RestApi.
|
void |
setValidateRequestBody(java.lang.Boolean value)
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
|
void |
setValidateRequestBody(IResolvable value)
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
|
void |
setValidateRequestParameters(java.lang.Boolean value)
A Boolean flag to indicate whether to validate request parameters ( `true` ) or not ( `false` ).
|
void |
setValidateRequestParameters(IResolvable value)
A Boolean flag to indicate whether to validate request parameters ( `true` ) or not ( `false` ).
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnRequestValidator(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnRequestValidator(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnRequestValidator(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrRequestValidatorId()
For example: abc123
.
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getRestApiId()
public void setRestApiId(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.Object getValidateRequestBody()
public void setValidateRequestBody(java.lang.Boolean value)
public void setValidateRequestBody(IResolvable value)
public java.lang.Object getValidateRequestParameters()
public void setValidateRequestParameters(java.lang.Boolean value)
public void setValidateRequestParameters(IResolvable value)