Interface IMethodProps
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
public interface IMethodProps
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;
Authorizer authorizer;
Integration integration;
Model model;
RequestValidator requestValidator;
Resource resource;
var methodProps = new MethodProps {
HttpMethod = "httpMethod",
Resource = resource,
// the properties below are optional
Integration = integration,
Options = new MethodOptions {
ApiKeyRequired = false,
AuthorizationScopes = new [] { "authorizationScopes" },
AuthorizationType = AuthorizationType.NONE,
Authorizer = authorizer,
MethodResponses = new [] { new MethodResponse {
StatusCode = "statusCode",
// the properties below are optional
ResponseModels = new Dictionary<string, IModel> {
{ "responseModelsKey", model }
},
ResponseParameters = new Dictionary<string, boolean> {
{ "responseParametersKey", false }
}
} },
OperationName = "operationName",
RequestModels = new Dictionary<string, IModel> {
{ "requestModelsKey", model }
},
RequestParameters = new Dictionary<string, boolean> {
{ "requestParametersKey", false }
},
RequestValidator = requestValidator,
RequestValidatorOptions = new RequestValidatorOptions {
RequestValidatorName = "requestValidatorName",
ValidateRequestBody = false,
ValidateRequestParameters = false
}
}
};
Remarks
ExampleMetadata: fixture=_generated
Properties
HttpMethod
The HTTP method ("GET", "POST", "PUT", ...) that clients use to call this method.
string HttpMethod { get; }
Property Value
Integration
The backend system that the method calls when it receives a request.
Integration? Integration { get; }
Property Value
Remarks
Default: - a new MockIntegration
.
Options
Method options.
IMethodOptions? Options { get; }
Property Value
Remarks
Default: - No options.
Resource
The resource this method is associated with.
IResource Resource { get; }
Property Value
Remarks
For root resource methods,
specify the RestApi
object.