Interface IRestApiOptions
(deprecated) Represents the props that all Rest APIs share.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.AWS.APIGateway.dll
Syntax (csharp)
public interface IRestApiOptions : IRestApiBaseProps, IResourceOptions
Syntax (vb)
Public Interface IRestApiOptions
Inherits IRestApiBaseProps, IResourceOptions
Remarks
Stability: Deprecated
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;
using Amazon.CDK.AWS.CertificateManager;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.S3;
using Amazon.CDK;
IAccessLogDestination accessLogDestination;
AccessLogFormat accessLogFormat;
Authorizer authorizer;
Bucket bucket;
Certificate certificate;
Integration integration;
Model model;
PolicyDocument policyDocument;
RequestValidator requestValidator;
var restApiOptions = new RestApiOptions {
CloudWatchRole = false,
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
}
},
Deploy = false,
DeployOptions = new StageOptions {
AccessLogDestination = accessLogDestination,
AccessLogFormat = accessLogFormat,
CacheClusterEnabled = false,
CacheClusterSize = "cacheClusterSize",
CacheDataEncrypted = false,
CacheTtl = Duration.Minutes(30),
CachingEnabled = false,
ClientCertificateId = "clientCertificateId",
DataTraceEnabled = false,
Description = "description",
DocumentationVersion = "documentationVersion",
LoggingLevel = MethodLoggingLevel.OFF,
MethodOptions = new Dictionary<string, MethodDeploymentOptions> {
{ "methodOptionsKey", new MethodDeploymentOptions {
CacheDataEncrypted = false,
CacheTtl = Duration.Minutes(30),
CachingEnabled = false,
DataTraceEnabled = false,
LoggingLevel = MethodLoggingLevel.OFF,
MetricsEnabled = false,
ThrottlingBurstLimit = 123,
ThrottlingRateLimit = 123
} }
},
MetricsEnabled = false,
StageName = "stageName",
ThrottlingBurstLimit = 123,
ThrottlingRateLimit = 123,
TracingEnabled = false,
Variables = new Dictionary<string, string> {
{ "variablesKey", "variables" }
}
},
DisableExecuteApiEndpoint = false,
DomainName = new DomainNameOptions {
Certificate = certificate,
DomainName = "domainName",
// the properties below are optional
BasePath = "basePath",
EndpointType = EndpointType.EDGE,
Mtls = new MTLSConfig {
Bucket = bucket,
Key = "key",
// the properties below are optional
Version = "version"
},
SecurityPolicy = SecurityPolicy.TLS_1_0
},
EndpointExportName = "endpointExportName",
EndpointTypes = new [] { EndpointType.EDGE },
FailOnWarnings = false,
Parameters = new Dictionary<string, string> {
{ "parametersKey", "parameters" }
},
Policy = policyDocument,
RestApiName = "restApiName",
RetainDeployments = false
};