@Stability(value=Experimental) public static final class SpecRestApi.Builder extends Object implements software.amazon.jsii.Builder<SpecRestApi>
SpecRestApi.| Modifier and Type | Method and Description |
|---|---|
SpecRestApi.Builder |
apiDefinition(ApiDefinition apiDefinition)
(experimental) An OpenAPI definition compatible with API Gateway.
|
SpecRestApi |
build() |
SpecRestApi.Builder |
cloudWatchRole(Boolean cloudWatchRole)
(experimental) Automatically configure an AWS CloudWatch role for API Gateway.
|
static SpecRestApi.Builder |
create(software.constructs.Construct scope,
String id) |
SpecRestApi.Builder |
deploy(Boolean deploy)
(experimental) Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.
|
SpecRestApi.Builder |
deployOptions(StageOptions deployOptions)
(experimental) Options for the API Gateway stage that will always point to the latest deployment when `deploy` is enabled.
|
SpecRestApi.Builder |
domainName(DomainNameOptions domainName)
(experimental) Configure a custom domain name and map it to this API.
|
SpecRestApi.Builder |
endpointExportName(String endpointExportName)
(experimental) Export name for the CfnOutput containing the API endpoint.
|
SpecRestApi.Builder |
endpointTypes(List<? extends EndpointType> endpointTypes)
(experimental) A list of the endpoint types of the API.
|
SpecRestApi.Builder |
failOnWarnings(Boolean failOnWarnings)
(experimental) Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.
|
SpecRestApi.Builder |
parameters(Map<String,String> parameters)
(experimental) Custom header parameters for the request.
|
SpecRestApi.Builder |
policy(PolicyDocument policy)
(experimental) A policy document that contains the permissions for this RestApi.
|
SpecRestApi.Builder |
restApiName(String restApiName)
(experimental) A name for the API Gateway RestApi resource.
|
SpecRestApi.Builder |
retainDeployments(Boolean retainDeployments)
(experimental) Retains old deployment resources when the API changes.
|
@Stability(value=Experimental) public static SpecRestApi.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.SpecRestApi.Builder.@Stability(value=Experimental) public SpecRestApi.Builder cloudWatchRole(Boolean cloudWatchRole)
Default: true
cloudWatchRole - Automatically configure an AWS CloudWatch role for API Gateway. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder deploy(Boolean deploy)
Since API Gateway deployments are immutable, When this option is enabled (by default), an AWS::ApiGateway::Deployment resource will automatically created with a logical ID that hashes the API model (methods, resources and options). This means that when the model changes, the logical ID of this CloudFormation resource will change, and a new deployment will be created.
If this is set, latestDeployment will refer to the Deployment object
and deploymentStage will refer to a Stage that points to this
deployment. To customize the stage options, use the deployOptions
property.
A CloudFormation Output will also be defined with the root URL endpoint of this REST API.
Default: true
deploy - Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder deployOptions(StageOptions deployOptions)
If deploy is disabled,
this value cannot be set.
Default: - Based on defaults of `StageOptions`.
deployOptions - Options for the API Gateway stage that will always point to the latest deployment when `deploy` is enabled. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder domainName(DomainNameOptions domainName)
Default: - no domain name is defined, use `addDomainName` or directly define a `DomainName`.
domainName - Configure a custom domain name and map it to this API. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder endpointExportName(String endpointExportName)
Default: - when no export name is given, output will be created without export
endpointExportName - Export name for the CfnOutput containing the API endpoint. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder endpointTypes(List<? extends EndpointType> endpointTypes)
Use this property when creating an API.
Default: EndpointType.EDGE
endpointTypes - A list of the endpoint types of the API. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder failOnWarnings(Boolean failOnWarnings)
Default: false
failOnWarnings - Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder parameters(Map<String,String> parameters)
Default: - No parameters.
parameters - Custom header parameters for the request. This parameter is required.thishttps://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html@Stability(value=Experimental) public SpecRestApi.Builder policy(PolicyDocument policy)
Default: - No policy.
policy - A policy document that contains the permissions for this RestApi. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder restApiName(String restApiName)
Default: - ID of the RestApi construct.
restApiName - A name for the API Gateway RestApi resource. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder retainDeployments(Boolean retainDeployments)
This allows manually reverting stages to point to old deployments via the AWS Console.
Default: false
retainDeployments - Retains old deployment resources when the API changes. This parameter is required.this@Stability(value=Experimental) public SpecRestApi.Builder apiDefinition(ApiDefinition apiDefinition)
apiDefinition - An OpenAPI definition compatible with API Gateway. This parameter is required.thishttps://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-import-api.html@Stability(value=Experimental) public SpecRestApi build()
build in interface software.amazon.jsii.Builder<SpecRestApi>Copyright © 2021. All rights reserved.