AWS Cloud Development Kit

Contents:

  • API Reference
    • aws_cdk
    • aws_cdk.alexa_ask
    • aws_cdk.app_staging_synthesizer_alpha
    • aws_cdk.assertions
    • aws_cdk.asset_awscli_v1
    • aws_cdk.asset_node_proxy_agent_v6
    • aws_cdk.aws_accessanalyzer
    • aws_cdk.aws_acmpca
    • aws_cdk.aws_amazonmq
    • aws_cdk.aws_amplify
    • aws_cdk.aws_amplify_alpha
    • aws_cdk.aws_amplifyuibuilder
    • aws_cdk.aws_apigateway
      • Package Overview
      • AccessLogDestinationConfig
      • AccessLogField
      • AccessLogFormat
      • AddApiKeyOptions
      • ApiDefinition
      • ApiDefinitionConfig
      • ApiDefinitionS3Location
      • ApiKey
      • ApiKeyOptions
      • ApiKeyProps
      • ApiKeySourceType
      • ApiMappingOptions
      • AssetApiDefinition
      • AuthorizationType
      • Authorizer
      • AwsIntegration
      • AwsIntegrationProps
      • BasePathMapping
      • BasePathMappingOptions
      • BasePathMappingProps
      • CfnAccount
      • CfnAccountProps
      • CfnApiKey
      • CfnApiKeyProps
      • CfnAuthorizer
      • CfnAuthorizerProps
      • CfnBasePathMapping
      • CfnBasePathMappingProps
      • CfnBasePathMappingV2
      • CfnBasePathMappingV2Props
      • CfnClientCertificate
      • CfnClientCertificateProps
      • CfnDeployment
      • CfnDeploymentProps
      • CfnDocumentationPart
      • CfnDocumentationPartProps
      • CfnDocumentationVersion
      • CfnDocumentationVersionProps
      • CfnDomainName
      • CfnDomainNameAccessAssociation
      • CfnDomainNameAccessAssociationProps
      • CfnDomainNameProps
      • CfnDomainNameV2
      • CfnDomainNameV2Props
      • CfnGatewayResponse
      • CfnGatewayResponseProps
      • CfnMethod
      • CfnMethodProps
      • CfnModel
      • CfnModelProps
      • CfnRequestValidator
      • CfnRequestValidatorProps
      • CfnResource
      • CfnResourceProps
      • CfnRestApi
      • CfnRestApiProps
      • CfnStage
      • CfnStageProps
      • CfnUsagePlan
      • CfnUsagePlanKey
      • CfnUsagePlanKeyProps
      • CfnUsagePlanProps
      • CfnVpcLink
      • CfnVpcLinkProps
      • CognitoUserPoolsAuthorizer
      • CognitoUserPoolsAuthorizerProps
      • ConnectionType
      • ContentHandling
      • Cors
      • CorsOptions
      • Deployment
      • DeploymentProps
      • DomainName
      • DomainNameAttributes
      • DomainNameOptions
      • DomainNameProps
      • EndpointConfiguration
      • EndpointType
      • FirehoseLogDestination
      • GatewayResponse
      • GatewayResponseOptions
      • GatewayResponseProps
      • HttpIntegration
      • HttpIntegrationProps
      • IAccessLogDestination
      • IApiKey
      • IAuthorizer
      • IDomainName
      • IGatewayResponse
      • IModel
      • IRequestValidator
      • IResource
      • IRestApi
      • IStage
      • IUsagePlan
      • IVpcLink
      • IdentitySource
      • InlineApiDefinition
      • Integration
      • IntegrationConfig
      • IntegrationOptions
      • IntegrationProps
      • IntegrationResponse
      • IntegrationType
      • IpAddressType
      • JsonSchema
      • JsonSchemaType
      • JsonSchemaVersion
      • JsonWithStandardFieldProps
      • LambdaAuthorizerProps
      • LambdaIntegration
      • LambdaIntegrationOptions
      • LambdaRestApi
      • LambdaRestApiProps
      • LogGroupLogDestination
      • MTLSConfig
      • Method
      • MethodDeploymentOptions
      • MethodLoggingLevel
      • MethodOptions
      • MethodProps
      • MethodResponse
      • MockIntegration
      • Model
      • ModelOptions
      • ModelProps
      • PassthroughBehavior
      • Period
      • ProxyResource
      • ProxyResourceOptions
      • ProxyResourceProps
      • QuotaSettings
      • RateLimitedApiKey
      • RateLimitedApiKeyProps
      • RequestAuthorizer
      • RequestAuthorizerProps
      • RequestContext
      • RequestValidator
      • RequestValidatorOptions
      • RequestValidatorProps
      • Resource
      • ResourceAttributes
      • ResourceBase
      • ResourceOptions
      • ResourceProps
      • ResponseType
      • RestApi
      • RestApiAttributes
      • RestApiBase
      • RestApiBaseProps
      • RestApiMode
      • RestApiProps
      • S3ApiDefinition
      • SagemakerIntegration
      • SagemakerIntegrationOptions
      • SecurityPolicy
      • SpecRestApi
      • SpecRestApiProps
      • Stage
      • StageAttributes
      • StageBase
      • StageOptions
      • StageProps
      • StepFunctionsExecutionIntegrationOptions
      • StepFunctionsIntegration
      • StepFunctionsRestApi
      • StepFunctionsRestApiProps
      • ThrottleSettings
      • ThrottlingPerMethod
      • TokenAuthorizer
      • TokenAuthorizerProps
      • UsagePlan
      • UsagePlanPerApiStage
      • UsagePlanProps
      • VpcLink
        • VpcLink
      • VpcLinkProps
    • aws_cdk.aws_apigatewayv2
    • aws_cdk.aws_apigatewayv2_authorizers
    • aws_cdk.aws_apigatewayv2_integrations
    • aws_cdk.aws_appconfig
    • aws_cdk.aws_appflow
    • aws_cdk.aws_appintegrations
    • aws_cdk.aws_applicationautoscaling
    • aws_cdk.aws_applicationinsights
    • aws_cdk.aws_applicationsignals
    • aws_cdk.aws_applicationsignals_alpha
    • aws_cdk.aws_appmesh
    • aws_cdk.aws_apprunner
    • aws_cdk.aws_apprunner_alpha
    • aws_cdk.aws_appstream
    • aws_cdk.aws_appsync
    • aws_cdk.aws_apptest
    • aws_cdk.aws_aps
    • aws_cdk.aws_arczonalshift
    • aws_cdk.aws_athena
    • aws_cdk.aws_auditmanager
    • aws_cdk.aws_autoscaling
    • aws_cdk.aws_autoscaling_common
    • aws_cdk.aws_autoscaling_hooktargets
    • aws_cdk.aws_autoscalingplans
    • aws_cdk.aws_b2bi
    • aws_cdk.aws_backup
    • aws_cdk.aws_backupgateway
    • aws_cdk.aws_batch
    • aws_cdk.aws_bcmdataexports
    • aws_cdk.aws_bedrock
    • aws_cdk.aws_billingconductor
    • aws_cdk.aws_budgets
    • aws_cdk.aws_cassandra
    • aws_cdk.aws_ce
    • aws_cdk.aws_certificatemanager
    • aws_cdk.aws_chatbot
    • aws_cdk.aws_cleanrooms
    • aws_cdk.aws_cleanroomsml
    • aws_cdk.aws_cloud9
    • aws_cdk.aws_cloud9_alpha
    • aws_cdk.aws_cloudformation
    • aws_cdk.aws_cloudfront
    • aws_cdk.aws_cloudfront.experimental
    • aws_cdk.aws_cloudfront_origins
    • aws_cdk.aws_cloudtrail
    • aws_cdk.aws_cloudwatch
    • aws_cdk.aws_cloudwatch_actions
    • aws_cdk.aws_codeartifact
    • aws_cdk.aws_codebuild
    • aws_cdk.aws_codecommit
    • aws_cdk.aws_codeconnections
    • aws_cdk.aws_codedeploy
    • aws_cdk.aws_codeguruprofiler
    • aws_cdk.aws_codegurureviewer
    • aws_cdk.aws_codepipeline
    • aws_cdk.aws_codepipeline_actions
    • aws_cdk.aws_codestar
    • aws_cdk.aws_codestar_alpha
    • aws_cdk.aws_codestarconnections
    • aws_cdk.aws_codestarnotifications
    • aws_cdk.aws_cognito
    • aws_cdk.aws_cognito_identitypool
    • aws_cdk.aws_comprehend
    • aws_cdk.aws_config
    • aws_cdk.aws_connect
    • aws_cdk.aws_connectcampaigns
    • aws_cdk.aws_connectcampaignsv2
    • aws_cdk.aws_controltower
    • aws_cdk.aws_cur
    • aws_cdk.aws_customerprofiles
    • aws_cdk.aws_databrew
    • aws_cdk.aws_datapipeline
    • aws_cdk.aws_datasync
    • aws_cdk.aws_datazone
    • aws_cdk.aws_dax
    • aws_cdk.aws_deadline
    • aws_cdk.aws_detective
    • aws_cdk.aws_devicefarm
    • aws_cdk.aws_devopsguru
    • aws_cdk.aws_directoryservice
    • aws_cdk.aws_dlm
    • aws_cdk.aws_dms
    • aws_cdk.aws_docdb
    • aws_cdk.aws_docdbelastic
    • aws_cdk.aws_dsql
    • aws_cdk.aws_dynamodb
    • aws_cdk.aws_ec2
    • aws_cdk.aws_ec2_alpha
    • aws_cdk.aws_ecr
    • aws_cdk.aws_ecr_assets
    • aws_cdk.aws_ecs
    • aws_cdk.aws_ecs_patterns
    • aws_cdk.aws_efs
    • aws_cdk.aws_eks
    • aws_cdk.aws_eks_v2_alpha
    • aws_cdk.aws_elasticache
    • aws_cdk.aws_elasticbeanstalk
    • aws_cdk.aws_elasticloadbalancing
    • aws_cdk.aws_elasticloadbalancingv2
    • aws_cdk.aws_elasticloadbalancingv2_actions
    • aws_cdk.aws_elasticloadbalancingv2_targets
    • aws_cdk.aws_elasticsearch
    • aws_cdk.aws_emr
    • aws_cdk.aws_emrcontainers
    • aws_cdk.aws_emrserverless
    • aws_cdk.aws_entityresolution
    • aws_cdk.aws_events
    • aws_cdk.aws_events_targets
    • aws_cdk.aws_eventschemas
    • aws_cdk.aws_evidently
    • aws_cdk.aws_finspace
    • aws_cdk.aws_fis
    • aws_cdk.aws_fms
    • aws_cdk.aws_forecast
    • aws_cdk.aws_frauddetector
    • aws_cdk.aws_fsx
    • aws_cdk.aws_gamelift
    • aws_cdk.aws_gamelift_alpha
    • aws_cdk.aws_gameliftstreams
    • aws_cdk.aws_globalaccelerator
    • aws_cdk.aws_globalaccelerator_endpoints
    • aws_cdk.aws_glue
    • aws_cdk.aws_glue_alpha
    • aws_cdk.aws_grafana
    • aws_cdk.aws_greengrass
    • aws_cdk.aws_greengrassv2
    • aws_cdk.aws_groundstation
    • aws_cdk.aws_guardduty
    • aws_cdk.aws_healthimaging
    • aws_cdk.aws_healthlake
    • aws_cdk.aws_iam
    • aws_cdk.aws_identitystore
    • aws_cdk.aws_imagebuilder
    • aws_cdk.aws_inspector
    • aws_cdk.aws_inspectorv2
    • aws_cdk.aws_internetmonitor
    • aws_cdk.aws_invoicing
    • aws_cdk.aws_iot
    • aws_cdk.aws_iot_actions_alpha
    • aws_cdk.aws_iot_alpha
    • aws_cdk.aws_iotanalytics
    • aws_cdk.aws_iotcoredeviceadvisor
    • aws_cdk.aws_iotevents
    • aws_cdk.aws_iotevents_actions_alpha
    • aws_cdk.aws_iotevents_alpha
    • aws_cdk.aws_iotfleethub
    • aws_cdk.aws_iotfleetwise
    • aws_cdk.aws_iotsitewise
    • aws_cdk.aws_iotthingsgraph
    • aws_cdk.aws_iottwinmaker
    • aws_cdk.aws_iotwireless
    • aws_cdk.aws_ivs
    • aws_cdk.aws_ivs_alpha
    • aws_cdk.aws_ivschat
    • aws_cdk.aws_kafkaconnect
    • aws_cdk.aws_kendra
    • aws_cdk.aws_kendraranking
    • aws_cdk.aws_kinesis
    • aws_cdk.aws_kinesisanalytics
    • aws_cdk.aws_kinesisanalytics_flink_alpha
    • aws_cdk.aws_kinesisanalyticsv2
    • aws_cdk.aws_kinesisfirehose
    • aws_cdk.aws_kinesisvideo
    • aws_cdk.aws_kms
    • aws_cdk.aws_lakeformation
    • aws_cdk.aws_lambda
    • aws_cdk.aws_lambda_destinations
    • aws_cdk.aws_lambda_event_sources
    • aws_cdk.aws_lambda_go_alpha
    • aws_cdk.aws_lambda_nodejs
    • aws_cdk.aws_lambda_python_alpha
    • aws_cdk.aws_launchwizard
    • aws_cdk.aws_lex
    • aws_cdk.aws_licensemanager
    • aws_cdk.aws_lightsail
    • aws_cdk.aws_location
    • aws_cdk.aws_location_alpha
    • aws_cdk.aws_logs
    • aws_cdk.aws_logs_destinations
    • aws_cdk.aws_lookoutequipment
    • aws_cdk.aws_lookoutmetrics
    • aws_cdk.aws_lookoutvision
    • aws_cdk.aws_m2
    • aws_cdk.aws_macie
    • aws_cdk.aws_managedblockchain
    • aws_cdk.aws_mediaconnect
    • aws_cdk.aws_mediaconvert
    • aws_cdk.aws_medialive
    • aws_cdk.aws_mediapackage
    • aws_cdk.aws_mediapackagev2
    • aws_cdk.aws_mediastore
    • aws_cdk.aws_mediatailor
    • aws_cdk.aws_memorydb
    • aws_cdk.aws_msk
    • aws_cdk.aws_msk_alpha
    • aws_cdk.aws_mwaa
    • aws_cdk.aws_neptune
    • aws_cdk.aws_neptune_alpha
    • aws_cdk.aws_neptunegraph
    • aws_cdk.aws_networkfirewall
    • aws_cdk.aws_networkmanager
    • aws_cdk.aws_nimblestudio
    • aws_cdk.aws_notifications
    • aws_cdk.aws_notificationscontacts
    • aws_cdk.aws_oam
    • aws_cdk.aws_omics
    • aws_cdk.aws_opensearchserverless
    • aws_cdk.aws_opensearchservice
    • aws_cdk.aws_opsworks
    • aws_cdk.aws_opsworkscm
    • aws_cdk.aws_organizations
    • aws_cdk.aws_osis
    • aws_cdk.aws_panorama
    • aws_cdk.aws_paymentcryptography
    • aws_cdk.aws_pcaconnectorad
    • aws_cdk.aws_pcaconnectorscep
    • aws_cdk.aws_pcs
    • aws_cdk.aws_personalize
    • aws_cdk.aws_pinpoint
    • aws_cdk.aws_pinpointemail
    • aws_cdk.aws_pipes
    • aws_cdk.aws_pipes_alpha
    • aws_cdk.aws_pipes_enrichments_alpha
    • aws_cdk.aws_pipes_sources_alpha
    • aws_cdk.aws_pipes_targets_alpha
    • aws_cdk.aws_proton
    • aws_cdk.aws_qbusiness
    • aws_cdk.aws_qldb
    • aws_cdk.aws_quicksight
    • aws_cdk.aws_ram
    • aws_cdk.aws_rbin
    • aws_cdk.aws_rds
    • aws_cdk.aws_redshift
    • aws_cdk.aws_redshift_alpha
    • aws_cdk.aws_redshiftserverless
    • aws_cdk.aws_refactorspaces
    • aws_cdk.aws_rekognition
    • aws_cdk.aws_resiliencehub
    • aws_cdk.aws_resourceexplorer2
    • aws_cdk.aws_resourcegroups
    • aws_cdk.aws_robomaker
    • aws_cdk.aws_rolesanywhere
    • aws_cdk.aws_route53
    • aws_cdk.aws_route53_patterns
    • aws_cdk.aws_route53_targets
    • aws_cdk.aws_route53profiles
    • aws_cdk.aws_route53recoverycontrol
    • aws_cdk.aws_route53recoveryreadiness
    • aws_cdk.aws_route53resolver
    • aws_cdk.aws_route53resolver_alpha
    • aws_cdk.aws_rum
    • aws_cdk.aws_s3
    • aws_cdk.aws_s3_assets
    • aws_cdk.aws_s3_deployment
    • aws_cdk.aws_s3_notifications
    • aws_cdk.aws_s3express
    • aws_cdk.aws_s3objectlambda
    • aws_cdk.aws_s3objectlambda_alpha
    • aws_cdk.aws_s3outposts
    • aws_cdk.aws_s3tables
    • aws_cdk.aws_s3tables_alpha
    • aws_cdk.aws_sagemaker
    • aws_cdk.aws_sagemaker_alpha
    • aws_cdk.aws_sam
    • aws_cdk.aws_scheduler
    • aws_cdk.aws_scheduler_targets
    • aws_cdk.aws_sdb
    • aws_cdk.aws_secretsmanager
    • aws_cdk.aws_securityhub
    • aws_cdk.aws_securitylake
    • aws_cdk.aws_servicecatalog
    • aws_cdk.aws_servicecatalogappregistry
    • aws_cdk.aws_servicecatalogappregistry_alpha
    • aws_cdk.aws_servicediscovery
    • aws_cdk.aws_ses
    • aws_cdk.aws_ses_actions
    • aws_cdk.aws_shield
    • aws_cdk.aws_signer
    • aws_cdk.aws_simspaceweaver
    • aws_cdk.aws_sns
    • aws_cdk.aws_sns_subscriptions
    • aws_cdk.aws_sqs
    • aws_cdk.aws_ssm
    • aws_cdk.aws_ssmcontacts
    • aws_cdk.aws_ssmguiconnect
    • aws_cdk.aws_ssmincidents
    • aws_cdk.aws_ssmquicksetup
    • aws_cdk.aws_sso
    • aws_cdk.aws_stepfunctions
    • aws_cdk.aws_stepfunctions_tasks
    • aws_cdk.aws_supportapp
    • aws_cdk.aws_synthetics
    • aws_cdk.aws_systemsmanagersap
    • aws_cdk.aws_timestream
    • aws_cdk.aws_transfer
    • aws_cdk.aws_verifiedpermissions
    • aws_cdk.aws_voiceid
    • aws_cdk.aws_vpclattice
    • aws_cdk.aws_waf
    • aws_cdk.aws_wafregional
    • aws_cdk.aws_wafv2
    • aws_cdk.aws_wisdom
    • aws_cdk.aws_workspaces
    • aws_cdk.aws_workspacesthinclient
    • aws_cdk.aws_workspacesweb
    • aws_cdk.aws_xray
    • aws_cdk.cloud_assembly_schema
    • aws_cdk.cloudformation_include
    • aws_cdk.custom_resources
    • aws_cdk.cx_api
    • aws_cdk.integ_tests_alpha
    • aws_cdk.lambda_layer_awscli
    • aws_cdk.lambda_layer_node_proxy_agent
    • aws_cdk.pipelines
    • aws_cdk.region_info
    • aws_cdk.triggers
    • constructs
AWS Cloud Development Kit
  • API Reference
  • aws_cdk.aws_apigateway
  • VpcLink

VpcLink

class aws_cdk.aws_apigateway.VpcLink(scope, id, *, description=None, targets=None, vpc_link_name=None)

Bases: Resource

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

ExampleMetadata:

infused

Example:

import aws_cdk.aws_elasticloadbalancingv2 as elbv2


vpc = ec2.Vpc(self, "VPC")
nlb = elbv2.NetworkLoadBalancer(self, "NLB",
    vpc=vpc
)
link = apigateway.VpcLink(self, "link",
    targets=[nlb]
)

integration = apigateway.Integration(
    type=apigateway.IntegrationType.HTTP_PROXY,
    integration_http_method="ANY",
    options=apigateway.IntegrationOptions(
        connection_type=apigateway.ConnectionType.VPC_LINK,
        vpc_link=link
    )
)
Parameters:
  • scope (Construct)

  • id (str)

  • description (Optional[str]) – The description of the VPC link. Default: no description

  • targets (Optional[Sequence[INetworkLoadBalancer]]) – The network load balancers of the VPC targeted by the VPC link. The network load balancers must be owned by the same AWS account of the API owner. Default: - no targets. Use addTargets to add targets

  • vpc_link_name (Optional[str]) – The name used to label and identify the VPC link. Default: - automatically generated name

Methods

add_targets(*targets)
Parameters:

targets (INetworkLoadBalancer)

Return type:

None

apply_removal_policy(policy)

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).

Parameters:

policy (RemovalPolicy)

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Attributes

PROPERTY_INJECTION_ID = 'aws-cdk-lib.aws-apigateway.VpcLink'
env

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.

node

The tree node.

stack

The stack in which this resource is defined.

vpc_link_id

Physical ID of the VpcLink resource.

Attribute:

true

Static Methods

classmethod from_vpc_link_id(scope, id, vpc_link_id)

Import a VPC Link by its Id.

Parameters:
  • scope (Construct)

  • id (str)

  • vpc_link_id (str)

Return type:

IVpcLink

classmethod is_construct(x)

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.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

classmethod is_owned_resource(construct)

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

Parameters:

construct (IConstruct)

Return type:

bool

classmethod is_resource(construct)

Check whether the given construct is a Resource.

Parameters:

construct (IConstruct)

Return type:

bool

Previous Next

© Copyright 1980, Amazon Web Services.

Built with Sphinx using a theme provided by Read the Docs.