awsapigateway

package
v1.168.0-devpreview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 17 Imported by: 5

README

Amazon API Gateway Construct Library

Amazon API Gateway is a fully managed service that makes it easy for developers to publish, maintain, monitor, and secure APIs at any scale. Create an API to access data, business logic, or functionality from your back-end services, such as applications running on Amazon Elastic Compute Cloud (Amazon EC2), code running on AWS Lambda, or any web application.

Table of Contents

Defining APIs

APIs are defined as a hierarchy of resources and methods. addResource and addMethod can be used to build this hierarchy. The root resource is api.root.

For example, the following code defines an API that includes the following HTTP endpoints: ANY /, GET /books, POST /books, GET /books/{book_id}, DELETE /books/{book_id}.

api := apigateway.NewRestApi(this, jsii.String("books-api"))

api.root.addMethod(jsii.String("ANY"))

books := api.root.addResource(jsii.String("books"))
books.addMethod(jsii.String("GET"))
books.addMethod(jsii.String("POST"))

book := books.addResource(jsii.String("{book_id}"))
book.addMethod(jsii.String("GET"))
book.addMethod(jsii.String("DELETE"))

AWS Lambda-backed APIs

A very common practice is to use Amazon API Gateway with AWS Lambda as the backend integration. The LambdaRestApi construct makes it easy:

The following code defines a REST API that routes all requests to the specified AWS Lambda function:

var backend function

apigateway.NewLambdaRestApi(this, jsii.String("myapi"), &lambdaRestApiProps{
	handler: backend,
})

You can also supply proxy: false, in which case you will have to explicitly define the API model:

var backend function

api := apigateway.NewLambdaRestApi(this, jsii.String("myapi"), &lambdaRestApiProps{
	handler: backend,
	proxy: jsii.Boolean(false),
})

items := api.root.addResource(jsii.String("items"))
items.addMethod(jsii.String("GET")) // GET /items
items.addMethod(jsii.String("POST")) // POST /items

item := items.addResource(jsii.String("{item}"))
item.addMethod(jsii.String("GET")) // GET /items/{item}

// the default integration for methods is "handler", but one can
// customize this behavior per method or even a sub path.
item.addMethod(jsii.String("DELETE"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")))

AWS StepFunctions backed APIs

You can use Amazon API Gateway with AWS Step Functions as the backend integration, specifically Synchronous Express Workflows.

The StepFunctionsRestApi only supports integration with Synchronous Express state machine. The StepFunctionsRestApi construct makes this easy by setting up input, output and error mapping.

The construct sets up an API endpoint and maps the ANY HTTP method and any calls to the API endpoint starts an express workflow execution for the underlying state machine.

Invoking the endpoint with any HTTP method (GET, POST, PUT, DELETE, ...) in the example below will send the request to the state machine as a new execution. On success, an HTTP code 200 is returned with the execution output as the Response Body.

If the execution fails, an HTTP 500 response is returned with the error and cause from the execution output as the Response Body. If the request is invalid (ex. bad execution input) HTTP code 400 is returned.

The response from the invocation contains only the output field from the StartSyncExecution API. In case of failures, the fields error and cause are returned as part of the response. Other metadata such as billing details, AWS account ID and resource ARNs are not returned in the API response.

By default, a prod stage is provisioned.

In order to reduce the payload size sent to AWS Step Functions, headers are not forwarded to the Step Functions execution input. It is possible to choose whether headers, requestContext, path, querystring, and authorizer are included or not. By default, headers are excluded in all requests.

More details about AWS Step Functions payload limit can be found at https://docs.aws.amazon.com/step-functions/latest/dg/limits-overview.html#service-limits-task-executions.

The following code defines a REST API that routes all requests to the specified AWS StepFunctions state machine:

stateMachineDefinition := stepfunctions.NewPass(this, jsii.String("PassState"))

stateMachine := stepfunctions.NewStateMachine(this, jsii.String("StateMachine"), &stateMachineProps{
	definition: stateMachineDefinition,
	stateMachineType: stepfunctions.stateMachineType_EXPRESS,
})

apigateway.NewStepFunctionsRestApi(this, jsii.String("StepFunctionsRestApi"), &stepFunctionsRestApiProps{
	deploy: jsii.Boolean(true),
	stateMachine: stateMachine,
})

When the REST API endpoint configuration above is invoked using POST, as follows -

curl -X POST -d '{ "customerId": 1 }' https://example.com/

AWS Step Functions will receive the request body in its input as follows:

{
  "body": {
    "customerId": 1
  },
  "path": "/",
  "querystring": {}
}

When the endpoint is invoked at path '/users/5' using the HTTP GET method as below:

curl -X GET https://example.com/users/5?foo=bar

AWS Step Functions will receive the following execution input:

{
  "body": {},
  "path": {
     "users": "5"
  },
  "querystring": {
    "foo": "bar"
  }
}

Additional information around the request such as the request context, authorizer context, and headers can be included as part of the input forwarded to the state machine. The following example enables headers to be included in the input but not query string.

apigateway.NewStepFunctionsRestApi(this, jsii.String("StepFunctionsRestApi"), &stepFunctionsRestApiProps{
	stateMachine: machine,
	headers: jsii.Boolean(true),
	path: jsii.Boolean(false),
	querystring: jsii.Boolean(false),
	authorizer: jsii.Boolean(false),
	requestContext: &requestContext{
		caller: jsii.Boolean(true),
		user: jsii.Boolean(true),
	},
})

In such a case, when the endpoint is invoked as below:

curl -X GET https://example.com/

AWS Step Functions will receive the following execution input:

{
  "headers": {
    "Accept": "...",
    "CloudFront-Forwarded-Proto": "...",
  },
  "requestContext": {
     "accountId": "...",
     "apiKey": "...",
  },
  "body": {}
}
Breaking up Methods and Resources across Stacks

It is fairly common for REST APIs with a large number of Resources and Methods to hit the CloudFormation limit of 500 resources per stack.

To help with this, Resources and Methods for the same REST API can be re-organized across multiple stacks. A common way to do this is to have a stack per Resource or groups of Resources, but this is not the only possible way. The following example uses sets up two Resources '/pets' and '/books' in separate stacks using nested stacks:

import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/constructs-go/constructs"
import "github.com/aws/aws-cdk-go/awscdk"

/**
 * This file showcases how to split up a RestApi's Resources and Methods across nested stacks.
 *
 * The root stack 'RootStack' first defines a RestApi.
 * Two nested stacks BooksStack and PetsStack, create corresponding Resources '/books' and '/pets'.
 * They are then deployed to a 'prod' Stage via a third nested stack - DeployStack.
 *
 * To verify this worked, go to the APIGateway
 */

type rootStack struct {
	stack
}

func newRootStack(scope construct) *rootStack {
	this := &rootStack{}
	newStack_Override(this, scope, jsii.String("integ-restapi-import-RootStack"))

	restApi := awscdk.NewRestApi(this, jsii.String("RestApi"), &restApiProps{
		deploy: jsii.Boolean(false),
	})
	restApi.root.addMethod(jsii.String("ANY"))

	petsStack := NewPetsStack(this, &resourceNestedStackProps{
		restApiId: restApi.restApiId,
		rootResourceId: restApi.restApiRootResourceId,
	})
	booksStack := NewBooksStack(this, &resourceNestedStackProps{
		restApiId: restApi.restApiId,
		rootResourceId: restApi.restApiRootResourceId,
	})
	NewDeployStack(this, &deployStackProps{
		restApiId: restApi.restApiId,
		methods: petsStack.methods.concat(booksStack.methods),
	})

	awscdk.NewCfnOutput(this, jsii.String("PetsURL"), &cfnOutputProps{
		value: fmt.Sprintf("https://%v.execute-api.%v.amazonaws.com/prod/pets", restApi.restApiId, this.region),
	})

	awscdk.NewCfnOutput(this, jsii.String("BooksURL"), &cfnOutputProps{
		value: fmt.Sprintf("https://%v.execute-api.%v.amazonaws.com/prod/books", restApi.restApiId, this.region),
	})
	return this
}

type resourceNestedStackProps struct {
	nestedStackProps
	restApiId *string
	rootResourceId *string
}

type petsStack struct {
	nestedStack
	methods []method
}

func newPetsStack(scope construct, props resourceNestedStackProps) *petsStack {
	this := &petsStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-PetsStack"), props)

	api := awscdk.RestApi.fromRestApiAttributes(this, jsii.String("RestApi"), &restApiAttributes{
		restApiId: props.restApiId,
		rootResourceId: props.rootResourceId,
	})

	method := api.root.addResource(jsii.String("pets")).addMethod(jsii.String("GET"), awscdk.NewMockIntegration(&integrationOptions{
		integrationResponses: []integrationResponse{
			&integrationResponse{
				statusCode: jsii.String("200"),
			},
		},
		passthroughBehavior: awscdk.PassthroughBehavior_NEVER,
		requestTemplates: map[string]*string{
			"application/json": jsii.String("{ \"statusCode\": 200 }"),
		},
	}), &methodOptions{
		methodResponses: []methodResponse{
			&methodResponse{
				statusCode: jsii.String("200"),
			},
		},
	})

	this.methods.push(method)
	return this
}

type booksStack struct {
	nestedStack
	methods []*method
}

func newBooksStack(scope construct, props resourceNestedStackProps) *booksStack {
	this := &booksStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-BooksStack"), props)

	api := awscdk.RestApi.fromRestApiAttributes(this, jsii.String("RestApi"), &restApiAttributes{
		restApiId: props.restApiId,
		rootResourceId: props.rootResourceId,
	})

	method := api.root.addResource(jsii.String("books")).addMethod(jsii.String("GET"), awscdk.NewMockIntegration(&integrationOptions{
		integrationResponses: []*integrationResponse{
			&integrationResponse{
				statusCode: jsii.String("200"),
			},
		},
		passthroughBehavior: awscdk.PassthroughBehavior_NEVER,
		requestTemplates: map[string]*string{
			"application/json": jsii.String("{ \"statusCode\": 200 }"),
		},
	}), &methodOptions{
		methodResponses: []*methodResponse{
			&methodResponse{
				statusCode: jsii.String("200"),
			},
		},
	})

	this.methods.push(method)
	return this
}

type deployStackProps struct {
	nestedStackProps
	restApiId *string
	methods []*method
}

type deployStack struct {
	nestedStack
}

func newDeployStack(scope construct, props deployStackProps) *deployStack {
	this := &deployStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-DeployStack"), props)

	deployment := awscdk.NewDeployment(this, jsii.String("Deployment"), &deploymentProps{
		api: awscdk.RestApi.fromRestApiId(this, jsii.String("RestApi"), props.restApiId),
	})
	if *props.methods {
		for _, method := range *props.methods {
			deployment.node.addDependency(method)
		}
	}
	awscdk.NewStage(this, jsii.String("Stage"), &stageProps{
		deployment: deployment,
	})
	return this
}

NewRootStack(awscdk.NewApp())

Integration Targets

Methods are associated with backend integrations, which are invoked when this method is called. API Gateway supports the following integrations:

  • MockIntegration - can be used to test APIs. This is the default integration if one is not specified.
  • LambdaIntegration - can be used to invoke an AWS Lambda function.
  • AwsIntegration - can be used to invoke arbitrary AWS service APIs.
  • HttpIntegration - can be used to invoke HTTP endpoints.

The following example shows how to integrate the GET /book/{book_id} method to an AWS Lambda function:

var getBookHandler function
var book resource


getBookIntegration := apigateway.NewLambdaIntegration(getBookHandler)
book.addMethod(jsii.String("GET"), getBookIntegration)

Integration options can be optionally be specified:

var getBookHandler function
var getBookIntegration lambdaIntegration


getBookIntegration := apigateway.NewLambdaIntegration(getBookHandler, &lambdaIntegrationOptions{
	contentHandling: apigateway.contentHandling_CONVERT_TO_TEXT,
	 // convert to base64
	credentialsPassthrough: jsii.Boolean(true),
})

Method options can optionally be specified when adding methods:

var book resource
var getBookIntegration lambdaIntegration


book.addMethod(jsii.String("GET"), getBookIntegration, &methodOptions{
	authorizationType: apigateway.authorizationType_IAM,
	apiKeyRequired: jsii.Boolean(true),
})

It is possible to also integrate with AWS services in a different region. The following code integrates with Amazon SQS in the eu-west-1 region.

getMessageIntegration := apigateway.NewAwsIntegration(&awsIntegrationProps{
	service: jsii.String("sqs"),
	path: jsii.String("queueName"),
	region: jsii.String("eu-west-1"),
})

Usage Plan & API Keys

A usage plan specifies who can access one or more deployed API stages and methods, and the rate at which they can be accessed. The plan uses API keys to identify API clients and meters access to the associated API stages for each key. Usage plans also allow configuring throttling limits and quota limits that are enforced on individual client API keys.

The following example shows how to create and asscociate a usage plan and an API key:

var integration lambdaIntegration


api := apigateway.NewRestApi(this, jsii.String("hello-api"))

v1 := api.root.addResource(jsii.String("v1"))
echo := v1.addResource(jsii.String("echo"))
echoMethod := echo.addMethod(jsii.String("GET"), integration, &methodOptions{
	apiKeyRequired: jsii.Boolean(true),
})

plan := api.addUsagePlan(jsii.String("UsagePlan"), &usagePlanProps{
	name: jsii.String("Easy"),
	throttle: &throttleSettings{
		rateLimit: jsii.Number(10),
		burstLimit: jsii.Number(2),
	},
})

key := api.addApiKey(jsii.String("ApiKey"))
plan.addApiKey(key)

To associate a plan to a given RestAPI stage:

var plan usagePlan
var api restApi
var echoMethod method


plan.addApiStage(&usagePlanPerApiStage{
	stage: api.deploymentStage,
	throttle: []throttlingPerMethod{
		&throttlingPerMethod{
			method: echoMethod,
			throttle: &throttleSettings{
				rateLimit: jsii.Number(10),
				burstLimit: jsii.Number(2),
			},
		},
	},
})

Existing usage plans can be imported into a CDK app using its id.

importedUsagePlan := apigateway.usagePlan.fromUsagePlanId(this, jsii.String("imported-usage-plan"), jsii.String("<usage-plan-key-id>"))

The name and value of the API Key can be specified at creation; if not provided, a name and value will be automatically generated by API Gateway.

var api restApi

key := api.addApiKey(jsii.String("ApiKey"), &apiKeyOptions{
	apiKeyName: jsii.String("myApiKey1"),
	value: jsii.String("MyApiKeyThatIsAtLeast20Characters"),
})

Existing API keys can also be imported into a CDK app using its id.

importedKey := apigateway.apiKey.fromApiKeyId(this, jsii.String("imported-key"), jsii.String("<api-key-id>"))

The "grant" methods can be used to give prepackaged sets of permissions to other resources. The following code provides read permission to an API key.

var importedKey apiKey
var lambdaFn function

importedKey.grantRead(lambdaFn)
⚠️ Multiple API Keys

It is possible to specify multiple API keys for a given Usage Plan, by calling usagePlan.addApiKey().

When using multiple API keys, a past bug of the CDK prevents API key associations to a Usage Plan to be deleted. If the CDK app had the feature flag - @aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId - enabled when the API keys were created, then the app will not be affected by this bug.

If this is not the case, you will need to ensure that the CloudFormation logical ids of the API keys that are not being deleted remain unchanged. Make note of the logical ids of these API keys before removing any, and set it as part of the addApiKey() method:

var usageplan usagePlan
var apiKey apiKey


usageplan.addApiKey(apiKey, &addApiKeyOptions{
	overrideLogicalId: jsii.String("..."),
})
Rate Limited API Key

In scenarios where you need to create a single api key and configure rate limiting for it, you can use RateLimitedApiKey. This construct lets you specify rate limiting properties which should be applied only to the api key being created. The API key created has the specified rate limits, such as quota and throttles, applied.

The following example shows how to use a rate limited api key :

var api restApi


key := apigateway.NewRateLimitedApiKey(this, jsii.String("rate-limited-api-key"), &rateLimitedApiKeyProps{
	customerId: jsii.String("hello-customer"),
	resources: []iRestApi{
		api,
	},
	quota: &quotaSettings{
		limit: jsii.Number(10000),
		period: apigateway.period_MONTH,
	},
})

Working with models

When you work with Lambda integrations that are not Proxy integrations, you have to define your models and mappings for the request, response, and integration.

hello := lambda.NewFunction(this, jsii.String("hello"), &functionProps{
	runtime: lambda.runtime_NODEJS_12_X(),
	handler: jsii.String("hello.handler"),
	code: lambda.code.fromAsset(jsii.String("lambda")),
})

api := apigateway.NewRestApi(this, jsii.String("hello-api"), &restApiProps{
})
resource := api.root.addResource(jsii.String("v1"))

You can define more parameters on the integration to tune the behavior of API Gateway

var hello function


integration := apigateway.NewLambdaIntegration(hello, &lambdaIntegrationOptions{
	proxy: jsii.Boolean(false),
	requestParameters: map[string]*string{
		// You can define mapping parameters from your method to your integration
		// - Destination parameters (the key) are the integration parameters (used in mappings)
		// - Source parameters (the value) are the source request parameters or expressions
		// @see: https://docs.aws.amazon.com/apigateway/latest/developerguide/request-response-data-mappings.html
		"integration.request.querystring.who": jsii.String("method.request.querystring.who"),
	},
	allowTestInvoke: jsii.Boolean(true),
	requestTemplates: map[string]*string{
		// You can define a mapping that will build a payload for your integration, based
		//  on the integration parameters that you have specified
		// Check: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
		"application/json": JSON.stringify(map[string]*string{
			"action": jsii.String("sayHello"),
			"pollId": jsii.String("$util.escapeJavaScript($input.params('who'))"),
		}),
	},
	// This parameter defines the behavior of the engine is no suitable response template is found
	passthroughBehavior: apigateway.passthroughBehavior_NEVER,
	integrationResponses: []integrationResponse{
		&integrationResponse{
			// Successful response from the Lambda function, no filter defined
			//  - the selectionPattern filter only tests the error message
			// We will set the response status code to 200
			statusCode: jsii.String("200"),
			responseTemplates: map[string]*string{
				// This template takes the "message" result from the Lambda function, and embeds it in a JSON response
				// Check https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
				"application/json": JSON.stringify(map[string]*string{
					"state": jsii.String("ok"),
					"greeting": jsii.String("$util.escapeJavaScript($input.body)"),
				}),
			},
			responseParameters: map[string]*string{
				// We can map response parameters
				// - Destination parameters (the key) are the response parameters (used in mappings)
				// - Source parameters (the value) are the integration response parameters or expressions
				"method.response.header.Content-Type": jsii.String("'application/json'"),
				"method.response.header.Access-Control-Allow-Origin": jsii.String("'*'"),
				"method.response.header.Access-Control-Allow-Credentials": jsii.String("'true'"),
			},
		},
		&integrationResponse{
			// For errors, we check if the error message is not empty, get the error data
			selectionPattern: jsii.String("(\n|.)+"),
			// We will set the response status code to 200
			statusCode: jsii.String("400"),
			responseTemplates: map[string]*string{
				"application/json": JSON.stringify(map[string]*string{
					"state": jsii.String("error"),
					"message": jsii.String("$util.escapeJavaScript($input.path('$.errorMessage'))"),
				}),
			},
			responseParameters: map[string]*string{
				"method.response.header.Content-Type": jsii.String("'application/json'"),
				"method.response.header.Access-Control-Allow-Origin": jsii.String("'*'"),
				"method.response.header.Access-Control-Allow-Credentials": jsii.String("'true'"),
			},
		},
	},
})

You can define models for your responses (and requests)

var api restApi


// We define the JSON Schema for the transformed valid response
responseModel := api.addModel(jsii.String("ResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.jsonSchemaVersion_DRAFT4,
		title: jsii.String("pollResponse"),
		type: apigateway.jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"greeting": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

// We define the JSON Schema for the transformed error response
errorResponseModel := api.addModel(jsii.String("ErrorResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ErrorResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.*jsonSchemaVersion_DRAFT4,
		title: jsii.String("errorResponse"),
		type: apigateway.*jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"message": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

And reference all on your method definition.

var integration lambdaIntegration
var resource resource
var responseModel model
var errorResponseModel model


resource.addMethod(jsii.String("GET"), integration, &methodOptions{
	// We can mark the parameters as required
	requestParameters: map[string]*bool{
		"method.request.querystring.who": jsii.Boolean(true),
	},
	// we can set request validator options like below
	requestValidatorOptions: &requestValidatorOptions{
		requestValidatorName: jsii.String("test-validator"),
		validateRequestBody: jsii.Boolean(true),
		validateRequestParameters: jsii.Boolean(false),
	},
	methodResponses: []methodResponse{
		&methodResponse{
			// Successful response from the integration
			statusCode: jsii.String("200"),
			// Define what parameters are allowed or not
			responseParameters: map[string]*bool{
				"method.response.header.Content-Type": jsii.Boolean(true),
				"method.response.header.Access-Control-Allow-Origin": jsii.Boolean(true),
				"method.response.header.Access-Control-Allow-Credentials": jsii.Boolean(true),
			},
			// Validate the schema on the response
			responseModels: map[string]iModel{
				"application/json": responseModel,
			},
		},
		&methodResponse{
			// Same thing for the error responses
			statusCode: jsii.String("400"),
			responseParameters: map[string]*bool{
				"method.response.header.Content-Type": jsii.Boolean(true),
				"method.response.header.Access-Control-Allow-Origin": jsii.Boolean(true),
				"method.response.header.Access-Control-Allow-Credentials": jsii.Boolean(true),
			},
			responseModels: map[string]*iModel{
				"application/json": errorResponseModel,
			},
		},
	},
})

Specifying requestValidatorOptions automatically creates the RequestValidator construct with the given options. However, if you have your RequestValidator already initialized or imported, use the requestValidator option instead.

Default Integration and Method Options

The defaultIntegration and defaultMethodOptions properties can be used to configure a default integration at any resource level. These options will be used when defining method under this resource (recursively) with undefined integration or options.

If not defined, the default integration is MockIntegration. See reference documentation for default method options.

The following example defines the booksBackend integration as a default integration. This means that all API methods that do not explicitly define an integration will be routed to this AWS Lambda function.

var booksBackend lambdaIntegration

api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	defaultIntegration: booksBackend,
})

books := api.root.addResource(jsii.String("books"))
books.addMethod(jsii.String("GET")) // integrated with `booksBackend`
books.addMethod(jsii.String("POST")) // integrated with `booksBackend`

book := books.addResource(jsii.String("{book_id}"))
book.addMethod(jsii.String("GET"))

A Method can be configured with authorization scopes. Authorization scopes are used in conjunction with an authorizer that uses Amazon Cognito user pools. Read more about authorization scopes here.

Authorization scopes for a Method can be configured using the authorizationScopes property as shown below -

var books resource


books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizationType: apigateway.authorizationType_COGNITO,
	authorizationScopes: []*string{
		jsii.String("Scope1"),
		jsii.String("Scope2"),
	},
})

Proxy Routes

The addProxy method can be used to install a greedy {proxy+} resource on a path. By default, this also installs an "ANY" method:

var resource resource
var handler function

proxy := resource.addProxy(&proxyResourceOptions{
	defaultIntegration: apigateway.NewLambdaIntegration(handler),

	// "false" will require explicitly adding methods on the `proxy` resource
	anyMethod: jsii.Boolean(true),
})

Authorizers

API Gateway supports several different authorization types that can be used for controlling access to your REST APIs.

IAM-based authorizer

The following CDK code provides 'execute-api' permission to an IAM user, via IAM policies, for the 'GET' method on the books resource:

var books resource
var iamUser user


getBooks := books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizationType: apigateway.authorizationType_IAM,
})

iamUser.attachInlinePolicy(iam.NewPolicy(this, jsii.String("AllowBooks"), &policyProps{
	statements: []policyStatement{
		iam.NewPolicyStatement(&policyStatementProps{
			actions: []*string{
				jsii.String("execute-api:Invoke"),
			},
			effect: iam.effect_ALLOW,
			resources: []*string{
				getBooks.methodArn,
			},
		}),
	},
}))
Lambda-based token authorizer

API Gateway also allows lambda functions to be used as authorizers.

This module provides support for token-based Lambda authorizers. When a client makes a request to an API's methods configured with such an authorizer, API Gateway calls the Lambda authorizer, which takes the caller's identity as input and returns an IAM policy as output. A token-based Lambda authorizer (also called a token authorizer) receives the caller's identity in a bearer token, such as a JSON Web Token (JWT) or an OAuth token.

API Gateway interacts with the authorizer Lambda function handler by passing input and expecting the output in a specific format. The event object that the handler is called with contains the authorizationToken and the methodArn from the request to the API Gateway endpoint. The handler is expected to return the principalId (i.e. the client identifier) and a policyDocument stating what the client is authorizer to perform. See here for a detailed specification on inputs and outputs of the Lambda handler.

The following code attaches a token-based Lambda authorizer to the 'GET' Method of the Book resource:

var authFn function
var books resource


auth := apigateway.NewTokenAuthorizer(this, jsii.String("booksAuthorizer"), &tokenAuthorizerProps{
	handler: authFn,
})

books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
})

A full working example is shown below.

!cdk-integ pragma:ignore-assets

import path "github.com/aws-samples/dummy/path"
import lambda "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

/*
 * Stack verification steps:
 * * `curl -s -o /dev/null -w "%{http_code}" <url>` should return 401
 * * `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: deny' <url>` should return 403
 * * `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: allow' <url>` should return 200
 */

app := awscdk.NewApp()
stack := awscdk.NewStack(app, jsii.String("TokenAuthorizerInteg"))

authorizerFn := lambda.NewFunction(stack, jsii.String("MyAuthorizerFunction"), &functionProps{
	runtime: lambda.runtime_NODEJS_14_X(),
	handler: jsii.String("index.handler"),
	code: lambda.assetCode.fromAsset(path.join(__dirname, jsii.String("integ.token-authorizer.handler"))),
})

restapi := awscdk.NewRestApi(stack, jsii.String("MyRestApi"))

authorizer := awscdk.NewTokenAuthorizer(stack, jsii.String("MyAuthorizer"), &tokenAuthorizerProps{
	handler: authorizerFn,
})

restapi.root.addMethod(jsii.String("ANY"), awscdk.NewMockIntegration(&integrationOptions{
	integrationResponses: []integrationResponse{
		&integrationResponse{
			statusCode: jsii.String("200"),
		},
	},
	passthroughBehavior: awscdk.PassthroughBehavior_NEVER,
	requestTemplates: map[string]*string{
		"application/json": jsii.String("{ \"statusCode\": 200 }"),
	},
}), &methodOptions{
	methodResponses: []methodResponse{
		&methodResponse{
			statusCode: jsii.String("200"),
		},
	},
	authorizer: authorizer,
})

By default, the TokenAuthorizer looks for the authorization token in the request header with the key 'Authorization'. This can, however, be modified by changing the identitySource property.

Authorizers can also be passed via the defaultMethodOptions property within the RestApi construct or the Method construct. Unless explicitly overridden, the specified defaults will be applied across all Methods across the RestApi or across all Resources, depending on where the defaults were specified.

Lambda-based request authorizer

This module provides support for request-based Lambda authorizers. When a client makes a request to an API's methods configured with such an authorizer, API Gateway calls the Lambda authorizer, which takes specified parts of the request, known as identity sources, as input and returns an IAM policy as output. A request-based Lambda authorizer (also called a request authorizer) receives the identity sources in a series of values pulled from the request, from the headers, stage variables, query strings, and the context.

API Gateway interacts with the authorizer Lambda function handler by passing input and expecting the output in a specific format. The event object that the handler is called with contains the body of the request and the methodArn from the request to the API Gateway endpoint. The handler is expected to return the principalId (i.e. the client identifier) and a policyDocument stating what the client is authorizer to perform. See here for a detailed specification on inputs and outputs of the Lambda handler.

The following code attaches a request-based Lambda authorizer to the 'GET' Method of the Book resource:

var authFn function
var books resource


auth := apigateway.NewRequestAuthorizer(this, jsii.String("booksAuthorizer"), &requestAuthorizerProps{
	handler: authFn,
	identitySources: []*string{
		apigateway.identitySource.header(jsii.String("Authorization")),
	},
})

books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
})

A full working example is shown below.

!cdk-integ pragma:ignore-assets

import path "github.com/aws-samples/dummy/path"
import lambda "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

// Against the RestApi endpoint from the stack output, run
// `curl -s -o /dev/null -w "%{http_code}" <url>` should return 401
// `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: deny' <url>?allow=yes` should return 403
// `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: allow' <url>?allow=yes` should return 200

app := awscdk.NewApp()
stack := awscdk.NewStack(app, jsii.String("RequestAuthorizerInteg"))

authorizerFn := lambda.NewFunction(stack, jsii.String("MyAuthorizerFunction"), &functionProps{
	runtime: lambda.runtime_NODEJS_14_X(),
	handler: jsii.String("index.handler"),
	code: lambda.assetCode.fromAsset(path.join(__dirname, jsii.String("integ.request-authorizer.handler"))),
})

restapi := awscdk.NewRestApi(stack, jsii.String("MyRestApi"))

authorizer := awscdk.NewRequestAuthorizer(stack, jsii.String("MyAuthorizer"), &requestAuthorizerProps{
	handler: authorizerFn,
	identitySources: []*string{
		awscdk.IdentitySource.header(jsii.String("Authorization")),
		awscdk.IdentitySource.queryString(jsii.String("allow")),
	},
})

restapi.root.addMethod(jsii.String("ANY"), awscdk.NewMockIntegration(&integrationOptions{
	integrationResponses: []integrationResponse{
		&integrationResponse{
			statusCode: jsii.String("200"),
		},
	},
	passthroughBehavior: awscdk.PassthroughBehavior_NEVER,
	requestTemplates: map[string]*string{
		"application/json": jsii.String("{ \"statusCode\": 200 }"),
	},
}), &methodOptions{
	methodResponses: []methodResponse{
		&methodResponse{
			statusCode: jsii.String("200"),
		},
	},
	authorizer: authorizer,
})

By default, the RequestAuthorizer does not pass any kind of information from the request. This can, however, be modified by changing the identitySource property, and is required when specifying a value for caching.

Authorizers can also be passed via the defaultMethodOptions property within the RestApi construct or the Method construct. Unless explicitly overridden, the specified defaults will be applied across all Methods across the RestApi or across all Resources, depending on where the defaults were specified.

Cognito User Pools authorizer

API Gateway also allows Amazon Cognito user pools as authorizer

The following snippet configures a Cognito user pool as an authorizer:

var books resource
userPool := cognito.NewUserPool(this, jsii.String("UserPool"))

auth := apigateway.NewCognitoUserPoolsAuthorizer(this, jsii.String("booksAuthorizer"), &cognitoUserPoolsAuthorizerProps{
	cognitoUserPools: []iUserPool{
		userPool,
	},
})
books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
	authorizationType: apigateway.authorizationType_COGNITO,
})

Mutual TLS (mTLS)

Mutual TLS can be configured to limit access to your API based by using client certificates instead of (or as an extension of) using authorization headers.

var acm interface{}


apigateway.NewDomainName(this, jsii.String("domain-name"), &domainNameProps{
	domainName: jsii.String("example.com"),
	certificate: acm.certificate_FromCertificateArn(this, jsii.String("cert"), jsii.String("arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d")),
	mtls: &mTLSConfig{
		bucket: s3.NewBucket(this, jsii.String("bucket")),
		key: jsii.String("truststore.pem"),
		version: jsii.String("version"),
	},
})

Instructions for configuring your trust store can be found here.

Deployments

By default, the RestApi construct will automatically create an API Gateway Deployment and a "prod" Stage which represent the API configuration you defined in your CDK app. This means that when you deploy your app, your API will be have open access from the internet via the stage URL.

The URL of your API can be obtained from the attribute restApi.url, and is also exported as an Output from your stack, so it's printed when you cdk deploy your app:

$ cdk deploy
...
books.booksapiEndpointE230E8D5 = https://6lyktd4lpk.execute-api.us-east-1.amazonaws.com/prod/

To disable this behavior, you can set { deploy: false } when creating your API. This means that the API will not be deployed and a stage will not be created for it. You will need to manually define a apigateway.Deployment and apigateway.Stage resources.

Use the deployOptions property to customize the deployment options of your API.

The following example will configure API Gateway to emit logs and data traces to AWS CloudWatch for all API calls:

By default, an IAM role will be created and associated with API Gateway to allow it to write logs and metrics to AWS CloudWatch unless cloudWatchRole is set to false.

api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		loggingLevel: apigateway.methodLoggingLevel_INFO,
		dataTraceEnabled: jsii.Boolean(true),
	},
})
Deep dive: Invalidation of deployments

API Gateway deployments are an immutable snapshot of the API. This means that we want to automatically create a new deployment resource every time the API model defined in our CDK app changes.

In order to achieve that, the AWS CloudFormation logical ID of the AWS::ApiGateway::Deployment resource is dynamically calculated by hashing the API configuration (resources, methods). This means that when the configuration changes (i.e. a resource or method are added, configuration is changed), a new logical ID will be assigned to the deployment resource. This will cause CloudFormation to create a new deployment resource.

By default, old deployments are deleted. You can set retainDeployments: true to allow users revert the stage to an old deployment manually.

Custom Domains

To associate an API with a custom domain, use the domainName configuration when you define your API:

var acmCertificateForExampleCom interface{}


api := apigateway.NewRestApi(this, jsii.String("MyDomain"), &restApiProps{
	domainName: &domainNameOptions{
		domainName: jsii.String("example.com"),
		certificate: acmCertificateForExampleCom,
	},
})

This will define a DomainName resource for you, along with a BasePathMapping from the root of the domain to the deployment stage of the API. This is a common set up.

To route domain traffic to an API Gateway API, use Amazon Route 53 to create an alias record. An alias record is a Route 53 extension to DNS. It's similar to a CNAME record, but you can create an alias record both for the root domain, such as example.com, and for subdomains, such as www.example.com. (You can create CNAME records only for subdomains.)

import route53 "github.com/aws/aws-cdk-go/awscdk"
import targets "github.com/aws/aws-cdk-go/awscdk"

var api restApi
var hostedZoneForExampleCom interface{}


route53.NewARecord(this, jsii.String("CustomDomainAliasRecord"), &aRecordProps{
	zone: hostedZoneForExampleCom,
	target: route53.recordTarget.fromAlias(targets.NewApiGateway(api)),
})

You can also define a DomainName resource directly in order to customize the default behavior:

var acmCertificateForExampleCom interface{}


apigateway.NewDomainName(this, jsii.String("custom-domain"), &domainNameProps{
	domainName: jsii.String("example.com"),
	certificate: acmCertificateForExampleCom,
	endpointType: apigateway.endpointType_EDGE,
	 // default is REGIONAL
	securityPolicy: apigateway.securityPolicy_TLS_1_2,
})

Once you have a domain, you can map base paths of the domain to APIs. The following example will map the URL https://example.com/go-to-api1 to the api1 API and https://example.com/boom to the api2 API.

var domain domainName
var api1 restApi
var api2 restApi


domain.addBasePathMapping(api1, &basePathMappingOptions{
	basePath: jsii.String("go-to-api1"),
})
domain.addBasePathMapping(api2, &basePathMappingOptions{
	basePath: jsii.String("boom"),
})

You can specify the API Stage to which this base path URL will map to. By default, this will be the deploymentStage of the RestApi.

var domain domainName
var restapi restApi


betaDeploy := apigateway.NewDeployment(this, jsii.String("beta-deployment"), &deploymentProps{
	api: restapi,
})
betaStage := apigateway.NewStage(this, jsii.String("beta-stage"), &stageProps{
	deployment: betaDeploy,
})
domain.addBasePathMapping(restapi, &basePathMappingOptions{
	basePath: jsii.String("api/beta"),
	stage: betaStage,
})

If you don't specify basePath, all URLs under this domain will be mapped to the API, and you won't be able to map another API to the same domain:

var domain domainName
var api restApi

domain.addBasePathMapping(api)

This can also be achieved through the mapping configuration when defining the domain as demonstrated above.

If you wish to setup this domain with an Amazon Route53 alias, use the targets.ApiGatewayDomain:

var hostedZoneForExampleCom interface{}
var domainName domainName

import route53 "github.com/aws/aws-cdk-go/awscdk"
import targets "github.com/aws/aws-cdk-go/awscdk"


route53.NewARecord(this, jsii.String("CustomDomainAliasRecord"), &aRecordProps{
	zone: hostedZoneForExampleCom,
	target: route53.recordTarget.fromAlias(targets.NewApiGatewayDomain(domainName)),
})

Access Logging

Access logging creates logs every time an API method is accessed. Access logs can have information on who has accessed the API, how the caller accessed the API and what responses were generated. Access logs are configured on a Stage of the RestApi. Access logs can be expressed in a format of your choosing, and can contain any access details, with a minimum that it must include the 'requestId'. The list of variables that can be expressed in the access log can be found here. Read more at Setting Up CloudWatch API Logging in API Gateway

// production stage
prdLogGroup := logs.NewLogGroup(this, jsii.String("PrdLogs"))
api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(prdLogGroup),
		accessLogFormat: apigateway.accessLogFormat.jsonWithStandardFields(),
	},
})
deployment := apigateway.NewDeployment(this, jsii.String("Deployment"), &deploymentProps{
	api: api,
})

// development stage
devLogGroup := logs.NewLogGroup(this, jsii.String("DevLogs"))
apigateway.NewStage(this, jsii.String("dev"), &stageProps{
	deployment: deployment,
	accessLogDestination: apigateway.NewLogGroupLogDestination(devLogGroup),
	accessLogFormat: apigateway.*accessLogFormat.jsonWithStandardFields(&jsonWithStandardFieldProps{
		caller: jsii.Boolean(false),
		httpMethod: jsii.Boolean(true),
		ip: jsii.Boolean(true),
		protocol: jsii.Boolean(true),
		requestTime: jsii.Boolean(true),
		resourcePath: jsii.Boolean(true),
		responseLength: jsii.Boolean(true),
		status: jsii.Boolean(true),
		user: jsii.Boolean(true),
	}),
})

The following code will generate the access log in the CLF format.

logGroup := logs.NewLogGroup(this, jsii.String("ApiGatewayAccessLogs"))
api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(logGroup),
		accessLogFormat: apigateway.accessLogFormat.clf(),
	},
})

You can also configure your own access log format by using the AccessLogFormat.custom() API. AccessLogField provides commonly used fields. The following code configures access log to contain.

logGroup := logs.NewLogGroup(this, jsii.String("ApiGatewayAccessLogs"))
apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(logGroup),
		accessLogFormat: apigateway.accessLogFormat.custom(
		fmt.Sprintf("%v %v %v", apigateway.accessLogField.contextRequestId(), apigateway.*accessLogField.contextErrorMessage(), apigateway.*accessLogField.contextErrorMessageString())),
	},
})

You can use the methodOptions property to configure default method throttling for a stage. The following snippet configures the a stage that accepts 100 requests per minute, allowing burst up to 200 requests per minute.

api := apigateway.NewRestApi(this, jsii.String("books"))
deployment := apigateway.NewDeployment(this, jsii.String("my-deployment"), &deploymentProps{
	api: api,
})
stage := apigateway.NewStage(this, jsii.String("my-stage"), &stageProps{
	deployment: deployment,
	methodOptions: map[string]methodDeploymentOptions{
		"/*/*": &methodDeploymentOptions{
			 // This special path applies to all resource paths and all HTTP methods
			"throttlingRateLimit": jsii.Number(100),
			"throttlingBurstLimit": jsii.Number(200),
		},
	},
})

Configuring methodOptions on the deployOptions of RestApi will set the throttling behaviors on the default stage that is automatically created.

api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		methodOptions: map[string]methodDeploymentOptions{
			"/*/*": &methodDeploymentOptions{
				 // This special path applies to all resource paths and all HTTP methods
				"throttlingRateLimit": jsii.Number(100),
				"throttlingBurstLimit": jsii.Number(1000),
			},
		},
	},
})

Cross Origin Resource Sharing (CORS)

Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell browsers to give a web application running at one origin, access to selected resources from a different origin. A web application executes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, or port) from its own.

You can add the CORS preflight OPTIONS HTTP method to any API resource via the defaultCorsPreflightOptions option or by calling the addCorsPreflight on a specific resource.

The following example will enable CORS for all methods and all origins on all resources of the API:

apigateway.NewRestApi(this, jsii.String("api"), &restApiProps{
	defaultCorsPreflightOptions: &corsOptions{
		allowOrigins: apigateway.cors_ALL_ORIGINS(),
		allowMethods: apigateway.*cors_ALL_METHODS(),
	},
})

The following example will add an OPTIONS method to the myResource API resource, which only allows GET and PUT HTTP requests from the origin https://amazon.com.

var myResource resource


myResource.addCorsPreflight(&corsOptions{
	allowOrigins: []*string{
		jsii.String("https://amazon.com"),
	},
	allowMethods: []*string{
		jsii.String("GET"),
		jsii.String("PUT"),
	},
})

See the CorsOptions API reference for a detailed list of supported configuration options.

You can specify defaults this at the resource level, in which case they will be applied to the entire resource sub-tree:

var resource resource


subtree := resource.addResource(jsii.String("subtree"), &resourceOptions{
	defaultCorsPreflightOptions: &corsOptions{
		allowOrigins: []*string{
			jsii.String("https://amazon.com"),
		},
	},
})

This means that all resources under subtree (inclusive) will have a preflight OPTIONS added to them.

See #906 for a list of CORS features which are not yet supported.

Endpoint Configuration

API gateway allows you to specify an API Endpoint Type. To define an endpoint type for the API gateway, use endpointConfiguration property:

api := apigateway.NewRestApi(this, jsii.String("api"), &restApiProps{
	endpointConfiguration: &endpointConfiguration{
		types: []endpointType{
			apigateway.*endpointType_EDGE,
		},
	},
})

You can also create an association between your Rest API and a VPC endpoint. By doing so, API Gateway will generate a new Route53 Alias DNS record which you can use to invoke your private APIs. More info can be found here.

Here is an example:

var someEndpoint iVpcEndpoint


api := apigateway.NewRestApi(this, jsii.String("api"), &restApiProps{
	endpointConfiguration: &endpointConfiguration{
		types: []endpointType{
			apigateway.*endpointType_PRIVATE,
		},
		vpcEndpoints: []*iVpcEndpoint{
			someEndpoint,
		},
	},
})

By performing this association, we can invoke the API gateway using the following format:

https://{rest-api-id}-{vpce-id}.execute-api.{region}.amazonaws.com/{stage}

Private Integrations

A private integration makes it simple to expose HTTP/HTTPS resources behind an Amazon VPC for access by clients outside of the VPC. The private integration uses an API Gateway resource of VpcLink to encapsulate connections between API Gateway and targeted VPC resources. The VpcLink is then attached to the Integration of a specific API Gateway Method. The following code sets up a private integration with a network load balancer -

import elbv2 "github.com/aws/aws-cdk-go/awscdk"


vpc := ec2.NewVpc(this, jsii.String("VPC"))
nlb := elbv2.NewNetworkLoadBalancer(this, jsii.String("NLB"), &networkLoadBalancerProps{
	vpc: vpc,
})
link := apigateway.NewVpcLink(this, jsii.String("link"), &vpcLinkProps{
	targets: []iNetworkLoadBalancer{
		nlb,
	},
})

integration := apigateway.NewIntegration(&integrationProps{
	type: apigateway.integrationType_HTTP_PROXY,
	options: &integrationOptions{
		connectionType: apigateway.connectionType_VPC_LINK,
		vpcLink: link,
	},
})

The uri for the private integration, in the case of a VpcLink, will be set to the DNS name of the VPC Link's NLB. If the VPC Link has multiple NLBs or the VPC Link is imported or the DNS name cannot be determined for any other reason, the user is expected to specify the uri property.

Any existing VpcLink resource can be imported into the CDK app via the VpcLink.fromVpcLinkId().

awesomeLink := apigateway.vpcLink.fromVpcLinkId(this, jsii.String("awesome-vpc-link"), jsii.String("us-east-1_oiuR12Abd"))

Gateway response

If the Rest API fails to process an incoming request, it returns to the client an error response without forwarding the request to the integration backend. API Gateway has a set of standard response messages that are sent to the client for each type of error. These error responses can be configured on the Rest API. The list of Gateway responses that can be configured can be found here. Learn more about Gateway Responses.

The following code configures a Gateway Response when the response is 'access denied':

api := apigateway.NewRestApi(this, jsii.String("books-api"))
api.addGatewayResponse(jsii.String("test-response"), &gatewayResponseOptions{
	type: apigateway.responseType_ACCESS_DENIED(),
	statusCode: jsii.String("500"),
	responseHeaders: map[string]*string{
		"Access-Control-Allow-Origin": jsii.String("test.com"),
		"test-key": jsii.String("test-value"),
	},
	templates: map[string]*string{
		"application/json": jsii.String("{ \"message\": $context.error.messageString, \"statusCode\": \"488\", \"type\": \"$context.error.responseType\" }"),
	},
})

OpenAPI Definition

CDK supports creating a REST API by importing an OpenAPI definition file. It currently supports OpenAPI v2.0 and OpenAPI v3.0 definition files. Read more about Configuring a REST API using OpenAPI.

The following code creates a REST API using an external OpenAPI definition JSON file -

var integration integration


api := apigateway.NewSpecRestApi(this, jsii.String("books-api"), &specRestApiProps{
	apiDefinition: apigateway.apiDefinition.fromAsset(jsii.String("path-to-file.json")),
})

booksResource := api.root.addResource(jsii.String("books"))
booksResource.addMethod(jsii.String("GET"), integration)

It is possible to use the addResource() API to define additional API Gateway Resources.

Note: Deployment will fail if a Resource of the same name is already defined in the Open API specification.

Note: Any default properties configured, such as defaultIntegration, defaultMethodOptions, etc. will only be applied to Resources and Methods defined in the CDK, and not the ones defined in the spec. Use the API Gateway extensions to OpenAPI to configure these.

There are a number of limitations in using OpenAPI definitions in API Gateway. Read the Amazon API Gateway important notes for REST APIs for more details.

Note: When starting off with an OpenAPI definition using SpecRestApi, it is not possible to configure some properties that can be configured directly in the OpenAPI specification file. This is to prevent people duplication of these properties and potential confusion.

Endpoint configuration

By default, SpecRestApi will create an edge optimized endpoint.

This can be modified as shown below:

var apiDefinition apiDefinition


api := apigateway.NewSpecRestApi(this, jsii.String("ExampleRestApi"), &specRestApiProps{
	apiDefinition: apiDefinition,
	endpointTypes: []endpointType{
		apigateway.*endpointType_PRIVATE,
	},
})

Note: For private endpoints you will still need to provide the x-amazon-apigateway-policy and x-amazon-apigateway-endpoint-configuration in your openApi file.

Metrics

The API Gateway service sends metrics around the performance of Rest APIs to Amazon CloudWatch. These metrics can be referred to using the metric APIs available on the RestApi construct. The APIs with the metric prefix can be used to get reference to specific metrics for this API. For example, the method below refers to the client side errors metric for this API.

api := apigateway.NewRestApi(this, jsii.String("my-api"))
clientErrorMetric := api.metricClientError()

APIGateway v2

APIGateway v2 APIs are now moved to its own package named aws-apigatewayv2. For backwards compatibility, existing APIGateway v2 "CFN resources" (such as CfnApi) that were previously exported as part of this package, are still exported from here and have been marked deprecated. However, updates to these CloudFormation resources, such as new properties and new resource types will not be available.

Move to using aws-apigatewayv2 to get the latest APIs and updates.


This module is part of the AWS Cloud Development Kit project.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogField_ContextAccountId

func AccessLogField_ContextAccountId() *string

The API owner's AWS account ID. Experimental.

func AccessLogField_ContextApiId

func AccessLogField_ContextApiId() *string

The identifier API Gateway assigns to your API. Experimental.

func AccessLogField_ContextAuthorizer

func AccessLogField_ContextAuthorizer(property *string) *string

The stringified value of the specified key-value pair of the `context` map returned from an API Gateway Lambda authorizer function. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html

Experimental.

func AccessLogField_ContextAuthorizerClaims

func AccessLogField_ContextAuthorizerClaims(property *string) *string

A property of the claims returned from the Amazon Cognito user pool after the method caller is successfully authenticated. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html

Experimental.

func AccessLogField_ContextAuthorizerIntegrationLatency

func AccessLogField_ContextAuthorizerIntegrationLatency() *string

The authorizer latency in ms. Experimental.

func AccessLogField_ContextAuthorizerPrincipalId

func AccessLogField_ContextAuthorizerPrincipalId() *string

The principal user identification associated with the token sent by the client and returned from an API Gateway Lambda authorizer (formerly known as a custom authorizer). See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html

Experimental.

func AccessLogField_ContextAwsEndpointRequestId

func AccessLogField_ContextAwsEndpointRequestId() *string

The AWS endpoint's request ID. Experimental.

func AccessLogField_ContextDomainName

func AccessLogField_ContextDomainName() *string

The full domain name used to invoke the API.

This should be the same as the incoming `Host` header. Experimental.

func AccessLogField_ContextDomainPrefix

func AccessLogField_ContextDomainPrefix() *string

The first label of the `$context.domainName`. This is often used as a caller/customer identifier. Experimental.

func AccessLogField_ContextErrorMessage

func AccessLogField_ContextErrorMessage() *string

A string containing an API Gateway error message. Experimental.

func AccessLogField_ContextErrorMessageString

func AccessLogField_ContextErrorMessageString() *string

The quoted value of $context.error.message, namely "$context.error.message". Experimental.

func AccessLogField_ContextErrorResponseType

func AccessLogField_ContextErrorResponseType() *string

A type of GatewayResponse.

This variable can only be used for simple variable substitution in a GatewayResponse body-mapping template, which is not processed by the Velocity Template Language engine, and in access logging. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html

Experimental.

func AccessLogField_ContextErrorValidationErrorString

func AccessLogField_ContextErrorValidationErrorString() *string

A string containing a detailed validation error message. Experimental.

func AccessLogField_ContextExtendedRequestId

func AccessLogField_ContextExtendedRequestId() *string

The extended ID that API Gateway assigns to the API request, which contains more useful information for debugging/troubleshooting. Experimental.

func AccessLogField_ContextHttpMethod

func AccessLogField_ContextHttpMethod() *string

The HTTP method used.

Valid values include: `DELETE`, `GET`, `HEAD`, `OPTIONS`, `PATCH`, `POST`, and `PUT`. Experimental.

func AccessLogField_ContextIdentityAccountId

func AccessLogField_ContextIdentityAccountId() *string

The AWS account ID associated with the request. Experimental.

func AccessLogField_ContextIdentityApiKey

func AccessLogField_ContextIdentityApiKey() *string

For API methods that require an API key, this variable is the API key associated with the method request.

For methods that don't require an API key, this variable is. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html

Experimental.

func AccessLogField_ContextIdentityApiKeyId

func AccessLogField_ContextIdentityApiKeyId() *string

The API key ID associated with an API request that requires an API key. Experimental.

func AccessLogField_ContextIdentityCaller

func AccessLogField_ContextIdentityCaller() *string

The principal identifier of the caller making the request. Experimental.

func AccessLogField_ContextIdentityCognitoAuthenticationProvider

func AccessLogField_ContextIdentityCognitoAuthenticationProvider() *string

The Amazon Cognito authentication provider used by the caller making the request.

Available only if the request was signed with Amazon Cognito credentials. See: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html

Experimental.

func AccessLogField_ContextIdentityCognitoAuthenticationType

func AccessLogField_ContextIdentityCognitoAuthenticationType() *string

The Amazon Cognito authentication type of the caller making the request.

Available only if the request was signed with Amazon Cognito credentials. Experimental.

func AccessLogField_ContextIdentityCognitoIdentityId

func AccessLogField_ContextIdentityCognitoIdentityId() *string

The Amazon Cognito identity ID of the caller making the request.

Available only if the request was signed with Amazon Cognito credentials. Experimental.

func AccessLogField_ContextIdentityCognitoIdentityPoolId

func AccessLogField_ContextIdentityCognitoIdentityPoolId() *string

The Amazon Cognito identity pool ID of the caller making the request.

Available only if the request was signed with Amazon Cognito credentials. Experimental.

func AccessLogField_ContextIdentityPrincipalOrgId

func AccessLogField_ContextIdentityPrincipalOrgId() *string

The AWS organization ID. Experimental.

func AccessLogField_ContextIdentitySourceIp

func AccessLogField_ContextIdentitySourceIp() *string

The source IP address of the TCP connection making the request to API Gateway.

Warning: You should not trust this value if there is any chance that the `X-Forwarded-For` header could be forged. Experimental.

func AccessLogField_ContextIdentityUser

func AccessLogField_ContextIdentityUser() *string

The principal identifier of the user making the request.

Used in Lambda authorizers. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html

Experimental.

func AccessLogField_ContextIdentityUserAgent

func AccessLogField_ContextIdentityUserAgent() *string

The User-Agent header of the API caller. Experimental.

func AccessLogField_ContextIdentityUserArn

func AccessLogField_ContextIdentityUserArn() *string

The Amazon Resource Name (ARN) of the effective user identified after authentication. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html

Experimental.

func AccessLogField_ContextIntegrationLatency

func AccessLogField_ContextIntegrationLatency() *string

The integration latency in ms. Experimental.

func AccessLogField_ContextIntegrationStatus

func AccessLogField_ContextIntegrationStatus() *string

For Lambda proxy integration, this parameter represents the status code returned from AWS Lambda, not from the backend Lambda function. Experimental.

func AccessLogField_ContextPath

func AccessLogField_ContextPath() *string

The request path.

For example, for a non-proxy request URL of https://{rest-api-id.execute-api.{region}.amazonaws.com/{stage}/root/child, this value is /{stage}/root/child. Experimental.

func AccessLogField_ContextProtocol

func AccessLogField_ContextProtocol() *string

The request protocol, for example, HTTP/1.1. Experimental.

func AccessLogField_ContextRequestId

func AccessLogField_ContextRequestId() *string

The ID that API Gateway assigns to the API request. Experimental.

func AccessLogField_ContextRequestOverrideHeader

func AccessLogField_ContextRequestOverrideHeader(headerName *string) *string

The request header override.

If this parameter is defined, it contains the headers to be used instead of the HTTP Headers that are defined in the Integration Request pane. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html

Experimental.

func AccessLogField_ContextRequestOverridePath

func AccessLogField_ContextRequestOverridePath(pathName *string) *string

The request path override.

If this parameter is defined, it contains the request path to be used instead of the URL Path Parameters that are defined in the Integration Request pane. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html

Experimental.

func AccessLogField_ContextRequestOverrideQuerystring

func AccessLogField_ContextRequestOverrideQuerystring(querystringName *string) *string

The request query string override.

If this parameter is defined, it contains the request query strings to be used instead of the URL Query String Parameters that are defined in the Integration Request pane. Experimental.

func AccessLogField_ContextRequestTime

func AccessLogField_ContextRequestTime() *string

The CLF-formatted request time (dd/MMM/yyyy:HH:mm:ss +-hhmm). Experimental.

func AccessLogField_ContextRequestTimeEpoch

func AccessLogField_ContextRequestTimeEpoch() *string

The Epoch-formatted request time. Experimental.

func AccessLogField_ContextResourceId

func AccessLogField_ContextResourceId() *string

The identifier that API Gateway assigns to your resource. Experimental.

func AccessLogField_ContextResourcePath

func AccessLogField_ContextResourcePath() *string

The path to your resource.

For example, for the non-proxy request URI of `https://{rest-api-id.execute-api.{region}.amazonaws.com/{stage}/root/child`, The $context.resourcePath value is `/root/child`. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-step-by-step.html

Experimental.

func AccessLogField_ContextResponseLatency

func AccessLogField_ContextResponseLatency() *string

The response latency in ms. Experimental.

func AccessLogField_ContextResponseLength

func AccessLogField_ContextResponseLength() *string

The response payload length. Experimental.

func AccessLogField_ContextResponseOverrideHeader

func AccessLogField_ContextResponseOverrideHeader(headerName *string) *string

The response header override.

If this parameter is defined, it contains the header to be returned instead of the Response header that is defined as the Default mapping in the Integration Response pane. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html

Experimental.

func AccessLogField_ContextResponseOverrideStatus

func AccessLogField_ContextResponseOverrideStatus() *string

The response status code override.

If this parameter is defined, it contains the status code to be returned instead of the Method response status that is defined as the Default mapping in the Integration Response pane. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html

Experimental.

func AccessLogField_ContextStage

func AccessLogField_ContextStage() *string

The deployment stage of the API request (for example, `Beta` or `Prod`). Experimental.

func AccessLogField_ContextStatus

func AccessLogField_ContextStatus() *string

The method response status. Experimental.

func AccessLogField_ContextWafResponseCode

func AccessLogField_ContextWafResponseCode() *string

The response received from AWS WAF: `WAF_ALLOW` or `WAF_BLOCK`.

Will not be set if the stage is not associated with a web ACL. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-aws-waf.html

Experimental.

func AccessLogField_ContextWebaclArn

func AccessLogField_ContextWebaclArn() *string

The complete ARN of the web ACL that is used to decide whether to allow or block the request.

Will not be set if the stage is not associated with a web ACL. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-aws-waf.html

Experimental.

func AccessLogField_ContextXrayTraceId

func AccessLogField_ContextXrayTraceId() *string

The trace ID for the X-Ray trace. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-enabling-xray.html

Experimental.

func ApiKey_IsConstruct

func ApiKey_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func ApiKey_IsResource

func ApiKey_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Authorizer_IsAuthorizer

func Authorizer_IsAuthorizer(x interface{}) *bool

Return whether the given object is an Authorizer. Experimental.

func Authorizer_IsConstruct

func Authorizer_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Authorizer_IsResource

func Authorizer_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func BasePathMapping_IsConstruct

func BasePathMapping_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func BasePathMapping_IsResource

func BasePathMapping_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func CfnAccount_CFN_RESOURCE_TYPE_NAME

func CfnAccount_CFN_RESOURCE_TYPE_NAME() *string

func CfnAccount_IsCfnElement

func CfnAccount_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnAccount_IsCfnResource

func CfnAccount_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnAccount_IsConstruct

func CfnAccount_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnApiKey_CFN_RESOURCE_TYPE_NAME

func CfnApiKey_CFN_RESOURCE_TYPE_NAME() *string

func CfnApiKey_IsCfnElement

func CfnApiKey_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnApiKey_IsCfnResource

func CfnApiKey_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnApiKey_IsConstruct

func CfnApiKey_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnApiMappingV2_CFN_RESOURCE_TYPE_NAME

func CfnApiMappingV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnApiMappingV2_IsCfnElement

func CfnApiMappingV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnApiMappingV2_IsCfnResource

func CfnApiMappingV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnApiMappingV2_IsConstruct

func CfnApiMappingV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnApiV2_CFN_RESOURCE_TYPE_NAME

func CfnApiV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnApiV2_IsCfnElement

func CfnApiV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnApiV2_IsCfnResource

func CfnApiV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnApiV2_IsConstruct

func CfnApiV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnAuthorizerV2_CFN_RESOURCE_TYPE_NAME

func CfnAuthorizerV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnAuthorizerV2_IsCfnElement

func CfnAuthorizerV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnAuthorizerV2_IsCfnResource

func CfnAuthorizerV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnAuthorizerV2_IsConstruct

func CfnAuthorizerV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnAuthorizer_CFN_RESOURCE_TYPE_NAME

func CfnAuthorizer_CFN_RESOURCE_TYPE_NAME() *string

func CfnAuthorizer_IsCfnElement

func CfnAuthorizer_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnAuthorizer_IsCfnResource

func CfnAuthorizer_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnAuthorizer_IsConstruct

func CfnAuthorizer_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnBasePathMapping_CFN_RESOURCE_TYPE_NAME

func CfnBasePathMapping_CFN_RESOURCE_TYPE_NAME() *string

func CfnBasePathMapping_IsCfnElement

func CfnBasePathMapping_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnBasePathMapping_IsCfnResource

func CfnBasePathMapping_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnBasePathMapping_IsConstruct

func CfnBasePathMapping_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnClientCertificate_CFN_RESOURCE_TYPE_NAME

func CfnClientCertificate_CFN_RESOURCE_TYPE_NAME() *string

func CfnClientCertificate_IsCfnElement

func CfnClientCertificate_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnClientCertificate_IsCfnResource

func CfnClientCertificate_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnClientCertificate_IsConstruct

func CfnClientCertificate_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnDeploymentV2_CFN_RESOURCE_TYPE_NAME

func CfnDeploymentV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnDeploymentV2_IsCfnElement

func CfnDeploymentV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnDeploymentV2_IsCfnResource

func CfnDeploymentV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnDeploymentV2_IsConstruct

func CfnDeploymentV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnDeployment_CFN_RESOURCE_TYPE_NAME

func CfnDeployment_CFN_RESOURCE_TYPE_NAME() *string

func CfnDeployment_IsCfnElement

func CfnDeployment_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnDeployment_IsCfnResource

func CfnDeployment_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnDeployment_IsConstruct

func CfnDeployment_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnDocumentationPart_CFN_RESOURCE_TYPE_NAME

func CfnDocumentationPart_CFN_RESOURCE_TYPE_NAME() *string

func CfnDocumentationPart_IsCfnElement

func CfnDocumentationPart_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnDocumentationPart_IsCfnResource

func CfnDocumentationPart_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnDocumentationPart_IsConstruct

func CfnDocumentationPart_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnDocumentationVersion_CFN_RESOURCE_TYPE_NAME

func CfnDocumentationVersion_CFN_RESOURCE_TYPE_NAME() *string

func CfnDocumentationVersion_IsCfnElement

func CfnDocumentationVersion_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnDocumentationVersion_IsCfnResource

func CfnDocumentationVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnDocumentationVersion_IsConstruct

func CfnDocumentationVersion_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnDomainNameV2_CFN_RESOURCE_TYPE_NAME

func CfnDomainNameV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnDomainNameV2_IsCfnElement

func CfnDomainNameV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnDomainNameV2_IsCfnResource

func CfnDomainNameV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnDomainNameV2_IsConstruct

func CfnDomainNameV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnDomainName_CFN_RESOURCE_TYPE_NAME

func CfnDomainName_CFN_RESOURCE_TYPE_NAME() *string

func CfnDomainName_IsCfnElement

func CfnDomainName_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnDomainName_IsCfnResource

func CfnDomainName_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnDomainName_IsConstruct

func CfnDomainName_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnGatewayResponse_CFN_RESOURCE_TYPE_NAME

func CfnGatewayResponse_CFN_RESOURCE_TYPE_NAME() *string

func CfnGatewayResponse_IsCfnElement

func CfnGatewayResponse_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnGatewayResponse_IsCfnResource

func CfnGatewayResponse_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnGatewayResponse_IsConstruct

func CfnGatewayResponse_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnIntegrationResponseV2_CFN_RESOURCE_TYPE_NAME

func CfnIntegrationResponseV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnIntegrationResponseV2_IsCfnElement

func CfnIntegrationResponseV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnIntegrationResponseV2_IsCfnResource

func CfnIntegrationResponseV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnIntegrationResponseV2_IsConstruct

func CfnIntegrationResponseV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnIntegrationV2_CFN_RESOURCE_TYPE_NAME

func CfnIntegrationV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnIntegrationV2_IsCfnElement

func CfnIntegrationV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnIntegrationV2_IsCfnResource

func CfnIntegrationV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnIntegrationV2_IsConstruct

func CfnIntegrationV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnMethod_CFN_RESOURCE_TYPE_NAME

func CfnMethod_CFN_RESOURCE_TYPE_NAME() *string

func CfnMethod_IsCfnElement

func CfnMethod_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnMethod_IsCfnResource

func CfnMethod_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnMethod_IsConstruct

func CfnMethod_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnModelV2_CFN_RESOURCE_TYPE_NAME

func CfnModelV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnModelV2_IsCfnElement

func CfnModelV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnModelV2_IsCfnResource

func CfnModelV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnModelV2_IsConstruct

func CfnModelV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnModel_CFN_RESOURCE_TYPE_NAME

func CfnModel_CFN_RESOURCE_TYPE_NAME() *string

func CfnModel_IsCfnElement

func CfnModel_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnModel_IsCfnResource

func CfnModel_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnModel_IsConstruct

func CfnModel_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnRequestValidator_CFN_RESOURCE_TYPE_NAME

func CfnRequestValidator_CFN_RESOURCE_TYPE_NAME() *string

func CfnRequestValidator_IsCfnElement

func CfnRequestValidator_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnRequestValidator_IsCfnResource

func CfnRequestValidator_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnRequestValidator_IsConstruct

func CfnRequestValidator_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnResource_CFN_RESOURCE_TYPE_NAME

func CfnResource_CFN_RESOURCE_TYPE_NAME() *string

func CfnResource_IsCfnElement

func CfnResource_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnResource_IsCfnResource

func CfnResource_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnResource_IsConstruct

func CfnResource_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnRestApi_CFN_RESOURCE_TYPE_NAME

func CfnRestApi_CFN_RESOURCE_TYPE_NAME() *string

func CfnRestApi_IsCfnElement

func CfnRestApi_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnRestApi_IsCfnResource

func CfnRestApi_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnRestApi_IsConstruct

func CfnRestApi_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnRouteResponseV2_CFN_RESOURCE_TYPE_NAME

func CfnRouteResponseV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnRouteResponseV2_IsCfnElement

func CfnRouteResponseV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnRouteResponseV2_IsCfnResource

func CfnRouteResponseV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnRouteResponseV2_IsConstruct

func CfnRouteResponseV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnRouteV2_CFN_RESOURCE_TYPE_NAME

func CfnRouteV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnRouteV2_IsCfnElement

func CfnRouteV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnRouteV2_IsCfnResource

func CfnRouteV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnRouteV2_IsConstruct

func CfnRouteV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnStageV2_CFN_RESOURCE_TYPE_NAME

func CfnStageV2_CFN_RESOURCE_TYPE_NAME() *string

func CfnStageV2_IsCfnElement

func CfnStageV2_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Deprecated: moved to package aws-apigatewayv2.

func CfnStageV2_IsCfnResource

func CfnStageV2_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Deprecated: moved to package aws-apigatewayv2.

func CfnStageV2_IsConstruct

func CfnStageV2_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: moved to package aws-apigatewayv2.

func CfnStage_CFN_RESOURCE_TYPE_NAME

func CfnStage_CFN_RESOURCE_TYPE_NAME() *string

func CfnStage_IsCfnElement

func CfnStage_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnStage_IsCfnResource

func CfnStage_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnStage_IsConstruct

func CfnStage_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnUsagePlanKey_CFN_RESOURCE_TYPE_NAME

func CfnUsagePlanKey_CFN_RESOURCE_TYPE_NAME() *string

func CfnUsagePlanKey_IsCfnElement

func CfnUsagePlanKey_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnUsagePlanKey_IsCfnResource

func CfnUsagePlanKey_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnUsagePlanKey_IsConstruct

func CfnUsagePlanKey_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnUsagePlan_CFN_RESOURCE_TYPE_NAME

func CfnUsagePlan_CFN_RESOURCE_TYPE_NAME() *string

func CfnUsagePlan_IsCfnElement

func CfnUsagePlan_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnUsagePlan_IsCfnResource

func CfnUsagePlan_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnUsagePlan_IsConstruct

func CfnUsagePlan_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnVpcLink_CFN_RESOURCE_TYPE_NAME() *string
func CfnVpcLink_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnVpcLink_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnVpcLink_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CognitoUserPoolsAuthorizer_IsAuthorizer

func CognitoUserPoolsAuthorizer_IsAuthorizer(x interface{}) *bool

Return whether the given object is an Authorizer. Experimental.

func CognitoUserPoolsAuthorizer_IsConstruct

func CognitoUserPoolsAuthorizer_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CognitoUserPoolsAuthorizer_IsResource

func CognitoUserPoolsAuthorizer_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Cors_ALL_METHODS

func Cors_ALL_METHODS() *[]*string

func Cors_ALL_ORIGINS

func Cors_ALL_ORIGINS() *[]*string

func Cors_DEFAULT_HEADERS

func Cors_DEFAULT_HEADERS() *[]*string

func Deployment_IsConstruct

func Deployment_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Deployment_IsResource

func Deployment_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func DomainName_IsConstruct

func DomainName_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func DomainName_IsResource

func DomainName_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func GatewayResponse_IsConstruct

func GatewayResponse_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func GatewayResponse_IsResource

func GatewayResponse_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func IdentitySource_Context

func IdentitySource_Context(context *string) *string

Provides a properly formatted request context identity source.

Returns: a request context identity source. Experimental.

func IdentitySource_Header

func IdentitySource_Header(headerName *string) *string

Provides a properly formatted header identity source.

Returns: a header identity source. Experimental.

func IdentitySource_QueryString

func IdentitySource_QueryString(queryString *string) *string

Provides a properly formatted query string identity source.

Returns: a query string identity source. Experimental.

func IdentitySource_StageVariable

func IdentitySource_StageVariable(stageVariable *string) *string

Provides a properly formatted API Gateway stage variable identity source.

Returns: an API Gateway stage variable identity source. Experimental.

func LambdaRestApi_IsConstruct

func LambdaRestApi_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func LambdaRestApi_IsResource

func LambdaRestApi_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Method_IsConstruct

func Method_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Method_IsResource

func Method_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Model_IsConstruct

func Model_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Model_IsResource

func Model_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func NewAccessLogField_Override

func NewAccessLogField_Override(a AccessLogField)

Experimental.

func NewApiDefinition_Override

func NewApiDefinition_Override(a ApiDefinition)

Experimental.

func NewApiKey_Override

func NewApiKey_Override(a ApiKey, scope constructs.Construct, id *string, props *ApiKeyProps)

Experimental.

func NewAssetApiDefinition_Override

func NewAssetApiDefinition_Override(a AssetApiDefinition, path *string, options *awss3assets.AssetOptions)

Experimental.

func NewAuthorizer_Override

func NewAuthorizer_Override(a Authorizer, scope constructs.Construct, id *string, props *awscdk.ResourceProps)

Experimental.

func NewAwsIntegration_Override

func NewAwsIntegration_Override(a AwsIntegration, props *AwsIntegrationProps)

Experimental.

func NewBasePathMapping_Override

func NewBasePathMapping_Override(b BasePathMapping, scope constructs.Construct, id *string, props *BasePathMappingProps)

Experimental.

func NewCfnAccount_Override

func NewCfnAccount_Override(c CfnAccount, scope awscdk.Construct, id *string, props *CfnAccountProps)

Create a new `AWS::ApiGateway::Account`.

func NewCfnApiKey_Override

func NewCfnApiKey_Override(c CfnApiKey, scope awscdk.Construct, id *string, props *CfnApiKeyProps)

Create a new `AWS::ApiGateway::ApiKey`.

func NewCfnApiMappingV2_Override

func NewCfnApiMappingV2_Override(c CfnApiMappingV2, scope awscdk.Construct, id *string, props *CfnApiMappingV2Props)

Create a new `AWS::ApiGatewayV2::ApiMapping`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnApiV2_Override

func NewCfnApiV2_Override(c CfnApiV2, scope awscdk.Construct, id *string, props *CfnApiV2Props)

Create a new `AWS::ApiGatewayV2::Api`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnAuthorizerV2_Override

func NewCfnAuthorizerV2_Override(c CfnAuthorizerV2, scope awscdk.Construct, id *string, props *CfnAuthorizerV2Props)

Create a new `AWS::ApiGatewayV2::Authorizer`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnAuthorizer_Override

func NewCfnAuthorizer_Override(c CfnAuthorizer, scope awscdk.Construct, id *string, props *CfnAuthorizerProps)

Create a new `AWS::ApiGateway::Authorizer`.

func NewCfnBasePathMapping_Override

func NewCfnBasePathMapping_Override(c CfnBasePathMapping, scope awscdk.Construct, id *string, props *CfnBasePathMappingProps)

Create a new `AWS::ApiGateway::BasePathMapping`.

func NewCfnClientCertificate_Override

func NewCfnClientCertificate_Override(c CfnClientCertificate, scope awscdk.Construct, id *string, props *CfnClientCertificateProps)

Create a new `AWS::ApiGateway::ClientCertificate`.

func NewCfnDeploymentV2_Override

func NewCfnDeploymentV2_Override(c CfnDeploymentV2, scope awscdk.Construct, id *string, props *CfnDeploymentV2Props)

Create a new `AWS::ApiGatewayV2::Deployment`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnDeployment_Override

func NewCfnDeployment_Override(c CfnDeployment, scope awscdk.Construct, id *string, props *CfnDeploymentProps)

Create a new `AWS::ApiGateway::Deployment`.

func NewCfnDocumentationPart_Override

func NewCfnDocumentationPart_Override(c CfnDocumentationPart, scope awscdk.Construct, id *string, props *CfnDocumentationPartProps)

Create a new `AWS::ApiGateway::DocumentationPart`.

func NewCfnDocumentationVersion_Override

func NewCfnDocumentationVersion_Override(c CfnDocumentationVersion, scope awscdk.Construct, id *string, props *CfnDocumentationVersionProps)

Create a new `AWS::ApiGateway::DocumentationVersion`.

func NewCfnDomainNameV2_Override

func NewCfnDomainNameV2_Override(c CfnDomainNameV2, scope awscdk.Construct, id *string, props *CfnDomainNameV2Props)

Create a new `AWS::ApiGatewayV2::DomainName`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnDomainName_Override

func NewCfnDomainName_Override(c CfnDomainName, scope awscdk.Construct, id *string, props *CfnDomainNameProps)

Create a new `AWS::ApiGateway::DomainName`.

func NewCfnGatewayResponse_Override

func NewCfnGatewayResponse_Override(c CfnGatewayResponse, scope awscdk.Construct, id *string, props *CfnGatewayResponseProps)

Create a new `AWS::ApiGateway::GatewayResponse`.

func NewCfnIntegrationResponseV2_Override

func NewCfnIntegrationResponseV2_Override(c CfnIntegrationResponseV2, scope awscdk.Construct, id *string, props *CfnIntegrationResponseV2Props)

Create a new `AWS::ApiGatewayV2::IntegrationResponse`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnIntegrationV2_Override

func NewCfnIntegrationV2_Override(c CfnIntegrationV2, scope awscdk.Construct, id *string, props *CfnIntegrationV2Props)

Create a new `AWS::ApiGatewayV2::Integration`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnMethod_Override

func NewCfnMethod_Override(c CfnMethod, scope awscdk.Construct, id *string, props *CfnMethodProps)

Create a new `AWS::ApiGateway::Method`.

func NewCfnModelV2_Override

func NewCfnModelV2_Override(c CfnModelV2, scope awscdk.Construct, id *string, props *CfnModelV2Props)

Create a new `AWS::ApiGatewayV2::Model`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnModel_Override

func NewCfnModel_Override(c CfnModel, scope awscdk.Construct, id *string, props *CfnModelProps)

Create a new `AWS::ApiGateway::Model`.

func NewCfnRequestValidator_Override

func NewCfnRequestValidator_Override(c CfnRequestValidator, scope awscdk.Construct, id *string, props *CfnRequestValidatorProps)

Create a new `AWS::ApiGateway::RequestValidator`.

func NewCfnResource_Override

func NewCfnResource_Override(c CfnResource, scope awscdk.Construct, id *string, props *CfnResourceProps)

Create a new `AWS::ApiGateway::Resource`.

func NewCfnRestApi_Override

func NewCfnRestApi_Override(c CfnRestApi, scope awscdk.Construct, id *string, props *CfnRestApiProps)

Create a new `AWS::ApiGateway::RestApi`.

func NewCfnRouteResponseV2_Override

func NewCfnRouteResponseV2_Override(c CfnRouteResponseV2, scope awscdk.Construct, id *string, props *CfnRouteResponseV2Props)

Create a new `AWS::ApiGatewayV2::RouteResponse`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnRouteV2_Override

func NewCfnRouteV2_Override(c CfnRouteV2, scope awscdk.Construct, id *string, props *CfnRouteV2Props)

Create a new `AWS::ApiGatewayV2::Route`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnStageV2_Override

func NewCfnStageV2_Override(c CfnStageV2, scope awscdk.Construct, id *string, props *CfnStageV2Props)

Create a new `AWS::ApiGatewayV2::Stage`. Deprecated: moved to package aws-apigatewayv2.

func NewCfnStage_Override

func NewCfnStage_Override(c CfnStage, scope awscdk.Construct, id *string, props *CfnStageProps)

Create a new `AWS::ApiGateway::Stage`.

func NewCfnUsagePlanKey_Override

func NewCfnUsagePlanKey_Override(c CfnUsagePlanKey, scope awscdk.Construct, id *string, props *CfnUsagePlanKeyProps)

Create a new `AWS::ApiGateway::UsagePlanKey`.

func NewCfnUsagePlan_Override

func NewCfnUsagePlan_Override(c CfnUsagePlan, scope awscdk.Construct, id *string, props *CfnUsagePlanProps)

Create a new `AWS::ApiGateway::UsagePlan`.

func NewCfnVpcLink_Override(c CfnVpcLink, scope awscdk.Construct, id *string, props *CfnVpcLinkProps)

Create a new `AWS::ApiGateway::VpcLink`.

func NewCognitoUserPoolsAuthorizer_Override

func NewCognitoUserPoolsAuthorizer_Override(c CognitoUserPoolsAuthorizer, scope constructs.Construct, id *string, props *CognitoUserPoolsAuthorizerProps)

Experimental.

func NewDeployment_Override

func NewDeployment_Override(d Deployment, scope constructs.Construct, id *string, props *DeploymentProps)

Experimental.

func NewDomainName_Override

func NewDomainName_Override(d DomainName, scope constructs.Construct, id *string, props *DomainNameProps)

Experimental.

func NewEmptyModel_Override deprecated

func NewEmptyModel_Override(e EmptyModel)

Deprecated: You should use Model.EMPTY_MODEL

func NewErrorModel_Override deprecated

func NewErrorModel_Override(e ErrorModel)

Deprecated: You should use Model.ERROR_MODEL

func NewGatewayResponse_Override

func NewGatewayResponse_Override(g GatewayResponse, scope constructs.Construct, id *string, props *GatewayResponseProps)

Experimental.

func NewHttpIntegration_Override

func NewHttpIntegration_Override(h HttpIntegration, url *string, props *HttpIntegrationProps)

Experimental.

func NewIdentitySource_Override

func NewIdentitySource_Override(i IdentitySource)

Experimental.

func NewInlineApiDefinition_Override

func NewInlineApiDefinition_Override(i InlineApiDefinition, definition interface{})

Experimental.

func NewIntegration_Override

func NewIntegration_Override(i Integration, props *IntegrationProps)

Experimental.

func NewLambdaIntegration_Override

func NewLambdaIntegration_Override(l LambdaIntegration, handler awslambda.IFunction, options *LambdaIntegrationOptions)

Experimental.

func NewLambdaRestApi_Override

func NewLambdaRestApi_Override(l LambdaRestApi, scope constructs.Construct, id *string, props *LambdaRestApiProps)

Experimental.

func NewLogGroupLogDestination_Override

func NewLogGroupLogDestination_Override(l LogGroupLogDestination, logGroup awslogs.ILogGroup)

Experimental.

func NewMethod_Override

func NewMethod_Override(m Method, scope constructs.Construct, id *string, props *MethodProps)

Experimental.

func NewMockIntegration_Override

func NewMockIntegration_Override(m MockIntegration, options *IntegrationOptions)

Experimental.

func NewModel_Override

func NewModel_Override(m Model, scope constructs.Construct, id *string, props *ModelProps)

Experimental.

func NewProxyResource_Override

func NewProxyResource_Override(p ProxyResource, scope constructs.Construct, id *string, props *ProxyResourceProps)

Experimental.

func NewRateLimitedApiKey_Override

func NewRateLimitedApiKey_Override(r RateLimitedApiKey, scope constructs.Construct, id *string, props *RateLimitedApiKeyProps)

Experimental.

func NewRequestAuthorizer_Override

func NewRequestAuthorizer_Override(r RequestAuthorizer, scope constructs.Construct, id *string, props *RequestAuthorizerProps)

Experimental.

func NewRequestValidator_Override

func NewRequestValidator_Override(r RequestValidator, scope constructs.Construct, id *string, props *RequestValidatorProps)

Experimental.

func NewResourceBase_Override

func NewResourceBase_Override(r ResourceBase, scope constructs.Construct, id *string)

Experimental.

func NewResource_Override

func NewResource_Override(r Resource, scope constructs.Construct, id *string, props *ResourceProps)

Experimental.

func NewRestApiBase_Override

func NewRestApiBase_Override(r RestApiBase, scope constructs.Construct, id *string, props *RestApiBaseProps)

Experimental.

func NewRestApi_Override

func NewRestApi_Override(r RestApi, scope constructs.Construct, id *string, props *RestApiProps)

Experimental.

func NewS3ApiDefinition_Override

func NewS3ApiDefinition_Override(s S3ApiDefinition, bucket awss3.IBucket, key *string, objectVersion *string)

Experimental.

func NewSpecRestApi_Override

func NewSpecRestApi_Override(s SpecRestApi, scope constructs.Construct, id *string, props *SpecRestApiProps)

Experimental.

func NewStage_Override

func NewStage_Override(s Stage, scope constructs.Construct, id *string, props *StageProps)

Experimental.

func NewStepFunctionsIntegration_Override

func NewStepFunctionsIntegration_Override(s StepFunctionsIntegration)

Experimental.

func NewStepFunctionsRestApi_Override

func NewStepFunctionsRestApi_Override(s StepFunctionsRestApi, scope constructs.Construct, id *string, props *StepFunctionsRestApiProps)

Experimental.

func NewTokenAuthorizer_Override

func NewTokenAuthorizer_Override(t TokenAuthorizer, scope constructs.Construct, id *string, props *TokenAuthorizerProps)

Experimental.

func NewUsagePlan_Override

func NewUsagePlan_Override(u UsagePlan, scope constructs.Construct, id *string, props *UsagePlanProps)

Experimental.

func NewVpcLink_Override(v VpcLink, scope constructs.Construct, id *string, props *VpcLinkProps)

Experimental.

func ProxyResource_IsConstruct

func ProxyResource_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func ProxyResource_IsResource

func ProxyResource_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func RateLimitedApiKey_IsConstruct

func RateLimitedApiKey_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func RateLimitedApiKey_IsResource

func RateLimitedApiKey_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func RequestAuthorizer_IsAuthorizer

func RequestAuthorizer_IsAuthorizer(x interface{}) *bool

Return whether the given object is an Authorizer. Experimental.

func RequestAuthorizer_IsConstruct

func RequestAuthorizer_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func RequestAuthorizer_IsResource

func RequestAuthorizer_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func RequestValidator_IsConstruct

func RequestValidator_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func RequestValidator_IsResource

func RequestValidator_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func ResourceBase_IsConstruct

func ResourceBase_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func ResourceBase_IsResource

func ResourceBase_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Resource_IsConstruct

func Resource_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Resource_IsResource

func Resource_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func RestApiBase_IsConstruct

func RestApiBase_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func RestApiBase_IsResource

func RestApiBase_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func RestApi_IsConstruct

func RestApi_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func RestApi_IsResource

func RestApi_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func SpecRestApi_IsConstruct

func SpecRestApi_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func SpecRestApi_IsResource

func SpecRestApi_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Stage_IsConstruct

func Stage_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Stage_IsResource

func Stage_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func StepFunctionsRestApi_IsConstruct

func StepFunctionsRestApi_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func StepFunctionsRestApi_IsResource

func StepFunctionsRestApi_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func TokenAuthorizer_IsAuthorizer

func TokenAuthorizer_IsAuthorizer(x interface{}) *bool

Return whether the given object is an Authorizer. Experimental.

func TokenAuthorizer_IsConstruct

func TokenAuthorizer_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func TokenAuthorizer_IsResource

func TokenAuthorizer_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func UsagePlan_IsConstruct

func UsagePlan_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func UsagePlan_IsResource

func UsagePlan_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func VpcLink_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func VpcLink_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

Types

type AccessLogDestinationConfig

type AccessLogDestinationConfig struct {
	// The Amazon Resource Name (ARN) of the destination resource.
	// Experimental.
	DestinationArn *string `field:"required" json:"destinationArn" yaml:"destinationArn"`
}

Options when binding a log destination to a RestApi Stage.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

accessLogDestinationConfig := &accessLogDestinationConfig{
	destinationArn: jsii.String("destinationArn"),
}

Experimental.

type AccessLogField

type AccessLogField interface {
}

$context variables that can be used to customize access log pattern.

Example:

apigateway.accessLogFormat.custom(jSON.stringify(map[string]interface{}{
	"requestId": apigateway.AccessLogField.contextRequestId(),
	"sourceIp": apigateway.AccessLogField.contextIdentitySourceIp(),
	"method": apigateway.AccessLogField.contextHttpMethod(),
	"userContext": map[string]*string{
		"sub": apigateway.AccessLogField.contextAuthorizerClaims(jsii.String("sub")),
		"email": apigateway.AccessLogField.contextAuthorizerClaims(jsii.String("email")),
	},
}))

Experimental.

func NewAccessLogField

func NewAccessLogField() AccessLogField

Experimental.

type AccessLogFormat

type AccessLogFormat interface {
	// Output a format string to be used with CloudFormation.
	// Experimental.
	ToString() *string
}

factory methods for access log format.

Example:

logGroup := logs.NewLogGroup(this, jsii.String("ApiGatewayAccessLogs"))
apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(logGroup),
		accessLogFormat: apigateway.accessLogFormat.custom(
		fmt.Sprintf("%v %v %v", apigateway.accessLogField.contextRequestId(), apigateway.*accessLogField.contextErrorMessage(), apigateway.*accessLogField.contextErrorMessageString())),
	},
})

Experimental.

func AccessLogFormat_Clf

func AccessLogFormat_Clf() AccessLogFormat

Generate Common Log Format. Experimental.

func AccessLogFormat_Custom

func AccessLogFormat_Custom(format *string) AccessLogFormat

Custom log format.

You can create any log format string. You can easily get the $ context variable by using the methods of AccessLogField.

Example:

apigateway.accessLogFormat.custom(jSON.stringify(map[string]interface{}{
	"requestId": apigateway.AccessLogField.contextRequestId(),
	"sourceIp": apigateway.AccessLogField.contextIdentitySourceIp(),
	"method": apigateway.AccessLogField.contextHttpMethod(),
	"userContext": map[string]*string{
		"sub": apigateway.AccessLogField.contextAuthorizerClaims(jsii.String("sub")),
		"email": apigateway.AccessLogField.contextAuthorizerClaims(jsii.String("email")),
	},
}))

Experimental.

func AccessLogFormat_JsonWithStandardFields

func AccessLogFormat_JsonWithStandardFields(fields *JsonWithStandardFieldProps) AccessLogFormat

Access log will be produced in the JSON format with a set of fields most useful in the access log.

All fields are turned on by default with the option to turn off specific fields. Experimental.

type AddApiKeyOptions

type AddApiKeyOptions struct {
	// Override the CloudFormation logical id of the AWS::ApiGateway::UsagePlanKey resource.
	// Experimental.
	OverrideLogicalId *string `field:"optional" json:"overrideLogicalId" yaml:"overrideLogicalId"`
}

Options to the UsagePlan.addApiKey() method.

Example:

var usageplan usagePlan
var apiKey apiKey

usageplan.addApiKey(apiKey, &addApiKeyOptions{
	overrideLogicalId: jsii.String("..."),
})

Experimental.

type ApiDefinition

type ApiDefinition interface {
	// Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
	// Experimental.
	Bind(scope awscdk.Construct) *ApiDefinitionConfig
	// Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
	//
	// Specifically it's required to allow assets to add
	// metadata for tooling like SAM CLI to be able to find their origins.
	// Experimental.
	BindAfterCreate(_scope awscdk.Construct, _restApi IRestApi)
}

Represents an OpenAPI definition asset.

Example:

var integration integration

api := apigateway.NewSpecRestApi(this, jsii.String("books-api"), &specRestApiProps{
	apiDefinition: apigateway.apiDefinition.fromAsset(jsii.String("path-to-file.json")),
})

booksResource := api.root.addResource(jsii.String("books"))
booksResource.addMethod(jsii.String("GET"), integration)

Experimental.

type ApiDefinitionConfig

type ApiDefinitionConfig struct {
	// Inline specification (mutually exclusive with `s3Location`).
	// Experimental.
	InlineDefinition interface{} `field:"optional" json:"inlineDefinition" yaml:"inlineDefinition"`
	// The location of the specification in S3 (mutually exclusive with `inlineDefinition`).
	// Experimental.
	S3Location *ApiDefinitionS3Location `field:"optional" json:"s3Location" yaml:"s3Location"`
}

Post-Binding Configuration for a CDK construct.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var inlineDefinition interface{}

apiDefinitionConfig := &apiDefinitionConfig{
	inlineDefinition: inlineDefinition,
	s3Location: &apiDefinitionS3Location{
		bucket: jsii.String("bucket"),
		key: jsii.String("key"),

		// the properties below are optional
		version: jsii.String("version"),
	},
}

Experimental.

type ApiDefinitionS3Location

type ApiDefinitionS3Location struct {
	// The S3 bucket.
	// Experimental.
	Bucket *string `field:"required" json:"bucket" yaml:"bucket"`
	// The S3 key.
	// Experimental.
	Key *string `field:"required" json:"key" yaml:"key"`
	// An optional version.
	// Experimental.
	Version *string `field:"optional" json:"version" yaml:"version"`
}

S3 location of the API definition file.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

apiDefinitionS3Location := &apiDefinitionS3Location{
	bucket: jsii.String("bucket"),
	key: jsii.String("key"),

	// the properties below are optional
	version: jsii.String("version"),
}

Experimental.

type ApiKey

type ApiKey interface {
	awscdk.Resource
	IApiKey
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The API key ARN.
	// Experimental.
	KeyArn() *string
	// The API key ID.
	// Experimental.
	KeyId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Permits the IAM principal all read operations through this key.
	// Experimental.
	GrantRead(grantee awsiam.IGrantable) awsiam.Grant
	// Permits the IAM principal all read and write operations through this key.
	// Experimental.
	GrantReadWrite(grantee awsiam.IGrantable) awsiam.Grant
	// Permits the IAM principal all write operations through this key.
	// Experimental.
	GrantWrite(grantee awsiam.IGrantable) awsiam.Grant
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

An API Gateway ApiKey.

An ApiKey can be distributed to API clients that are executing requests for Method resources that require an Api Key.

Example:

importedKey := apigateway.apiKey.fromApiKeyId(this, jsii.String("imported-key"), jsii.String("<api-key-id>"))

Experimental.

func NewApiKey

func NewApiKey(scope constructs.Construct, id *string, props *ApiKeyProps) ApiKey

Experimental.

type ApiKeyOptions

type ApiKeyOptions struct {
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
	// A name for the API key.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
	// Experimental.
	ApiKeyName *string `field:"optional" json:"apiKeyName" yaml:"apiKeyName"`
	// A description of the purpose of the API key.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The value of the API key.
	//
	// Must be at least 20 characters long.
	// Experimental.
	Value *string `field:"optional" json:"value" yaml:"value"`
}

The options for creating an API Key.

Example:

var api restApi

key := api.addApiKey(jsii.String("ApiKey"), &apiKeyOptions{
	apiKeyName: jsii.String("myApiKey1"),
	value: jsii.String("MyApiKeyThatIsAtLeast20Characters"),
})

Experimental.

type ApiKeyProps

type ApiKeyProps struct {
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
	// A name for the API key.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
	// Experimental.
	ApiKeyName *string `field:"optional" json:"apiKeyName" yaml:"apiKeyName"`
	// A description of the purpose of the API key.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The value of the API key.
	//
	// Must be at least 20 characters long.
	// Experimental.
	Value *string `field:"optional" json:"value" yaml:"value"`
	// An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
	// Experimental.
	CustomerId *string `field:"optional" json:"customerId" yaml:"customerId"`
	// Indicates whether the API key can be used by clients.
	// Experimental.
	Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"`
	// Specifies whether the key identifier is distinct from the created API key value.
	// Experimental.
	GenerateDistinctId *bool `field:"optional" json:"generateDistinctId" yaml:"generateDistinctId"`
	// A list of resources this api key is associated with.
	// Experimental.
	Resources *[]IRestApi `field:"optional" json:"resources" yaml:"resources"`
}

ApiKey Properties.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var authorizer authorizer
var duration duration
var integration integration
var model model
var requestValidator requestValidator
var restApi restApi

apiKeyProps := &apiKeyProps{
	apiKeyName: jsii.String("apiKeyName"),
	customerId: jsii.String("customerId"),
	defaultCorsPreflightOptions: &corsOptions{
		allowOrigins: []*string{
			jsii.String("allowOrigins"),
		},

		// the properties below are optional
		allowCredentials: jsii.Boolean(false),
		allowHeaders: []*string{
			jsii.String("allowHeaders"),
		},
		allowMethods: []*string{
			jsii.String("allowMethods"),
		},
		disableCache: jsii.Boolean(false),
		exposeHeaders: []*string{
			jsii.String("exposeHeaders"),
		},
		maxAge: duration,
		statusCode: jsii.Number(123),
	},
	defaultIntegration: integration,
	defaultMethodOptions: &methodOptions{
		apiKeyRequired: jsii.Boolean(false),
		authorizationScopes: []*string{
			jsii.String("authorizationScopes"),
		},
		authorizationType: awscdk.Aws_apigateway.authorizationType_NONE,
		authorizer: authorizer,
		methodResponses: []methodResponse{
			&methodResponse{
				statusCode: jsii.String("statusCode"),

				// the properties below are optional
				responseModels: map[string]iModel{
					"responseModelsKey": model,
				},
				responseParameters: map[string]*bool{
					"responseParametersKey": jsii.Boolean(false),
				},
			},
		},
		operationName: jsii.String("operationName"),
		requestModels: map[string]*iModel{
			"requestModelsKey": model,
		},
		requestParameters: map[string]*bool{
			"requestParametersKey": jsii.Boolean(false),
		},
		requestValidator: requestValidator,
		requestValidatorOptions: &requestValidatorOptions{
			requestValidatorName: jsii.String("requestValidatorName"),
			validateRequestBody: jsii.Boolean(false),
			validateRequestParameters: jsii.Boolean(false),
		},
	},
	description: jsii.String("description"),
	enabled: jsii.Boolean(false),
	generateDistinctId: jsii.Boolean(false),
	resources: []iRestApi{
		restApi,
	},
	value: jsii.String("value"),
}

Experimental.

type ApiKeySourceType

type ApiKeySourceType string

Experimental.

const (
	// To read the API key from the `X-API-Key` header of a request.
	// Experimental.
	ApiKeySourceType_HEADER ApiKeySourceType = "HEADER"
	// To read the API key from the `UsageIdentifierKey` from a custom authorizer.
	// Experimental.
	ApiKeySourceType_AUTHORIZER ApiKeySourceType = "AUTHORIZER"
)

type AssetApiDefinition

type AssetApiDefinition interface {
	ApiDefinition
	// Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
	// Experimental.
	Bind(scope awscdk.Construct) *ApiDefinitionConfig
	// Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
	//
	// Specifically it's required to allow assets to add
	// metadata for tooling like SAM CLI to be able to find their origins.
	// Experimental.
	BindAfterCreate(scope awscdk.Construct, restApi IRestApi)
}

OpenAPI specification from a local file.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var dockerImage dockerImage
var grantable iGrantable
var localBundling iLocalBundling

assetApiDefinition := awscdk.Aws_apigateway.NewAssetApiDefinition(jsii.String("path"), &assetOptions{
	assetHash: jsii.String("assetHash"),
	assetHashType: monocdk.assetHashType_SOURCE,
	bundling: &bundlingOptions{
		image: dockerImage,

		// the properties below are optional
		command: []*string{
			jsii.String("command"),
		},
		entrypoint: []*string{
			jsii.String("entrypoint"),
		},
		environment: map[string]*string{
			"environmentKey": jsii.String("environment"),
		},
		local: localBundling,
		outputType: monocdk.bundlingOutput_ARCHIVED,
		securityOpt: jsii.String("securityOpt"),
		user: jsii.String("user"),
		volumes: []dockerVolume{
			&dockerVolume{
				containerPath: jsii.String("containerPath"),
				hostPath: jsii.String("hostPath"),

				// the properties below are optional
				consistency: monocdk.dockerVolumeConsistency_CONSISTENT,
			},
		},
		workingDirectory: jsii.String("workingDirectory"),
	},
	exclude: []*string{
		jsii.String("exclude"),
	},
	follow: awscdk.Assets.followMode_NEVER,
	followSymlinks: monocdk.symlinkFollowMode_NEVER,
	ignoreMode: monocdk.ignoreMode_GLOB,
	readers: []*iGrantable{
		grantable,
	},
	sourceHash: jsii.String("sourceHash"),
})

Experimental.

func ApiDefinition_FromAsset

func ApiDefinition_FromAsset(file *string, options *awss3assets.AssetOptions) AssetApiDefinition

Loads the API specification from a local disk asset. Experimental.

func AssetApiDefinition_FromAsset

func AssetApiDefinition_FromAsset(file *string, options *awss3assets.AssetOptions) AssetApiDefinition

Loads the API specification from a local disk asset. Experimental.

func InlineApiDefinition_FromAsset

func InlineApiDefinition_FromAsset(file *string, options *awss3assets.AssetOptions) AssetApiDefinition

Loads the API specification from a local disk asset. Experimental.

func NewAssetApiDefinition

func NewAssetApiDefinition(path *string, options *awss3assets.AssetOptions) AssetApiDefinition

Experimental.

func S3ApiDefinition_FromAsset

func S3ApiDefinition_FromAsset(file *string, options *awss3assets.AssetOptions) AssetApiDefinition

Loads the API specification from a local disk asset. Experimental.

type AuthorizationType

type AuthorizationType string

Example:

var books resource
userPool := cognito.NewUserPool(this, jsii.String("UserPool"))

auth := apigateway.NewCognitoUserPoolsAuthorizer(this, jsii.String("booksAuthorizer"), &cognitoUserPoolsAuthorizerProps{
	cognitoUserPools: []iUserPool{
		userPool,
	},
})
books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
	authorizationType: apigateway.authorizationType_COGNITO,
})

Experimental.

const (
	// Open access.
	// Experimental.
	AuthorizationType_NONE AuthorizationType = "NONE"
	// Use AWS IAM permissions.
	// Experimental.
	AuthorizationType_IAM AuthorizationType = "IAM"
	// Use a custom authorizer.
	// Experimental.
	AuthorizationType_CUSTOM AuthorizationType = "CUSTOM"
	// Use an AWS Cognito user pool.
	// Experimental.
	AuthorizationType_COGNITO AuthorizationType = "COGNITO"
)

type Authorizer

type Authorizer interface {
	awscdk.Resource
	IAuthorizer
	// The authorization type of this authorizer.
	// Experimental.
	AuthorizationType() AuthorizationType
	// The authorizer ID.
	// Experimental.
	AuthorizerId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Base class for all custom authorizers. Experimental.

type AwsIntegration

type AwsIntegration interface {
	Integration
	// Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.
	// Experimental.
	Bind(method Method) *IntegrationConfig
}

This type of integration lets an API expose AWS service actions.

It is intended for calling all AWS service actions, but is not recommended for calling a Lambda function, because the Lambda custom integration is a legacy technology.

Example:

getMessageIntegration := apigateway.NewAwsIntegration(&awsIntegrationProps{
	service: jsii.String("sqs"),
	path: jsii.String("queueName"),
	region: jsii.String("eu-west-1"),
})

Experimental.

func NewAwsIntegration

func NewAwsIntegration(props *AwsIntegrationProps) AwsIntegration

Experimental.

func StepFunctionsIntegration_StartExecution

func StepFunctionsIntegration_StartExecution(stateMachine awsstepfunctions.IStateMachine, options *StepFunctionsExecutionIntegrationOptions) AwsIntegration

Integrates a Synchronous Express State Machine from AWS Step Functions to an API Gateway method.

Example:

stateMachine := stepfunctions.NewStateMachine(this, jsii.String("MyStateMachine"), &stateMachineProps{
	stateMachineType: stepfunctions.stateMachineType_EXPRESS,
	definition: stepfunctions.chain.start(stepfunctions.NewPass(this, jsii.String("Pass"))),
})

api := apigateway.NewRestApi(this, jsii.String("Api"), &restApiProps{
	restApiName: jsii.String("MyApi"),
})
api.root.addMethod(jsii.String("GET"), apigateway.stepFunctionsIntegration.startExecution(stateMachine))

Experimental.

type AwsIntegrationProps

type AwsIntegrationProps struct {
	// The name of the integrated AWS service (e.g. `s3`).
	// Experimental.
	Service *string `field:"required" json:"service" yaml:"service"`
	// The AWS action to perform in the integration.
	//
	// Use `actionParams` to specify key-value params for the action.
	//
	// Mutually exclusive with `path`.
	// Experimental.
	Action *string `field:"optional" json:"action" yaml:"action"`
	// Parameters for the action.
	//
	// `action` must be set, and `path` must be undefined.
	// The action params will be URL encoded.
	// Experimental.
	ActionParameters *map[string]*string `field:"optional" json:"actionParameters" yaml:"actionParameters"`
	// The integration's HTTP method type.
	// Experimental.
	IntegrationHttpMethod *string `field:"optional" json:"integrationHttpMethod" yaml:"integrationHttpMethod"`
	// Integration options, such as content handling, request/response mapping, etc.
	// Experimental.
	Options *IntegrationOptions `field:"optional" json:"options" yaml:"options"`
	// The path to use for path-base APIs.
	//
	// For example, for S3 GET, you can set path to `bucket/key`.
	// For lambda, you can set path to `2015-03-31/functions/${function-arn}/invocations`
	//
	// Mutually exclusive with the `action` options.
	// Experimental.
	Path *string `field:"optional" json:"path" yaml:"path"`
	// Use AWS_PROXY integration.
	// Experimental.
	Proxy *bool `field:"optional" json:"proxy" yaml:"proxy"`
	// The region of the integrated AWS service.
	// Experimental.
	Region *string `field:"optional" json:"region" yaml:"region"`
	// A designated subdomain supported by certain AWS service for fast host-name lookup.
	// Experimental.
	Subdomain *string `field:"optional" json:"subdomain" yaml:"subdomain"`
}

Example:

getMessageIntegration := apigateway.NewAwsIntegration(&awsIntegrationProps{
	service: jsii.String("sqs"),
	path: jsii.String("queueName"),
	region: jsii.String("eu-west-1"),
})

Experimental.

type BasePathMapping

type BasePathMapping interface {
	awscdk.Resource
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

This resource creates a base path that clients who call your API must use in the invocation URL.

Unless you're importing a domain with `DomainName.fromDomainNameAttributes()`, you can use `DomainName.addBasePathMapping()` to define mappings.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var domainName domainName
var restApi restApi
var stage stage

basePathMapping := awscdk.Aws_apigateway.NewBasePathMapping(this, jsii.String("MyBasePathMapping"), &basePathMappingProps{
	domainName: domainName,
	restApi: restApi,

	// the properties below are optional
	basePath: jsii.String("basePath"),
	stage: stage,
})

Experimental.

func NewBasePathMapping

func NewBasePathMapping(scope constructs.Construct, id *string, props *BasePathMappingProps) BasePathMapping

Experimental.

type BasePathMappingOptions

type BasePathMappingOptions struct {
	// The base path name that callers of the API must provide in the URL after the domain name (e.g. `example.com/base-path`). If you specify this property, it can't be an empty string.
	// Experimental.
	BasePath *string `field:"optional" json:"basePath" yaml:"basePath"`
	// The Deployment stage of API [disable-awslint:ref-via-interface].
	// Experimental.
	Stage Stage `field:"optional" json:"stage" yaml:"stage"`
}

Example:

var domain domainName
var api1 restApi
var api2 restApi

domain.addBasePathMapping(api1, &basePathMappingOptions{
	basePath: jsii.String("go-to-api1"),
})
domain.addBasePathMapping(api2, &basePathMappingOptions{
	basePath: jsii.String("boom"),
})

Experimental.

type BasePathMappingProps

type BasePathMappingProps struct {
	// The base path name that callers of the API must provide in the URL after the domain name (e.g. `example.com/base-path`). If you specify this property, it can't be an empty string.
	// Experimental.
	BasePath *string `field:"optional" json:"basePath" yaml:"basePath"`
	// The Deployment stage of API [disable-awslint:ref-via-interface].
	// Experimental.
	Stage Stage `field:"optional" json:"stage" yaml:"stage"`
	// The DomainName to associate with this base path mapping.
	// Experimental.
	DomainName IDomainName `field:"required" json:"domainName" yaml:"domainName"`
	// The RestApi resource to target.
	// Experimental.
	RestApi IRestApi `field:"required" json:"restApi" yaml:"restApi"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var domainName domainName
var restApi restApi
var stage stage

basePathMappingProps := &basePathMappingProps{
	domainName: domainName,
	restApi: restApi,

	// the properties below are optional
	basePath: jsii.String("basePath"),
	stage: stage,
}

Experimental.

type CfnAccount

type CfnAccount interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The ID for the account.
	//
	// For example: `abc123` .
	AttrId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// The Amazon Resource Name (ARN) of an IAM role that has write access to CloudWatch Logs in your account.
	CloudWatchRoleArn() *string
	SetCloudWatchRoleArn(val *string)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::Account`.

The `AWS::ApiGateway::Account` resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs.

> If an API Gateway resource has never been created in your AWS account , you must add a dependency on another API Gateway resource, such as an [AWS::ApiGateway::RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) or [AWS::ApiGateway::ApiKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html) resource. > > If an API Gateway resource has been created in your AWS account , no dependency is required (even if the resource was deleted).

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAccount := awscdk.Aws_apigateway.NewCfnAccount(this, jsii.String("MyCfnAccount"), &cfnAccountProps{
	cloudWatchRoleArn: jsii.String("cloudWatchRoleArn"),
})

func NewCfnAccount

func NewCfnAccount(scope awscdk.Construct, id *string, props *CfnAccountProps) CfnAccount

Create a new `AWS::ApiGateway::Account`.

type CfnAccountProps

type CfnAccountProps struct {
	// The Amazon Resource Name (ARN) of an IAM role that has write access to CloudWatch Logs in your account.
	CloudWatchRoleArn *string `field:"optional" json:"cloudWatchRoleArn" yaml:"cloudWatchRoleArn"`
}

Properties for defining a `CfnAccount`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAccountProps := &cfnAccountProps{
	cloudWatchRoleArn: jsii.String("cloudWatchRoleArn"),
}

type CfnApiKey

type CfnApiKey interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The ID for the API key.
	//
	// For example: `abc123` .
	AttrApiKeyId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
	CustomerId() *string
	SetCustomerId(val *string)
	// A description of the purpose of the API key.
	Description() *string
	SetDescription(val *string)
	// Indicates whether the API key can be used by clients.
	Enabled() interface{}
	SetEnabled(val interface{})
	// Specifies whether the key identifier is distinct from the created API key value.
	//
	// This parameter is deprecated and should not be used.
	GenerateDistinctId() interface{}
	SetGenerateDistinctId(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// A name for the API key.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .
	//
	// > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
	Name() *string
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// A list of stages to associate with this API key.
	StageKeys() interface{}
	SetStageKeys(val interface{})
	// An array of arbitrary tags (key-value pairs) to associate with the API key.
	Tags() awscdk.TagManager
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// The value of the API key.
	//
	// Must be at least 20 characters long.
	Value() *string
	SetValue(val *string)
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::ApiKey`.

The `AWS::ApiGateway::ApiKey` resource creates a unique key that you can distribute to clients who are executing API Gateway `Method` resources that require an API key. To specify which API key clients must use, map the API key with the `RestApi` and `Stage` resources that include the methods that require a key.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnApiKey := awscdk.Aws_apigateway.NewCfnApiKey(this, jsii.String("MyCfnApiKey"), &cfnApiKeyProps{
	customerId: jsii.String("customerId"),
	description: jsii.String("description"),
	enabled: jsii.Boolean(false),
	generateDistinctId: jsii.Boolean(false),
	name: jsii.String("name"),
	stageKeys: []interface{}{
		&stageKeyProperty{
			restApiId: jsii.String("restApiId"),
			stageName: jsii.String("stageName"),
		},
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	value: jsii.String("value"),
})

func NewCfnApiKey

func NewCfnApiKey(scope awscdk.Construct, id *string, props *CfnApiKeyProps) CfnApiKey

Create a new `AWS::ApiGateway::ApiKey`.

type CfnApiKeyProps

type CfnApiKeyProps struct {
	// An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
	CustomerId *string `field:"optional" json:"customerId" yaml:"customerId"`
	// A description of the purpose of the API key.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Indicates whether the API key can be used by clients.
	Enabled interface{} `field:"optional" json:"enabled" yaml:"enabled"`
	// Specifies whether the key identifier is distinct from the created API key value.
	//
	// This parameter is deprecated and should not be used.
	GenerateDistinctId interface{} `field:"optional" json:"generateDistinctId" yaml:"generateDistinctId"`
	// A name for the API key.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .
	//
	// > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// A list of stages to associate with this API key.
	StageKeys interface{} `field:"optional" json:"stageKeys" yaml:"stageKeys"`
	// An array of arbitrary tags (key-value pairs) to associate with the API key.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
	// The value of the API key.
	//
	// Must be at least 20 characters long.
	Value *string `field:"optional" json:"value" yaml:"value"`
}

Properties for defining a `CfnApiKey`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnApiKeyProps := &cfnApiKeyProps{
	customerId: jsii.String("customerId"),
	description: jsii.String("description"),
	enabled: jsii.Boolean(false),
	generateDistinctId: jsii.Boolean(false),
	name: jsii.String("name"),
	stageKeys: []interface{}{
		&stageKeyProperty{
			restApiId: jsii.String("restApiId"),
			stageName: jsii.String("stageName"),
		},
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	value: jsii.String("value"),
}

type CfnApiKey_StageKeyProperty

type CfnApiKey_StageKeyProperty struct {
	// The ID of a `RestApi` resource that includes the stage with which you want to associate the API key.
	RestApiId *string `field:"optional" json:"restApiId" yaml:"restApiId"`
	// The name of the stage with which to associate the API key.
	//
	// The stage must be included in the `RestApi` resource that you specified in the `RestApiId` property.
	StageName *string `field:"optional" json:"stageName" yaml:"stageName"`
}

`StageKey` is a property of the [AWS::ApiGateway::ApiKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html) resource that specifies the stage to associate with the API key. This association allows only clients with the key to make requests to methods in that stage.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

stageKeyProperty := &stageKeyProperty{
	restApiId: jsii.String("restApiId"),
	stageName: jsii.String("stageName"),
}

type CfnApiMappingV2 deprecated

type CfnApiMappingV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::ApiMapping.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiId(val *string)
	// `AWS::ApiGatewayV2::ApiMapping.ApiMappingKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-apimappingkey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiMappingKey() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiMappingKey(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// `AWS::ApiGatewayV2::ApiMapping.DomainName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-domainname
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DomainName() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetDomainName(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// `AWS::ApiGatewayV2::ApiMapping.Stage`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-stage
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Stage() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetStage(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::ApiMapping`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnApiMappingV2 := awscdk.Aws_apigateway.NewCfnApiMappingV2(this, jsii.String("MyCfnApiMappingV2"), &cfnApiMappingV2Props{
	apiId: jsii.String("apiId"),
	domainName: jsii.String("domainName"),
	stage: jsii.String("stage"),

	// the properties below are optional
	apiMappingKey: jsii.String("apiMappingKey"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnApiMappingV2

func NewCfnApiMappingV2(scope awscdk.Construct, id *string, props *CfnApiMappingV2Props) CfnApiMappingV2

Create a new `AWS::ApiGatewayV2::ApiMapping`. Deprecated: moved to package aws-apigatewayv2.

type CfnApiMappingV2Props deprecated

type CfnApiMappingV2Props struct {
	// `AWS::ApiGatewayV2::ApiMapping.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId *string `field:"required" json:"apiId" yaml:"apiId"`
	// `AWS::ApiGatewayV2::ApiMapping.DomainName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-domainname
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DomainName *string `field:"required" json:"domainName" yaml:"domainName"`
	// `AWS::ApiGatewayV2::ApiMapping.Stage`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-stage
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Stage *string `field:"required" json:"stage" yaml:"stage"`
	// `AWS::ApiGatewayV2::ApiMapping.ApiMappingKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-apimappingkey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiMappingKey *string `field:"optional" json:"apiMappingKey" yaml:"apiMappingKey"`
}

Properties for defining a `AWS::ApiGatewayV2::ApiMapping`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnApiMappingV2Props := &cfnApiMappingV2Props{
	apiId: jsii.String("apiId"),
	domainName: jsii.String("domainName"),
	stage: jsii.String("stage"),

	// the properties below are optional
	apiMappingKey: jsii.String("apiMappingKey"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html

Deprecated: moved to package aws-apigatewayv2.

type CfnApiV2 deprecated

type CfnApiV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::Api.ApiKeySelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-apikeyselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiKeySelectionExpression() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiKeySelectionExpression(val *string)
	// `AWS::ApiGatewayV2::Api.BasePath`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-basepath
	//
	// Deprecated: moved to package aws-apigatewayv2.
	BasePath() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetBasePath(val *string)
	// `AWS::ApiGatewayV2::Api.Body`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-body
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Body() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetBody(val interface{})
	// `AWS::ApiGatewayV2::Api.BodyS3Location`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-bodys3location
	//
	// Deprecated: moved to package aws-apigatewayv2.
	BodyS3Location() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetBodyS3Location(val interface{})
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// `AWS::ApiGatewayV2::Api.CorsConfiguration`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-corsconfiguration
	//
	// Deprecated: moved to package aws-apigatewayv2.
	CorsConfiguration() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetCorsConfiguration(val interface{})
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// `AWS::ApiGatewayV2::Api.CredentialsArn`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-credentialsarn
	//
	// Deprecated: moved to package aws-apigatewayv2.
	CredentialsArn() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetCredentialsArn(val *string)
	// `AWS::ApiGatewayV2::Api.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetDescription(val *string)
	// `AWS::ApiGatewayV2::Api.DisableSchemaValidation`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-disableschemavalidation
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DisableSchemaValidation() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetDisableSchemaValidation(val interface{})
	// `AWS::ApiGatewayV2::Api.FailOnWarnings`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-failonwarnings
	//
	// Deprecated: moved to package aws-apigatewayv2.
	FailOnWarnings() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetFailOnWarnings(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// `AWS::ApiGatewayV2::Api.Name`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-name
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Name() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// `AWS::ApiGatewayV2::Api.ProtocolType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-protocoltype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ProtocolType() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetProtocolType(val *string)
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// `AWS::ApiGatewayV2::Api.RouteKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-routekey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteKey() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetRouteKey(val *string)
	// `AWS::ApiGatewayV2::Api.RouteSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-routeselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteSelectionExpression() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetRouteSelectionExpression(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// `AWS::ApiGatewayV2::Api.Tags`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-tags
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Tags() awscdk.TagManager
	// `AWS::ApiGatewayV2::Api.Target`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-target
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Target() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetTarget(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// `AWS::ApiGatewayV2::Api.Version`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-version
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Version() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetVersion(val *string)
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::Api`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var body interface{}
var tags interface{}

cfnApiV2 := awscdk.Aws_apigateway.NewCfnApiV2(this, jsii.String("MyCfnApiV2"), &cfnApiV2Props{
	apiKeySelectionExpression: jsii.String("apiKeySelectionExpression"),
	basePath: jsii.String("basePath"),
	body: body,
	bodyS3Location: &bodyS3LocationProperty{
		bucket: jsii.String("bucket"),
		etag: jsii.String("etag"),
		key: jsii.String("key"),
		version: jsii.String("version"),
	},
	corsConfiguration: &corsProperty{
		allowCredentials: jsii.Boolean(false),
		allowHeaders: []*string{
			jsii.String("allowHeaders"),
		},
		allowMethods: []*string{
			jsii.String("allowMethods"),
		},
		allowOrigins: []*string{
			jsii.String("allowOrigins"),
		},
		exposeHeaders: []*string{
			jsii.String("exposeHeaders"),
		},
		maxAge: jsii.Number(123),
	},
	credentialsArn: jsii.String("credentialsArn"),
	description: jsii.String("description"),
	disableSchemaValidation: jsii.Boolean(false),
	failOnWarnings: jsii.Boolean(false),
	name: jsii.String("name"),
	protocolType: jsii.String("protocolType"),
	routeKey: jsii.String("routeKey"),
	routeSelectionExpression: jsii.String("routeSelectionExpression"),
	tags: tags,
	target: jsii.String("target"),
	version: jsii.String("version"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnApiV2

func NewCfnApiV2(scope awscdk.Construct, id *string, props *CfnApiV2Props) CfnApiV2

Create a new `AWS::ApiGatewayV2::Api`. Deprecated: moved to package aws-apigatewayv2.

type CfnApiV2Props deprecated

type CfnApiV2Props struct {
	// `AWS::ApiGatewayV2::Api.ApiKeySelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-apikeyselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiKeySelectionExpression *string `field:"optional" json:"apiKeySelectionExpression" yaml:"apiKeySelectionExpression"`
	// `AWS::ApiGatewayV2::Api.BasePath`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-basepath
	//
	// Deprecated: moved to package aws-apigatewayv2.
	BasePath *string `field:"optional" json:"basePath" yaml:"basePath"`
	// `AWS::ApiGatewayV2::Api.Body`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-body
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Body interface{} `field:"optional" json:"body" yaml:"body"`
	// `AWS::ApiGatewayV2::Api.BodyS3Location`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-bodys3location
	//
	// Deprecated: moved to package aws-apigatewayv2.
	BodyS3Location interface{} `field:"optional" json:"bodyS3Location" yaml:"bodyS3Location"`
	// `AWS::ApiGatewayV2::Api.CorsConfiguration`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-corsconfiguration
	//
	// Deprecated: moved to package aws-apigatewayv2.
	CorsConfiguration interface{} `field:"optional" json:"corsConfiguration" yaml:"corsConfiguration"`
	// `AWS::ApiGatewayV2::Api.CredentialsArn`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-credentialsarn
	//
	// Deprecated: moved to package aws-apigatewayv2.
	CredentialsArn *string `field:"optional" json:"credentialsArn" yaml:"credentialsArn"`
	// `AWS::ApiGatewayV2::Api.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// `AWS::ApiGatewayV2::Api.DisableSchemaValidation`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-disableschemavalidation
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DisableSchemaValidation interface{} `field:"optional" json:"disableSchemaValidation" yaml:"disableSchemaValidation"`
	// `AWS::ApiGatewayV2::Api.FailOnWarnings`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-failonwarnings
	//
	// Deprecated: moved to package aws-apigatewayv2.
	FailOnWarnings interface{} `field:"optional" json:"failOnWarnings" yaml:"failOnWarnings"`
	// `AWS::ApiGatewayV2::Api.Name`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-name
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// `AWS::ApiGatewayV2::Api.ProtocolType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-protocoltype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ProtocolType *string `field:"optional" json:"protocolType" yaml:"protocolType"`
	// `AWS::ApiGatewayV2::Api.RouteKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-routekey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteKey *string `field:"optional" json:"routeKey" yaml:"routeKey"`
	// `AWS::ApiGatewayV2::Api.RouteSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-routeselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteSelectionExpression *string `field:"optional" json:"routeSelectionExpression" yaml:"routeSelectionExpression"`
	// `AWS::ApiGatewayV2::Api.Tags`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-tags
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Tags interface{} `field:"optional" json:"tags" yaml:"tags"`
	// `AWS::ApiGatewayV2::Api.Target`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-target
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Target *string `field:"optional" json:"target" yaml:"target"`
	// `AWS::ApiGatewayV2::Api.Version`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-version
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Version *string `field:"optional" json:"version" yaml:"version"`
}

Properties for defining a `AWS::ApiGatewayV2::Api`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var body interface{}
var tags interface{}

cfnApiV2Props := &cfnApiV2Props{
	apiKeySelectionExpression: jsii.String("apiKeySelectionExpression"),
	basePath: jsii.String("basePath"),
	body: body,
	bodyS3Location: &bodyS3LocationProperty{
		bucket: jsii.String("bucket"),
		etag: jsii.String("etag"),
		key: jsii.String("key"),
		version: jsii.String("version"),
	},
	corsConfiguration: &corsProperty{
		allowCredentials: jsii.Boolean(false),
		allowHeaders: []*string{
			jsii.String("allowHeaders"),
		},
		allowMethods: []*string{
			jsii.String("allowMethods"),
		},
		allowOrigins: []*string{
			jsii.String("allowOrigins"),
		},
		exposeHeaders: []*string{
			jsii.String("exposeHeaders"),
		},
		maxAge: jsii.Number(123),
	},
	credentialsArn: jsii.String("credentialsArn"),
	description: jsii.String("description"),
	disableSchemaValidation: jsii.Boolean(false),
	failOnWarnings: jsii.Boolean(false),
	name: jsii.String("name"),
	protocolType: jsii.String("protocolType"),
	routeKey: jsii.String("routeKey"),
	routeSelectionExpression: jsii.String("routeSelectionExpression"),
	tags: tags,
	target: jsii.String("target"),
	version: jsii.String("version"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html

Deprecated: moved to package aws-apigatewayv2.

type CfnApiV2_BodyS3LocationProperty deprecated

type CfnApiV2_BodyS3LocationProperty struct {
	// `CfnApiV2.BodyS3LocationProperty.Bucket`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-bucket
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Bucket *string `field:"optional" json:"bucket" yaml:"bucket"`
	// `CfnApiV2.BodyS3LocationProperty.Etag`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-etag
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Etag *string `field:"optional" json:"etag" yaml:"etag"`
	// `CfnApiV2.BodyS3LocationProperty.Key`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-key
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Key *string `field:"optional" json:"key" yaml:"key"`
	// `CfnApiV2.BodyS3LocationProperty.Version`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-version
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Version *string `field:"optional" json:"version" yaml:"version"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

bodyS3LocationProperty := &bodyS3LocationProperty{
	bucket: jsii.String("bucket"),
	etag: jsii.String("etag"),
	key: jsii.String("key"),
	version: jsii.String("version"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html

Deprecated: moved to package aws-apigatewayv2.

type CfnApiV2_CorsProperty deprecated

type CfnApiV2_CorsProperty struct {
	// `CfnApiV2.CorsProperty.AllowCredentials`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-allowcredentials
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AllowCredentials interface{} `field:"optional" json:"allowCredentials" yaml:"allowCredentials"`
	// `CfnApiV2.CorsProperty.AllowHeaders`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-allowheaders
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AllowHeaders *[]*string `field:"optional" json:"allowHeaders" yaml:"allowHeaders"`
	// `CfnApiV2.CorsProperty.AllowMethods`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-allowmethods
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AllowMethods *[]*string `field:"optional" json:"allowMethods" yaml:"allowMethods"`
	// `CfnApiV2.CorsProperty.AllowOrigins`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-alloworigins
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AllowOrigins *[]*string `field:"optional" json:"allowOrigins" yaml:"allowOrigins"`
	// `CfnApiV2.CorsProperty.ExposeHeaders`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-exposeheaders
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ExposeHeaders *[]*string `field:"optional" json:"exposeHeaders" yaml:"exposeHeaders"`
	// `CfnApiV2.CorsProperty.MaxAge`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-maxage
	//
	// Deprecated: moved to package aws-apigatewayv2.
	MaxAge *float64 `field:"optional" json:"maxAge" yaml:"maxAge"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

corsProperty := &corsProperty{
	allowCredentials: jsii.Boolean(false),
	allowHeaders: []*string{
		jsii.String("allowHeaders"),
	},
	allowMethods: []*string{
		jsii.String("allowMethods"),
	},
	allowOrigins: []*string{
		jsii.String("allowOrigins"),
	},
	exposeHeaders: []*string{
		jsii.String("exposeHeaders"),
	},
	maxAge: jsii.Number(123),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html

Deprecated: moved to package aws-apigatewayv2.

type CfnAuthorizer

type CfnAuthorizer interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The ID for the authorizer.
	//
	// For example: `abc123` .
	AttrAuthorizerId() *string
	// The credentials that are required for the authorizer.
	//
	// To specify an IAM role that API Gateway assumes, specify the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
	AuthorizerCredentials() *string
	SetAuthorizerCredentials(val *string)
	// The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches authorizer results.
	//
	// If you specify a value greater than 0, API Gateway caches the authorizer responses. By default, API Gateway sets this property to 300. The maximum value is 3600, or 1 hour.
	AuthorizerResultTtlInSeconds() *float64
	SetAuthorizerResultTtlInSeconds(val *float64)
	// The authorizer's Uniform Resource Identifier (URI).
	//
	// If you specify `TOKEN` for the authorizer's `Type` property, specify a Lambda function URI that has the form `arn:aws:apigateway: *region* :lambda:path/ *path*` . The path usually has the form /2015-03-31/functions/ *LambdaFunctionARN* /invocations.
	AuthorizerUri() *string
	SetAuthorizerUri(val *string)
	// An optional customer-defined field that's used in OpenApi imports and exports without functional impact.
	AuthType() *string
	SetAuthType(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The source of the identity in an incoming request.
	//
	// If you specify `TOKEN` or `COGNITO_USER_POOLS` for the `Type` property, this property is required. Specify a header mapping expression using the form `method.request.header. *name*` , where *name* is the name of a custom authorization header that clients submit as part of their requests.
	//
	// If you specify `REQUEST` for the `Type` property, this property is required when authorization caching is enabled. Specify a comma-separated string of one or more mapping expressions of the specified request parameter using the form `method.request.parameter. *name*` . For supported parameter types, see [Configure Lambda Authorizer Using the API Gateway Console](https://docs.aws.amazon.com/apigateway/latest/developerguide/configure-api-gateway-lambda-authorization-with-console.html) in the *API Gateway Developer Guide* .
	IdentitySource() *string
	SetIdentitySource(val *string)
	// A validation expression for the incoming identity.
	//
	// If you specify `TOKEN` for the authorizer's `Type` property, specify a regular expression. API Gateway uses the expression to attempt to match the incoming client token, and proceeds if the token matches. If the token doesn't match, API Gateway responds with a 401 (unauthorized request) error code.
	IdentityValidationExpression() *string
	SetIdentityValidationExpression(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The name of the authorizer.
	Name() *string
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// A list of the Amazon Cognito user pool Amazon Resource Names (ARNs) to associate with this authorizer.
	//
	// Required if you specify `COGNITO_USER_POOLS` as the authorizer `Type` . For more information, see [Use Amazon Cognito User Pools](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html#apigateway-enable-cognito-user-pool) in the *API Gateway Developer Guide* .
	ProviderArns() *[]*string
	SetProviderArns(val *[]*string)
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The ID of the `RestApi` resource that API Gateway creates the authorizer in.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The type of authorizer. Valid values include:.
	//
	// - `TOKEN` : A custom authorizer that uses a Lambda function.
	// - `COGNITO_USER_POOLS` : An authorizer that uses Amazon Cognito user pools.
	// - `REQUEST` : An authorizer that uses a Lambda function using incoming request parameters.
	Type() *string
	SetType(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::Authorizer`.

The `AWS::ApiGateway::Authorizer` resource creates an authorization layer that API Gateway activates for methods that have authorization enabled. API Gateway activates the authorizer when a client calls those methods.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAuthorizer := awscdk.Aws_apigateway.NewCfnAuthorizer(this, jsii.String("MyCfnAuthorizer"), &cfnAuthorizerProps{
	name: jsii.String("name"),
	restApiId: jsii.String("restApiId"),
	type: jsii.String("type"),

	// the properties below are optional
	authorizerCredentials: jsii.String("authorizerCredentials"),
	authorizerResultTtlInSeconds: jsii.Number(123),
	authorizerUri: jsii.String("authorizerUri"),
	authType: jsii.String("authType"),
	identitySource: jsii.String("identitySource"),
	identityValidationExpression: jsii.String("identityValidationExpression"),
	providerArns: []*string{
		jsii.String("providerArns"),
	},
})

func NewCfnAuthorizer

func NewCfnAuthorizer(scope awscdk.Construct, id *string, props *CfnAuthorizerProps) CfnAuthorizer

Create a new `AWS::ApiGateway::Authorizer`.

type CfnAuthorizerProps

type CfnAuthorizerProps struct {
	// The name of the authorizer.
	Name *string `field:"required" json:"name" yaml:"name"`
	// The ID of the `RestApi` resource that API Gateway creates the authorizer in.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
	// The type of authorizer. Valid values include:.
	//
	// - `TOKEN` : A custom authorizer that uses a Lambda function.
	// - `COGNITO_USER_POOLS` : An authorizer that uses Amazon Cognito user pools.
	// - `REQUEST` : An authorizer that uses a Lambda function using incoming request parameters.
	Type *string `field:"required" json:"type" yaml:"type"`
	// The credentials that are required for the authorizer.
	//
	// To specify an IAM role that API Gateway assumes, specify the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
	AuthorizerCredentials *string `field:"optional" json:"authorizerCredentials" yaml:"authorizerCredentials"`
	// The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches authorizer results.
	//
	// If you specify a value greater than 0, API Gateway caches the authorizer responses. By default, API Gateway sets this property to 300. The maximum value is 3600, or 1 hour.
	AuthorizerResultTtlInSeconds *float64 `field:"optional" json:"authorizerResultTtlInSeconds" yaml:"authorizerResultTtlInSeconds"`
	// The authorizer's Uniform Resource Identifier (URI).
	//
	// If you specify `TOKEN` for the authorizer's `Type` property, specify a Lambda function URI that has the form `arn:aws:apigateway: *region* :lambda:path/ *path*` . The path usually has the form /2015-03-31/functions/ *LambdaFunctionARN* /invocations.
	AuthorizerUri *string `field:"optional" json:"authorizerUri" yaml:"authorizerUri"`
	// An optional customer-defined field that's used in OpenApi imports and exports without functional impact.
	AuthType *string `field:"optional" json:"authType" yaml:"authType"`
	// The source of the identity in an incoming request.
	//
	// If you specify `TOKEN` or `COGNITO_USER_POOLS` for the `Type` property, this property is required. Specify a header mapping expression using the form `method.request.header. *name*` , where *name* is the name of a custom authorization header that clients submit as part of their requests.
	//
	// If you specify `REQUEST` for the `Type` property, this property is required when authorization caching is enabled. Specify a comma-separated string of one or more mapping expressions of the specified request parameter using the form `method.request.parameter. *name*` . For supported parameter types, see [Configure Lambda Authorizer Using the API Gateway Console](https://docs.aws.amazon.com/apigateway/latest/developerguide/configure-api-gateway-lambda-authorization-with-console.html) in the *API Gateway Developer Guide* .
	IdentitySource *string `field:"optional" json:"identitySource" yaml:"identitySource"`
	// A validation expression for the incoming identity.
	//
	// If you specify `TOKEN` for the authorizer's `Type` property, specify a regular expression. API Gateway uses the expression to attempt to match the incoming client token, and proceeds if the token matches. If the token doesn't match, API Gateway responds with a 401 (unauthorized request) error code.
	IdentityValidationExpression *string `field:"optional" json:"identityValidationExpression" yaml:"identityValidationExpression"`
	// A list of the Amazon Cognito user pool Amazon Resource Names (ARNs) to associate with this authorizer.
	//
	// Required if you specify `COGNITO_USER_POOLS` as the authorizer `Type` . For more information, see [Use Amazon Cognito User Pools](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html#apigateway-enable-cognito-user-pool) in the *API Gateway Developer Guide* .
	ProviderArns *[]*string `field:"optional" json:"providerArns" yaml:"providerArns"`
}

Properties for defining a `CfnAuthorizer`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAuthorizerProps := &cfnAuthorizerProps{
	name: jsii.String("name"),
	restApiId: jsii.String("restApiId"),
	type: jsii.String("type"),

	// the properties below are optional
	authorizerCredentials: jsii.String("authorizerCredentials"),
	authorizerResultTtlInSeconds: jsii.Number(123),
	authorizerUri: jsii.String("authorizerUri"),
	authType: jsii.String("authType"),
	identitySource: jsii.String("identitySource"),
	identityValidationExpression: jsii.String("identityValidationExpression"),
	providerArns: []*string{
		jsii.String("providerArns"),
	},
}

type CfnAuthorizerV2 deprecated

type CfnAuthorizerV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::Authorizer.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiId(val *string)
	// `AWS::ApiGatewayV2::Authorizer.AuthorizerCredentialsArn`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizercredentialsarn
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerCredentialsArn() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetAuthorizerCredentialsArn(val *string)
	// `AWS::ApiGatewayV2::Authorizer.AuthorizerResultTtlInSeconds`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizerresultttlinseconds
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerResultTtlInSeconds() *float64
	// Deprecated: moved to package aws-apigatewayv2.
	SetAuthorizerResultTtlInSeconds(val *float64)
	// `AWS::ApiGatewayV2::Authorizer.AuthorizerType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizertype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerType() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetAuthorizerType(val *string)
	// `AWS::ApiGatewayV2::Authorizer.AuthorizerUri`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizeruri
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerUri() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetAuthorizerUri(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// `AWS::ApiGatewayV2::Authorizer.IdentitySource`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IdentitySource() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	SetIdentitySource(val *[]*string)
	// `AWS::ApiGatewayV2::Authorizer.IdentityValidationExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identityvalidationexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IdentityValidationExpression() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetIdentityValidationExpression(val *string)
	// `AWS::ApiGatewayV2::Authorizer.JwtConfiguration`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-jwtconfiguration
	//
	// Deprecated: moved to package aws-apigatewayv2.
	JwtConfiguration() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetJwtConfiguration(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// `AWS::ApiGatewayV2::Authorizer.Name`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-name
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Name() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::Authorizer`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAuthorizerV2 := awscdk.Aws_apigateway.NewCfnAuthorizerV2(this, jsii.String("MyCfnAuthorizerV2"), &cfnAuthorizerV2Props{
	apiId: jsii.String("apiId"),
	authorizerType: jsii.String("authorizerType"),
	identitySource: []*string{
		jsii.String("identitySource"),
	},
	name: jsii.String("name"),

	// the properties below are optional
	authorizerCredentialsArn: jsii.String("authorizerCredentialsArn"),
	authorizerResultTtlInSeconds: jsii.Number(123),
	authorizerUri: jsii.String("authorizerUri"),
	identityValidationExpression: jsii.String("identityValidationExpression"),
	jwtConfiguration: &jWTConfigurationProperty{
		audience: []*string{
			jsii.String("audience"),
		},
		issuer: jsii.String("issuer"),
	},
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnAuthorizerV2

func NewCfnAuthorizerV2(scope awscdk.Construct, id *string, props *CfnAuthorizerV2Props) CfnAuthorizerV2

Create a new `AWS::ApiGatewayV2::Authorizer`. Deprecated: moved to package aws-apigatewayv2.

type CfnAuthorizerV2Props deprecated

type CfnAuthorizerV2Props struct {
	// `AWS::ApiGatewayV2::Authorizer.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId *string `field:"required" json:"apiId" yaml:"apiId"`
	// `AWS::ApiGatewayV2::Authorizer.AuthorizerType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizertype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerType *string `field:"required" json:"authorizerType" yaml:"authorizerType"`
	// `AWS::ApiGatewayV2::Authorizer.IdentitySource`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IdentitySource *[]*string `field:"required" json:"identitySource" yaml:"identitySource"`
	// `AWS::ApiGatewayV2::Authorizer.Name`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-name
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Name *string `field:"required" json:"name" yaml:"name"`
	// `AWS::ApiGatewayV2::Authorizer.AuthorizerCredentialsArn`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizercredentialsarn
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerCredentialsArn *string `field:"optional" json:"authorizerCredentialsArn" yaml:"authorizerCredentialsArn"`
	// `AWS::ApiGatewayV2::Authorizer.AuthorizerResultTtlInSeconds`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizerresultttlinseconds
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerResultTtlInSeconds *float64 `field:"optional" json:"authorizerResultTtlInSeconds" yaml:"authorizerResultTtlInSeconds"`
	// `AWS::ApiGatewayV2::Authorizer.AuthorizerUri`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizeruri
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerUri *string `field:"optional" json:"authorizerUri" yaml:"authorizerUri"`
	// `AWS::ApiGatewayV2::Authorizer.IdentityValidationExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identityvalidationexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IdentityValidationExpression *string `field:"optional" json:"identityValidationExpression" yaml:"identityValidationExpression"`
	// `AWS::ApiGatewayV2::Authorizer.JwtConfiguration`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-jwtconfiguration
	//
	// Deprecated: moved to package aws-apigatewayv2.
	JwtConfiguration interface{} `field:"optional" json:"jwtConfiguration" yaml:"jwtConfiguration"`
}

Properties for defining a `AWS::ApiGatewayV2::Authorizer`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAuthorizerV2Props := &cfnAuthorizerV2Props{
	apiId: jsii.String("apiId"),
	authorizerType: jsii.String("authorizerType"),
	identitySource: []*string{
		jsii.String("identitySource"),
	},
	name: jsii.String("name"),

	// the properties below are optional
	authorizerCredentialsArn: jsii.String("authorizerCredentialsArn"),
	authorizerResultTtlInSeconds: jsii.Number(123),
	authorizerUri: jsii.String("authorizerUri"),
	identityValidationExpression: jsii.String("identityValidationExpression"),
	jwtConfiguration: &jWTConfigurationProperty{
		audience: []*string{
			jsii.String("audience"),
		},
		issuer: jsii.String("issuer"),
	},
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html

Deprecated: moved to package aws-apigatewayv2.

type CfnAuthorizerV2_JWTConfigurationProperty deprecated

type CfnAuthorizerV2_JWTConfigurationProperty struct {
	// `CfnAuthorizerV2.JWTConfigurationProperty.Audience`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html#cfn-apigatewayv2-authorizer-jwtconfiguration-audience
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Audience *[]*string `field:"optional" json:"audience" yaml:"audience"`
	// `CfnAuthorizerV2.JWTConfigurationProperty.Issuer`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html#cfn-apigatewayv2-authorizer-jwtconfiguration-issuer
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Issuer *string `field:"optional" json:"issuer" yaml:"issuer"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

jWTConfigurationProperty := &jWTConfigurationProperty{
	audience: []*string{
		jsii.String("audience"),
	},
	issuer: jsii.String("issuer"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html

Deprecated: moved to package aws-apigatewayv2.

type CfnBasePathMapping

type CfnBasePathMapping interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The base path name that callers of the API must provide in the URL after the domain name.
	BasePath() *string
	SetBasePath(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The `DomainName` of an [AWS::ApiGateway::DomainName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html) resource.
	DomainName() *string
	SetDomainName(val *string)
	// `AWS::ApiGateway::BasePathMapping.Id`.
	Id() *string
	SetId(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The ID of the API.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The name of the API's stage.
	Stage() *string
	SetStage(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::BasePathMapping`.

The `AWS::ApiGateway::BasePathMapping` resource creates a base path that clients who call your API must use in the invocation URL.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnBasePathMapping := awscdk.Aws_apigateway.NewCfnBasePathMapping(this, jsii.String("MyCfnBasePathMapping"), &cfnBasePathMappingProps{
	domainName: jsii.String("domainName"),

	// the properties below are optional
	basePath: jsii.String("basePath"),
	id: jsii.String("id"),
	restApiId: jsii.String("restApiId"),
	stage: jsii.String("stage"),
})

func NewCfnBasePathMapping

func NewCfnBasePathMapping(scope awscdk.Construct, id *string, props *CfnBasePathMappingProps) CfnBasePathMapping

Create a new `AWS::ApiGateway::BasePathMapping`.

type CfnBasePathMappingProps

type CfnBasePathMappingProps struct {
	// The `DomainName` of an [AWS::ApiGateway::DomainName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html) resource.
	DomainName *string `field:"required" json:"domainName" yaml:"domainName"`
	// The base path name that callers of the API must provide in the URL after the domain name.
	BasePath *string `field:"optional" json:"basePath" yaml:"basePath"`
	// `AWS::ApiGateway::BasePathMapping.Id`.
	Id *string `field:"optional" json:"id" yaml:"id"`
	// The ID of the API.
	RestApiId *string `field:"optional" json:"restApiId" yaml:"restApiId"`
	// The name of the API's stage.
	Stage *string `field:"optional" json:"stage" yaml:"stage"`
}

Properties for defining a `CfnBasePathMapping`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnBasePathMappingProps := &cfnBasePathMappingProps{
	domainName: jsii.String("domainName"),

	// the properties below are optional
	basePath: jsii.String("basePath"),
	id: jsii.String("id"),
	restApiId: jsii.String("restApiId"),
	stage: jsii.String("stage"),
}

type CfnClientCertificate

type CfnClientCertificate interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The ID for the client certificate.
	//
	// For example: `abc123` .
	AttrClientCertificateId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// A description of the client certificate.
	Description() *string
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// An array of arbitrary tags (key-value pairs) to associate with the client certificate.
	Tags() awscdk.TagManager
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::ClientCertificate`.

The `AWS::ApiGateway::ClientCertificate` resource creates a client certificate that API Gateway uses to configure client-side SSL authentication for sending requests to the integration endpoint.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnClientCertificate := awscdk.Aws_apigateway.NewCfnClientCertificate(this, jsii.String("MyCfnClientCertificate"), &cfnClientCertificateProps{
	description: jsii.String("description"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
})

func NewCfnClientCertificate

func NewCfnClientCertificate(scope awscdk.Construct, id *string, props *CfnClientCertificateProps) CfnClientCertificate

Create a new `AWS::ApiGateway::ClientCertificate`.

type CfnClientCertificateProps

type CfnClientCertificateProps struct {
	// A description of the client certificate.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// An array of arbitrary tags (key-value pairs) to associate with the client certificate.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `CfnClientCertificate`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnClientCertificateProps := &cfnClientCertificateProps{
	description: jsii.String("description"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
}

type CfnDeployment

type CfnDeployment interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The ID for the deployment.
	//
	// For example: `abc123` .
	AttrDeploymentId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// Specifies settings for the canary deployment.
	DeploymentCanarySettings() interface{}
	SetDeploymentCanarySettings(val interface{})
	// A description of the purpose of the API Gateway deployment.
	Description() *string
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The ID of the `RestApi` resource to deploy.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// Configures the stage that API Gateway creates with this deployment.
	StageDescription() interface{}
	SetStageDescription(val interface{})
	// A name for the stage that API Gateway creates with this deployment.
	//
	// Use only alphanumeric characters.
	StageName() *string
	SetStageName(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::Deployment`.

The `AWS::ApiGateway::Deployment` resource deploys an API Gateway `RestApi` resource to a stage so that clients can call the API over the internet. The stage acts as an environment.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDeployment := awscdk.Aws_apigateway.NewCfnDeployment(this, jsii.String("MyCfnDeployment"), &cfnDeploymentProps{
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	deploymentCanarySettings: &deploymentCanarySettingsProperty{
		percentTraffic: jsii.Number(123),
		stageVariableOverrides: map[string]*string{
			"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
		},
		useStageCache: jsii.Boolean(false),
	},
	description: jsii.String("description"),
	stageDescription: &stageDescriptionProperty{
		accessLogSetting: &accessLogSettingProperty{
			destinationArn: jsii.String("destinationArn"),
			format: jsii.String("format"),
		},
		cacheClusterEnabled: jsii.Boolean(false),
		cacheClusterSize: jsii.String("cacheClusterSize"),
		cacheDataEncrypted: jsii.Boolean(false),
		cacheTtlInSeconds: jsii.Number(123),
		cachingEnabled: jsii.Boolean(false),
		canarySetting: &canarySettingProperty{
			percentTraffic: jsii.Number(123),
			stageVariableOverrides: map[string]*string{
				"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
			},
			useStageCache: jsii.Boolean(false),
		},
		clientCertificateId: jsii.String("clientCertificateId"),
		dataTraceEnabled: jsii.Boolean(false),
		description: jsii.String("description"),
		documentationVersion: jsii.String("documentationVersion"),
		loggingLevel: jsii.String("loggingLevel"),
		methodSettings: []interface{}{
			&methodSettingProperty{
				cacheDataEncrypted: jsii.Boolean(false),
				cacheTtlInSeconds: jsii.Number(123),
				cachingEnabled: jsii.Boolean(false),
				dataTraceEnabled: jsii.Boolean(false),
				httpMethod: jsii.String("httpMethod"),
				loggingLevel: jsii.String("loggingLevel"),
				metricsEnabled: jsii.Boolean(false),
				resourcePath: jsii.String("resourcePath"),
				throttlingBurstLimit: jsii.Number(123),
				throttlingRateLimit: jsii.Number(123),
			},
		},
		metricsEnabled: jsii.Boolean(false),
		tags: []cfnTag{
			&cfnTag{
				key: jsii.String("key"),
				value: jsii.String("value"),
			},
		},
		throttlingBurstLimit: jsii.Number(123),
		throttlingRateLimit: jsii.Number(123),
		tracingEnabled: jsii.Boolean(false),
		variables: map[string]*string{
			"variablesKey": jsii.String("variables"),
		},
	},
	stageName: jsii.String("stageName"),
})

func NewCfnDeployment

func NewCfnDeployment(scope awscdk.Construct, id *string, props *CfnDeploymentProps) CfnDeployment

Create a new `AWS::ApiGateway::Deployment`.

type CfnDeploymentProps

type CfnDeploymentProps struct {
	// The ID of the `RestApi` resource to deploy.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
	// Specifies settings for the canary deployment.
	DeploymentCanarySettings interface{} `field:"optional" json:"deploymentCanarySettings" yaml:"deploymentCanarySettings"`
	// A description of the purpose of the API Gateway deployment.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Configures the stage that API Gateway creates with this deployment.
	StageDescription interface{} `field:"optional" json:"stageDescription" yaml:"stageDescription"`
	// A name for the stage that API Gateway creates with this deployment.
	//
	// Use only alphanumeric characters.
	StageName *string `field:"optional" json:"stageName" yaml:"stageName"`
}

Properties for defining a `CfnDeployment`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDeploymentProps := &cfnDeploymentProps{
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	deploymentCanarySettings: &deploymentCanarySettingsProperty{
		percentTraffic: jsii.Number(123),
		stageVariableOverrides: map[string]*string{
			"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
		},
		useStageCache: jsii.Boolean(false),
	},
	description: jsii.String("description"),
	stageDescription: &stageDescriptionProperty{
		accessLogSetting: &accessLogSettingProperty{
			destinationArn: jsii.String("destinationArn"),
			format: jsii.String("format"),
		},
		cacheClusterEnabled: jsii.Boolean(false),
		cacheClusterSize: jsii.String("cacheClusterSize"),
		cacheDataEncrypted: jsii.Boolean(false),
		cacheTtlInSeconds: jsii.Number(123),
		cachingEnabled: jsii.Boolean(false),
		canarySetting: &canarySettingProperty{
			percentTraffic: jsii.Number(123),
			stageVariableOverrides: map[string]*string{
				"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
			},
			useStageCache: jsii.Boolean(false),
		},
		clientCertificateId: jsii.String("clientCertificateId"),
		dataTraceEnabled: jsii.Boolean(false),
		description: jsii.String("description"),
		documentationVersion: jsii.String("documentationVersion"),
		loggingLevel: jsii.String("loggingLevel"),
		methodSettings: []interface{}{
			&methodSettingProperty{
				cacheDataEncrypted: jsii.Boolean(false),
				cacheTtlInSeconds: jsii.Number(123),
				cachingEnabled: jsii.Boolean(false),
				dataTraceEnabled: jsii.Boolean(false),
				httpMethod: jsii.String("httpMethod"),
				loggingLevel: jsii.String("loggingLevel"),
				metricsEnabled: jsii.Boolean(false),
				resourcePath: jsii.String("resourcePath"),
				throttlingBurstLimit: jsii.Number(123),
				throttlingRateLimit: jsii.Number(123),
			},
		},
		metricsEnabled: jsii.Boolean(false),
		tags: []cfnTag{
			&cfnTag{
				key: jsii.String("key"),
				value: jsii.String("value"),
			},
		},
		throttlingBurstLimit: jsii.Number(123),
		throttlingRateLimit: jsii.Number(123),
		tracingEnabled: jsii.Boolean(false),
		variables: map[string]*string{
			"variablesKey": jsii.String("variables"),
		},
	},
	stageName: jsii.String("stageName"),
}

type CfnDeploymentV2 deprecated

type CfnDeploymentV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::Deployment.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-deployment.html#cfn-apigatewayv2-deployment-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiId(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// `AWS::ApiGatewayV2::Deployment.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-deployment.html#cfn-apigatewayv2-deployment-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// `AWS::ApiGatewayV2::Deployment.StageName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-deployment.html#cfn-apigatewayv2-deployment-stagename
	//
	// Deprecated: moved to package aws-apigatewayv2.
	StageName() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetStageName(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::Deployment`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDeploymentV2 := awscdk.Aws_apigateway.NewCfnDeploymentV2(this, jsii.String("MyCfnDeploymentV2"), &cfnDeploymentV2Props{
	apiId: jsii.String("apiId"),

	// the properties below are optional
	description: jsii.String("description"),
	stageName: jsii.String("stageName"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-deployment.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnDeploymentV2

func NewCfnDeploymentV2(scope awscdk.Construct, id *string, props *CfnDeploymentV2Props) CfnDeploymentV2

Create a new `AWS::ApiGatewayV2::Deployment`. Deprecated: moved to package aws-apigatewayv2.

type CfnDeploymentV2Props deprecated

type CfnDeploymentV2Props struct {
	// `AWS::ApiGatewayV2::Deployment.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-deployment.html#cfn-apigatewayv2-deployment-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId *string `field:"required" json:"apiId" yaml:"apiId"`
	// `AWS::ApiGatewayV2::Deployment.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-deployment.html#cfn-apigatewayv2-deployment-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// `AWS::ApiGatewayV2::Deployment.StageName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-deployment.html#cfn-apigatewayv2-deployment-stagename
	//
	// Deprecated: moved to package aws-apigatewayv2.
	StageName *string `field:"optional" json:"stageName" yaml:"stageName"`
}

Properties for defining a `AWS::ApiGatewayV2::Deployment`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDeploymentV2Props := &cfnDeploymentV2Props{
	apiId: jsii.String("apiId"),

	// the properties below are optional
	description: jsii.String("description"),
	stageName: jsii.String("stageName"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-deployment.html

Deprecated: moved to package aws-apigatewayv2.

type CfnDeployment_AccessLogSettingProperty

type CfnDeployment_AccessLogSettingProperty struct {
	// The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs.
	//
	// If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with `amazon-apigateway-` .
	DestinationArn *string `field:"optional" json:"destinationArn" yaml:"destinationArn"`
	// A single line format of the access logs of data, as specified by selected [$context variables](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference) . The format must include at least `$context.requestId` .
	Format *string `field:"optional" json:"format" yaml:"format"`
}

The `AccessLogSetting` property type specifies settings for logging access in this stage.

`AccessLogSetting` is a property of the [StageDescription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html) property type.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

accessLogSettingProperty := &accessLogSettingProperty{
	destinationArn: jsii.String("destinationArn"),
	format: jsii.String("format"),
}

type CfnDeployment_CanarySettingProperty

type CfnDeployment_CanarySettingProperty struct {
	// The percent (0-100) of traffic diverted to a canary deployment.
	PercentTraffic *float64 `field:"optional" json:"percentTraffic" yaml:"percentTraffic"`
	// Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary.
	//
	// These stage variables are represented as a string-to-string map between stage variable names and their values.
	StageVariableOverrides interface{} `field:"optional" json:"stageVariableOverrides" yaml:"stageVariableOverrides"`
	// Whether the canary deployment uses the stage cache or not.
	UseStageCache interface{} `field:"optional" json:"useStageCache" yaml:"useStageCache"`
}

The `CanarySetting` property type specifies settings for the canary deployment in this stage.

`CanarySetting` is a property of the [StageDescription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html) property type.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

canarySettingProperty := &canarySettingProperty{
	percentTraffic: jsii.Number(123),
	stageVariableOverrides: map[string]*string{
		"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
	},
	useStageCache: jsii.Boolean(false),
}

type CfnDeployment_DeploymentCanarySettingsProperty

type CfnDeployment_DeploymentCanarySettingsProperty struct {
	// The percentage (0-100) of traffic diverted to a canary deployment.
	PercentTraffic *float64 `field:"optional" json:"percentTraffic" yaml:"percentTraffic"`
	// Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary.
	//
	// These stage variables are represented as a string-to-string map between stage variable names and their values.
	//
	// Duplicates are not allowed.
	StageVariableOverrides interface{} `field:"optional" json:"stageVariableOverrides" yaml:"stageVariableOverrides"`
	// Whether the canary deployment uses the stage cache.
	UseStageCache interface{} `field:"optional" json:"useStageCache" yaml:"useStageCache"`
}

The `DeploymentCanarySettings` property type specifies settings for the canary deployment.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

deploymentCanarySettingsProperty := &deploymentCanarySettingsProperty{
	percentTraffic: jsii.Number(123),
	stageVariableOverrides: map[string]*string{
		"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
	},
	useStageCache: jsii.Boolean(false),
}

type CfnDeployment_MethodSettingProperty

type CfnDeployment_MethodSettingProperty struct {
	// Indicates whether the cached responses are encrypted.
	CacheDataEncrypted interface{} `field:"optional" json:"cacheDataEncrypted" yaml:"cacheDataEncrypted"`
	// The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses.
	CacheTtlInSeconds *float64 `field:"optional" json:"cacheTtlInSeconds" yaml:"cacheTtlInSeconds"`
	// Indicates whether responses are cached and returned for requests.
	//
	// You must enable a cache cluster on the stage to cache responses. For more information, see [Enable API Gateway Caching in a Stage to Enhance API Performance](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html) in the *API Gateway Developer Guide* .
	CachingEnabled interface{} `field:"optional" json:"cachingEnabled" yaml:"cachingEnabled"`
	// Indicates whether data trace logging is enabled for methods in the stage.
	//
	// API Gateway pushes these logs to Amazon CloudWatch Logs.
	DataTraceEnabled interface{} `field:"optional" json:"dataTraceEnabled" yaml:"dataTraceEnabled"`
	// The HTTP method.
	HttpMethod *string `field:"optional" json:"httpMethod" yaml:"httpMethod"`
	// The logging level for this method.
	//
	// For valid values, see the `loggingLevel` property of the [Stage](https://docs.aws.amazon.com/apigateway/api-reference/resource/stage/#loggingLevel) resource in the *Amazon API Gateway API Reference* .
	LoggingLevel *string `field:"optional" json:"loggingLevel" yaml:"loggingLevel"`
	// Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.
	MetricsEnabled interface{} `field:"optional" json:"metricsEnabled" yaml:"metricsEnabled"`
	// The resource path for this method.
	//
	// Forward slashes ( `/` ) are encoded as `~1` and the initial slash must include a forward slash. For example, the path value `/resource/subresource` must be encoded as `/~1resource~1subresource` . To specify the root path, use only a slash ( `/` ).
	ResourcePath *string `field:"optional" json:"resourcePath" yaml:"resourcePath"`
	// The number of burst requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account .
	//
	// For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide* .
	ThrottlingBurstLimit *float64 `field:"optional" json:"throttlingBurstLimit" yaml:"throttlingBurstLimit"`
	// The number of steady-state requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account .
	//
	// For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide* .
	ThrottlingRateLimit *float64 `field:"optional" json:"throttlingRateLimit" yaml:"throttlingRateLimit"`
}

The `MethodSetting` property type configures settings for all methods in a stage.

The `MethodSettings` property of the [Amazon API Gateway Deployment StageDescription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html) property type contains a list of `MethodSetting` property types.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

methodSettingProperty := &methodSettingProperty{
	cacheDataEncrypted: jsii.Boolean(false),
	cacheTtlInSeconds: jsii.Number(123),
	cachingEnabled: jsii.Boolean(false),
	dataTraceEnabled: jsii.Boolean(false),
	httpMethod: jsii.String("httpMethod"),
	loggingLevel: jsii.String("loggingLevel"),
	metricsEnabled: jsii.Boolean(false),
	resourcePath: jsii.String("resourcePath"),
	throttlingBurstLimit: jsii.Number(123),
	throttlingRateLimit: jsii.Number(123),
}

type CfnDeployment_StageDescriptionProperty

type CfnDeployment_StageDescriptionProperty struct {
	// Specifies settings for logging access in this stage.
	AccessLogSetting interface{} `field:"optional" json:"accessLogSetting" yaml:"accessLogSetting"`
	// Indicates whether cache clustering is enabled for the stage.
	CacheClusterEnabled interface{} `field:"optional" json:"cacheClusterEnabled" yaml:"cacheClusterEnabled"`
	// The size of the stage's cache cluster.
	CacheClusterSize *string `field:"optional" json:"cacheClusterSize" yaml:"cacheClusterSize"`
	// Indicates whether the cached responses are encrypted.
	CacheDataEncrypted interface{} `field:"optional" json:"cacheDataEncrypted" yaml:"cacheDataEncrypted"`
	// The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses.
	CacheTtlInSeconds *float64 `field:"optional" json:"cacheTtlInSeconds" yaml:"cacheTtlInSeconds"`
	// Indicates whether responses are cached and returned for requests.
	//
	// You must enable a cache cluster on the stage to cache responses. For more information, see [Enable API Gateway Caching in a Stage to Enhance API Performance](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html) in the *API Gateway Developer Guide* .
	CachingEnabled interface{} `field:"optional" json:"cachingEnabled" yaml:"cachingEnabled"`
	// Specifies settings for the canary deployment in this stage.
	CanarySetting interface{} `field:"optional" json:"canarySetting" yaml:"canarySetting"`
	// The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.
	ClientCertificateId *string `field:"optional" json:"clientCertificateId" yaml:"clientCertificateId"`
	// Indicates whether data trace logging is enabled for methods in the stage.
	//
	// API Gateway pushes these logs to Amazon CloudWatch Logs.
	DataTraceEnabled interface{} `field:"optional" json:"dataTraceEnabled" yaml:"dataTraceEnabled"`
	// A description of the purpose of the stage.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The version identifier of the API documentation snapshot.
	DocumentationVersion *string `field:"optional" json:"documentationVersion" yaml:"documentationVersion"`
	// The logging level for this method.
	//
	// For valid values, see the `loggingLevel` property of the [Stage](https://docs.aws.amazon.com/apigateway/api-reference/resource/stage/#loggingLevel) resource in the *Amazon API Gateway API Reference* .
	LoggingLevel *string `field:"optional" json:"loggingLevel" yaml:"loggingLevel"`
	// Configures settings for all of the stage's methods.
	MethodSettings interface{} `field:"optional" json:"methodSettings" yaml:"methodSettings"`
	// Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.
	MetricsEnabled interface{} `field:"optional" json:"metricsEnabled" yaml:"metricsEnabled"`
	// An array of arbitrary tags (key-value pairs) to associate with the stage.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
	// The target request burst rate limit.
	//
	// This allows more requests through for a period of time than the target rate limit. For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide* .
	ThrottlingBurstLimit *float64 `field:"optional" json:"throttlingBurstLimit" yaml:"throttlingBurstLimit"`
	// The target request steady-state rate limit.
	//
	// For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide* .
	ThrottlingRateLimit *float64 `field:"optional" json:"throttlingRateLimit" yaml:"throttlingRateLimit"`
	// Specifies whether active tracing with X-ray is enabled for this stage.
	//
	// For more information, see [Trace API Gateway API Execution with AWS X-Ray](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-xray.html) in the *API Gateway Developer Guide* .
	TracingEnabled interface{} `field:"optional" json:"tracingEnabled" yaml:"tracingEnabled"`
	// A map that defines the stage variables.
	//
	// Variable names must consist of alphanumeric characters, and the values must match the following regular expression: `[A-Za-z0-9-._~:/?#&=,]+` .
	Variables interface{} `field:"optional" json:"variables" yaml:"variables"`
}

`StageDescription` is a property of the [AWS::ApiGateway::Deployment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-deployment.html) resource that configures a deployment stage.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

stageDescriptionProperty := &stageDescriptionProperty{
	accessLogSetting: &accessLogSettingProperty{
		destinationArn: jsii.String("destinationArn"),
		format: jsii.String("format"),
	},
	cacheClusterEnabled: jsii.Boolean(false),
	cacheClusterSize: jsii.String("cacheClusterSize"),
	cacheDataEncrypted: jsii.Boolean(false),
	cacheTtlInSeconds: jsii.Number(123),
	cachingEnabled: jsii.Boolean(false),
	canarySetting: &canarySettingProperty{
		percentTraffic: jsii.Number(123),
		stageVariableOverrides: map[string]*string{
			"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
		},
		useStageCache: jsii.Boolean(false),
	},
	clientCertificateId: jsii.String("clientCertificateId"),
	dataTraceEnabled: jsii.Boolean(false),
	description: jsii.String("description"),
	documentationVersion: jsii.String("documentationVersion"),
	loggingLevel: jsii.String("loggingLevel"),
	methodSettings: []interface{}{
		&methodSettingProperty{
			cacheDataEncrypted: jsii.Boolean(false),
			cacheTtlInSeconds: jsii.Number(123),
			cachingEnabled: jsii.Boolean(false),
			dataTraceEnabled: jsii.Boolean(false),
			httpMethod: jsii.String("httpMethod"),
			loggingLevel: jsii.String("loggingLevel"),
			metricsEnabled: jsii.Boolean(false),
			resourcePath: jsii.String("resourcePath"),
			throttlingBurstLimit: jsii.Number(123),
			throttlingRateLimit: jsii.Number(123),
		},
	},
	metricsEnabled: jsii.Boolean(false),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	throttlingBurstLimit: jsii.Number(123),
	throttlingRateLimit: jsii.Number(123),
	tracingEnabled: jsii.Boolean(false),
	variables: map[string]*string{
		"variablesKey": jsii.String("variables"),
	},
}

type CfnDocumentationPart

type CfnDocumentationPart interface {
	awscdk.CfnResource
	awscdk.IInspectable
	AttrDocumentationPartId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The location of the API entity that the documentation applies to.
	Location() interface{}
	SetLocation(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The documentation content map of the targeted API entity.
	Properties() *string
	SetProperties(val *string)
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The identifier of the targeted API entity.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::DocumentationPart`.

The `AWS::ApiGateway::DocumentationPart` resource creates a documentation part for an API. For more information, see [Representation of API Documentation in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api-content-representation.html) in the *API Gateway Developer Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDocumentationPart := awscdk.Aws_apigateway.NewCfnDocumentationPart(this, jsii.String("MyCfnDocumentationPart"), &cfnDocumentationPartProps{
	location: &locationProperty{
		method: jsii.String("method"),
		name: jsii.String("name"),
		path: jsii.String("path"),
		statusCode: jsii.String("statusCode"),
		type: jsii.String("type"),
	},
	properties: jsii.String("properties"),
	restApiId: jsii.String("restApiId"),
})

func NewCfnDocumentationPart

func NewCfnDocumentationPart(scope awscdk.Construct, id *string, props *CfnDocumentationPartProps) CfnDocumentationPart

Create a new `AWS::ApiGateway::DocumentationPart`.

type CfnDocumentationPartProps

type CfnDocumentationPartProps struct {
	// The location of the API entity that the documentation applies to.
	Location interface{} `field:"required" json:"location" yaml:"location"`
	// The documentation content map of the targeted API entity.
	Properties *string `field:"required" json:"properties" yaml:"properties"`
	// The identifier of the targeted API entity.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
}

Properties for defining a `CfnDocumentationPart`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDocumentationPartProps := &cfnDocumentationPartProps{
	location: &locationProperty{
		method: jsii.String("method"),
		name: jsii.String("name"),
		path: jsii.String("path"),
		statusCode: jsii.String("statusCode"),
		type: jsii.String("type"),
	},
	properties: jsii.String("properties"),
	restApiId: jsii.String("restApiId"),
}

type CfnDocumentationPart_LocationProperty

type CfnDocumentationPart_LocationProperty struct {
	// The HTTP verb of a method.
	Method *string `field:"optional" json:"method" yaml:"method"`
	// The name of the targeted API entity.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The URL path of the target.
	Path *string `field:"optional" json:"path" yaml:"path"`
	// The HTTP status code of a response.
	StatusCode *string `field:"optional" json:"statusCode" yaml:"statusCode"`
	// The type of API entity that the documentation content applies to.
	Type *string `field:"optional" json:"type" yaml:"type"`
}

The `Location` property specifies the location of the Amazon API Gateway API entity that the documentation applies to.

`Location` is a property of the [AWS::ApiGateway::DocumentationPart](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-documentationpart.html) resource.

> For more information about each property, including constraints and valid values, see [DocumentationPart](https://docs.aws.amazon.com/apigateway/api-reference/resource/documentation-part/#location) in the *Amazon API Gateway REST API Reference* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

locationProperty := &locationProperty{
	method: jsii.String("method"),
	name: jsii.String("name"),
	path: jsii.String("path"),
	statusCode: jsii.String("statusCode"),
	type: jsii.String("type"),
}

type CfnDocumentationVersion

type CfnDocumentationVersion interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The description of the API documentation snapshot.
	Description() *string
	SetDescription(val *string)
	// The version identifier of the API documentation snapshot.
	DocumentationVersion() *string
	SetDocumentationVersion(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The identifier of the API.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::DocumentationVersion`.

The `AWS::ApiGateway::DocumentationVersion` resource creates a snapshot of the documentation for an API. For more information, see [Representation of API Documentation in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api-content-representation.html) in the *API Gateway Developer Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDocumentationVersion := awscdk.Aws_apigateway.NewCfnDocumentationVersion(this, jsii.String("MyCfnDocumentationVersion"), &cfnDocumentationVersionProps{
	documentationVersion: jsii.String("documentationVersion"),
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	description: jsii.String("description"),
})

func NewCfnDocumentationVersion

func NewCfnDocumentationVersion(scope awscdk.Construct, id *string, props *CfnDocumentationVersionProps) CfnDocumentationVersion

Create a new `AWS::ApiGateway::DocumentationVersion`.

type CfnDocumentationVersionProps

type CfnDocumentationVersionProps struct {
	// The version identifier of the API documentation snapshot.
	DocumentationVersion *string `field:"required" json:"documentationVersion" yaml:"documentationVersion"`
	// The identifier of the API.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
	// The description of the API documentation snapshot.
	Description *string `field:"optional" json:"description" yaml:"description"`
}

Properties for defining a `CfnDocumentationVersion`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDocumentationVersionProps := &cfnDocumentationVersionProps{
	documentationVersion: jsii.String("documentationVersion"),
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	description: jsii.String("description"),
}

type CfnDomainName

type CfnDomainName interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The Amazon CloudFront distribution domain name that's mapped to the custom domain name.
	//
	// This is only applicable for endpoints whose type is `EDGE` .
	//
	// Example: `d111111abcdef8.cloudfront.net`
	AttrDistributionDomainName() *string
	// The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint.
	//
	// The only valid value is `Z2FDTNDATAQYW2` for all regions.
	AttrDistributionHostedZoneId() *string
	// The domain name associated with the regional endpoint for this custom domain name.
	//
	// You set up this association by adding a DNS record that points the custom domain name to this regional domain name.
	AttrRegionalDomainName() *string
	// The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
	AttrRegionalHostedZoneId() *string
	// The reference to an AWS -managed certificate for use by the edge-optimized endpoint for this domain name.
	//
	// AWS Certificate Manager is the only supported source. For requirements and additional information about setting up certificates, see [Get Certificates Ready in AWS Certificate Manager](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html#how-to-custom-domains-prerequisites) in the *API Gateway Developer Guide* .
	CertificateArn() *string
	SetCertificateArn(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The custom domain name for your API.
	//
	// Uppercase letters are not supported.
	DomainName() *string
	SetDomainName(val *string)
	// A list of the endpoint types of the domain name.
	EndpointConfiguration() interface{}
	SetEndpointConfiguration(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The mutual TLS authentication configuration for a custom domain name.
	MutualTlsAuthentication() interface{}
	SetMutualTlsAuthentication(val interface{})
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The ARN of the public certificate issued by ACM to validate ownership of your custom domain.
	//
	// Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.
	OwnershipVerificationCertificateArn() *string
	SetOwnershipVerificationCertificateArn(val *string)
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The reference to an AWS -managed certificate for use by the regional endpoint for the domain name.
	//
	// AWS Certificate Manager is the only supported source.
	RegionalCertificateArn() *string
	SetRegionalCertificateArn(val *string)
	// The Transport Layer Security (TLS) version + cipher suite for this domain name.
	//
	// Valid values include `TLS_1_0` and `TLS_1_2` .
	SecurityPolicy() *string
	SetSecurityPolicy(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// An array of arbitrary tags (key-value pairs) to associate with the domain name.
	Tags() awscdk.TagManager
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::DomainName`.

The `AWS::ApiGateway::DomainName` resource specifies a custom domain name for your API in API Gateway.

You can use a custom domain name to provide a URL that's more intuitive and easier to recall. For more information about using custom domain names, see [Set up Custom Domain Name for an API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) in the *API Gateway Developer Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDomainName := awscdk.Aws_apigateway.NewCfnDomainName(this, jsii.String("MyCfnDomainName"), &cfnDomainNameProps{
	certificateArn: jsii.String("certificateArn"),
	domainName: jsii.String("domainName"),
	endpointConfiguration: &endpointConfigurationProperty{
		types: []*string{
			jsii.String("types"),
		},
	},
	mutualTlsAuthentication: &mutualTlsAuthenticationProperty{
		truststoreUri: jsii.String("truststoreUri"),
		truststoreVersion: jsii.String("truststoreVersion"),
	},
	ownershipVerificationCertificateArn: jsii.String("ownershipVerificationCertificateArn"),
	regionalCertificateArn: jsii.String("regionalCertificateArn"),
	securityPolicy: jsii.String("securityPolicy"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
})

func NewCfnDomainName

func NewCfnDomainName(scope awscdk.Construct, id *string, props *CfnDomainNameProps) CfnDomainName

Create a new `AWS::ApiGateway::DomainName`.

type CfnDomainNameProps

type CfnDomainNameProps struct {
	// The reference to an AWS -managed certificate for use by the edge-optimized endpoint for this domain name.
	//
	// AWS Certificate Manager is the only supported source. For requirements and additional information about setting up certificates, see [Get Certificates Ready in AWS Certificate Manager](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html#how-to-custom-domains-prerequisites) in the *API Gateway Developer Guide* .
	CertificateArn *string `field:"optional" json:"certificateArn" yaml:"certificateArn"`
	// The custom domain name for your API.
	//
	// Uppercase letters are not supported.
	DomainName *string `field:"optional" json:"domainName" yaml:"domainName"`
	// A list of the endpoint types of the domain name.
	EndpointConfiguration interface{} `field:"optional" json:"endpointConfiguration" yaml:"endpointConfiguration"`
	// The mutual TLS authentication configuration for a custom domain name.
	MutualTlsAuthentication interface{} `field:"optional" json:"mutualTlsAuthentication" yaml:"mutualTlsAuthentication"`
	// The ARN of the public certificate issued by ACM to validate ownership of your custom domain.
	//
	// Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.
	OwnershipVerificationCertificateArn *string `field:"optional" json:"ownershipVerificationCertificateArn" yaml:"ownershipVerificationCertificateArn"`
	// The reference to an AWS -managed certificate for use by the regional endpoint for the domain name.
	//
	// AWS Certificate Manager is the only supported source.
	RegionalCertificateArn *string `field:"optional" json:"regionalCertificateArn" yaml:"regionalCertificateArn"`
	// The Transport Layer Security (TLS) version + cipher suite for this domain name.
	//
	// Valid values include `TLS_1_0` and `TLS_1_2` .
	SecurityPolicy *string `field:"optional" json:"securityPolicy" yaml:"securityPolicy"`
	// An array of arbitrary tags (key-value pairs) to associate with the domain name.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `CfnDomainName`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDomainNameProps := &cfnDomainNameProps{
	certificateArn: jsii.String("certificateArn"),
	domainName: jsii.String("domainName"),
	endpointConfiguration: &endpointConfigurationProperty{
		types: []*string{
			jsii.String("types"),
		},
	},
	mutualTlsAuthentication: &mutualTlsAuthenticationProperty{
		truststoreUri: jsii.String("truststoreUri"),
		truststoreVersion: jsii.String("truststoreVersion"),
	},
	ownershipVerificationCertificateArn: jsii.String("ownershipVerificationCertificateArn"),
	regionalCertificateArn: jsii.String("regionalCertificateArn"),
	securityPolicy: jsii.String("securityPolicy"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
}

type CfnDomainNameV2 deprecated

type CfnDomainNameV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Deprecated: moved to package aws-apigatewayv2.
	AttrRegionalDomainName() *string
	// Deprecated: moved to package aws-apigatewayv2.
	AttrRegionalHostedZoneId() *string
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// `AWS::ApiGatewayV2::DomainName.DomainName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html#cfn-apigatewayv2-domainname-domainname
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DomainName() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetDomainName(val *string)
	// `AWS::ApiGatewayV2::DomainName.DomainNameConfigurations`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html#cfn-apigatewayv2-domainname-domainnameconfigurations
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DomainNameConfigurations() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetDomainNameConfigurations(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// `AWS::ApiGatewayV2::DomainName.Tags`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html#cfn-apigatewayv2-domainname-tags
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Tags() awscdk.TagManager
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::DomainName`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var tags interface{}

cfnDomainNameV2 := awscdk.Aws_apigateway.NewCfnDomainNameV2(this, jsii.String("MyCfnDomainNameV2"), &cfnDomainNameV2Props{
	domainName: jsii.String("domainName"),

	// the properties below are optional
	domainNameConfigurations: []interface{}{
		&domainNameConfigurationProperty{
			certificateArn: jsii.String("certificateArn"),
			certificateName: jsii.String("certificateName"),
			endpointType: jsii.String("endpointType"),
		},
	},
	tags: tags,
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnDomainNameV2

func NewCfnDomainNameV2(scope awscdk.Construct, id *string, props *CfnDomainNameV2Props) CfnDomainNameV2

Create a new `AWS::ApiGatewayV2::DomainName`. Deprecated: moved to package aws-apigatewayv2.

type CfnDomainNameV2Props deprecated

type CfnDomainNameV2Props struct {
	// `AWS::ApiGatewayV2::DomainName.DomainName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html#cfn-apigatewayv2-domainname-domainname
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DomainName *string `field:"required" json:"domainName" yaml:"domainName"`
	// `AWS::ApiGatewayV2::DomainName.DomainNameConfigurations`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html#cfn-apigatewayv2-domainname-domainnameconfigurations
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DomainNameConfigurations interface{} `field:"optional" json:"domainNameConfigurations" yaml:"domainNameConfigurations"`
	// `AWS::ApiGatewayV2::DomainName.Tags`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html#cfn-apigatewayv2-domainname-tags
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Tags interface{} `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `AWS::ApiGatewayV2::DomainName`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var tags interface{}

cfnDomainNameV2Props := &cfnDomainNameV2Props{
	domainName: jsii.String("domainName"),

	// the properties below are optional
	domainNameConfigurations: []interface{}{
		&domainNameConfigurationProperty{
			certificateArn: jsii.String("certificateArn"),
			certificateName: jsii.String("certificateName"),
			endpointType: jsii.String("endpointType"),
		},
	},
	tags: tags,
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html

Deprecated: moved to package aws-apigatewayv2.

type CfnDomainNameV2_DomainNameConfigurationProperty deprecated

type CfnDomainNameV2_DomainNameConfigurationProperty struct {
	// `CfnDomainNameV2.DomainNameConfigurationProperty.CertificateArn`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-certificatearn
	//
	// Deprecated: moved to package aws-apigatewayv2.
	CertificateArn *string `field:"optional" json:"certificateArn" yaml:"certificateArn"`
	// `CfnDomainNameV2.DomainNameConfigurationProperty.CertificateName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-certificatename
	//
	// Deprecated: moved to package aws-apigatewayv2.
	CertificateName *string `field:"optional" json:"certificateName" yaml:"certificateName"`
	// `CfnDomainNameV2.DomainNameConfigurationProperty.EndpointType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-endpointtype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	EndpointType *string `field:"optional" json:"endpointType" yaml:"endpointType"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

domainNameConfigurationProperty := &domainNameConfigurationProperty{
	certificateArn: jsii.String("certificateArn"),
	certificateName: jsii.String("certificateName"),
	endpointType: jsii.String("endpointType"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html

Deprecated: moved to package aws-apigatewayv2.

type CfnDomainName_EndpointConfigurationProperty

type CfnDomainName_EndpointConfigurationProperty struct {
	// A list of endpoint types of an API or its custom domain name.
	//
	// For an edge-optimized API and its custom domain name, the endpoint type is `EDGE` . For a regional API and its custom domain name, the endpoint type is `REGIONAL` .
	Types *[]*string `field:"optional" json:"types" yaml:"types"`
}

The `EndpointConfiguration` property type specifies the endpoint types of an Amazon API Gateway domain name.

`EndpointConfiguration` is a property of the [AWS::ApiGateway::DomainName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html) resource.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

endpointConfigurationProperty := &endpointConfigurationProperty{
	types: []*string{
		jsii.String("types"),
	},
}

type CfnDomainName_MutualTlsAuthenticationProperty

type CfnDomainName_MutualTlsAuthenticationProperty struct {
	// An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, `s3:// bucket-name / key-name` .
	//
	// The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.
	TruststoreUri *string `field:"optional" json:"truststoreUri" yaml:"truststoreUri"`
	// The version of the S3 object that contains your truststore.
	//
	// To specify a version, you must have versioning enabled for the S3 bucket.
	TruststoreVersion *string `field:"optional" json:"truststoreVersion" yaml:"truststoreVersion"`
}

If specified, API Gateway performs two-way authentication between the client and the server.

Clients must present a trusted certificate to access your API.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

mutualTlsAuthenticationProperty := &mutualTlsAuthenticationProperty{
	truststoreUri: jsii.String("truststoreUri"),
	truststoreVersion: jsii.String("truststoreVersion"),
}

type CfnGatewayResponse

type CfnGatewayResponse interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The ID for the gateway response.
	//
	// For example: `abc123` .
	AttrId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The response parameters (paths, query strings, and headers) for the response.
	//
	// Duplicates not allowed.
	ResponseParameters() interface{}
	SetResponseParameters(val interface{})
	// The response templates for the response.
	//
	// Duplicates not allowed.
	ResponseTemplates() interface{}
	SetResponseTemplates(val interface{})
	// The response type.
	//
	// For valid values, see [GatewayResponse](https://docs.aws.amazon.com/apigateway/api-reference/resource/gateway-response/) in the *API Gateway API Reference* .
	ResponseType() *string
	SetResponseType(val *string)
	// The identifier of the API.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The HTTP status code for the response.
	StatusCode() *string
	SetStatusCode(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::GatewayResponse`.

The `AWS::ApiGateway::GatewayResponse` resource creates a gateway response for your API. For more information, see [API Gateway Responses](https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html#api-gateway-gatewayResponse-definition) in the *API Gateway Developer Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnGatewayResponse := awscdk.Aws_apigateway.NewCfnGatewayResponse(this, jsii.String("MyCfnGatewayResponse"), &cfnGatewayResponseProps{
	responseType: jsii.String("responseType"),
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	responseParameters: map[string]*string{
		"responseParametersKey": jsii.String("responseParameters"),
	},
	responseTemplates: map[string]*string{
		"responseTemplatesKey": jsii.String("responseTemplates"),
	},
	statusCode: jsii.String("statusCode"),
})

func NewCfnGatewayResponse

func NewCfnGatewayResponse(scope awscdk.Construct, id *string, props *CfnGatewayResponseProps) CfnGatewayResponse

Create a new `AWS::ApiGateway::GatewayResponse`.

type CfnGatewayResponseProps

type CfnGatewayResponseProps struct {
	// The response type.
	//
	// For valid values, see [GatewayResponse](https://docs.aws.amazon.com/apigateway/api-reference/resource/gateway-response/) in the *API Gateway API Reference* .
	ResponseType *string `field:"required" json:"responseType" yaml:"responseType"`
	// The identifier of the API.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
	// The response parameters (paths, query strings, and headers) for the response.
	//
	// Duplicates not allowed.
	ResponseParameters interface{} `field:"optional" json:"responseParameters" yaml:"responseParameters"`
	// The response templates for the response.
	//
	// Duplicates not allowed.
	ResponseTemplates interface{} `field:"optional" json:"responseTemplates" yaml:"responseTemplates"`
	// The HTTP status code for the response.
	StatusCode *string `field:"optional" json:"statusCode" yaml:"statusCode"`
}

Properties for defining a `CfnGatewayResponse`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnGatewayResponseProps := &cfnGatewayResponseProps{
	responseType: jsii.String("responseType"),
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	responseParameters: map[string]*string{
		"responseParametersKey": jsii.String("responseParameters"),
	},
	responseTemplates: map[string]*string{
		"responseTemplatesKey": jsii.String("responseTemplates"),
	},
	statusCode: jsii.String("statusCode"),
}

type CfnIntegrationResponseV2 deprecated

type CfnIntegrationResponseV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::IntegrationResponse.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiId(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// `AWS::ApiGatewayV2::IntegrationResponse.ContentHandlingStrategy`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-contenthandlingstrategy
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ContentHandlingStrategy() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetContentHandlingStrategy(val *string)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// `AWS::ApiGatewayV2::IntegrationResponse.IntegrationId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-integrationid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetIntegrationId(val *string)
	// `AWS::ApiGatewayV2::IntegrationResponse.IntegrationResponseKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-integrationresponsekey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationResponseKey() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetIntegrationResponseKey(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// `AWS::ApiGatewayV2::IntegrationResponse.ResponseParameters`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-responseparameters
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ResponseParameters() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetResponseParameters(val interface{})
	// `AWS::ApiGatewayV2::IntegrationResponse.ResponseTemplates`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-responsetemplates
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ResponseTemplates() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetResponseTemplates(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// `AWS::ApiGatewayV2::IntegrationResponse.TemplateSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-templateselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	TemplateSelectionExpression() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetTemplateSelectionExpression(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::IntegrationResponse`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var responseParameters interface{}
var responseTemplates interface{}

cfnIntegrationResponseV2 := awscdk.Aws_apigateway.NewCfnIntegrationResponseV2(this, jsii.String("MyCfnIntegrationResponseV2"), &cfnIntegrationResponseV2Props{
	apiId: jsii.String("apiId"),
	integrationId: jsii.String("integrationId"),
	integrationResponseKey: jsii.String("integrationResponseKey"),

	// the properties below are optional
	contentHandlingStrategy: jsii.String("contentHandlingStrategy"),
	responseParameters: responseParameters,
	responseTemplates: responseTemplates,
	templateSelectionExpression: jsii.String("templateSelectionExpression"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnIntegrationResponseV2

func NewCfnIntegrationResponseV2(scope awscdk.Construct, id *string, props *CfnIntegrationResponseV2Props) CfnIntegrationResponseV2

Create a new `AWS::ApiGatewayV2::IntegrationResponse`. Deprecated: moved to package aws-apigatewayv2.

type CfnIntegrationResponseV2Props deprecated

type CfnIntegrationResponseV2Props struct {
	// `AWS::ApiGatewayV2::IntegrationResponse.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId *string `field:"required" json:"apiId" yaml:"apiId"`
	// `AWS::ApiGatewayV2::IntegrationResponse.IntegrationId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-integrationid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationId *string `field:"required" json:"integrationId" yaml:"integrationId"`
	// `AWS::ApiGatewayV2::IntegrationResponse.IntegrationResponseKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-integrationresponsekey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationResponseKey *string `field:"required" json:"integrationResponseKey" yaml:"integrationResponseKey"`
	// `AWS::ApiGatewayV2::IntegrationResponse.ContentHandlingStrategy`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-contenthandlingstrategy
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ContentHandlingStrategy *string `field:"optional" json:"contentHandlingStrategy" yaml:"contentHandlingStrategy"`
	// `AWS::ApiGatewayV2::IntegrationResponse.ResponseParameters`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-responseparameters
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ResponseParameters interface{} `field:"optional" json:"responseParameters" yaml:"responseParameters"`
	// `AWS::ApiGatewayV2::IntegrationResponse.ResponseTemplates`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-responsetemplates
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ResponseTemplates interface{} `field:"optional" json:"responseTemplates" yaml:"responseTemplates"`
	// `AWS::ApiGatewayV2::IntegrationResponse.TemplateSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html#cfn-apigatewayv2-integrationresponse-templateselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	TemplateSelectionExpression *string `field:"optional" json:"templateSelectionExpression" yaml:"templateSelectionExpression"`
}

Properties for defining a `AWS::ApiGatewayV2::IntegrationResponse`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var responseParameters interface{}
var responseTemplates interface{}

cfnIntegrationResponseV2Props := &cfnIntegrationResponseV2Props{
	apiId: jsii.String("apiId"),
	integrationId: jsii.String("integrationId"),
	integrationResponseKey: jsii.String("integrationResponseKey"),

	// the properties below are optional
	contentHandlingStrategy: jsii.String("contentHandlingStrategy"),
	responseParameters: responseParameters,
	responseTemplates: responseTemplates,
	templateSelectionExpression: jsii.String("templateSelectionExpression"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integrationresponse.html

Deprecated: moved to package aws-apigatewayv2.

type CfnIntegrationV2 deprecated

type CfnIntegrationV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::Integration.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiId(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// `AWS::ApiGatewayV2::Integration.ConnectionType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-connectiontype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ConnectionType() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetConnectionType(val *string)
	// `AWS::ApiGatewayV2::Integration.ContentHandlingStrategy`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-contenthandlingstrategy
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ContentHandlingStrategy() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetContentHandlingStrategy(val *string)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// `AWS::ApiGatewayV2::Integration.CredentialsArn`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-credentialsarn
	//
	// Deprecated: moved to package aws-apigatewayv2.
	CredentialsArn() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetCredentialsArn(val *string)
	// `AWS::ApiGatewayV2::Integration.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetDescription(val *string)
	// `AWS::ApiGatewayV2::Integration.IntegrationMethod`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-integrationmethod
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationMethod() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetIntegrationMethod(val *string)
	// `AWS::ApiGatewayV2::Integration.IntegrationType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-integrationtype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationType() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetIntegrationType(val *string)
	// `AWS::ApiGatewayV2::Integration.IntegrationUri`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-integrationuri
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationUri() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetIntegrationUri(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// `AWS::ApiGatewayV2::Integration.PassthroughBehavior`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-passthroughbehavior
	//
	// Deprecated: moved to package aws-apigatewayv2.
	PassthroughBehavior() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetPassthroughBehavior(val *string)
	// `AWS::ApiGatewayV2::Integration.PayloadFormatVersion`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-payloadformatversion
	//
	// Deprecated: moved to package aws-apigatewayv2.
	PayloadFormatVersion() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetPayloadFormatVersion(val *string)
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// `AWS::ApiGatewayV2::Integration.RequestParameters`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-requestparameters
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RequestParameters() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetRequestParameters(val interface{})
	// `AWS::ApiGatewayV2::Integration.RequestTemplates`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-requesttemplates
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RequestTemplates() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetRequestTemplates(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// `AWS::ApiGatewayV2::Integration.TemplateSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-templateselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	TemplateSelectionExpression() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetTemplateSelectionExpression(val *string)
	// `AWS::ApiGatewayV2::Integration.TimeoutInMillis`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-timeoutinmillis
	//
	// Deprecated: moved to package aws-apigatewayv2.
	TimeoutInMillis() *float64
	// Deprecated: moved to package aws-apigatewayv2.
	SetTimeoutInMillis(val *float64)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::Integration`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var requestParameters interface{}
var requestTemplates interface{}

cfnIntegrationV2 := awscdk.Aws_apigateway.NewCfnIntegrationV2(this, jsii.String("MyCfnIntegrationV2"), &cfnIntegrationV2Props{
	apiId: jsii.String("apiId"),
	integrationType: jsii.String("integrationType"),

	// the properties below are optional
	connectionType: jsii.String("connectionType"),
	contentHandlingStrategy: jsii.String("contentHandlingStrategy"),
	credentialsArn: jsii.String("credentialsArn"),
	description: jsii.String("description"),
	integrationMethod: jsii.String("integrationMethod"),
	integrationUri: jsii.String("integrationUri"),
	passthroughBehavior: jsii.String("passthroughBehavior"),
	payloadFormatVersion: jsii.String("payloadFormatVersion"),
	requestParameters: requestParameters,
	requestTemplates: requestTemplates,
	templateSelectionExpression: jsii.String("templateSelectionExpression"),
	timeoutInMillis: jsii.Number(123),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnIntegrationV2

func NewCfnIntegrationV2(scope awscdk.Construct, id *string, props *CfnIntegrationV2Props) CfnIntegrationV2

Create a new `AWS::ApiGatewayV2::Integration`. Deprecated: moved to package aws-apigatewayv2.

type CfnIntegrationV2Props deprecated

type CfnIntegrationV2Props struct {
	// `AWS::ApiGatewayV2::Integration.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId *string `field:"required" json:"apiId" yaml:"apiId"`
	// `AWS::ApiGatewayV2::Integration.IntegrationType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-integrationtype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationType *string `field:"required" json:"integrationType" yaml:"integrationType"`
	// `AWS::ApiGatewayV2::Integration.ConnectionType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-connectiontype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ConnectionType *string `field:"optional" json:"connectionType" yaml:"connectionType"`
	// `AWS::ApiGatewayV2::Integration.ContentHandlingStrategy`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-contenthandlingstrategy
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ContentHandlingStrategy *string `field:"optional" json:"contentHandlingStrategy" yaml:"contentHandlingStrategy"`
	// `AWS::ApiGatewayV2::Integration.CredentialsArn`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-credentialsarn
	//
	// Deprecated: moved to package aws-apigatewayv2.
	CredentialsArn *string `field:"optional" json:"credentialsArn" yaml:"credentialsArn"`
	// `AWS::ApiGatewayV2::Integration.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// `AWS::ApiGatewayV2::Integration.IntegrationMethod`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-integrationmethod
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationMethod *string `field:"optional" json:"integrationMethod" yaml:"integrationMethod"`
	// `AWS::ApiGatewayV2::Integration.IntegrationUri`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-integrationuri
	//
	// Deprecated: moved to package aws-apigatewayv2.
	IntegrationUri *string `field:"optional" json:"integrationUri" yaml:"integrationUri"`
	// `AWS::ApiGatewayV2::Integration.PassthroughBehavior`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-passthroughbehavior
	//
	// Deprecated: moved to package aws-apigatewayv2.
	PassthroughBehavior *string `field:"optional" json:"passthroughBehavior" yaml:"passthroughBehavior"`
	// `AWS::ApiGatewayV2::Integration.PayloadFormatVersion`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-payloadformatversion
	//
	// Deprecated: moved to package aws-apigatewayv2.
	PayloadFormatVersion *string `field:"optional" json:"payloadFormatVersion" yaml:"payloadFormatVersion"`
	// `AWS::ApiGatewayV2::Integration.RequestParameters`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-requestparameters
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RequestParameters interface{} `field:"optional" json:"requestParameters" yaml:"requestParameters"`
	// `AWS::ApiGatewayV2::Integration.RequestTemplates`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-requesttemplates
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RequestTemplates interface{} `field:"optional" json:"requestTemplates" yaml:"requestTemplates"`
	// `AWS::ApiGatewayV2::Integration.TemplateSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-templateselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	TemplateSelectionExpression *string `field:"optional" json:"templateSelectionExpression" yaml:"templateSelectionExpression"`
	// `AWS::ApiGatewayV2::Integration.TimeoutInMillis`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-timeoutinmillis
	//
	// Deprecated: moved to package aws-apigatewayv2.
	TimeoutInMillis *float64 `field:"optional" json:"timeoutInMillis" yaml:"timeoutInMillis"`
}

Properties for defining a `AWS::ApiGatewayV2::Integration`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var requestParameters interface{}
var requestTemplates interface{}

cfnIntegrationV2Props := &cfnIntegrationV2Props{
	apiId: jsii.String("apiId"),
	integrationType: jsii.String("integrationType"),

	// the properties below are optional
	connectionType: jsii.String("connectionType"),
	contentHandlingStrategy: jsii.String("contentHandlingStrategy"),
	credentialsArn: jsii.String("credentialsArn"),
	description: jsii.String("description"),
	integrationMethod: jsii.String("integrationMethod"),
	integrationUri: jsii.String("integrationUri"),
	passthroughBehavior: jsii.String("passthroughBehavior"),
	payloadFormatVersion: jsii.String("payloadFormatVersion"),
	requestParameters: requestParameters,
	requestTemplates: requestTemplates,
	templateSelectionExpression: jsii.String("templateSelectionExpression"),
	timeoutInMillis: jsii.Number(123),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html

Deprecated: moved to package aws-apigatewayv2.

type CfnMethod

type CfnMethod interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Indicates whether the method requires clients to submit a valid API key.
	ApiKeyRequired() interface{}
	SetApiKeyRequired(val interface{})
	// A list of authorization scopes configured on the method.
	//
	// The scopes are used with a `COGNITO_USER_POOLS` authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes match a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
	AuthorizationScopes() *[]*string
	SetAuthorizationScopes(val *[]*string)
	// The method's authorization type.
	//
	// This parameter is required. For valid values, see [Method](https://docs.aws.amazon.com/apigateway/api-reference/resource/method/) in the *API Gateway API Reference* .
	//
	// > If you specify the `AuthorizerId` property, specify `CUSTOM` or `COGNITO_USER_POOLS` for this property.
	AuthorizationType() *string
	SetAuthorizationType(val *string)
	// The identifier of the [authorizer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html) to use on this method. If you specify this property, specify `CUSTOM` or `COGNITO_USER_POOLS` for the `AuthorizationType` property.
	AuthorizerId() *string
	SetAuthorizerId(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The HTTP method that clients use to call this method.
	HttpMethod() *string
	SetHttpMethod(val *string)
	// The backend system that the method calls when it receives a request.
	Integration() interface{}
	SetIntegration(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The responses that can be sent to the client who calls the method.
	MethodResponses() interface{}
	SetMethodResponses(val interface{})
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// A friendly operation name for the method.
	//
	// For example, you can assign the `OperationName` of `ListPets` for the `GET /pets` method.
	OperationName() *string
	SetOperationName(val *string)
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The resources that are used for the request's content type.
	//
	// Specify request models as key-value pairs (string-to-string mapping), with a content type as the key and a `Model` resource name as the value. To use the same model regardless of the content type, specify `$default` as the key.
	RequestModels() interface{}
	SetRequestModels(val interface{})
	// The request parameters that API Gateway accepts.
	//
	// Specify request parameters as key-value pairs (string-to-Boolean mapping), with a source as the key and a Boolean as the value. The Boolean specifies whether a parameter is required. A source must match the format `method.request. *location* . *name*` , where the location is querystring, path, or header, and *name* is a valid, unique parameter name.
	RequestParameters() interface{}
	SetRequestParameters(val interface{})
	// The ID of the associated request validator.
	RequestValidatorId() *string
	SetRequestValidatorId(val *string)
	// The ID of an API Gateway [resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-resource.html) . For root resource methods, specify the `RestApi` root resource ID, such as `{ "Fn::GetAtt": ["MyRestApi", "RootResourceId"] }` .
	ResourceId() *string
	SetResourceId(val *string)
	// The ID of the [RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource in which API Gateway creates the method.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::Method`.

The `AWS::ApiGateway::Method` resource creates API Gateway methods that define the parameters and body that clients must send in their requests.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnMethod := awscdk.Aws_apigateway.NewCfnMethod(this, jsii.String("MyCfnMethod"), &cfnMethodProps{
	httpMethod: jsii.String("httpMethod"),
	resourceId: jsii.String("resourceId"),
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	apiKeyRequired: jsii.Boolean(false),
	authorizationScopes: []*string{
		jsii.String("authorizationScopes"),
	},
	authorizationType: jsii.String("authorizationType"),
	authorizerId: jsii.String("authorizerId"),
	integration: &integrationProperty{
		cacheKeyParameters: []*string{
			jsii.String("cacheKeyParameters"),
		},
		cacheNamespace: jsii.String("cacheNamespace"),
		connectionId: jsii.String("connectionId"),
		connectionType: jsii.String("connectionType"),
		contentHandling: jsii.String("contentHandling"),
		credentials: jsii.String("credentials"),
		integrationHttpMethod: jsii.String("integrationHttpMethod"),
		integrationResponses: []interface{}{
			&integrationResponseProperty{
				statusCode: jsii.String("statusCode"),

				// the properties below are optional
				contentHandling: jsii.String("contentHandling"),
				responseParameters: map[string]*string{
					"responseParametersKey": jsii.String("responseParameters"),
				},
				responseTemplates: map[string]*string{
					"responseTemplatesKey": jsii.String("responseTemplates"),
				},
				selectionPattern: jsii.String("selectionPattern"),
			},
		},
		passthroughBehavior: jsii.String("passthroughBehavior"),
		requestParameters: map[string]*string{
			"requestParametersKey": jsii.String("requestParameters"),
		},
		requestTemplates: map[string]*string{
			"requestTemplatesKey": jsii.String("requestTemplates"),
		},
		timeoutInMillis: jsii.Number(123),
		type: jsii.String("type"),
		uri: jsii.String("uri"),
	},
	methodResponses: []interface{}{
		&methodResponseProperty{
			statusCode: jsii.String("statusCode"),

			// the properties below are optional
			responseModels: map[string]*string{
				"responseModelsKey": jsii.String("responseModels"),
			},
			responseParameters: map[string]interface{}{
				"responseParametersKey": jsii.Boolean(false),
			},
		},
	},
	operationName: jsii.String("operationName"),
	requestModels: map[string]*string{
		"requestModelsKey": jsii.String("requestModels"),
	},
	requestParameters: map[string]interface{}{
		"requestParametersKey": jsii.Boolean(false),
	},
	requestValidatorId: jsii.String("requestValidatorId"),
})

func NewCfnMethod

func NewCfnMethod(scope awscdk.Construct, id *string, props *CfnMethodProps) CfnMethod

Create a new `AWS::ApiGateway::Method`.

type CfnMethodProps

type CfnMethodProps struct {
	// The HTTP method that clients use to call this method.
	HttpMethod *string `field:"required" json:"httpMethod" yaml:"httpMethod"`
	// The ID of an API Gateway [resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-resource.html) . For root resource methods, specify the `RestApi` root resource ID, such as `{ "Fn::GetAtt": ["MyRestApi", "RootResourceId"] }` .
	ResourceId *string `field:"required" json:"resourceId" yaml:"resourceId"`
	// The ID of the [RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource in which API Gateway creates the method.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
	// Indicates whether the method requires clients to submit a valid API key.
	ApiKeyRequired interface{} `field:"optional" json:"apiKeyRequired" yaml:"apiKeyRequired"`
	// A list of authorization scopes configured on the method.
	//
	// The scopes are used with a `COGNITO_USER_POOLS` authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes match a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
	AuthorizationScopes *[]*string `field:"optional" json:"authorizationScopes" yaml:"authorizationScopes"`
	// The method's authorization type.
	//
	// This parameter is required. For valid values, see [Method](https://docs.aws.amazon.com/apigateway/api-reference/resource/method/) in the *API Gateway API Reference* .
	//
	// > If you specify the `AuthorizerId` property, specify `CUSTOM` or `COGNITO_USER_POOLS` for this property.
	AuthorizationType *string `field:"optional" json:"authorizationType" yaml:"authorizationType"`
	// The identifier of the [authorizer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html) to use on this method. If you specify this property, specify `CUSTOM` or `COGNITO_USER_POOLS` for the `AuthorizationType` property.
	AuthorizerId *string `field:"optional" json:"authorizerId" yaml:"authorizerId"`
	// The backend system that the method calls when it receives a request.
	Integration interface{} `field:"optional" json:"integration" yaml:"integration"`
	// The responses that can be sent to the client who calls the method.
	MethodResponses interface{} `field:"optional" json:"methodResponses" yaml:"methodResponses"`
	// A friendly operation name for the method.
	//
	// For example, you can assign the `OperationName` of `ListPets` for the `GET /pets` method.
	OperationName *string `field:"optional" json:"operationName" yaml:"operationName"`
	// The resources that are used for the request's content type.
	//
	// Specify request models as key-value pairs (string-to-string mapping), with a content type as the key and a `Model` resource name as the value. To use the same model regardless of the content type, specify `$default` as the key.
	RequestModels interface{} `field:"optional" json:"requestModels" yaml:"requestModels"`
	// The request parameters that API Gateway accepts.
	//
	// Specify request parameters as key-value pairs (string-to-Boolean mapping), with a source as the key and a Boolean as the value. The Boolean specifies whether a parameter is required. A source must match the format `method.request. *location* . *name*` , where the location is querystring, path, or header, and *name* is a valid, unique parameter name.
	RequestParameters interface{} `field:"optional" json:"requestParameters" yaml:"requestParameters"`
	// The ID of the associated request validator.
	RequestValidatorId *string `field:"optional" json:"requestValidatorId" yaml:"requestValidatorId"`
}

Properties for defining a `CfnMethod`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnMethodProps := &cfnMethodProps{
	httpMethod: jsii.String("httpMethod"),
	resourceId: jsii.String("resourceId"),
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	apiKeyRequired: jsii.Boolean(false),
	authorizationScopes: []*string{
		jsii.String("authorizationScopes"),
	},
	authorizationType: jsii.String("authorizationType"),
	authorizerId: jsii.String("authorizerId"),
	integration: &integrationProperty{
		cacheKeyParameters: []*string{
			jsii.String("cacheKeyParameters"),
		},
		cacheNamespace: jsii.String("cacheNamespace"),
		connectionId: jsii.String("connectionId"),
		connectionType: jsii.String("connectionType"),
		contentHandling: jsii.String("contentHandling"),
		credentials: jsii.String("credentials"),
		integrationHttpMethod: jsii.String("integrationHttpMethod"),
		integrationResponses: []interface{}{
			&integrationResponseProperty{
				statusCode: jsii.String("statusCode"),

				// the properties below are optional
				contentHandling: jsii.String("contentHandling"),
				responseParameters: map[string]*string{
					"responseParametersKey": jsii.String("responseParameters"),
				},
				responseTemplates: map[string]*string{
					"responseTemplatesKey": jsii.String("responseTemplates"),
				},
				selectionPattern: jsii.String("selectionPattern"),
			},
		},
		passthroughBehavior: jsii.String("passthroughBehavior"),
		requestParameters: map[string]*string{
			"requestParametersKey": jsii.String("requestParameters"),
		},
		requestTemplates: map[string]*string{
			"requestTemplatesKey": jsii.String("requestTemplates"),
		},
		timeoutInMillis: jsii.Number(123),
		type: jsii.String("type"),
		uri: jsii.String("uri"),
	},
	methodResponses: []interface{}{
		&methodResponseProperty{
			statusCode: jsii.String("statusCode"),

			// the properties below are optional
			responseModels: map[string]*string{
				"responseModelsKey": jsii.String("responseModels"),
			},
			responseParameters: map[string]interface{}{
				"responseParametersKey": jsii.Boolean(false),
			},
		},
	},
	operationName: jsii.String("operationName"),
	requestModels: map[string]*string{
		"requestModelsKey": jsii.String("requestModels"),
	},
	requestParameters: map[string]interface{}{
		"requestParametersKey": jsii.Boolean(false),
	},
	requestValidatorId: jsii.String("requestValidatorId"),
}

type CfnMethod_IntegrationProperty

type CfnMethod_IntegrationProperty struct {
	// A list of request parameters whose values API Gateway caches.
	//
	// For cases where the integration type allows for RequestParameters to be set, these parameters must also be specified in [RequestParameters](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-requestparameters) to be supported in `CacheKeyParameters` .
	CacheKeyParameters *[]*string `field:"optional" json:"cacheKeyParameters" yaml:"cacheKeyParameters"`
	// An API-specific tag group of related cached parameters.
	CacheNamespace *string `field:"optional" json:"cacheNamespace" yaml:"cacheNamespace"`
	// The ID of the `VpcLink` used for the integration when `connectionType=VPC_LINK` , otherwise undefined.
	ConnectionId *string `field:"optional" json:"connectionId" yaml:"connectionId"`
	// The type of the network connection to the integration endpoint.
	//
	// The valid value is `INTERNET` for connections through the public routable internet or `VPC_LINK` for private connections between API Gateway and a network load balancer in a VPC. The default value is `INTERNET` .
	ConnectionType *string `field:"optional" json:"connectionType" yaml:"connectionType"`
	// Specifies how to handle request payload content type conversions. Valid values are:.
	//
	// - `CONVERT_TO_BINARY` : Converts a request payload from a base64-encoded string to a binary blob.
	// - `CONVERT_TO_TEXT` : Converts a request payload from a binary blob to a base64-encoded string.
	//
	// If this property isn't defined, the request payload is passed through from the method request to the integration request without modification, provided that the `PassthroughBehaviors` property is configured to support payload pass-through.
	ContentHandling *string `field:"optional" json:"contentHandling" yaml:"contentHandling"`
	// The credentials that are required for the integration.
	//
	// To specify an AWS Identity and Access Management (IAM) role that API Gateway assumes, specify the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam::*:user/*.
	//
	// To use resource-based permissions on the AWS Lambda (Lambda) function, don't specify this property. Use the [AWS::Lambda::Permission](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html) resource to permit API Gateway to call the function. For more information, see [Allow Amazon API Gateway to Invoke a Lambda Function](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#access-control-resource-based-example-apigateway-invoke-function) in the *AWS Lambda Developer Guide* .
	Credentials *string `field:"optional" json:"credentials" yaml:"credentials"`
	// The integration's HTTP method type.
	//
	// For the `Type` property, if you specify `MOCK` , this property is optional. For all other types, you must specify this property.
	IntegrationHttpMethod *string `field:"optional" json:"integrationHttpMethod" yaml:"integrationHttpMethod"`
	// The response that API Gateway provides after a method's backend completes processing a request.
	//
	// API Gateway intercepts the response from the backend so that you can control how API Gateway surfaces backend responses. For example, you can map the backend status codes to codes that you define.
	IntegrationResponses interface{} `field:"optional" json:"integrationResponses" yaml:"integrationResponses"`
	// Indicates when API Gateway passes requests to the targeted backend.
	//
	// This behavior depends on the request's `Content-Type` header and whether you defined a mapping template for it.
	//
	// For more information and valid values, see the [passthroughBehavior](https://docs.aws.amazon.com/apigateway/api-reference/link-relation/integration-put/#passthroughBehavior) field in the *API Gateway API Reference* .
	PassthroughBehavior *string `field:"optional" json:"passthroughBehavior" yaml:"passthroughBehavior"`
	// The request parameters that API Gateway sends with the backend request.
	//
	// Specify request parameters as key-value pairs (string-to-string mappings), with a destination as the key and a source as the value.
	//
	// Specify the destination by using the following pattern `integration.request. *location* . *name*` , where *location* is query string, path, or header, and *name* is a valid, unique parameter name.
	//
	// The source must be an existing method request parameter or a static value. You must enclose static values in single quotation marks and pre-encode these values based on their destination in the request.
	RequestParameters interface{} `field:"optional" json:"requestParameters" yaml:"requestParameters"`
	// A map of Apache Velocity templates that are applied on the request payload.
	//
	// The template that API Gateway uses is based on the value of the `Content-Type` header that's sent by the client. The content type value is the key, and the template is the value (specified as a string), such as the following snippet:
	//
	// `"application/json": "{\n \"statusCode\": 200\n}"`
	//
	// For more information about templates, see [API Gateway Mapping Template and Access Logging Variable Reference](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html) in the *API Gateway Developer Guide* .
	RequestTemplates interface{} `field:"optional" json:"requestTemplates" yaml:"requestTemplates"`
	// Custom timeout between 50 and 29,000 milliseconds.
	//
	// The default value is 29,000 milliseconds or 29 seconds.
	TimeoutInMillis *float64 `field:"optional" json:"timeoutInMillis" yaml:"timeoutInMillis"`
	// The type of backend that your method is running, such as `HTTP` or `MOCK` .
	//
	// For all of the valid values, see the [type](https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/#type) property for the `Integration` resource in the *Amazon API Gateway REST API Reference* .
	Type *string `field:"optional" json:"type" yaml:"type"`
	// The Uniform Resource Identifier (URI) for the integration.
	//
	// If you specify `HTTP` for the `Type` property, specify the API endpoint URL.
	//
	// If you specify `MOCK` for the `Type` property, don't specify this property.
	//
	// If you specify `AWS` for the `Type` property, specify an AWS service that follows this form: arn:aws:apigateway: *region* : *subdomain* . *service|service* : *path|action* / *service_api* . For example, a Lambda function URI follows this form: arn:aws:apigateway: *region* :lambda:path/ *path* . The path is usually in the form /2015-03-31/functions/ *LambdaFunctionARN* /invocations. For more information, see the `uri` property of the [Integration](https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/) resource in the Amazon API Gateway REST API Reference.
	//
	// If you specified `HTTP` or `AWS` for the `Type` property, you must specify this property.
	Uri *string `field:"optional" json:"uri" yaml:"uri"`
}

`Integration` is a property of the [AWS::ApiGateway::Method](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html) resource that specifies information about the target backend that a method calls.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

integrationProperty := &integrationProperty{
	cacheKeyParameters: []*string{
		jsii.String("cacheKeyParameters"),
	},
	cacheNamespace: jsii.String("cacheNamespace"),
	connectionId: jsii.String("connectionId"),
	connectionType: jsii.String("connectionType"),
	contentHandling: jsii.String("contentHandling"),
	credentials: jsii.String("credentials"),
	integrationHttpMethod: jsii.String("integrationHttpMethod"),
	integrationResponses: []interface{}{
		&integrationResponseProperty{
			statusCode: jsii.String("statusCode"),

			// the properties below are optional
			contentHandling: jsii.String("contentHandling"),
			responseParameters: map[string]*string{
				"responseParametersKey": jsii.String("responseParameters"),
			},
			responseTemplates: map[string]*string{
				"responseTemplatesKey": jsii.String("responseTemplates"),
			},
			selectionPattern: jsii.String("selectionPattern"),
		},
	},
	passthroughBehavior: jsii.String("passthroughBehavior"),
	requestParameters: map[string]*string{
		"requestParametersKey": jsii.String("requestParameters"),
	},
	requestTemplates: map[string]*string{
		"requestTemplatesKey": jsii.String("requestTemplates"),
	},
	timeoutInMillis: jsii.Number(123),
	type: jsii.String("type"),
	uri: jsii.String("uri"),
}

type CfnMethod_IntegrationResponseProperty

type CfnMethod_IntegrationResponseProperty struct {
	// The status code that API Gateway uses to map the integration response to a [MethodResponse](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-method-methodresponse.html) status code.
	StatusCode *string `field:"required" json:"statusCode" yaml:"statusCode"`
	// Specifies how to handle request payload content type conversions. Valid values are:.
	//
	// - `CONVERT_TO_BINARY` : Converts a request payload from a base64-encoded string to a binary blob.
	// - `CONVERT_TO_TEXT` : Converts a request payload from a binary blob to a base64-encoded string.
	//
	// If this property isn't defined, the request payload is passed through from the method request to the integration request without modification.
	ContentHandling *string `field:"optional" json:"contentHandling" yaml:"contentHandling"`
	// The response parameters from the backend response that API Gateway sends to the method response.
	//
	// Specify response parameters as key-value pairs ( [string-to-string mappings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html) ).
	//
	// Use the destination as the key and the source as the value:
	//
	// - The destination must be an existing response parameter in the [MethodResponse](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-method-methodresponse.html) property.
	// - The source must be an existing method request parameter or a static value. You must enclose static values in single quotation marks and pre-encode these values based on the destination specified in the request.
	//
	// For more information about templates, see [API Gateway Mapping Template and Access Logging Variable Reference](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html) in the *API Gateway Developer Guide* .
	ResponseParameters interface{} `field:"optional" json:"responseParameters" yaml:"responseParameters"`
	// The templates that are used to transform the integration response body.
	//
	// Specify templates as key-value pairs (string-to-string mappings), with a content type as the key and a template as the value. For more information, see [API Gateway Mapping Template and Access Logging Variable Reference](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html) in the *API Gateway Developer Guide* .
	ResponseTemplates interface{} `field:"optional" json:"responseTemplates" yaml:"responseTemplates"`
	// A [regular expression](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-regexes.html) that specifies which error strings or status codes from the backend map to the integration response.
	SelectionPattern *string `field:"optional" json:"selectionPattern" yaml:"selectionPattern"`
}

`IntegrationResponse` is a property of the [Amazon API Gateway Method Integration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-method-integration.html) property type that specifies the response that API Gateway sends after a method's backend finishes processing a request.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

integrationResponseProperty := &integrationResponseProperty{
	statusCode: jsii.String("statusCode"),

	// the properties below are optional
	contentHandling: jsii.String("contentHandling"),
	responseParameters: map[string]*string{
		"responseParametersKey": jsii.String("responseParameters"),
	},
	responseTemplates: map[string]*string{
		"responseTemplatesKey": jsii.String("responseTemplates"),
	},
	selectionPattern: jsii.String("selectionPattern"),
}

type CfnMethod_MethodResponseProperty

type CfnMethod_MethodResponseProperty struct {
	// The method response's status code, which you map to an [IntegrationResponse](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-method-integration-integrationresponse.html) .
	StatusCode *string `field:"required" json:"statusCode" yaml:"statusCode"`
	// The resources used for the response's content type.
	//
	// Specify response models as key-value pairs (string-to-string maps), with a content type as the key and a [Model](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html) resource name as the value.
	ResponseModels interface{} `field:"optional" json:"responseModels" yaml:"responseModels"`
	// Response parameters that API Gateway sends to the client that called a method.
	//
	// Specify response parameters as key-value pairs (string-to-Boolean maps), with a destination as the key and a Boolean as the value. Specify the destination using the following pattern: `method.response.header. *name*` , where *name* is a valid, unique header name. The Boolean specifies whether a parameter is required.
	ResponseParameters interface{} `field:"optional" json:"responseParameters" yaml:"responseParameters"`
}

`MethodResponse` is a property of the [AWS::ApiGateway::Method](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html) resource that defines the responses that can be sent to the client that calls a method.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

methodResponseProperty := &methodResponseProperty{
	statusCode: jsii.String("statusCode"),

	// the properties below are optional
	responseModels: map[string]*string{
		"responseModelsKey": jsii.String("responseModels"),
	},
	responseParameters: map[string]interface{}{
		"responseParametersKey": jsii.Boolean(false),
	},
}

type CfnModel

type CfnModel interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// The content type for the model.
	ContentType() *string
	SetContentType(val *string)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// A description that identifies this model.
	Description() *string
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// A name for the model.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the model name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .
	//
	// > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
	Name() *string
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The ID of a REST API with which to associate this model.
	RestApiId() *string
	SetRestApiId(val *string)
	// The schema to use to transform data to one or more output formats.
	//
	// Specify null ( `{}` ) if you don't want to specify a schema.
	Schema() interface{}
	SetSchema(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::Model`.

The `AWS::ApiGateway::Model` resource defines the structure of a request or response payload for an API method.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var schema interface{}

cfnModel := awscdk.Aws_apigateway.NewCfnModel(this, jsii.String("MyCfnModel"), &cfnModelProps{
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	contentType: jsii.String("contentType"),
	description: jsii.String("description"),
	name: jsii.String("name"),
	schema: schema,
})

func NewCfnModel

func NewCfnModel(scope awscdk.Construct, id *string, props *CfnModelProps) CfnModel

Create a new `AWS::ApiGateway::Model`.

type CfnModelProps

type CfnModelProps struct {
	// The ID of a REST API with which to associate this model.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
	// The content type for the model.
	ContentType *string `field:"optional" json:"contentType" yaml:"contentType"`
	// A description that identifies this model.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// A name for the model.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the model name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .
	//
	// > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The schema to use to transform data to one or more output formats.
	//
	// Specify null ( `{}` ) if you don't want to specify a schema.
	Schema interface{} `field:"optional" json:"schema" yaml:"schema"`
}

Properties for defining a `CfnModel`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var schema interface{}

cfnModelProps := &cfnModelProps{
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	contentType: jsii.String("contentType"),
	description: jsii.String("description"),
	name: jsii.String("name"),
	schema: schema,
}

type CfnModelV2 deprecated

type CfnModelV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::Model.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiId(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// `AWS::ApiGatewayV2::Model.ContentType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-contenttype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ContentType() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetContentType(val *string)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// `AWS::ApiGatewayV2::Model.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// `AWS::ApiGatewayV2::Model.Name`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-name
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Name() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// `AWS::ApiGatewayV2::Model.Schema`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-schema
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Schema() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetSchema(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::Model`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var schema interface{}

cfnModelV2 := awscdk.Aws_apigateway.NewCfnModelV2(this, jsii.String("MyCfnModelV2"), &cfnModelV2Props{
	apiId: jsii.String("apiId"),
	name: jsii.String("name"),
	schema: schema,

	// the properties below are optional
	contentType: jsii.String("contentType"),
	description: jsii.String("description"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnModelV2

func NewCfnModelV2(scope awscdk.Construct, id *string, props *CfnModelV2Props) CfnModelV2

Create a new `AWS::ApiGatewayV2::Model`. Deprecated: moved to package aws-apigatewayv2.

type CfnModelV2Props deprecated

type CfnModelV2Props struct {
	// `AWS::ApiGatewayV2::Model.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId *string `field:"required" json:"apiId" yaml:"apiId"`
	// `AWS::ApiGatewayV2::Model.Name`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-name
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Name *string `field:"required" json:"name" yaml:"name"`
	// `AWS::ApiGatewayV2::Model.Schema`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-schema
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Schema interface{} `field:"required" json:"schema" yaml:"schema"`
	// `AWS::ApiGatewayV2::Model.ContentType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-contenttype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ContentType *string `field:"optional" json:"contentType" yaml:"contentType"`
	// `AWS::ApiGatewayV2::Model.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html#cfn-apigatewayv2-model-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description *string `field:"optional" json:"description" yaml:"description"`
}

Properties for defining a `AWS::ApiGatewayV2::Model`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var schema interface{}

cfnModelV2Props := &cfnModelV2Props{
	apiId: jsii.String("apiId"),
	name: jsii.String("name"),
	schema: schema,

	// the properties below are optional
	contentType: jsii.String("contentType"),
	description: jsii.String("description"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-model.html

Deprecated: moved to package aws-apigatewayv2.

type CfnRequestValidator

type CfnRequestValidator interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The ID for the request validator.
	//
	// For example: `abc123` .
	AttrRequestValidatorId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The name of this request validator.
	Name() *string
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The identifier of the targeted API entity.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Indicates whether to validate the request body according to the configured schema for the targeted API and method.
	ValidateRequestBody() interface{}
	SetValidateRequestBody(val interface{})
	// Indicates whether to validate request parameters.
	ValidateRequestParameters() interface{}
	SetValidateRequestParameters(val interface{})
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::RequestValidator`.

The `AWS::ApiGateway::RequestValidator` resource sets up basic validation rules for incoming requests to your API. For more information, see [Enable Basic Request Validation for an API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) in the *API Gateway Developer Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnRequestValidator := awscdk.Aws_apigateway.NewCfnRequestValidator(this, jsii.String("MyCfnRequestValidator"), &cfnRequestValidatorProps{
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	name: jsii.String("name"),
	validateRequestBody: jsii.Boolean(false),
	validateRequestParameters: jsii.Boolean(false),
})

func NewCfnRequestValidator

func NewCfnRequestValidator(scope awscdk.Construct, id *string, props *CfnRequestValidatorProps) CfnRequestValidator

Create a new `AWS::ApiGateway::RequestValidator`.

type CfnRequestValidatorProps

type CfnRequestValidatorProps struct {
	// The identifier of the targeted API entity.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
	// The name of this request validator.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// Indicates whether to validate the request body according to the configured schema for the targeted API and method.
	ValidateRequestBody interface{} `field:"optional" json:"validateRequestBody" yaml:"validateRequestBody"`
	// Indicates whether to validate request parameters.
	ValidateRequestParameters interface{} `field:"optional" json:"validateRequestParameters" yaml:"validateRequestParameters"`
}

Properties for defining a `CfnRequestValidator`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnRequestValidatorProps := &cfnRequestValidatorProps{
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	name: jsii.String("name"),
	validateRequestBody: jsii.Boolean(false),
	validateRequestParameters: jsii.Boolean(false),
}

type CfnResource

type CfnResource interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The ID for the resource.
	//
	// For example: `abc123` .
	AttrResourceId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// If you want to create a child resource, the ID of the parent resource.
	//
	// For resources without a parent, specify the `RestApi` root resource ID, such as `{ "Fn::GetAtt": ["MyRestApi", "RootResourceId"] }` .
	ParentId() *string
	SetParentId(val *string)
	// A path name for the resource.
	PathPart() *string
	SetPathPart(val *string)
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The ID of the [RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource in which you want to create this resource.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::Resource`.

The `AWS::ApiGateway::Resource` resource creates a resource in an API.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnResource := awscdk.Aws_apigateway.NewCfnResource(this, jsii.String("MyCfnResource"), &cfnResourceProps{
	parentId: jsii.String("parentId"),
	pathPart: jsii.String("pathPart"),
	restApiId: jsii.String("restApiId"),
})

func NewCfnResource

func NewCfnResource(scope awscdk.Construct, id *string, props *CfnResourceProps) CfnResource

Create a new `AWS::ApiGateway::Resource`.

type CfnResourceProps

type CfnResourceProps struct {
	// If you want to create a child resource, the ID of the parent resource.
	//
	// For resources without a parent, specify the `RestApi` root resource ID, such as `{ "Fn::GetAtt": ["MyRestApi", "RootResourceId"] }` .
	ParentId *string `field:"required" json:"parentId" yaml:"parentId"`
	// A path name for the resource.
	PathPart *string `field:"required" json:"pathPart" yaml:"pathPart"`
	// The ID of the [RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource in which you want to create this resource.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
}

Properties for defining a `CfnResource`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnResourceProps := &cfnResourceProps{
	parentId: jsii.String("parentId"),
	pathPart: jsii.String("pathPart"),
	restApiId: jsii.String("restApiId"),
}

type CfnRestApi

type CfnRestApi interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The source of the API key for metering requests according to a usage plan. Valid values are:.
	//
	// - `HEADER` to read the API key from the `X-API-Key` header of a request.
	// - `AUTHORIZER` to read the API key from the `UsageIdentifierKey` from a Lambda authorizer.
	ApiKeySourceType() *string
	SetApiKeySourceType(val *string)
	// The root resource ID for a `RestApi` resource, such as `a0bc123d4e` .
	AttrRootResourceId() *string
	// The list of binary media types that are supported by the `RestApi` resource.
	//
	// Use `~1` instead of `/` in the media types, for example `image~1png` or `application~1octet-stream` . By default, `RestApi` supports only UTF-8-encoded text payloads. Duplicates are not allowed. For more information, see [Enable Support for Binary Payloads in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings.html) in the *API Gateway Developer Guide* .
	BinaryMediaTypes() *[]*string
	SetBinaryMediaTypes(val *[]*string)
	// An OpenAPI specification that defines a set of RESTful APIs in JSON format.
	//
	// For YAML templates, you can also provide the specification in YAML format.
	Body() interface{}
	SetBody(val interface{})
	// The Amazon Simple Storage Service (Amazon S3) location that points to an OpenAPI file, which defines a set of RESTful APIs in JSON or YAML format.
	BodyS3Location() interface{}
	SetBodyS3Location(val interface{})
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// The ID of the `RestApi` resource that you want to clone.
	CloneFrom() *string
	SetCloneFrom(val *string)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// A description of the `RestApi` resource.
	Description() *string
	SetDescription(val *string)
	// Specifies whether clients can invoke your API by using the default `execute-api` endpoint.
	//
	// By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.
	DisableExecuteApiEndpoint() interface{}
	SetDisableExecuteApiEndpoint(val interface{})
	// A list of the endpoint types of the API.
	//
	// Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the `Parameters` property.
	EndpointConfiguration() interface{}
	SetEndpointConfiguration(val interface{})
	// Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the `RestApi` resource.
	FailOnWarnings() interface{}
	SetFailOnWarnings(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API.
	//
	// When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
	MinimumCompressionSize() *float64
	SetMinimumCompressionSize(val *float64)
	// This property applies only when you use OpenAPI to define your REST API.
	//
	// The `Mode` determines how API Gateway handles resource updates.
	//
	// Valid values are `overwrite` or `merge` .
	//
	// For `overwrite` , the new API definition replaces the existing one. The existing API identifier remains unchanged.
	//
	// For `merge` , the new API definition takes precedence, but any container types such as endpoint configurations and binary media types are merged with the existing API. Use `merge` to define top-level `RestApi` properties in addition to using OpenAPI. Generally, it's preferred to use API Gateway's OpenAPI extensions to model these properties.
	//
	// If you don't specify this property, a default value is chosen. For REST APIs created before March 29, 2021, the default is `overwrite` . Otherwise, the default value is `merge` .
	Mode() *string
	SetMode(val *string)
	// A name for the `RestApi` resource.
	Name() *string
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Custom header parameters for the request.
	Parameters() interface{}
	SetParameters(val interface{})
	// A policy document that contains the permissions for the `RestApi` resource.
	//
	// To set the ARN for the policy, use the `!Join` intrinsic function with `""` as delimiter and values of `"execute-api:/"` and `"*"` .
	Policy() interface{}
	SetPolicy(val interface{})
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// An array of arbitrary tags (key-value pairs) to associate with the API.
	Tags() awscdk.TagManager
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::RestApi`.

The `AWS::ApiGateway::RestApi` resource creates a REST API. For more information, see [restapi:create](https://docs.aws.amazon.com/apigateway/api-reference/link-relation/restapi-create/) in the *Amazon API Gateway REST API Reference* .

> On January 1, 2016, the Swagger Specification was donated to the [OpenAPI initiative](https://docs.aws.amazon.com/https://www.openapis.org/) , becoming the foundation of the OpenAPI Specification.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var body interface{}
var policy interface{}

cfnRestApi := awscdk.Aws_apigateway.NewCfnRestApi(this, jsii.String("MyCfnRestApi"), &cfnRestApiProps{
	apiKeySourceType: jsii.String("apiKeySourceType"),
	binaryMediaTypes: []*string{
		jsii.String("binaryMediaTypes"),
	},
	body: body,
	bodyS3Location: &s3LocationProperty{
		bucket: jsii.String("bucket"),
		eTag: jsii.String("eTag"),
		key: jsii.String("key"),
		version: jsii.String("version"),
	},
	cloneFrom: jsii.String("cloneFrom"),
	description: jsii.String("description"),
	disableExecuteApiEndpoint: jsii.Boolean(false),
	endpointConfiguration: &endpointConfigurationProperty{
		types: []*string{
			jsii.String("types"),
		},
		vpcEndpointIds: []*string{
			jsii.String("vpcEndpointIds"),
		},
	},
	failOnWarnings: jsii.Boolean(false),
	minimumCompressionSize: jsii.Number(123),
	mode: jsii.String("mode"),
	name: jsii.String("name"),
	parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	policy: policy,
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
})

func NewCfnRestApi

func NewCfnRestApi(scope awscdk.Construct, id *string, props *CfnRestApiProps) CfnRestApi

Create a new `AWS::ApiGateway::RestApi`.

type CfnRestApiProps

type CfnRestApiProps struct {
	// The source of the API key for metering requests according to a usage plan. Valid values are:.
	//
	// - `HEADER` to read the API key from the `X-API-Key` header of a request.
	// - `AUTHORIZER` to read the API key from the `UsageIdentifierKey` from a Lambda authorizer.
	ApiKeySourceType *string `field:"optional" json:"apiKeySourceType" yaml:"apiKeySourceType"`
	// The list of binary media types that are supported by the `RestApi` resource.
	//
	// Use `~1` instead of `/` in the media types, for example `image~1png` or `application~1octet-stream` . By default, `RestApi` supports only UTF-8-encoded text payloads. Duplicates are not allowed. For more information, see [Enable Support for Binary Payloads in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings.html) in the *API Gateway Developer Guide* .
	BinaryMediaTypes *[]*string `field:"optional" json:"binaryMediaTypes" yaml:"binaryMediaTypes"`
	// An OpenAPI specification that defines a set of RESTful APIs in JSON format.
	//
	// For YAML templates, you can also provide the specification in YAML format.
	Body interface{} `field:"optional" json:"body" yaml:"body"`
	// The Amazon Simple Storage Service (Amazon S3) location that points to an OpenAPI file, which defines a set of RESTful APIs in JSON or YAML format.
	BodyS3Location interface{} `field:"optional" json:"bodyS3Location" yaml:"bodyS3Location"`
	// The ID of the `RestApi` resource that you want to clone.
	CloneFrom *string `field:"optional" json:"cloneFrom" yaml:"cloneFrom"`
	// A description of the `RestApi` resource.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Specifies whether clients can invoke your API by using the default `execute-api` endpoint.
	//
	// By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.
	DisableExecuteApiEndpoint interface{} `field:"optional" json:"disableExecuteApiEndpoint" yaml:"disableExecuteApiEndpoint"`
	// A list of the endpoint types of the API.
	//
	// Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the `Parameters` property.
	EndpointConfiguration interface{} `field:"optional" json:"endpointConfiguration" yaml:"endpointConfiguration"`
	// Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the `RestApi` resource.
	FailOnWarnings interface{} `field:"optional" json:"failOnWarnings" yaml:"failOnWarnings"`
	// A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API.
	//
	// When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
	MinimumCompressionSize *float64 `field:"optional" json:"minimumCompressionSize" yaml:"minimumCompressionSize"`
	// This property applies only when you use OpenAPI to define your REST API.
	//
	// The `Mode` determines how API Gateway handles resource updates.
	//
	// Valid values are `overwrite` or `merge` .
	//
	// For `overwrite` , the new API definition replaces the existing one. The existing API identifier remains unchanged.
	//
	// For `merge` , the new API definition takes precedence, but any container types such as endpoint configurations and binary media types are merged with the existing API. Use `merge` to define top-level `RestApi` properties in addition to using OpenAPI. Generally, it's preferred to use API Gateway's OpenAPI extensions to model these properties.
	//
	// If you don't specify this property, a default value is chosen. For REST APIs created before March 29, 2021, the default is `overwrite` . Otherwise, the default value is `merge` .
	Mode *string `field:"optional" json:"mode" yaml:"mode"`
	// A name for the `RestApi` resource.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// Custom header parameters for the request.
	Parameters interface{} `field:"optional" json:"parameters" yaml:"parameters"`
	// A policy document that contains the permissions for the `RestApi` resource.
	//
	// To set the ARN for the policy, use the `!Join` intrinsic function with `""` as delimiter and values of `"execute-api:/"` and `"*"` .
	Policy interface{} `field:"optional" json:"policy" yaml:"policy"`
	// An array of arbitrary tags (key-value pairs) to associate with the API.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `CfnRestApi`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var body interface{}
var policy interface{}

cfnRestApiProps := &cfnRestApiProps{
	apiKeySourceType: jsii.String("apiKeySourceType"),
	binaryMediaTypes: []*string{
		jsii.String("binaryMediaTypes"),
	},
	body: body,
	bodyS3Location: &s3LocationProperty{
		bucket: jsii.String("bucket"),
		eTag: jsii.String("eTag"),
		key: jsii.String("key"),
		version: jsii.String("version"),
	},
	cloneFrom: jsii.String("cloneFrom"),
	description: jsii.String("description"),
	disableExecuteApiEndpoint: jsii.Boolean(false),
	endpointConfiguration: &endpointConfigurationProperty{
		types: []*string{
			jsii.String("types"),
		},
		vpcEndpointIds: []*string{
			jsii.String("vpcEndpointIds"),
		},
	},
	failOnWarnings: jsii.Boolean(false),
	minimumCompressionSize: jsii.Number(123),
	mode: jsii.String("mode"),
	name: jsii.String("name"),
	parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	policy: policy,
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
}

type CfnRestApi_EndpointConfigurationProperty

type CfnRestApi_EndpointConfigurationProperty struct {
	// A list of endpoint types of an API or its custom domain name. Valid values include:.
	//
	// - `EDGE` : For an edge-optimized API and its custom domain name.
	// - `REGIONAL` : For a regional API and its custom domain name.
	// - `PRIVATE` : For a private API.
	Types *[]*string `field:"optional" json:"types" yaml:"types"`
	// A list of VPC endpoint IDs of an API ( [AWS::ApiGateway::RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) ) against which to create Route53 ALIASes. It is only supported for `PRIVATE` endpoint type.
	VpcEndpointIds *[]*string `field:"optional" json:"vpcEndpointIds" yaml:"vpcEndpointIds"`
}

The `EndpointConfiguration` property type specifies the endpoint types of a REST API.

`EndpointConfiguration` is a property of the [AWS::ApiGateway::RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

endpointConfigurationProperty := &endpointConfigurationProperty{
	types: []*string{
		jsii.String("types"),
	},
	vpcEndpointIds: []*string{
		jsii.String("vpcEndpointIds"),
	},
}

type CfnRestApi_S3LocationProperty

type CfnRestApi_S3LocationProperty struct {
	// The name of the S3 bucket where the OpenAPI file is stored.
	Bucket *string `field:"optional" json:"bucket" yaml:"bucket"`
	// The Amazon S3 ETag (a file checksum) of the OpenAPI file.
	//
	// If you don't specify a value, API Gateway skips ETag validation of your OpenAPI file.
	ETag *string `field:"optional" json:"eTag" yaml:"eTag"`
	// The file name of the OpenAPI file (Amazon S3 object name).
	Key *string `field:"optional" json:"key" yaml:"key"`
	// For versioning-enabled buckets, a specific version of the OpenAPI file.
	Version *string `field:"optional" json:"version" yaml:"version"`
}

`S3Location` is a property of the [AWS::ApiGateway::RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource that specifies the Amazon S3 location of a OpenAPI (formerly Swagger) file that defines a set of RESTful APIs in JSON or YAML.

> On January 1, 2016, the Swagger Specification was donated to the [OpenAPI initiative](https://docs.aws.amazon.com/https://www.openapis.org/) , becoming the foundation of the OpenAPI Specification.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

s3LocationProperty := &s3LocationProperty{
	bucket: jsii.String("bucket"),
	eTag: jsii.String("eTag"),
	key: jsii.String("key"),
	version: jsii.String("version"),
}

type CfnRouteResponseV2 deprecated

type CfnRouteResponseV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::RouteResponse.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiId(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// `AWS::ApiGatewayV2::RouteResponse.ModelSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-modelselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ModelSelectionExpression() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetModelSelectionExpression(val *string)
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// `AWS::ApiGatewayV2::RouteResponse.ResponseModels`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-responsemodels
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ResponseModels() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetResponseModels(val interface{})
	// `AWS::ApiGatewayV2::RouteResponse.ResponseParameters`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-responseparameters
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ResponseParameters() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetResponseParameters(val interface{})
	// `AWS::ApiGatewayV2::RouteResponse.RouteId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-routeid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetRouteId(val *string)
	// `AWS::ApiGatewayV2::RouteResponse.RouteResponseKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-routeresponsekey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteResponseKey() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetRouteResponseKey(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::RouteResponse`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var responseModels interface{}
var responseParameters interface{}

cfnRouteResponseV2 := awscdk.Aws_apigateway.NewCfnRouteResponseV2(this, jsii.String("MyCfnRouteResponseV2"), &cfnRouteResponseV2Props{
	apiId: jsii.String("apiId"),
	routeId: jsii.String("routeId"),
	routeResponseKey: jsii.String("routeResponseKey"),

	// the properties below are optional
	modelSelectionExpression: jsii.String("modelSelectionExpression"),
	responseModels: responseModels,
	responseParameters: responseParameters,
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnRouteResponseV2

func NewCfnRouteResponseV2(scope awscdk.Construct, id *string, props *CfnRouteResponseV2Props) CfnRouteResponseV2

Create a new `AWS::ApiGatewayV2::RouteResponse`. Deprecated: moved to package aws-apigatewayv2.

type CfnRouteResponseV2Props deprecated

type CfnRouteResponseV2Props struct {
	// `AWS::ApiGatewayV2::RouteResponse.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId *string `field:"required" json:"apiId" yaml:"apiId"`
	// `AWS::ApiGatewayV2::RouteResponse.RouteId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-routeid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteId *string `field:"required" json:"routeId" yaml:"routeId"`
	// `AWS::ApiGatewayV2::RouteResponse.RouteResponseKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-routeresponsekey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteResponseKey *string `field:"required" json:"routeResponseKey" yaml:"routeResponseKey"`
	// `AWS::ApiGatewayV2::RouteResponse.ModelSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-modelselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ModelSelectionExpression *string `field:"optional" json:"modelSelectionExpression" yaml:"modelSelectionExpression"`
	// `AWS::ApiGatewayV2::RouteResponse.ResponseModels`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-responsemodels
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ResponseModels interface{} `field:"optional" json:"responseModels" yaml:"responseModels"`
	// `AWS::ApiGatewayV2::RouteResponse.ResponseParameters`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-responseparameters
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ResponseParameters interface{} `field:"optional" json:"responseParameters" yaml:"responseParameters"`
}

Properties for defining a `AWS::ApiGatewayV2::RouteResponse`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var responseModels interface{}
var responseParameters interface{}

cfnRouteResponseV2Props := &cfnRouteResponseV2Props{
	apiId: jsii.String("apiId"),
	routeId: jsii.String("routeId"),
	routeResponseKey: jsii.String("routeResponseKey"),

	// the properties below are optional
	modelSelectionExpression: jsii.String("modelSelectionExpression"),
	responseModels: responseModels,
	responseParameters: responseParameters,
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html

Deprecated: moved to package aws-apigatewayv2.

type CfnRouteResponseV2_ParameterConstraintsProperty deprecated

type CfnRouteResponseV2_ParameterConstraintsProperty struct {
	// `CfnRouteResponseV2.ParameterConstraintsProperty.Required`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-routeresponse-parameterconstraints.html#cfn-apigatewayv2-routeresponse-parameterconstraints-required
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Required interface{} `field:"required" json:"required" yaml:"required"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

parameterConstraintsProperty := &parameterConstraintsProperty{
	required: jsii.Boolean(false),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-routeresponse-parameterconstraints.html

Deprecated: moved to package aws-apigatewayv2.

type CfnRouteV2 deprecated

type CfnRouteV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::Route.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiId(val *string)
	// `AWS::ApiGatewayV2::Route.ApiKeyRequired`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-apikeyrequired
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiKeyRequired() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiKeyRequired(val interface{})
	// `AWS::ApiGatewayV2::Route.AuthorizationScopes`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-authorizationscopes
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizationScopes() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	SetAuthorizationScopes(val *[]*string)
	// `AWS::ApiGatewayV2::Route.AuthorizationType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-authorizationtype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizationType() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetAuthorizationType(val *string)
	// `AWS::ApiGatewayV2::Route.AuthorizerId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-authorizerid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetAuthorizerId(val *string)
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// `AWS::ApiGatewayV2::Route.ModelSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-modelselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ModelSelectionExpression() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetModelSelectionExpression(val *string)
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// `AWS::ApiGatewayV2::Route.OperationName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-operationname
	//
	// Deprecated: moved to package aws-apigatewayv2.
	OperationName() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetOperationName(val *string)
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// `AWS::ApiGatewayV2::Route.RequestModels`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-requestmodels
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RequestModels() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetRequestModels(val interface{})
	// `AWS::ApiGatewayV2::Route.RequestParameters`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-requestparameters
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RequestParameters() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetRequestParameters(val interface{})
	// `AWS::ApiGatewayV2::Route.RouteKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-routekey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteKey() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetRouteKey(val *string)
	// `AWS::ApiGatewayV2::Route.RouteResponseSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-routeresponseselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteResponseSelectionExpression() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetRouteResponseSelectionExpression(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// `AWS::ApiGatewayV2::Route.Target`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-target
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Target() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetTarget(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::Route`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var requestModels interface{}
var requestParameters interface{}

cfnRouteV2 := awscdk.Aws_apigateway.NewCfnRouteV2(this, jsii.String("MyCfnRouteV2"), &cfnRouteV2Props{
	apiId: jsii.String("apiId"),
	routeKey: jsii.String("routeKey"),

	// the properties below are optional
	apiKeyRequired: jsii.Boolean(false),
	authorizationScopes: []*string{
		jsii.String("authorizationScopes"),
	},
	authorizationType: jsii.String("authorizationType"),
	authorizerId: jsii.String("authorizerId"),
	modelSelectionExpression: jsii.String("modelSelectionExpression"),
	operationName: jsii.String("operationName"),
	requestModels: requestModels,
	requestParameters: requestParameters,
	routeResponseSelectionExpression: jsii.String("routeResponseSelectionExpression"),
	target: jsii.String("target"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnRouteV2

func NewCfnRouteV2(scope awscdk.Construct, id *string, props *CfnRouteV2Props) CfnRouteV2

Create a new `AWS::ApiGatewayV2::Route`. Deprecated: moved to package aws-apigatewayv2.

type CfnRouteV2Props deprecated

type CfnRouteV2Props struct {
	// `AWS::ApiGatewayV2::Route.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId *string `field:"required" json:"apiId" yaml:"apiId"`
	// `AWS::ApiGatewayV2::Route.RouteKey`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-routekey
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteKey *string `field:"required" json:"routeKey" yaml:"routeKey"`
	// `AWS::ApiGatewayV2::Route.ApiKeyRequired`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-apikeyrequired
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiKeyRequired interface{} `field:"optional" json:"apiKeyRequired" yaml:"apiKeyRequired"`
	// `AWS::ApiGatewayV2::Route.AuthorizationScopes`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-authorizationscopes
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizationScopes *[]*string `field:"optional" json:"authorizationScopes" yaml:"authorizationScopes"`
	// `AWS::ApiGatewayV2::Route.AuthorizationType`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-authorizationtype
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizationType *string `field:"optional" json:"authorizationType" yaml:"authorizationType"`
	// `AWS::ApiGatewayV2::Route.AuthorizerId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-authorizerid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AuthorizerId *string `field:"optional" json:"authorizerId" yaml:"authorizerId"`
	// `AWS::ApiGatewayV2::Route.ModelSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-modelselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ModelSelectionExpression *string `field:"optional" json:"modelSelectionExpression" yaml:"modelSelectionExpression"`
	// `AWS::ApiGatewayV2::Route.OperationName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-operationname
	//
	// Deprecated: moved to package aws-apigatewayv2.
	OperationName *string `field:"optional" json:"operationName" yaml:"operationName"`
	// `AWS::ApiGatewayV2::Route.RequestModels`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-requestmodels
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RequestModels interface{} `field:"optional" json:"requestModels" yaml:"requestModels"`
	// `AWS::ApiGatewayV2::Route.RequestParameters`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-requestparameters
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RequestParameters interface{} `field:"optional" json:"requestParameters" yaml:"requestParameters"`
	// `AWS::ApiGatewayV2::Route.RouteResponseSelectionExpression`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-routeresponseselectionexpression
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteResponseSelectionExpression *string `field:"optional" json:"routeResponseSelectionExpression" yaml:"routeResponseSelectionExpression"`
	// `AWS::ApiGatewayV2::Route.Target`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-target
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Target *string `field:"optional" json:"target" yaml:"target"`
}

Properties for defining a `AWS::ApiGatewayV2::Route`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var requestModels interface{}
var requestParameters interface{}

cfnRouteV2Props := &cfnRouteV2Props{
	apiId: jsii.String("apiId"),
	routeKey: jsii.String("routeKey"),

	// the properties below are optional
	apiKeyRequired: jsii.Boolean(false),
	authorizationScopes: []*string{
		jsii.String("authorizationScopes"),
	},
	authorizationType: jsii.String("authorizationType"),
	authorizerId: jsii.String("authorizerId"),
	modelSelectionExpression: jsii.String("modelSelectionExpression"),
	operationName: jsii.String("operationName"),
	requestModels: requestModels,
	requestParameters: requestParameters,
	routeResponseSelectionExpression: jsii.String("routeResponseSelectionExpression"),
	target: jsii.String("target"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html

Deprecated: moved to package aws-apigatewayv2.

type CfnRouteV2_ParameterConstraintsProperty deprecated

type CfnRouteV2_ParameterConstraintsProperty struct {
	// `CfnRouteV2.ParameterConstraintsProperty.Required`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-route-parameterconstraints.html#cfn-apigatewayv2-route-parameterconstraints-required
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Required interface{} `field:"required" json:"required" yaml:"required"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

parameterConstraintsProperty := &parameterConstraintsProperty{
	required: jsii.Boolean(false),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-route-parameterconstraints.html

Deprecated: moved to package aws-apigatewayv2.

type CfnStage

type CfnStage interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Specifies settings for logging access in this stage.
	AccessLogSetting() interface{}
	SetAccessLogSetting(val interface{})
	// Indicates whether cache clustering is enabled for the stage.
	CacheClusterEnabled() interface{}
	SetCacheClusterEnabled(val interface{})
	// The stage's cache cluster size.
	CacheClusterSize() *string
	SetCacheClusterSize(val *string)
	// Specifies settings for the canary deployment in this stage.
	CanarySetting() interface{}
	SetCanarySetting(val interface{})
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// The ID of the client certificate that API Gateway uses to call your integration endpoints in the stage.
	ClientCertificateId() *string
	SetClientCertificateId(val *string)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The ID of the deployment that the stage is associated with.
	//
	// This parameter is required to create a stage.
	DeploymentId() *string
	SetDeploymentId(val *string)
	// A description of the stage.
	Description() *string
	SetDescription(val *string)
	// The version ID of the API documentation snapshot.
	DocumentationVersion() *string
	SetDocumentationVersion(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// Settings for all methods in the stage.
	MethodSettings() interface{}
	SetMethodSettings(val interface{})
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The ID of the `RestApi` resource that you're deploying with this stage.
	RestApiId() *string
	SetRestApiId(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI).
	StageName() *string
	SetStageName(val *string)
	// An array of arbitrary tags (key-value pairs) to associate with the stage.
	Tags() awscdk.TagManager
	// Specifies whether active X-Ray tracing is enabled for this stage.
	//
	// For more information, see [Trace API Gateway API Execution with AWS X-Ray](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-xray.html) in the *API Gateway Developer Guide* .
	TracingEnabled() interface{}
	SetTracingEnabled(val interface{})
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value.
	//
	// Variable names are limited to alphanumeric characters. Values must match the following regular expression: `[A-Za-z0-9-._~:/?#&=,]+` .
	Variables() interface{}
	SetVariables(val interface{})
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::Stage`.

The `AWS::ApiGateway::Stage` resource creates a stage for a deployment.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnStage := awscdk.Aws_apigateway.NewCfnStage(this, jsii.String("MyCfnStage"), &cfnStageProps{
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	accessLogSetting: &accessLogSettingProperty{
		destinationArn: jsii.String("destinationArn"),
		format: jsii.String("format"),
	},
	cacheClusterEnabled: jsii.Boolean(false),
	cacheClusterSize: jsii.String("cacheClusterSize"),
	canarySetting: &canarySettingProperty{
		deploymentId: jsii.String("deploymentId"),
		percentTraffic: jsii.Number(123),
		stageVariableOverrides: map[string]*string{
			"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
		},
		useStageCache: jsii.Boolean(false),
	},
	clientCertificateId: jsii.String("clientCertificateId"),
	deploymentId: jsii.String("deploymentId"),
	description: jsii.String("description"),
	documentationVersion: jsii.String("documentationVersion"),
	methodSettings: []interface{}{
		&methodSettingProperty{
			cacheDataEncrypted: jsii.Boolean(false),
			cacheTtlInSeconds: jsii.Number(123),
			cachingEnabled: jsii.Boolean(false),
			dataTraceEnabled: jsii.Boolean(false),
			httpMethod: jsii.String("httpMethod"),
			loggingLevel: jsii.String("loggingLevel"),
			metricsEnabled: jsii.Boolean(false),
			resourcePath: jsii.String("resourcePath"),
			throttlingBurstLimit: jsii.Number(123),
			throttlingRateLimit: jsii.Number(123),
		},
	},
	stageName: jsii.String("stageName"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	tracingEnabled: jsii.Boolean(false),
	variables: map[string]*string{
		"variablesKey": jsii.String("variables"),
	},
})

func NewCfnStage

func NewCfnStage(scope awscdk.Construct, id *string, props *CfnStageProps) CfnStage

Create a new `AWS::ApiGateway::Stage`.

type CfnStageProps

type CfnStageProps struct {
	// The ID of the `RestApi` resource that you're deploying with this stage.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
	// Specifies settings for logging access in this stage.
	AccessLogSetting interface{} `field:"optional" json:"accessLogSetting" yaml:"accessLogSetting"`
	// Indicates whether cache clustering is enabled for the stage.
	CacheClusterEnabled interface{} `field:"optional" json:"cacheClusterEnabled" yaml:"cacheClusterEnabled"`
	// The stage's cache cluster size.
	CacheClusterSize *string `field:"optional" json:"cacheClusterSize" yaml:"cacheClusterSize"`
	// Specifies settings for the canary deployment in this stage.
	CanarySetting interface{} `field:"optional" json:"canarySetting" yaml:"canarySetting"`
	// The ID of the client certificate that API Gateway uses to call your integration endpoints in the stage.
	ClientCertificateId *string `field:"optional" json:"clientCertificateId" yaml:"clientCertificateId"`
	// The ID of the deployment that the stage is associated with.
	//
	// This parameter is required to create a stage.
	DeploymentId *string `field:"optional" json:"deploymentId" yaml:"deploymentId"`
	// A description of the stage.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The version ID of the API documentation snapshot.
	DocumentationVersion *string `field:"optional" json:"documentationVersion" yaml:"documentationVersion"`
	// Settings for all methods in the stage.
	MethodSettings interface{} `field:"optional" json:"methodSettings" yaml:"methodSettings"`
	// The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI).
	StageName *string `field:"optional" json:"stageName" yaml:"stageName"`
	// An array of arbitrary tags (key-value pairs) to associate with the stage.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
	// Specifies whether active X-Ray tracing is enabled for this stage.
	//
	// For more information, see [Trace API Gateway API Execution with AWS X-Ray](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-xray.html) in the *API Gateway Developer Guide* .
	TracingEnabled interface{} `field:"optional" json:"tracingEnabled" yaml:"tracingEnabled"`
	// A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value.
	//
	// Variable names are limited to alphanumeric characters. Values must match the following regular expression: `[A-Za-z0-9-._~:/?#&=,]+` .
	Variables interface{} `field:"optional" json:"variables" yaml:"variables"`
}

Properties for defining a `CfnStage`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnStageProps := &cfnStageProps{
	restApiId: jsii.String("restApiId"),

	// the properties below are optional
	accessLogSetting: &accessLogSettingProperty{
		destinationArn: jsii.String("destinationArn"),
		format: jsii.String("format"),
	},
	cacheClusterEnabled: jsii.Boolean(false),
	cacheClusterSize: jsii.String("cacheClusterSize"),
	canarySetting: &canarySettingProperty{
		deploymentId: jsii.String("deploymentId"),
		percentTraffic: jsii.Number(123),
		stageVariableOverrides: map[string]*string{
			"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
		},
		useStageCache: jsii.Boolean(false),
	},
	clientCertificateId: jsii.String("clientCertificateId"),
	deploymentId: jsii.String("deploymentId"),
	description: jsii.String("description"),
	documentationVersion: jsii.String("documentationVersion"),
	methodSettings: []interface{}{
		&methodSettingProperty{
			cacheDataEncrypted: jsii.Boolean(false),
			cacheTtlInSeconds: jsii.Number(123),
			cachingEnabled: jsii.Boolean(false),
			dataTraceEnabled: jsii.Boolean(false),
			httpMethod: jsii.String("httpMethod"),
			loggingLevel: jsii.String("loggingLevel"),
			metricsEnabled: jsii.Boolean(false),
			resourcePath: jsii.String("resourcePath"),
			throttlingBurstLimit: jsii.Number(123),
			throttlingRateLimit: jsii.Number(123),
		},
	},
	stageName: jsii.String("stageName"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	tracingEnabled: jsii.Boolean(false),
	variables: map[string]*string{
		"variablesKey": jsii.String("variables"),
	},
}

type CfnStageV2 deprecated

type CfnStageV2 interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// `AWS::ApiGatewayV2::Stage.AccessLogSettings`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-accesslogsettings
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AccessLogSettings() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetAccessLogSettings(val interface{})
	// `AWS::ApiGatewayV2::Stage.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetApiId(val *string)
	// `AWS::ApiGatewayV2::Stage.AutoDeploy`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-autodeploy
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AutoDeploy() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetAutoDeploy(val interface{})
	// Options for this resource, such as condition, update policy etc.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnOptions() awscdk.ICfnResourceOptions
	// Deprecated: moved to package aws-apigatewayv2.
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Deprecated: moved to package aws-apigatewayv2.
	CfnResourceType() *string
	// `AWS::ApiGatewayV2::Stage.ClientCertificateId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-clientcertificateid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ClientCertificateId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetClientCertificateId(val *string)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Deprecated: moved to package aws-apigatewayv2.
	CreationStack() *[]*string
	// `AWS::ApiGatewayV2::Stage.DefaultRouteSettings`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-defaultroutesettings
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DefaultRouteSettings() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetDefaultRouteSettings(val interface{})
	// `AWS::ApiGatewayV2::Stage.DeploymentId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-deploymentid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DeploymentId() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetDeploymentId(val *string)
	// `AWS::ApiGatewayV2::Stage.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Deprecated: moved to package aws-apigatewayv2.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Deprecated: moved to package aws-apigatewayv2.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Deprecated: moved to package aws-apigatewayv2.
	Ref() *string
	// `AWS::ApiGatewayV2::Stage.RouteSettings`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-routesettings
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteSettings() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetRouteSettings(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Deprecated: moved to package aws-apigatewayv2.
	Stack() awscdk.Stack
	// `AWS::ApiGatewayV2::Stage.StageName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-stagename
	//
	// Deprecated: moved to package aws-apigatewayv2.
	StageName() *string
	// Deprecated: moved to package aws-apigatewayv2.
	SetStageName(val *string)
	// `AWS::ApiGatewayV2::Stage.StageVariables`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-stagevariables
	//
	// Deprecated: moved to package aws-apigatewayv2.
	StageVariables() interface{}
	// Deprecated: moved to package aws-apigatewayv2.
	SetStageVariables(val interface{})
	// `AWS::ApiGatewayV2::Stage.Tags`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-tags
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Tags() awscdk.TagManager
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Deprecated: moved to package aws-apigatewayv2.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Deprecated: moved to package aws-apigatewayv2.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Deprecated: moved to package aws-apigatewayv2.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Deprecated: moved to package aws-apigatewayv2.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Deprecated: moved to package aws-apigatewayv2.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Deprecated: moved to package aws-apigatewayv2.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	// Deprecated: moved to package aws-apigatewayv2.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Deprecated: moved to package aws-apigatewayv2.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: moved to package aws-apigatewayv2.
	Prepare()
	// Deprecated: moved to package aws-apigatewayv2.
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Deprecated: moved to package aws-apigatewayv2.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: moved to package aws-apigatewayv2.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Deprecated: moved to package aws-apigatewayv2.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: moved to package aws-apigatewayv2.
	Validate() *[]*string
	// Deprecated: moved to package aws-apigatewayv2.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGatewayV2::Stage`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var routeSettings interface{}
var stageVariables interface{}
var tags interface{}

cfnStageV2 := awscdk.Aws_apigateway.NewCfnStageV2(this, jsii.String("MyCfnStageV2"), &cfnStageV2Props{
	apiId: jsii.String("apiId"),
	stageName: jsii.String("stageName"),

	// the properties below are optional
	accessLogSettings: &accessLogSettingsProperty{
		destinationArn: jsii.String("destinationArn"),
		format: jsii.String("format"),
	},
	autoDeploy: jsii.Boolean(false),
	clientCertificateId: jsii.String("clientCertificateId"),
	defaultRouteSettings: &routeSettingsProperty{
		dataTraceEnabled: jsii.Boolean(false),
		detailedMetricsEnabled: jsii.Boolean(false),
		loggingLevel: jsii.String("loggingLevel"),
		throttlingBurstLimit: jsii.Number(123),
		throttlingRateLimit: jsii.Number(123),
	},
	deploymentId: jsii.String("deploymentId"),
	description: jsii.String("description"),
	routeSettings: routeSettings,
	stageVariables: stageVariables,
	tags: tags,
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html

Deprecated: moved to package aws-apigatewayv2.

func NewCfnStageV2

func NewCfnStageV2(scope awscdk.Construct, id *string, props *CfnStageV2Props) CfnStageV2

Create a new `AWS::ApiGatewayV2::Stage`. Deprecated: moved to package aws-apigatewayv2.

type CfnStageV2Props deprecated

type CfnStageV2Props struct {
	// `AWS::ApiGatewayV2::Stage.ApiId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-apiid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ApiId *string `field:"required" json:"apiId" yaml:"apiId"`
	// `AWS::ApiGatewayV2::Stage.StageName`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-stagename
	//
	// Deprecated: moved to package aws-apigatewayv2.
	StageName *string `field:"required" json:"stageName" yaml:"stageName"`
	// `AWS::ApiGatewayV2::Stage.AccessLogSettings`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-accesslogsettings
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AccessLogSettings interface{} `field:"optional" json:"accessLogSettings" yaml:"accessLogSettings"`
	// `AWS::ApiGatewayV2::Stage.AutoDeploy`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-autodeploy
	//
	// Deprecated: moved to package aws-apigatewayv2.
	AutoDeploy interface{} `field:"optional" json:"autoDeploy" yaml:"autoDeploy"`
	// `AWS::ApiGatewayV2::Stage.ClientCertificateId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-clientcertificateid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ClientCertificateId *string `field:"optional" json:"clientCertificateId" yaml:"clientCertificateId"`
	// `AWS::ApiGatewayV2::Stage.DefaultRouteSettings`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-defaultroutesettings
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DefaultRouteSettings interface{} `field:"optional" json:"defaultRouteSettings" yaml:"defaultRouteSettings"`
	// `AWS::ApiGatewayV2::Stage.DeploymentId`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-deploymentid
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DeploymentId *string `field:"optional" json:"deploymentId" yaml:"deploymentId"`
	// `AWS::ApiGatewayV2::Stage.Description`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-description
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// `AWS::ApiGatewayV2::Stage.RouteSettings`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-routesettings
	//
	// Deprecated: moved to package aws-apigatewayv2.
	RouteSettings interface{} `field:"optional" json:"routeSettings" yaml:"routeSettings"`
	// `AWS::ApiGatewayV2::Stage.StageVariables`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-stagevariables
	//
	// Deprecated: moved to package aws-apigatewayv2.
	StageVariables interface{} `field:"optional" json:"stageVariables" yaml:"stageVariables"`
	// `AWS::ApiGatewayV2::Stage.Tags`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-tags
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Tags interface{} `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `AWS::ApiGatewayV2::Stage`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var routeSettings interface{}
var stageVariables interface{}
var tags interface{}

cfnStageV2Props := &cfnStageV2Props{
	apiId: jsii.String("apiId"),
	stageName: jsii.String("stageName"),

	// the properties below are optional
	accessLogSettings: &accessLogSettingsProperty{
		destinationArn: jsii.String("destinationArn"),
		format: jsii.String("format"),
	},
	autoDeploy: jsii.Boolean(false),
	clientCertificateId: jsii.String("clientCertificateId"),
	defaultRouteSettings: &routeSettingsProperty{
		dataTraceEnabled: jsii.Boolean(false),
		detailedMetricsEnabled: jsii.Boolean(false),
		loggingLevel: jsii.String("loggingLevel"),
		throttlingBurstLimit: jsii.Number(123),
		throttlingRateLimit: jsii.Number(123),
	},
	deploymentId: jsii.String("deploymentId"),
	description: jsii.String("description"),
	routeSettings: routeSettings,
	stageVariables: stageVariables,
	tags: tags,
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html

Deprecated: moved to package aws-apigatewayv2.

type CfnStageV2_AccessLogSettingsProperty deprecated

type CfnStageV2_AccessLogSettingsProperty struct {
	// `CfnStageV2.AccessLogSettingsProperty.DestinationArn`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html#cfn-apigatewayv2-stage-accesslogsettings-destinationarn
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DestinationArn *string `field:"optional" json:"destinationArn" yaml:"destinationArn"`
	// `CfnStageV2.AccessLogSettingsProperty.Format`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html#cfn-apigatewayv2-stage-accesslogsettings-format
	//
	// Deprecated: moved to package aws-apigatewayv2.
	Format *string `field:"optional" json:"format" yaml:"format"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

accessLogSettingsProperty := &accessLogSettingsProperty{
	destinationArn: jsii.String("destinationArn"),
	format: jsii.String("format"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html

Deprecated: moved to package aws-apigatewayv2.

type CfnStageV2_RouteSettingsProperty deprecated

type CfnStageV2_RouteSettingsProperty struct {
	// `CfnStageV2.RouteSettingsProperty.DataTraceEnabled`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-datatraceenabled
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DataTraceEnabled interface{} `field:"optional" json:"dataTraceEnabled" yaml:"dataTraceEnabled"`
	// `CfnStageV2.RouteSettingsProperty.DetailedMetricsEnabled`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-detailedmetricsenabled
	//
	// Deprecated: moved to package aws-apigatewayv2.
	DetailedMetricsEnabled interface{} `field:"optional" json:"detailedMetricsEnabled" yaml:"detailedMetricsEnabled"`
	// `CfnStageV2.RouteSettingsProperty.LoggingLevel`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-logginglevel
	//
	// Deprecated: moved to package aws-apigatewayv2.
	LoggingLevel *string `field:"optional" json:"loggingLevel" yaml:"loggingLevel"`
	// `CfnStageV2.RouteSettingsProperty.ThrottlingBurstLimit`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-throttlingburstlimit
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ThrottlingBurstLimit *float64 `field:"optional" json:"throttlingBurstLimit" yaml:"throttlingBurstLimit"`
	// `CfnStageV2.RouteSettingsProperty.ThrottlingRateLimit`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-throttlingratelimit
	//
	// Deprecated: moved to package aws-apigatewayv2.
	ThrottlingRateLimit *float64 `field:"optional" json:"throttlingRateLimit" yaml:"throttlingRateLimit"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

routeSettingsProperty := &routeSettingsProperty{
	dataTraceEnabled: jsii.Boolean(false),
	detailedMetricsEnabled: jsii.Boolean(false),
	loggingLevel: jsii.String("loggingLevel"),
	throttlingBurstLimit: jsii.Number(123),
	throttlingRateLimit: jsii.Number(123),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html

Deprecated: moved to package aws-apigatewayv2.

type CfnStage_AccessLogSettingProperty

type CfnStage_AccessLogSettingProperty struct {
	// The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs.
	//
	// If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with `amazon-apigateway-` . This parameter is required to enable access logging.
	DestinationArn *string `field:"optional" json:"destinationArn" yaml:"destinationArn"`
	// A single line format of the access logs of data, as specified by selected [$context variables](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference) . The format must include at least `$context.requestId` . This parameter is required to enable access logging.
	Format *string `field:"optional" json:"format" yaml:"format"`
}

The `AccessLogSetting` property type specifies settings for logging access in this stage.

`AccessLogSetting` is a property of the [AWS::ApiGateway::Stage](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html) resource.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

accessLogSettingProperty := &accessLogSettingProperty{
	destinationArn: jsii.String("destinationArn"),
	format: jsii.String("format"),
}

type CfnStage_CanarySettingProperty

type CfnStage_CanarySettingProperty struct {
	// The identifier of the deployment that the stage points to.
	DeploymentId *string `field:"optional" json:"deploymentId" yaml:"deploymentId"`
	// The percentage (0-100) of traffic diverted to a canary deployment.
	PercentTraffic *float64 `field:"optional" json:"percentTraffic" yaml:"percentTraffic"`
	// Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary.
	//
	// These stage variables are represented as a string-to-string map between stage variable names and their values.
	//
	// Duplicates are not allowed.
	StageVariableOverrides interface{} `field:"optional" json:"stageVariableOverrides" yaml:"stageVariableOverrides"`
	// Whether the canary deployment uses the stage cache or not.
	UseStageCache interface{} `field:"optional" json:"useStageCache" yaml:"useStageCache"`
}

The `CanarySetting` property type specifies settings for the canary deployment in this stage.

`CanarySetting` is a property of the [AWS::ApiGateway::Stage](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html) resource.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

canarySettingProperty := &canarySettingProperty{
	deploymentId: jsii.String("deploymentId"),
	percentTraffic: jsii.Number(123),
	stageVariableOverrides: map[string]*string{
		"stageVariableOverridesKey": jsii.String("stageVariableOverrides"),
	},
	useStageCache: jsii.Boolean(false),
}

type CfnStage_MethodSettingProperty

type CfnStage_MethodSettingProperty struct {
	// Indicates whether the cached responses are encrypted.
	CacheDataEncrypted interface{} `field:"optional" json:"cacheDataEncrypted" yaml:"cacheDataEncrypted"`
	// The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses.
	CacheTtlInSeconds *float64 `field:"optional" json:"cacheTtlInSeconds" yaml:"cacheTtlInSeconds"`
	// Indicates whether responses are cached and returned for requests.
	//
	// You must enable a cache cluster on the stage to cache responses.
	CachingEnabled interface{} `field:"optional" json:"cachingEnabled" yaml:"cachingEnabled"`
	// Indicates whether data trace logging is enabled for methods in the stage.
	//
	// API Gateway pushes these logs to Amazon CloudWatch Logs.
	DataTraceEnabled interface{} `field:"optional" json:"dataTraceEnabled" yaml:"dataTraceEnabled"`
	// The HTTP method.
	//
	// To apply settings to multiple resources and methods, specify an asterisk ( `*` ) for the `HttpMethod` and `/*` for the `ResourcePath` . This parameter is required when you specify a `MethodSetting` .
	HttpMethod *string `field:"optional" json:"httpMethod" yaml:"httpMethod"`
	// The logging level for this method.
	//
	// For valid values, see the `loggingLevel` property of the [Stage](https://docs.aws.amazon.com/apigateway/api-reference/resource/stage/#loggingLevel) resource in the *Amazon API Gateway API Reference* .
	LoggingLevel *string `field:"optional" json:"loggingLevel" yaml:"loggingLevel"`
	// Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.
	MetricsEnabled interface{} `field:"optional" json:"metricsEnabled" yaml:"metricsEnabled"`
	// The resource path for this method.
	//
	// Forward slashes ( `/` ) are encoded as `~1` and the initial slash must include a forward slash. For example, the path value `/resource/subresource` must be encoded as `/~1resource~1subresource` . To specify the root path, use only a slash ( `/` ). To apply settings to multiple resources and methods, specify an asterisk ( `*` ) for the `HttpMethod` and `/*` for the `ResourcePath` . This parameter is required when you specify a `MethodSetting` .
	ResourcePath *string `field:"optional" json:"resourcePath" yaml:"resourcePath"`
	// The number of burst requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account .
	//
	// For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide* .
	ThrottlingBurstLimit *float64 `field:"optional" json:"throttlingBurstLimit" yaml:"throttlingBurstLimit"`
	// The number of steady-state requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account .
	//
	// For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide* .
	ThrottlingRateLimit *float64 `field:"optional" json:"throttlingRateLimit" yaml:"throttlingRateLimit"`
}

The `MethodSetting` property type configures settings for all methods in a stage.

The `MethodSettings` property of the `AWS::ApiGateway::Stage` resource contains a list of `MethodSetting` property types.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

methodSettingProperty := &methodSettingProperty{
	cacheDataEncrypted: jsii.Boolean(false),
	cacheTtlInSeconds: jsii.Number(123),
	cachingEnabled: jsii.Boolean(false),
	dataTraceEnabled: jsii.Boolean(false),
	httpMethod: jsii.String("httpMethod"),
	loggingLevel: jsii.String("loggingLevel"),
	metricsEnabled: jsii.Boolean(false),
	resourcePath: jsii.String("resourcePath"),
	throttlingBurstLimit: jsii.Number(123),
	throttlingRateLimit: jsii.Number(123),
}

type CfnUsagePlan

type CfnUsagePlan interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The API stages to associate with this usage plan.
	ApiStages() interface{}
	SetApiStages(val interface{})
	// The ID for the usage plan.
	//
	// For example: `abc123` .
	AttrId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// A description of the usage plan.
	Description() *string
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Configures the number of requests that users can make within a given interval.
	Quota() interface{}
	SetQuota(val interface{})
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// An array of arbitrary tags (key-value pairs) to associate with the usage plan.
	Tags() awscdk.TagManager
	// Configures the overall request rate (average requests per second) and burst capacity.
	Throttle() interface{}
	SetThrottle(val interface{})
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// A name for the usage plan.
	UsagePlanName() *string
	SetUsagePlanName(val *string)
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::UsagePlan`.

The `AWS::ApiGateway::UsagePlan` resource creates a usage plan for deployed APIs. A usage plan sets a target for the throttling and quota limits on individual client API keys. For more information, see [Creating and Using API Usage Plans in Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) in the *API Gateway Developer Guide* .

In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. Consider using [AWS Budgets](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html) to monitor costs and [AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) to manage API requests.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnUsagePlan := awscdk.Aws_apigateway.NewCfnUsagePlan(this, jsii.String("MyCfnUsagePlan"), &cfnUsagePlanProps{
	apiStages: []interface{}{
		&apiStageProperty{
			apiId: jsii.String("apiId"),
			stage: jsii.String("stage"),
			throttle: map[string]interface{}{
				"throttleKey": &ThrottleSettingsProperty{
					"burstLimit": jsii.Number(123),
					"rateLimit": jsii.Number(123),
				},
			},
		},
	},
	description: jsii.String("description"),
	quota: &quotaSettingsProperty{
		limit: jsii.Number(123),
		offset: jsii.Number(123),
		period: jsii.String("period"),
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	throttle: &throttleSettingsProperty{
		burstLimit: jsii.Number(123),
		rateLimit: jsii.Number(123),
	},
	usagePlanName: jsii.String("usagePlanName"),
})

func NewCfnUsagePlan

func NewCfnUsagePlan(scope awscdk.Construct, id *string, props *CfnUsagePlanProps) CfnUsagePlan

Create a new `AWS::ApiGateway::UsagePlan`.

type CfnUsagePlanKey

type CfnUsagePlanKey interface {
	awscdk.CfnResource
	awscdk.IInspectable
	AttrId() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The ID of the usage plan key.
	KeyId() *string
	SetKeyId(val *string)
	// The type of usage plan key.
	//
	// Currently, the only valid key type is `API_KEY` .
	KeyType() *string
	SetKeyType(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// The ID of the usage plan.
	UsagePlanId() *string
	SetUsagePlanId(val *string)
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::UsagePlanKey`.

The `AWS::ApiGateway::UsagePlanKey` resource associates an API key with a usage plan. This association determines which users the usage plan is applied to.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnUsagePlanKey := awscdk.Aws_apigateway.NewCfnUsagePlanKey(this, jsii.String("MyCfnUsagePlanKey"), &cfnUsagePlanKeyProps{
	keyId: jsii.String("keyId"),
	keyType: jsii.String("keyType"),
	usagePlanId: jsii.String("usagePlanId"),
})

func NewCfnUsagePlanKey

func NewCfnUsagePlanKey(scope awscdk.Construct, id *string, props *CfnUsagePlanKeyProps) CfnUsagePlanKey

Create a new `AWS::ApiGateway::UsagePlanKey`.

type CfnUsagePlanKeyProps

type CfnUsagePlanKeyProps struct {
	// The ID of the usage plan key.
	KeyId *string `field:"required" json:"keyId" yaml:"keyId"`
	// The type of usage plan key.
	//
	// Currently, the only valid key type is `API_KEY` .
	KeyType *string `field:"required" json:"keyType" yaml:"keyType"`
	// The ID of the usage plan.
	UsagePlanId *string `field:"required" json:"usagePlanId" yaml:"usagePlanId"`
}

Properties for defining a `CfnUsagePlanKey`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnUsagePlanKeyProps := &cfnUsagePlanKeyProps{
	keyId: jsii.String("keyId"),
	keyType: jsii.String("keyType"),
	usagePlanId: jsii.String("usagePlanId"),
}

type CfnUsagePlanProps

type CfnUsagePlanProps struct {
	// The API stages to associate with this usage plan.
	ApiStages interface{} `field:"optional" json:"apiStages" yaml:"apiStages"`
	// A description of the usage plan.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Configures the number of requests that users can make within a given interval.
	Quota interface{} `field:"optional" json:"quota" yaml:"quota"`
	// An array of arbitrary tags (key-value pairs) to associate with the usage plan.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
	// Configures the overall request rate (average requests per second) and burst capacity.
	Throttle interface{} `field:"optional" json:"throttle" yaml:"throttle"`
	// A name for the usage plan.
	UsagePlanName *string `field:"optional" json:"usagePlanName" yaml:"usagePlanName"`
}

Properties for defining a `CfnUsagePlan`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnUsagePlanProps := &cfnUsagePlanProps{
	apiStages: []interface{}{
		&apiStageProperty{
			apiId: jsii.String("apiId"),
			stage: jsii.String("stage"),
			throttle: map[string]interface{}{
				"throttleKey": &ThrottleSettingsProperty{
					"burstLimit": jsii.Number(123),
					"rateLimit": jsii.Number(123),
				},
			},
		},
	},
	description: jsii.String("description"),
	quota: &quotaSettingsProperty{
		limit: jsii.Number(123),
		offset: jsii.Number(123),
		period: jsii.String("period"),
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	throttle: &throttleSettingsProperty{
		burstLimit: jsii.Number(123),
		rateLimit: jsii.Number(123),
	},
	usagePlanName: jsii.String("usagePlanName"),
}

type CfnUsagePlan_ApiStageProperty

type CfnUsagePlan_ApiStageProperty struct {
	// The ID of an API that is in the specified `Stage` property that you want to associate with the usage plan.
	ApiId *string `field:"optional" json:"apiId" yaml:"apiId"`
	// The name of the stage to associate with the usage plan.
	Stage *string `field:"optional" json:"stage" yaml:"stage"`
	// Map containing method-level throttling information for an API stage in a usage plan.
	//
	// The key for the map is the path and method for which to configure custom throttling, for example, "/pets/GET".
	//
	// Duplicates are not allowed.
	Throttle interface{} `field:"optional" json:"throttle" yaml:"throttle"`
}

`ApiStage` is a property of the [AWS::ApiGateway::UsagePlan](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html) resource that specifies which stages and APIs to associate with a usage plan.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

apiStageProperty := &apiStageProperty{
	apiId: jsii.String("apiId"),
	stage: jsii.String("stage"),
	throttle: map[string]interface{}{
		"throttleKey": &ThrottleSettingsProperty{
			"burstLimit": jsii.Number(123),
			"rateLimit": jsii.Number(123),
		},
	},
}

type CfnUsagePlan_QuotaSettingsProperty

type CfnUsagePlan_QuotaSettingsProperty struct {
	// The target maximum number of requests that can be made in a given time period.
	Limit *float64 `field:"optional" json:"limit" yaml:"limit"`
	// The day that a time period starts.
	//
	// For example, with a time period of `WEEK` , an offset of `0` starts on Sunday, and an offset of `1` starts on Monday.
	Offset *float64 `field:"optional" json:"offset" yaml:"offset"`
	// The time period for which the target maximum limit of requests applies, such as `DAY` or `WEEK` .
	//
	// For valid values, see the period property for the [UsagePlan](https://docs.aws.amazon.com/apigateway/api-reference/resource/usage-plan) resource in the *Amazon API Gateway REST API Reference* .
	Period *string `field:"optional" json:"period" yaml:"period"`
}

`QuotaSettings` is a property of the [AWS::ApiGateway::UsagePlan](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html) resource that specifies a target for the maximum number of requests users can make to your REST APIs.

In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. Consider using [AWS Budgets](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html) to monitor costs and [AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) to manage API requests.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

quotaSettingsProperty := &quotaSettingsProperty{
	limit: jsii.Number(123),
	offset: jsii.Number(123),
	period: jsii.String("period"),
}

type CfnUsagePlan_ThrottleSettingsProperty

type CfnUsagePlan_ThrottleSettingsProperty struct {
	// The API target request burst rate limit.
	//
	// This allows more requests through for a period of time than the target rate limit. For more information about request throttling, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide* .
	BurstLimit *float64 `field:"optional" json:"burstLimit" yaml:"burstLimit"`
	// The API target request steady-state rate limit.
	//
	// For more information about request throttling, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide* .
	RateLimit *float64 `field:"optional" json:"rateLimit" yaml:"rateLimit"`
}

`ThrottleSettings` is a property of the [AWS::ApiGateway::UsagePlan](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html) resource that specifies the overall request rate (average requests per second) and burst capacity when users call your REST APIs.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

throttleSettingsProperty := &throttleSettingsProperty{
	burstLimit: jsii.Number(123),
	rateLimit: jsii.Number(123),
}
type CfnVpcLink interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// A description of the VPC link.
	Description() *string
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// A name for the VPC link.
	Name() *string
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// An array of arbitrary tags (key-value pairs) to associate with the VPC link.
	Tags() awscdk.TagManager
	// The ARN of network load balancer of the VPC targeted by the VPC link.
	//
	// The network load balancer must be owned by the same AWS account of the API owner.
	TargetArns() *[]*string
	SetTargetArns(val *[]*string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApiGateway::VpcLink`.

The `AWS::ApiGateway::VpcLink` resource creates an API Gateway VPC link for a REST API to access resources in an Amazon Virtual Private Cloud (VPC). For more information, see [vpclink:create](https://docs.aws.amazon.com/apigateway/api-reference/link-relation/vpclink-create/) in the `Amazon API Gateway REST API Reference` .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnVpcLink := awscdk.Aws_apigateway.NewCfnVpcLink(this, jsii.String("MyCfnVpcLink"), &cfnVpcLinkProps{
	name: jsii.String("name"),
	targetArns: []*string{
		jsii.String("targetArns"),
	},

	// the properties below are optional
	description: jsii.String("description"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
})
func NewCfnVpcLink(scope awscdk.Construct, id *string, props *CfnVpcLinkProps) CfnVpcLink

Create a new `AWS::ApiGateway::VpcLink`.

type CfnVpcLinkProps

type CfnVpcLinkProps struct {
	// A name for the VPC link.
	Name *string `field:"required" json:"name" yaml:"name"`
	// The ARN of network load balancer of the VPC targeted by the VPC link.
	//
	// The network load balancer must be owned by the same AWS account of the API owner.
	TargetArns *[]*string `field:"required" json:"targetArns" yaml:"targetArns"`
	// A description of the VPC link.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// An array of arbitrary tags (key-value pairs) to associate with the VPC link.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `CfnVpcLink`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnVpcLinkProps := &cfnVpcLinkProps{
	name: jsii.String("name"),
	targetArns: []*string{
		jsii.String("targetArns"),
	},

	// the properties below are optional
	description: jsii.String("description"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
}

type CognitoUserPoolsAuthorizer

type CognitoUserPoolsAuthorizer interface {
	Authorizer
	IAuthorizer
	// The authorization type of this authorizer.
	// Experimental.
	AuthorizationType() AuthorizationType
	// The ARN of the authorizer to be used in permission policies, such as IAM and resource-based grants.
	// Experimental.
	AuthorizerArn() *string
	// The id of the authorizer.
	// Experimental.
	AuthorizerId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Cognito user pools based custom authorizer.

Example:

var books resource
userPool := cognito.NewUserPool(this, jsii.String("UserPool"))

auth := apigateway.NewCognitoUserPoolsAuthorizer(this, jsii.String("booksAuthorizer"), &cognitoUserPoolsAuthorizerProps{
	cognitoUserPools: []iUserPool{
		userPool,
	},
})
books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
	authorizationType: apigateway.authorizationType_COGNITO,
})

Experimental.

func NewCognitoUserPoolsAuthorizer

func NewCognitoUserPoolsAuthorizer(scope constructs.Construct, id *string, props *CognitoUserPoolsAuthorizerProps) CognitoUserPoolsAuthorizer

Experimental.

type CognitoUserPoolsAuthorizerProps

type CognitoUserPoolsAuthorizerProps struct {
	// The user pools to associate with this authorizer.
	// Experimental.
	CognitoUserPools *[]awscognito.IUserPool `field:"required" json:"cognitoUserPools" yaml:"cognitoUserPools"`
	// An optional human friendly name for the authorizer.
	//
	// Note that, this is not the primary identifier of the authorizer.
	// Experimental.
	AuthorizerName *string `field:"optional" json:"authorizerName" yaml:"authorizerName"`
	// The request header mapping expression for the bearer token.
	//
	// This is typically passed as part of the header, in which case
	// this should be `method.request.header.Authorizer` where Authorizer is the header containing the bearer token.
	// See: https://docs.aws.amazon.com/apigateway/api-reference/link-relation/authorizer-create/#identitySource
	//
	// Experimental.
	IdentitySource *string `field:"optional" json:"identitySource" yaml:"identitySource"`
	// How long APIGateway should cache the results.
	//
	// Max 1 hour.
	// Disable caching by setting this to 0.
	// Experimental.
	ResultsCacheTtl awscdk.Duration `field:"optional" json:"resultsCacheTtl" yaml:"resultsCacheTtl"`
}

Properties for CognitoUserPoolsAuthorizer.

Example:

var books resource
userPool := cognito.NewUserPool(this, jsii.String("UserPool"))

auth := apigateway.NewCognitoUserPoolsAuthorizer(this, jsii.String("booksAuthorizer"), &cognitoUserPoolsAuthorizerProps{
	cognitoUserPools: []iUserPool{
		userPool,
	},
})
books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
	authorizationType: apigateway.authorizationType_COGNITO,
})

Experimental.

type ConnectionType

type ConnectionType string

Example:

import elbv2 "github.com/aws/aws-cdk-go/awscdk"

vpc := ec2.NewVpc(this, jsii.String("VPC"))
nlb := elbv2.NewNetworkLoadBalancer(this, jsii.String("NLB"), &networkLoadBalancerProps{
	vpc: vpc,
})
link := apigateway.NewVpcLink(this, jsii.String("link"), &vpcLinkProps{
	targets: []iNetworkLoadBalancer{
		nlb,
	},
})

integration := apigateway.NewIntegration(&integrationProps{
	type: apigateway.integrationType_HTTP_PROXY,
	options: &integrationOptions{
		connectionType: apigateway.connectionType_VPC_LINK,
		vpcLink: link,
	},
})

Experimental.

const (
	// For connections through the public routable internet.
	// Experimental.
	ConnectionType_INTERNET ConnectionType = "INTERNET"
	// For private connections between API Gateway and a network load balancer in a VPC.
	// Experimental.
	ConnectionType_VPC_LINK ConnectionType = "VPC_LINK"
)

type ContentHandling

type ContentHandling string

Example:

var getBookHandler function
var getBookIntegration lambdaIntegration

getBookIntegration := apigateway.NewLambdaIntegration(getBookHandler, &lambdaIntegrationOptions{
	contentHandling: apigateway.contentHandling_CONVERT_TO_TEXT,
	 // convert to base64
	credentialsPassthrough: jsii.Boolean(true),
})

Experimental.

const (
	// Converts a request payload from a base64-encoded string to a binary blob.
	// Experimental.
	ContentHandling_CONVERT_TO_BINARY ContentHandling = "CONVERT_TO_BINARY"
	// Converts a request payload from a binary blob to a base64-encoded string.
	// Experimental.
	ContentHandling_CONVERT_TO_TEXT ContentHandling = "CONVERT_TO_TEXT"
)

type Cors

type Cors interface {
}

Example:

apigateway.NewRestApi(this, jsii.String("api"), &restApiProps{
	defaultCorsPreflightOptions: &corsOptions{
		allowOrigins: apigateway.cors_ALL_ORIGINS(),
		allowMethods: apigateway.*cors_ALL_METHODS(),
	},
})

Experimental.

type CorsOptions

type CorsOptions struct {
	// Specifies the list of origins that are allowed to make requests to this resource.
	//
	// If you wish to allow all origins, specify `Cors.ALL_ORIGINS` or
	// `[ * ]`.
	//
	// Responses will include the `Access-Control-Allow-Origin` response header.
	// If `Cors.ALL_ORIGINS` is specified, the `Vary: Origin` response header will
	// also be included.
	// See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
	//
	// Experimental.
	AllowOrigins *[]*string `field:"required" json:"allowOrigins" yaml:"allowOrigins"`
	// The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is "include".
	//
	// When a request's credentials mode (Request.credentials) is "include",
	// browsers will only expose the response to frontend JavaScript code if the
	// Access-Control-Allow-Credentials value is true.
	//
	// Credentials are cookies, authorization headers or TLS client certificates.
	// See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
	//
	// Experimental.
	AllowCredentials *bool `field:"optional" json:"allowCredentials" yaml:"allowCredentials"`
	// The Access-Control-Allow-Headers response header is used in response to a preflight request which includes the Access-Control-Request-Headers to indicate which HTTP headers can be used during the actual request.
	// See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
	//
	// Experimental.
	AllowHeaders *[]*string `field:"optional" json:"allowHeaders" yaml:"allowHeaders"`
	// The Access-Control-Allow-Methods response header specifies the method or methods allowed when accessing the resource in response to a preflight request.
	//
	// If `ANY` is specified, it will be expanded to `Cors.ALL_METHODS`.
	// See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods
	//
	// Experimental.
	AllowMethods *[]*string `field:"optional" json:"allowMethods" yaml:"allowMethods"`
	// Sets Access-Control-Max-Age to -1, which means that caching is disabled.
	//
	// This option cannot be used with `maxAge`.
	// Experimental.
	DisableCache *bool `field:"optional" json:"disableCache" yaml:"disableCache"`
	// The Access-Control-Expose-Headers response header indicates which headers can be exposed as part of the response by listing their names.
	//
	// If you want clients to be able to access other headers, you have to list
	// them using the Access-Control-Expose-Headers header.
	// See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers
	//
	// Experimental.
	ExposeHeaders *[]*string `field:"optional" json:"exposeHeaders" yaml:"exposeHeaders"`
	// The Access-Control-Max-Age response header indicates how long the results of a preflight request (that is the information contained in the Access-Control-Allow-Methods and Access-Control-Allow-Headers headers) can be cached.
	//
	// To disable caching altogether use `disableCache: true`.
	// See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age
	//
	// Experimental.
	MaxAge awscdk.Duration `field:"optional" json:"maxAge" yaml:"maxAge"`
	// Specifies the response status code returned from the OPTIONS method.
	// Experimental.
	StatusCode *float64 `field:"optional" json:"statusCode" yaml:"statusCode"`
}

Example:

var myResource resource

myResource.addCorsPreflight(&corsOptions{
	allowOrigins: []*string{
		jsii.String("https://amazon.com"),
	},
	allowMethods: []*string{
		jsii.String("GET"),
		jsii.String("PUT"),
	},
})

Experimental.

type Deployment

type Deployment interface {
	awscdk.Resource
	// Experimental.
	Api() IRestApi
	// Experimental.
	DeploymentId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Adds a component to the hash that determines this Deployment resource's logical ID.
	//
	// This should be called by constructs of the API Gateway model that want to
	// invalidate the deployment when their settings change. The component will
	// be resolve()ed during synthesis so tokens are welcome.
	// Experimental.
	AddToLogicalId(data interface{})
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

A Deployment of a REST API.

An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

Normally, you don't need to define deployments manually. The RestApi construct manages a Deployment resource that represents the latest model. It can be accessed through `restApi.latestDeployment` (unless `deploy: false` is set when defining the `RestApi`).

If you manually define this resource, you will need to know that since deployments are immutable, as long as the resource's logical ID doesn't change, the deployment will represent the snapshot in time in which the resource was created. This means that if you modify the RestApi model (i.e. add methods or resources), these changes will not be reflected unless a new deployment resource is created.

To achieve this behavior, the method `addToLogicalId(data)` can be used to augment the logical ID generated for the deployment resource such that it will include arbitrary data. This is done automatically for the `restApi.latestDeployment` deployment.

Furthermore, since a deployment does not reference any of the REST API resources and methods, CloudFormation will likely provision it before these resources are created, which means that it will represent a "half-baked" model. Use the `node.addDependency(dep)` method to circumvent that. This is done automatically for the `restApi.latestDeployment` deployment.

Example:

// production stage
prdLogGroup := logs.NewLogGroup(this, jsii.String("PrdLogs"))
api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(prdLogGroup),
		accessLogFormat: apigateway.accessLogFormat.jsonWithStandardFields(),
	},
})
deployment := apigateway.NewDeployment(this, jsii.String("Deployment"), &deploymentProps{
	api: api,
})

// development stage
devLogGroup := logs.NewLogGroup(this, jsii.String("DevLogs"))
apigateway.NewStage(this, jsii.String("dev"), &stageProps{
	deployment: deployment,
	accessLogDestination: apigateway.NewLogGroupLogDestination(devLogGroup),
	accessLogFormat: apigateway.*accessLogFormat.jsonWithStandardFields(&jsonWithStandardFieldProps{
		caller: jsii.Boolean(false),
		httpMethod: jsii.Boolean(true),
		ip: jsii.Boolean(true),
		protocol: jsii.Boolean(true),
		requestTime: jsii.Boolean(true),
		resourcePath: jsii.Boolean(true),
		responseLength: jsii.Boolean(true),
		status: jsii.Boolean(true),
		user: jsii.Boolean(true),
	}),
})

Experimental.

func NewDeployment

func NewDeployment(scope constructs.Construct, id *string, props *DeploymentProps) Deployment

Experimental.

type DeploymentProps

type DeploymentProps struct {
	// The Rest API to deploy.
	// Experimental.
	Api IRestApi `field:"required" json:"api" yaml:"api"`
	// A description of the purpose of the API Gateway deployment.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// When an API Gateway model is updated, a new deployment will automatically be created.
	//
	// If this is true, the old API Gateway Deployment resource will not be deleted.
	// This will allow manually reverting back to a previous deployment in case for example.
	// Experimental.
	RetainDeployments *bool `field:"optional" json:"retainDeployments" yaml:"retainDeployments"`
}

Example:

// production stage
prdLogGroup := logs.NewLogGroup(this, jsii.String("PrdLogs"))
api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(prdLogGroup),
		accessLogFormat: apigateway.accessLogFormat.jsonWithStandardFields(),
	},
})
deployment := apigateway.NewDeployment(this, jsii.String("Deployment"), &deploymentProps{
	api: api,
})

// development stage
devLogGroup := logs.NewLogGroup(this, jsii.String("DevLogs"))
apigateway.NewStage(this, jsii.String("dev"), &stageProps{
	deployment: deployment,
	accessLogDestination: apigateway.NewLogGroupLogDestination(devLogGroup),
	accessLogFormat: apigateway.*accessLogFormat.jsonWithStandardFields(&jsonWithStandardFieldProps{
		caller: jsii.Boolean(false),
		httpMethod: jsii.Boolean(true),
		ip: jsii.Boolean(true),
		protocol: jsii.Boolean(true),
		requestTime: jsii.Boolean(true),
		resourcePath: jsii.Boolean(true),
		responseLength: jsii.Boolean(true),
		status: jsii.Boolean(true),
		user: jsii.Boolean(true),
	}),
})

Experimental.

type DomainName

type DomainName interface {
	awscdk.Resource
	IDomainName
	// The domain name (e.g. `example.com`).
	// Experimental.
	DomainName() *string
	// The Route53 alias target to use in order to connect a record set to this domain through an alias.
	// Experimental.
	DomainNameAliasDomainName() *string
	// The Route53 hosted zone ID to use in order to connect a record set to this domain through an alias.
	// Experimental.
	DomainNameAliasHostedZoneId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Maps this domain to an API endpoint.
	// Experimental.
	AddBasePathMapping(targetApi IRestApi, options *BasePathMappingOptions) BasePathMapping
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Example:

var acm interface{}

apigateway.NewDomainName(this, jsii.String("domain-name"), &domainNameProps{
	domainName: jsii.String("example.com"),
	certificate: acm.certificate_FromCertificateArn(this, jsii.String("cert"), jsii.String("arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d")),
	mtls: &mTLSConfig{
		bucket: s3.NewBucket(this, jsii.String("bucket")),
		key: jsii.String("truststore.pem"),
		version: jsii.String("version"),
	},
})

Experimental.

func NewDomainName

func NewDomainName(scope constructs.Construct, id *string, props *DomainNameProps) DomainName

Experimental.

type DomainNameAttributes

type DomainNameAttributes struct {
	// The domain name (e.g. `example.com`).
	// Experimental.
	DomainName *string `field:"required" json:"domainName" yaml:"domainName"`
	// The Route53 hosted zone ID to use in order to connect a record set to this domain through an alias.
	// Experimental.
	DomainNameAliasHostedZoneId *string `field:"required" json:"domainNameAliasHostedZoneId" yaml:"domainNameAliasHostedZoneId"`
	// The Route53 alias target to use in order to connect a record set to this domain through an alias.
	// Experimental.
	DomainNameAliasTarget *string `field:"required" json:"domainNameAliasTarget" yaml:"domainNameAliasTarget"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

domainNameAttributes := &domainNameAttributes{
	domainName: jsii.String("domainName"),
	domainNameAliasHostedZoneId: jsii.String("domainNameAliasHostedZoneId"),
	domainNameAliasTarget: jsii.String("domainNameAliasTarget"),
}

Experimental.

type DomainNameOptions

type DomainNameOptions struct {
	// The reference to an AWS-managed certificate for use by the edge-optimized endpoint for the domain name.
	//
	// For "EDGE" domain names, the certificate
	// needs to be in the US East (N. Virginia) region.
	// Experimental.
	Certificate awscertificatemanager.ICertificate `field:"required" json:"certificate" yaml:"certificate"`
	// The custom domain name for your API.
	//
	// Uppercase letters are not supported.
	// Experimental.
	DomainName *string `field:"required" json:"domainName" yaml:"domainName"`
	// The base path name that callers of the API must provide in the URL after the domain name (e.g. `example.com/base-path`). If you specify this property, it can't be an empty string.
	// Experimental.
	BasePath *string `field:"optional" json:"basePath" yaml:"basePath"`
	// The type of endpoint for this DomainName.
	// Experimental.
	EndpointType EndpointType `field:"optional" json:"endpointType" yaml:"endpointType"`
	// The mutual TLS authentication configuration for a custom domain name.
	// Experimental.
	Mtls *MTLSConfig `field:"optional" json:"mtls" yaml:"mtls"`
	// The Transport Layer Security (TLS) version + cipher suite for this domain name.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html
	//
	// Experimental.
	SecurityPolicy SecurityPolicy `field:"optional" json:"securityPolicy" yaml:"securityPolicy"`
}

Example:

var acmCertificateForExampleCom interface{}

api := apigateway.NewRestApi(this, jsii.String("MyDomain"), &restApiProps{
	domainName: &domainNameOptions{
		domainName: jsii.String("example.com"),
		certificate: acmCertificateForExampleCom,
	},
})

Experimental.

type DomainNameProps

type DomainNameProps struct {
	// The reference to an AWS-managed certificate for use by the edge-optimized endpoint for the domain name.
	//
	// For "EDGE" domain names, the certificate
	// needs to be in the US East (N. Virginia) region.
	// Experimental.
	Certificate awscertificatemanager.ICertificate `field:"required" json:"certificate" yaml:"certificate"`
	// The custom domain name for your API.
	//
	// Uppercase letters are not supported.
	// Experimental.
	DomainName *string `field:"required" json:"domainName" yaml:"domainName"`
	// The base path name that callers of the API must provide in the URL after the domain name (e.g. `example.com/base-path`). If you specify this property, it can't be an empty string.
	// Experimental.
	BasePath *string `field:"optional" json:"basePath" yaml:"basePath"`
	// The type of endpoint for this DomainName.
	// Experimental.
	EndpointType EndpointType `field:"optional" json:"endpointType" yaml:"endpointType"`
	// The mutual TLS authentication configuration for a custom domain name.
	// Experimental.
	Mtls *MTLSConfig `field:"optional" json:"mtls" yaml:"mtls"`
	// The Transport Layer Security (TLS) version + cipher suite for this domain name.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html
	//
	// Experimental.
	SecurityPolicy SecurityPolicy `field:"optional" json:"securityPolicy" yaml:"securityPolicy"`
	// If specified, all requests to this domain will be mapped to the production deployment of this API.
	//
	// If you wish to map this domain to multiple APIs
	// with different base paths, don't specify this option and use
	// `addBasePathMapping`.
	// Experimental.
	Mapping IRestApi `field:"optional" json:"mapping" yaml:"mapping"`
}

Example:

var acm interface{}

apigateway.NewDomainName(this, jsii.String("domain-name"), &domainNameProps{
	domainName: jsii.String("example.com"),
	certificate: acm.certificate_FromCertificateArn(this, jsii.String("cert"), jsii.String("arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d")),
	mtls: &mTLSConfig{
		bucket: s3.NewBucket(this, jsii.String("bucket")),
		key: jsii.String("truststore.pem"),
		version: jsii.String("version"),
	},
})

Experimental.

type EmptyModel deprecated

type EmptyModel interface {
	IModel
	// Returns the model name, such as 'myModel'.
	// Deprecated: You should use Model.EMPTY_MODEL
	ModelId() *string
}

Represents a reference to a REST API's Empty model, which is available as part of the model collection by default.

This can be used for mapping JSON responses from an integration to what is returned to a client, where strong typing is not required. In the absence of any defined model, the Empty model will be used to return the response payload unmapped.

Definition

{
   "$schema" : "http://json-schema.org/draft-04/schema#",
   "title" : "Empty Schema",
   "type" : "object"
}.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

emptyModel := awscdk.Aws_apigateway.NewEmptyModel()

See: https://docs.amazonaws.cn/en_us/apigateway/latest/developerguide/models-mappings.html#models-mappings-models

Deprecated: You should use Model.EMPTY_MODEL

func NewEmptyModel deprecated

func NewEmptyModel() EmptyModel

Deprecated: You should use Model.EMPTY_MODEL

type EndpointConfiguration

type EndpointConfiguration struct {
	// A list of endpoint types of an API or its custom domain name.
	// Experimental.
	Types *[]EndpointType `field:"required" json:"types" yaml:"types"`
	// A list of VPC Endpoints against which to create Route53 ALIASes.
	// Experimental.
	VpcEndpoints *[]awsec2.IVpcEndpoint `field:"optional" json:"vpcEndpoints" yaml:"vpcEndpoints"`
}

The endpoint configuration of a REST API, including VPCs and endpoint types.

EndpointConfiguration is a property of the AWS::ApiGateway::RestApi resource.

Example:

api := apigateway.NewRestApi(this, jsii.String("api"), &restApiProps{
	endpointConfiguration: &endpointConfiguration{
		types: []endpointType{
			apigateway.*endpointType_EDGE,
		},
	},
})

Experimental.

type EndpointType

type EndpointType string

Example:

var apiDefinition apiDefinition

api := apigateway.NewSpecRestApi(this, jsii.String("ExampleRestApi"), &specRestApiProps{
	apiDefinition: apiDefinition,
	endpointTypes: []endpointType{
		apigateway.*endpointType_PRIVATE,
	},
})

Experimental.

const (
	// For an edge-optimized API and its custom domain name.
	// Experimental.
	EndpointType_EDGE EndpointType = "EDGE"
	// For a regional API and its custom domain name.
	// Experimental.
	EndpointType_REGIONAL EndpointType = "REGIONAL"
	// For a private API and its custom domain name.
	// Experimental.
	EndpointType_PRIVATE EndpointType = "PRIVATE"
)

type ErrorModel deprecated

type ErrorModel interface {
	IModel
	// Returns the model name, such as 'myModel'.
	// Deprecated: You should use Model.ERROR_MODEL
	ModelId() *string
}

Represents a reference to a REST API's Error model, which is available as part of the model collection by default.

This can be used for mapping error JSON responses from an integration to a client, where a simple generic message field is sufficient to map and return an error payload.

Definition

{
   "$schema" : "http://json-schema.org/draft-04/schema#",
   "title" : "Error Schema",
   "type" : "object",
   "properties" : {
     "message" : { "type" : "string" }
   }
}.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

errorModel := awscdk.Aws_apigateway.NewErrorModel()

Deprecated: You should use Model.ERROR_MODEL

func NewErrorModel deprecated

func NewErrorModel() ErrorModel

Deprecated: You should use Model.ERROR_MODEL

type GatewayResponse

type GatewayResponse interface {
	awscdk.Resource
	IGatewayResponse
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Configure the response received by clients, produced from the API Gateway backend.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var responseType responseType
var restApi restApi

gatewayResponse := awscdk.Aws_apigateway.NewGatewayResponse(this, jsii.String("MyGatewayResponse"), &gatewayResponseProps{
	restApi: restApi,
	type: responseType,

	// the properties below are optional
	responseHeaders: map[string]*string{
		"responseHeadersKey": jsii.String("responseHeaders"),
	},
	statusCode: jsii.String("statusCode"),
	templates: map[string]*string{
		"templatesKey": jsii.String("templates"),
	},
})

Experimental.

func NewGatewayResponse

func NewGatewayResponse(scope constructs.Construct, id *string, props *GatewayResponseProps) GatewayResponse

Experimental.

type GatewayResponseOptions

type GatewayResponseOptions struct {
	// Response type to associate with gateway response.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html
	//
	// Experimental.
	Type ResponseType `field:"required" json:"type" yaml:"type"`
	// Custom headers parameters for response.
	// Experimental.
	ResponseHeaders *map[string]*string `field:"optional" json:"responseHeaders" yaml:"responseHeaders"`
	// Http status code for response.
	// Experimental.
	StatusCode *string `field:"optional" json:"statusCode" yaml:"statusCode"`
	// Custom templates to get mapped as response.
	// Experimental.
	Templates *map[string]*string `field:"optional" json:"templates" yaml:"templates"`
}

Options to add gateway response.

Example:

api := apigateway.NewRestApi(this, jsii.String("books-api"))
api.addGatewayResponse(jsii.String("test-response"), &gatewayResponseOptions{
	type: apigateway.responseType_ACCESS_DENIED(),
	statusCode: jsii.String("500"),
	responseHeaders: map[string]*string{
		"Access-Control-Allow-Origin": jsii.String("test.com"),
		"test-key": jsii.String("test-value"),
	},
	templates: map[string]*string{
		"application/json": jsii.String("{ \"message\": $context.error.messageString, \"statusCode\": \"488\", \"type\": \"$context.error.responseType\" }"),
	},
})

Experimental.

type GatewayResponseProps

type GatewayResponseProps struct {
	// Response type to associate with gateway response.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html
	//
	// Experimental.
	Type ResponseType `field:"required" json:"type" yaml:"type"`
	// Custom headers parameters for response.
	// Experimental.
	ResponseHeaders *map[string]*string `field:"optional" json:"responseHeaders" yaml:"responseHeaders"`
	// Http status code for response.
	// Experimental.
	StatusCode *string `field:"optional" json:"statusCode" yaml:"statusCode"`
	// Custom templates to get mapped as response.
	// Experimental.
	Templates *map[string]*string `field:"optional" json:"templates" yaml:"templates"`
	// Rest api resource to target.
	// Experimental.
	RestApi IRestApi `field:"required" json:"restApi" yaml:"restApi"`
}

Properties for a new gateway response.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var responseType responseType
var restApi restApi

gatewayResponseProps := &gatewayResponseProps{
	restApi: restApi,
	type: responseType,

	// the properties below are optional
	responseHeaders: map[string]*string{
		"responseHeadersKey": jsii.String("responseHeaders"),
	},
	statusCode: jsii.String("statusCode"),
	templates: map[string]*string{
		"templatesKey": jsii.String("templates"),
	},
}

Experimental.

type HttpIntegration

type HttpIntegration interface {
	Integration
	// Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.
	// Experimental.
	Bind(_method Method) *IntegrationConfig
}

You can integrate an API method with an HTTP endpoint using the HTTP proxy integration or the HTTP custom integration,.

With the proxy integration, the setup is simple. You only need to set the HTTP method and the HTTP endpoint URI, according to the backend requirements, if you are not concerned with content encoding or caching.

With the custom integration, the setup is more involved. In addition to the proxy integration setup steps, you need to specify how the incoming request data is mapped to the integration request and how the resulting integration response data is mapped to the method response.

Example:

var authFn function
var books resource

auth := apigateway.NewRequestAuthorizer(this, jsii.String("booksAuthorizer"), &requestAuthorizerProps{
	handler: authFn,
	identitySources: []*string{
		apigateway.identitySource.header(jsii.String("Authorization")),
	},
})

books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
})

Experimental.

func NewHttpIntegration

func NewHttpIntegration(url *string, props *HttpIntegrationProps) HttpIntegration

Experimental.

type HttpIntegrationProps

type HttpIntegrationProps struct {
	// HTTP method to use when invoking the backend URL.
	// Experimental.
	HttpMethod *string `field:"optional" json:"httpMethod" yaml:"httpMethod"`
	// Integration options, such as request/resopnse mapping, content handling, etc.
	// Experimental.
	Options *IntegrationOptions `field:"optional" json:"options" yaml:"options"`
	// Determines whether to use proxy integration or custom integration.
	// Experimental.
	Proxy *bool `field:"optional" json:"proxy" yaml:"proxy"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var duration duration
var role role
var vpcLink vpcLink

httpIntegrationProps := &httpIntegrationProps{
	httpMethod: jsii.String("httpMethod"),
	options: &integrationOptions{
		cacheKeyParameters: []*string{
			jsii.String("cacheKeyParameters"),
		},
		cacheNamespace: jsii.String("cacheNamespace"),
		connectionType: awscdk.Aws_apigateway.connectionType_INTERNET,
		contentHandling: awscdk.*Aws_apigateway.contentHandling_CONVERT_TO_BINARY,
		credentialsPassthrough: jsii.Boolean(false),
		credentialsRole: role,
		integrationResponses: []integrationResponse{
			&integrationResponse{
				statusCode: jsii.String("statusCode"),

				// the properties below are optional
				contentHandling: awscdk.*Aws_apigateway.*contentHandling_CONVERT_TO_BINARY,
				responseParameters: map[string]*string{
					"responseParametersKey": jsii.String("responseParameters"),
				},
				responseTemplates: map[string]*string{
					"responseTemplatesKey": jsii.String("responseTemplates"),
				},
				selectionPattern: jsii.String("selectionPattern"),
			},
		},
		passthroughBehavior: awscdk.*Aws_apigateway.passthroughBehavior_WHEN_NO_MATCH,
		requestParameters: map[string]*string{
			"requestParametersKey": jsii.String("requestParameters"),
		},
		requestTemplates: map[string]*string{
			"requestTemplatesKey": jsii.String("requestTemplates"),
		},
		timeout: duration,
		vpcLink: vpcLink,
	},
	proxy: jsii.Boolean(false),
}

Experimental.

type IAccessLogDestination

type IAccessLogDestination interface {
	// Binds this destination to the RestApi Stage.
	// Experimental.
	Bind(stage IStage) *AccessLogDestinationConfig
}

Access log destination for a RestApi Stage. Experimental.

type IApiKey

type IApiKey interface {
	awscdk.IResource
	// The API key ARN.
	// Experimental.
	KeyArn() *string
	// The API key ID.
	// Experimental.
	KeyId() *string
}

API keys are alphanumeric string values that you distribute to app developer customers to grant access to your API. Experimental.

func ApiKey_FromApiKeyId

func ApiKey_FromApiKeyId(scope constructs.Construct, id *string, apiKeyId *string) IApiKey

Import an ApiKey by its Id. Experimental.

type IAuthorizer

type IAuthorizer interface {
	// The authorization type of this authorizer.
	// Experimental.
	AuthorizationType() AuthorizationType
	// The authorizer ID.
	// Experimental.
	AuthorizerId() *string
}

Represents an API Gateway authorizer. Experimental.

type IDomainName

type IDomainName interface {
	awscdk.IResource
	// The domain name (e.g. `example.com`).
	// Experimental.
	DomainName() *string
	// The Route53 alias target to use in order to connect a record set to this domain through an alias.
	// Experimental.
	DomainNameAliasDomainName() *string
	// The Route53 hosted zone ID to use in order to connect a record set to this domain through an alias.
	// Experimental.
	DomainNameAliasHostedZoneId() *string
}

Experimental.

func DomainName_FromDomainNameAttributes

func DomainName_FromDomainNameAttributes(scope constructs.Construct, id *string, attrs *DomainNameAttributes) IDomainName

Imports an existing domain name. Experimental.

type IGatewayResponse

type IGatewayResponse interface {
	awscdk.IResource
}

Represents gateway response resource. Experimental.

type IModel

type IModel interface {
	// Returns the model name, such as 'myModel'.
	// Experimental.
	ModelId() *string
}

Experimental.

func Model_EMPTY_MODEL

func Model_EMPTY_MODEL() IModel

func Model_ERROR_MODEL

func Model_ERROR_MODEL() IModel

func Model_FromModelName

func Model_FromModelName(scope constructs.Construct, id *string, modelName *string) IModel

Experimental.

type IRequestValidator

type IRequestValidator interface {
	awscdk.IResource
	// ID of the request validator, such as abc123.
	// Experimental.
	RequestValidatorId() *string
}

Experimental.

func RequestValidator_FromRequestValidatorId

func RequestValidator_FromRequestValidatorId(scope constructs.Construct, id *string, requestValidatorId *string) IRequestValidator

Experimental.

type IResource

type IResource interface {
	awscdk.IResource
	// Adds an OPTIONS method to this resource which responds to Cross-Origin Resource Sharing (CORS) preflight requests.
	//
	// Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional
	// HTTP headers to tell browsers to give a web application running at one
	// origin, access to selected resources from a different origin. A web
	// application executes a cross-origin HTTP request when it requests a
	// resource that has a different origin (domain, protocol, or port) from its
	// own.
	//
	// Returns: a `Method` object.
	// See: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
	//
	// Experimental.
	AddCorsPreflight(options *CorsOptions) Method
	// Defines a new method for this resource.
	//
	// Returns: The newly created `Method` object.
	// Experimental.
	AddMethod(httpMethod *string, target Integration, options *MethodOptions) Method
	// Adds a greedy proxy resource ("{proxy+}") and an ANY method to this route.
	// Experimental.
	AddProxy(options *ProxyResourceOptions) ProxyResource
	// Defines a new child resource where this resource is the parent.
	//
	// Returns: A Resource object.
	// Experimental.
	AddResource(pathPart *string, options *ResourceOptions) Resource
	// Retrieves a child resource by path part.
	//
	// Returns: the child resource or undefined if not found.
	// Experimental.
	GetResource(pathPart *string) IResource
	// Gets or create all resources leading up to the specified path.
	//
	// - Path may only start with "/" if this method is called on the root resource.
	// - All resources are created using default options.
	//
	// Returns: a new or existing resource.
	// Experimental.
	ResourceForPath(path *string) Resource
	// The rest API that this resource is part of.
	//
	// The reason we need the RestApi object itself and not just the ID is because the model
	// is being tracked by the top-level RestApi object for the purpose of calculating it's
	// hash to determine the ID of the deployment. This allows us to automatically update
	// the deployment when the model of the REST API changes.
	// Experimental.
	Api() IRestApi
	// Default options for CORS preflight OPTIONS method.
	// Experimental.
	DefaultCorsPreflightOptions() *CorsOptions
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration() Integration
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions() *MethodOptions
	// The parent of this resource or undefined for the root resource.
	// Experimental.
	ParentResource() IResource
	// The full path of this resource.
	// Experimental.
	Path() *string
	// The ID of the resource.
	// Experimental.
	ResourceId() *string
	// The rest API that this resource is part of.
	// Deprecated: - Throws an error if this Resource is not associated with an instance of `RestApi`. Use `api` instead.
	RestApi() RestApi
}

Experimental.

func ProxyResource_FromResourceAttributes

func ProxyResource_FromResourceAttributes(scope constructs.Construct, id *string, attrs *ResourceAttributes) IResource

Import an existing resource. Experimental.

func Resource_FromResourceAttributes

func Resource_FromResourceAttributes(scope constructs.Construct, id *string, attrs *ResourceAttributes) IResource

Import an existing resource. Experimental.

type IRestApi

type IRestApi interface {
	awscdk.IResource
	// Gets the "execute-api" ARN.
	//
	// Returns: The "execute-api" ARN.
	// Experimental.
	ArnForExecuteApi(method *string, path *string, stage *string) *string
	// API Gateway stage that points to the latest deployment (if defined).
	// Experimental.
	DeploymentStage() Stage
	// Experimental.
	SetDeploymentStage(d Stage)
	// API Gateway deployment that represents the latest changes of the API.
	//
	// This resource will be automatically updated every time the REST API model changes.
	// `undefined` when no deployment is configured.
	// Experimental.
	LatestDeployment() Deployment
	// The ID of this API Gateway RestApi.
	// Experimental.
	RestApiId() *string
	// The resource ID of the root resource.
	// Experimental.
	RestApiRootResourceId() *string
	// Represents the root resource ("/") of this API. Use it to define the API model:.
	//
	// api.root.addMethod('ANY', redirectToHomePage); // "ANY /"
	//     api.root.addResource('friends').addMethod('GET', getFriendsHandler); // "GET /friends"
	// Experimental.
	Root() IResource
}

Experimental.

func LambdaRestApi_FromRestApiAttributes

func LambdaRestApi_FromRestApiAttributes(scope constructs.Construct, id *string, attrs *RestApiAttributes) IRestApi

Import an existing RestApi that can be configured with additional Methods and Resources. Experimental.

func LambdaRestApi_FromRestApiId

func LambdaRestApi_FromRestApiId(scope constructs.Construct, id *string, restApiId *string) IRestApi

Import an existing RestApi. Experimental.

func RestApi_FromRestApiAttributes

func RestApi_FromRestApiAttributes(scope constructs.Construct, id *string, attrs *RestApiAttributes) IRestApi

Import an existing RestApi that can be configured with additional Methods and Resources. Experimental.

func RestApi_FromRestApiId

func RestApi_FromRestApiId(scope constructs.Construct, id *string, restApiId *string) IRestApi

Import an existing RestApi. Experimental.

func StepFunctionsRestApi_FromRestApiAttributes

func StepFunctionsRestApi_FromRestApiAttributes(scope constructs.Construct, id *string, attrs *RestApiAttributes) IRestApi

Import an existing RestApi that can be configured with additional Methods and Resources. Experimental.

func StepFunctionsRestApi_FromRestApiId

func StepFunctionsRestApi_FromRestApiId(scope constructs.Construct, id *string, restApiId *string) IRestApi

Import an existing RestApi. Experimental.

type IStage

type IStage interface {
	awscdk.IResource
	// RestApi to which this stage is associated.
	// Experimental.
	RestApi() IRestApi
	// Name of this stage.
	// Experimental.
	StageName() *string
}

Represents an APIGateway Stage. Experimental.

type IUsagePlan

type IUsagePlan interface {
	awscdk.IResource
	// Adds an ApiKey.
	// Experimental.
	AddApiKey(apiKey IApiKey, options *AddApiKeyOptions)
	// Id of the usage plan.
	// Experimental.
	UsagePlanId() *string
}

A UsagePlan, either managed by this CDK app, or imported. Experimental.

func UsagePlan_FromUsagePlanId

func UsagePlan_FromUsagePlanId(scope constructs.Construct, id *string, usagePlanId *string) IUsagePlan

Import an externally defined usage plan using its ARN. Experimental.

type IVpcLink interface {
	awscdk.IResource
	// Physical ID of the VpcLink resource.
	// Experimental.
	VpcLinkId() *string
}

Represents an API Gateway VpcLink. Experimental.

func VpcLink_FromVpcLinkId(scope constructs.Construct, id *string, vpcLinkId *string) IVpcLink

Import a VPC Link by its Id. Experimental.

type IdentitySource

type IdentitySource interface {
}

Represents an identity source.

The source can be specified either as a literal value (e.g: `Auth`) which cannot be blank, or as an unresolved string token.

Example:

var authFn function
var books resource

auth := apigateway.NewRequestAuthorizer(this, jsii.String("booksAuthorizer"), &requestAuthorizerProps{
	handler: authFn,
	identitySources: []*string{
		apigateway.identitySource.header(jsii.String("Authorization")),
	},
})

books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
})

Experimental.

func NewIdentitySource

func NewIdentitySource() IdentitySource

Experimental.

type InlineApiDefinition

type InlineApiDefinition interface {
	ApiDefinition
	// Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
	// Experimental.
	Bind(_scope awscdk.Construct) *ApiDefinitionConfig
	// Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
	//
	// Specifically it's required to allow assets to add
	// metadata for tooling like SAM CLI to be able to find their origins.
	// Experimental.
	BindAfterCreate(_scope awscdk.Construct, _restApi IRestApi)
}

OpenAPI specification from an inline JSON object.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var definition interface{}

inlineApiDefinition := awscdk.Aws_apigateway.NewInlineApiDefinition(definition)

Experimental.

func ApiDefinition_FromInline

func ApiDefinition_FromInline(definition interface{}) InlineApiDefinition

Create an API definition from an inline object.

The inline object must follow the schema of OpenAPI 2.0 or OpenAPI 3.0

Example:

apigateway.apiDefinition.fromInline(map[string]interface{}{
	"openapi": jsii.String("3.0.2"),
	"paths": map[string]map[string]map[string]map[string]map[string]map[string]map[string]map[string]*string{
		"/pets": map[string]map[string]map[string]map[string]map[string]map[string]map[string]*string{
			"get": map[string]map[string]map[string]map[string]map[string]map[string]*string{
				"responses": map[string]map[string]map[string]map[string]map[string]*string{
					jsii.Number(200): map[string]map[string]map[string]map[string]*string{
						"content": map[string]map[string]map[string]*string{
							"application/json": map[string]map[string]*string{
								"schema": map[string]*string{
									"$ref": jsii.String("#/components/schemas/Empty"),
								},
							},
						},
					},
				},
				"x-amazon-apigateway-integration": map[string]interface{}{
					"responses": map[string]map[string]*string{
						"default": map[string]*string{
							"statusCode": jsii.String("200"),
						},
					},
					"requestTemplates": map[string]*string{
						"application/json": jsii.String("{\"statusCode\": 200}"),
					},
					"passthroughBehavior": jsii.String("when_no_match"),
					"type": jsii.String("mock"),
				},
			},
		},
	},
	"components": map[string]map[string]map[string]*string{
		"schemas": map[string]map[string]*string{
			"Empty": map[string]*string{
				"title": jsii.String("Empty Schema"),
				"type": jsii.String("object"),
			},
		},
	},
})

Experimental.

func AssetApiDefinition_FromInline

func AssetApiDefinition_FromInline(definition interface{}) InlineApiDefinition

Create an API definition from an inline object.

The inline object must follow the schema of OpenAPI 2.0 or OpenAPI 3.0

Example:

apigateway.ApiDefinition.fromInline({
  openapi: '3.0.2',
  paths: {
    '/pets': {
      get: {
        'responses': {
          200: {
            content: {
              'application/json': {
                schema: {
                  $ref: '#/components/schemas/Empty',
                },
              },
            },
          },
        },
        'x-amazon-apigateway-integration': {
          responses: {
            default: {
              statusCode: '200',
            },
          },
          requestTemplates: {
            'application/json': '{"statusCode": 200}',
          },
          passthroughBehavior: 'when_no_match',
          type: 'mock',
        },
      },
    },
  },
  components: {
    schemas: {
      Empty: {
        title: 'Empty Schema',
        type: 'object',
      },
    },
  },
});

Experimental.

func InlineApiDefinition_FromInline

func InlineApiDefinition_FromInline(definition interface{}) InlineApiDefinition

Create an API definition from an inline object.

The inline object must follow the schema of OpenAPI 2.0 or OpenAPI 3.0

Example:

apigateway.ApiDefinition.fromInline({
  openapi: '3.0.2',
  paths: {
    '/pets': {
      get: {
        'responses': {
          200: {
            content: {
              'application/json': {
                schema: {
                  $ref: '#/components/schemas/Empty',
                },
              },
            },
          },
        },
        'x-amazon-apigateway-integration': {
          responses: {
            default: {
              statusCode: '200',
            },
          },
          requestTemplates: {
            'application/json': '{"statusCode": 200}',
          },
          passthroughBehavior: 'when_no_match',
          type: 'mock',
        },
      },
    },
  },
  components: {
    schemas: {
      Empty: {
        title: 'Empty Schema',
        type: 'object',
      },
    },
  },
});

Experimental.

func NewInlineApiDefinition

func NewInlineApiDefinition(definition interface{}) InlineApiDefinition

Experimental.

func S3ApiDefinition_FromInline

func S3ApiDefinition_FromInline(definition interface{}) InlineApiDefinition

Create an API definition from an inline object.

The inline object must follow the schema of OpenAPI 2.0 or OpenAPI 3.0

Example:

apigateway.ApiDefinition.fromInline({
  openapi: '3.0.2',
  paths: {
    '/pets': {
      get: {
        'responses': {
          200: {
            content: {
              'application/json': {
                schema: {
                  $ref: '#/components/schemas/Empty',
                },
              },
            },
          },
        },
        'x-amazon-apigateway-integration': {
          responses: {
            default: {
              statusCode: '200',
            },
          },
          requestTemplates: {
            'application/json': '{"statusCode": 200}',
          },
          passthroughBehavior: 'when_no_match',
          type: 'mock',
        },
      },
    },
  },
  components: {
    schemas: {
      Empty: {
        title: 'Empty Schema',
        type: 'object',
      },
    },
  },
});

Experimental.

type Integration

type Integration interface {
	// Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.
	// Experimental.
	Bind(_method Method) *IntegrationConfig
}

Base class for backend integrations for an API Gateway method.

Use one of the concrete classes such as `MockIntegration`, `AwsIntegration`, `LambdaIntegration` or implement on your own by specifying the set of props.

Example:

var books resource
var iamUser user

getBooks := books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizationType: apigateway.authorizationType_IAM,
})

iamUser.attachInlinePolicy(iam.NewPolicy(this, jsii.String("AllowBooks"), &policyProps{
	statements: []policyStatement{
		iam.NewPolicyStatement(&policyStatementProps{
			actions: []*string{
				jsii.String("execute-api:Invoke"),
			},
			effect: iam.effect_ALLOW,
			resources: []*string{
				getBooks.methodArn,
			},
		}),
	},
}))

Experimental.

func NewIntegration

func NewIntegration(props *IntegrationProps) Integration

Experimental.

type IntegrationConfig

type IntegrationConfig struct {
	// Specifies an API method integration type.
	// Experimental.
	Type IntegrationType `field:"required" json:"type" yaml:"type"`
	// This value is included in computing the Deployment's fingerprint.
	//
	// When the fingerprint
	// changes, a new deployment is triggered.
	// This property should contain values associated with the Integration that upon changing
	// should trigger a fresh the Deployment needs to be refreshed.
	// Experimental.
	DeploymentToken *string `field:"optional" json:"deploymentToken" yaml:"deploymentToken"`
	// The integration's HTTP method type.
	// Experimental.
	IntegrationHttpMethod *string `field:"optional" json:"integrationHttpMethod" yaml:"integrationHttpMethod"`
	// Integration options.
	// Experimental.
	Options *IntegrationOptions `field:"optional" json:"options" yaml:"options"`
	// The Uniform Resource Identifier (URI) for the integration.
	// See: https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/#uri
	//
	// Experimental.
	Uri *string `field:"optional" json:"uri" yaml:"uri"`
}

Result of binding an Integration to a Method.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var duration duration
var role role
var vpcLink vpcLink

integrationConfig := &integrationConfig{
	type: awscdk.Aws_apigateway.integrationType_AWS,

	// the properties below are optional
	deploymentToken: jsii.String("deploymentToken"),
	integrationHttpMethod: jsii.String("integrationHttpMethod"),
	options: &integrationOptions{
		cacheKeyParameters: []*string{
			jsii.String("cacheKeyParameters"),
		},
		cacheNamespace: jsii.String("cacheNamespace"),
		connectionType: awscdk.*Aws_apigateway.connectionType_INTERNET,
		contentHandling: awscdk.*Aws_apigateway.contentHandling_CONVERT_TO_BINARY,
		credentialsPassthrough: jsii.Boolean(false),
		credentialsRole: role,
		integrationResponses: []integrationResponse{
			&integrationResponse{
				statusCode: jsii.String("statusCode"),

				// the properties below are optional
				contentHandling: awscdk.*Aws_apigateway.*contentHandling_CONVERT_TO_BINARY,
				responseParameters: map[string]*string{
					"responseParametersKey": jsii.String("responseParameters"),
				},
				responseTemplates: map[string]*string{
					"responseTemplatesKey": jsii.String("responseTemplates"),
				},
				selectionPattern: jsii.String("selectionPattern"),
			},
		},
		passthroughBehavior: awscdk.*Aws_apigateway.passthroughBehavior_WHEN_NO_MATCH,
		requestParameters: map[string]*string{
			"requestParametersKey": jsii.String("requestParameters"),
		},
		requestTemplates: map[string]*string{
			"requestTemplatesKey": jsii.String("requestTemplates"),
		},
		timeout: duration,
		vpcLink: vpcLink,
	},
	uri: jsii.String("uri"),
}

Experimental.

type IntegrationOptions

type IntegrationOptions struct {
	// A list of request parameters whose values are to be cached.
	//
	// It determines
	// request parameters that will make it into the cache key.
	// Experimental.
	CacheKeyParameters *[]*string `field:"optional" json:"cacheKeyParameters" yaml:"cacheKeyParameters"`
	// An API-specific tag group of related cached parameters.
	// Experimental.
	CacheNamespace *string `field:"optional" json:"cacheNamespace" yaml:"cacheNamespace"`
	// The type of network connection to the integration endpoint.
	// Experimental.
	ConnectionType ConnectionType `field:"optional" json:"connectionType" yaml:"connectionType"`
	// Specifies how to handle request payload content type conversions.
	// Experimental.
	ContentHandling ContentHandling `field:"optional" json:"contentHandling" yaml:"contentHandling"`
	// Requires that the caller's identity be passed through from the request.
	// Experimental.
	CredentialsPassthrough *bool `field:"optional" json:"credentialsPassthrough" yaml:"credentialsPassthrough"`
	// An IAM role that API Gateway assumes.
	//
	// Mutually exclusive with `credentialsPassThrough`.
	// Experimental.
	CredentialsRole awsiam.IRole `field:"optional" json:"credentialsRole" yaml:"credentialsRole"`
	// The response that API Gateway provides after a method's backend completes processing a request.
	//
	// API Gateway intercepts the response from the
	// backend so that you can control how API Gateway surfaces backend
	// responses. For example, you can map the backend status codes to codes
	// that you define.
	// Experimental.
	IntegrationResponses *[]*IntegrationResponse `field:"optional" json:"integrationResponses" yaml:"integrationResponses"`
	// Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.
	//
	// There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
	// NEVER.
	// Experimental.
	PassthroughBehavior PassthroughBehavior `field:"optional" json:"passthroughBehavior" yaml:"passthroughBehavior"`
	// The request parameters that API Gateway sends with the backend request.
	//
	// Specify request parameters as key-value pairs (string-to-string
	// mappings), with a destination as the key and a source as the value.
	//
	// Specify the destination by using the following pattern
	// integration.request.location.name, where location is querystring, path,
	// or header, and name is a valid, unique parameter name.
	//
	// The source must be an existing method request parameter or a static
	// value. You must enclose static values in single quotation marks and
	// pre-encode these values based on their destination in the request.
	// Experimental.
	RequestParameters *map[string]*string `field:"optional" json:"requestParameters" yaml:"requestParameters"`
	// A map of Apache Velocity templates that are applied on the request payload.
	//
	// The template that API Gateway uses is based on the value of the
	// Content-Type header that's sent by the client. The content type value is
	// the key, and the template is the value (specified as a string), such as
	// the following snippet:
	//
	// “`
	//    { "application/json": "{ \"statusCode\": 200 }" }
	// “`.
	// See: http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
	//
	// Experimental.
	RequestTemplates *map[string]*string `field:"optional" json:"requestTemplates" yaml:"requestTemplates"`
	// The maximum amount of time an integration will run before it returns without a response.
	//
	// Must be between 50 milliseconds and 29 seconds.
	// Experimental.
	Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"`
	// The VpcLink used for the integration.
	//
	// Required if connectionType is VPC_LINK.
	// Experimental.
	VpcLink IVpcLink `field:"optional" json:"vpcLink" yaml:"vpcLink"`
}

Example:

import path "github.com/aws-samples/dummy/path"
import lambda "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

// Against the RestApi endpoint from the stack output, run
// `curl -s -o /dev/null -w "%{http_code}" <url>` should return 401
// `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: deny' <url>?allow=yes` should return 403
// `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: allow' <url>?allow=yes` should return 200

app := awscdk.NewApp()
stack := awscdk.NewStack(app, jsii.String("RequestAuthorizerInteg"))

authorizerFn := lambda.NewFunction(stack, jsii.String("MyAuthorizerFunction"), &functionProps{
	runtime: lambda.runtime_NODEJS_14_X(),
	handler: jsii.String("index.handler"),
	code: lambda.assetCode.fromAsset(path.join(__dirname, jsii.String("integ.request-authorizer.handler"))),
})

restapi := awscdk.NewRestApi(stack, jsii.String("MyRestApi"))

authorizer := awscdk.NewRequestAuthorizer(stack, jsii.String("MyAuthorizer"), &requestAuthorizerProps{
	handler: authorizerFn,
	identitySources: []*string{
		awscdk.IdentitySource.header(jsii.String("Authorization")),
		awscdk.IdentitySource.queryString(jsii.String("allow")),
	},
})

restapi.root.addMethod(jsii.String("ANY"), awscdk.NewMockIntegration(&integrationOptions{
	integrationResponses: []integrationResponse{
		&integrationResponse{
			statusCode: jsii.String("200"),
		},
	},
	passthroughBehavior: awscdk.PassthroughBehavior_NEVER,
	requestTemplates: map[string]*string{
		"application/json": jsii.String("{ \"statusCode\": 200 }"),
	},
}), &methodOptions{
	methodResponses: []methodResponse{
		&methodResponse{
			statusCode: jsii.String("200"),
		},
	},
	authorizer: authorizer,
})

Experimental.

type IntegrationProps

type IntegrationProps struct {
	// Specifies an API method integration type.
	// Experimental.
	Type IntegrationType `field:"required" json:"type" yaml:"type"`
	// The integration's HTTP method type.
	//
	// Required unless you use a MOCK integration.
	// Experimental.
	IntegrationHttpMethod *string `field:"optional" json:"integrationHttpMethod" yaml:"integrationHttpMethod"`
	// Integration options.
	// Experimental.
	Options *IntegrationOptions `field:"optional" json:"options" yaml:"options"`
	// The Uniform Resource Identifier (URI) for the integration.
	//
	// - If you specify HTTP for the `type` property, specify the API endpoint URL.
	// - If you specify MOCK for the `type` property, don't specify this property.
	// - If you specify AWS for the `type` property, specify an AWS service that
	//    follows this form: `arn:partition:apigateway:region:subdomain.service|service:path|action/service_api.`
	//    For example, a Lambda function URI follows this form:
	//    arn:partition:apigateway:region:lambda:path/path. The path is usually in the
	//    form /2015-03-31/functions/LambdaFunctionARN/invocations.
	// See: https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/#uri
	//
	// Experimental.
	Uri interface{} `field:"optional" json:"uri" yaml:"uri"`
}

Example:

import elbv2 "github.com/aws/aws-cdk-go/awscdk"

vpc := ec2.NewVpc(this, jsii.String("VPC"))
nlb := elbv2.NewNetworkLoadBalancer(this, jsii.String("NLB"), &networkLoadBalancerProps{
	vpc: vpc,
})
link := apigateway.NewVpcLink(this, jsii.String("link"), &vpcLinkProps{
	targets: []iNetworkLoadBalancer{
		nlb,
	},
})

integration := apigateway.NewIntegration(&integrationProps{
	type: apigateway.integrationType_HTTP_PROXY,
	options: &integrationOptions{
		connectionType: apigateway.connectionType_VPC_LINK,
		vpcLink: link,
	},
})

Experimental.

type IntegrationResponse

type IntegrationResponse struct {
	// The status code that API Gateway uses to map the integration response to a MethodResponse status code.
	// Experimental.
	StatusCode *string `field:"required" json:"statusCode" yaml:"statusCode"`
	// Specifies how to handle request payload content type conversions.
	// Experimental.
	ContentHandling ContentHandling `field:"optional" json:"contentHandling" yaml:"contentHandling"`
	// The response parameters from the backend response that API Gateway sends to the method response.
	//
	// Use the destination as the key and the source as the value:
	//
	// - The destination must be an existing response parameter in the
	//    MethodResponse property.
	// - The source must be an existing method request parameter or a static
	//    value. You must enclose static values in single quotation marks and
	//    pre-encode these values based on the destination specified in the
	//    request.
	// See: http://docs.aws.amazon.com/apigateway/latest/developerguide/request-response-data-mappings.html
	//
	// Experimental.
	ResponseParameters *map[string]*string `field:"optional" json:"responseParameters" yaml:"responseParameters"`
	// The templates that are used to transform the integration response body.
	//
	// Specify templates as key-value pairs, with a content type as the key and
	// a template as the value.
	// See: http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
	//
	// Experimental.
	ResponseTemplates *map[string]*string `field:"optional" json:"responseTemplates" yaml:"responseTemplates"`
	// Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end.
	//
	// For example, if the success response returns nothing and the error response returns some string, you
	// could use the “.+“ regex to match error response. However, make sure that the error response does not contain any
	// newline (“\n“) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error
	// header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-integration-settings-integration-response.html
	//
	// Experimental.
	SelectionPattern *string `field:"optional" json:"selectionPattern" yaml:"selectionPattern"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

integrationResponse := &integrationResponse{
	statusCode: jsii.String("statusCode"),

	// the properties below are optional
	contentHandling: awscdk.Aws_apigateway.contentHandling_CONVERT_TO_BINARY,
	responseParameters: map[string]*string{
		"responseParametersKey": jsii.String("responseParameters"),
	},
	responseTemplates: map[string]*string{
		"responseTemplatesKey": jsii.String("responseTemplates"),
	},
	selectionPattern: jsii.String("selectionPattern"),
}

Experimental.

type IntegrationType

type IntegrationType string

Example:

import elbv2 "github.com/aws/aws-cdk-go/awscdk"

vpc := ec2.NewVpc(this, jsii.String("VPC"))
nlb := elbv2.NewNetworkLoadBalancer(this, jsii.String("NLB"), &networkLoadBalancerProps{
	vpc: vpc,
})
link := apigateway.NewVpcLink(this, jsii.String("link"), &vpcLinkProps{
	targets: []iNetworkLoadBalancer{
		nlb,
	},
})

integration := apigateway.NewIntegration(&integrationProps{
	type: apigateway.integrationType_HTTP_PROXY,
	options: &integrationOptions{
		connectionType: apigateway.connectionType_VPC_LINK,
		vpcLink: link,
	},
})

Experimental.

const (
	// For integrating the API method request with an AWS service action, including the Lambda function-invoking action.
	//
	// With the Lambda
	// function-invoking action, this is referred to as the Lambda custom
	// integration. With any other AWS service action, this is known as AWS
	// integration.
	// Experimental.
	IntegrationType_AWS IntegrationType = "AWS"
	// For integrating the API method request with the Lambda function-invoking action with the client request passed through as-is.
	//
	// This integration is
	// also referred to as the Lambda proxy integration.
	// Experimental.
	IntegrationType_AWS_PROXY IntegrationType = "AWS_PROXY"
	// For integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC.
	//
	// This integration is also referred to
	// as the HTTP custom integration.
	// Experimental.
	IntegrationType_HTTP IntegrationType = "HTTP"
	// For integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC, with the client request passed through as-is.
	//
	// This is also referred to as the HTTP proxy integration.
	// Experimental.
	IntegrationType_HTTP_PROXY IntegrationType = "HTTP_PROXY"
	// For integrating the API method request with API Gateway as a "loop-back" endpoint without invoking any backend.
	// Experimental.
	IntegrationType_MOCK IntegrationType = "MOCK"
)

type JsonSchema

type JsonSchema struct {
	// Experimental.
	AdditionalItems *[]*JsonSchema `field:"optional" json:"additionalItems" yaml:"additionalItems"`
	// Experimental.
	AdditionalProperties interface{} `field:"optional" json:"additionalProperties" yaml:"additionalProperties"`
	// Experimental.
	AllOf *[]*JsonSchema `field:"optional" json:"allOf" yaml:"allOf"`
	// Experimental.
	AnyOf *[]*JsonSchema `field:"optional" json:"anyOf" yaml:"anyOf"`
	// Experimental.
	Contains interface{} `field:"optional" json:"contains" yaml:"contains"`
	// The default value if you use an enum.
	// Experimental.
	Default interface{} `field:"optional" json:"default" yaml:"default"`
	// Experimental.
	Definitions *map[string]*JsonSchema `field:"optional" json:"definitions" yaml:"definitions"`
	// Experimental.
	Dependencies *map[string]interface{} `field:"optional" json:"dependencies" yaml:"dependencies"`
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Experimental.
	Enum *[]interface{} `field:"optional" json:"enum" yaml:"enum"`
	// Experimental.
	ExclusiveMaximum *bool `field:"optional" json:"exclusiveMaximum" yaml:"exclusiveMaximum"`
	// Experimental.
	ExclusiveMinimum *bool `field:"optional" json:"exclusiveMinimum" yaml:"exclusiveMinimum"`
	// Experimental.
	Format *string `field:"optional" json:"format" yaml:"format"`
	// Experimental.
	Id *string `field:"optional" json:"id" yaml:"id"`
	// Experimental.
	Items interface{} `field:"optional" json:"items" yaml:"items"`
	// Experimental.
	Maximum *float64 `field:"optional" json:"maximum" yaml:"maximum"`
	// Experimental.
	MaxItems *float64 `field:"optional" json:"maxItems" yaml:"maxItems"`
	// Experimental.
	MaxLength *float64 `field:"optional" json:"maxLength" yaml:"maxLength"`
	// Experimental.
	MaxProperties *float64 `field:"optional" json:"maxProperties" yaml:"maxProperties"`
	// Experimental.
	Minimum *float64 `field:"optional" json:"minimum" yaml:"minimum"`
	// Experimental.
	MinItems *float64 `field:"optional" json:"minItems" yaml:"minItems"`
	// Experimental.
	MinLength *float64 `field:"optional" json:"minLength" yaml:"minLength"`
	// Experimental.
	MinProperties *float64 `field:"optional" json:"minProperties" yaml:"minProperties"`
	// Experimental.
	MultipleOf *float64 `field:"optional" json:"multipleOf" yaml:"multipleOf"`
	// Experimental.
	Not **JsonSchema `field:"optional" json:"not" yaml:"not"`
	// Experimental.
	OneOf *[]*JsonSchema `field:"optional" json:"oneOf" yaml:"oneOf"`
	// Experimental.
	Pattern *string `field:"optional" json:"pattern" yaml:"pattern"`
	// Experimental.
	PatternProperties *map[string]*JsonSchema `field:"optional" json:"patternProperties" yaml:"patternProperties"`
	// Experimental.
	Properties *map[string]*JsonSchema `field:"optional" json:"properties" yaml:"properties"`
	// Experimental.
	PropertyNames **JsonSchema `field:"optional" json:"propertyNames" yaml:"propertyNames"`
	// Experimental.
	Ref *string `field:"optional" json:"ref" yaml:"ref"`
	// Experimental.
	Required *[]*string `field:"optional" json:"required" yaml:"required"`
	// Experimental.
	Schema JsonSchemaVersion `field:"optional" json:"schema" yaml:"schema"`
	// Experimental.
	Title *string `field:"optional" json:"title" yaml:"title"`
	// Experimental.
	Type interface{} `field:"optional" json:"type" yaml:"type"`
	// Experimental.
	UniqueItems *bool `field:"optional" json:"uniqueItems" yaml:"uniqueItems"`
}

Represents a JSON schema definition of the structure of a REST API model.

Copied from npm module jsonschema.

Example:

var api restApi

// We define the JSON Schema for the transformed valid response
responseModel := api.addModel(jsii.String("ResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.jsonSchemaVersion_DRAFT4,
		title: jsii.String("pollResponse"),
		type: apigateway.jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"greeting": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

// We define the JSON Schema for the transformed error response
errorResponseModel := api.addModel(jsii.String("ErrorResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ErrorResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.*jsonSchemaVersion_DRAFT4,
		title: jsii.String("errorResponse"),
		type: apigateway.*jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"message": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

See: https://github.com/tdegrunt/jsonschema

Experimental.

type JsonSchemaType

type JsonSchemaType string

Example:

var api restApi

// We define the JSON Schema for the transformed valid response
responseModel := api.addModel(jsii.String("ResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.jsonSchemaVersion_DRAFT4,
		title: jsii.String("pollResponse"),
		type: apigateway.jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"greeting": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

// We define the JSON Schema for the transformed error response
errorResponseModel := api.addModel(jsii.String("ErrorResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ErrorResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.*jsonSchemaVersion_DRAFT4,
		title: jsii.String("errorResponse"),
		type: apigateway.*jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"message": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

Experimental.

const (
	// Experimental.
	JsonSchemaType_NULL JsonSchemaType = "NULL"
	// Experimental.
	JsonSchemaType_BOOLEAN JsonSchemaType = "BOOLEAN"
	// Experimental.
	JsonSchemaType_OBJECT JsonSchemaType = "OBJECT"
	// Experimental.
	JsonSchemaType_ARRAY JsonSchemaType = "ARRAY"
	// Experimental.
	JsonSchemaType_NUMBER JsonSchemaType = "NUMBER"
	// Experimental.
	JsonSchemaType_INTEGER JsonSchemaType = "INTEGER"
	// Experimental.
	JsonSchemaType_STRING JsonSchemaType = "STRING"
)

type JsonSchemaVersion

type JsonSchemaVersion string

Example:

var api restApi

// We define the JSON Schema for the transformed valid response
responseModel := api.addModel(jsii.String("ResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.jsonSchemaVersion_DRAFT4,
		title: jsii.String("pollResponse"),
		type: apigateway.jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"greeting": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

// We define the JSON Schema for the transformed error response
errorResponseModel := api.addModel(jsii.String("ErrorResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ErrorResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.*jsonSchemaVersion_DRAFT4,
		title: jsii.String("errorResponse"),
		type: apigateway.*jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"message": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

Experimental.

const (
	// In API Gateway models are defined using the JSON schema draft 4.
	// See: https://tools.ietf.org/html/draft-zyp-json-schema-04
	//
	// Experimental.
	JsonSchemaVersion_DRAFT4 JsonSchemaVersion = "DRAFT4"
	// Experimental.
	JsonSchemaVersion_DRAFT7 JsonSchemaVersion = "DRAFT7"
)

type JsonWithStandardFieldProps

type JsonWithStandardFieldProps struct {
	// If this flag is enabled, the principal identifier of the caller will be output to the log.
	// Experimental.
	Caller *bool `field:"required" json:"caller" yaml:"caller"`
	// If this flag is enabled, the http method will be output to the log.
	// Experimental.
	HttpMethod *bool `field:"required" json:"httpMethod" yaml:"httpMethod"`
	// If this flag is enabled, the source IP of request will be output to the log.
	// Experimental.
	Ip *bool `field:"required" json:"ip" yaml:"ip"`
	// If this flag is enabled, the request protocol will be output to the log.
	// Experimental.
	Protocol *bool `field:"required" json:"protocol" yaml:"protocol"`
	// If this flag is enabled, the CLF-formatted request time((dd/MMM/yyyy:HH:mm:ss +-hhmm) will be output to the log.
	// Experimental.
	RequestTime *bool `field:"required" json:"requestTime" yaml:"requestTime"`
	// If this flag is enabled, the path to your resource will be output to the log.
	// Experimental.
	ResourcePath *bool `field:"required" json:"resourcePath" yaml:"resourcePath"`
	// If this flag is enabled, the response payload length will be output to the log.
	// Experimental.
	ResponseLength *bool `field:"required" json:"responseLength" yaml:"responseLength"`
	// If this flag is enabled, the method response status will be output to the log.
	// Experimental.
	Status *bool `field:"required" json:"status" yaml:"status"`
	// If this flag is enabled, the principal identifier of the user will be output to the log.
	// Experimental.
	User *bool `field:"required" json:"user" yaml:"user"`
}

Properties for controlling items output in JSON standard format.

Example:

// production stage
prdLogGroup := logs.NewLogGroup(this, jsii.String("PrdLogs"))
api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(prdLogGroup),
		accessLogFormat: apigateway.accessLogFormat.jsonWithStandardFields(),
	},
})
deployment := apigateway.NewDeployment(this, jsii.String("Deployment"), &deploymentProps{
	api: api,
})

// development stage
devLogGroup := logs.NewLogGroup(this, jsii.String("DevLogs"))
apigateway.NewStage(this, jsii.String("dev"), &stageProps{
	deployment: deployment,
	accessLogDestination: apigateway.NewLogGroupLogDestination(devLogGroup),
	accessLogFormat: apigateway.*accessLogFormat.jsonWithStandardFields(&jsonWithStandardFieldProps{
		caller: jsii.Boolean(false),
		httpMethod: jsii.Boolean(true),
		ip: jsii.Boolean(true),
		protocol: jsii.Boolean(true),
		requestTime: jsii.Boolean(true),
		resourcePath: jsii.Boolean(true),
		responseLength: jsii.Boolean(true),
		status: jsii.Boolean(true),
		user: jsii.Boolean(true),
	}),
})

Experimental.

type LambdaAuthorizerProps

type LambdaAuthorizerProps struct {
	// The handler for the authorizer lambda function.
	//
	// The handler must follow a very specific protocol on the input it receives and the output it needs to produce.
	// API Gateway has documented the handler's input specification
	// {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-input.html | here} and output specification
	// {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html | here}.
	// Experimental.
	Handler awslambda.IFunction `field:"required" json:"handler" yaml:"handler"`
	// An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.
	//
	// The IAM role must be
	// assumable by 'apigateway.amazonaws.com'.
	// Experimental.
	AssumeRole awsiam.IRole `field:"optional" json:"assumeRole" yaml:"assumeRole"`
	// An optional human friendly name for the authorizer.
	//
	// Note that, this is not the primary identifier of the authorizer.
	// Experimental.
	AuthorizerName *string `field:"optional" json:"authorizerName" yaml:"authorizerName"`
	// How long APIGateway should cache the results.
	//
	// Max 1 hour.
	// Disable caching by setting this to 0.
	// Experimental.
	ResultsCacheTtl awscdk.Duration `field:"optional" json:"resultsCacheTtl" yaml:"resultsCacheTtl"`
}

Base properties for all lambda authorizers.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var duration duration
var function_ function
var role role

lambdaAuthorizerProps := &lambdaAuthorizerProps{
	handler: function_,

	// the properties below are optional
	assumeRole: role,
	authorizerName: jsii.String("authorizerName"),
	resultsCacheTtl: duration,
}

Experimental.

type LambdaIntegration

type LambdaIntegration interface {
	AwsIntegration
	// Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.
	// Experimental.
	Bind(method Method) *IntegrationConfig
}

Integrates an AWS Lambda function to an API Gateway method.

Example:

var resource resource
var handler function

resource.addMethod(jsii.String("GET"), apigateway.NewLambdaIntegration(handler))

Experimental.

func NewLambdaIntegration

func NewLambdaIntegration(handler awslambda.IFunction, options *LambdaIntegrationOptions) LambdaIntegration

Experimental.

type LambdaIntegrationOptions

type LambdaIntegrationOptions struct {
	// A list of request parameters whose values are to be cached.
	//
	// It determines
	// request parameters that will make it into the cache key.
	// Experimental.
	CacheKeyParameters *[]*string `field:"optional" json:"cacheKeyParameters" yaml:"cacheKeyParameters"`
	// An API-specific tag group of related cached parameters.
	// Experimental.
	CacheNamespace *string `field:"optional" json:"cacheNamespace" yaml:"cacheNamespace"`
	// The type of network connection to the integration endpoint.
	// Experimental.
	ConnectionType ConnectionType `field:"optional" json:"connectionType" yaml:"connectionType"`
	// Specifies how to handle request payload content type conversions.
	// Experimental.
	ContentHandling ContentHandling `field:"optional" json:"contentHandling" yaml:"contentHandling"`
	// Requires that the caller's identity be passed through from the request.
	// Experimental.
	CredentialsPassthrough *bool `field:"optional" json:"credentialsPassthrough" yaml:"credentialsPassthrough"`
	// An IAM role that API Gateway assumes.
	//
	// Mutually exclusive with `credentialsPassThrough`.
	// Experimental.
	CredentialsRole awsiam.IRole `field:"optional" json:"credentialsRole" yaml:"credentialsRole"`
	// The response that API Gateway provides after a method's backend completes processing a request.
	//
	// API Gateway intercepts the response from the
	// backend so that you can control how API Gateway surfaces backend
	// responses. For example, you can map the backend status codes to codes
	// that you define.
	// Experimental.
	IntegrationResponses *[]*IntegrationResponse `field:"optional" json:"integrationResponses" yaml:"integrationResponses"`
	// Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.
	//
	// There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
	// NEVER.
	// Experimental.
	PassthroughBehavior PassthroughBehavior `field:"optional" json:"passthroughBehavior" yaml:"passthroughBehavior"`
	// The request parameters that API Gateway sends with the backend request.
	//
	// Specify request parameters as key-value pairs (string-to-string
	// mappings), with a destination as the key and a source as the value.
	//
	// Specify the destination by using the following pattern
	// integration.request.location.name, where location is querystring, path,
	// or header, and name is a valid, unique parameter name.
	//
	// The source must be an existing method request parameter or a static
	// value. You must enclose static values in single quotation marks and
	// pre-encode these values based on their destination in the request.
	// Experimental.
	RequestParameters *map[string]*string `field:"optional" json:"requestParameters" yaml:"requestParameters"`
	// A map of Apache Velocity templates that are applied on the request payload.
	//
	// The template that API Gateway uses is based on the value of the
	// Content-Type header that's sent by the client. The content type value is
	// the key, and the template is the value (specified as a string), such as
	// the following snippet:
	//
	// “`
	//    { "application/json": "{ \"statusCode\": 200 }" }
	// “`.
	// See: http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
	//
	// Experimental.
	RequestTemplates *map[string]*string `field:"optional" json:"requestTemplates" yaml:"requestTemplates"`
	// The maximum amount of time an integration will run before it returns without a response.
	//
	// Must be between 50 milliseconds and 29 seconds.
	// Experimental.
	Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"`
	// The VpcLink used for the integration.
	//
	// Required if connectionType is VPC_LINK.
	// Experimental.
	VpcLink IVpcLink `field:"optional" json:"vpcLink" yaml:"vpcLink"`
	// Allow invoking method from AWS Console UI (for testing purposes).
	//
	// This will add another permission to the AWS Lambda resource policy which
	// will allow the `test-invoke-stage` stage to invoke this handler. If this
	// is set to `false`, the function will only be usable from the deployment
	// endpoint.
	// Experimental.
	AllowTestInvoke *bool `field:"optional" json:"allowTestInvoke" yaml:"allowTestInvoke"`
	// Use proxy integration or normal (request/response mapping) integration.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-output-format
	//
	// Experimental.
	Proxy *bool `field:"optional" json:"proxy" yaml:"proxy"`
}

Example:

var getBookHandler function
var getBookIntegration lambdaIntegration

getBookIntegration := apigateway.NewLambdaIntegration(getBookHandler, &lambdaIntegrationOptions{
	contentHandling: apigateway.contentHandling_CONVERT_TO_TEXT,
	 // convert to base64
	credentialsPassthrough: jsii.Boolean(true),
})

Experimental.

type LambdaRestApi

type LambdaRestApi interface {
	RestApi
	// Experimental.
	CloudWatchAccount() CfnAccount
	// Experimental.
	SetCloudWatchAccount(val CfnAccount)
	// API Gateway stage that points to the latest deployment (if defined).
	//
	// If `deploy` is disabled, you will need to explicitly assign this value in order to
	// set up integrations.
	// Experimental.
	DeploymentStage() Stage
	// Experimental.
	SetDeploymentStage(val Stage)
	// The first domain name mapped to this API, if defined through the `domainName` configuration prop, or added via `addDomainName`.
	// Experimental.
	DomainName() DomainName
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// API Gateway deployment that represents the latest changes of the API.
	//
	// This resource will be automatically updated every time the REST API model changes.
	// This will be undefined if `deploy` is false.
	// Experimental.
	LatestDeployment() Deployment
	// The list of methods bound to this RestApi.
	// Experimental.
	Methods() *[]Method
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ID of this API Gateway RestApi.
	// Experimental.
	RestApiId() *string
	// A human friendly name for this Rest API.
	//
	// Note that this is different from `restApiId`.
	// Experimental.
	RestApiName() *string
	// The resource ID of the root resource.
	// Experimental.
	RestApiRootResourceId() *string
	// Represents the root resource of this API endpoint ('/').
	//
	// Resources and Methods are added to this resource.
	// Experimental.
	Root() IResource
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The deployed root URL of this REST API.
	// Experimental.
	Url() *string
	// Add an ApiKey.
	// Experimental.
	AddApiKey(id *string, options *ApiKeyOptions) IApiKey
	// Defines an API Gateway domain name and maps it to this API.
	// Experimental.
	AddDomainName(id *string, options *DomainNameOptions) DomainName
	// Adds a new gateway response.
	// Experimental.
	AddGatewayResponse(id *string, options *GatewayResponseOptions) GatewayResponse
	// Adds a new model.
	// Experimental.
	AddModel(id *string, props *ModelOptions) Model
	// Adds a new request validator.
	// Experimental.
	AddRequestValidator(id *string, props *RequestValidatorOptions) RequestValidator
	// Adds a usage plan.
	// Experimental.
	AddUsagePlan(id *string, props *UsagePlanProps) UsagePlan
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Gets the "execute-api" ARN.
	// Experimental.
	ArnForExecuteApi(method *string, path *string, stage *string) *string
	// Deprecated: This method will be made internal. No replacement
	ConfigureCloudWatchRole(apiResource CfnRestApi)
	// Deprecated: This method will be made internal. No replacement
	ConfigureDeployment(props *RestApiBaseProps)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns the given named metric for this API.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the API cache in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheHitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the backend in a given period, when API caching is enabled.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheMissCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of client-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricClientError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the total number API requests in a given period.
	//
	// Default: sample count over 5 minutes.
	// Experimental.
	MetricCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricIntegrationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The time between when API Gateway receives a request from a client and when it returns a response to the client.
	//
	// The latency includes the integration latency and other API Gateway overhead.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of server-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricServerError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Returns the URL for an HTTP path.
	//
	// Fails if `deploymentStage` is not set either by `deploy` or explicitly.
	// Experimental.
	UrlForPath(path *string) *string
	// Performs validation of the REST API.
	// Experimental.
	Validate() *[]*string
}

Defines an API Gateway REST API with AWS Lambda proxy integration.

Use the `proxy` property to define a greedy proxy ("{proxy+}") and "ANY" method from the specified path. If not defined, you will need to explicity add resources and methods to the API.

Example:

var backend function

api := apigateway.NewLambdaRestApi(this, jsii.String("myapi"), &lambdaRestApiProps{
	handler: backend,
	proxy: jsii.Boolean(false),
})

items := api.root.addResource(jsii.String("items"))
items.addMethod(jsii.String("GET")) // GET /items
items.addMethod(jsii.String("POST")) // POST /items

item := items.addResource(jsii.String("{item}"))
item.addMethod(jsii.String("GET")) // GET /items/{item}

// the default integration for methods is "handler", but one can
// customize this behavior per method or even a sub path.
item.addMethod(jsii.String("DELETE"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")))

Experimental.

func NewLambdaRestApi

func NewLambdaRestApi(scope constructs.Construct, id *string, props *LambdaRestApiProps) LambdaRestApi

Experimental.

type LambdaRestApiProps

type LambdaRestApiProps struct {
	// Automatically configure an AWS CloudWatch role for API Gateway.
	// Experimental.
	CloudWatchRole *bool `field:"optional" json:"cloudWatchRole" yaml:"cloudWatchRole"`
	// Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.
	//
	// 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.
	// Experimental.
	Deploy *bool `field:"optional" json:"deploy" yaml:"deploy"`
	// Options for the API Gateway stage that will always point to the latest deployment when `deploy` is enabled.
	//
	// If `deploy` is disabled,
	// this value cannot be set.
	// Experimental.
	DeployOptions *StageOptions `field:"optional" json:"deployOptions" yaml:"deployOptions"`
	// Specifies whether clients can invoke the API using the default execute-api endpoint.
	//
	// To require that clients use a custom domain name to invoke the
	// API, disable the default endpoint.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
	//
	// Experimental.
	DisableExecuteApiEndpoint *bool `field:"optional" json:"disableExecuteApiEndpoint" yaml:"disableExecuteApiEndpoint"`
	// Configure a custom domain name and map it to this API.
	// Experimental.
	DomainName *DomainNameOptions `field:"optional" json:"domainName" yaml:"domainName"`
	// Export name for the CfnOutput containing the API endpoint.
	// Experimental.
	EndpointExportName *string `field:"optional" json:"endpointExportName" yaml:"endpointExportName"`
	// A list of the endpoint types of the API.
	//
	// Use this property when creating
	// an API.
	// Experimental.
	EndpointTypes *[]EndpointType `field:"optional" json:"endpointTypes" yaml:"endpointTypes"`
	// Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.
	// Experimental.
	FailOnWarnings *bool `field:"optional" json:"failOnWarnings" yaml:"failOnWarnings"`
	// Custom header parameters for the request.
	// See: https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html
	//
	// Experimental.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// A policy document that contains the permissions for this RestApi.
	// Experimental.
	Policy awsiam.PolicyDocument `field:"optional" json:"policy" yaml:"policy"`
	// A name for the API Gateway RestApi resource.
	// Experimental.
	RestApiName *string `field:"optional" json:"restApiName" yaml:"restApiName"`
	// Retains old deployment resources when the API changes.
	//
	// This allows
	// manually reverting stages to point to old deployments via the AWS
	// Console.
	// Experimental.
	RetainDeployments *bool `field:"optional" json:"retainDeployments" yaml:"retainDeployments"`
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
	// The source of the API key for metering requests according to a usage plan.
	// Experimental.
	ApiKeySourceType ApiKeySourceType `field:"optional" json:"apiKeySourceType" yaml:"apiKeySourceType"`
	// The list of binary media mime-types that are supported by the RestApi resource, such as "image/png" or "application/octet-stream".
	// Experimental.
	BinaryMediaTypes *[]*string `field:"optional" json:"binaryMediaTypes" yaml:"binaryMediaTypes"`
	// The ID of the API Gateway RestApi resource that you want to clone.
	// Experimental.
	CloneFrom IRestApi `field:"optional" json:"cloneFrom" yaml:"cloneFrom"`
	// A description of the purpose of this API Gateway RestApi resource.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The EndpointConfiguration property type specifies the endpoint types of a REST API.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-restapi-endpointconfiguration.html
	//
	// Experimental.
	EndpointConfiguration *EndpointConfiguration `field:"optional" json:"endpointConfiguration" yaml:"endpointConfiguration"`
	// A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.
	//
	// When compression is enabled, compression or
	// decompression is not applied on the payload if the payload size is
	// smaller than this value. Setting it to zero allows compression for any
	// payload size.
	// Experimental.
	MinimumCompressionSize *float64 `field:"optional" json:"minimumCompressionSize" yaml:"minimumCompressionSize"`
	// The default Lambda function that handles all requests from this API.
	//
	// This handler will be used as a the default integration for all methods in
	// this API, unless specified otherwise in `addMethod`.
	// Experimental.
	Handler awslambda.IFunction `field:"required" json:"handler" yaml:"handler"`
	// Deprecated: the `LambdaRestApiProps` now extends `RestApiProps`, so all
	// options are just available here. Note that the options specified in
	// `options` will be overridden by any props specified at the root level.
	Options *RestApiProps `field:"optional" json:"options" yaml:"options"`
	// If true, route all requests to the Lambda Function.
	//
	// If set to false, you will need to explicitly define the API model using
	// `addResource` and `addMethod` (or `addProxy`).
	// Experimental.
	Proxy *bool `field:"optional" json:"proxy" yaml:"proxy"`
}

Example:

var backend function

api := apigateway.NewLambdaRestApi(this, jsii.String("myapi"), &lambdaRestApiProps{
	handler: backend,
	proxy: jsii.Boolean(false),
})

items := api.root.addResource(jsii.String("items"))
items.addMethod(jsii.String("GET")) // GET /items
items.addMethod(jsii.String("POST")) // POST /items

item := items.addResource(jsii.String("{item}"))
item.addMethod(jsii.String("GET")) // GET /items/{item}

// the default integration for methods is "handler", but one can
// customize this behavior per method or even a sub path.
item.addMethod(jsii.String("DELETE"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")))

Experimental.

type LogGroupLogDestination

type LogGroupLogDestination interface {
	IAccessLogDestination
	// Binds this destination to the CloudWatch Logs.
	// Experimental.
	Bind(_stage IStage) *AccessLogDestinationConfig
}

Use CloudWatch Logs as a custom access log destination for API Gateway.

Example:

logGroup := logs.NewLogGroup(this, jsii.String("ApiGatewayAccessLogs"))
apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(logGroup),
		accessLogFormat: apigateway.accessLogFormat.custom(
		fmt.Sprintf("%v %v %v", apigateway.accessLogField.contextRequestId(), apigateway.*accessLogField.contextErrorMessage(), apigateway.*accessLogField.contextErrorMessageString())),
	},
})

Experimental.

func NewLogGroupLogDestination

func NewLogGroupLogDestination(logGroup awslogs.ILogGroup) LogGroupLogDestination

Experimental.

type MTLSConfig

type MTLSConfig struct {
	// The bucket that the trust store is hosted in.
	// Experimental.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// The key in S3 to look at for the trust store.
	// Experimental.
	Key *string `field:"required" json:"key" yaml:"key"`
	// The version of the S3 object that contains your truststore.
	//
	// To specify a version, you must have versioning enabled for the S3 bucket.
	// Experimental.
	Version *string `field:"optional" json:"version" yaml:"version"`
}

The mTLS authentication configuration for a custom domain name.

Example:

var acm interface{}

apigateway.NewDomainName(this, jsii.String("domain-name"), &domainNameProps{
	domainName: jsii.String("example.com"),
	certificate: acm.certificate_FromCertificateArn(this, jsii.String("cert"), jsii.String("arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d")),
	mtls: &mTLSConfig{
		bucket: s3.NewBucket(this, jsii.String("bucket")),
		key: jsii.String("truststore.pem"),
		version: jsii.String("version"),
	},
})

Experimental.

type Method

type Method interface {
	awscdk.Resource
	// The API Gateway RestApi associated with this method.
	// Experimental.
	Api() IRestApi
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// Experimental.
	HttpMethod() *string
	// Returns an execute-api ARN for this method:.
	//
	// arn:aws:execute-api:{region}:{account}:{restApiId}/{stage}/{method}/{path}
	//
	// NOTE: {stage} will refer to the `restApi.deploymentStage`, which will
	// automatically set if auto-deploy is enabled, or can be explicitly assigned.
	// When not configured, {stage} will be set to '*', as a shorthand for 'all stages'.
	// Experimental.
	MethodArn() *string
	// Experimental.
	MethodId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// Experimental.
	Resource() IResource
	// The RestApi associated with this Method.
	// Deprecated: - Throws an error if this Resource is not associated with an instance of `RestApi`. Use `api` instead.
	RestApi() RestApi
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Returns an execute-api ARN for this method's "test-invoke-stage" stage.
	//
	// This stage is used by the AWS Console UI when testing the method.
	// Experimental.
	TestMethodArn() *string
	// Add a method response to this method.
	// Experimental.
	AddMethodResponse(methodResponse *MethodResponse)
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Example:

var integration lambdaIntegration

api := apigateway.NewRestApi(this, jsii.String("hello-api"))

v1 := api.root.addResource(jsii.String("v1"))
echo := v1.addResource(jsii.String("echo"))
echoMethod := echo.addMethod(jsii.String("GET"), integration, &methodOptions{
	apiKeyRequired: jsii.Boolean(true),
})

plan := api.addUsagePlan(jsii.String("UsagePlan"), &usagePlanProps{
	name: jsii.String("Easy"),
	throttle: &throttleSettings{
		rateLimit: jsii.Number(10),
		burstLimit: jsii.Number(2),
	},
})

key := api.addApiKey(jsii.String("ApiKey"))
plan.addApiKey(key)

Experimental.

func NewMethod

func NewMethod(scope constructs.Construct, id *string, props *MethodProps) Method

Experimental.

type MethodDeploymentOptions

type MethodDeploymentOptions struct {
	// Indicates whether the cached responses are encrypted.
	// Experimental.
	CacheDataEncrypted *bool `field:"optional" json:"cacheDataEncrypted" yaml:"cacheDataEncrypted"`
	// Specifies the time to live (TTL), in seconds, for cached responses.
	//
	// The
	// higher the TTL, the longer the response will be cached.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
	//
	// Experimental.
	CacheTtl awscdk.Duration `field:"optional" json:"cacheTtl" yaml:"cacheTtl"`
	// Specifies whether responses should be cached and returned for requests.
	//
	// A
	// cache cluster must be enabled on the stage for responses to be cached.
	// Experimental.
	CachingEnabled *bool `field:"optional" json:"cachingEnabled" yaml:"cachingEnabled"`
	// Specifies whether data trace logging is enabled for this method.
	//
	// When enabled, API gateway will log the full API requests and responses.
	// This can be useful to troubleshoot APIs, but can result in logging sensitive data.
	// We recommend that you don't enable this feature for production APIs.
	// Experimental.
	DataTraceEnabled *bool `field:"optional" json:"dataTraceEnabled" yaml:"dataTraceEnabled"`
	// Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
	// Experimental.
	LoggingLevel MethodLoggingLevel `field:"optional" json:"loggingLevel" yaml:"loggingLevel"`
	// Specifies whether Amazon CloudWatch metrics are enabled for this method.
	// Experimental.
	MetricsEnabled *bool `field:"optional" json:"metricsEnabled" yaml:"metricsEnabled"`
	// Specifies the throttling burst limit.
	//
	// The total rate of all requests in your AWS account is limited to 5,000 requests.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
	//
	// Experimental.
	ThrottlingBurstLimit *float64 `field:"optional" json:"throttlingBurstLimit" yaml:"throttlingBurstLimit"`
	// Specifies the throttling rate limit.
	//
	// The total rate of all requests in your AWS account is limited to 10,000 requests per second (rps).
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
	//
	// Experimental.
	ThrottlingRateLimit *float64 `field:"optional" json:"throttlingRateLimit" yaml:"throttlingRateLimit"`
}

Example:

api := apigateway.NewRestApi(this, jsii.String("books"))
deployment := apigateway.NewDeployment(this, jsii.String("my-deployment"), &deploymentProps{
	api: api,
})
stage := apigateway.NewStage(this, jsii.String("my-stage"), &stageProps{
	deployment: deployment,
	methodOptions: map[string]methodDeploymentOptions{
		"/*/*": &methodDeploymentOptions{
			 // This special path applies to all resource paths and all HTTP methods
			"throttlingRateLimit": jsii.Number(100),
			"throttlingBurstLimit": jsii.Number(200),
		},
	},
})

Experimental.

type MethodLoggingLevel

type MethodLoggingLevel string

Example:

api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		loggingLevel: apigateway.methodLoggingLevel_INFO,
		dataTraceEnabled: jsii.Boolean(true),
	},
})

Experimental.

const (
	// Experimental.
	MethodLoggingLevel_OFF MethodLoggingLevel = "OFF"
	// Experimental.
	MethodLoggingLevel_ERROR MethodLoggingLevel = "ERROR"
	// Experimental.
	MethodLoggingLevel_INFO MethodLoggingLevel = "INFO"
)

type MethodOptions

type MethodOptions struct {
	// Indicates whether the method requires clients to submit a valid API key.
	// Experimental.
	ApiKeyRequired *bool `field:"optional" json:"apiKeyRequired" yaml:"apiKeyRequired"`
	// A list of authorization scopes configured on the method.
	//
	// The scopes are used with
	// a COGNITO_USER_POOLS authorizer to authorize the method invocation.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-authorizationscopes
	//
	// Experimental.
	AuthorizationScopes *[]*string `field:"optional" json:"authorizationScopes" yaml:"authorizationScopes"`
	// Method authorization. If the value is set of `Custom`, an `authorizer` must also be specified.
	//
	// If you're using one of the authorizers that are available via the {@link Authorizer} class, such as {@link Authorizer#token()},
	// it is recommended that this option not be specified. The authorizer will take care of setting the correct authorization type.
	// However, specifying an authorization type using this property that conflicts with what is expected by the {@link Authorizer}
	// will result in an error.
	// Experimental.
	AuthorizationType AuthorizationType `field:"optional" json:"authorizationType" yaml:"authorizationType"`
	// If `authorizationType` is `Custom`, this specifies the ID of the method authorizer resource.
	//
	// If specified, the value of `authorizationType` must be set to `Custom`.
	// Experimental.
	Authorizer IAuthorizer `field:"optional" json:"authorizer" yaml:"authorizer"`
	// The responses that can be sent to the client who calls the method.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-settings-method-response.html
	//
	// Experimental.
	MethodResponses *[]*MethodResponse `field:"optional" json:"methodResponses" yaml:"methodResponses"`
	// A friendly operation name for the method.
	//
	// For example, you can assign the
	// OperationName of ListPets for the GET /pets method.
	// Experimental.
	OperationName *string `field:"optional" json:"operationName" yaml:"operationName"`
	// The models which describe data structure of request payload.
	//
	// When
	// combined with `requestValidator` or `requestValidatorOptions`, the service
	// will validate the API request payload before it reaches the API's Integration (including proxies).
	// Specify `requestModels` as key-value pairs, with a content type
	// (e.g. `'application/json'`) as the key and an API Gateway Model as the value.
	//
	// Example:
	//   var api restApi
	//   var userLambda function
	//
	//
	//   userModel := api.addModel(jsii.String("UserModel"), &modelOptions{
	//   	schema: &jsonSchema{
	//   		type: apigateway.jsonSchemaType_OBJECT,
	//   		properties: map[string]*jsonSchema{
	//   			"userId": &jsonSchema{
	//   				"type": apigateway.*jsonSchemaType_STRING,
	//   			},
	//   			"name": &jsonSchema{
	//   				"type": apigateway.*jsonSchemaType_STRING,
	//   			},
	//   		},
	//   		required: []*string{
	//   			jsii.String("userId"),
	//   		},
	//   	},
	//   })
	//   api.root.addResource(jsii.String("user")).addMethod(jsii.String("POST"),
	//   apigateway.NewLambdaIntegration(userLambda), &methodOptions{
	//   	requestModels: map[string]iModel{
	//   		"application/json": userModel,
	//   	},
	//   })
	//
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-settings-method-request.html#setup-method-request-model
	//
	// Experimental.
	RequestModels *map[string]IModel `field:"optional" json:"requestModels" yaml:"requestModels"`
	// The request parameters that API Gateway accepts.
	//
	// Specify request parameters
	// as key-value pairs (string-to-Boolean mapping), with a source as the key and
	// a Boolean as the value. The Boolean specifies whether a parameter is required.
	// A source must match the format method.request.location.name, where the location
	// is querystring, path, or header, and name is a valid, unique parameter name.
	// Experimental.
	RequestParameters *map[string]*bool `field:"optional" json:"requestParameters" yaml:"requestParameters"`
	// The ID of the associated request validator.
	//
	// Only one of `requestValidator` or `requestValidatorOptions` must be specified.
	// Works together with `requestModels` or `requestParameters` to validate
	// the request before it reaches integration like Lambda Proxy Integration.
	// Experimental.
	RequestValidator IRequestValidator `field:"optional" json:"requestValidator" yaml:"requestValidator"`
	// Request validator options to create new validator Only one of `requestValidator` or `requestValidatorOptions` must be specified.
	//
	// Works together with `requestModels` or `requestParameters` to validate
	// the request before it reaches integration like Lambda Proxy Integration.
	// Experimental.
	RequestValidatorOptions *RequestValidatorOptions `field:"optional" json:"requestValidatorOptions" yaml:"requestValidatorOptions"`
}

Example:

var api restApi
var userLambda function

userModel := api.addModel(jsii.String("UserModel"), &modelOptions{
	schema: &jsonSchema{
		type: apigateway.jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"userId": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"name": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
		required: []*string{
			jsii.String("userId"),
		},
	},
})
api.root.addResource(jsii.String("user")).addMethod(jsii.String("POST"),
apigateway.NewLambdaIntegration(userLambda), &methodOptions{
	requestModels: map[string]iModel{
		"application/json": userModel,
	},
})

Experimental.

type MethodProps

type MethodProps struct {
	// The HTTP method ("GET", "POST", "PUT", ...) that clients use to call this method.
	// Experimental.
	HttpMethod *string `field:"required" json:"httpMethod" yaml:"httpMethod"`
	// The resource this method is associated with.
	//
	// For root resource methods,
	// specify the `RestApi` object.
	// Experimental.
	Resource IResource `field:"required" json:"resource" yaml:"resource"`
	// The backend system that the method calls when it receives a request.
	// Experimental.
	Integration Integration `field:"optional" json:"integration" yaml:"integration"`
	// Method options.
	// Experimental.
	Options *MethodOptions `field:"optional" json:"options" yaml:"options"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var authorizer authorizer
var integration integration
var model model
var requestValidator requestValidator
var resource resource

methodProps := &methodProps{
	httpMethod: jsii.String("httpMethod"),
	resource: resource,

	// the properties below are optional
	integration: integration,
	options: &methodOptions{
		apiKeyRequired: jsii.Boolean(false),
		authorizationScopes: []*string{
			jsii.String("authorizationScopes"),
		},
		authorizationType: awscdk.Aws_apigateway.authorizationType_NONE,
		authorizer: authorizer,
		methodResponses: []methodResponse{
			&methodResponse{
				statusCode: jsii.String("statusCode"),

				// the properties below are optional
				responseModels: map[string]iModel{
					"responseModelsKey": model,
				},
				responseParameters: map[string]*bool{
					"responseParametersKey": jsii.Boolean(false),
				},
			},
		},
		operationName: jsii.String("operationName"),
		requestModels: map[string]*iModel{
			"requestModelsKey": model,
		},
		requestParameters: map[string]*bool{
			"requestParametersKey": jsii.Boolean(false),
		},
		requestValidator: requestValidator,
		requestValidatorOptions: &requestValidatorOptions{
			requestValidatorName: jsii.String("requestValidatorName"),
			validateRequestBody: jsii.Boolean(false),
			validateRequestParameters: jsii.Boolean(false),
		},
	},
}

Experimental.

type MethodResponse

type MethodResponse struct {
	// The method response's status code, which you map to an IntegrationResponse.
	//
	// Required.
	// Experimental.
	StatusCode *string `field:"required" json:"statusCode" yaml:"statusCode"`
	// The resources used for the response's content type.
	//
	// Specify response models as
	// key-value pairs (string-to-string maps), with a content type as the key and a Model
	// resource name as the value.
	// Experimental.
	ResponseModels *map[string]IModel `field:"optional" json:"responseModels" yaml:"responseModels"`
	// Response parameters that API Gateway sends to the client that called a method.
	//
	// Specify response parameters as key-value pairs (string-to-Boolean maps), with
	// a destination as the key and a Boolean as the value. Specify the destination
	// using the following pattern: method.response.header.name, where the name is a
	// valid, unique header name. The Boolean specifies whether a parameter is required.
	// Experimental.
	ResponseParameters *map[string]*bool `field:"optional" json:"responseParameters" yaml:"responseParameters"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var model model

methodResponse := &methodResponse{
	statusCode: jsii.String("statusCode"),

	// the properties below are optional
	responseModels: map[string]iModel{
		"responseModelsKey": model,
	},
	responseParameters: map[string]*bool{
		"responseParametersKey": jsii.Boolean(false),
	},
}

Experimental.

type MockIntegration

type MockIntegration interface {
	Integration
	// Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.
	// Experimental.
	Bind(_method Method) *IntegrationConfig
}

This type of integration lets API Gateway return a response without sending the request further to the backend.

This is useful for API testing because it can be used to test the integration set up without incurring charges for using the backend and to enable collaborative development of an API. In collaborative development, a team can isolate their development effort by setting up simulations of API components owned by other teams by using the MOCK integrations. It is also used to return CORS-related headers to ensure that the API method permits CORS access. In fact, the API Gateway console integrates the OPTIONS method to support CORS with a mock integration. Gateway responses are other examples of mock integrations.

Example:

import path "github.com/aws-samples/dummy/path"
import lambda "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

// Against the RestApi endpoint from the stack output, run
// `curl -s -o /dev/null -w "%{http_code}" <url>` should return 401
// `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: deny' <url>?allow=yes` should return 403
// `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: allow' <url>?allow=yes` should return 200

app := awscdk.NewApp()
stack := awscdk.NewStack(app, jsii.String("RequestAuthorizerInteg"))

authorizerFn := lambda.NewFunction(stack, jsii.String("MyAuthorizerFunction"), &functionProps{
	runtime: lambda.runtime_NODEJS_14_X(),
	handler: jsii.String("index.handler"),
	code: lambda.assetCode.fromAsset(path.join(__dirname, jsii.String("integ.request-authorizer.handler"))),
})

restapi := awscdk.NewRestApi(stack, jsii.String("MyRestApi"))

authorizer := awscdk.NewRequestAuthorizer(stack, jsii.String("MyAuthorizer"), &requestAuthorizerProps{
	handler: authorizerFn,
	identitySources: []*string{
		awscdk.IdentitySource.header(jsii.String("Authorization")),
		awscdk.IdentitySource.queryString(jsii.String("allow")),
	},
})

restapi.root.addMethod(jsii.String("ANY"), awscdk.NewMockIntegration(&integrationOptions{
	integrationResponses: []integrationResponse{
		&integrationResponse{
			statusCode: jsii.String("200"),
		},
	},
	passthroughBehavior: awscdk.PassthroughBehavior_NEVER,
	requestTemplates: map[string]*string{
		"application/json": jsii.String("{ \"statusCode\": 200 }"),
	},
}), &methodOptions{
	methodResponses: []methodResponse{
		&methodResponse{
			statusCode: jsii.String("200"),
		},
	},
	authorizer: authorizer,
})

Experimental.

func NewMockIntegration

func NewMockIntegration(options *IntegrationOptions) MockIntegration

Experimental.

type Model

type Model interface {
	awscdk.Resource
	IModel
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// Returns the model name, such as 'myModel'.
	// Experimental.
	ModelId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Example:

var api restApi

// We define the JSON Schema for the transformed valid response
responseModel := api.addModel(jsii.String("ResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.jsonSchemaVersion_DRAFT4,
		title: jsii.String("pollResponse"),
		type: apigateway.jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"greeting": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

// We define the JSON Schema for the transformed error response
errorResponseModel := api.addModel(jsii.String("ErrorResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ErrorResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.*jsonSchemaVersion_DRAFT4,
		title: jsii.String("errorResponse"),
		type: apigateway.*jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"message": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

Experimental.

func NewModel

func NewModel(scope constructs.Construct, id *string, props *ModelProps) Model

Experimental.

type ModelOptions

type ModelOptions struct {
	// The schema to use to transform data to one or more output formats.
	//
	// Specify null ({}) if you don't want to specify a schema.
	// Experimental.
	Schema *JsonSchema `field:"required" json:"schema" yaml:"schema"`
	// The content type for the model.
	//
	// You can also force a
	// content type in the request or response model mapping.
	// Experimental.
	ContentType *string `field:"optional" json:"contentType" yaml:"contentType"`
	// A description that identifies this model.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// A name for the model.
	//
	// Important
	//   If you specify a name, you cannot perform updates that
	//   require replacement of this resource. You can perform
	//   updates that require no or some interruption. If you
	//   must replace the resource, specify a new name.
	// Experimental.
	ModelName *string `field:"optional" json:"modelName" yaml:"modelName"`
}

Example:

var api restApi

// We define the JSON Schema for the transformed valid response
responseModel := api.addModel(jsii.String("ResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.jsonSchemaVersion_DRAFT4,
		title: jsii.String("pollResponse"),
		type: apigateway.jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"greeting": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

// We define the JSON Schema for the transformed error response
errorResponseModel := api.addModel(jsii.String("ErrorResponseModel"), &modelOptions{
	contentType: jsii.String("application/json"),
	modelName: jsii.String("ErrorResponseModel"),
	schema: &jsonSchema{
		schema: apigateway.*jsonSchemaVersion_DRAFT4,
		title: jsii.String("errorResponse"),
		type: apigateway.*jsonSchemaType_OBJECT,
		properties: map[string]*jsonSchema{
			"state": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
			"message": &jsonSchema{
				"type": apigateway.*jsonSchemaType_STRING,
			},
		},
	},
})

Experimental.

type ModelProps

type ModelProps struct {
	// The schema to use to transform data to one or more output formats.
	//
	// Specify null ({}) if you don't want to specify a schema.
	// Experimental.
	Schema *JsonSchema `field:"required" json:"schema" yaml:"schema"`
	// The content type for the model.
	//
	// You can also force a
	// content type in the request or response model mapping.
	// Experimental.
	ContentType *string `field:"optional" json:"contentType" yaml:"contentType"`
	// A description that identifies this model.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// A name for the model.
	//
	// Important
	//   If you specify a name, you cannot perform updates that
	//   require replacement of this resource. You can perform
	//   updates that require no or some interruption. If you
	//   must replace the resource, specify a new name.
	// Experimental.
	ModelName *string `field:"optional" json:"modelName" yaml:"modelName"`
	// The rest API that this model is part of.
	//
	// The reason we need the RestApi object itself and not just the ID is because the model
	// is being tracked by the top-level RestApi object for the purpose of calculating it's
	// hash to determine the ID of the deployment. This allows us to automatically update
	// the deployment when the model of the REST API changes.
	// Experimental.
	RestApi IRestApi `field:"required" json:"restApi" yaml:"restApi"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var default_ interface{}
var enum_ interface{}
var jsonSchema_ jsonSchema
var restApi restApi

modelProps := &modelProps{
	restApi: restApi,
	schema: &jsonSchema{
		additionalItems: []*jsonSchema{
			jsonSchema_,
		},
		additionalProperties: jsii.Boolean(false),
		allOf: []*jsonSchema{
			jsonSchema_,
		},
		anyOf: []*jsonSchema{
			jsonSchema_,
		},
		contains: jsonSchema_,
		default: default_,
		definitions: map[string]*jsonSchema{
			"definitionsKey": jsonSchema_,
		},
		dependencies: map[string]interface{}{
			"dependenciesKey": jsonSchema_,
		},
		description: jsii.String("description"),
		enum: []interface{}{
			enum_,
		},
		exclusiveMaximum: jsii.Boolean(false),
		exclusiveMinimum: jsii.Boolean(false),
		format: jsii.String("format"),
		id: jsii.String("id"),
		items: jsonSchema_,
		maximum: jsii.Number(123),
		maxItems: jsii.Number(123),
		maxLength: jsii.Number(123),
		maxProperties: jsii.Number(123),
		minimum: jsii.Number(123),
		minItems: jsii.Number(123),
		minLength: jsii.Number(123),
		minProperties: jsii.Number(123),
		multipleOf: jsii.Number(123),
		not: jsonSchema_,
		oneOf: []*jsonSchema{
			jsonSchema_,
		},
		pattern: jsii.String("pattern"),
		patternProperties: map[string]*jsonSchema{
			"patternPropertiesKey": jsonSchema_,
		},
		properties: map[string]*jsonSchema{
			"propertiesKey": jsonSchema_,
		},
		propertyNames: jsonSchema_,
		ref: jsii.String("ref"),
		required: []*string{
			jsii.String("required"),
		},
		schema: awscdk.Aws_apigateway.jsonSchemaVersion_DRAFT4,
		title: jsii.String("title"),
		type: awscdk.*Aws_apigateway.jsonSchemaType_NULL,
		uniqueItems: jsii.Boolean(false),
	},

	// the properties below are optional
	contentType: jsii.String("contentType"),
	description: jsii.String("description"),
	modelName: jsii.String("modelName"),
}

Experimental.

type PassthroughBehavior

type PassthroughBehavior string

Example:

import path "github.com/aws-samples/dummy/path"
import lambda "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

// Against the RestApi endpoint from the stack output, run
// `curl -s -o /dev/null -w "%{http_code}" <url>` should return 401
// `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: deny' <url>?allow=yes` should return 403
// `curl -s -o /dev/null -w "%{http_code}" -H 'Authorization: allow' <url>?allow=yes` should return 200

app := awscdk.NewApp()
stack := awscdk.NewStack(app, jsii.String("RequestAuthorizerInteg"))

authorizerFn := lambda.NewFunction(stack, jsii.String("MyAuthorizerFunction"), &functionProps{
	runtime: lambda.runtime_NODEJS_14_X(),
	handler: jsii.String("index.handler"),
	code: lambda.assetCode.fromAsset(path.join(__dirname, jsii.String("integ.request-authorizer.handler"))),
})

restapi := awscdk.NewRestApi(stack, jsii.String("MyRestApi"))

authorizer := awscdk.NewRequestAuthorizer(stack, jsii.String("MyAuthorizer"), &requestAuthorizerProps{
	handler: authorizerFn,
	identitySources: []*string{
		awscdk.IdentitySource.header(jsii.String("Authorization")),
		awscdk.IdentitySource.queryString(jsii.String("allow")),
	},
})

restapi.root.addMethod(jsii.String("ANY"), awscdk.NewMockIntegration(&integrationOptions{
	integrationResponses: []integrationResponse{
		&integrationResponse{
			statusCode: jsii.String("200"),
		},
	},
	passthroughBehavior: awscdk.PassthroughBehavior_NEVER,
	requestTemplates: map[string]*string{
		"application/json": jsii.String("{ \"statusCode\": 200 }"),
	},
}), &methodOptions{
	methodResponses: []methodResponse{
		&methodResponse{
			statusCode: jsii.String("200"),
		},
	},
	authorizer: authorizer,
})

Experimental.

const (
	// Passes the request body for unmapped content types through to the integration back end without transformation.
	// Experimental.
	PassthroughBehavior_WHEN_NO_MATCH PassthroughBehavior = "WHEN_NO_MATCH"
	// Rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.
	// Experimental.
	PassthroughBehavior_NEVER PassthroughBehavior = "NEVER"
	// Allows pass-through when the integration has NO content types mapped to templates.
	//
	// However if there is at least one content type defined,
	// unmapped content types will be rejected with the same 415 response.
	// Experimental.
	PassthroughBehavior_WHEN_NO_TEMPLATES PassthroughBehavior = "WHEN_NO_TEMPLATES"
)

type Period

type Period string

Time period for which quota settings apply.

Example:

var api restApi

key := apigateway.NewRateLimitedApiKey(this, jsii.String("rate-limited-api-key"), &rateLimitedApiKeyProps{
	customerId: jsii.String("hello-customer"),
	resources: []iRestApi{
		api,
	},
	quota: &quotaSettings{
		limit: jsii.Number(10000),
		period: apigateway.period_MONTH,
	},
})

Experimental.

const (
	// Experimental.
	Period_DAY Period = "DAY"
	// Experimental.
	Period_WEEK Period = "WEEK"
	// Experimental.
	Period_MONTH Period = "MONTH"
)

type ProxyResource

type ProxyResource interface {
	Resource
	// If `props.anyMethod` is `true`, this will be the reference to the 'ANY' method associated with this proxy resource.
	// Experimental.
	AnyMethod() Method
	// The rest API that this resource is part of.
	//
	// The reason we need the RestApi object itself and not just the ID is because the model
	// is being tracked by the top-level RestApi object for the purpose of calculating it's
	// hash to determine the ID of the deployment. This allows us to automatically update
	// the deployment when the model of the REST API changes.
	// Experimental.
	Api() IRestApi
	// Default options for CORS preflight OPTIONS method.
	// Experimental.
	DefaultCorsPreflightOptions() *CorsOptions
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration() Integration
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions() *MethodOptions
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The parent of this resource or undefined for the root resource.
	// Experimental.
	ParentResource() IResource
	// The full path of this resource.
	// Experimental.
	Path() *string
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ID of the resource.
	// Experimental.
	ResourceId() *string
	// The RestApi associated with this Resource.
	// Deprecated: - Throws an error if this Resource is not associated with an instance of `RestApi`. Use `api` instead.
	RestApi() RestApi
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Deprecated: - Throws error in some use cases that have been enabled since this deprecation notice. Use `RestApi.urlForPath()` instead.
	Url() *string
	// Adds an OPTIONS method to this resource which responds to Cross-Origin Resource Sharing (CORS) preflight requests.
	//
	// Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional
	// HTTP headers to tell browsers to give a web application running at one
	// origin, access to selected resources from a different origin. A web
	// application executes a cross-origin HTTP request when it requests a
	// resource that has a different origin (domain, protocol, or port) from its
	// own.
	// Experimental.
	AddCorsPreflight(options *CorsOptions) Method
	// Defines a new method for this resource.
	// Experimental.
	AddMethod(httpMethod *string, integration Integration, options *MethodOptions) Method
	// Adds a greedy proxy resource ("{proxy+}") and an ANY method to this route.
	// Experimental.
	AddProxy(options *ProxyResourceOptions) ProxyResource
	// Defines a new child resource where this resource is the parent.
	// Experimental.
	AddResource(pathPart *string, options *ResourceOptions) Resource
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Retrieves a child resource by path part.
	// Experimental.
	GetResource(pathPart *string) IResource
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Gets or create all resources leading up to the specified path.
	//
	// - Path may only start with "/" if this method is called on the root resource.
	// - All resources are created using default options.
	// Experimental.
	ResourceForPath(path *string) Resource
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Defines a {proxy+} greedy resource and an ANY method on a route.

Example:

var resource resource
var handler function

proxy := resource.addProxy(&proxyResourceOptions{
	defaultIntegration: apigateway.NewLambdaIntegration(handler),

	// "false" will require explicitly adding methods on the `proxy` resource
	anyMethod: jsii.Boolean(true),
})

See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html

Experimental.

func NewProxyResource

func NewProxyResource(scope constructs.Construct, id *string, props *ProxyResourceProps) ProxyResource

Experimental.

type ProxyResourceOptions

type ProxyResourceOptions struct {
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
	// Adds an "ANY" method to this resource.
	//
	// If set to `false`, you will have to explicitly
	// add methods to this resource after it's created.
	// Experimental.
	AnyMethod *bool `field:"optional" json:"anyMethod" yaml:"anyMethod"`
}

Example:

var resource resource
var handler function

proxy := resource.addProxy(&proxyResourceOptions{
	defaultIntegration: apigateway.NewLambdaIntegration(handler),

	// "false" will require explicitly adding methods on the `proxy` resource
	anyMethod: jsii.Boolean(true),
})

Experimental.

type ProxyResourceProps

type ProxyResourceProps struct {
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
	// Adds an "ANY" method to this resource.
	//
	// If set to `false`, you will have to explicitly
	// add methods to this resource after it's created.
	// Experimental.
	AnyMethod *bool `field:"optional" json:"anyMethod" yaml:"anyMethod"`
	// The parent resource of this resource.
	//
	// You can either pass another
	// `Resource` object or a `RestApi` object here.
	// Experimental.
	Parent IResource `field:"required" json:"parent" yaml:"parent"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var authorizer authorizer
var duration duration
var integration integration
var model model
var requestValidator requestValidator
var resource resource

proxyResourceProps := &proxyResourceProps{
	parent: resource,

	// the properties below are optional
	anyMethod: jsii.Boolean(false),
	defaultCorsPreflightOptions: &corsOptions{
		allowOrigins: []*string{
			jsii.String("allowOrigins"),
		},

		// the properties below are optional
		allowCredentials: jsii.Boolean(false),
		allowHeaders: []*string{
			jsii.String("allowHeaders"),
		},
		allowMethods: []*string{
			jsii.String("allowMethods"),
		},
		disableCache: jsii.Boolean(false),
		exposeHeaders: []*string{
			jsii.String("exposeHeaders"),
		},
		maxAge: duration,
		statusCode: jsii.Number(123),
	},
	defaultIntegration: integration,
	defaultMethodOptions: &methodOptions{
		apiKeyRequired: jsii.Boolean(false),
		authorizationScopes: []*string{
			jsii.String("authorizationScopes"),
		},
		authorizationType: awscdk.Aws_apigateway.authorizationType_NONE,
		authorizer: authorizer,
		methodResponses: []methodResponse{
			&methodResponse{
				statusCode: jsii.String("statusCode"),

				// the properties below are optional
				responseModels: map[string]iModel{
					"responseModelsKey": model,
				},
				responseParameters: map[string]*bool{
					"responseParametersKey": jsii.Boolean(false),
				},
			},
		},
		operationName: jsii.String("operationName"),
		requestModels: map[string]*iModel{
			"requestModelsKey": model,
		},
		requestParameters: map[string]*bool{
			"requestParametersKey": jsii.Boolean(false),
		},
		requestValidator: requestValidator,
		requestValidatorOptions: &requestValidatorOptions{
			requestValidatorName: jsii.String("requestValidatorName"),
			validateRequestBody: jsii.Boolean(false),
			validateRequestParameters: jsii.Boolean(false),
		},
	},
}

Experimental.

type QuotaSettings

type QuotaSettings struct {
	// The maximum number of requests that users can make within the specified time period.
	// Experimental.
	Limit *float64 `field:"optional" json:"limit" yaml:"limit"`
	// For the initial time period, the number of requests to subtract from the specified limit.
	// Experimental.
	Offset *float64 `field:"optional" json:"offset" yaml:"offset"`
	// The time period for which the maximum limit of requests applies.
	// Experimental.
	Period Period `field:"optional" json:"period" yaml:"period"`
}

Specifies the maximum number of requests that clients can make to API Gateway APIs.

Example:

var api restApi

key := apigateway.NewRateLimitedApiKey(this, jsii.String("rate-limited-api-key"), &rateLimitedApiKeyProps{
	customerId: jsii.String("hello-customer"),
	resources: []iRestApi{
		api,
	},
	quota: &quotaSettings{
		limit: jsii.Number(10000),
		period: apigateway.period_MONTH,
	},
})

Experimental.

type RateLimitedApiKey

type RateLimitedApiKey interface {
	awscdk.Resource
	IApiKey
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The API key ARN.
	// Experimental.
	KeyArn() *string
	// The API key ID.
	// Experimental.
	KeyId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Permits the IAM principal all read operations through this key.
	// Experimental.
	GrantRead(grantee awsiam.IGrantable) awsiam.Grant
	// Permits the IAM principal all read and write operations through this key.
	// Experimental.
	GrantReadWrite(grantee awsiam.IGrantable) awsiam.Grant
	// Permits the IAM principal all write operations through this key.
	// Experimental.
	GrantWrite(grantee awsiam.IGrantable) awsiam.Grant
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

An API Gateway ApiKey, for which a rate limiting configuration can be specified.

Example:

var api restApi

key := apigateway.NewRateLimitedApiKey(this, jsii.String("rate-limited-api-key"), &rateLimitedApiKeyProps{
	customerId: jsii.String("hello-customer"),
	resources: []iRestApi{
		api,
	},
	quota: &quotaSettings{
		limit: jsii.Number(10000),
		period: apigateway.period_MONTH,
	},
})

Experimental.

func NewRateLimitedApiKey

func NewRateLimitedApiKey(scope constructs.Construct, id *string, props *RateLimitedApiKeyProps) RateLimitedApiKey

Experimental.

type RateLimitedApiKeyProps

type RateLimitedApiKeyProps struct {
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
	// A name for the API key.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
	// Experimental.
	ApiKeyName *string `field:"optional" json:"apiKeyName" yaml:"apiKeyName"`
	// A description of the purpose of the API key.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The value of the API key.
	//
	// Must be at least 20 characters long.
	// Experimental.
	Value *string `field:"optional" json:"value" yaml:"value"`
	// An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
	// Experimental.
	CustomerId *string `field:"optional" json:"customerId" yaml:"customerId"`
	// Indicates whether the API key can be used by clients.
	// Experimental.
	Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"`
	// Specifies whether the key identifier is distinct from the created API key value.
	// Experimental.
	GenerateDistinctId *bool `field:"optional" json:"generateDistinctId" yaml:"generateDistinctId"`
	// A list of resources this api key is associated with.
	// Experimental.
	Resources *[]IRestApi `field:"optional" json:"resources" yaml:"resources"`
	// API Stages to be associated with the RateLimitedApiKey.
	// Experimental.
	ApiStages *[]*UsagePlanPerApiStage `field:"optional" json:"apiStages" yaml:"apiStages"`
	// Number of requests clients can make in a given time period.
	// Experimental.
	Quota *QuotaSettings `field:"optional" json:"quota" yaml:"quota"`
	// Overall throttle settings for the API.
	// Experimental.
	Throttle *ThrottleSettings `field:"optional" json:"throttle" yaml:"throttle"`
}

RateLimitedApiKey properties.

Example:

var api restApi

key := apigateway.NewRateLimitedApiKey(this, jsii.String("rate-limited-api-key"), &rateLimitedApiKeyProps{
	customerId: jsii.String("hello-customer"),
	resources: []iRestApi{
		api,
	},
	quota: &quotaSettings{
		limit: jsii.Number(10000),
		period: apigateway.period_MONTH,
	},
})

Experimental.

type RequestAuthorizer

type RequestAuthorizer interface {
	Authorizer
	IAuthorizer
	// The authorization type of this authorizer.
	// Experimental.
	AuthorizationType() AuthorizationType
	// The ARN of the authorizer to be used in permission policies, such as IAM and resource-based grants.
	// Experimental.
	AuthorizerArn() *string
	// The id of the authorizer.
	// Experimental.
	AuthorizerId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The Lambda function handler that this authorizer uses.
	// Experimental.
	Handler() awslambda.IFunction
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// Experimental.
	RestApiId() *string
	// Experimental.
	SetRestApiId(val *string)
	// The IAM role that the API Gateway service assumes while invoking the Lambda function.
	// Experimental.
	Role() awsiam.IRole
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a token that resolves to the Rest Api Id at the time of synthesis.
	//
	// Throws an error, during token resolution, if no RestApi is attached to this authorizer.
	// Experimental.
	LazyRestApiId() *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Sets up the permissions necessary for the API Gateway service to invoke the Lambda function.
	// Experimental.
	SetupPermissions()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Request-based lambda authorizer that recognizes the caller's identity via request parameters, such as headers, paths, query strings, stage variables, or context variables.

Based on the request, authorization is performed by a lambda function.

Example:

var authFn function
var books resource

auth := apigateway.NewRequestAuthorizer(this, jsii.String("booksAuthorizer"), &requestAuthorizerProps{
	handler: authFn,
	identitySources: []*string{
		apigateway.identitySource.header(jsii.String("Authorization")),
	},
})

books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
})

Experimental.

func NewRequestAuthorizer

func NewRequestAuthorizer(scope constructs.Construct, id *string, props *RequestAuthorizerProps) RequestAuthorizer

Experimental.

type RequestAuthorizerProps

type RequestAuthorizerProps struct {
	// The handler for the authorizer lambda function.
	//
	// The handler must follow a very specific protocol on the input it receives and the output it needs to produce.
	// API Gateway has documented the handler's input specification
	// {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-input.html | here} and output specification
	// {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html | here}.
	// Experimental.
	Handler awslambda.IFunction `field:"required" json:"handler" yaml:"handler"`
	// An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.
	//
	// The IAM role must be
	// assumable by 'apigateway.amazonaws.com'.
	// Experimental.
	AssumeRole awsiam.IRole `field:"optional" json:"assumeRole" yaml:"assumeRole"`
	// An optional human friendly name for the authorizer.
	//
	// Note that, this is not the primary identifier of the authorizer.
	// Experimental.
	AuthorizerName *string `field:"optional" json:"authorizerName" yaml:"authorizerName"`
	// How long APIGateway should cache the results.
	//
	// Max 1 hour.
	// Disable caching by setting this to 0.
	// Experimental.
	ResultsCacheTtl awscdk.Duration `field:"optional" json:"resultsCacheTtl" yaml:"resultsCacheTtl"`
	// An array of request header mapping expressions for identities.
	//
	// Supported parameter types are
	// Header, Query String, Stage Variable, and Context. For instance, extracting an authorization
	// token from a header would use the identity source `IdentitySource.header('Authorizer')`.
	//
	// Note: API Gateway uses the specified identity sources as the request authorizer caching key. When caching is
	// enabled, API Gateway calls the authorizer's Lambda function only after successfully verifying that all the
	// specified identity sources are present at runtime. If a specified identify source is missing, null, or empty,
	// API Gateway returns a 401 Unauthorized response without calling the authorizer Lambda function.
	// See: https://docs.aws.amazon.com/apigateway/api-reference/link-relation/authorizer-create/#identitySource
	//
	// Experimental.
	IdentitySources *[]*string `field:"required" json:"identitySources" yaml:"identitySources"`
}

Properties for RequestAuthorizer.

Example:

var authFn function
var books resource

auth := apigateway.NewRequestAuthorizer(this, jsii.String("booksAuthorizer"), &requestAuthorizerProps{
	handler: authFn,
	identitySources: []*string{
		apigateway.identitySource.header(jsii.String("Authorization")),
	},
})

books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
})

Experimental.

type RequestContext

type RequestContext struct {
	// Represents the information of $context.identity.accountId.
	//
	// Whether the AWS account of the API owner should be included in the request context.
	// Experimental.
	AccountId *bool `field:"optional" json:"accountId" yaml:"accountId"`
	// Represents the information of $context.apiId.
	//
	// Whether the identifier API Gateway assigns to your API should be included in the request context.
	// Experimental.
	ApiId *bool `field:"optional" json:"apiId" yaml:"apiId"`
	// Represents the information of $context.identity.apiKey.
	//
	// Whether the API key associated with the request should be included in request context.
	// Experimental.
	ApiKey *bool `field:"optional" json:"apiKey" yaml:"apiKey"`
	// Represents the information of $context.authorizer.principalId.
	//
	// Whether the principal user identifier associated with the token sent by the client and returned
	// from an API Gateway Lambda authorizer should be included in the request context.
	// Experimental.
	AuthorizerPrincipalId *bool `field:"optional" json:"authorizerPrincipalId" yaml:"authorizerPrincipalId"`
	// Represents the information of $context.identity.caller.
	//
	// Whether the principal identifier of the caller that signed the request should be included in the request context.
	// Supported for resources that use IAM authorization.
	// Experimental.
	Caller *bool `field:"optional" json:"caller" yaml:"caller"`
	// Represents the information of $context.identity.cognitoAuthenticationProvider.
	//
	// Whether the list of the Amazon Cognito authentication providers used by the caller making the request should be included in the request context.
	// Available only if the request was signed with Amazon Cognito credentials.
	// Experimental.
	CognitoAuthenticationProvider *bool `field:"optional" json:"cognitoAuthenticationProvider" yaml:"cognitoAuthenticationProvider"`
	// Represents the information of $context.identity.cognitoAuthenticationType.
	//
	// Whether the Amazon Cognito authentication type of the caller making the request should be included in the request context.
	// Available only if the request was signed with Amazon Cognito credentials.
	// Possible values include authenticated for authenticated identities and unauthenticated for unauthenticated identities.
	// Experimental.
	CognitoAuthenticationType *bool `field:"optional" json:"cognitoAuthenticationType" yaml:"cognitoAuthenticationType"`
	// Represents the information of $context.identity.cognitoIdentityId.
	//
	// Whether the Amazon Cognito identity ID of the caller making the request should be included in the request context.
	// Available only if the request was signed with Amazon Cognito credentials.
	// Experimental.
	CognitoIdentityId *bool `field:"optional" json:"cognitoIdentityId" yaml:"cognitoIdentityId"`
	// Represents the information of $context.identity.cognitoIdentityPoolId.
	//
	// Whether the Amazon Cognito identity pool ID of the caller making the request should be included in the request context.
	// Available only if the request was signed with Amazon Cognito credentials.
	// Experimental.
	CognitoIdentityPoolId *bool `field:"optional" json:"cognitoIdentityPoolId" yaml:"cognitoIdentityPoolId"`
	// Represents the information of $context.httpMethod.
	//
	// Whether the HTTP method used should be included in the request context.
	// Valid values include: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT.
	// Experimental.
	HttpMethod *bool `field:"optional" json:"httpMethod" yaml:"httpMethod"`
	// Represents the information of $context.requestId.
	//
	// Whether the ID for the request should be included in the request context.
	// Experimental.
	RequestId *bool `field:"optional" json:"requestId" yaml:"requestId"`
	// Represents the information of $context.resourceId.
	//
	// Whether the identifier that API Gateway assigns to your resource should be included in the request context.
	// Experimental.
	ResourceId *bool `field:"optional" json:"resourceId" yaml:"resourceId"`
	// Represents the information of $context.resourcePath.
	//
	// Whether the path to the resource should be included in the request context.
	// Experimental.
	ResourcePath *bool `field:"optional" json:"resourcePath" yaml:"resourcePath"`
	// Represents the information of $context.identity.sourceIp.
	//
	// Whether the source IP address of the immediate TCP connection making the request
	// to API Gateway endpoint should be included in the request context.
	// Experimental.
	SourceIp *bool `field:"optional" json:"sourceIp" yaml:"sourceIp"`
	// Represents the information of $context.stage.
	//
	// Whether the deployment stage of the API request should be included in the request context.
	// Experimental.
	Stage *bool `field:"optional" json:"stage" yaml:"stage"`
	// Represents the information of $context.identity.user.
	//
	// Whether the principal identifier of the user that will be authorized should be included in the request context.
	// Supported for resources that use IAM authorization.
	// Experimental.
	User *bool `field:"optional" json:"user" yaml:"user"`
	// Represents the information of $context.identity.userAgent.
	//
	// Whether the User-Agent header of the API caller should be included in the request context.
	// Experimental.
	UserAgent *bool `field:"optional" json:"userAgent" yaml:"userAgent"`
	// Represents the information of $context.identity.userArn.
	//
	// Whether the Amazon Resource Name (ARN) of the effective user identified after authentication should be included in the request context.
	// Experimental.
	UserArn *bool `field:"optional" json:"userArn" yaml:"userArn"`
}

Configure what must be included in the `requestContext`.

More details can be found at mapping templates documentation.

Example:

apigateway.NewStepFunctionsRestApi(this, jsii.String("StepFunctionsRestApi"), &stepFunctionsRestApiProps{
	stateMachine: machine,
	headers: jsii.Boolean(true),
	path: jsii.Boolean(false),
	querystring: jsii.Boolean(false),
	authorizer: jsii.Boolean(false),
	requestContext: &requestContext{
		caller: jsii.Boolean(true),
		user: jsii.Boolean(true),
	},
})

See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html

Experimental.

type RequestValidator

type RequestValidator interface {
	awscdk.Resource
	IRequestValidator
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// ID of the request validator, such as abc123.
	// Experimental.
	RequestValidatorId() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var restApi restApi

requestValidator := awscdk.Aws_apigateway.NewRequestValidator(this, jsii.String("MyRequestValidator"), &requestValidatorProps{
	restApi: restApi,

	// the properties below are optional
	requestValidatorName: jsii.String("requestValidatorName"),
	validateRequestBody: jsii.Boolean(false),
	validateRequestParameters: jsii.Boolean(false),
})

Experimental.

func NewRequestValidator

func NewRequestValidator(scope constructs.Construct, id *string, props *RequestValidatorProps) RequestValidator

Experimental.

type RequestValidatorOptions

type RequestValidatorOptions struct {
	// The name of this request validator.
	// Experimental.
	RequestValidatorName *string `field:"optional" json:"requestValidatorName" yaml:"requestValidatorName"`
	// Indicates whether to validate the request body according to the configured schema for the targeted API and method.
	// Experimental.
	ValidateRequestBody *bool `field:"optional" json:"validateRequestBody" yaml:"validateRequestBody"`
	// Indicates whether to validate request parameters.
	// Experimental.
	ValidateRequestParameters *bool `field:"optional" json:"validateRequestParameters" yaml:"validateRequestParameters"`
}

Example:

var integration lambdaIntegration
var resource resource
var responseModel model
var errorResponseModel model

resource.addMethod(jsii.String("GET"), integration, &methodOptions{
	// We can mark the parameters as required
	requestParameters: map[string]*bool{
		"method.request.querystring.who": jsii.Boolean(true),
	},
	// we can set request validator options like below
	requestValidatorOptions: &requestValidatorOptions{
		requestValidatorName: jsii.String("test-validator"),
		validateRequestBody: jsii.Boolean(true),
		validateRequestParameters: jsii.Boolean(false),
	},
	methodResponses: []methodResponse{
		&methodResponse{
			// Successful response from the integration
			statusCode: jsii.String("200"),
			// Define what parameters are allowed or not
			responseParameters: map[string]*bool{
				"method.response.header.Content-Type": jsii.Boolean(true),
				"method.response.header.Access-Control-Allow-Origin": jsii.Boolean(true),
				"method.response.header.Access-Control-Allow-Credentials": jsii.Boolean(true),
			},
			// Validate the schema on the response
			responseModels: map[string]iModel{
				"application/json": responseModel,
			},
		},
		&methodResponse{
			// Same thing for the error responses
			statusCode: jsii.String("400"),
			responseParameters: map[string]*bool{
				"method.response.header.Content-Type": jsii.Boolean(true),
				"method.response.header.Access-Control-Allow-Origin": jsii.Boolean(true),
				"method.response.header.Access-Control-Allow-Credentials": jsii.Boolean(true),
			},
			responseModels: map[string]*iModel{
				"application/json": errorResponseModel,
			},
		},
	},
})

Experimental.

type RequestValidatorProps

type RequestValidatorProps struct {
	// The name of this request validator.
	// Experimental.
	RequestValidatorName *string `field:"optional" json:"requestValidatorName" yaml:"requestValidatorName"`
	// Indicates whether to validate the request body according to the configured schema for the targeted API and method.
	// Experimental.
	ValidateRequestBody *bool `field:"optional" json:"validateRequestBody" yaml:"validateRequestBody"`
	// Indicates whether to validate request parameters.
	// Experimental.
	ValidateRequestParameters *bool `field:"optional" json:"validateRequestParameters" yaml:"validateRequestParameters"`
	// The rest API that this model is part of.
	//
	// The reason we need the RestApi object itself and not just the ID is because the model
	// is being tracked by the top-level RestApi object for the purpose of calculating it's
	// hash to determine the ID of the deployment. This allows us to automatically update
	// the deployment when the model of the REST API changes.
	// Experimental.
	RestApi IRestApi `field:"required" json:"restApi" yaml:"restApi"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var restApi restApi

requestValidatorProps := &requestValidatorProps{
	restApi: restApi,

	// the properties below are optional
	requestValidatorName: jsii.String("requestValidatorName"),
	validateRequestBody: jsii.Boolean(false),
	validateRequestParameters: jsii.Boolean(false),
}

Experimental.

type Resource

type Resource interface {
	ResourceBase
	// The rest API that this resource is part of.
	//
	// The reason we need the RestApi object itself and not just the ID is because the model
	// is being tracked by the top-level RestApi object for the purpose of calculating it's
	// hash to determine the ID of the deployment. This allows us to automatically update
	// the deployment when the model of the REST API changes.
	// Experimental.
	Api() IRestApi
	// Default options for CORS preflight OPTIONS method.
	// Experimental.
	DefaultCorsPreflightOptions() *CorsOptions
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration() Integration
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions() *MethodOptions
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The parent of this resource or undefined for the root resource.
	// Experimental.
	ParentResource() IResource
	// The full path of this resource.
	// Experimental.
	Path() *string
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ID of the resource.
	// Experimental.
	ResourceId() *string
	// The RestApi associated with this Resource.
	// Deprecated: - Throws an error if this Resource is not associated with an instance of `RestApi`. Use `api` instead.
	RestApi() RestApi
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Deprecated: - Throws error in some use cases that have been enabled since this deprecation notice. Use `RestApi.urlForPath()` instead.
	Url() *string
	// Adds an OPTIONS method to this resource which responds to Cross-Origin Resource Sharing (CORS) preflight requests.
	//
	// Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional
	// HTTP headers to tell browsers to give a web application running at one
	// origin, access to selected resources from a different origin. A web
	// application executes a cross-origin HTTP request when it requests a
	// resource that has a different origin (domain, protocol, or port) from its
	// own.
	// Experimental.
	AddCorsPreflight(options *CorsOptions) Method
	// Defines a new method for this resource.
	// Experimental.
	AddMethod(httpMethod *string, integration Integration, options *MethodOptions) Method
	// Adds a greedy proxy resource ("{proxy+}") and an ANY method to this route.
	// Experimental.
	AddProxy(options *ProxyResourceOptions) ProxyResource
	// Defines a new child resource where this resource is the parent.
	// Experimental.
	AddResource(pathPart *string, options *ResourceOptions) Resource
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Retrieves a child resource by path part.
	// Experimental.
	GetResource(pathPart *string) IResource
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Gets or create all resources leading up to the specified path.
	//
	// - Path may only start with "/" if this method is called on the root resource.
	// - All resources are created using default options.
	// Experimental.
	ResourceForPath(path *string) Resource
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Example:

var booksBackend lambdaIntegration

api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	defaultIntegration: booksBackend,
})

books := api.root.addResource(jsii.String("books"))
books.addMethod(jsii.String("GET")) // integrated with `booksBackend`
books.addMethod(jsii.String("POST")) // integrated with `booksBackend`

book := books.addResource(jsii.String("{book_id}"))
book.addMethod(jsii.String("GET"))

Experimental.

func NewResource

func NewResource(scope constructs.Construct, id *string, props *ResourceProps) Resource

Experimental.

type ResourceAttributes

type ResourceAttributes struct {
	// The full path of this resource.
	// Experimental.
	Path *string `field:"required" json:"path" yaml:"path"`
	// The ID of the resource.
	// Experimental.
	ResourceId *string `field:"required" json:"resourceId" yaml:"resourceId"`
	// The rest API that this resource is part of.
	// Experimental.
	RestApi IRestApi `field:"required" json:"restApi" yaml:"restApi"`
}

Attributes that can be specified when importing a Resource.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var restApi restApi

resourceAttributes := &resourceAttributes{
	path: jsii.String("path"),
	resourceId: jsii.String("resourceId"),
	restApi: restApi,
}

Experimental.

type ResourceBase

type ResourceBase interface {
	awscdk.Resource
	IResource
	// The rest API that this resource is part of.
	//
	// The reason we need the RestApi object itself and not just the ID is because the model
	// is being tracked by the top-level RestApi object for the purpose of calculating it's
	// hash to determine the ID of the deployment. This allows us to automatically update
	// the deployment when the model of the REST API changes.
	// Experimental.
	Api() IRestApi
	// Default options for CORS preflight OPTIONS method.
	// Experimental.
	DefaultCorsPreflightOptions() *CorsOptions
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration() Integration
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions() *MethodOptions
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The parent of this resource or undefined for the root resource.
	// Experimental.
	ParentResource() IResource
	// The full path of this resource.
	// Experimental.
	Path() *string
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ID of the resource.
	// Experimental.
	ResourceId() *string
	// The rest API that this resource is part of.
	// Deprecated: -  Throws an error if this Resource is not associated with an instance of `RestApi`. Use `api` instead.
	RestApi() RestApi
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Deprecated: - Throws error in some use cases that have been enabled since this deprecation notice. Use `RestApi.urlForPath()` instead.
	Url() *string
	// Adds an OPTIONS method to this resource which responds to Cross-Origin Resource Sharing (CORS) preflight requests.
	//
	// Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional
	// HTTP headers to tell browsers to give a web application running at one
	// origin, access to selected resources from a different origin. A web
	// application executes a cross-origin HTTP request when it requests a
	// resource that has a different origin (domain, protocol, or port) from its
	// own.
	// Experimental.
	AddCorsPreflight(options *CorsOptions) Method
	// Defines a new method for this resource.
	// Experimental.
	AddMethod(httpMethod *string, integration Integration, options *MethodOptions) Method
	// Adds a greedy proxy resource ("{proxy+}") and an ANY method to this route.
	// Experimental.
	AddProxy(options *ProxyResourceOptions) ProxyResource
	// Defines a new child resource where this resource is the parent.
	// Experimental.
	AddResource(pathPart *string, options *ResourceOptions) Resource
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Retrieves a child resource by path part.
	// Experimental.
	GetResource(pathPart *string) IResource
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Gets or create all resources leading up to the specified path.
	//
	// - Path may only start with "/" if this method is called on the root resource.
	// - All resources are created using default options.
	// Experimental.
	ResourceForPath(path *string) Resource
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Experimental.

type ResourceOptions

type ResourceOptions struct {
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
}

Example:

var resource resource

subtree := resource.addResource(jsii.String("subtree"), &resourceOptions{
	defaultCorsPreflightOptions: &corsOptions{
		allowOrigins: []*string{
			jsii.String("https://amazon.com"),
		},
	},
})

Experimental.

type ResourceProps

type ResourceProps struct {
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
	// The parent resource of this resource.
	//
	// You can either pass another
	// `Resource` object or a `RestApi` object here.
	// Experimental.
	Parent IResource `field:"required" json:"parent" yaml:"parent"`
	// A path name for the resource.
	// Experimental.
	PathPart *string `field:"required" json:"pathPart" yaml:"pathPart"`
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var authorizer authorizer
var duration duration
var integration integration
var model model
var requestValidator requestValidator
var resource resource

resourceProps := &resourceProps{
	parent: resource,
	pathPart: jsii.String("pathPart"),

	// the properties below are optional
	defaultCorsPreflightOptions: &corsOptions{
		allowOrigins: []*string{
			jsii.String("allowOrigins"),
		},

		// the properties below are optional
		allowCredentials: jsii.Boolean(false),
		allowHeaders: []*string{
			jsii.String("allowHeaders"),
		},
		allowMethods: []*string{
			jsii.String("allowMethods"),
		},
		disableCache: jsii.Boolean(false),
		exposeHeaders: []*string{
			jsii.String("exposeHeaders"),
		},
		maxAge: duration,
		statusCode: jsii.Number(123),
	},
	defaultIntegration: integration,
	defaultMethodOptions: &methodOptions{
		apiKeyRequired: jsii.Boolean(false),
		authorizationScopes: []*string{
			jsii.String("authorizationScopes"),
		},
		authorizationType: awscdk.Aws_apigateway.authorizationType_NONE,
		authorizer: authorizer,
		methodResponses: []methodResponse{
			&methodResponse{
				statusCode: jsii.String("statusCode"),

				// the properties below are optional
				responseModels: map[string]iModel{
					"responseModelsKey": model,
				},
				responseParameters: map[string]*bool{
					"responseParametersKey": jsii.Boolean(false),
				},
			},
		},
		operationName: jsii.String("operationName"),
		requestModels: map[string]*iModel{
			"requestModelsKey": model,
		},
		requestParameters: map[string]*bool{
			"requestParametersKey": jsii.Boolean(false),
		},
		requestValidator: requestValidator,
		requestValidatorOptions: &requestValidatorOptions{
			requestValidatorName: jsii.String("requestValidatorName"),
			validateRequestBody: jsii.Boolean(false),
			validateRequestParameters: jsii.Boolean(false),
		},
	},
}

Experimental.

type ResponseType

type ResponseType interface {
	// Valid value of response type.
	// Experimental.
	ResponseType() *string
}

Supported types of gateway responses.

Example:

api := apigateway.NewRestApi(this, jsii.String("books-api"))
api.addGatewayResponse(jsii.String("test-response"), &gatewayResponseOptions{
	type: apigateway.responseType_ACCESS_DENIED(),
	statusCode: jsii.String("500"),
	responseHeaders: map[string]*string{
		"Access-Control-Allow-Origin": jsii.String("test.com"),
		"test-key": jsii.String("test-value"),
	},
	templates: map[string]*string{
		"application/json": jsii.String("{ \"message\": $context.error.messageString, \"statusCode\": \"488\", \"type\": \"$context.error.responseType\" }"),
	},
})

See: https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html

Experimental.

func ResponseType_ACCESS_DENIED

func ResponseType_ACCESS_DENIED() ResponseType

func ResponseType_API_CONFIGURATION_ERROR

func ResponseType_API_CONFIGURATION_ERROR() ResponseType

func ResponseType_AUTHORIZER_CONFIGURATION_ERROR

func ResponseType_AUTHORIZER_CONFIGURATION_ERROR() ResponseType

func ResponseType_AUTHORIZER_FAILURE

func ResponseType_AUTHORIZER_FAILURE() ResponseType

func ResponseType_BAD_REQUEST_BODY

func ResponseType_BAD_REQUEST_BODY() ResponseType

func ResponseType_BAD_REQUEST_PARAMETERS

func ResponseType_BAD_REQUEST_PARAMETERS() ResponseType

func ResponseType_DEFAULT_4XX

func ResponseType_DEFAULT_4XX() ResponseType

func ResponseType_DEFAULT_5XX

func ResponseType_DEFAULT_5XX() ResponseType

func ResponseType_EXPIRED_TOKEN

func ResponseType_EXPIRED_TOKEN() ResponseType

func ResponseType_INTEGRATION_FAILURE

func ResponseType_INTEGRATION_FAILURE() ResponseType

func ResponseType_INTEGRATION_TIMEOUT

func ResponseType_INTEGRATION_TIMEOUT() ResponseType

func ResponseType_INVALID_API_KEY

func ResponseType_INVALID_API_KEY() ResponseType

func ResponseType_INVALID_SIGNATURE

func ResponseType_INVALID_SIGNATURE() ResponseType

func ResponseType_MISSING_AUTHENTICATION_TOKEN

func ResponseType_MISSING_AUTHENTICATION_TOKEN() ResponseType

func ResponseType_Of

func ResponseType_Of(type_ *string) ResponseType

A custom response type to support future cases. Experimental.

func ResponseType_QUOTA_EXCEEDED

func ResponseType_QUOTA_EXCEEDED() ResponseType

func ResponseType_REQUEST_TOO_LARGE

func ResponseType_REQUEST_TOO_LARGE() ResponseType

func ResponseType_RESOURCE_NOT_FOUND

func ResponseType_RESOURCE_NOT_FOUND() ResponseType

func ResponseType_THROTTLED

func ResponseType_THROTTLED() ResponseType

func ResponseType_UNAUTHORIZED

func ResponseType_UNAUTHORIZED() ResponseType

func ResponseType_UNSUPPORTED_MEDIA_TYPE

func ResponseType_UNSUPPORTED_MEDIA_TYPE() ResponseType

func ResponseType_WAF_FILTERED

func ResponseType_WAF_FILTERED() ResponseType

type RestApi

type RestApi interface {
	RestApiBase
	// Experimental.
	CloudWatchAccount() CfnAccount
	// Experimental.
	SetCloudWatchAccount(val CfnAccount)
	// API Gateway stage that points to the latest deployment (if defined).
	//
	// If `deploy` is disabled, you will need to explicitly assign this value in order to
	// set up integrations.
	// Experimental.
	DeploymentStage() Stage
	// Experimental.
	SetDeploymentStage(val Stage)
	// The first domain name mapped to this API, if defined through the `domainName` configuration prop, or added via `addDomainName`.
	// Experimental.
	DomainName() DomainName
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// API Gateway deployment that represents the latest changes of the API.
	//
	// This resource will be automatically updated every time the REST API model changes.
	// This will be undefined if `deploy` is false.
	// Experimental.
	LatestDeployment() Deployment
	// The list of methods bound to this RestApi.
	// Experimental.
	Methods() *[]Method
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ID of this API Gateway RestApi.
	// Experimental.
	RestApiId() *string
	// A human friendly name for this Rest API.
	//
	// Note that this is different from `restApiId`.
	// Experimental.
	RestApiName() *string
	// The resource ID of the root resource.
	// Experimental.
	RestApiRootResourceId() *string
	// Represents the root resource of this API endpoint ('/').
	//
	// Resources and Methods are added to this resource.
	// Experimental.
	Root() IResource
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The deployed root URL of this REST API.
	// Experimental.
	Url() *string
	// Add an ApiKey.
	// Experimental.
	AddApiKey(id *string, options *ApiKeyOptions) IApiKey
	// Defines an API Gateway domain name and maps it to this API.
	// Experimental.
	AddDomainName(id *string, options *DomainNameOptions) DomainName
	// Adds a new gateway response.
	// Experimental.
	AddGatewayResponse(id *string, options *GatewayResponseOptions) GatewayResponse
	// Adds a new model.
	// Experimental.
	AddModel(id *string, props *ModelOptions) Model
	// Adds a new request validator.
	// Experimental.
	AddRequestValidator(id *string, props *RequestValidatorOptions) RequestValidator
	// Adds a usage plan.
	// Experimental.
	AddUsagePlan(id *string, props *UsagePlanProps) UsagePlan
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Gets the "execute-api" ARN.
	// Experimental.
	ArnForExecuteApi(method *string, path *string, stage *string) *string
	// Deprecated: This method will be made internal. No replacement
	ConfigureCloudWatchRole(apiResource CfnRestApi)
	// Deprecated: This method will be made internal. No replacement
	ConfigureDeployment(props *RestApiBaseProps)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns the given named metric for this API.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the API cache in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheHitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the backend in a given period, when API caching is enabled.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheMissCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of client-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricClientError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the total number API requests in a given period.
	//
	// Default: sample count over 5 minutes.
	// Experimental.
	MetricCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricIntegrationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The time between when API Gateway receives a request from a client and when it returns a response to the client.
	//
	// The latency includes the integration latency and other API Gateway overhead.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of server-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricServerError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Returns the URL for an HTTP path.
	//
	// Fails if `deploymentStage` is not set either by `deploy` or explicitly.
	// Experimental.
	UrlForPath(path *string) *string
	// Performs validation of the REST API.
	// Experimental.
	Validate() *[]*string
}

Represents a REST API in Amazon API Gateway.

Use `addResource` and `addMethod` to configure the API model.

By default, the API will automatically be deployed and accessible from a public endpoint.

Example:

stateMachine := stepfunctions.NewStateMachine(this, jsii.String("MyStateMachine"), &stateMachineProps{
	stateMachineType: stepfunctions.stateMachineType_EXPRESS,
	definition: stepfunctions.chain.start(stepfunctions.NewPass(this, jsii.String("Pass"))),
})

api := apigateway.NewRestApi(this, jsii.String("Api"), &restApiProps{
	restApiName: jsii.String("MyApi"),
})
api.root.addMethod(jsii.String("GET"), apigateway.stepFunctionsIntegration.startExecution(stateMachine))

Experimental.

func NewRestApi

func NewRestApi(scope constructs.Construct, id *string, props *RestApiProps) RestApi

Experimental.

type RestApiAttributes

type RestApiAttributes struct {
	// The ID of the API Gateway RestApi.
	// Experimental.
	RestApiId *string `field:"required" json:"restApiId" yaml:"restApiId"`
	// The resource ID of the root resource.
	// Experimental.
	RootResourceId *string `field:"required" json:"rootResourceId" yaml:"rootResourceId"`
}

Attributes that can be specified when importing a RestApi.

Example:

import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/constructs-go/constructs"
import "github.com/aws/aws-cdk-go/awscdk"

/**
 * This file showcases how to split up a RestApi's Resources and Methods across nested stacks.
 *
 * The root stack 'RootStack' first defines a RestApi.
 * Two nested stacks BooksStack and PetsStack, create corresponding Resources '/books' and '/pets'.
 * They are then deployed to a 'prod' Stage via a third nested stack - DeployStack.
 *
 * To verify this worked, go to the APIGateway
 */

type rootStack struct {
	stack
}

func newRootStack(scope construct) *rootStack {
	this := &rootStack{}
	newStack_Override(this, scope, jsii.String("integ-restapi-import-RootStack"))

	restApi := awscdk.NewRestApi(this, jsii.String("RestApi"), &restApiProps{
		deploy: jsii.Boolean(false),
	})
	restApi.root.addMethod(jsii.String("ANY"))

	petsStack := NewPetsStack(this, &resourceNestedStackProps{
		restApiId: restApi.restApiId,
		rootResourceId: restApi.restApiRootResourceId,
	})
	booksStack := NewBooksStack(this, &resourceNestedStackProps{
		restApiId: restApi.restApiId,
		rootResourceId: restApi.restApiRootResourceId,
	})
	NewDeployStack(this, &deployStackProps{
		restApiId: restApi.restApiId,
		methods: petsStack.methods.concat(booksStack.methods),
	})

	awscdk.NewCfnOutput(this, jsii.String("PetsURL"), &cfnOutputProps{
		value: fmt.Sprintf("https://%v.execute-api.%v.amazonaws.com/prod/pets", restApi.restApiId, this.region),
	})

	awscdk.NewCfnOutput(this, jsii.String("BooksURL"), &cfnOutputProps{
		value: fmt.Sprintf("https://%v.execute-api.%v.amazonaws.com/prod/books", restApi.restApiId, this.region),
	})
	return this
}

type resourceNestedStackProps struct {
	nestedStackProps
	restApiId *string
	rootResourceId *string
}

type petsStack struct {
	nestedStack
	methods []method
}

func newPetsStack(scope construct, props resourceNestedStackProps) *petsStack {
	this := &petsStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-PetsStack"), props)

	api := awscdk.RestApi.fromRestApiAttributes(this, jsii.String("RestApi"), &restApiAttributes{
		restApiId: props.restApiId,
		rootResourceId: props.rootResourceId,
	})

	method := api.root.addResource(jsii.String("pets")).addMethod(jsii.String("GET"), awscdk.NewMockIntegration(&integrationOptions{
		integrationResponses: []integrationResponse{
			&integrationResponse{
				statusCode: jsii.String("200"),
			},
		},
		passthroughBehavior: awscdk.PassthroughBehavior_NEVER,
		requestTemplates: map[string]*string{
			"application/json": jsii.String("{ \"statusCode\": 200 }"),
		},
	}), &methodOptions{
		methodResponses: []methodResponse{
			&methodResponse{
				statusCode: jsii.String("200"),
			},
		},
	})

	this.methods.push(method)
	return this
}

type booksStack struct {
	nestedStack
	methods []*method
}

func newBooksStack(scope construct, props resourceNestedStackProps) *booksStack {
	this := &booksStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-BooksStack"), props)

	api := awscdk.RestApi.fromRestApiAttributes(this, jsii.String("RestApi"), &restApiAttributes{
		restApiId: props.restApiId,
		rootResourceId: props.rootResourceId,
	})

	method := api.root.addResource(jsii.String("books")).addMethod(jsii.String("GET"), awscdk.NewMockIntegration(&integrationOptions{
		integrationResponses: []*integrationResponse{
			&integrationResponse{
				statusCode: jsii.String("200"),
			},
		},
		passthroughBehavior: awscdk.PassthroughBehavior_NEVER,
		requestTemplates: map[string]*string{
			"application/json": jsii.String("{ \"statusCode\": 200 }"),
		},
	}), &methodOptions{
		methodResponses: []*methodResponse{
			&methodResponse{
				statusCode: jsii.String("200"),
			},
		},
	})

	this.methods.push(method)
	return this
}

type deployStackProps struct {
	nestedStackProps
	restApiId *string
	methods []*method
}

type deployStack struct {
	nestedStack
}

func newDeployStack(scope construct, props deployStackProps) *deployStack {
	this := &deployStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-DeployStack"), props)

	deployment := awscdk.NewDeployment(this, jsii.String("Deployment"), &deploymentProps{
		api: awscdk.RestApi.fromRestApiId(this, jsii.String("RestApi"), props.restApiId),
	})
	if *props.methods {
		for _, method := range *props.methods {
			deployment.node.addDependency(method)
		}
	}
	awscdk.NewStage(this, jsii.String("Stage"), &stageProps{
		deployment: deployment,
	})
	return this
}

NewRootStack(awscdk.NewApp())

Experimental.

type RestApiBase

type RestApiBase interface {
	awscdk.Resource
	IRestApi
	// Experimental.
	CloudWatchAccount() CfnAccount
	// Experimental.
	SetCloudWatchAccount(val CfnAccount)
	// API Gateway stage that points to the latest deployment (if defined).
	//
	// If `deploy` is disabled, you will need to explicitly assign this value in order to
	// set up integrations.
	// Experimental.
	DeploymentStage() Stage
	// Experimental.
	SetDeploymentStage(val Stage)
	// The first domain name mapped to this API, if defined through the `domainName` configuration prop, or added via `addDomainName`.
	// Experimental.
	DomainName() DomainName
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// API Gateway deployment that represents the latest changes of the API.
	//
	// This resource will be automatically updated every time the REST API model changes.
	// This will be undefined if `deploy` is false.
	// Experimental.
	LatestDeployment() Deployment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ID of this API Gateway RestApi.
	// Experimental.
	RestApiId() *string
	// A human friendly name for this Rest API.
	//
	// Note that this is different from `restApiId`.
	// Experimental.
	RestApiName() *string
	// The resource ID of the root resource.
	// Experimental.
	RestApiRootResourceId() *string
	// Represents the root resource of this API endpoint ('/').
	//
	// Resources and Methods are added to this resource.
	// Experimental.
	Root() IResource
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Add an ApiKey.
	// Experimental.
	AddApiKey(id *string, options *ApiKeyOptions) IApiKey
	// Defines an API Gateway domain name and maps it to this API.
	// Experimental.
	AddDomainName(id *string, options *DomainNameOptions) DomainName
	// Adds a new gateway response.
	// Experimental.
	AddGatewayResponse(id *string, options *GatewayResponseOptions) GatewayResponse
	// Adds a usage plan.
	// Experimental.
	AddUsagePlan(id *string, props *UsagePlanProps) UsagePlan
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Gets the "execute-api" ARN.
	// Experimental.
	ArnForExecuteApi(method *string, path *string, stage *string) *string
	// Deprecated: This method will be made internal. No replacement
	ConfigureCloudWatchRole(apiResource CfnRestApi)
	// Deprecated: This method will be made internal. No replacement
	ConfigureDeployment(props *RestApiBaseProps)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns the given named metric for this API.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the API cache in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheHitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the backend in a given period, when API caching is enabled.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheMissCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of client-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricClientError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the total number API requests in a given period.
	//
	// Default: sample count over 5 minutes.
	// Experimental.
	MetricCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricIntegrationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The time between when API Gateway receives a request from a client and when it returns a response to the client.
	//
	// The latency includes the integration latency and other API Gateway overhead.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of server-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricServerError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Returns the URL for an HTTP path.
	//
	// Fails if `deploymentStage` is not set either by `deploy` or explicitly.
	// Experimental.
	UrlForPath(path *string) *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Base implementation that are common to various implementations of IRestApi.

Example:

import route53 "github.com/aws/aws-cdk-go/awscdk"
import targets "github.com/aws/aws-cdk-go/awscdk"

var api restApi
var hostedZoneForExampleCom interface{}

route53.NewARecord(this, jsii.String("CustomDomainAliasRecord"), &aRecordProps{
	zone: hostedZoneForExampleCom,
	target: route53.recordTarget.fromAlias(targets.NewApiGateway(api)),
})

Experimental.

type RestApiBaseProps

type RestApiBaseProps struct {
	// Automatically configure an AWS CloudWatch role for API Gateway.
	// Experimental.
	CloudWatchRole *bool `field:"optional" json:"cloudWatchRole" yaml:"cloudWatchRole"`
	// Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.
	//
	// 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.
	// Experimental.
	Deploy *bool `field:"optional" json:"deploy" yaml:"deploy"`
	// Options for the API Gateway stage that will always point to the latest deployment when `deploy` is enabled.
	//
	// If `deploy` is disabled,
	// this value cannot be set.
	// Experimental.
	DeployOptions *StageOptions `field:"optional" json:"deployOptions" yaml:"deployOptions"`
	// Specifies whether clients can invoke the API using the default execute-api endpoint.
	//
	// To require that clients use a custom domain name to invoke the
	// API, disable the default endpoint.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
	//
	// Experimental.
	DisableExecuteApiEndpoint *bool `field:"optional" json:"disableExecuteApiEndpoint" yaml:"disableExecuteApiEndpoint"`
	// Configure a custom domain name and map it to this API.
	// Experimental.
	DomainName *DomainNameOptions `field:"optional" json:"domainName" yaml:"domainName"`
	// Export name for the CfnOutput containing the API endpoint.
	// Experimental.
	EndpointExportName *string `field:"optional" json:"endpointExportName" yaml:"endpointExportName"`
	// A list of the endpoint types of the API.
	//
	// Use this property when creating
	// an API.
	// Experimental.
	EndpointTypes *[]EndpointType `field:"optional" json:"endpointTypes" yaml:"endpointTypes"`
	// Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.
	// Experimental.
	FailOnWarnings *bool `field:"optional" json:"failOnWarnings" yaml:"failOnWarnings"`
	// Custom header parameters for the request.
	// See: https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html
	//
	// Experimental.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// A policy document that contains the permissions for this RestApi.
	// Experimental.
	Policy awsiam.PolicyDocument `field:"optional" json:"policy" yaml:"policy"`
	// A name for the API Gateway RestApi resource.
	// Experimental.
	RestApiName *string `field:"optional" json:"restApiName" yaml:"restApiName"`
	// Retains old deployment resources when the API changes.
	//
	// This allows
	// manually reverting stages to point to old deployments via the AWS
	// Console.
	// Experimental.
	RetainDeployments *bool `field:"optional" json:"retainDeployments" yaml:"retainDeployments"`
}

Represents the props that all Rest APIs share.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var accessLogDestination iAccessLogDestination
var accessLogFormat accessLogFormat
var bucket bucket
var certificate certificate
var duration duration
var policyDocument policyDocument

restApiBaseProps := &restApiBaseProps{
	cloudWatchRole: jsii.Boolean(false),
	deploy: jsii.Boolean(false),
	deployOptions: &stageOptions{
		accessLogDestination: accessLogDestination,
		accessLogFormat: accessLogFormat,
		cacheClusterEnabled: jsii.Boolean(false),
		cacheClusterSize: jsii.String("cacheClusterSize"),
		cacheDataEncrypted: jsii.Boolean(false),
		cacheTtl: duration,
		cachingEnabled: jsii.Boolean(false),
		clientCertificateId: jsii.String("clientCertificateId"),
		dataTraceEnabled: jsii.Boolean(false),
		description: jsii.String("description"),
		documentationVersion: jsii.String("documentationVersion"),
		loggingLevel: awscdk.Aws_apigateway.methodLoggingLevel_OFF,
		methodOptions: map[string]methodDeploymentOptions{
			"methodOptionsKey": &methodDeploymentOptions{
				"cacheDataEncrypted": jsii.Boolean(false),
				"cacheTtl": duration,
				"cachingEnabled": jsii.Boolean(false),
				"dataTraceEnabled": jsii.Boolean(false),
				"loggingLevel": awscdk.*Aws_apigateway.*methodLoggingLevel_OFF,
				"metricsEnabled": jsii.Boolean(false),
				"throttlingBurstLimit": jsii.Number(123),
				"throttlingRateLimit": jsii.Number(123),
			},
		},
		metricsEnabled: jsii.Boolean(false),
		stageName: jsii.String("stageName"),
		throttlingBurstLimit: jsii.Number(123),
		throttlingRateLimit: jsii.Number(123),
		tracingEnabled: jsii.Boolean(false),
		variables: map[string]*string{
			"variablesKey": jsii.String("variables"),
		},
	},
	disableExecuteApiEndpoint: jsii.Boolean(false),
	domainName: &domainNameOptions{
		certificate: certificate,
		domainName: jsii.String("domainName"),

		// the properties below are optional
		basePath: jsii.String("basePath"),
		endpointType: awscdk.*Aws_apigateway.endpointType_EDGE,
		mtls: &mTLSConfig{
			bucket: bucket,
			key: jsii.String("key"),

			// the properties below are optional
			version: jsii.String("version"),
		},
		securityPolicy: awscdk.*Aws_apigateway.securityPolicy_TLS_1_0,
	},
	endpointExportName: jsii.String("endpointExportName"),
	endpointTypes: []*endpointType{
		awscdk.*Aws_apigateway.*endpointType_EDGE,
	},
	failOnWarnings: jsii.Boolean(false),
	parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	policy: policyDocument,
	restApiName: jsii.String("restApiName"),
	retainDeployments: jsii.Boolean(false),
}

Experimental.

type RestApiOptions deprecated

type RestApiOptions struct {
	// Automatically configure an AWS CloudWatch role for API Gateway.
	// Deprecated: - superseded by `RestApiBaseProps`.
	CloudWatchRole *bool `field:"optional" json:"cloudWatchRole" yaml:"cloudWatchRole"`
	// Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.
	//
	// 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.
	// Deprecated: - superseded by `RestApiBaseProps`.
	Deploy *bool `field:"optional" json:"deploy" yaml:"deploy"`
	// Options for the API Gateway stage that will always point to the latest deployment when `deploy` is enabled.
	//
	// If `deploy` is disabled,
	// this value cannot be set.
	// Deprecated: - superseded by `RestApiBaseProps`.
	DeployOptions *StageOptions `field:"optional" json:"deployOptions" yaml:"deployOptions"`
	// Specifies whether clients can invoke the API using the default execute-api endpoint.
	//
	// To require that clients use a custom domain name to invoke the
	// API, disable the default endpoint.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
	//
	// Deprecated: - superseded by `RestApiBaseProps`.
	DisableExecuteApiEndpoint *bool `field:"optional" json:"disableExecuteApiEndpoint" yaml:"disableExecuteApiEndpoint"`
	// Configure a custom domain name and map it to this API.
	// Deprecated: - superseded by `RestApiBaseProps`.
	DomainName *DomainNameOptions `field:"optional" json:"domainName" yaml:"domainName"`
	// Export name for the CfnOutput containing the API endpoint.
	// Deprecated: - superseded by `RestApiBaseProps`.
	EndpointExportName *string `field:"optional" json:"endpointExportName" yaml:"endpointExportName"`
	// A list of the endpoint types of the API.
	//
	// Use this property when creating
	// an API.
	// Deprecated: - superseded by `RestApiBaseProps`.
	EndpointTypes *[]EndpointType `field:"optional" json:"endpointTypes" yaml:"endpointTypes"`
	// Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.
	// Deprecated: - superseded by `RestApiBaseProps`.
	FailOnWarnings *bool `field:"optional" json:"failOnWarnings" yaml:"failOnWarnings"`
	// Custom header parameters for the request.
	// See: https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html
	//
	// Deprecated: - superseded by `RestApiBaseProps`.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// A policy document that contains the permissions for this RestApi.
	// Deprecated: - superseded by `RestApiBaseProps`.
	Policy awsiam.PolicyDocument `field:"optional" json:"policy" yaml:"policy"`
	// A name for the API Gateway RestApi resource.
	// Deprecated: - superseded by `RestApiBaseProps`.
	RestApiName *string `field:"optional" json:"restApiName" yaml:"restApiName"`
	// Retains old deployment resources when the API changes.
	//
	// This allows
	// manually reverting stages to point to old deployments via the AWS
	// Console.
	// Deprecated: - superseded by `RestApiBaseProps`.
	RetainDeployments *bool `field:"optional" json:"retainDeployments" yaml:"retainDeployments"`
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Deprecated: - superseded by `RestApiBaseProps`.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Deprecated: - superseded by `RestApiBaseProps`.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Deprecated: - superseded by `RestApiBaseProps`.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
}

Represents the props that all Rest APIs share.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var accessLogDestination iAccessLogDestination
var accessLogFormat accessLogFormat
var authorizer authorizer
var bucket bucket
var certificate certificate
var duration duration
var integration integration
var model model
var policyDocument policyDocument
var requestValidator requestValidator

restApiOptions := &restApiOptions{
	cloudWatchRole: jsii.Boolean(false),
	defaultCorsPreflightOptions: &corsOptions{
		allowOrigins: []*string{
			jsii.String("allowOrigins"),
		},

		// the properties below are optional
		allowCredentials: jsii.Boolean(false),
		allowHeaders: []*string{
			jsii.String("allowHeaders"),
		},
		allowMethods: []*string{
			jsii.String("allowMethods"),
		},
		disableCache: jsii.Boolean(false),
		exposeHeaders: []*string{
			jsii.String("exposeHeaders"),
		},
		maxAge: duration,
		statusCode: jsii.Number(123),
	},
	defaultIntegration: integration,
	defaultMethodOptions: &methodOptions{
		apiKeyRequired: jsii.Boolean(false),
		authorizationScopes: []*string{
			jsii.String("authorizationScopes"),
		},
		authorizationType: awscdk.Aws_apigateway.authorizationType_NONE,
		authorizer: authorizer,
		methodResponses: []methodResponse{
			&methodResponse{
				statusCode: jsii.String("statusCode"),

				// the properties below are optional
				responseModels: map[string]iModel{
					"responseModelsKey": model,
				},
				responseParameters: map[string]*bool{
					"responseParametersKey": jsii.Boolean(false),
				},
			},
		},
		operationName: jsii.String("operationName"),
		requestModels: map[string]*iModel{
			"requestModelsKey": model,
		},
		requestParameters: map[string]*bool{
			"requestParametersKey": jsii.Boolean(false),
		},
		requestValidator: requestValidator,
		requestValidatorOptions: &requestValidatorOptions{
			requestValidatorName: jsii.String("requestValidatorName"),
			validateRequestBody: jsii.Boolean(false),
			validateRequestParameters: jsii.Boolean(false),
		},
	},
	deploy: jsii.Boolean(false),
	deployOptions: &stageOptions{
		accessLogDestination: accessLogDestination,
		accessLogFormat: accessLogFormat,
		cacheClusterEnabled: jsii.Boolean(false),
		cacheClusterSize: jsii.String("cacheClusterSize"),
		cacheDataEncrypted: jsii.Boolean(false),
		cacheTtl: duration,
		cachingEnabled: jsii.Boolean(false),
		clientCertificateId: jsii.String("clientCertificateId"),
		dataTraceEnabled: jsii.Boolean(false),
		description: jsii.String("description"),
		documentationVersion: jsii.String("documentationVersion"),
		loggingLevel: awscdk.*Aws_apigateway.methodLoggingLevel_OFF,
		methodOptions: map[string]methodDeploymentOptions{
			"methodOptionsKey": &methodDeploymentOptions{
				"cacheDataEncrypted": jsii.Boolean(false),
				"cacheTtl": duration,
				"cachingEnabled": jsii.Boolean(false),
				"dataTraceEnabled": jsii.Boolean(false),
				"loggingLevel": awscdk.*Aws_apigateway.*methodLoggingLevel_OFF,
				"metricsEnabled": jsii.Boolean(false),
				"throttlingBurstLimit": jsii.Number(123),
				"throttlingRateLimit": jsii.Number(123),
			},
		},
		metricsEnabled: jsii.Boolean(false),
		stageName: jsii.String("stageName"),
		throttlingBurstLimit: jsii.Number(123),
		throttlingRateLimit: jsii.Number(123),
		tracingEnabled: jsii.Boolean(false),
		variables: map[string]*string{
			"variablesKey": jsii.String("variables"),
		},
	},
	disableExecuteApiEndpoint: jsii.Boolean(false),
	domainName: &domainNameOptions{
		certificate: certificate,
		domainName: jsii.String("domainName"),

		// the properties below are optional
		basePath: jsii.String("basePath"),
		endpointType: awscdk.*Aws_apigateway.endpointType_EDGE,
		mtls: &mTLSConfig{
			bucket: bucket,
			key: jsii.String("key"),

			// the properties below are optional
			version: jsii.String("version"),
		},
		securityPolicy: awscdk.*Aws_apigateway.securityPolicy_TLS_1_0,
	},
	endpointExportName: jsii.String("endpointExportName"),
	endpointTypes: []*endpointType{
		awscdk.*Aws_apigateway.*endpointType_EDGE,
	},
	failOnWarnings: jsii.Boolean(false),
	parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	policy: policyDocument,
	restApiName: jsii.String("restApiName"),
	retainDeployments: jsii.Boolean(false),
}

Deprecated: - superseded by `RestApiBaseProps`.

type RestApiProps

type RestApiProps struct {
	// Automatically configure an AWS CloudWatch role for API Gateway.
	// Experimental.
	CloudWatchRole *bool `field:"optional" json:"cloudWatchRole" yaml:"cloudWatchRole"`
	// Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.
	//
	// 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.
	// Experimental.
	Deploy *bool `field:"optional" json:"deploy" yaml:"deploy"`
	// Options for the API Gateway stage that will always point to the latest deployment when `deploy` is enabled.
	//
	// If `deploy` is disabled,
	// this value cannot be set.
	// Experimental.
	DeployOptions *StageOptions `field:"optional" json:"deployOptions" yaml:"deployOptions"`
	// Specifies whether clients can invoke the API using the default execute-api endpoint.
	//
	// To require that clients use a custom domain name to invoke the
	// API, disable the default endpoint.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
	//
	// Experimental.
	DisableExecuteApiEndpoint *bool `field:"optional" json:"disableExecuteApiEndpoint" yaml:"disableExecuteApiEndpoint"`
	// Configure a custom domain name and map it to this API.
	// Experimental.
	DomainName *DomainNameOptions `field:"optional" json:"domainName" yaml:"domainName"`
	// Export name for the CfnOutput containing the API endpoint.
	// Experimental.
	EndpointExportName *string `field:"optional" json:"endpointExportName" yaml:"endpointExportName"`
	// A list of the endpoint types of the API.
	//
	// Use this property when creating
	// an API.
	// Experimental.
	EndpointTypes *[]EndpointType `field:"optional" json:"endpointTypes" yaml:"endpointTypes"`
	// Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.
	// Experimental.
	FailOnWarnings *bool `field:"optional" json:"failOnWarnings" yaml:"failOnWarnings"`
	// Custom header parameters for the request.
	// See: https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html
	//
	// Experimental.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// A policy document that contains the permissions for this RestApi.
	// Experimental.
	Policy awsiam.PolicyDocument `field:"optional" json:"policy" yaml:"policy"`
	// A name for the API Gateway RestApi resource.
	// Experimental.
	RestApiName *string `field:"optional" json:"restApiName" yaml:"restApiName"`
	// Retains old deployment resources when the API changes.
	//
	// This allows
	// manually reverting stages to point to old deployments via the AWS
	// Console.
	// Experimental.
	RetainDeployments *bool `field:"optional" json:"retainDeployments" yaml:"retainDeployments"`
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
	// The source of the API key for metering requests according to a usage plan.
	// Experimental.
	ApiKeySourceType ApiKeySourceType `field:"optional" json:"apiKeySourceType" yaml:"apiKeySourceType"`
	// The list of binary media mime-types that are supported by the RestApi resource, such as "image/png" or "application/octet-stream".
	// Experimental.
	BinaryMediaTypes *[]*string `field:"optional" json:"binaryMediaTypes" yaml:"binaryMediaTypes"`
	// The ID of the API Gateway RestApi resource that you want to clone.
	// Experimental.
	CloneFrom IRestApi `field:"optional" json:"cloneFrom" yaml:"cloneFrom"`
	// A description of the purpose of this API Gateway RestApi resource.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The EndpointConfiguration property type specifies the endpoint types of a REST API.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-restapi-endpointconfiguration.html
	//
	// Experimental.
	EndpointConfiguration *EndpointConfiguration `field:"optional" json:"endpointConfiguration" yaml:"endpointConfiguration"`
	// A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.
	//
	// When compression is enabled, compression or
	// decompression is not applied on the payload if the payload size is
	// smaller than this value. Setting it to zero allows compression for any
	// payload size.
	// Experimental.
	MinimumCompressionSize *float64 `field:"optional" json:"minimumCompressionSize" yaml:"minimumCompressionSize"`
}

Props to create a new instance of RestApi.

Example:

stateMachine := stepfunctions.NewStateMachine(this, jsii.String("MyStateMachine"), &stateMachineProps{
	stateMachineType: stepfunctions.stateMachineType_EXPRESS,
	definition: stepfunctions.chain.start(stepfunctions.NewPass(this, jsii.String("Pass"))),
})

api := apigateway.NewRestApi(this, jsii.String("Api"), &restApiProps{
	restApiName: jsii.String("MyApi"),
})
api.root.addMethod(jsii.String("GET"), apigateway.stepFunctionsIntegration.startExecution(stateMachine))

Experimental.

type S3ApiDefinition

type S3ApiDefinition interface {
	ApiDefinition
	// Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
	// Experimental.
	Bind(_scope awscdk.Construct) *ApiDefinitionConfig
	// Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
	//
	// Specifically it's required to allow assets to add
	// metadata for tooling like SAM CLI to be able to find their origins.
	// Experimental.
	BindAfterCreate(_scope awscdk.Construct, _restApi IRestApi)
}

OpenAPI specification from an S3 archive.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket bucket

s3ApiDefinition := awscdk.Aws_apigateway.NewS3ApiDefinition(bucket, jsii.String("key"), jsii.String("objectVersion"))

Experimental.

func ApiDefinition_FromBucket

func ApiDefinition_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3ApiDefinition

Creates an API definition from a specification file in an S3 bucket. Experimental.

func AssetApiDefinition_FromBucket

func AssetApiDefinition_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3ApiDefinition

Creates an API definition from a specification file in an S3 bucket. Experimental.

func InlineApiDefinition_FromBucket

func InlineApiDefinition_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3ApiDefinition

Creates an API definition from a specification file in an S3 bucket. Experimental.

func NewS3ApiDefinition

func NewS3ApiDefinition(bucket awss3.IBucket, key *string, objectVersion *string) S3ApiDefinition

Experimental.

func S3ApiDefinition_FromBucket

func S3ApiDefinition_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3ApiDefinition

Creates an API definition from a specification file in an S3 bucket. Experimental.

type SecurityPolicy

type SecurityPolicy string

The minimum version of the SSL protocol that you want API Gateway to use for HTTPS connections.

Example:

var acmCertificateForExampleCom interface{}

apigateway.NewDomainName(this, jsii.String("custom-domain"), &domainNameProps{
	domainName: jsii.String("example.com"),
	certificate: acmCertificateForExampleCom,
	endpointType: apigateway.endpointType_EDGE,
	 // default is REGIONAL
	securityPolicy: apigateway.securityPolicy_TLS_1_2,
})

Experimental.

const (
	// Cipher suite TLS 1.0.
	// Experimental.
	SecurityPolicy_TLS_1_0 SecurityPolicy = "TLS_1_0"
	// Cipher suite TLS 1.2.
	// Experimental.
	SecurityPolicy_TLS_1_2 SecurityPolicy = "TLS_1_2"
)

type SpecRestApi

type SpecRestApi interface {
	RestApiBase
	// Experimental.
	CloudWatchAccount() CfnAccount
	// Experimental.
	SetCloudWatchAccount(val CfnAccount)
	// API Gateway stage that points to the latest deployment (if defined).
	//
	// If `deploy` is disabled, you will need to explicitly assign this value in order to
	// set up integrations.
	// Experimental.
	DeploymentStage() Stage
	// Experimental.
	SetDeploymentStage(val Stage)
	// The first domain name mapped to this API, if defined through the `domainName` configuration prop, or added via `addDomainName`.
	// Experimental.
	DomainName() DomainName
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// API Gateway deployment that represents the latest changes of the API.
	//
	// This resource will be automatically updated every time the REST API model changes.
	// This will be undefined if `deploy` is false.
	// Experimental.
	LatestDeployment() Deployment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ID of this API Gateway RestApi.
	// Experimental.
	RestApiId() *string
	// A human friendly name for this Rest API.
	//
	// Note that this is different from `restApiId`.
	// Experimental.
	RestApiName() *string
	// The resource ID of the root resource.
	// Experimental.
	RestApiRootResourceId() *string
	// Represents the root resource of this API endpoint ('/').
	//
	// Resources and Methods are added to this resource.
	// Experimental.
	Root() IResource
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Add an ApiKey.
	// Experimental.
	AddApiKey(id *string, options *ApiKeyOptions) IApiKey
	// Defines an API Gateway domain name and maps it to this API.
	// Experimental.
	AddDomainName(id *string, options *DomainNameOptions) DomainName
	// Adds a new gateway response.
	// Experimental.
	AddGatewayResponse(id *string, options *GatewayResponseOptions) GatewayResponse
	// Adds a usage plan.
	// Experimental.
	AddUsagePlan(id *string, props *UsagePlanProps) UsagePlan
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Gets the "execute-api" ARN.
	// Experimental.
	ArnForExecuteApi(method *string, path *string, stage *string) *string
	// Deprecated: This method will be made internal. No replacement
	ConfigureCloudWatchRole(apiResource CfnRestApi)
	// Deprecated: This method will be made internal. No replacement
	ConfigureDeployment(props *RestApiBaseProps)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns the given named metric for this API.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the API cache in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheHitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the backend in a given period, when API caching is enabled.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheMissCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of client-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricClientError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the total number API requests in a given period.
	//
	// Default: sample count over 5 minutes.
	// Experimental.
	MetricCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricIntegrationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The time between when API Gateway receives a request from a client and when it returns a response to the client.
	//
	// The latency includes the integration latency and other API Gateway overhead.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of server-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricServerError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Returns the URL for an HTTP path.
	//
	// Fails if `deploymentStage` is not set either by `deploy` or explicitly.
	// Experimental.
	UrlForPath(path *string) *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Represents a REST API in Amazon API Gateway, created with an OpenAPI specification.

Some properties normally accessible on @see {@link RestApi} - such as the description - must be declared in the specification. All Resources and Methods need to be defined as part of the OpenAPI specification file, and cannot be added via the CDK.

By default, the API will automatically be deployed and accessible from a public endpoint.

Example:

var integration integration

api := apigateway.NewSpecRestApi(this, jsii.String("books-api"), &specRestApiProps{
	apiDefinition: apigateway.apiDefinition.fromAsset(jsii.String("path-to-file.json")),
})

booksResource := api.root.addResource(jsii.String("books"))
booksResource.addMethod(jsii.String("GET"), integration)

Experimental.

func NewSpecRestApi

func NewSpecRestApi(scope constructs.Construct, id *string, props *SpecRestApiProps) SpecRestApi

Experimental.

type SpecRestApiProps

type SpecRestApiProps struct {
	// Automatically configure an AWS CloudWatch role for API Gateway.
	// Experimental.
	CloudWatchRole *bool `field:"optional" json:"cloudWatchRole" yaml:"cloudWatchRole"`
	// Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.
	//
	// 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.
	// Experimental.
	Deploy *bool `field:"optional" json:"deploy" yaml:"deploy"`
	// Options for the API Gateway stage that will always point to the latest deployment when `deploy` is enabled.
	//
	// If `deploy` is disabled,
	// this value cannot be set.
	// Experimental.
	DeployOptions *StageOptions `field:"optional" json:"deployOptions" yaml:"deployOptions"`
	// Specifies whether clients can invoke the API using the default execute-api endpoint.
	//
	// To require that clients use a custom domain name to invoke the
	// API, disable the default endpoint.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
	//
	// Experimental.
	DisableExecuteApiEndpoint *bool `field:"optional" json:"disableExecuteApiEndpoint" yaml:"disableExecuteApiEndpoint"`
	// Configure a custom domain name and map it to this API.
	// Experimental.
	DomainName *DomainNameOptions `field:"optional" json:"domainName" yaml:"domainName"`
	// Export name for the CfnOutput containing the API endpoint.
	// Experimental.
	EndpointExportName *string `field:"optional" json:"endpointExportName" yaml:"endpointExportName"`
	// A list of the endpoint types of the API.
	//
	// Use this property when creating
	// an API.
	// Experimental.
	EndpointTypes *[]EndpointType `field:"optional" json:"endpointTypes" yaml:"endpointTypes"`
	// Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.
	// Experimental.
	FailOnWarnings *bool `field:"optional" json:"failOnWarnings" yaml:"failOnWarnings"`
	// Custom header parameters for the request.
	// See: https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html
	//
	// Experimental.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// A policy document that contains the permissions for this RestApi.
	// Experimental.
	Policy awsiam.PolicyDocument `field:"optional" json:"policy" yaml:"policy"`
	// A name for the API Gateway RestApi resource.
	// Experimental.
	RestApiName *string `field:"optional" json:"restApiName" yaml:"restApiName"`
	// Retains old deployment resources when the API changes.
	//
	// This allows
	// manually reverting stages to point to old deployments via the AWS
	// Console.
	// Experimental.
	RetainDeployments *bool `field:"optional" json:"retainDeployments" yaml:"retainDeployments"`
	// An OpenAPI definition compatible with API Gateway.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-import-api.html
	//
	// Experimental.
	ApiDefinition ApiDefinition `field:"required" json:"apiDefinition" yaml:"apiDefinition"`
}

Props to instantiate a new SpecRestApi.

Example:

var integration integration

api := apigateway.NewSpecRestApi(this, jsii.String("books-api"), &specRestApiProps{
	apiDefinition: apigateway.apiDefinition.fromAsset(jsii.String("path-to-file.json")),
})

booksResource := api.root.addResource(jsii.String("books"))
booksResource.addMethod(jsii.String("GET"), integration)

Experimental.

type Stage

type Stage interface {
	awscdk.Resource
	IStage
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// RestApi to which this stage is associated.
	// Experimental.
	RestApi() IRestApi
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Returns the resource ARN for this stage:.
	//
	// arn:aws:apigateway:{region}::/restapis/{restApiId}/stages/{stageName}
	//
	// Note that this is separate from the execute-api ARN for methods and resources
	// within this stage.
	// Experimental.
	StageArn() *string
	// Name of this stage.
	// Experimental.
	StageName() *string
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Returns the invoke URL for a certain path.
	// Experimental.
	UrlForPath(path *string) *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Example:

// production stage
prdLogGroup := logs.NewLogGroup(this, jsii.String("PrdLogs"))
api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(prdLogGroup),
		accessLogFormat: apigateway.accessLogFormat.jsonWithStandardFields(),
	},
})
deployment := apigateway.NewDeployment(this, jsii.String("Deployment"), &deploymentProps{
	api: api,
})

// development stage
devLogGroup := logs.NewLogGroup(this, jsii.String("DevLogs"))
apigateway.NewStage(this, jsii.String("dev"), &stageProps{
	deployment: deployment,
	accessLogDestination: apigateway.NewLogGroupLogDestination(devLogGroup),
	accessLogFormat: apigateway.*accessLogFormat.jsonWithStandardFields(&jsonWithStandardFieldProps{
		caller: jsii.Boolean(false),
		httpMethod: jsii.Boolean(true),
		ip: jsii.Boolean(true),
		protocol: jsii.Boolean(true),
		requestTime: jsii.Boolean(true),
		resourcePath: jsii.Boolean(true),
		responseLength: jsii.Boolean(true),
		status: jsii.Boolean(true),
		user: jsii.Boolean(true),
	}),
})

Experimental.

func NewStage

func NewStage(scope constructs.Construct, id *string, props *StageProps) Stage

Experimental.

type StageOptions

type StageOptions struct {
	// Indicates whether the cached responses are encrypted.
	// Experimental.
	CacheDataEncrypted *bool `field:"optional" json:"cacheDataEncrypted" yaml:"cacheDataEncrypted"`
	// Specifies the time to live (TTL), in seconds, for cached responses.
	//
	// The
	// higher the TTL, the longer the response will be cached.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
	//
	// Experimental.
	CacheTtl awscdk.Duration `field:"optional" json:"cacheTtl" yaml:"cacheTtl"`
	// Specifies whether responses should be cached and returned for requests.
	//
	// A
	// cache cluster must be enabled on the stage for responses to be cached.
	// Experimental.
	CachingEnabled *bool `field:"optional" json:"cachingEnabled" yaml:"cachingEnabled"`
	// Specifies whether data trace logging is enabled for this method.
	//
	// When enabled, API gateway will log the full API requests and responses.
	// This can be useful to troubleshoot APIs, but can result in logging sensitive data.
	// We recommend that you don't enable this feature for production APIs.
	// Experimental.
	DataTraceEnabled *bool `field:"optional" json:"dataTraceEnabled" yaml:"dataTraceEnabled"`
	// Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
	// Experimental.
	LoggingLevel MethodLoggingLevel `field:"optional" json:"loggingLevel" yaml:"loggingLevel"`
	// Specifies whether Amazon CloudWatch metrics are enabled for this method.
	// Experimental.
	MetricsEnabled *bool `field:"optional" json:"metricsEnabled" yaml:"metricsEnabled"`
	// Specifies the throttling burst limit.
	//
	// The total rate of all requests in your AWS account is limited to 5,000 requests.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
	//
	// Experimental.
	ThrottlingBurstLimit *float64 `field:"optional" json:"throttlingBurstLimit" yaml:"throttlingBurstLimit"`
	// Specifies the throttling rate limit.
	//
	// The total rate of all requests in your AWS account is limited to 10,000 requests per second (rps).
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
	//
	// Experimental.
	ThrottlingRateLimit *float64 `field:"optional" json:"throttlingRateLimit" yaml:"throttlingRateLimit"`
	// The CloudWatch Logs log group.
	// Experimental.
	AccessLogDestination IAccessLogDestination `field:"optional" json:"accessLogDestination" yaml:"accessLogDestination"`
	// A single line format of access logs of data, as specified by selected $content variables.
	//
	// The format must include at least `AccessLogFormat.contextRequestId()`.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference
	//
	// Experimental.
	AccessLogFormat AccessLogFormat `field:"optional" json:"accessLogFormat" yaml:"accessLogFormat"`
	// Indicates whether cache clustering is enabled for the stage.
	// Experimental.
	CacheClusterEnabled *bool `field:"optional" json:"cacheClusterEnabled" yaml:"cacheClusterEnabled"`
	// The stage's cache cluster size.
	// Experimental.
	CacheClusterSize *string `field:"optional" json:"cacheClusterSize" yaml:"cacheClusterSize"`
	// The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.
	// Experimental.
	ClientCertificateId *string `field:"optional" json:"clientCertificateId" yaml:"clientCertificateId"`
	// A description of the purpose of the stage.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The version identifier of the API documentation snapshot.
	// Experimental.
	DocumentationVersion *string `field:"optional" json:"documentationVersion" yaml:"documentationVersion"`
	// Method deployment options for specific resources/methods.
	//
	// These will
	// override common options defined in `StageOptions#methodOptions`.
	// Experimental.
	MethodOptions *map[string]*MethodDeploymentOptions `field:"optional" json:"methodOptions" yaml:"methodOptions"`
	// The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI).
	// Experimental.
	StageName *string `field:"optional" json:"stageName" yaml:"stageName"`
	// Specifies whether Amazon X-Ray tracing is enabled for this method.
	// Experimental.
	TracingEnabled *bool `field:"optional" json:"tracingEnabled" yaml:"tracingEnabled"`
	// A map that defines the stage variables.
	//
	// Variable names must consist of
	// alphanumeric characters, and the values must match the following regular
	// expression: [A-Za-z0-9-._~:/?#&amp;=,]+.
	// Experimental.
	Variables *map[string]*string `field:"optional" json:"variables" yaml:"variables"`
}

Example:

logGroup := logs.NewLogGroup(this, jsii.String("ApiGatewayAccessLogs"))
api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(logGroup),
		accessLogFormat: apigateway.accessLogFormat.clf(),
	},
})

Experimental.

type StageProps

type StageProps struct {
	// Indicates whether the cached responses are encrypted.
	// Experimental.
	CacheDataEncrypted *bool `field:"optional" json:"cacheDataEncrypted" yaml:"cacheDataEncrypted"`
	// Specifies the time to live (TTL), in seconds, for cached responses.
	//
	// The
	// higher the TTL, the longer the response will be cached.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
	//
	// Experimental.
	CacheTtl awscdk.Duration `field:"optional" json:"cacheTtl" yaml:"cacheTtl"`
	// Specifies whether responses should be cached and returned for requests.
	//
	// A
	// cache cluster must be enabled on the stage for responses to be cached.
	// Experimental.
	CachingEnabled *bool `field:"optional" json:"cachingEnabled" yaml:"cachingEnabled"`
	// Specifies whether data trace logging is enabled for this method.
	//
	// When enabled, API gateway will log the full API requests and responses.
	// This can be useful to troubleshoot APIs, but can result in logging sensitive data.
	// We recommend that you don't enable this feature for production APIs.
	// Experimental.
	DataTraceEnabled *bool `field:"optional" json:"dataTraceEnabled" yaml:"dataTraceEnabled"`
	// Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
	// Experimental.
	LoggingLevel MethodLoggingLevel `field:"optional" json:"loggingLevel" yaml:"loggingLevel"`
	// Specifies whether Amazon CloudWatch metrics are enabled for this method.
	// Experimental.
	MetricsEnabled *bool `field:"optional" json:"metricsEnabled" yaml:"metricsEnabled"`
	// Specifies the throttling burst limit.
	//
	// The total rate of all requests in your AWS account is limited to 5,000 requests.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
	//
	// Experimental.
	ThrottlingBurstLimit *float64 `field:"optional" json:"throttlingBurstLimit" yaml:"throttlingBurstLimit"`
	// Specifies the throttling rate limit.
	//
	// The total rate of all requests in your AWS account is limited to 10,000 requests per second (rps).
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
	//
	// Experimental.
	ThrottlingRateLimit *float64 `field:"optional" json:"throttlingRateLimit" yaml:"throttlingRateLimit"`
	// The CloudWatch Logs log group.
	// Experimental.
	AccessLogDestination IAccessLogDestination `field:"optional" json:"accessLogDestination" yaml:"accessLogDestination"`
	// A single line format of access logs of data, as specified by selected $content variables.
	//
	// The format must include at least `AccessLogFormat.contextRequestId()`.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference
	//
	// Experimental.
	AccessLogFormat AccessLogFormat `field:"optional" json:"accessLogFormat" yaml:"accessLogFormat"`
	// Indicates whether cache clustering is enabled for the stage.
	// Experimental.
	CacheClusterEnabled *bool `field:"optional" json:"cacheClusterEnabled" yaml:"cacheClusterEnabled"`
	// The stage's cache cluster size.
	// Experimental.
	CacheClusterSize *string `field:"optional" json:"cacheClusterSize" yaml:"cacheClusterSize"`
	// The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.
	// Experimental.
	ClientCertificateId *string `field:"optional" json:"clientCertificateId" yaml:"clientCertificateId"`
	// A description of the purpose of the stage.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The version identifier of the API documentation snapshot.
	// Experimental.
	DocumentationVersion *string `field:"optional" json:"documentationVersion" yaml:"documentationVersion"`
	// Method deployment options for specific resources/methods.
	//
	// These will
	// override common options defined in `StageOptions#methodOptions`.
	// Experimental.
	MethodOptions *map[string]*MethodDeploymentOptions `field:"optional" json:"methodOptions" yaml:"methodOptions"`
	// The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI).
	// Experimental.
	StageName *string `field:"optional" json:"stageName" yaml:"stageName"`
	// Specifies whether Amazon X-Ray tracing is enabled for this method.
	// Experimental.
	TracingEnabled *bool `field:"optional" json:"tracingEnabled" yaml:"tracingEnabled"`
	// A map that defines the stage variables.
	//
	// Variable names must consist of
	// alphanumeric characters, and the values must match the following regular
	// expression: [A-Za-z0-9-._~:/?#&amp;=,]+.
	// Experimental.
	Variables *map[string]*string `field:"optional" json:"variables" yaml:"variables"`
	// The deployment that this stage points to [disable-awslint:ref-via-interface].
	// Experimental.
	Deployment Deployment `field:"required" json:"deployment" yaml:"deployment"`
}

Example:

// production stage
prdLogGroup := logs.NewLogGroup(this, jsii.String("PrdLogs"))
api := apigateway.NewRestApi(this, jsii.String("books"), &restApiProps{
	deployOptions: &stageOptions{
		accessLogDestination: apigateway.NewLogGroupLogDestination(prdLogGroup),
		accessLogFormat: apigateway.accessLogFormat.jsonWithStandardFields(),
	},
})
deployment := apigateway.NewDeployment(this, jsii.String("Deployment"), &deploymentProps{
	api: api,
})

// development stage
devLogGroup := logs.NewLogGroup(this, jsii.String("DevLogs"))
apigateway.NewStage(this, jsii.String("dev"), &stageProps{
	deployment: deployment,
	accessLogDestination: apigateway.NewLogGroupLogDestination(devLogGroup),
	accessLogFormat: apigateway.*accessLogFormat.jsonWithStandardFields(&jsonWithStandardFieldProps{
		caller: jsii.Boolean(false),
		httpMethod: jsii.Boolean(true),
		ip: jsii.Boolean(true),
		protocol: jsii.Boolean(true),
		requestTime: jsii.Boolean(true),
		resourcePath: jsii.Boolean(true),
		responseLength: jsii.Boolean(true),
		status: jsii.Boolean(true),
		user: jsii.Boolean(true),
	}),
})

Experimental.

type StepFunctionsExecutionIntegrationOptions

type StepFunctionsExecutionIntegrationOptions struct {
	// A list of request parameters whose values are to be cached.
	//
	// It determines
	// request parameters that will make it into the cache key.
	// Experimental.
	CacheKeyParameters *[]*string `field:"optional" json:"cacheKeyParameters" yaml:"cacheKeyParameters"`
	// An API-specific tag group of related cached parameters.
	// Experimental.
	CacheNamespace *string `field:"optional" json:"cacheNamespace" yaml:"cacheNamespace"`
	// The type of network connection to the integration endpoint.
	// Experimental.
	ConnectionType ConnectionType `field:"optional" json:"connectionType" yaml:"connectionType"`
	// Specifies how to handle request payload content type conversions.
	// Experimental.
	ContentHandling ContentHandling `field:"optional" json:"contentHandling" yaml:"contentHandling"`
	// Requires that the caller's identity be passed through from the request.
	// Experimental.
	CredentialsPassthrough *bool `field:"optional" json:"credentialsPassthrough" yaml:"credentialsPassthrough"`
	// An IAM role that API Gateway assumes.
	//
	// Mutually exclusive with `credentialsPassThrough`.
	// Experimental.
	CredentialsRole awsiam.IRole `field:"optional" json:"credentialsRole" yaml:"credentialsRole"`
	// The response that API Gateway provides after a method's backend completes processing a request.
	//
	// API Gateway intercepts the response from the
	// backend so that you can control how API Gateway surfaces backend
	// responses. For example, you can map the backend status codes to codes
	// that you define.
	// Experimental.
	IntegrationResponses *[]*IntegrationResponse `field:"optional" json:"integrationResponses" yaml:"integrationResponses"`
	// Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.
	//
	// There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
	// NEVER.
	// Experimental.
	PassthroughBehavior PassthroughBehavior `field:"optional" json:"passthroughBehavior" yaml:"passthroughBehavior"`
	// The request parameters that API Gateway sends with the backend request.
	//
	// Specify request parameters as key-value pairs (string-to-string
	// mappings), with a destination as the key and a source as the value.
	//
	// Specify the destination by using the following pattern
	// integration.request.location.name, where location is querystring, path,
	// or header, and name is a valid, unique parameter name.
	//
	// The source must be an existing method request parameter or a static
	// value. You must enclose static values in single quotation marks and
	// pre-encode these values based on their destination in the request.
	// Experimental.
	RequestParameters *map[string]*string `field:"optional" json:"requestParameters" yaml:"requestParameters"`
	// A map of Apache Velocity templates that are applied on the request payload.
	//
	// The template that API Gateway uses is based on the value of the
	// Content-Type header that's sent by the client. The content type value is
	// the key, and the template is the value (specified as a string), such as
	// the following snippet:
	//
	// “`
	//    { "application/json": "{ \"statusCode\": 200 }" }
	// “`.
	// See: http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
	//
	// Experimental.
	RequestTemplates *map[string]*string `field:"optional" json:"requestTemplates" yaml:"requestTemplates"`
	// The maximum amount of time an integration will run before it returns without a response.
	//
	// Must be between 50 milliseconds and 29 seconds.
	// Experimental.
	Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"`
	// The VpcLink used for the integration.
	//
	// Required if connectionType is VPC_LINK.
	// Experimental.
	VpcLink IVpcLink `field:"optional" json:"vpcLink" yaml:"vpcLink"`
	// If the whole authorizer object, including custom context values should be in the execution input.
	//
	// The execution input will include a new key `authorizer`:
	//
	// {
	//    "body": {},
	//    "authorizer": {
	//      "key": "value"
	//    }
	// }.
	// Experimental.
	Authorizer *bool `field:"optional" json:"authorizer" yaml:"authorizer"`
	// Check if header is to be included inside the execution input.
	//
	// The execution input will include a new key `headers`:
	//
	// {
	//    "body": {},
	//    "headers": {
	//       "header1": "value",
	//       "header2": "value"
	//    }
	// }.
	// Experimental.
	Headers *bool `field:"optional" json:"headers" yaml:"headers"`
	// Check if path is to be included inside the execution input.
	//
	// The execution input will include a new key `path`:
	//
	// {
	//    "body": {},
	//    "path": {
	//      "resourceName": "resourceValue"
	//    }
	// }.
	// Experimental.
	Path *bool `field:"optional" json:"path" yaml:"path"`
	// Check if querystring is to be included inside the execution input.
	//
	// The execution input will include a new key `queryString`:
	//
	// {
	//    "body": {},
	//    "querystring": {
	//      "key": "value"
	//    }
	// }.
	// Experimental.
	Querystring *bool `field:"optional" json:"querystring" yaml:"querystring"`
	// Which details of the incoming request must be passed onto the underlying state machine, such as, account id, user identity, request id, etc.
	//
	// The execution input will include a new key `requestContext`:
	//
	// {
	//    "body": {},
	//    "requestContext": {
	//        "key": "value"
	//    }
	// }.
	// Experimental.
	RequestContext *RequestContext `field:"optional" json:"requestContext" yaml:"requestContext"`
}

Options when configuring Step Functions synchronous integration with Rest API.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var duration duration
var role role
var vpcLink vpcLink

stepFunctionsExecutionIntegrationOptions := &stepFunctionsExecutionIntegrationOptions{
	authorizer: jsii.Boolean(false),
	cacheKeyParameters: []*string{
		jsii.String("cacheKeyParameters"),
	},
	cacheNamespace: jsii.String("cacheNamespace"),
	connectionType: awscdk.Aws_apigateway.connectionType_INTERNET,
	contentHandling: awscdk.*Aws_apigateway.contentHandling_CONVERT_TO_BINARY,
	credentialsPassthrough: jsii.Boolean(false),
	credentialsRole: role,
	headers: jsii.Boolean(false),
	integrationResponses: []integrationResponse{
		&integrationResponse{
			statusCode: jsii.String("statusCode"),

			// the properties below are optional
			contentHandling: awscdk.*Aws_apigateway.*contentHandling_CONVERT_TO_BINARY,
			responseParameters: map[string]*string{
				"responseParametersKey": jsii.String("responseParameters"),
			},
			responseTemplates: map[string]*string{
				"responseTemplatesKey": jsii.String("responseTemplates"),
			},
			selectionPattern: jsii.String("selectionPattern"),
		},
	},
	passthroughBehavior: awscdk.*Aws_apigateway.passthroughBehavior_WHEN_NO_MATCH,
	path: jsii.Boolean(false),
	querystring: jsii.Boolean(false),
	requestContext: &requestContext{
		accountId: jsii.Boolean(false),
		apiId: jsii.Boolean(false),
		apiKey: jsii.Boolean(false),
		authorizerPrincipalId: jsii.Boolean(false),
		caller: jsii.Boolean(false),
		cognitoAuthenticationProvider: jsii.Boolean(false),
		cognitoAuthenticationType: jsii.Boolean(false),
		cognitoIdentityId: jsii.Boolean(false),
		cognitoIdentityPoolId: jsii.Boolean(false),
		httpMethod: jsii.Boolean(false),
		requestId: jsii.Boolean(false),
		resourceId: jsii.Boolean(false),
		resourcePath: jsii.Boolean(false),
		sourceIp: jsii.Boolean(false),
		stage: jsii.Boolean(false),
		user: jsii.Boolean(false),
		userAgent: jsii.Boolean(false),
		userArn: jsii.Boolean(false),
	},
	requestParameters: map[string]*string{
		"requestParametersKey": jsii.String("requestParameters"),
	},
	requestTemplates: map[string]*string{
		"requestTemplatesKey": jsii.String("requestTemplates"),
	},
	timeout: duration,
	vpcLink: vpcLink,
}

Experimental.

type StepFunctionsIntegration

type StepFunctionsIntegration interface {
}

Options to integrate with various StepFunction API.

Example:

stateMachine := stepfunctions.NewStateMachine(this, jsii.String("MyStateMachine"), &stateMachineProps{
	stateMachineType: stepfunctions.stateMachineType_EXPRESS,
	definition: stepfunctions.chain.start(stepfunctions.NewPass(this, jsii.String("Pass"))),
})

api := apigateway.NewRestApi(this, jsii.String("Api"), &restApiProps{
	restApiName: jsii.String("MyApi"),
})
api.root.addMethod(jsii.String("GET"), apigateway.stepFunctionsIntegration.startExecution(stateMachine))

Experimental.

func NewStepFunctionsIntegration

func NewStepFunctionsIntegration() StepFunctionsIntegration

Experimental.

type StepFunctionsRestApi

type StepFunctionsRestApi interface {
	RestApi
	// Experimental.
	CloudWatchAccount() CfnAccount
	// Experimental.
	SetCloudWatchAccount(val CfnAccount)
	// API Gateway stage that points to the latest deployment (if defined).
	//
	// If `deploy` is disabled, you will need to explicitly assign this value in order to
	// set up integrations.
	// Experimental.
	DeploymentStage() Stage
	// Experimental.
	SetDeploymentStage(val Stage)
	// The first domain name mapped to this API, if defined through the `domainName` configuration prop, or added via `addDomainName`.
	// Experimental.
	DomainName() DomainName
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// API Gateway deployment that represents the latest changes of the API.
	//
	// This resource will be automatically updated every time the REST API model changes.
	// This will be undefined if `deploy` is false.
	// Experimental.
	LatestDeployment() Deployment
	// The list of methods bound to this RestApi.
	// Experimental.
	Methods() *[]Method
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ID of this API Gateway RestApi.
	// Experimental.
	RestApiId() *string
	// A human friendly name for this Rest API.
	//
	// Note that this is different from `restApiId`.
	// Experimental.
	RestApiName() *string
	// The resource ID of the root resource.
	// Experimental.
	RestApiRootResourceId() *string
	// Represents the root resource of this API endpoint ('/').
	//
	// Resources and Methods are added to this resource.
	// Experimental.
	Root() IResource
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The deployed root URL of this REST API.
	// Experimental.
	Url() *string
	// Add an ApiKey.
	// Experimental.
	AddApiKey(id *string, options *ApiKeyOptions) IApiKey
	// Defines an API Gateway domain name and maps it to this API.
	// Experimental.
	AddDomainName(id *string, options *DomainNameOptions) DomainName
	// Adds a new gateway response.
	// Experimental.
	AddGatewayResponse(id *string, options *GatewayResponseOptions) GatewayResponse
	// Adds a new model.
	// Experimental.
	AddModel(id *string, props *ModelOptions) Model
	// Adds a new request validator.
	// Experimental.
	AddRequestValidator(id *string, props *RequestValidatorOptions) RequestValidator
	// Adds a usage plan.
	// Experimental.
	AddUsagePlan(id *string, props *UsagePlanProps) UsagePlan
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Gets the "execute-api" ARN.
	// Experimental.
	ArnForExecuteApi(method *string, path *string, stage *string) *string
	// Deprecated: This method will be made internal. No replacement
	ConfigureCloudWatchRole(apiResource CfnRestApi)
	// Deprecated: This method will be made internal. No replacement
	ConfigureDeployment(props *RestApiBaseProps)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns the given named metric for this API.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the API cache in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheHitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of requests served from the backend in a given period, when API caching is enabled.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricCacheMissCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of client-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricClientError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the total number API requests in a given period.
	//
	// Default: sample count over 5 minutes.
	// Experimental.
	MetricCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricIntegrationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The time between when API Gateway receives a request from a client and when it returns a response to the client.
	//
	// The latency includes the integration latency and other API Gateway overhead.
	//
	// Default: average over 5 minutes.
	// Experimental.
	MetricLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of server-side errors captured in a given period.
	//
	// Default: sum over 5 minutes.
	// Experimental.
	MetricServerError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Returns the URL for an HTTP path.
	//
	// Fails if `deploymentStage` is not set either by `deploy` or explicitly.
	// Experimental.
	UrlForPath(path *string) *string
	// Performs validation of the REST API.
	// Experimental.
	Validate() *[]*string
}

Defines an API Gateway REST API with a Synchrounous Express State Machine as a proxy integration.

Example:

stateMachineDefinition := stepfunctions.NewPass(this, jsii.String("PassState"))

stateMachine := stepfunctions.NewStateMachine(this, jsii.String("StateMachine"), &stateMachineProps{
	definition: stateMachineDefinition,
	stateMachineType: stepfunctions.stateMachineType_EXPRESS,
})

apigateway.NewStepFunctionsRestApi(this, jsii.String("StepFunctionsRestApi"), &stepFunctionsRestApiProps{
	deploy: jsii.Boolean(true),
	stateMachine: stateMachine,
})

Experimental.

func NewStepFunctionsRestApi

func NewStepFunctionsRestApi(scope constructs.Construct, id *string, props *StepFunctionsRestApiProps) StepFunctionsRestApi

Experimental.

type StepFunctionsRestApiProps

type StepFunctionsRestApiProps struct {
	// Automatically configure an AWS CloudWatch role for API Gateway.
	// Experimental.
	CloudWatchRole *bool `field:"optional" json:"cloudWatchRole" yaml:"cloudWatchRole"`
	// Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.
	//
	// 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.
	// Experimental.
	Deploy *bool `field:"optional" json:"deploy" yaml:"deploy"`
	// Options for the API Gateway stage that will always point to the latest deployment when `deploy` is enabled.
	//
	// If `deploy` is disabled,
	// this value cannot be set.
	// Experimental.
	DeployOptions *StageOptions `field:"optional" json:"deployOptions" yaml:"deployOptions"`
	// Specifies whether clients can invoke the API using the default execute-api endpoint.
	//
	// To require that clients use a custom domain name to invoke the
	// API, disable the default endpoint.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
	//
	// Experimental.
	DisableExecuteApiEndpoint *bool `field:"optional" json:"disableExecuteApiEndpoint" yaml:"disableExecuteApiEndpoint"`
	// Configure a custom domain name and map it to this API.
	// Experimental.
	DomainName *DomainNameOptions `field:"optional" json:"domainName" yaml:"domainName"`
	// Export name for the CfnOutput containing the API endpoint.
	// Experimental.
	EndpointExportName *string `field:"optional" json:"endpointExportName" yaml:"endpointExportName"`
	// A list of the endpoint types of the API.
	//
	// Use this property when creating
	// an API.
	// Experimental.
	EndpointTypes *[]EndpointType `field:"optional" json:"endpointTypes" yaml:"endpointTypes"`
	// Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.
	// Experimental.
	FailOnWarnings *bool `field:"optional" json:"failOnWarnings" yaml:"failOnWarnings"`
	// Custom header parameters for the request.
	// See: https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html
	//
	// Experimental.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// A policy document that contains the permissions for this RestApi.
	// Experimental.
	Policy awsiam.PolicyDocument `field:"optional" json:"policy" yaml:"policy"`
	// A name for the API Gateway RestApi resource.
	// Experimental.
	RestApiName *string `field:"optional" json:"restApiName" yaml:"restApiName"`
	// Retains old deployment resources when the API changes.
	//
	// This allows
	// manually reverting stages to point to old deployments via the AWS
	// Console.
	// Experimental.
	RetainDeployments *bool `field:"optional" json:"retainDeployments" yaml:"retainDeployments"`
	// Adds a CORS preflight OPTIONS method to this resource and all child resources.
	//
	// You can add CORS at the resource-level using `addCorsPreflight`.
	// Experimental.
	DefaultCorsPreflightOptions *CorsOptions `field:"optional" json:"defaultCorsPreflightOptions" yaml:"defaultCorsPreflightOptions"`
	// An integration to use as a default for all methods created within this API unless an integration is specified.
	// Experimental.
	DefaultIntegration Integration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// Method options to use as a default for all methods created within this API unless custom options are specified.
	// Experimental.
	DefaultMethodOptions *MethodOptions `field:"optional" json:"defaultMethodOptions" yaml:"defaultMethodOptions"`
	// The source of the API key for metering requests according to a usage plan.
	// Experimental.
	ApiKeySourceType ApiKeySourceType `field:"optional" json:"apiKeySourceType" yaml:"apiKeySourceType"`
	// The list of binary media mime-types that are supported by the RestApi resource, such as "image/png" or "application/octet-stream".
	// Experimental.
	BinaryMediaTypes *[]*string `field:"optional" json:"binaryMediaTypes" yaml:"binaryMediaTypes"`
	// The ID of the API Gateway RestApi resource that you want to clone.
	// Experimental.
	CloneFrom IRestApi `field:"optional" json:"cloneFrom" yaml:"cloneFrom"`
	// A description of the purpose of this API Gateway RestApi resource.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The EndpointConfiguration property type specifies the endpoint types of a REST API.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-restapi-endpointconfiguration.html
	//
	// Experimental.
	EndpointConfiguration *EndpointConfiguration `field:"optional" json:"endpointConfiguration" yaml:"endpointConfiguration"`
	// A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.
	//
	// When compression is enabled, compression or
	// decompression is not applied on the payload if the payload size is
	// smaller than this value. Setting it to zero allows compression for any
	// payload size.
	// Experimental.
	MinimumCompressionSize *float64 `field:"optional" json:"minimumCompressionSize" yaml:"minimumCompressionSize"`
	// The default State Machine that handles all requests from this API.
	//
	// This stateMachine will be used as a the default integration for all methods in
	// this API, unless specified otherwise in `addMethod`.
	// Experimental.
	StateMachine awsstepfunctions.IStateMachine `field:"required" json:"stateMachine" yaml:"stateMachine"`
	// If the whole authorizer object, including custom context values should be in the execution input.
	//
	// The execution input will include a new key `authorizer`:
	//
	// {
	//    "body": {},
	//    "authorizer": {
	//      "key": "value"
	//    }
	// }.
	// Experimental.
	Authorizer *bool `field:"optional" json:"authorizer" yaml:"authorizer"`
	// Check if header is to be included inside the execution input.
	//
	// The execution input will include a new key `headers`:
	//
	// {
	//    "body": {},
	//    "headers": {
	//       "header1": "value",
	//       "header2": "value"
	//    }
	// }.
	// Experimental.
	Headers *bool `field:"optional" json:"headers" yaml:"headers"`
	// Check if path is to be included inside the execution input.
	//
	// The execution input will include a new key `path`:
	//
	// {
	//    "body": {},
	//    "path": {
	//      "resourceName": "resourceValue"
	//    }
	// }.
	// Experimental.
	Path *bool `field:"optional" json:"path" yaml:"path"`
	// Check if querystring is to be included inside the execution input.
	//
	// The execution input will include a new key `queryString`:
	//
	// {
	//    "body": {},
	//    "querystring": {
	//      "key": "value"
	//    }
	// }.
	// Experimental.
	Querystring *bool `field:"optional" json:"querystring" yaml:"querystring"`
	// Which details of the incoming request must be passed onto the underlying state machine, such as, account id, user identity, request id, etc.
	//
	// The execution input will include a new key `requestContext`:
	//
	// {
	//    "body": {},
	//    "requestContext": {
	//        "key": "value"
	//    }
	// }.
	// Experimental.
	RequestContext *RequestContext `field:"optional" json:"requestContext" yaml:"requestContext"`
	// An IAM role that API Gateway will assume to start the execution of the state machine.
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
}

Properties for StepFunctionsRestApi.

Example:

stateMachineDefinition := stepfunctions.NewPass(this, jsii.String("PassState"))

stateMachine := stepfunctions.NewStateMachine(this, jsii.String("StateMachine"), &stateMachineProps{
	definition: stateMachineDefinition,
	stateMachineType: stepfunctions.stateMachineType_EXPRESS,
})

apigateway.NewStepFunctionsRestApi(this, jsii.String("StepFunctionsRestApi"), &stepFunctionsRestApiProps{
	deploy: jsii.Boolean(true),
	stateMachine: stateMachine,
})

Experimental.

type ThrottleSettings

type ThrottleSettings struct {
	// The maximum API request rate limit over a time ranging from one to a few seconds.
	// Experimental.
	BurstLimit *float64 `field:"optional" json:"burstLimit" yaml:"burstLimit"`
	// The API request steady-state rate limit (average requests per second over an extended period of time).
	// Experimental.
	RateLimit *float64 `field:"optional" json:"rateLimit" yaml:"rateLimit"`
}

Container for defining throttling parameters to API stages or methods.

Example:

var integration lambdaIntegration

api := apigateway.NewRestApi(this, jsii.String("hello-api"))

v1 := api.root.addResource(jsii.String("v1"))
echo := v1.addResource(jsii.String("echo"))
echoMethod := echo.addMethod(jsii.String("GET"), integration, &methodOptions{
	apiKeyRequired: jsii.Boolean(true),
})

plan := api.addUsagePlan(jsii.String("UsagePlan"), &usagePlanProps{
	name: jsii.String("Easy"),
	throttle: &throttleSettings{
		rateLimit: jsii.Number(10),
		burstLimit: jsii.Number(2),
	},
})

key := api.addApiKey(jsii.String("ApiKey"))
plan.addApiKey(key)

Experimental.

type ThrottlingPerMethod

type ThrottlingPerMethod struct {
	// [disable-awslint:ref-via-interface] The method for which you specify the throttling settings.
	// Experimental.
	Method Method `field:"required" json:"method" yaml:"method"`
	// Specifies the overall request rate (average requests per second) and burst capacity.
	// Experimental.
	Throttle *ThrottleSettings `field:"required" json:"throttle" yaml:"throttle"`
}

Represents per-method throttling for a resource.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var method method

throttlingPerMethod := &throttlingPerMethod{
	method: method,
	throttle: &throttleSettings{
		burstLimit: jsii.Number(123),
		rateLimit: jsii.Number(123),
	},
}

Experimental.

type TokenAuthorizer

type TokenAuthorizer interface {
	Authorizer
	IAuthorizer
	// The authorization type of this authorizer.
	// Experimental.
	AuthorizationType() AuthorizationType
	// The ARN of the authorizer to be used in permission policies, such as IAM and resource-based grants.
	// Experimental.
	AuthorizerArn() *string
	// The id of the authorizer.
	// Experimental.
	AuthorizerId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The Lambda function handler that this authorizer uses.
	// Experimental.
	Handler() awslambda.IFunction
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// Experimental.
	RestApiId() *string
	// Experimental.
	SetRestApiId(val *string)
	// The IAM role that the API Gateway service assumes while invoking the Lambda function.
	// Experimental.
	Role() awsiam.IRole
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a token that resolves to the Rest Api Id at the time of synthesis.
	//
	// Throws an error, during token resolution, if no RestApi is attached to this authorizer.
	// Experimental.
	LazyRestApiId() *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Sets up the permissions necessary for the API Gateway service to invoke the Lambda function.
	// Experimental.
	SetupPermissions()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Token based lambda authorizer that recognizes the caller's identity as a bearer token, such as a JSON Web Token (JWT) or an OAuth token.

Based on the token, authorization is performed by a lambda function.

Example:

var authFn function
var books resource

auth := apigateway.NewTokenAuthorizer(this, jsii.String("booksAuthorizer"), &tokenAuthorizerProps{
	handler: authFn,
})

books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
})

Experimental.

func NewTokenAuthorizer

func NewTokenAuthorizer(scope constructs.Construct, id *string, props *TokenAuthorizerProps) TokenAuthorizer

Experimental.

type TokenAuthorizerProps

type TokenAuthorizerProps struct {
	// The handler for the authorizer lambda function.
	//
	// The handler must follow a very specific protocol on the input it receives and the output it needs to produce.
	// API Gateway has documented the handler's input specification
	// {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-input.html | here} and output specification
	// {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html | here}.
	// Experimental.
	Handler awslambda.IFunction `field:"required" json:"handler" yaml:"handler"`
	// An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.
	//
	// The IAM role must be
	// assumable by 'apigateway.amazonaws.com'.
	// Experimental.
	AssumeRole awsiam.IRole `field:"optional" json:"assumeRole" yaml:"assumeRole"`
	// An optional human friendly name for the authorizer.
	//
	// Note that, this is not the primary identifier of the authorizer.
	// Experimental.
	AuthorizerName *string `field:"optional" json:"authorizerName" yaml:"authorizerName"`
	// How long APIGateway should cache the results.
	//
	// Max 1 hour.
	// Disable caching by setting this to 0.
	// Experimental.
	ResultsCacheTtl awscdk.Duration `field:"optional" json:"resultsCacheTtl" yaml:"resultsCacheTtl"`
	// The request header mapping expression for the bearer token.
	//
	// This is typically passed as part of the header, in which case
	// this should be `method.request.header.Authorizer` where Authorizer is the header containing the bearer token.
	// See: https://docs.aws.amazon.com/apigateway/api-reference/link-relation/authorizer-create/#identitySource
	//
	// Experimental.
	IdentitySource *string `field:"optional" json:"identitySource" yaml:"identitySource"`
	// An optional regex to be matched against the authorization token.
	//
	// When matched the authorizer lambda is invoked,
	// otherwise a 401 Unauthorized is returned to the client.
	// Experimental.
	ValidationRegex *string `field:"optional" json:"validationRegex" yaml:"validationRegex"`
}

Properties for TokenAuthorizer.

Example:

var authFn function
var books resource

auth := apigateway.NewTokenAuthorizer(this, jsii.String("booksAuthorizer"), &tokenAuthorizerProps{
	handler: authFn,
})

books.addMethod(jsii.String("GET"), apigateway.NewHttpIntegration(jsii.String("http://amazon.com")), &methodOptions{
	authorizer: auth,
})

Experimental.

type UsagePlan

type UsagePlan interface {
	awscdk.Resource
	IUsagePlan
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Id of the usage plan.
	// Experimental.
	UsagePlanId() *string
	// Adds an ApiKey.
	// Experimental.
	AddApiKey(apiKey IApiKey, options *AddApiKeyOptions)
	// Adds an apiStage.
	// Experimental.
	AddApiStage(apiStage *UsagePlanPerApiStage)
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Example:

var integration lambdaIntegration

api := apigateway.NewRestApi(this, jsii.String("hello-api"))

v1 := api.root.addResource(jsii.String("v1"))
echo := v1.addResource(jsii.String("echo"))
echoMethod := echo.addMethod(jsii.String("GET"), integration, &methodOptions{
	apiKeyRequired: jsii.Boolean(true),
})

plan := api.addUsagePlan(jsii.String("UsagePlan"), &usagePlanProps{
	name: jsii.String("Easy"),
	throttle: &throttleSettings{
		rateLimit: jsii.Number(10),
		burstLimit: jsii.Number(2),
	},
})

key := api.addApiKey(jsii.String("ApiKey"))
plan.addApiKey(key)

Experimental.

func NewUsagePlan

func NewUsagePlan(scope constructs.Construct, id *string, props *UsagePlanProps) UsagePlan

Experimental.

type UsagePlanPerApiStage

type UsagePlanPerApiStage struct {
	// Experimental.
	Api IRestApi `field:"optional" json:"api" yaml:"api"`
	// [disable-awslint:ref-via-interface].
	// Experimental.
	Stage Stage `field:"optional" json:"stage" yaml:"stage"`
	// Experimental.
	Throttle *[]*ThrottlingPerMethod `field:"optional" json:"throttle" yaml:"throttle"`
}

Represents the API stages that a usage plan applies to.

Example:

var plan usagePlan
var api restApi
var echoMethod method

plan.addApiStage(&usagePlanPerApiStage{
	stage: api.deploymentStage,
	throttle: []throttlingPerMethod{
		&throttlingPerMethod{
			method: echoMethod,
			throttle: &throttleSettings{
				rateLimit: jsii.Number(10),
				burstLimit: jsii.Number(2),
			},
		},
	},
})

Experimental.

type UsagePlanProps

type UsagePlanProps struct {
	// ApiKey to be associated with the usage plan.
	// Deprecated: use `addApiKey()`.
	ApiKey IApiKey `field:"optional" json:"apiKey" yaml:"apiKey"`
	// API Stages to be associated with the usage plan.
	// Experimental.
	ApiStages *[]*UsagePlanPerApiStage `field:"optional" json:"apiStages" yaml:"apiStages"`
	// Represents usage plan purpose.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Name for this usage plan.
	// Experimental.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// Number of requests clients can make in a given time period.
	// Experimental.
	Quota *QuotaSettings `field:"optional" json:"quota" yaml:"quota"`
	// Overall throttle settings for the API.
	// Experimental.
	Throttle *ThrottleSettings `field:"optional" json:"throttle" yaml:"throttle"`
}

Example:

var integration lambdaIntegration

api := apigateway.NewRestApi(this, jsii.String("hello-api"))

v1 := api.root.addResource(jsii.String("v1"))
echo := v1.addResource(jsii.String("echo"))
echoMethod := echo.addMethod(jsii.String("GET"), integration, &methodOptions{
	apiKeyRequired: jsii.Boolean(true),
})

plan := api.addUsagePlan(jsii.String("UsagePlan"), &usagePlanProps{
	name: jsii.String("Easy"),
	throttle: &throttleSettings{
		rateLimit: jsii.Number(10),
		burstLimit: jsii.Number(2),
	},
})

key := api.addApiKey(jsii.String("ApiKey"))
plan.addApiKey(key)

Experimental.

type VpcLink interface {
	awscdk.Resource
	IVpcLink
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Physical ID of the VpcLink resource.
	// Experimental.
	VpcLinkId() *string
	// Experimental.
	AddTargets(targets ...awselasticloadbalancingv2.INetworkLoadBalancer)
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	// Experimental.
	Validate() *[]*string
}

Define a new VPC Link Specifies an API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC).

Example:

import elbv2 "github.com/aws/aws-cdk-go/awscdk"

vpc := ec2.NewVpc(this, jsii.String("VPC"))
nlb := elbv2.NewNetworkLoadBalancer(this, jsii.String("NLB"), &networkLoadBalancerProps{
	vpc: vpc,
})
link := apigateway.NewVpcLink(this, jsii.String("link"), &vpcLinkProps{
	targets: []iNetworkLoadBalancer{
		nlb,
	},
})

integration := apigateway.NewIntegration(&integrationProps{
	type: apigateway.integrationType_HTTP_PROXY,
	options: &integrationOptions{
		connectionType: apigateway.connectionType_VPC_LINK,
		vpcLink: link,
	},
})

Experimental.

func NewVpcLink(scope constructs.Construct, id *string, props *VpcLinkProps) VpcLink

Experimental.

type VpcLinkProps

type VpcLinkProps struct {
	// The description of the VPC link.
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The network load balancers of the VPC targeted by the VPC link.
	//
	// The network load balancers must be owned by the same AWS account of the API owner.
	// Experimental.
	Targets *[]awselasticloadbalancingv2.INetworkLoadBalancer `field:"optional" json:"targets" yaml:"targets"`
	// The name used to label and identify the VPC link.
	// Experimental.
	VpcLinkName *string `field:"optional" json:"vpcLinkName" yaml:"vpcLinkName"`
}

Properties for a VpcLink.

Example:

import elbv2 "github.com/aws/aws-cdk-go/awscdk"

vpc := ec2.NewVpc(this, jsii.String("VPC"))
nlb := elbv2.NewNetworkLoadBalancer(this, jsii.String("NLB"), &networkLoadBalancerProps{
	vpc: vpc,
})
link := apigateway.NewVpcLink(this, jsii.String("link"), &vpcLinkProps{
	targets: []iNetworkLoadBalancer{
		nlb,
	},
})

integration := apigateway.NewIntegration(&integrationProps{
	type: apigateway.integrationType_HTTP_PROXY,
	options: &integrationOptions{
		connectionType: apigateway.connectionType_VPC_LINK,
		vpcLink: link,
	},
})

Experimental.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL