awscdkapigatewayv2alpha

package module
v2.114.1-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 9

README

AWS::APIGatewayv2 Construct Library

---

Deprecated

This API may emit warnings. Backward compatibility is not guaranteed.


All constructs moved to aws-cdk-lib/aws-apigatewayv2.

Table of Contents

Introduction

Amazon API Gateway is an AWS service for creating, publishing, maintaining, monitoring, and securing REST, HTTP, and WebSocket APIs at any scale. API developers can create APIs that access AWS or other web services, as well as data stored in the AWS Cloud. As an API Gateway API developer, you can create APIs for use in your own client applications. Read the Amazon API Gateway Developer Guide.

This module supports features under API Gateway v2 that lets users set up Websocket and HTTP APIs. REST APIs can be created using the aws-cdk-lib/aws-apigateway module.

HTTP and Websocket APIs use the same CloudFormation resources under the hood. However, this module separates them into two separate constructs for a more efficient abstraction since there are a number of CloudFormation properties that specifically apply only to each type of API.

HTTP API

HTTP APIs enable creation of RESTful APIs that integrate with AWS Lambda functions, known as Lambda proxy integration, or to any routable HTTP endpoint, known as HTTP proxy integration.

Defining HTTP APIs

HTTP APIs have two fundamental concepts - Routes and Integrations.

Routes direct incoming API requests to backend resources. Routes consist of two parts: an HTTP method and a resource path, such as, GET /books. Learn more at Working with routes. Use the ANY method to match any methods for a route that are not explicitly defined.

Integrations define how the HTTP API responds when a client reaches a specific Route. HTTP APIs support Lambda proxy integration, HTTP proxy integration and, AWS service integrations, also known as private integrations. Learn more at Configuring integrations.

Integrations are available at the aws-apigatewayv2-integrations module and more information is available in that module. As an early example, we have a website for a bookstore where the following code snippet configures a route GET /books with an HTTP proxy integration. All other HTTP method calls to /books route to a default lambda proxy for the bookstore.

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var bookStoreDefaultFn function


getBooksIntegration := awscdkapigatewayv2integrationsalpha.NewHttpUrlIntegration(jsii.String("GetBooksIntegration"), jsii.String("https://get-books-proxy.example.com"))
bookStoreDefaultIntegration := awscdkapigatewayv2integrationsalpha.NewHttpLambdaIntegration(jsii.String("BooksIntegration"), bookStoreDefaultFn)

httpApi := apigwv2.NewHttpApi(this, jsii.String("HttpApi"))

httpApi.AddRoutes(&AddRoutesOptions{
	Path: jsii.String("/books"),
	Methods: []httpMethod{
		apigwv2.*httpMethod_GET,
	},
	Integration: getBooksIntegration,
})
httpApi.AddRoutes(&AddRoutesOptions{
	Path: jsii.String("/books"),
	Methods: []*httpMethod{
		apigwv2.*httpMethod_ANY,
	},
	Integration: bookStoreDefaultIntegration,
})

The URL to the endpoint can be retrieved via the apiEndpoint attribute. By default this URL is enabled for clients. Use disableExecuteApiEndpoint to disable it.

httpApi := apigwv2.NewHttpApi(this, jsii.String("HttpApi"), &HttpApiProps{
	DisableExecuteApiEndpoint: jsii.Boolean(true),
})

The defaultIntegration option while defining HTTP APIs lets you create a default catch-all integration that is matched when a client reaches a route that is not explicitly defined.

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"


apigwv2.NewHttpApi(this, jsii.String("HttpProxyApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpUrlIntegration(jsii.String("DefaultIntegration"), jsii.String("https://example.com")),
})
Cross Origin Resource Sharing (CORS)

Cross-origin resource sharing (CORS) is a browser security feature that restricts HTTP requests that are initiated from scripts running in the browser. Enabling CORS will allow requests to your API from a web application hosted in a domain different from your API domain.

When configured CORS for an HTTP API, API Gateway automatically sends a response to preflight OPTIONS requests, even if there isn't an OPTIONS route configured. Note that, when this option is used, API Gateway will ignore CORS headers returned from your backend integration. Learn more about Configuring CORS for an HTTP API.

The corsPreflight option lets you specify a CORS configuration for an API.

apigwv2.NewHttpApi(this, jsii.String("HttpProxyApi"), &HttpApiProps{
	CorsPreflight: &CorsPreflightOptions{
		AllowHeaders: []*string{
			jsii.String("Authorization"),
		},
		AllowMethods: []corsHttpMethod{
			apigwv2.*corsHttpMethod_GET,
			apigwv2.*corsHttpMethod_HEAD,
			apigwv2.*corsHttpMethod_OPTIONS,
			apigwv2.*corsHttpMethod_POST,
		},
		AllowOrigins: []*string{
			jsii.String("*"),
		},
		MaxAge: awscdk.Duration_Days(jsii.Number(10)),
	},
})
Publishing HTTP APIs

A Stage is a logical reference to a lifecycle state of your API (for example, dev, prod, beta, or v2). API stages are identified by their stage name. Each stage is a named reference to a deployment of the API made available for client applications to call.

Use HttpStage to create a Stage resource for HTTP APIs. The following code sets up a Stage, whose URL is available at https://{api_id}.execute-api.{region}.amazonaws.com/beta.

var api httpApi


apigwv2.NewHttpStage(this, jsii.String("Stage"), &HttpStageProps{
	HttpApi: api,
	StageName: jsii.String("beta"),
})

If you omit the stageName will create a $default stage. A $default stage is one that is served from the base of the API's URL - https://{api_id}.execute-api.{region}.amazonaws.com/.

Note that, HttpApi will always creates a $default stage, unless the createDefaultStage property is unset.

Custom Domain

Custom domain names are simpler and more intuitive URLs that you can provide to your API users. Custom domain name are associated to API stages.

The code snippet below creates a custom domain and configures a default domain mapping for your API that maps the custom domain to the $default stage of the API.

import acm "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var handler function


certArn := "arn:aws:acm:us-east-1:111111111111:certificate"
domainName := "example.com"

dn := apigwv2.NewDomainName(this, jsii.String("DN"), &DomainNameProps{
	DomainName: domainName,
	Certificate: acm.Certificate_FromCertificateArn(this, jsii.String("cert"), certArn),
})
api := apigwv2.NewHttpApi(this, jsii.String("HttpProxyProdApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpLambdaIntegration(jsii.String("DefaultIntegration"), handler),
	// https://${dn.domainName}/foo goes to prodApi $default stage
	DefaultDomainMapping: &DomainMappingOptions{
		DomainName: dn,
		MappingKey: jsii.String("foo"),
	},
})

To migrate a domain endpoint from one type to another, you can add a new endpoint configuration via addEndpoint() and then configure DNS records to route traffic to the new endpoint. After that, you can remove the previous endpoint configuration. Learn more at Migrating a custom domain name

To associate a specific Stage to a custom domain mapping -

var api httpApi
var dn domainName


api.AddStage(jsii.String("beta"), &HttpStageOptions{
	StageName: jsii.String("beta"),
	AutoDeploy: jsii.Boolean(true),
	// https://${dn.domainName}/bar goes to the beta stage
	DomainMapping: &DomainMappingOptions{
		DomainName: dn,
		MappingKey: jsii.String("bar"),
	},
})

The same domain name can be associated with stages across different HttpApi as so -

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var handler function
var dn domainName


apiDemo := apigwv2.NewHttpApi(this, jsii.String("DemoApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpLambdaIntegration(jsii.String("DefaultIntegration"), handler),
	// https://${dn.domainName}/demo goes to apiDemo $default stage
	DefaultDomainMapping: &DomainMappingOptions{
		DomainName: dn,
		MappingKey: jsii.String("demo"),
	},
})

The mappingKey determines the base path of the URL with the custom domain. Each custom domain is only allowed to have one API mapping with undefined mappingKey. If more than one API mappings are specified, mappingKey will be required for all of them. In the sample above, the custom domain is associated with 3 API mapping resources across different APIs and Stages.

API Stage URL
api $default https://${domainName}/foo
api beta https://${domainName}/bar
apiDemo $default https://${domainName}/demo

You can retrieve the full domain URL with mapping key using the domainUrl property as so -

var apiDemo httpApi

demoDomainUrl := apiDemo.DefaultStage.DomainUrl
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.

import s3 "github.com/aws/aws-cdk-go/awscdk"
import acm "github.com/aws/aws-cdk-go/awscdk"
var bucket bucket


certArn := "arn:aws:acm:us-east-1:111111111111:certificate"
domainName := "example.com"

apigwv2.NewDomainName(this, jsii.String("DomainName"), &DomainNameProps{
	DomainName: jsii.String(DomainName),
	Certificate: acm.Certificate_FromCertificateArn(this, jsii.String("cert"), certArn),
	Mtls: &MTLSConfig{
		Bucket: *Bucket,
		Key: jsii.String("someca.pem"),
		Version: jsii.String("version"),
	},
})

Instructions for configuring your trust store can be found here

Managing access to HTTP APIs

API Gateway supports multiple mechanisms for controlling and managing access to your HTTP API through authorizers.

These authorizers can be found in the APIGatewayV2-Authorizers constructs library.

Metrics

The API Gateway v2 service sends metrics around the performance of HTTP APIs to Amazon CloudWatch. These metrics can be referred to using the metric APIs available on the HttpApi 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 := apigwv2.NewHttpApi(this, jsii.String("my-api"))
clientErrorMetric := api.metricClientError()

Please note that this will return a metric for all the stages defined in the api. It is also possible to refer to metrics for a specific Stage using the metric methods from the Stage construct.

api := apigwv2.NewHttpApi(this, jsii.String("my-api"))
stage := apigwv2.NewHttpStage(this, jsii.String("Stage"), &HttpStageProps{
	HttpApi: api,
})
clientErrorMetric := stage.metricClientError()

Private integrations let HTTP APIs connect with AWS resources that are placed behind a VPC. These are usually Application Load Balancers, Network Load Balancers or a Cloud Map service. The VpcLink construct enables this integration. The following code creates a VpcLink to a private VPC.

import ec2 "github.com/aws/aws-cdk-go/awscdk"
import elb "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"


vpc := ec2.NewVpc(this, jsii.String("VPC"))
alb := elb.NewApplicationLoadBalancer(this, jsii.String("AppLoadBalancer"), &ApplicationLoadBalancerProps{
	Vpc: Vpc,
})

vpcLink := apigwv2.NewVpcLink(this, jsii.String("VpcLink"), &VpcLinkProps{
	Vpc: Vpc,
})

// Creating an HTTP ALB Integration:
albIntegration := awscdkapigatewayv2integrationsalpha.NewHttpAlbIntegration(jsii.String("ALBIntegration"), alb.Listeners[jsii.Number(0)], &HttpAlbIntegrationProps{
})

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

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

var vpc vpc

awesomeLink := apigwv2.VpcLink_FromVpcLinkAttributes(this, jsii.String("awesome-vpc-link"), &VpcLinkAttributes{
	VpcLinkId: jsii.String("us-east-1_oiuR12Abd"),
	Vpc: Vpc,
})
Private Integration

Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by clients outside of the VPC.

These integrations can be found in the aws-apigatewayv2-integrations constructs library.

WebSocket API

A WebSocket API in API Gateway is a collection of WebSocket routes that are integrated with backend HTTP endpoints, Lambda functions, or other AWS services. You can use API Gateway features to help you with all aspects of the API lifecycle, from creation through monitoring your production APIs. Read more

WebSocket APIs have two fundamental concepts - Routes and Integrations.

WebSocket APIs direct JSON messages to backend integrations based on configured routes. (Non-JSON messages are directed to the configured $default route.)

Integrations define how the WebSocket API behaves when a client reaches a specific Route. Learn more at Configuring integrations.

Integrations are available in the aws-apigatewayv2-integrations module and more information is available in that module.

To add the default WebSocket routes supported by API Gateway ($connect, $disconnect and $default), configure them as part of api props:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var connectHandler function
var disconnectHandler function
var defaultHandler function


webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"), &WebSocketApiProps{
	ConnectRouteOptions: &WebSocketRouteOptions{
		Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("ConnectIntegration"), connectHandler),
	},
	DisconnectRouteOptions: &WebSocketRouteOptions{
		Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("DisconnectIntegration"), disconnectHandler),
	},
	DefaultRouteOptions: &WebSocketRouteOptions{
		Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("DefaultIntegration"), defaultHandler),
	},
})

apigwv2.NewWebSocketStage(this, jsii.String("mystage"), &WebSocketStageProps{
	WebSocketApi: WebSocketApi,
	StageName: jsii.String("dev"),
	AutoDeploy: jsii.Boolean(true),
})

To retrieve a websocket URL and a callback URL:

var webSocketStage webSocketStage


webSocketURL := webSocketStage.url
// wss://${this.api.apiId}.execute-api.${s.region}.${s.urlSuffix}/${urlPath}
callbackURL := webSocketStage.callbackUrl

To add any other route:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var messageHandler function

webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"))
webSocketApi.AddRoute(jsii.String("sendmessage"), &WebSocketRouteOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("SendMessageIntegration"), messageHandler),
})

To add a route that can return a result:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var messageHandler function

webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"))
webSocketApi.AddRoute(jsii.String("sendmessage"), &WebSocketRouteOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("SendMessageIntegration"), messageHandler),
	ReturnResponse: jsii.Boolean(true),
})

To import an existing WebSocketApi:

webSocketApi := apigwv2.WebSocketApi_FromWebSocketApiAttributes(this, jsii.String("mywsapi"), &WebSocketApiAttributes{
	WebSocketId: jsii.String("api-1234"),
})
Manage Connections Permission

Grant permission to use API Gateway Management API of a WebSocket API by calling the grantManageConnections API. You can use Management API to send a callback message to a connected client, get connection information, or disconnect the client. Learn more at Use @connections commands in your backend service.

var fn function


webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"))
stage := apigwv2.NewWebSocketStage(this, jsii.String("mystage"), &WebSocketStageProps{
	WebSocketApi: WebSocketApi,
	StageName: jsii.String("dev"),
})
// per stage permission
stage.GrantManagementApiAccess(fn)
// for all the stages permission
webSocketApi.GrantManageConnections(fn)
Managing access to WebSocket APIs

API Gateway supports multiple mechanisms for controlling and managing access to a WebSocket API through authorizers.

These authorizers can be found in the APIGatewayV2-Authorizers constructs library.

API Keys

Websocket APIs also support usage of API Keys. An API Key is a key that is used to grant access to an API. These are useful for controlling and tracking access to an API, when used together with usage plans. These together allow you to configure controls around API access such as quotas and throttling, along with per-API Key metrics on usage.

To require an API Key when accessing the Websocket API:

webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"), &WebSocketApiProps{
	ApiKeySelectionExpression: apigwv2.WebSocketApiKeySelectionExpression_HEADER_X_API_KEY(),
})

Documentation

Overview

This module is deprecated. All constructs are now available under aws-cdk-lib/aws-apigatewayv2

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiMapping_IsConstruct

func ApiMapping_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func ApiMapping_IsOwnedResource

func ApiMapping_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func ApiMapping_IsResource

func ApiMapping_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func DomainName_IsConstruct

func DomainName_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func DomainName_IsOwnedResource

func DomainName_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func DomainName_IsResource

func DomainName_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func HttpApi_IsConstruct

func HttpApi_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func HttpApi_IsOwnedResource

func HttpApi_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func HttpApi_IsResource

func HttpApi_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func HttpAuthorizer_IsConstruct

func HttpAuthorizer_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func HttpAuthorizer_IsOwnedResource

func HttpAuthorizer_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func HttpAuthorizer_IsResource

func HttpAuthorizer_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func HttpIntegration_IsConstruct

func HttpIntegration_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func HttpIntegration_IsOwnedResource

func HttpIntegration_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func HttpIntegration_IsResource

func HttpIntegration_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func HttpRoute_IsConstruct

func HttpRoute_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func HttpRoute_IsOwnedResource

func HttpRoute_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func HttpRoute_IsResource

func HttpRoute_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func HttpStage_IsConstruct

func HttpStage_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func HttpStage_IsOwnedResource

func HttpStage_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func HttpStage_IsResource

func HttpStage_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func NewApiMapping_Override

func NewApiMapping_Override(a ApiMapping, scope constructs.Construct, id *string, props *ApiMappingProps)

Deprecated.

func NewDomainName_Override

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

Deprecated.

func NewHttpApi_Override

func NewHttpApi_Override(h HttpApi, scope constructs.Construct, id *string, props *HttpApiProps)

Deprecated.

func NewHttpAuthorizer_Override

func NewHttpAuthorizer_Override(h HttpAuthorizer, scope constructs.Construct, id *string, props *HttpAuthorizerProps)

Deprecated.

func NewHttpIntegration_Override

func NewHttpIntegration_Override(h HttpIntegration, scope constructs.Construct, id *string, props *HttpIntegrationProps)

Deprecated.

func NewHttpNoneAuthorizer_Override

func NewHttpNoneAuthorizer_Override(h HttpNoneAuthorizer)

Deprecated.

func NewHttpRouteIntegration_Override

func NewHttpRouteIntegration_Override(h HttpRouteIntegration, id *string)

Initialize an integration for a route on http api. Deprecated.

func NewHttpRoute_Override

func NewHttpRoute_Override(h HttpRoute, scope constructs.Construct, id *string, props *HttpRouteProps)

Deprecated.

func NewHttpStage_Override

func NewHttpStage_Override(h HttpStage, scope constructs.Construct, id *string, props *HttpStageProps)

Deprecated.

func NewIntegrationCredentials_Override

func NewIntegrationCredentials_Override(i IntegrationCredentials)

Deprecated.

func NewMappingValue_Override

func NewMappingValue_Override(m MappingValue, value *string)

Deprecated.

func NewParameterMapping_Override

func NewParameterMapping_Override(p ParameterMapping)

Deprecated.

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

Deprecated.

func NewWebSocketApiKeySelectionExpression_Override

func NewWebSocketApiKeySelectionExpression_Override(w WebSocketApiKeySelectionExpression, customApiKeySelector *string)

Deprecated.

func NewWebSocketApi_Override

func NewWebSocketApi_Override(w WebSocketApi, scope constructs.Construct, id *string, props *WebSocketApiProps)

Deprecated.

func NewWebSocketAuthorizer_Override

func NewWebSocketAuthorizer_Override(w WebSocketAuthorizer, scope constructs.Construct, id *string, props *WebSocketAuthorizerProps)

Deprecated.

func NewWebSocketIntegration_Override

func NewWebSocketIntegration_Override(w WebSocketIntegration, scope constructs.Construct, id *string, props *WebSocketIntegrationProps)

Deprecated.

func NewWebSocketNoneAuthorizer_Override

func NewWebSocketNoneAuthorizer_Override(w WebSocketNoneAuthorizer)

Deprecated.

func NewWebSocketRouteIntegration_Override

func NewWebSocketRouteIntegration_Override(w WebSocketRouteIntegration, id *string)

Initialize an integration for a route on websocket api. Deprecated.

func NewWebSocketRoute_Override

func NewWebSocketRoute_Override(w WebSocketRoute, scope constructs.Construct, id *string, props *WebSocketRouteProps)

Deprecated.

func NewWebSocketStage_Override

func NewWebSocketStage_Override(w WebSocketStage, scope constructs.Construct, id *string, props *WebSocketStageProps)

Deprecated.

func VpcLink_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func VpcLink_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func VpcLink_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func WebSocketApi_IsConstruct

func WebSocketApi_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func WebSocketApi_IsOwnedResource

func WebSocketApi_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func WebSocketApi_IsResource

func WebSocketApi_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func WebSocketAuthorizer_IsConstruct

func WebSocketAuthorizer_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func WebSocketAuthorizer_IsOwnedResource

func WebSocketAuthorizer_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func WebSocketAuthorizer_IsResource

func WebSocketAuthorizer_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func WebSocketIntegration_IsConstruct

func WebSocketIntegration_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func WebSocketIntegration_IsOwnedResource

func WebSocketIntegration_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func WebSocketIntegration_IsResource

func WebSocketIntegration_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func WebSocketRoute_IsConstruct

func WebSocketRoute_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func WebSocketRoute_IsOwnedResource

func WebSocketRoute_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func WebSocketRoute_IsResource

func WebSocketRoute_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

func WebSocketStage_IsConstruct

func WebSocketStage_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated.

func WebSocketStage_IsOwnedResource

func WebSocketStage_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Deprecated.

func WebSocketStage_IsResource

func WebSocketStage_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Deprecated.

Types

type AddRoutesOptions

type AddRoutesOptions struct {
	// The integration to be configured on this route.
	// Deprecated.
	Integration HttpRouteIntegration `field:"required" json:"integration" yaml:"integration"`
	// The path at which all of these routes are configured.
	// Deprecated.
	Path *string `field:"required" json:"path" yaml:"path"`
	// The list of OIDC scopes to include in the authorization.
	//
	// These scopes will override the default authorization scopes on the gateway.
	// Set to [] to remove default scopes.
	// Default: - uses defaultAuthorizationScopes if configured on the API, otherwise none.
	//
	// Deprecated.
	AuthorizationScopes *[]*string `field:"optional" json:"authorizationScopes" yaml:"authorizationScopes"`
	// Authorizer to be associated to these routes.
	//
	// Use NoneAuthorizer to remove the default authorizer for the api.
	// Default: - uses the default authorizer if one is specified on the HttpApi.
	//
	// Deprecated.
	Authorizer IHttpRouteAuthorizer `field:"optional" json:"authorizer" yaml:"authorizer"`
	// The HTTP methods to be configured.
	// Default: HttpMethod.ANY
	//
	// Deprecated.
	Methods *[]HttpMethod `field:"optional" json:"methods" yaml:"methods"`
}

Options for the Route with Integration resource.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2authorizersalpha"
import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

// This function handles your auth logic
var authHandler function

authorizer := awscdkapigatewayv2authorizersalpha.NewHttpLambdaAuthorizer(jsii.String("BooksAuthorizer"), authHandler, &HttpLambdaAuthorizerProps{
	ResponseTypes: []httpLambdaResponseType{
		awscdkapigatewayv2authorizersalpha.HttpLambdaResponseType_SIMPLE,
	},
})

api := apigwv2.NewHttpApi(this, jsii.String("HttpApi"))

api.AddRoutes(&AddRoutesOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewHttpUrlIntegration(jsii.String("BooksIntegration"), jsii.String("https://get-books-proxy.example.com")),
	Path: jsii.String("/books"),
	Authorizer: Authorizer,
})

Deprecated.

type ApiMapping

type ApiMapping interface {
	awscdk.Resource
	IApiMapping
	// ID of the API Mapping.
	// Deprecated.
	ApiMappingId() *string
	// API domain name.
	// Deprecated.
	DomainName() IDomainName
	// 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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// API Mapping key.
	// Deprecated.
	MappingKey() *string
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

Create a new API mapping for API Gateway API endpoint.

Example:

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

var api iApi
var domainName domainName
var stage iStage

apiMapping := apigatewayv2_alpha.NewApiMapping(this, jsii.String("MyApiMapping"), &ApiMappingProps{
	Api: api,
	DomainName: domainName,

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

Deprecated.

func NewApiMapping

func NewApiMapping(scope constructs.Construct, id *string, props *ApiMappingProps) ApiMapping

Deprecated.

type ApiMappingAttributes

type ApiMappingAttributes struct {
	// The API mapping ID.
	// Deprecated.
	ApiMappingId *string `field:"required" json:"apiMappingId" yaml:"apiMappingId"`
}

The attributes used to import existing ApiMapping.

Example:

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

apiMappingAttributes := &ApiMappingAttributes{
	ApiMappingId: jsii.String("apiMappingId"),
}

Deprecated.

type ApiMappingProps

type ApiMappingProps struct {
	// The Api to which this mapping is applied.
	// Deprecated.
	Api IApi `field:"required" json:"api" yaml:"api"`
	// custom domain name of the mapping target.
	// Deprecated.
	DomainName IDomainName `field:"required" json:"domainName" yaml:"domainName"`
	// Api mapping key.
	//
	// The path where this stage should be mapped to on the domain.
	// Default: - undefined for the root path mapping.
	//
	// Deprecated.
	ApiMappingKey *string `field:"optional" json:"apiMappingKey" yaml:"apiMappingKey"`
	// stage for the ApiMapping resource required for WebSocket API defaults to default stage of an HTTP API.
	// Default: - Default stage of the passed API for HTTP API, required for WebSocket API.
	//
	// Deprecated.
	Stage IStage `field:"optional" json:"stage" yaml:"stage"`
}

Properties used to create the ApiMapping resource.

Example:

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

var api iApi
var domainName domainName
var stage iStage

apiMappingProps := &ApiMappingProps{
	Api: api,
	DomainName: domainName,

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

Deprecated.

type AuthorizerPayloadVersion

type AuthorizerPayloadVersion string

Payload format version for lambda authorizers. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html

Deprecated.

const (
	// Version 1.0.
	// Deprecated.
	AuthorizerPayloadVersion_VERSION_1_0 AuthorizerPayloadVersion = "VERSION_1_0"
	// Version 2.0.
	// Deprecated.
	AuthorizerPayloadVersion_VERSION_2_0 AuthorizerPayloadVersion = "VERSION_2_0"
)

type BatchHttpRouteOptions

type BatchHttpRouteOptions struct {
	// The integration to be configured on this route.
	// Deprecated.
	Integration HttpRouteIntegration `field:"required" json:"integration" yaml:"integration"`
}

Options used when configuring multiple routes, at once.

The options here are the ones that would be configured for all being set up.

Example:

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

var httpRouteIntegration httpRouteIntegration

batchHttpRouteOptions := &BatchHttpRouteOptions{
	Integration: httpRouteIntegration,
}

Deprecated.

type CorsHttpMethod

type CorsHttpMethod string

Supported CORS HTTP methods.

Example:

apigwv2.NewHttpApi(this, jsii.String("HttpProxyApi"), &HttpApiProps{
	CorsPreflight: &CorsPreflightOptions{
		AllowHeaders: []*string{
			jsii.String("Authorization"),
		},
		AllowMethods: []corsHttpMethod{
			apigwv2.*corsHttpMethod_GET,
			apigwv2.*corsHttpMethod_HEAD,
			apigwv2.*corsHttpMethod_OPTIONS,
			apigwv2.*corsHttpMethod_POST,
		},
		AllowOrigins: []*string{
			jsii.String("*"),
		},
		MaxAge: awscdk.Duration_Days(jsii.Number(10)),
	},
})

Deprecated.

const (
	// HTTP ANY.
	// Deprecated.
	CorsHttpMethod_ANY CorsHttpMethod = "ANY"
	// HTTP DELETE.
	// Deprecated.
	CorsHttpMethod_DELETE CorsHttpMethod = "DELETE"
	// HTTP GET.
	// Deprecated.
	CorsHttpMethod_GET CorsHttpMethod = "GET"
	// HTTP HEAD.
	// Deprecated.
	CorsHttpMethod_HEAD CorsHttpMethod = "HEAD"
	// HTTP OPTIONS.
	// Deprecated.
	CorsHttpMethod_OPTIONS CorsHttpMethod = "OPTIONS"
	// HTTP PATCH.
	// Deprecated.
	CorsHttpMethod_PATCH CorsHttpMethod = "PATCH"
	// HTTP POST.
	// Deprecated.
	CorsHttpMethod_POST CorsHttpMethod = "POST"
	// HTTP PUT.
	// Deprecated.
	CorsHttpMethod_PUT CorsHttpMethod = "PUT"
)

type CorsPreflightOptions

type CorsPreflightOptions struct {
	// Specifies whether credentials are included in the CORS request.
	// Default: false.
	//
	// Deprecated.
	AllowCredentials *bool `field:"optional" json:"allowCredentials" yaml:"allowCredentials"`
	// Represents a collection of allowed headers.
	// Default: - No Headers are allowed.
	//
	// Deprecated.
	AllowHeaders *[]*string `field:"optional" json:"allowHeaders" yaml:"allowHeaders"`
	// Represents a collection of allowed HTTP methods.
	// Default: - No Methods are allowed.
	//
	// Deprecated.
	AllowMethods *[]CorsHttpMethod `field:"optional" json:"allowMethods" yaml:"allowMethods"`
	// Represents a collection of allowed origins.
	// Default: - No Origins are allowed.
	//
	// Deprecated.
	AllowOrigins *[]*string `field:"optional" json:"allowOrigins" yaml:"allowOrigins"`
	// Represents a collection of exposed headers.
	// Default: - No Expose Headers are allowed.
	//
	// Deprecated.
	ExposeHeaders *[]*string `field:"optional" json:"exposeHeaders" yaml:"exposeHeaders"`
	// The duration that the browser should cache preflight request results.
	// Default: Duration.seconds(0)
	//
	// Deprecated.
	MaxAge awscdk.Duration `field:"optional" json:"maxAge" yaml:"maxAge"`
}

Options for the CORS Configuration.

Example:

apigwv2.NewHttpApi(this, jsii.String("HttpProxyApi"), &HttpApiProps{
	CorsPreflight: &CorsPreflightOptions{
		AllowHeaders: []*string{
			jsii.String("Authorization"),
		},
		AllowMethods: []corsHttpMethod{
			apigwv2.*corsHttpMethod_GET,
			apigwv2.*corsHttpMethod_HEAD,
			apigwv2.*corsHttpMethod_OPTIONS,
			apigwv2.*corsHttpMethod_POST,
		},
		AllowOrigins: []*string{
			jsii.String("*"),
		},
		MaxAge: awscdk.Duration_Days(jsii.Number(10)),
	},
})

Deprecated.

type DomainMappingOptions

type DomainMappingOptions struct {
	// The domain name for the mapping.
	// Deprecated.
	DomainName IDomainName `field:"required" json:"domainName" yaml:"domainName"`
	// The API mapping key.
	//
	// Leave it undefined for the root path mapping.
	// Default: - empty key for the root path mapping.
	//
	// Deprecated.
	MappingKey *string `field:"optional" json:"mappingKey" yaml:"mappingKey"`
}

Options for DomainMapping.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var handler function
var dn domainName

apiDemo := apigwv2.NewHttpApi(this, jsii.String("DemoApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpLambdaIntegration(jsii.String("DefaultIntegration"), handler),
	// https://${dn.domainName}/demo goes to apiDemo $default stage
	DefaultDomainMapping: &DomainMappingOptions{
		DomainName: dn,
		MappingKey: jsii.String("demo"),
	},
})

Deprecated.

type DomainName

type DomainName interface {
	awscdk.Resource
	IDomainName
	// 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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The custom domain name.
	// Deprecated.
	Name() *string
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The domain name associated with the regional endpoint for this custom domain name.
	// Deprecated.
	RegionalDomainName() *string
	// The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
	// Deprecated.
	RegionalHostedZoneId() *string
	// The stack in which this resource is defined.
	// Deprecated.
	Stack() awscdk.Stack
	// Adds an endpoint to a domain name.
	// Deprecated.
	AddEndpoint(options *EndpointOptions)
	// 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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

Custom domain resource for the API.

Example:

import acm "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var handler function

certArn := "arn:aws:acm:us-east-1:111111111111:certificate"
domainName := "example.com"

dn := apigwv2.NewDomainName(this, jsii.String("DN"), &DomainNameProps{
	DomainName: domainName,
	Certificate: acm.Certificate_FromCertificateArn(this, jsii.String("cert"), certArn),
})
api := apigwv2.NewHttpApi(this, jsii.String("HttpProxyProdApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpLambdaIntegration(jsii.String("DefaultIntegration"), handler),
	// https://${dn.domainName}/foo goes to prodApi $default stage
	DefaultDomainMapping: &DomainMappingOptions{
		DomainName: dn,
		MappingKey: jsii.String("foo"),
	},
})

Deprecated.

func NewDomainName

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

Deprecated.

type DomainNameAttributes

type DomainNameAttributes struct {
	// domain name string.
	// Deprecated.
	Name *string `field:"required" json:"name" yaml:"name"`
	// The domain name associated with the regional endpoint for this custom domain name.
	// Deprecated.
	RegionalDomainName *string `field:"required" json:"regionalDomainName" yaml:"regionalDomainName"`
	// The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
	// Deprecated.
	RegionalHostedZoneId *string `field:"required" json:"regionalHostedZoneId" yaml:"regionalHostedZoneId"`
}

custom domain name attributes.

Example:

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

domainNameAttributes := &DomainNameAttributes{
	Name: jsii.String("name"),
	RegionalDomainName: jsii.String("regionalDomainName"),
	RegionalHostedZoneId: jsii.String("regionalHostedZoneId"),
}

Deprecated.

type DomainNameProps

type DomainNameProps struct {
	// The ACM certificate for this domain name.
	//
	// Certificate can be both ACM issued or imported.
	// Deprecated.
	Certificate awscertificatemanager.ICertificate `field:"required" json:"certificate" yaml:"certificate"`
	// The user-friendly name of the certificate that will be used by the endpoint for this domain name.
	// Default: - No friendly certificate name.
	//
	// Deprecated.
	CertificateName *string `field:"optional" json:"certificateName" yaml:"certificateName"`
	// The type of endpoint for this DomainName.
	// Default: EndpointType.REGIONAL
	//
	// Deprecated.
	EndpointType EndpointType `field:"optional" json:"endpointType" yaml:"endpointType"`
	// A public certificate issued by ACM to validate that you own a custom domain.
	//
	// This parameter is required
	// only when you configure mutual TLS authentication and you specify an ACM imported or private CA certificate
	// for `certificate`. The ownership certificate validates that you have permissions to use the domain name.
	// Default: - only required when configuring mTLS.
	//
	// Deprecated.
	OwnershipCertificate awscertificatemanager.ICertificate `field:"optional" json:"ownershipCertificate" yaml:"ownershipCertificate"`
	// The Transport Layer Security (TLS) version + cipher suite for this domain name.
	// Default: SecurityPolicy.TLS_1_2
	//
	// Deprecated.
	SecurityPolicy SecurityPolicy `field:"optional" json:"securityPolicy" yaml:"securityPolicy"`
	// The custom domain name.
	// Deprecated.
	DomainName *string `field:"required" json:"domainName" yaml:"domainName"`
	// The mutual TLS authentication configuration for a custom domain name.
	// Default: - mTLS is not configured.
	//
	// Deprecated.
	Mtls *MTLSConfig `field:"optional" json:"mtls" yaml:"mtls"`
}

properties used for creating the DomainName.

Example:

import acm "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var handler function

certArn := "arn:aws:acm:us-east-1:111111111111:certificate"
domainName := "example.com"

dn := apigwv2.NewDomainName(this, jsii.String("DN"), &DomainNameProps{
	DomainName: domainName,
	Certificate: acm.Certificate_FromCertificateArn(this, jsii.String("cert"), certArn),
})
api := apigwv2.NewHttpApi(this, jsii.String("HttpProxyProdApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpLambdaIntegration(jsii.String("DefaultIntegration"), handler),
	// https://${dn.domainName}/foo goes to prodApi $default stage
	DefaultDomainMapping: &DomainMappingOptions{
		DomainName: dn,
		MappingKey: jsii.String("foo"),
	},
})

Deprecated.

type EndpointOptions

type EndpointOptions struct {
	// The ACM certificate for this domain name.
	//
	// Certificate can be both ACM issued or imported.
	// Deprecated.
	Certificate awscertificatemanager.ICertificate `field:"required" json:"certificate" yaml:"certificate"`
	// The user-friendly name of the certificate that will be used by the endpoint for this domain name.
	// Default: - No friendly certificate name.
	//
	// Deprecated.
	CertificateName *string `field:"optional" json:"certificateName" yaml:"certificateName"`
	// The type of endpoint for this DomainName.
	// Default: EndpointType.REGIONAL
	//
	// Deprecated.
	EndpointType EndpointType `field:"optional" json:"endpointType" yaml:"endpointType"`
	// A public certificate issued by ACM to validate that you own a custom domain.
	//
	// This parameter is required
	// only when you configure mutual TLS authentication and you specify an ACM imported or private CA certificate
	// for `certificate`. The ownership certificate validates that you have permissions to use the domain name.
	// Default: - only required when configuring mTLS.
	//
	// Deprecated.
	OwnershipCertificate awscertificatemanager.ICertificate `field:"optional" json:"ownershipCertificate" yaml:"ownershipCertificate"`
	// The Transport Layer Security (TLS) version + cipher suite for this domain name.
	// Default: SecurityPolicy.TLS_1_2
	//
	// Deprecated.
	SecurityPolicy SecurityPolicy `field:"optional" json:"securityPolicy" yaml:"securityPolicy"`
}

properties for creating a domain name 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/awscdkapigatewayv2alpha"
import "github.com/aws/aws-cdk-go/awscdk"

var certificate certificate

endpointOptions := &EndpointOptions{
	Certificate: certificate,

	// the properties below are optional
	CertificateName: jsii.String("certificateName"),
	EndpointType: apigatewayv2_alpha.EndpointType_EDGE,
	OwnershipCertificate: certificate,
	SecurityPolicy: apigatewayv2_alpha.SecurityPolicy_TLS_1_0,
}

Deprecated.

type EndpointType

type EndpointType string

Endpoint type for a domain name. Deprecated.

const (
	// For an edge-optimized custom domain name.
	// Deprecated.
	EndpointType_EDGE EndpointType = "EDGE"
	// For a regional custom domain name.
	// Deprecated.
	EndpointType_REGIONAL EndpointType = "REGIONAL"
)

type GrantInvokeOptions

type GrantInvokeOptions struct {
	// The HTTP methods to allow.
	// Default: - the HttpMethod of the route.
	//
	// Deprecated.
	HttpMethods *[]HttpMethod `field:"optional" json:"httpMethods" yaml:"httpMethods"`
}

Options for granting invoke access.

Example:

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

grantInvokeOptions := &GrantInvokeOptions{
	HttpMethods: []httpMethod{
		apigatewayv2_alpha.*httpMethod_ANY,
	},
}

Deprecated.

type HttpApi

type HttpApi interface {
	awscdk.Resource
	IApi
	IHttpApi
	// Get the default endpoint for this API.
	// Deprecated.
	ApiEndpoint() *string
	// The identifier of this API Gateway API.
	// Deprecated.
	ApiId() *string
	// Default OIDC scopes attached to all routes in the gateway, unless explicitly configured on the route.
	//
	// The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation.
	// Deprecated.
	DefaultAuthorizationScopes() *[]*string
	// Default Authorizer applied to all routes in the gateway.
	// Deprecated.
	DefaultAuthorizer() IHttpRouteAuthorizer
	// The default stage of this API.
	// Deprecated.
	DefaultStage() IHttpStage
	// Specifies whether clients can invoke this HTTP API by using the default execute-api endpoint.
	// Deprecated.
	DisableExecuteApiEndpoint() *bool
	// 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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The identifier of this API Gateway HTTP API.
	// Deprecated.
	HttpApiId() *string
	// A human friendly name for this HTTP API.
	//
	// Note that this is different from `httpApiId`.
	// Deprecated.
	HttpApiName() *string
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	Stack() awscdk.Stack
	// Get the URL to the default stage of this API.
	//
	// Returns `undefined` if `createDefaultStage` is unset.
	// Deprecated.
	Url() *string
	// Add multiple routes that uses the same configuration.
	//
	// The routes all go to the same path, but for different
	// methods.
	// Deprecated.
	AddRoutes(options *AddRoutesOptions) *[]HttpRoute
	// Add a new stage.
	// Deprecated.
	AddStage(id *string, options *HttpStageOptions) HttpStage
	// Add a new VpcLink.
	// Deprecated.
	AddVpcLink(options *VpcLinkProps) VpcLink
	// 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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Return the given named metric for this Api Gateway.
	// Deprecated.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of client-side errors captured in a given period.
	// Deprecated.
	MetricClientError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the total number API requests in a given period.
	// Deprecated.
	MetricCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the amount of data processed in bytes.
	// Deprecated.
	MetricDataProcessed(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.
	// Deprecated.
	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.
	// Deprecated.
	MetricLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of server-side errors captured in a given period.
	// Deprecated.
	MetricServerError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

Create a new API Gateway HTTP API endpoint.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var booksDefaultFn function

booksIntegration := awscdkapigatewayv2integrationsalpha.NewHttpLambdaIntegration(jsii.String("BooksIntegration"), booksDefaultFn)

httpApi := apigwv2.NewHttpApi(this, jsii.String("HttpApi"))

httpApi.AddRoutes(&AddRoutesOptions{
	Path: jsii.String("/books"),
	Methods: []httpMethod{
		apigwv2.*httpMethod_GET,
	},
	Integration: booksIntegration,
})

Deprecated.

func NewHttpApi

func NewHttpApi(scope constructs.Construct, id *string, props *HttpApiProps) HttpApi

Deprecated.

type HttpApiAttributes

type HttpApiAttributes struct {
	// The identifier of the HttpApi.
	// Deprecated.
	HttpApiId *string `field:"required" json:"httpApiId" yaml:"httpApiId"`
	// The endpoint URL of the HttpApi.
	// Default: - throws an error if apiEndpoint is accessed.
	//
	// Deprecated.
	ApiEndpoint *string `field:"optional" json:"apiEndpoint" yaml:"apiEndpoint"`
}

Attributes for importing an HttpApi into the CDK.

Example:

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

httpApiAttributes := &HttpApiAttributes{
	HttpApiId: jsii.String("httpApiId"),

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

Deprecated.

type HttpApiProps

type HttpApiProps struct {
	// Name for the HTTP API resource.
	// Default: - id of the HttpApi construct.
	//
	// Deprecated.
	ApiName *string `field:"optional" json:"apiName" yaml:"apiName"`
	// Specifies a CORS configuration for an API.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html
	//
	// Default: - CORS disabled.
	//
	// Deprecated.
	CorsPreflight *CorsPreflightOptions `field:"optional" json:"corsPreflight" yaml:"corsPreflight"`
	// Whether a default stage and deployment should be automatically created.
	// Default: true.
	//
	// Deprecated.
	CreateDefaultStage *bool `field:"optional" json:"createDefaultStage" yaml:"createDefaultStage"`
	// Default OIDC scopes attached to all routes in the gateway, unless explicitly configured on the route.
	//
	// The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation.
	// Default: - no default authorization scopes.
	//
	// Deprecated.
	DefaultAuthorizationScopes *[]*string `field:"optional" json:"defaultAuthorizationScopes" yaml:"defaultAuthorizationScopes"`
	// Default Authorizer applied to all routes in the gateway.
	// Default: - no default authorizer.
	//
	// Deprecated.
	DefaultAuthorizer IHttpRouteAuthorizer `field:"optional" json:"defaultAuthorizer" yaml:"defaultAuthorizer"`
	// Configure a custom domain with the API mapping resource to the HTTP API.
	// Default: - no default domain mapping configured. meaningless if `createDefaultStage` is `false`.
	//
	// Deprecated.
	DefaultDomainMapping *DomainMappingOptions `field:"optional" json:"defaultDomainMapping" yaml:"defaultDomainMapping"`
	// An integration that will be configured on the catch-all route ($default).
	// Default: - none.
	//
	// Deprecated.
	DefaultIntegration HttpRouteIntegration `field:"optional" json:"defaultIntegration" yaml:"defaultIntegration"`
	// The description of the API.
	// Default: - none.
	//
	// Deprecated.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Specifies whether clients can invoke your API using the default endpoint.
	//
	// By default, clients can invoke your API with the default
	// `https://{api_id}.execute-api.{region}.amazonaws.com` endpoint. Enable
	// this if you would like clients to use your custom domain name.
	// Default: false execute-api endpoint enabled.
	//
	// Deprecated.
	DisableExecuteApiEndpoint *bool `field:"optional" json:"disableExecuteApiEndpoint" yaml:"disableExecuteApiEndpoint"`
}

Properties to initialize an instance of `HttpApi`.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var lb applicationLoadBalancer

listener := lb.AddListener(jsii.String("listener"), &BaseApplicationListenerProps{
	Port: jsii.Number(80),
})
listener.AddTargets(jsii.String("target"), &AddApplicationTargetsProps{
	Port: jsii.Number(80),
})

httpEndpoint := apigwv2.NewHttpApi(this, jsii.String("HttpProxyPrivateApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpAlbIntegration(jsii.String("DefaultIntegration"), listener, &HttpAlbIntegrationProps{
		ParameterMapping: apigwv2.NewParameterMapping().Custom(jsii.String("myKey"), jsii.String("myValue")),
	}),
})

Deprecated.

type HttpAuthorizer

type HttpAuthorizer interface {
	awscdk.Resource
	IHttpAuthorizer
	// Id of the Authorizer.
	// Deprecated.
	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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

An authorizer for Http 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/awscdkapigatewayv2alpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"

var httpApi httpApi

httpAuthorizer := apigatewayv2_alpha.NewHttpAuthorizer(this, jsii.String("MyHttpAuthorizer"), &HttpAuthorizerProps{
	HttpApi: httpApi,
	IdentitySource: []*string{
		jsii.String("identitySource"),
	},
	Type: apigatewayv2_alpha.HttpAuthorizerType_IAM,

	// the properties below are optional
	AuthorizerName: jsii.String("authorizerName"),
	AuthorizerUri: jsii.String("authorizerUri"),
	EnableSimpleResponses: jsii.Boolean(false),
	JwtAudience: []*string{
		jsii.String("jwtAudience"),
	},
	JwtIssuer: jsii.String("jwtIssuer"),
	PayloadFormatVersion: apigatewayv2_alpha.AuthorizerPayloadVersion_VERSION_1_0,
	ResultsCacheTtl: cdk.Duration_Minutes(jsii.Number(30)),
})

Deprecated.

func NewHttpAuthorizer

func NewHttpAuthorizer(scope constructs.Construct, id *string, props *HttpAuthorizerProps) HttpAuthorizer

Deprecated.

type HttpAuthorizerAttributes

type HttpAuthorizerAttributes struct {
	// Id of the Authorizer.
	// Deprecated.
	AuthorizerId *string `field:"required" json:"authorizerId" yaml:"authorizerId"`
	// Type of authorizer.
	//
	// Possible values are:
	// - JWT - JSON Web Token Authorizer
	// - CUSTOM - Lambda Authorizer
	// - NONE - No Authorization.
	// Deprecated.
	AuthorizerType *string `field:"required" json:"authorizerType" yaml:"authorizerType"`
}

Reference to an http authorizer.

Example:

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

httpAuthorizerAttributes := &HttpAuthorizerAttributes{
	AuthorizerId: jsii.String("authorizerId"),
	AuthorizerType: jsii.String("authorizerType"),
}

Deprecated.

type HttpAuthorizerProps

type HttpAuthorizerProps struct {
	// HTTP Api to attach the authorizer to.
	// Deprecated.
	HttpApi IHttpApi `field:"required" json:"httpApi" yaml:"httpApi"`
	// The identity source for which authorization is requested.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource
	//
	// Deprecated.
	IdentitySource *[]*string `field:"required" json:"identitySource" yaml:"identitySource"`
	// The type of authorizer.
	// Deprecated.
	Type HttpAuthorizerType `field:"required" json:"type" yaml:"type"`
	// Name of the authorizer.
	// Default: - id of the HttpAuthorizer construct.
	//
	// Deprecated.
	AuthorizerName *string `field:"optional" json:"authorizerName" yaml:"authorizerName"`
	// The authorizer's Uniform Resource Identifier (URI).
	//
	// For REQUEST authorizers, this must be a well-formed Lambda function URI.
	// Default: - required for Request authorizer types.
	//
	// Deprecated.
	AuthorizerUri *string `field:"optional" json:"authorizerUri" yaml:"authorizerUri"`
	// Specifies whether a Lambda authorizer returns a response in a simple format.
	//
	// If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy.
	// Default: - The lambda authorizer must return an IAM policy as its response.
	//
	// Deprecated.
	EnableSimpleResponses *bool `field:"optional" json:"enableSimpleResponses" yaml:"enableSimpleResponses"`
	// A list of the intended recipients of the JWT.
	//
	// A valid JWT must provide an aud that matches at least one entry in this list.
	// Default: - required for JWT authorizer typess.
	//
	// Deprecated.
	JwtAudience *[]*string `field:"optional" json:"jwtAudience" yaml:"jwtAudience"`
	// The base domain of the identity provider that issues JWT.
	// Default: - required for JWT authorizer types.
	//
	// Deprecated.
	JwtIssuer *string `field:"optional" json:"jwtIssuer" yaml:"jwtIssuer"`
	// Specifies the format of the payload sent to an HTTP API Lambda authorizer.
	// Default: AuthorizerPayloadVersion.VERSION_2_0 if the authorizer type is HttpAuthorizerType.LAMBDA
	//
	// Deprecated.
	PayloadFormatVersion AuthorizerPayloadVersion `field:"optional" json:"payloadFormatVersion" yaml:"payloadFormatVersion"`
	// How long APIGateway should cache the results.
	//
	// Max 1 hour.
	// Default: - API Gateway will not cache authorizer responses.
	//
	// Deprecated.
	ResultsCacheTtl awscdk.Duration `field:"optional" json:"resultsCacheTtl" yaml:"resultsCacheTtl"`
}

Properties to initialize an instance of `HttpAuthorizer`.

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/awscdkapigatewayv2alpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"

var httpApi httpApi

httpAuthorizerProps := &HttpAuthorizerProps{
	HttpApi: httpApi,
	IdentitySource: []*string{
		jsii.String("identitySource"),
	},
	Type: apigatewayv2_alpha.HttpAuthorizerType_IAM,

	// the properties below are optional
	AuthorizerName: jsii.String("authorizerName"),
	AuthorizerUri: jsii.String("authorizerUri"),
	EnableSimpleResponses: jsii.Boolean(false),
	JwtAudience: []*string{
		jsii.String("jwtAudience"),
	},
	JwtIssuer: jsii.String("jwtIssuer"),
	PayloadFormatVersion: apigatewayv2_alpha.AuthorizerPayloadVersion_VERSION_1_0,
	ResultsCacheTtl: cdk.Duration_Minutes(jsii.Number(30)),
}

Deprecated.

type HttpAuthorizerType

type HttpAuthorizerType string

Supported Authorizer types. Deprecated.

const (
	// IAM Authorizer.
	// Deprecated.
	HttpAuthorizerType_IAM HttpAuthorizerType = "IAM"
	// JSON Web Tokens.
	// Deprecated.
	HttpAuthorizerType_JWT HttpAuthorizerType = "JWT"
	// Lambda Authorizer.
	// Deprecated.
	HttpAuthorizerType_LAMBDA HttpAuthorizerType = "LAMBDA"
)

type HttpConnectionType

type HttpConnectionType string

Supported connection types. Deprecated.

const (
	// For private connections between API Gateway and resources in a VPC.
	// Deprecated.
	HttpConnectionType_VPC_LINK HttpConnectionType = "VPC_LINK"
	// For connections through public routable internet.
	// Deprecated.
	HttpConnectionType_INTERNET HttpConnectionType = "INTERNET"
)

type HttpIntegration

type HttpIntegration interface {
	awscdk.Resource
	IHttpIntegration
	// 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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The HTTP API associated with this integration.
	// Deprecated.
	HttpApi() IHttpApi
	// Id of the integration.
	// Deprecated.
	IntegrationId() *string
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

The integration for an API 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/awscdkapigatewayv2alpha"

var httpApi httpApi
var integrationCredentials integrationCredentials
var parameterMapping parameterMapping
var payloadFormatVersion payloadFormatVersion

httpIntegration := apigatewayv2_alpha.NewHttpIntegration(this, jsii.String("MyHttpIntegration"), &HttpIntegrationProps{
	HttpApi: httpApi,
	IntegrationType: apigatewayv2_alpha.HttpIntegrationType_HTTP_PROXY,

	// the properties below are optional
	ConnectionId: jsii.String("connectionId"),
	ConnectionType: apigatewayv2_alpha.HttpConnectionType_VPC_LINK,
	Credentials: integrationCredentials,
	IntegrationSubtype: apigatewayv2_alpha.HttpIntegrationSubtype_EVENTBRIDGE_PUT_EVENTS,
	IntegrationUri: jsii.String("integrationUri"),
	Method: apigatewayv2_alpha.HttpMethod_ANY,
	ParameterMapping: parameterMapping,
	PayloadFormatVersion: payloadFormatVersion,
	SecureServerName: jsii.String("secureServerName"),
})

Deprecated.

func NewHttpIntegration

func NewHttpIntegration(scope constructs.Construct, id *string, props *HttpIntegrationProps) HttpIntegration

Deprecated.

type HttpIntegrationProps

type HttpIntegrationProps struct {
	// The HTTP API to which this integration should be bound.
	// Deprecated.
	HttpApi IHttpApi `field:"required" json:"httpApi" yaml:"httpApi"`
	// Integration type.
	// Deprecated.
	IntegrationType HttpIntegrationType `field:"required" json:"integrationType" yaml:"integrationType"`
	// The ID of the VPC link for a private integration.
	//
	// Supported only for HTTP APIs.
	// Default: - undefined.
	//
	// Deprecated.
	ConnectionId *string `field:"optional" json:"connectionId" yaml:"connectionId"`
	// The type of the network connection to the integration endpoint.
	// Default: HttpConnectionType.INTERNET
	//
	// Deprecated.
	ConnectionType HttpConnectionType `field:"optional" json:"connectionType" yaml:"connectionType"`
	// The credentials with which to invoke the integration.
	// Default: - no credentials, use resource-based permissions on supported AWS services.
	//
	// Deprecated.
	Credentials IntegrationCredentials `field:"optional" json:"credentials" yaml:"credentials"`
	// Integration subtype.
	//
	// Used for AWS Service integrations, specifies the target of the integration.
	// Default: - none, required if no `integrationUri` is defined.
	//
	// Deprecated.
	IntegrationSubtype HttpIntegrationSubtype `field:"optional" json:"integrationSubtype" yaml:"integrationSubtype"`
	// Integration URI.
	//
	// This will be the function ARN in the case of `HttpIntegrationType.AWS_PROXY`,
	// or HTTP URL in the case of `HttpIntegrationType.HTTP_PROXY`.
	// Default: - none, required if no `integrationSubtype` is defined.
	//
	// Deprecated.
	IntegrationUri *string `field:"optional" json:"integrationUri" yaml:"integrationUri"`
	// The HTTP method to use when calling the underlying HTTP proxy.
	// Default: - none. required if the integration type is `HttpIntegrationType.HTTP_PROXY`.
	//
	// Deprecated.
	Method HttpMethod `field:"optional" json:"method" yaml:"method"`
	// Specifies how to transform HTTP requests before sending them to the backend.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
	//
	// Default: undefined requests are sent to the backend unmodified.
	//
	// Deprecated.
	ParameterMapping ParameterMapping `field:"optional" json:"parameterMapping" yaml:"parameterMapping"`
	// The version of the payload format.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
	//
	// Default: - defaults to latest in the case of HttpIntegrationType.AWS_PROXY`, irrelevant otherwise.
	//
	// Deprecated.
	PayloadFormatVersion PayloadFormatVersion `field:"optional" json:"payloadFormatVersion" yaml:"payloadFormatVersion"`
	// Specifies the TLS configuration for a private integration.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-integration-tlsconfig.html
	//
	// Default: undefined private integration traffic will use HTTP protocol.
	//
	// Deprecated.
	SecureServerName *string `field:"optional" json:"secureServerName" yaml:"secureServerName"`
}

The integration properties.

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/awscdkapigatewayv2alpha"

var httpApi httpApi
var integrationCredentials integrationCredentials
var parameterMapping parameterMapping
var payloadFormatVersion payloadFormatVersion

httpIntegrationProps := &HttpIntegrationProps{
	HttpApi: httpApi,
	IntegrationType: apigatewayv2_alpha.HttpIntegrationType_HTTP_PROXY,

	// the properties below are optional
	ConnectionId: jsii.String("connectionId"),
	ConnectionType: apigatewayv2_alpha.HttpConnectionType_VPC_LINK,
	Credentials: integrationCredentials,
	IntegrationSubtype: apigatewayv2_alpha.HttpIntegrationSubtype_EVENTBRIDGE_PUT_EVENTS,
	IntegrationUri: jsii.String("integrationUri"),
	Method: apigatewayv2_alpha.HttpMethod_ANY,
	ParameterMapping: parameterMapping,
	PayloadFormatVersion: payloadFormatVersion,
	SecureServerName: jsii.String("secureServerName"),
}

Deprecated.

type HttpIntegrationSubtype

type HttpIntegrationSubtype string

Supported integration subtypes. See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html

Deprecated.

const (
	// EventBridge PutEvents integration.
	// Deprecated.
	HttpIntegrationSubtype_EVENTBRIDGE_PUT_EVENTS HttpIntegrationSubtype = "EVENTBRIDGE_PUT_EVENTS"
	// SQS SendMessage integration.
	// Deprecated.
	HttpIntegrationSubtype_SQS_SEND_MESSAGE HttpIntegrationSubtype = "SQS_SEND_MESSAGE"
	// SQS ReceiveMessage integration,.
	// Deprecated.
	HttpIntegrationSubtype_SQS_RECEIVE_MESSAGE HttpIntegrationSubtype = "SQS_RECEIVE_MESSAGE"
	// SQS DeleteMessage integration,.
	// Deprecated.
	HttpIntegrationSubtype_SQS_DELETE_MESSAGE HttpIntegrationSubtype = "SQS_DELETE_MESSAGE"
	// SQS PurgeQueue integration.
	// Deprecated.
	HttpIntegrationSubtype_SQS_PURGE_QUEUE HttpIntegrationSubtype = "SQS_PURGE_QUEUE"
	// AppConfig GetConfiguration integration.
	// Deprecated.
	HttpIntegrationSubtype_APPCONFIG_GET_CONFIGURATION HttpIntegrationSubtype = "APPCONFIG_GET_CONFIGURATION"
	// Kinesis PutRecord integration.
	// Deprecated.
	HttpIntegrationSubtype_KINESIS_PUT_RECORD HttpIntegrationSubtype = "KINESIS_PUT_RECORD"
	// Step Functions StartExecution integration.
	// Deprecated.
	HttpIntegrationSubtype_STEPFUNCTIONS_START_EXECUTION HttpIntegrationSubtype = "STEPFUNCTIONS_START_EXECUTION"
	// Step Functions StartSyncExecution integration.
	// Deprecated.
	HttpIntegrationSubtype_STEPFUNCTIONS_START_SYNC_EXECUTION HttpIntegrationSubtype = "STEPFUNCTIONS_START_SYNC_EXECUTION"
	// Step Functions StopExecution integration.
	// Deprecated.
	HttpIntegrationSubtype_STEPFUNCTIONS_STOP_EXECUTION HttpIntegrationSubtype = "STEPFUNCTIONS_STOP_EXECUTION"
)

type HttpIntegrationType

type HttpIntegrationType string

Supported integration types. Deprecated.

const (
	// Integration type is an HTTP proxy.
	//
	// For integrating the route or method request with an HTTP endpoint, with the
	// client request passed through as-is. This is also referred to as HTTP proxy
	// integration. For HTTP API private integrations, use an HTTP_PROXY integration.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html
	//
	// Deprecated.
	HttpIntegrationType_HTTP_PROXY HttpIntegrationType = "HTTP_PROXY"
	// Integration type is an AWS proxy.
	//
	// For integrating the route or method request with a Lambda function or other
	// AWS service action. This integration is also referred to as a Lambda proxy
	// integration.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
	//
	// Deprecated.
	HttpIntegrationType_AWS_PROXY HttpIntegrationType = "AWS_PROXY"
)

type HttpMethod

type HttpMethod string

Supported HTTP methods.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var bookStoreDefaultFn function

getBooksIntegration := awscdkapigatewayv2integrationsalpha.NewHttpUrlIntegration(jsii.String("GetBooksIntegration"), jsii.String("https://get-books-proxy.example.com"))
bookStoreDefaultIntegration := awscdkapigatewayv2integrationsalpha.NewHttpLambdaIntegration(jsii.String("BooksIntegration"), bookStoreDefaultFn)

httpApi := apigwv2.NewHttpApi(this, jsii.String("HttpApi"))

httpApi.AddRoutes(&AddRoutesOptions{
	Path: jsii.String("/books"),
	Methods: []httpMethod{
		apigwv2.*httpMethod_GET,
	},
	Integration: getBooksIntegration,
})
httpApi.AddRoutes(&AddRoutesOptions{
	Path: jsii.String("/books"),
	Methods: []*httpMethod{
		apigwv2.*httpMethod_ANY,
	},
	Integration: bookStoreDefaultIntegration,
})

Deprecated.

const (
	// HTTP ANY.
	// Deprecated.
	HttpMethod_ANY HttpMethod = "ANY"
	// HTTP DELETE.
	// Deprecated.
	HttpMethod_DELETE HttpMethod = "DELETE"
	// HTTP GET.
	// Deprecated.
	HttpMethod_GET HttpMethod = "GET"
	// HTTP HEAD.
	// Deprecated.
	HttpMethod_HEAD HttpMethod = "HEAD"
	// HTTP OPTIONS.
	// Deprecated.
	HttpMethod_OPTIONS HttpMethod = "OPTIONS"
	// HTTP PATCH.
	// Deprecated.
	HttpMethod_PATCH HttpMethod = "PATCH"
	// HTTP POST.
	// Deprecated.
	HttpMethod_POST HttpMethod = "POST"
	// HTTP PUT.
	// Deprecated.
	HttpMethod_PUT HttpMethod = "PUT"
)

type HttpNoneAuthorizer

type HttpNoneAuthorizer interface {
	IHttpRouteAuthorizer
	// Bind this authorizer to a specified Http route.
	// Deprecated.
	Bind(_options *HttpRouteAuthorizerBindOptions) *HttpRouteAuthorizerConfig
}

Explicitly configure no authorizers on specific HTTP API routes.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2authorizersalpha"
import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

issuer := "https://test.us.auth0.com"
authorizer := awscdkapigatewayv2authorizersalpha.NewHttpJwtAuthorizer(jsii.String("DefaultAuthorizer"), issuer, &HttpJwtAuthorizerProps{
	JwtAudience: []*string{
		jsii.String("3131231"),
	},
})

api := apigwv2.NewHttpApi(this, jsii.String("HttpApi"), &HttpApiProps{
	DefaultAuthorizer: authorizer,
	DefaultAuthorizationScopes: []*string{
		jsii.String("read:books"),
	},
})

api.AddRoutes(&AddRoutesOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewHttpUrlIntegration(jsii.String("BooksIntegration"), jsii.String("https://get-books-proxy.example.com")),
	Path: jsii.String("/books"),
	Methods: []httpMethod{
		apigwv2.*httpMethod_GET,
	},
})

api.AddRoutes(&AddRoutesOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewHttpUrlIntegration(jsii.String("BooksIdIntegration"), jsii.String("https://get-books-proxy.example.com")),
	Path: jsii.String("/books/{id}"),
	Methods: []*httpMethod{
		apigwv2.*httpMethod_GET,
	},
})

api.AddRoutes(&AddRoutesOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewHttpUrlIntegration(jsii.String("BooksIntegration"), jsii.String("https://get-books-proxy.example.com")),
	Path: jsii.String("/books"),
	Methods: []*httpMethod{
		apigwv2.*httpMethod_POST,
	},
	AuthorizationScopes: []*string{
		jsii.String("write:books"),
	},
})

api.AddRoutes(&AddRoutesOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewHttpUrlIntegration(jsii.String("LoginIntegration"), jsii.String("https://get-books-proxy.example.com")),
	Path: jsii.String("/login"),
	Methods: []*httpMethod{
		apigwv2.*httpMethod_POST,
	},
	Authorizer: apigwv2.NewHttpNoneAuthorizer(),
})

Deprecated.

func NewHttpNoneAuthorizer

func NewHttpNoneAuthorizer() HttpNoneAuthorizer

Deprecated.

type HttpRoute

type HttpRoute interface {
	awscdk.Resource
	IHttpRoute
	// 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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The HTTP API associated with this route.
	// Deprecated.
	HttpApi() IHttpApi
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// Returns the path component of this HTTP route, `undefined` if the path is the catch-all route.
	// Deprecated.
	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.
	// Deprecated.
	PhysicalName() *string
	// Returns the arn of the route.
	// Deprecated.
	RouteArn() *string
	// Id of the Route.
	// Deprecated.
	RouteId() *string
	// The stack in which this resource is defined.
	// Deprecated.
	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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grant access to invoke the route.
	//
	// This method requires that the authorizer of the route is undefined or is
	// an `HttpIamAuthorizer`.
	// Deprecated.
	GrantInvoke(grantee awsiam.IGrantable, options *GrantInvokeOptions) awsiam.Grant
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

Route class that creates the Route for API Gateway HTTP API.

Example:

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

var httpApi httpApi
var httpRouteAuthorizer iHttpRouteAuthorizer
var httpRouteIntegration httpRouteIntegration
var httpRouteKey httpRouteKey

httpRoute := apigatewayv2_alpha.NewHttpRoute(this, jsii.String("MyHttpRoute"), &HttpRouteProps{
	HttpApi: httpApi,
	Integration: httpRouteIntegration,
	RouteKey: httpRouteKey,

	// the properties below are optional
	AuthorizationScopes: []*string{
		jsii.String("authorizationScopes"),
	},
	Authorizer: httpRouteAuthorizer,
})

Deprecated.

func NewHttpRoute

func NewHttpRoute(scope constructs.Construct, id *string, props *HttpRouteProps) HttpRoute

Deprecated.

type HttpRouteAuthorizerBindOptions

type HttpRouteAuthorizerBindOptions struct {
	// The route to which the authorizer is being bound.
	// Deprecated.
	Route IHttpRoute `field:"required" json:"route" yaml:"route"`
	// The scope for any constructs created as part of the bind.
	// Deprecated.
	Scope constructs.Construct `field:"required" json:"scope" yaml:"scope"`
}

Input to the bind() operation, that binds an authorizer to a route.

Example:

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

var construct construct
var httpRoute httpRoute

httpRouteAuthorizerBindOptions := &HttpRouteAuthorizerBindOptions{
	Route: httpRoute,
	Scope: construct,
}

Deprecated.

type HttpRouteAuthorizerConfig

type HttpRouteAuthorizerConfig struct {
	// The type of authorization.
	//
	// Possible values are:
	// - AWS_IAM - IAM Authorizer
	// - JWT - JSON Web Token Authorizer
	// - CUSTOM - Lambda Authorizer
	// - NONE - No Authorization.
	// Deprecated.
	AuthorizationType *string `field:"required" json:"authorizationType" yaml:"authorizationType"`
	// The list of OIDC scopes to include in the authorization.
	// Default: - no authorization scopes.
	//
	// Deprecated.
	AuthorizationScopes *[]*string `field:"optional" json:"authorizationScopes" yaml:"authorizationScopes"`
	// The authorizer id.
	// Default: - No authorizer id (useful for AWS_IAM route authorizer).
	//
	// Deprecated.
	AuthorizerId *string `field:"optional" json:"authorizerId" yaml:"authorizerId"`
}

Results of binding an authorizer to an http route.

Example:

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

httpRouteAuthorizerConfig := &HttpRouteAuthorizerConfig{
	AuthorizationType: jsii.String("authorizationType"),

	// the properties below are optional
	AuthorizationScopes: []*string{
		jsii.String("authorizationScopes"),
	},
	AuthorizerId: jsii.String("authorizerId"),
}

Deprecated.

type HttpRouteIntegration

type HttpRouteIntegration interface {
	// Bind this integration to the route.
	// Deprecated.
	Bind(options *HttpRouteIntegrationBindOptions) *HttpRouteIntegrationConfig
	// Complete the binding of the integration to the route.
	//
	// In some cases, there is
	// some additional work to do, such as adding permissions for the API to access
	// the target. This work is necessary whether the integration has just been
	// created for this route or it is an existing one, previously created for other
	// routes. In most cases, however, concrete implementations do not need to
	// override this method.
	// Deprecated.
	CompleteBind(_options *HttpRouteIntegrationBindOptions)
}

The interface that various route integration classes will inherit.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var lb applicationLoadBalancer

listener := lb.AddListener(jsii.String("listener"), &BaseApplicationListenerProps{
	Port: jsii.Number(80),
})
listener.AddTargets(jsii.String("target"), &AddApplicationTargetsProps{
	Port: jsii.Number(80),
})

httpEndpoint := apigwv2.NewHttpApi(this, jsii.String("HttpProxyPrivateApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpAlbIntegration(jsii.String("DefaultIntegration"), listener, &HttpAlbIntegrationProps{
		ParameterMapping: apigwv2.NewParameterMapping().Custom(jsii.String("myKey"), jsii.String("myValue")),
	}),
})

Deprecated.

type HttpRouteIntegrationBindOptions

type HttpRouteIntegrationBindOptions struct {
	// The route to which this is being bound.
	// Deprecated.
	Route IHttpRoute `field:"required" json:"route" yaml:"route"`
	// The current scope in which the bind is occurring.
	//
	// If the `HttpRouteIntegration` being bound creates additional constructs,
	// this will be used as their parent scope.
	// Deprecated.
	Scope constructs.Construct `field:"required" json:"scope" yaml:"scope"`
}

Options to the HttpRouteIntegration during its bind operation.

Example:

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

var construct construct
var httpRoute httpRoute

httpRouteIntegrationBindOptions := &HttpRouteIntegrationBindOptions{
	Route: httpRoute,
	Scope: construct,
}

Deprecated.

type HttpRouteIntegrationConfig

type HttpRouteIntegrationConfig struct {
	// Payload format version in the case of lambda proxy integration.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
	//
	// Default: - undefined.
	//
	// Deprecated.
	PayloadFormatVersion PayloadFormatVersion `field:"required" json:"payloadFormatVersion" yaml:"payloadFormatVersion"`
	// Integration type.
	// Deprecated.
	Type HttpIntegrationType `field:"required" json:"type" yaml:"type"`
	// The ID of the VPC link for a private integration.
	//
	// Supported only for HTTP APIs.
	// Default: - undefined.
	//
	// Deprecated.
	ConnectionId *string `field:"optional" json:"connectionId" yaml:"connectionId"`
	// The type of the network connection to the integration endpoint.
	// Default: HttpConnectionType.INTERNET
	//
	// Deprecated.
	ConnectionType HttpConnectionType `field:"optional" json:"connectionType" yaml:"connectionType"`
	// The credentials with which to invoke the integration.
	// Default: - no credentials, use resource-based permissions on supported AWS services.
	//
	// Deprecated.
	Credentials IntegrationCredentials `field:"optional" json:"credentials" yaml:"credentials"`
	// The HTTP method that must be used to invoke the underlying proxy.
	//
	// Required for `HttpIntegrationType.HTTP_PROXY`
	// Default: - undefined.
	//
	// Deprecated.
	Method HttpMethod `field:"optional" json:"method" yaml:"method"`
	// Specifies how to transform HTTP requests before sending them to the backend.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
	//
	// Default: undefined requests are sent to the backend unmodified.
	//
	// Deprecated.
	ParameterMapping ParameterMapping `field:"optional" json:"parameterMapping" yaml:"parameterMapping"`
	// Specifies the server name to verified by HTTPS when calling the backend integration.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-integration-tlsconfig.html
	//
	// Default: undefined private integration traffic will use HTTP protocol.
	//
	// Deprecated.
	SecureServerName *string `field:"optional" json:"secureServerName" yaml:"secureServerName"`
	// Integration subtype.
	// Default: - none, required if no `integrationUri` is defined.
	//
	// Deprecated.
	Subtype HttpIntegrationSubtype `field:"optional" json:"subtype" yaml:"subtype"`
	// Integration URI.
	// Default: - none, required if no `integrationSubtype` is defined.
	//
	// Deprecated.
	Uri *string `field:"optional" json:"uri" yaml:"uri"`
}

Config returned back as a result of the bind.

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/awscdkapigatewayv2alpha"

var integrationCredentials integrationCredentials
var parameterMapping parameterMapping
var payloadFormatVersion payloadFormatVersion

httpRouteIntegrationConfig := &HttpRouteIntegrationConfig{
	PayloadFormatVersion: payloadFormatVersion,
	Type: apigatewayv2_alpha.HttpIntegrationType_HTTP_PROXY,

	// the properties below are optional
	ConnectionId: jsii.String("connectionId"),
	ConnectionType: apigatewayv2_alpha.HttpConnectionType_VPC_LINK,
	Credentials: integrationCredentials,
	Method: apigatewayv2_alpha.HttpMethod_ANY,
	ParameterMapping: parameterMapping,
	SecureServerName: jsii.String("secureServerName"),
	Subtype: apigatewayv2_alpha.HttpIntegrationSubtype_EVENTBRIDGE_PUT_EVENTS,
	Uri: jsii.String("uri"),
}

Deprecated.

type HttpRouteKey

type HttpRouteKey interface {
	// The key to the RouteKey as recognized by APIGateway.
	// Deprecated.
	Key() *string
	// The method of the route.
	// Deprecated.
	Method() HttpMethod
	// The path part of this RouteKey.
	//
	// Returns `undefined` when `RouteKey.DEFAULT` is used.
	// Deprecated.
	Path() *string
}

HTTP route in APIGateway is a combination of the HTTP method and the path component.

This class models that combination.

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/awscdkapigatewayv2alpha"

httpRouteKey := apigatewayv2_alpha.HttpRouteKey_With(jsii.String("path"), apigatewayv2_alpha.HttpMethod_ANY)

Deprecated.

func HttpRouteKey_DEFAULT

func HttpRouteKey_DEFAULT() HttpRouteKey

func HttpRouteKey_With

func HttpRouteKey_With(path *string, method HttpMethod) HttpRouteKey

Create a route key with the combination of the path and the method. Deprecated.

type HttpRouteProps

type HttpRouteProps struct {
	// The integration to be configured on this route.
	// Deprecated.
	Integration HttpRouteIntegration `field:"required" json:"integration" yaml:"integration"`
	// the API the route is associated with.
	// Deprecated.
	HttpApi IHttpApi `field:"required" json:"httpApi" yaml:"httpApi"`
	// The key to this route.
	//
	// This is a combination of an HTTP method and an HTTP path.
	// Deprecated.
	RouteKey HttpRouteKey `field:"required" json:"routeKey" yaml:"routeKey"`
	// The list of OIDC scopes to include in the authorization.
	//
	// These scopes will be merged with the scopes from the attached authorizer.
	// Default: - no additional authorization scopes.
	//
	// Deprecated.
	AuthorizationScopes *[]*string `field:"optional" json:"authorizationScopes" yaml:"authorizationScopes"`
	// Authorizer for a WebSocket API or an HTTP API.
	// Default: - No authorizer.
	//
	// Deprecated.
	Authorizer IHttpRouteAuthorizer `field:"optional" json:"authorizer" yaml:"authorizer"`
}

Properties to initialize a new Route.

Example:

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

var httpApi httpApi
var httpRouteAuthorizer iHttpRouteAuthorizer
var httpRouteIntegration httpRouteIntegration
var httpRouteKey httpRouteKey

httpRouteProps := &HttpRouteProps{
	HttpApi: httpApi,
	Integration: httpRouteIntegration,
	RouteKey: httpRouteKey,

	// the properties below are optional
	AuthorizationScopes: []*string{
		jsii.String("authorizationScopes"),
	},
	Authorizer: httpRouteAuthorizer,
}

Deprecated.

type HttpStage

type HttpStage interface {
	awscdk.Resource
	IHttpStage
	IStage
	// The API this stage is associated to.
	// Deprecated.
	Api() IHttpApi
	// Deprecated.
	BaseApi() IApi
	// The custom domain URL to this stage.
	// Deprecated.
	DomainUrl() *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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	Stack() awscdk.Stack
	// The name of the stage;
	//
	// its primary identifier.
	// Deprecated.
	StageName() *string
	// The URL to this stage.
	// Deprecated.
	Url() *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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Return the given named metric for this HTTP Api Gateway Stage.
	// Deprecated.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of client-side errors captured in a given period.
	// Deprecated.
	MetricClientError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the total number API requests in a given period.
	// Deprecated.
	MetricCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the amount of data processed in bytes.
	// Deprecated.
	MetricDataProcessed(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.
	// Deprecated.
	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.
	// Deprecated.
	MetricLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of server-side errors captured in a given period.
	// Deprecated.
	MetricServerError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

Represents a stage where an instance of the API is deployed.

Example:

var api httpApi

apigwv2.NewHttpStage(this, jsii.String("Stage"), &HttpStageProps{
	HttpApi: api,
	StageName: jsii.String("beta"),
})

Deprecated.

func NewHttpStage

func NewHttpStage(scope constructs.Construct, id *string, props *HttpStageProps) HttpStage

Deprecated.

type HttpStageAttributes

type HttpStageAttributes struct {
	// The name of the stage.
	// Deprecated.
	StageName *string `field:"required" json:"stageName" yaml:"stageName"`
	// The API to which this stage is associated.
	// Deprecated.
	Api IHttpApi `field:"required" json:"api" yaml:"api"`
}

The attributes used to import existing HttpStage.

Example:

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

var httpApi httpApi

httpStageAttributes := &HttpStageAttributes{
	Api: httpApi,
	StageName: jsii.String("stageName"),
}

Deprecated.

type HttpStageOptions

type HttpStageOptions struct {
	// Whether updates to an API automatically trigger a new deployment.
	// Default: false.
	//
	// Deprecated.
	AutoDeploy *bool `field:"optional" json:"autoDeploy" yaml:"autoDeploy"`
	// The options for custom domain and api mapping.
	// Default: - no custom domain and api mapping configuration.
	//
	// Deprecated.
	DomainMapping *DomainMappingOptions `field:"optional" json:"domainMapping" yaml:"domainMapping"`
	// Throttle settings for the routes of this stage.
	// Default: - no throttling configuration.
	//
	// Deprecated.
	Throttle *ThrottleSettings `field:"optional" json:"throttle" yaml:"throttle"`
	// The name of the stage.
	//
	// See `StageName` class for more details.
	// Default: '$default' the default stage of the API. This stage will have the URL at the root of the API endpoint.
	//
	// Deprecated.
	StageName *string `field:"optional" json:"stageName" yaml:"stageName"`
}

The options to create a new Stage for an HTTP API.

Example:

var api httpApi
var dn domainName

api.AddStage(jsii.String("beta"), &HttpStageOptions{
	StageName: jsii.String("beta"),
	AutoDeploy: jsii.Boolean(true),
	// https://${dn.domainName}/bar goes to the beta stage
	DomainMapping: &DomainMappingOptions{
		DomainName: dn,
		MappingKey: jsii.String("bar"),
	},
})

Deprecated.

type HttpStageProps

type HttpStageProps struct {
	// Whether updates to an API automatically trigger a new deployment.
	// Default: false.
	//
	// Deprecated.
	AutoDeploy *bool `field:"optional" json:"autoDeploy" yaml:"autoDeploy"`
	// The options for custom domain and api mapping.
	// Default: - no custom domain and api mapping configuration.
	//
	// Deprecated.
	DomainMapping *DomainMappingOptions `field:"optional" json:"domainMapping" yaml:"domainMapping"`
	// Throttle settings for the routes of this stage.
	// Default: - no throttling configuration.
	//
	// Deprecated.
	Throttle *ThrottleSettings `field:"optional" json:"throttle" yaml:"throttle"`
	// The name of the stage.
	//
	// See `StageName` class for more details.
	// Default: '$default' the default stage of the API. This stage will have the URL at the root of the API endpoint.
	//
	// Deprecated.
	StageName *string `field:"optional" json:"stageName" yaml:"stageName"`
	// The HTTP API to which this stage is associated.
	// Deprecated.
	HttpApi IHttpApi `field:"required" json:"httpApi" yaml:"httpApi"`
}

Properties to initialize an instance of `HttpStage`.

Example:

var api httpApi

apigwv2.NewHttpStage(this, jsii.String("Stage"), &HttpStageProps{
	HttpApi: api,
	StageName: jsii.String("beta"),
})

Deprecated.

type IApi

type IApi interface {
	awscdk.IResource
	// Return the given named metric for this Api Gateway.
	// Default: - average over 5 minutes.
	//
	// Deprecated.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The default endpoint for an API.
	// Deprecated.
	ApiEndpoint() *string
	// The identifier of this API Gateway API.
	// Deprecated.
	ApiId() *string
}

Represents a API Gateway HTTP/WebSocket API. Deprecated.

type IApiMapping

type IApiMapping interface {
	awscdk.IResource
	// ID of the api mapping.
	// Deprecated.
	ApiMappingId() *string
}

Represents an ApiGatewayV2 ApiMapping resource. See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html

Deprecated.

func ApiMapping_FromApiMappingAttributes

func ApiMapping_FromApiMappingAttributes(scope constructs.Construct, id *string, attrs *ApiMappingAttributes) IApiMapping

import from API ID. Deprecated.

type IAuthorizer

type IAuthorizer interface {
	awscdk.IResource
	// Id of the Authorizer.
	// Deprecated.
	AuthorizerId() *string
}

Represents an Authorizer. Deprecated.

type IDomainName

type IDomainName interface {
	awscdk.IResource
	// The custom domain name.
	// Deprecated.
	Name() *string
	// The domain name associated with the regional endpoint for this custom domain name.
	// Deprecated.
	RegionalDomainName() *string
	// The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
	// Deprecated.
	RegionalHostedZoneId() *string
}

Represents an APIGatewayV2 DomainName. See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html

Deprecated.

func DomainName_FromDomainNameAttributes

func DomainName_FromDomainNameAttributes(scope constructs.Construct, id *string, attrs *DomainNameAttributes) IDomainName

Import from attributes. Deprecated.

type IHttpApi

type IHttpApi interface {
	IApi
	// Add a new VpcLink.
	// Deprecated.
	AddVpcLink(options *VpcLinkProps) VpcLink
	// Metric for the number of client-side errors captured in a given period.
	// Default: - sum over 5 minutes.
	//
	// Deprecated.
	MetricClientError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the total number API requests in a given period.
	// Default: - SampleCount over 5 minutes.
	//
	// Deprecated.
	MetricCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the amount of data processed in bytes.
	// Default: - sum over 5 minutes.
	//
	// Deprecated.
	MetricDataProcessed(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: - no statistic.
	//
	// Deprecated.
	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: - no statistic.
	//
	// Deprecated.
	MetricLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of server-side errors captured in a given period.
	// Default: - sum over 5 minutes.
	//
	// Deprecated.
	MetricServerError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Default OIDC scopes attached to all routes in the gateway, unless explicitly configured on the route.
	//
	// The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation.
	// Default: - no default authorization scopes.
	//
	// Deprecated.
	DefaultAuthorizationScopes() *[]*string
	// Default Authorizer applied to all routes in the gateway.
	// Default: - no default authorizer.
	//
	// Deprecated.
	DefaultAuthorizer() IHttpRouteAuthorizer
	// The identifier of this API Gateway HTTP API.
	// Deprecated: - use apiId instead.
	HttpApiId() *string
}

Represents an HTTP API. Deprecated.

func HttpApi_FromHttpApiAttributes

func HttpApi_FromHttpApiAttributes(scope constructs.Construct, id *string, attrs *HttpApiAttributes) IHttpApi

Import an existing HTTP API into this CDK app. Deprecated.

type IHttpAuthorizer

type IHttpAuthorizer interface {
	IAuthorizer
}

An authorizer for HTTP APIs. Deprecated.

type IHttpIntegration

type IHttpIntegration interface {
	IIntegration
	// The HTTP API associated with this integration.
	// Deprecated.
	HttpApi() IHttpApi
}

Represents an Integration for an HTTP API. Deprecated.

type IHttpRoute

type IHttpRoute interface {
	IRoute
	// Grant access to invoke the route.
	//
	// This method requires that the authorizer of the route is undefined or is
	// an `HttpIamAuthorizer`.
	// Deprecated.
	GrantInvoke(grantee awsiam.IGrantable, options *GrantInvokeOptions) awsiam.Grant
	// The HTTP API associated with this route.
	// Deprecated.
	HttpApi() IHttpApi
	// Returns the path component of this HTTP route, `undefined` if the path is the catch-all route.
	// Deprecated.
	Path() *string
	// Returns the arn of the route.
	// Deprecated.
	RouteArn() *string
}

Represents a Route for an HTTP API. Deprecated.

type IHttpRouteAuthorizer

type IHttpRouteAuthorizer interface {
	// Bind this authorizer to a specified Http route.
	// Deprecated.
	Bind(options *HttpRouteAuthorizerBindOptions) *HttpRouteAuthorizerConfig
}

An authorizer that can attach to an Http Route. Deprecated.

func HttpAuthorizer_FromHttpAuthorizerAttributes

func HttpAuthorizer_FromHttpAuthorizerAttributes(scope constructs.Construct, id *string, attrs *HttpAuthorizerAttributes) IHttpRouteAuthorizer

Import an existing HTTP Authorizer into this CDK app. Deprecated.

type IHttpStage

type IHttpStage interface {
	IStage
	// Metric for the number of client-side errors captured in a given period.
	// Default: - sum over 5 minutes.
	//
	// Deprecated.
	MetricClientError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the total number API requests in a given period.
	// Default: - SampleCount over 5 minutes.
	//
	// Deprecated.
	MetricCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the amount of data processed in bytes.
	// Default: - sum over 5 minutes.
	//
	// Deprecated.
	MetricDataProcessed(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: - no statistic.
	//
	// Deprecated.
	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: - no statistic.
	//
	// Deprecated.
	MetricLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of server-side errors captured in a given period.
	// Default: - sum over 5 minutes.
	//
	// Deprecated.
	MetricServerError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The API this stage is associated to.
	// Deprecated.
	Api() IHttpApi
	// The custom domain URL to this stage.
	// Deprecated.
	DomainUrl() *string
}

Represents the HttpStage. Deprecated.

func HttpStage_FromHttpStageAttributes

func HttpStage_FromHttpStageAttributes(scope constructs.Construct, id *string, attrs *HttpStageAttributes) IHttpStage

Import an existing stage into this CDK app. Deprecated.

type IIntegration

type IIntegration interface {
	awscdk.IResource
	// Id of the integration.
	// Deprecated.
	IntegrationId() *string
}

Represents an integration to an API Route. Deprecated.

type IMappingValue

type IMappingValue interface {
	// Represents a Mapping Value.
	// Deprecated.
	Value() *string
}

Represents a Mapping Value. Deprecated.

type IRoute

type IRoute interface {
	awscdk.IResource
	// Id of the Route.
	// Deprecated.
	RouteId() *string
}

Represents a route. Deprecated.

type IStage

type IStage interface {
	awscdk.IResource
	// Return the given named metric for this HTTP Api Gateway Stage.
	// Default: - average over 5 minutes.
	//
	// Deprecated.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The name of the stage;
	//
	// its primary identifier.
	// Deprecated.
	StageName() *string
	// The URL to this stage.
	// Deprecated.
	Url() *string
}

Represents a Stage. Deprecated.

type IVpcLink interface {
	awscdk.IResource
	// The VPC to which this VPC Link is associated with.
	// Deprecated.
	Vpc() awsec2.IVpc
	// Physical ID of the VpcLink resource.
	// Deprecated.
	VpcLinkId() *string
}

Represents an API Gateway VpcLink. Deprecated.

func VpcLink_FromVpcLinkAttributes(scope constructs.Construct, id *string, attrs *VpcLinkAttributes) IVpcLink

Import a VPC Link by specifying its attributes. Deprecated.

type IWebSocketApi

type IWebSocketApi interface {
	IApi
}

Represents a WebSocket API. Deprecated.

func WebSocketApi_FromWebSocketApiAttributes

func WebSocketApi_FromWebSocketApiAttributes(scope constructs.Construct, id *string, attrs *WebSocketApiAttributes) IWebSocketApi

Import an existing WebSocket API into this CDK app. Deprecated.

type IWebSocketAuthorizer

type IWebSocketAuthorizer interface {
	IAuthorizer
}

An authorizer for WebSocket APIs. Deprecated.

type IWebSocketIntegration

type IWebSocketIntegration interface {
	IIntegration
	// The WebSocket API associated with this integration.
	// Deprecated.
	WebSocketApi() IWebSocketApi
}

Represents an Integration for an WebSocket API. Deprecated.

type IWebSocketRoute

type IWebSocketRoute interface {
	IRoute
	// The key to this route.
	// Deprecated.
	RouteKey() *string
	// The WebSocket API associated with this route.
	// Deprecated.
	WebSocketApi() IWebSocketApi
}

Represents a Route for an WebSocket API. Deprecated.

type IWebSocketRouteAuthorizer

type IWebSocketRouteAuthorizer interface {
	// Bind this authorizer to a specified WebSocket route.
	// Deprecated.
	Bind(options *WebSocketRouteAuthorizerBindOptions) *WebSocketRouteAuthorizerConfig
}

An authorizer that can attach to an WebSocket Route. Deprecated.

func WebSocketAuthorizer_FromWebSocketAuthorizerAttributes

func WebSocketAuthorizer_FromWebSocketAuthorizerAttributes(scope constructs.Construct, id *string, attrs *WebSocketAuthorizerAttributes) IWebSocketRouteAuthorizer

Import an existing WebSocket Authorizer into this CDK app. Deprecated.

type IWebSocketStage

type IWebSocketStage interface {
	IStage
	// The API this stage is associated to.
	// Deprecated.
	Api() IWebSocketApi
	// The callback URL to this stage.
	//
	// You can use the callback URL to send messages to the client from the backend system.
	// https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html
	// https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-how-to-call-websocket-api-connections.html
	// Deprecated.
	CallbackUrl() *string
}

Represents the WebSocketStage. Deprecated.

func WebSocketStage_FromWebSocketStageAttributes

func WebSocketStage_FromWebSocketStageAttributes(scope constructs.Construct, id *string, attrs *WebSocketStageAttributes) IWebSocketStage

Import an existing stage into this CDK app. Deprecated.

type IntegrationCredentials

type IntegrationCredentials interface {
	// The ARN of the credentials.
	// Deprecated.
	CredentialsArn() *string
}

Credentials used for AWS Service integrations.

Example:

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

var role role

integrationCredentials := apigatewayv2_alpha.IntegrationCredentials_FromRole(role)

Deprecated.

func IntegrationCredentials_FromRole

func IntegrationCredentials_FromRole(role awsiam.IRole) IntegrationCredentials

Use the specified role for integration requests. Deprecated.

func IntegrationCredentials_UseCallerIdentity

func IntegrationCredentials_UseCallerIdentity() IntegrationCredentials

Use the calling user's identity to call the integration. Deprecated.

type MTLSConfig

type MTLSConfig struct {
	// The bucket that the trust store is hosted in.
	// Deprecated.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// The key in S3 to look at for the trust store.
	// Deprecated.
	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.
	// Default: - latest version.
	//
	// Deprecated.
	Version *string `field:"optional" json:"version" yaml:"version"`
}

The mTLS authentication configuration for a custom domain name.

Example:

import s3 "github.com/aws/aws-cdk-go/awscdk"
import acm "github.com/aws/aws-cdk-go/awscdk"
var bucket bucket

certArn := "arn:aws:acm:us-east-1:111111111111:certificate"
domainName := "example.com"

apigwv2.NewDomainName(this, jsii.String("DomainName"), &DomainNameProps{
	DomainName: jsii.String(DomainName),
	Certificate: acm.Certificate_FromCertificateArn(this, jsii.String("cert"), certArn),
	Mtls: &MTLSConfig{
		Bucket: *Bucket,
		Key: jsii.String("someca.pem"),
		Version: jsii.String("version"),
	},
})

Deprecated.

type MappingValue

type MappingValue interface {
	IMappingValue
	// Represents a Mapping Value.
	// Deprecated.
	Value() *string
}

Represents a Mapping Value.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var lb applicationLoadBalancer

listener := lb.AddListener(jsii.String("listener"), &BaseApplicationListenerProps{
	Port: jsii.Number(80),
})
listener.AddTargets(jsii.String("target"), &AddApplicationTargetsProps{
	Port: jsii.Number(80),
})

httpEndpoint := apigwv2.NewHttpApi(this, jsii.String("HttpProxyPrivateApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpAlbIntegration(jsii.String("DefaultIntegration"), listener, &HttpAlbIntegrationProps{
		ParameterMapping: apigwv2.NewParameterMapping().AppendHeader(jsii.String("header2"), apigwv2.MappingValue_RequestHeader(jsii.String("header1"))).RemoveHeader(jsii.String("header1")),
	}),
})

Deprecated.

func MappingValue_ContextVariable

func MappingValue_ContextVariable(variableName *string) MappingValue

Creates a context variable mapping value. Deprecated.

func MappingValue_Custom

func MappingValue_Custom(value *string) MappingValue

Creates a custom mapping value. Deprecated.

func MappingValue_NONE

func MappingValue_NONE() MappingValue

func MappingValue_RequestBody

func MappingValue_RequestBody(name *string) MappingValue

Creates a request body mapping value. Deprecated.

func MappingValue_RequestHeader

func MappingValue_RequestHeader(name *string) MappingValue

Creates a header mapping value. Deprecated.

func MappingValue_RequestPath

func MappingValue_RequestPath() MappingValue

Creates a request path mapping value. Deprecated.

func MappingValue_RequestPathParam

func MappingValue_RequestPathParam(name *string) MappingValue

Creates a request path parameter mapping value. Deprecated.

func MappingValue_RequestQueryString

func MappingValue_RequestQueryString(name *string) MappingValue

Creates a query string mapping value. Deprecated.

func MappingValue_StageVariable

func MappingValue_StageVariable(variableName *string) MappingValue

Creates a stage variable mapping value. Deprecated.

func NewMappingValue

func NewMappingValue(value *string) MappingValue

Deprecated.

type ParameterMapping

type ParameterMapping interface {
	// Represents all created parameter mappings.
	// Deprecated.
	Mappings() *map[string]*string
	// Creates a mapping to append a header.
	// Deprecated.
	AppendHeader(name *string, value MappingValue) ParameterMapping
	// Creates a mapping to append a query string.
	// Deprecated.
	AppendQueryString(name *string, value MappingValue) ParameterMapping
	// Creates a custom mapping.
	// Deprecated.
	Custom(key *string, value *string) ParameterMapping
	// Creates a mapping to overwrite a header.
	// Deprecated.
	OverwriteHeader(name *string, value MappingValue) ParameterMapping
	// Creates a mapping to overwrite a path.
	// Deprecated.
	OverwritePath(value MappingValue) ParameterMapping
	// Creates a mapping to overwrite a querystring.
	// Deprecated.
	OverwriteQueryString(name *string, value MappingValue) ParameterMapping
	// Creates a mapping to remove a header.
	// Deprecated.
	RemoveHeader(name *string) ParameterMapping
	// Creates a mapping to remove a querystring.
	// Deprecated.
	RemoveQueryString(name *string) ParameterMapping
}

Represents a Parameter Mapping.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var lb applicationLoadBalancer

listener := lb.AddListener(jsii.String("listener"), &BaseApplicationListenerProps{
	Port: jsii.Number(80),
})
listener.AddTargets(jsii.String("target"), &AddApplicationTargetsProps{
	Port: jsii.Number(80),
})

httpEndpoint := apigwv2.NewHttpApi(this, jsii.String("HttpProxyPrivateApi"), &HttpApiProps{
	DefaultIntegration: awscdkapigatewayv2integrationsalpha.NewHttpAlbIntegration(jsii.String("DefaultIntegration"), listener, &HttpAlbIntegrationProps{
		ParameterMapping: apigwv2.NewParameterMapping().AppendHeader(jsii.String("header2"), apigwv2.MappingValue_RequestHeader(jsii.String("header1"))).RemoveHeader(jsii.String("header1")),
	}),
})

Deprecated.

func NewParameterMapping

func NewParameterMapping() ParameterMapping

Deprecated.

func ParameterMapping_FromObject

func ParameterMapping_FromObject(obj *map[string]MappingValue) ParameterMapping

Creates a mapping from an object. Deprecated.

type PayloadFormatVersion

type PayloadFormatVersion interface {
	// version as a string.
	// Deprecated.
	Version() *string
}

Payload format version for lambda proxy integration.

Example:

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

payloadFormatVersion := apigatewayv2_alpha.PayloadFormatVersion_Custom(jsii.String("version"))

See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html

Deprecated.

func PayloadFormatVersion_Custom

func PayloadFormatVersion_Custom(version *string) PayloadFormatVersion

A custom payload version.

Typically used if there is a version number that the CDK doesn't support yet. Deprecated.

func PayloadFormatVersion_VERSION_1_0

func PayloadFormatVersion_VERSION_1_0() PayloadFormatVersion

func PayloadFormatVersion_VERSION_2_0

func PayloadFormatVersion_VERSION_2_0() PayloadFormatVersion

type SecurityPolicy

type SecurityPolicy string

The minimum version of the SSL protocol that you want API Gateway to use for HTTPS connections. Deprecated.

const (
	// Cipher suite TLS 1.0.
	// Deprecated.
	SecurityPolicy_TLS_1_0 SecurityPolicy = "TLS_1_0"
	// Cipher suite TLS 1.2.
	// Deprecated.
	SecurityPolicy_TLS_1_2 SecurityPolicy = "TLS_1_2"
)

type StageAttributes

type StageAttributes struct {
	// The name of the stage.
	// Deprecated.
	StageName *string `field:"required" json:"stageName" yaml:"stageName"`
}

The attributes used to import existing Stage.

Example:

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

stageAttributes := &StageAttributes{
	StageName: jsii.String("stageName"),
}

Deprecated.

type StageOptions

type StageOptions struct {
	// Whether updates to an API automatically trigger a new deployment.
	// Default: false.
	//
	// Deprecated.
	AutoDeploy *bool `field:"optional" json:"autoDeploy" yaml:"autoDeploy"`
	// The options for custom domain and api mapping.
	// Default: - no custom domain and api mapping configuration.
	//
	// Deprecated.
	DomainMapping *DomainMappingOptions `field:"optional" json:"domainMapping" yaml:"domainMapping"`
	// Throttle settings for the routes of this stage.
	// Default: - no throttling configuration.
	//
	// Deprecated.
	Throttle *ThrottleSettings `field:"optional" json:"throttle" yaml:"throttle"`
}

Options required to create a new stage.

Options that are common between HTTP and Websocket APIs.

Example:

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

var domainName domainName

stageOptions := &StageOptions{
	AutoDeploy: jsii.Boolean(false),
	DomainMapping: &DomainMappingOptions{
		DomainName: domainName,

		// the properties below are optional
		MappingKey: jsii.String("mappingKey"),
	},
	Throttle: &ThrottleSettings{
		BurstLimit: jsii.Number(123),
		RateLimit: jsii.Number(123),
	},
}

Deprecated.

type ThrottleSettings

type ThrottleSettings struct {
	// The maximum API request rate limit over a time ranging from one to a few seconds.
	// Default: none.
	//
	// Deprecated.
	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).
	// Default: none.
	//
	// Deprecated.
	RateLimit *float64 `field:"optional" json:"rateLimit" yaml:"rateLimit"`
}

Container for defining throttling parameters to API stages.

Example:

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

throttleSettings := &ThrottleSettings{
	BurstLimit: jsii.Number(123),
	RateLimit: jsii.Number(123),
}

Deprecated.

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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	Stack() awscdk.Stack
	// The VPC to which this VPC Link is associated with.
	// Deprecated.
	Vpc() awsec2.IVpc
	// Physical ID of the VpcLink resource.
	// Deprecated.
	VpcLinkId() *string
	// Adds the provided security groups to the vpc link.
	// Deprecated.
	AddSecurityGroups(groups ...awsec2.ISecurityGroup)
	// Adds the provided subnets to the vpc link.
	// Deprecated.
	AddSubnets(subnets ...awsec2.ISubnet)
	// 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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

Define a new VPC Link Specifies an API Gateway VPC link for a HTTP API to access resources in an Amazon Virtual Private Cloud (VPC).

Example:

import ec2 "github.com/aws/aws-cdk-go/awscdk"
import elb "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

vpc := ec2.NewVpc(this, jsii.String("VPC"))
alb := elb.NewApplicationLoadBalancer(this, jsii.String("AppLoadBalancer"), &ApplicationLoadBalancerProps{
	Vpc: Vpc,
})

vpcLink := apigwv2.NewVpcLink(this, jsii.String("VpcLink"), &VpcLinkProps{
	Vpc: Vpc,
})

// Creating an HTTP ALB Integration:
albIntegration := awscdkapigatewayv2integrationsalpha.NewHttpAlbIntegration(jsii.String("ALBIntegration"), alb.Listeners[jsii.Number(0)], &HttpAlbIntegrationProps{
})

Deprecated.

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

Deprecated.

type VpcLinkAttributes

type VpcLinkAttributes struct {
	// The VPC to which this VPC link is associated with.
	// Deprecated.
	Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"`
	// The VPC Link id.
	// Deprecated.
	VpcLinkId *string `field:"required" json:"vpcLinkId" yaml:"vpcLinkId"`
}

Attributes when importing a new VpcLink.

Example:

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

var vpc vpc

awesomeLink := apigwv2.VpcLink_FromVpcLinkAttributes(this, jsii.String("awesome-vpc-link"), &VpcLinkAttributes{
	VpcLinkId: jsii.String("us-east-1_oiuR12Abd"),
	Vpc: Vpc,
})

Deprecated.

type VpcLinkProps

type VpcLinkProps struct {
	// The VPC in which the private resources reside.
	// Deprecated.
	Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"`
	// A list of security groups for the VPC link.
	// Default: - no security groups. Use `addSecurityGroups` to add security groups
	//
	// Deprecated.
	SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"`
	// A list of subnets for the VPC link.
	// Default: - private subnets of the provided VPC. Use `addSubnets` to add more subnets
	//
	// Deprecated.
	Subnets *awsec2.SubnetSelection `field:"optional" json:"subnets" yaml:"subnets"`
	// The name used to label and identify the VPC link.
	// Default: - automatically generated name.
	//
	// Deprecated.
	VpcLinkName *string `field:"optional" json:"vpcLinkName" yaml:"vpcLinkName"`
}

Properties for a VpcLink.

Example:

import ec2 "github.com/aws/aws-cdk-go/awscdk"
import elb "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

vpc := ec2.NewVpc(this, jsii.String("VPC"))
alb := elb.NewApplicationLoadBalancer(this, jsii.String("AppLoadBalancer"), &ApplicationLoadBalancerProps{
	Vpc: Vpc,
})

vpcLink := apigwv2.NewVpcLink(this, jsii.String("VpcLink"), &VpcLinkProps{
	Vpc: Vpc,
})

// Creating an HTTP ALB Integration:
albIntegration := awscdkapigatewayv2integrationsalpha.NewHttpAlbIntegration(jsii.String("ALBIntegration"), alb.Listeners[jsii.Number(0)], &HttpAlbIntegrationProps{
})

Deprecated.

type WebSocketApi

type WebSocketApi interface {
	awscdk.Resource
	IApi
	IWebSocketApi
	// The default endpoint for an API.
	// Deprecated.
	ApiEndpoint() *string
	// The identifier of this API Gateway API.
	// Deprecated.
	ApiId() *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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	Stack() awscdk.Stack
	// A human friendly name for this WebSocket API.
	//
	// Note that this is different from `webSocketApiId`.
	// Deprecated.
	WebSocketApiName() *string
	// Add a new route.
	// Deprecated.
	AddRoute(routeKey *string, options *WebSocketRouteOptions) WebSocketRoute
	// 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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grant access to the API Gateway management API for this WebSocket API to an IAM principal (Role/Group/User).
	// Deprecated.
	GrantManageConnections(identity awsiam.IGrantable) awsiam.Grant
	// Return the given named metric for this Api Gateway.
	// Deprecated.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

Create a new API Gateway WebSocket API endpoint.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var messageHandler function

webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"))
apigwv2.NewWebSocketStage(this, jsii.String("mystage"), &WebSocketStageProps{
	WebSocketApi: WebSocketApi,
	StageName: jsii.String("dev"),
	AutoDeploy: jsii.Boolean(true),
})
webSocketApi.AddRoute(jsii.String("sendMessage"), &WebSocketRouteOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("SendMessageIntegration"), messageHandler),
})

Deprecated.

func NewWebSocketApi

func NewWebSocketApi(scope constructs.Construct, id *string, props *WebSocketApiProps) WebSocketApi

Deprecated.

type WebSocketApiAttributes

type WebSocketApiAttributes struct {
	// The identifier of the WebSocketApi.
	// Deprecated.
	WebSocketId *string `field:"required" json:"webSocketId" yaml:"webSocketId"`
	// The endpoint URL of the WebSocketApi.
	// Default: - throw san error if apiEndpoint is accessed.
	//
	// Deprecated.
	ApiEndpoint *string `field:"optional" json:"apiEndpoint" yaml:"apiEndpoint"`
}

Attributes for importing a WebSocketApi into the CDK.

Example:

webSocketApi := apigwv2.WebSocketApi_FromWebSocketApiAttributes(this, jsii.String("mywsapi"), &WebSocketApiAttributes{
	WebSocketId: jsii.String("api-1234"),
})

Deprecated.

type WebSocketApiKeySelectionExpression

type WebSocketApiKeySelectionExpression interface {
	// The expression used by API Gateway.
	// Deprecated.
	CustomApiKeySelector() *string
}

Represents the currently available API Key Selection Expressions.

Example:

webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"), &WebSocketApiProps{
	ApiKeySelectionExpression: apigwv2.WebSocketApiKeySelectionExpression_HEADER_X_API_KEY(),
})

Deprecated.

func NewWebSocketApiKeySelectionExpression

func NewWebSocketApiKeySelectionExpression(customApiKeySelector *string) WebSocketApiKeySelectionExpression

Deprecated.

func WebSocketApiKeySelectionExpression_AUTHORIZER_USAGE_IDENTIFIER_KEY

func WebSocketApiKeySelectionExpression_AUTHORIZER_USAGE_IDENTIFIER_KEY() WebSocketApiKeySelectionExpression

func WebSocketApiKeySelectionExpression_HEADER_X_API_KEY

func WebSocketApiKeySelectionExpression_HEADER_X_API_KEY() WebSocketApiKeySelectionExpression

type WebSocketApiProps

type WebSocketApiProps struct {
	// An API key selection expression.
	//
	// Providing this option will require an API Key be provided to access the API.
	// Default: - Key is not required to access these APIs.
	//
	// Deprecated.
	ApiKeySelectionExpression WebSocketApiKeySelectionExpression `field:"optional" json:"apiKeySelectionExpression" yaml:"apiKeySelectionExpression"`
	// Name for the WebSocket API resource.
	// Default: - id of the WebSocketApi construct.
	//
	// Deprecated.
	ApiName *string `field:"optional" json:"apiName" yaml:"apiName"`
	// Options to configure a '$connect' route.
	// Default: - no '$connect' route configured.
	//
	// Deprecated.
	ConnectRouteOptions *WebSocketRouteOptions `field:"optional" json:"connectRouteOptions" yaml:"connectRouteOptions"`
	// Options to configure a '$default' route.
	// Default: - no '$default' route configured.
	//
	// Deprecated.
	DefaultRouteOptions *WebSocketRouteOptions `field:"optional" json:"defaultRouteOptions" yaml:"defaultRouteOptions"`
	// The description of the API.
	// Default: - none.
	//
	// Deprecated.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Options to configure a '$disconnect' route.
	// Default: - no '$disconnect' route configured.
	//
	// Deprecated.
	DisconnectRouteOptions *WebSocketRouteOptions `field:"optional" json:"disconnectRouteOptions" yaml:"disconnectRouteOptions"`
	// The route selection expression for the API.
	// Default: '$request.body.action'
	//
	// Deprecated.
	RouteSelectionExpression *string `field:"optional" json:"routeSelectionExpression" yaml:"routeSelectionExpression"`
}

Props for WebSocket API.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2authorizersalpha"
import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

// This function handles your auth logic
var authHandler function

// This function handles your WebSocket requests
var handler function

authorizer := awscdkapigatewayv2authorizersalpha.NewWebSocketLambdaAuthorizer(jsii.String("Authorizer"), authHandler)

integration := awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("Integration"), handler)

apigwv2.NewWebSocketApi(this, jsii.String("WebSocketApi"), &WebSocketApiProps{
	ConnectRouteOptions: &WebSocketRouteOptions{
		Integration: *Integration,
		Authorizer: *Authorizer,
	},
})

Deprecated.

type WebSocketAuthorizer

type WebSocketAuthorizer interface {
	awscdk.Resource
	IWebSocketAuthorizer
	// Id of the Authorizer.
	// Deprecated.
	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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

An authorizer for WebSocket 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/awscdkapigatewayv2alpha"

var webSocketApi webSocketApi

webSocketAuthorizer := apigatewayv2_alpha.NewWebSocketAuthorizer(this, jsii.String("MyWebSocketAuthorizer"), &WebSocketAuthorizerProps{
	IdentitySource: []*string{
		jsii.String("identitySource"),
	},
	Type: apigatewayv2_alpha.WebSocketAuthorizerType_LAMBDA,
	WebSocketApi: webSocketApi,

	// the properties below are optional
	AuthorizerName: jsii.String("authorizerName"),
	AuthorizerUri: jsii.String("authorizerUri"),
})

Deprecated.

func NewWebSocketAuthorizer

func NewWebSocketAuthorizer(scope constructs.Construct, id *string, props *WebSocketAuthorizerProps) WebSocketAuthorizer

Deprecated.

type WebSocketAuthorizerAttributes

type WebSocketAuthorizerAttributes struct {
	// Id of the Authorizer.
	// Deprecated.
	AuthorizerId *string `field:"required" json:"authorizerId" yaml:"authorizerId"`
	// Type of authorizer.
	//
	// Possible values are:
	// - CUSTOM - Lambda Authorizer
	// - NONE - No Authorization.
	// Deprecated.
	AuthorizerType *string `field:"required" json:"authorizerType" yaml:"authorizerType"`
}

Reference to an WebSocket authorizer.

Example:

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

webSocketAuthorizerAttributes := &WebSocketAuthorizerAttributes{
	AuthorizerId: jsii.String("authorizerId"),
	AuthorizerType: jsii.String("authorizerType"),
}

Deprecated.

type WebSocketAuthorizerProps

type WebSocketAuthorizerProps struct {
	// The identity source for which authorization is requested.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource
	//
	// Deprecated.
	IdentitySource *[]*string `field:"required" json:"identitySource" yaml:"identitySource"`
	// The type of authorizer.
	// Deprecated.
	Type WebSocketAuthorizerType `field:"required" json:"type" yaml:"type"`
	// WebSocket Api to attach the authorizer to.
	// Deprecated.
	WebSocketApi IWebSocketApi `field:"required" json:"webSocketApi" yaml:"webSocketApi"`
	// Name of the authorizer.
	// Default: - id of the WebSocketAuthorizer construct.
	//
	// Deprecated.
	AuthorizerName *string `field:"optional" json:"authorizerName" yaml:"authorizerName"`
	// The authorizer's Uniform Resource Identifier (URI).
	//
	// For REQUEST authorizers, this must be a well-formed Lambda function URI.
	// Default: - required for Request authorizer types.
	//
	// Deprecated.
	AuthorizerUri *string `field:"optional" json:"authorizerUri" yaml:"authorizerUri"`
}

Properties to initialize an instance of `WebSocketAuthorizer`.

Example:

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

var webSocketApi webSocketApi

webSocketAuthorizerProps := &WebSocketAuthorizerProps{
	IdentitySource: []*string{
		jsii.String("identitySource"),
	},
	Type: apigatewayv2_alpha.WebSocketAuthorizerType_LAMBDA,
	WebSocketApi: webSocketApi,

	// the properties below are optional
	AuthorizerName: jsii.String("authorizerName"),
	AuthorizerUri: jsii.String("authorizerUri"),
}

Deprecated.

type WebSocketAuthorizerType

type WebSocketAuthorizerType string

Supported Authorizer types. Deprecated.

const (
	// Lambda Authorizer.
	// Deprecated.
	WebSocketAuthorizerType_LAMBDA WebSocketAuthorizerType = "LAMBDA"
	// IAM Authorizer.
	// Deprecated.
	WebSocketAuthorizerType_IAM WebSocketAuthorizerType = "IAM"
)

type WebSocketIntegration

type WebSocketIntegration interface {
	awscdk.Resource
	IWebSocketIntegration
	// 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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// Id of the integration.
	// Deprecated.
	IntegrationId() *string
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	Stack() awscdk.Stack
	// The WebSocket API associated with this integration.
	// Deprecated.
	WebSocketApi() IWebSocketApi
	// 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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

The integration for an API 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/awscdkapigatewayv2alpha"

var webSocketApi webSocketApi

webSocketIntegration := apigatewayv2_alpha.NewWebSocketIntegration(this, jsii.String("MyWebSocketIntegration"), &WebSocketIntegrationProps{
	IntegrationType: apigatewayv2_alpha.WebSocketIntegrationType_AWS_PROXY,
	IntegrationUri: jsii.String("integrationUri"),
	WebSocketApi: webSocketApi,
})

Deprecated.

func NewWebSocketIntegration

func NewWebSocketIntegration(scope constructs.Construct, id *string, props *WebSocketIntegrationProps) WebSocketIntegration

Deprecated.

type WebSocketIntegrationProps

type WebSocketIntegrationProps struct {
	// Integration type.
	// Deprecated.
	IntegrationType WebSocketIntegrationType `field:"required" json:"integrationType" yaml:"integrationType"`
	// Integration URI.
	// Deprecated.
	IntegrationUri *string `field:"required" json:"integrationUri" yaml:"integrationUri"`
	// The WebSocket API to which this integration should be bound.
	// Deprecated.
	WebSocketApi IWebSocketApi `field:"required" json:"webSocketApi" yaml:"webSocketApi"`
}

The integration properties.

Example:

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

var webSocketApi webSocketApi

webSocketIntegrationProps := &WebSocketIntegrationProps{
	IntegrationType: apigatewayv2_alpha.WebSocketIntegrationType_AWS_PROXY,
	IntegrationUri: jsii.String("integrationUri"),
	WebSocketApi: webSocketApi,
}

Deprecated.

type WebSocketIntegrationType

type WebSocketIntegrationType string

WebSocket Integration Types. Deprecated.

const (
	// AWS Proxy Integration Type.
	// Deprecated.
	WebSocketIntegrationType_AWS_PROXY WebSocketIntegrationType = "AWS_PROXY"
	// Mock Integration Type.
	// Deprecated.
	WebSocketIntegrationType_MOCK WebSocketIntegrationType = "MOCK"
)

type WebSocketNoneAuthorizer

type WebSocketNoneAuthorizer interface {
	IWebSocketRouteAuthorizer
	// Bind this authorizer to a specified WebSocket route.
	// Deprecated.
	Bind(_options *WebSocketRouteAuthorizerBindOptions) *WebSocketRouteAuthorizerConfig
}

Explicitly configure no authorizers on specific WebSocket API routes.

Example:

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

webSocketNoneAuthorizer := apigatewayv2_alpha.NewWebSocketNoneAuthorizer()

Deprecated.

func NewWebSocketNoneAuthorizer

func NewWebSocketNoneAuthorizer() WebSocketNoneAuthorizer

Deprecated.

type WebSocketRoute

type WebSocketRoute interface {
	awscdk.Resource
	IWebSocketRoute
	// 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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// Integration response ID.
	// Deprecated.
	IntegrationResponseId() *string
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// Id of the Route.
	// Deprecated.
	RouteId() *string
	// The key to this route.
	// Deprecated.
	RouteKey() *string
	// The stack in which this resource is defined.
	// Deprecated.
	Stack() awscdk.Stack
	// The WebSocket API associated with this route.
	// Deprecated.
	WebSocketApi() IWebSocketApi
	// 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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

Route class that creates the Route for API Gateway WebSocket API.

Example:

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

var webSocketApi webSocketApi
var webSocketRouteAuthorizer iWebSocketRouteAuthorizer
var webSocketRouteIntegration webSocketRouteIntegration

webSocketRoute := apigatewayv2_alpha.NewWebSocketRoute(this, jsii.String("MyWebSocketRoute"), &WebSocketRouteProps{
	Integration: webSocketRouteIntegration,
	RouteKey: jsii.String("routeKey"),
	WebSocketApi: webSocketApi,

	// the properties below are optional
	ApiKeyRequired: jsii.Boolean(false),
	Authorizer: webSocketRouteAuthorizer,
	ReturnResponse: jsii.Boolean(false),
})

Deprecated.

func NewWebSocketRoute

func NewWebSocketRoute(scope constructs.Construct, id *string, props *WebSocketRouteProps) WebSocketRoute

Deprecated.

type WebSocketRouteAuthorizerBindOptions

type WebSocketRouteAuthorizerBindOptions struct {
	// The route to which the authorizer is being bound.
	// Deprecated.
	Route IWebSocketRoute `field:"required" json:"route" yaml:"route"`
	// The scope for any constructs created as part of the bind.
	// Deprecated.
	Scope constructs.Construct `field:"required" json:"scope" yaml:"scope"`
}

Input to the bind() operation, that binds an authorizer to a route.

Example:

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

var construct construct
var webSocketRoute webSocketRoute

webSocketRouteAuthorizerBindOptions := &WebSocketRouteAuthorizerBindOptions{
	Route: webSocketRoute,
	Scope: construct,
}

Deprecated.

type WebSocketRouteAuthorizerConfig

type WebSocketRouteAuthorizerConfig struct {
	// The type of authorization.
	//
	// Possible values are:
	// - CUSTOM - Lambda Authorizer
	// - NONE - No Authorization.
	// Deprecated.
	AuthorizationType *string `field:"required" json:"authorizationType" yaml:"authorizationType"`
	// The authorizer id.
	// Default: - No authorizer id (useful for AWS_IAM route authorizer).
	//
	// Deprecated.
	AuthorizerId *string `field:"optional" json:"authorizerId" yaml:"authorizerId"`
}

Results of binding an authorizer to an WebSocket route.

Example:

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

webSocketRouteAuthorizerConfig := &WebSocketRouteAuthorizerConfig{
	AuthorizationType: jsii.String("authorizationType"),

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

Deprecated.

type WebSocketRouteIntegration

type WebSocketRouteIntegration interface {
	// Bind this integration to the route.
	// Deprecated.
	Bind(options *WebSocketRouteIntegrationBindOptions) *WebSocketRouteIntegrationConfig
}

The interface that various route integration classes will inherit.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var messageHandler function

webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"))
apigwv2.NewWebSocketStage(this, jsii.String("mystage"), &WebSocketStageProps{
	WebSocketApi: WebSocketApi,
	StageName: jsii.String("dev"),
	AutoDeploy: jsii.Boolean(true),
})
webSocketApi.AddRoute(jsii.String("sendMessage"), &WebSocketRouteOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("SendMessageIntegration"), messageHandler),
})

Deprecated.

type WebSocketRouteIntegrationBindOptions

type WebSocketRouteIntegrationBindOptions struct {
	// The route to which this is being bound.
	// Deprecated.
	Route IWebSocketRoute `field:"required" json:"route" yaml:"route"`
	// The current scope in which the bind is occurring.
	//
	// If the `WebSocketRouteIntegration` being bound creates additional constructs,
	// this will be used as their parent scope.
	// Deprecated.
	Scope constructs.Construct `field:"required" json:"scope" yaml:"scope"`
}

Options to the WebSocketRouteIntegration during its bind operation.

Example:

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

var construct construct
var webSocketRoute webSocketRoute

webSocketRouteIntegrationBindOptions := &WebSocketRouteIntegrationBindOptions{
	Route: webSocketRoute,
	Scope: construct,
}

Deprecated.

type WebSocketRouteIntegrationConfig

type WebSocketRouteIntegrationConfig struct {
	// Integration type.
	// Deprecated.
	Type WebSocketIntegrationType `field:"required" json:"type" yaml:"type"`
	// Integration URI.
	// Deprecated.
	Uri *string `field:"required" json:"uri" yaml:"uri"`
}

Config returned back as a result of the bind.

Example:

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

webSocketRouteIntegrationConfig := &WebSocketRouteIntegrationConfig{
	Type: apigatewayv2_alpha.WebSocketIntegrationType_AWS_PROXY,
	Uri: jsii.String("uri"),
}

Deprecated.

type WebSocketRouteOptions

type WebSocketRouteOptions struct {
	// The integration to be configured on this route.
	// Deprecated.
	Integration WebSocketRouteIntegration `field:"required" json:"integration" yaml:"integration"`
	// The authorize to this route.
	//
	// You can only set authorizer to a $connect route.
	// Default: - No Authorizer.
	//
	// Deprecated.
	Authorizer IWebSocketRouteAuthorizer `field:"optional" json:"authorizer" yaml:"authorizer"`
	// Should the route send a response to the client.
	// Default: false.
	//
	// Deprecated.
	ReturnResponse *bool `field:"optional" json:"returnResponse" yaml:"returnResponse"`
}

Options used to add route to the API.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var messageHandler function

webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"))
apigwv2.NewWebSocketStage(this, jsii.String("mystage"), &WebSocketStageProps{
	WebSocketApi: WebSocketApi,
	StageName: jsii.String("dev"),
	AutoDeploy: jsii.Boolean(true),
})
webSocketApi.AddRoute(jsii.String("sendMessage"), &WebSocketRouteOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("SendMessageIntegration"), messageHandler),
})

Deprecated.

type WebSocketRouteProps

type WebSocketRouteProps struct {
	// The integration to be configured on this route.
	// Deprecated.
	Integration WebSocketRouteIntegration `field:"required" json:"integration" yaml:"integration"`
	// The authorize to this route.
	//
	// You can only set authorizer to a $connect route.
	// Default: - No Authorizer.
	//
	// Deprecated.
	Authorizer IWebSocketRouteAuthorizer `field:"optional" json:"authorizer" yaml:"authorizer"`
	// Should the route send a response to the client.
	// Default: false.
	//
	// Deprecated.
	ReturnResponse *bool `field:"optional" json:"returnResponse" yaml:"returnResponse"`
	// The key to this route.
	// Deprecated.
	RouteKey *string `field:"required" json:"routeKey" yaml:"routeKey"`
	// The API the route is associated with.
	// Deprecated.
	WebSocketApi IWebSocketApi `field:"required" json:"webSocketApi" yaml:"webSocketApi"`
	// Whether the route requires an API Key to be provided.
	// Default: false.
	//
	// Deprecated.
	ApiKeyRequired *bool `field:"optional" json:"apiKeyRequired" yaml:"apiKeyRequired"`
}

Properties to initialize a new Route.

Example:

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

var webSocketApi webSocketApi
var webSocketRouteAuthorizer iWebSocketRouteAuthorizer
var webSocketRouteIntegration webSocketRouteIntegration

webSocketRouteProps := &WebSocketRouteProps{
	Integration: webSocketRouteIntegration,
	RouteKey: jsii.String("routeKey"),
	WebSocketApi: webSocketApi,

	// the properties below are optional
	ApiKeyRequired: jsii.Boolean(false),
	Authorizer: webSocketRouteAuthorizer,
	ReturnResponse: jsii.Boolean(false),
}

Deprecated.

type WebSocketStage

type WebSocketStage interface {
	awscdk.Resource
	IStage
	IWebSocketStage
	// The API this stage is associated to.
	// Deprecated.
	Api() IWebSocketApi
	// Deprecated.
	BaseApi() IApi
	// The callback URL to this stage.
	// Deprecated.
	CallbackUrl() *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.
	// Deprecated.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Deprecated.
	Node() constructs.Node
	// 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.
	// Deprecated.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Deprecated.
	Stack() awscdk.Stack
	// The name of the stage;
	//
	// its primary identifier.
	// Deprecated.
	StageName() *string
	// The websocket URL to this stage.
	// Deprecated.
	Url() *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`).
	// Deprecated.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Deprecated.
	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`.
	// Deprecated.
	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.
	// Deprecated.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grant access to the API Gateway management API for this WebSocket API Stage to an IAM principal (Role/Group/User).
	// Deprecated.
	GrantManagementApiAccess(identity awsiam.IGrantable) awsiam.Grant
	// Return the given named metric for this HTTP Api Gateway Stage.
	// Deprecated.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Deprecated.
	ToString() *string
}

Represents a stage where an instance of the API is deployed.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var messageHandler function

webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"))
apigwv2.NewWebSocketStage(this, jsii.String("mystage"), &WebSocketStageProps{
	WebSocketApi: WebSocketApi,
	StageName: jsii.String("dev"),
	AutoDeploy: jsii.Boolean(true),
})
webSocketApi.AddRoute(jsii.String("sendMessage"), &WebSocketRouteOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("SendMessageIntegration"), messageHandler),
})

Deprecated.

func NewWebSocketStage

func NewWebSocketStage(scope constructs.Construct, id *string, props *WebSocketStageProps) WebSocketStage

Deprecated.

type WebSocketStageAttributes

type WebSocketStageAttributes struct {
	// The name of the stage.
	// Deprecated.
	StageName *string `field:"required" json:"stageName" yaml:"stageName"`
	// The API to which this stage is associated.
	// Deprecated.
	Api IWebSocketApi `field:"required" json:"api" yaml:"api"`
}

The attributes used to import existing WebSocketStage.

Example:

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

var webSocketApi webSocketApi

webSocketStageAttributes := &WebSocketStageAttributes{
	Api: webSocketApi,
	StageName: jsii.String("stageName"),
}

Deprecated.

type WebSocketStageProps

type WebSocketStageProps struct {
	// Whether updates to an API automatically trigger a new deployment.
	// Default: false.
	//
	// Deprecated.
	AutoDeploy *bool `field:"optional" json:"autoDeploy" yaml:"autoDeploy"`
	// The options for custom domain and api mapping.
	// Default: - no custom domain and api mapping configuration.
	//
	// Deprecated.
	DomainMapping *DomainMappingOptions `field:"optional" json:"domainMapping" yaml:"domainMapping"`
	// Throttle settings for the routes of this stage.
	// Default: - no throttling configuration.
	//
	// Deprecated.
	Throttle *ThrottleSettings `field:"optional" json:"throttle" yaml:"throttle"`
	// The name of the stage.
	// Deprecated.
	StageName *string `field:"required" json:"stageName" yaml:"stageName"`
	// The WebSocket API to which this stage is associated.
	// Deprecated.
	WebSocketApi IWebSocketApi `field:"required" json:"webSocketApi" yaml:"webSocketApi"`
}

Properties to initialize an instance of `WebSocketStage`.

Example:

import "github.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha"

var messageHandler function

webSocketApi := apigwv2.NewWebSocketApi(this, jsii.String("mywsapi"))
apigwv2.NewWebSocketStage(this, jsii.String("mystage"), &WebSocketStageProps{
	WebSocketApi: WebSocketApi,
	StageName: jsii.String("dev"),
	AutoDeploy: jsii.Boolean(true),
})
webSocketApi.AddRoute(jsii.String("sendMessage"), &WebSocketRouteOptions{
	Integration: awscdkapigatewayv2integrationsalpha.NewWebSocketLambdaIntegration(jsii.String("SendMessageIntegration"), messageHandler),
})

Deprecated.

Source Files

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL