Table of Contents

Interface IResourceProps

Namespace
Amazon.CDK.AWS.APIGateway
Assembly
Amazon.CDK.AWS.APIGateway.dll
public interface IResourceProps : IResourceOptions
Inherited Members

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;
            using Amazon.CDK;

            Authorizer authorizer;
            Integration integration;
            Model model;
            RequestValidator requestValidator;
            Resource resource;
            var resourceProps = new ResourceProps {
                Parent = resource,
                PathPart = "pathPart",

                // the properties below are optional
                DefaultCorsPreflightOptions = new CorsOptions {
                    AllowOrigins = new [] { "allowOrigins" },

                    // the properties below are optional
                    AllowCredentials = false,
                    AllowHeaders = new [] { "allowHeaders" },
                    AllowMethods = new [] { "allowMethods" },
                    DisableCache = false,
                    ExposeHeaders = new [] { "exposeHeaders" },
                    MaxAge = Duration.Minutes(30),
                    StatusCode = 123
                },
                DefaultIntegration = integration,
                DefaultMethodOptions = 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

Parent

The parent resource of this resource.

IResource Parent { get; }

Property Value

IResource

Remarks

You can either pass another Resource object or a RestApi object here.

PathPart

A path name for the resource.

string PathPart { get; }

Property Value

string