Interface IMethodProps
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IMethodProps
Syntax (vb)
Public Interface IMethodProps
Remarks
ExampleMetadata: fixture=_generated
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
}
}
};
Synopsis
Properties
HttpMethod | The HTTP method ("GET", "POST", "PUT", ...) that clients use to call this method. |
Integration | The backend system that the method calls when it receives a request. |
Options | Method options. |
Resource | The resource this method is associated with. |
Properties
HttpMethod
The HTTP method ("GET", "POST", "PUT", ...) that clients use to call this method.
string HttpMethod { get; }
Property Value
System.String
Integration
The backend system that the method calls when it receives a request.
virtual Integration Integration { get; }
Property Value
Remarks
Default: - a new MockIntegration
.
Options
Method options.
virtual 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.