1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. apigateway
  5. RequestValidator

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

aws-native.apigateway.RequestValidator

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

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.

Create RequestValidator Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new RequestValidator(name: string, args: RequestValidatorArgs, opts?: CustomResourceOptions);
@overload
def RequestValidator(resource_name: str,
                     args: RequestValidatorArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def RequestValidator(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     rest_api_id: Optional[str] = None,
                     name: Optional[str] = None,
                     validate_request_body: Optional[bool] = None,
                     validate_request_parameters: Optional[bool] = None)
func NewRequestValidator(ctx *Context, name string, args RequestValidatorArgs, opts ...ResourceOption) (*RequestValidator, error)
public RequestValidator(string name, RequestValidatorArgs args, CustomResourceOptions? opts = null)
public RequestValidator(String name, RequestValidatorArgs args)
public RequestValidator(String name, RequestValidatorArgs args, CustomResourceOptions options)
type: aws-native:apigateway:RequestValidator
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RequestValidatorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RequestValidatorArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RequestValidatorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RequestValidatorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RequestValidatorArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

RequestValidator Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The RequestValidator resource accepts the following input properties:

RestApiId This property is required. string
The string identifier of the associated RestApi.
Name string
The name of this RequestValidator
ValidateRequestBody bool
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
ValidateRequestParameters bool
A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).
RestApiId This property is required. string
The string identifier of the associated RestApi.
Name string
The name of this RequestValidator
ValidateRequestBody bool
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
ValidateRequestParameters bool
A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).
restApiId This property is required. String
The string identifier of the associated RestApi.
name String
The name of this RequestValidator
validateRequestBody Boolean
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
validateRequestParameters Boolean
A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).
restApiId This property is required. string
The string identifier of the associated RestApi.
name string
The name of this RequestValidator
validateRequestBody boolean
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
validateRequestParameters boolean
A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).
rest_api_id This property is required. str
The string identifier of the associated RestApi.
name str
The name of this RequestValidator
validate_request_body bool
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
validate_request_parameters bool
A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).
restApiId This property is required. String
The string identifier of the associated RestApi.
name String
The name of this RequestValidator
validateRequestBody Boolean
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
validateRequestParameters Boolean
A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).

Outputs

All input properties are implicitly available as output properties. Additionally, the RequestValidator resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
RequestValidatorId string
The ID for the request validator. For example: abc123 .
Id string
The provider-assigned unique ID for this managed resource.
RequestValidatorId string
The ID for the request validator. For example: abc123 .
id String
The provider-assigned unique ID for this managed resource.
requestValidatorId String
The ID for the request validator. For example: abc123 .
id string
The provider-assigned unique ID for this managed resource.
requestValidatorId string
The ID for the request validator. For example: abc123 .
id str
The provider-assigned unique ID for this managed resource.
request_validator_id str
The ID for the request validator. For example: abc123 .
id String
The provider-assigned unique ID for this managed resource.
requestValidatorId String
The ID for the request validator. For example: abc123 .

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi