aws-cdk-lib 2.34.0 → 2.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +1 -1
- package/alexa-ask/lib/ask.generated.js +1 -1
- package/assertions/lib/annotations.js +1 -1
- package/assertions/lib/capture.js +1 -1
- package/assertions/lib/match.js +1 -1
- package/assertions/lib/matcher.js +1 -1
- package/assertions/lib/template.js +1 -1
- package/assets/lib/staging.js +1 -1
- package/aws-accessanalyzer/lib/accessanalyzer.generated.js +1 -1
- package/aws-acmpca/lib/acmpca.generated.js +1 -1
- package/aws-acmpca/lib/certificate-authority.js +1 -1
- package/aws-amazonmq/lib/amazonmq.generated.js +1 -1
- package/aws-amplify/lib/amplify.generated.js +1 -1
- package/aws-amplifyuibuilder/lib/amplifyuibuilder.generated.js +1 -1
- package/aws-apigateway/lib/access-log.js +1 -1
- package/aws-apigateway/lib/api-definition.js +1 -1
- package/aws-apigateway/lib/api-key.js +1 -1
- package/aws-apigateway/lib/apigateway.generated.js +1 -1
- package/aws-apigateway/lib/apigatewayv2.js +1 -1
- package/aws-apigateway/lib/authorizer.js +1 -1
- package/aws-apigateway/lib/authorizers/cognito.js +1 -1
- package/aws-apigateway/lib/authorizers/identity-source.js +1 -1
- package/aws-apigateway/lib/authorizers/lambda.js +1 -1
- package/aws-apigateway/lib/base-path-mapping.js +1 -1
- package/aws-apigateway/lib/cors.js +1 -1
- package/aws-apigateway/lib/deployment.js +1 -1
- package/aws-apigateway/lib/domain-name.js +1 -1
- package/aws-apigateway/lib/gateway-response.js +1 -1
- package/aws-apigateway/lib/integration.js +1 -1
- package/aws-apigateway/lib/integrations/aws.js +1 -1
- package/aws-apigateway/lib/integrations/http.js +1 -1
- package/aws-apigateway/lib/integrations/lambda.js +1 -1
- package/aws-apigateway/lib/integrations/mock.js +1 -1
- package/aws-apigateway/lib/integrations/stepfunctions.js +1 -1
- package/aws-apigateway/lib/lambda-api.js +1 -1
- package/aws-apigateway/lib/method.js +1 -1
- package/aws-apigateway/lib/model.js +1 -1
- package/aws-apigateway/lib/requestvalidator.js +1 -1
- package/aws-apigateway/lib/resource.js +1 -1
- package/aws-apigateway/lib/restapi.js +1 -1
- package/aws-apigateway/lib/stage.js +1 -1
- package/aws-apigateway/lib/stepfunctions-api.js +1 -1
- package/aws-apigateway/lib/usage-plan.js +1 -1
- package/aws-apigateway/lib/vpc-link.js +1 -1
- package/aws-apigatewayv2/lib/apigatewayv2.generated.js +1 -1
- package/aws-appconfig/lib/appconfig.generated.js +1 -1
- package/aws-appflow/lib/appflow.generated.js +1 -1
- package/aws-appintegrations/lib/appintegrations.generated.js +1 -1
- package/aws-applicationautoscaling/lib/applicationautoscaling.generated.js +1 -1
- package/aws-applicationautoscaling/lib/base-scalable-attribute.js +1 -1
- package/aws-applicationautoscaling/lib/scalable-target.js +1 -1
- package/aws-applicationautoscaling/lib/schedule.js +1 -1
- package/aws-applicationautoscaling/lib/step-scaling-action.js +1 -1
- package/aws-applicationautoscaling/lib/step-scaling-policy.js +1 -1
- package/aws-applicationautoscaling/lib/target-tracking-scaling-policy.js +1 -1
- package/aws-applicationinsights/lib/applicationinsights.generated.js +1 -1
- package/aws-appmesh/lib/appmesh.generated.js +1 -1
- package/aws-appmesh/lib/gateway-route-spec.js +1 -1
- package/aws-appmesh/lib/gateway-route.js +1 -1
- package/aws-appmesh/lib/header-match.js +1 -1
- package/aws-appmesh/lib/health-checks.js +1 -1
- package/aws-appmesh/lib/http-route-path-match.js +1 -1
- package/aws-appmesh/lib/mesh.js +1 -1
- package/aws-appmesh/lib/query-parameter-match.js +1 -1
- package/aws-appmesh/lib/route-spec.js +1 -1
- package/aws-appmesh/lib/route.js +1 -1
- package/aws-appmesh/lib/service-discovery.js +1 -1
- package/aws-appmesh/lib/shared-interfaces.js +1 -1
- package/aws-appmesh/lib/tls-certificate.js +1 -1
- package/aws-appmesh/lib/tls-validation.js +1 -1
- package/aws-appmesh/lib/virtual-gateway-listener.js +1 -1
- package/aws-appmesh/lib/virtual-gateway.js +1 -1
- package/aws-appmesh/lib/virtual-node-listener.js +1 -1
- package/aws-appmesh/lib/virtual-node.js +1 -1
- package/aws-appmesh/lib/virtual-router-listener.js +1 -1
- package/aws-appmesh/lib/virtual-router.js +1 -1
- package/aws-appmesh/lib/virtual-service.js +1 -1
- package/aws-apprunner/lib/apprunner.generated.js +1 -1
- package/aws-appstream/lib/appstream.generated.js +1 -1
- package/aws-appsync/lib/appsync.generated.js +1 -1
- package/aws-aps/lib/aps.generated.js +1 -1
- package/aws-athena/lib/athena.generated.js +1 -1
- package/aws-auditmanager/lib/auditmanager.generated.js +1 -1
- package/aws-autoscaling/lib/aspects/require-imdsv2-aspect.js +1 -1
- package/aws-autoscaling/lib/auto-scaling-group.js +1 -1
- package/aws-autoscaling/lib/autoscaling.generated.js +1 -1
- package/aws-autoscaling/lib/lifecycle-hook.js +1 -1
- package/aws-autoscaling/lib/schedule.js +1 -1
- package/aws-autoscaling/lib/scheduled-action.js +1 -1
- package/aws-autoscaling/lib/step-scaling-action.js +1 -1
- package/aws-autoscaling/lib/step-scaling-policy.js +1 -1
- package/aws-autoscaling/lib/target-tracking-scaling-policy.js +1 -1
- package/aws-autoscaling/lib/volume.js +1 -1
- package/aws-autoscaling/lib/warm-pool.js +1 -1
- package/aws-autoscaling-hooktargets/lib/lambda-hook.js +1 -1
- package/aws-autoscaling-hooktargets/lib/queue-hook.js +1 -1
- package/aws-autoscaling-hooktargets/lib/topic-hook.js +1 -1
- package/aws-autoscalingplans/lib/autoscalingplans.generated.js +1 -1
- package/aws-backup/lib/backup.generated.js +1 -1
- package/aws-backup/lib/plan.js +1 -1
- package/aws-backup/lib/resource.js +1 -1
- package/aws-backup/lib/rule.js +1 -1
- package/aws-backup/lib/selection.js +1 -1
- package/aws-backup/lib/vault.js +1 -1
- package/aws-batch/lib/batch.generated.js +1 -1
- package/aws-billingconductor/lib/billingconductor.generated.js +1 -1
- package/aws-budgets/lib/budgets.generated.js +1 -1
- package/aws-cassandra/lib/cassandra.generated.js +1 -1
- package/aws-ce/lib/ce.generated.js +1 -1
- package/aws-certificatemanager/lib/certificate.js +1 -1
- package/aws-certificatemanager/lib/certificatemanager.generated.js +1 -1
- package/aws-certificatemanager/lib/dns-validated-certificate.js +1 -1
- package/aws-certificatemanager/lib/private-certificate.js +1 -1
- package/aws-chatbot/lib/chatbot.generated.js +1 -1
- package/aws-chatbot/lib/slack-channel-configuration.js +1 -1
- package/aws-cloud9/lib/cloud9.generated.js +1 -1
- package/aws-cloudformation/lib/cloudformation.generated.js +1 -1
- package/aws-cloudformation/lib/custom-resource.js +1 -1
- package/aws-cloudformation/lib/nested-stack.js +1 -1
- package/aws-cloudfront/lib/cache-policy.js +1 -1
- package/aws-cloudfront/lib/cloudfront.generated.js +1 -1
- package/aws-cloudfront/lib/distribution.js +1 -1
- package/aws-cloudfront/lib/experimental/edge-function.js +1 -1
- package/aws-cloudfront/lib/function.js +1 -1
- package/aws-cloudfront/lib/geo-restriction.js +1 -1
- package/aws-cloudfront/lib/key-group.js +1 -1
- package/aws-cloudfront/lib/origin-access-identity.js +1 -1
- package/aws-cloudfront/lib/origin-request-policy.js +1 -1
- package/aws-cloudfront/lib/origin.js +1 -1
- package/aws-cloudfront/lib/public-key.js +1 -1
- package/aws-cloudfront/lib/response-headers-policy.js +1 -1
- package/aws-cloudfront/lib/web-distribution.js +2 -2
- package/aws-cloudfront-origins/lib/http-origin.js +1 -1
- package/aws-cloudfront-origins/lib/load-balancer-origin.js +1 -1
- package/aws-cloudfront-origins/lib/origin-group.js +1 -1
- package/aws-cloudfront-origins/lib/rest-api-origin.js +1 -1
- package/aws-cloudfront-origins/lib/s3-origin.js +1 -1
- package/aws-cloudtrail/lib/cloudtrail.generated.js +1 -1
- package/aws-cloudtrail/lib/cloudtrail.js +1 -1
- package/aws-cloudwatch/lib/alarm-base.js +1 -1
- package/aws-cloudwatch/lib/alarm-rule.js +1 -1
- package/aws-cloudwatch/lib/alarm-status-widget.js +1 -1
- package/aws-cloudwatch/lib/alarm.js +1 -1
- package/aws-cloudwatch/lib/cloudwatch.generated.js +1 -1
- package/aws-cloudwatch/lib/composite-alarm.js +1 -1
- package/aws-cloudwatch/lib/dashboard.js +1 -1
- package/aws-cloudwatch/lib/graph.js +1 -1
- package/aws-cloudwatch/lib/layout.js +1 -1
- package/aws-cloudwatch/lib/log-query.js +1 -1
- package/aws-cloudwatch/lib/metric.js +1 -1
- package/aws-cloudwatch/lib/text.js +1 -1
- package/aws-cloudwatch/lib/widget.js +1 -1
- package/aws-cloudwatch-actions/lib/appscaling.js +1 -1
- package/aws-cloudwatch-actions/lib/autoscaling.js +1 -1
- package/aws-cloudwatch-actions/lib/ec2.js +1 -1
- package/aws-cloudwatch-actions/lib/sns.js +1 -1
- package/aws-cloudwatch-actions/lib/ssm.js +1 -1
- package/aws-codeartifact/lib/codeartifact.generated.js +1 -1
- package/aws-codebuild/lib/artifacts.js +1 -1
- package/aws-codebuild/lib/build-spec.js +1 -1
- package/aws-codebuild/lib/cache.js +1 -1
- package/aws-codebuild/lib/codebuild.generated.js +1 -1
- package/aws-codebuild/lib/events.js +1 -1
- package/aws-codebuild/lib/file-location.js +1 -1
- package/aws-codebuild/lib/linux-arm-build-image.js +1 -1
- package/aws-codebuild/lib/linux-gpu-build-image.js +1 -1
- package/aws-codebuild/lib/pipeline-project.js +1 -1
- package/aws-codebuild/lib/project.js +1 -1
- package/aws-codebuild/lib/report-group.js +1 -1
- package/aws-codebuild/lib/source-credentials.js +1 -1
- package/aws-codebuild/lib/source.js +1 -1
- package/aws-codebuild/lib/untrusted-code-boundary-policy.js +1 -1
- package/aws-codecommit/lib/code.js +1 -1
- package/aws-codecommit/lib/codecommit.generated.js +1 -1
- package/aws-codecommit/lib/events.js +1 -1
- package/aws-codecommit/lib/repository.js +1 -1
- package/aws-codedeploy/lib/codedeploy.generated.js +1 -1
- package/aws-codedeploy/lib/ecs/application.js +1 -1
- package/aws-codedeploy/lib/ecs/deployment-config.js +1 -1
- package/aws-codedeploy/lib/ecs/deployment-group.js +1 -1
- package/aws-codedeploy/lib/lambda/application.js +1 -1
- package/aws-codedeploy/lib/lambda/custom-deployment-config.js +1 -1
- package/aws-codedeploy/lib/lambda/deployment-config.js +1 -1
- package/aws-codedeploy/lib/lambda/deployment-group.js +1 -1
- package/aws-codedeploy/lib/server/application.js +1 -1
- package/aws-codedeploy/lib/server/deployment-config.js +1 -1
- package/aws-codedeploy/lib/server/deployment-group.js +1 -1
- package/aws-codedeploy/lib/server/load-balancer.js +1 -1
- package/aws-codeguruprofiler/lib/codeguruprofiler.generated.js +1 -1
- package/aws-codeguruprofiler/lib/profiling-group.js +1 -1
- package/aws-codegurureviewer/lib/codegurureviewer.generated.js +1 -1
- package/aws-codepipeline/lib/action.js +1 -1
- package/aws-codepipeline/lib/artifact.js +1 -1
- package/aws-codepipeline/lib/codepipeline.generated.js +1 -1
- package/aws-codepipeline/lib/custom-action-registration.js +1 -1
- package/aws-codepipeline/lib/pipeline.js +1 -1
- package/aws-codepipeline-actions/lib/action.js +1 -1
- package/aws-codepipeline-actions/lib/alexa-ask/deploy-action.js +1 -1
- package/aws-codepipeline-actions/lib/bitbucket/source-action.js +1 -1
- package/aws-codepipeline-actions/lib/cloudformation/pipeline-actions.js +1 -1
- package/aws-codepipeline-actions/lib/cloudformation/stackinstances-action.js +1 -1
- package/aws-codepipeline-actions/lib/cloudformation/stackset-action.js +1 -1
- package/aws-codepipeline-actions/lib/cloudformation/stackset-types.js +1 -1
- package/aws-codepipeline-actions/lib/codebuild/build-action.js +1 -1
- package/aws-codepipeline-actions/lib/codecommit/source-action.js +1 -1
- package/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.js +1 -1
- package/aws-codepipeline-actions/lib/codedeploy/server-deploy-action.js +1 -1
- package/aws-codepipeline-actions/lib/codestar-connections/source-action.js +1 -1
- package/aws-codepipeline-actions/lib/ecr/source-action.js +1 -1
- package/aws-codepipeline-actions/lib/ecs/deploy-action.js +1 -1
- package/aws-codepipeline-actions/lib/github/source-action.js +1 -1
- package/aws-codepipeline-actions/lib/jenkins/jenkins-action.js +1 -1
- package/aws-codepipeline-actions/lib/jenkins/jenkins-provider.js +1 -1
- package/aws-codepipeline-actions/lib/lambda/invoke-action.js +1 -1
- package/aws-codepipeline-actions/lib/manual-approval-action.js +1 -1
- package/aws-codepipeline-actions/lib/s3/deploy-action.js +1 -1
- package/aws-codepipeline-actions/lib/s3/source-action.js +1 -1
- package/aws-codepipeline-actions/lib/servicecatalog/deploy-action-beta1.js +1 -1
- package/aws-codepipeline-actions/lib/stepfunctions/invoke-action.js +1 -1
- package/aws-codestar/lib/codestar.generated.js +1 -1
- package/aws-codestarconnections/lib/codestarconnections.generated.js +1 -1
- package/aws-codestarnotifications/lib/codestarnotifications.generated.js +1 -1
- package/aws-codestarnotifications/lib/notification-rule.js +1 -1
- package/aws-cognito/lib/cognito.generated.js +1 -1
- package/aws-cognito/lib/user-pool-attr.js +1 -1
- package/aws-cognito/lib/user-pool-client.js +1 -1
- package/aws-cognito/lib/user-pool-domain.js +1 -1
- package/aws-cognito/lib/user-pool-email.js +1 -1
- package/aws-cognito/lib/user-pool-idp.js +1 -1
- package/aws-cognito/lib/user-pool-idps/amazon.js +1 -1
- package/aws-cognito/lib/user-pool-idps/apple.js +1 -1
- package/aws-cognito/lib/user-pool-idps/base.js +1 -1
- package/aws-cognito/lib/user-pool-idps/facebook.js +1 -1
- package/aws-cognito/lib/user-pool-idps/google.js +1 -1
- package/aws-cognito/lib/user-pool-idps/oidc.js +1 -1
- package/aws-cognito/lib/user-pool-resource-server.js +1 -1
- package/aws-cognito/lib/user-pool.js +1 -1
- package/aws-config/lib/config.generated.js +1 -1
- package/aws-config/lib/managed-rules.js +1 -1
- package/aws-config/lib/rule.js +1 -1
- package/aws-connect/lib/connect.generated.js +1 -1
- package/aws-cur/lib/cur.generated.js +1 -1
- package/aws-customerprofiles/lib/customerprofiles.generated.js +1 -1
- package/aws-databrew/lib/databrew.generated.js +1 -1
- package/aws-datapipeline/lib/datapipeline.generated.js +1 -1
- package/aws-datasync/lib/datasync.generated.js +1 -1
- package/aws-dax/lib/dax.generated.js +1 -1
- package/aws-detective/lib/detective.generated.js +1 -1
- package/aws-devopsguru/lib/devopsguru.generated.js +1 -1
- package/aws-directoryservice/lib/directoryservice.generated.js +1 -1
- package/aws-dlm/lib/dlm.generated.js +1 -1
- package/aws-dms/lib/dms.generated.js +1 -1
- package/aws-docdb/lib/cluster.js +1 -1
- package/aws-docdb/lib/database-secret.js +1 -1
- package/aws-docdb/lib/docdb.generated.js +1 -1
- package/aws-docdb/lib/endpoint.js +1 -1
- package/aws-docdb/lib/instance.js +1 -1
- package/aws-docdb/lib/parameter-group.js +1 -1
- package/aws-dynamodb/lib/dynamodb.generated.js +1 -1
- package/aws-dynamodb/lib/table.js +1 -1
- package/aws-ec2/lib/aspects/require-imdsv2-aspect.js +1 -1
- package/aws-ec2/lib/bastion-host.js +1 -1
- package/aws-ec2/lib/cfn-init-elements.js +1 -1
- package/aws-ec2/lib/cfn-init.js +1 -1
- package/aws-ec2/lib/client-vpn-authorization-rule.js +1 -1
- package/aws-ec2/lib/client-vpn-endpoint.js +1 -1
- package/aws-ec2/lib/client-vpn-route.js +1 -1
- package/aws-ec2/lib/connections.js +1 -1
- package/aws-ec2/lib/ec2.generated.js +1 -1
- package/aws-ec2/lib/instance-types.js +1 -1
- package/aws-ec2/lib/instance.js +1 -1
- package/aws-ec2/lib/launch-template.js +1 -1
- package/aws-ec2/lib/machine-image.js +1 -1
- package/aws-ec2/lib/nat.js +1 -1
- package/aws-ec2/lib/network-acl-types.js +1 -1
- package/aws-ec2/lib/network-acl.js +1 -1
- package/aws-ec2/lib/peer.js +1 -1
- package/aws-ec2/lib/port.js +1 -1
- package/aws-ec2/lib/security-group.js +1 -1
- package/aws-ec2/lib/subnet.js +1 -1
- package/aws-ec2/lib/user-data.js +3 -3
- package/aws-ec2/lib/volume.js +1 -1
- package/aws-ec2/lib/vpc-endpoint-service.js +1 -1
- package/aws-ec2/lib/vpc-endpoint.js +1 -1
- package/aws-ec2/lib/vpc-flow-logs.js +1 -1
- package/aws-ec2/lib/vpc.js +1 -1
- package/aws-ec2/lib/vpn.js +1 -1
- package/aws-ecr/lib/auth-token.js +1 -1
- package/aws-ecr/lib/ecr.generated.js +1 -1
- package/aws-ecr/lib/repository.js +1 -1
- package/aws-ecr-assets/lib/image-asset.js +2 -2
- package/aws-ecr-assets/lib/tarball-asset.js +1 -1
- package/aws-ecs/lib/amis.js +1 -1
- package/aws-ecs/lib/base/base-service.js +1 -1
- package/aws-ecs/lib/base/scalable-task-count.js +1 -1
- package/aws-ecs/lib/base/task-definition.js +1 -1
- package/aws-ecs/lib/cluster.js +1 -1
- package/aws-ecs/lib/container-definition.js +1 -1
- package/aws-ecs/lib/container-image.js +1 -1
- package/aws-ecs/lib/ec2/ec2-service.js +1 -1
- package/aws-ecs/lib/ec2/ec2-task-definition.js +1 -1
- package/aws-ecs/lib/ecs.generated.js +1 -1
- package/aws-ecs/lib/environment-file.js +1 -1
- package/aws-ecs/lib/external/external-service.js +1 -1
- package/aws-ecs/lib/external/external-task-definition.js +1 -1
- package/aws-ecs/lib/fargate/fargate-service.js +1 -1
- package/aws-ecs/lib/fargate/fargate-task-definition.js +1 -1
- package/aws-ecs/lib/firelens-log-router.js +1 -1
- package/aws-ecs/lib/images/asset-image.js +1 -1
- package/aws-ecs/lib/images/ecr.js +1 -1
- package/aws-ecs/lib/images/repository.js +1 -1
- package/aws-ecs/lib/images/tag-parameter-container-image.js +1 -1
- package/aws-ecs/lib/linux-parameters.js +1 -1
- package/aws-ecs/lib/log-drivers/aws-log-driver.js +1 -1
- package/aws-ecs/lib/log-drivers/firelens-log-driver.js +1 -1
- package/aws-ecs/lib/log-drivers/fluentd-log-driver.js +1 -1
- package/aws-ecs/lib/log-drivers/gelf-log-driver.js +1 -1
- package/aws-ecs/lib/log-drivers/generic-log-driver.js +1 -1
- package/aws-ecs/lib/log-drivers/journald-log-driver.js +1 -1
- package/aws-ecs/lib/log-drivers/json-file-log-driver.js +1 -1
- package/aws-ecs/lib/log-drivers/log-driver.js +1 -1
- package/aws-ecs/lib/log-drivers/log-drivers.js +1 -1
- package/aws-ecs/lib/log-drivers/splunk-log-driver.js +1 -1
- package/aws-ecs/lib/log-drivers/syslog-log-driver.js +1 -1
- package/aws-ecs/lib/placement.js +1 -1
- package/aws-ecs/lib/proxy-configuration/app-mesh-proxy-configuration.js +1 -1
- package/aws-ecs/lib/proxy-configuration/proxy-configuration.js +1 -1
- package/aws-ecs/lib/proxy-configuration/proxy-configurations.js +1 -1
- package/aws-ecs/lib/runtime-platform.js +1 -1
- package/aws-ecs-patterns/lib/base/application-load-balanced-service-base.js +1 -1
- package/aws-ecs-patterns/lib/base/application-multiple-target-groups-service-base.js +1 -1
- package/aws-ecs-patterns/lib/base/network-load-balanced-service-base.js +1 -1
- package/aws-ecs-patterns/lib/base/network-multiple-target-groups-service-base.js +1 -1
- package/aws-ecs-patterns/lib/base/queue-processing-service-base.js +1 -1
- package/aws-ecs-patterns/lib/base/scheduled-task-base.js +1 -1
- package/aws-ecs-patterns/lib/ecs/application-load-balanced-ecs-service.js +1 -1
- package/aws-ecs-patterns/lib/ecs/application-multiple-target-groups-ecs-service.js +1 -1
- package/aws-ecs-patterns/lib/ecs/network-load-balanced-ecs-service.js +1 -1
- package/aws-ecs-patterns/lib/ecs/network-multiple-target-groups-ecs-service.js +1 -1
- package/aws-ecs-patterns/lib/ecs/queue-processing-ecs-service.js +1 -1
- package/aws-ecs-patterns/lib/ecs/scheduled-ecs-task.js +1 -1
- package/aws-ecs-patterns/lib/fargate/application-load-balanced-fargate-service.js +1 -1
- package/aws-ecs-patterns/lib/fargate/application-multiple-target-groups-fargate-service.js +1 -1
- package/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.js +1 -1
- package/aws-ecs-patterns/lib/fargate/network-multiple-target-groups-fargate-service.js +1 -1
- package/aws-ecs-patterns/lib/fargate/queue-processing-fargate-service.js +1 -1
- package/aws-ecs-patterns/lib/fargate/scheduled-fargate-task.js +1 -1
- package/aws-efs/lib/access-point.js +1 -1
- package/aws-efs/lib/efs-file-system.js +1 -1
- package/aws-efs/lib/efs.generated.js +1 -1
- package/aws-eks/lib/alb-controller.js +1 -1
- package/aws-eks/lib/aws-auth.js +1 -1
- package/aws-eks/lib/cluster.js +1 -1
- package/aws-eks/lib/eks.generated.js +1 -1
- package/aws-eks/lib/fargate-cluster.js +1 -1
- package/aws-eks/lib/fargate-profile.js +1 -1
- package/aws-eks/lib/helm-chart.js +1 -1
- package/aws-eks/lib/k8s-manifest.js +1 -1
- package/aws-eks/lib/k8s-object-value.js +1 -1
- package/aws-eks/lib/k8s-patch.js +1 -1
- package/aws-eks/lib/kubectl-provider.js +1 -1
- package/aws-eks/lib/managed-nodegroup.js +1 -1
- package/aws-eks/lib/oidc-provider.js +1 -1
- package/aws-eks/lib/service-account.js +1 -1
- package/aws-elasticache/lib/elasticache.generated.js +1 -1
- package/aws-elasticbeanstalk/lib/elasticbeanstalk.generated.js +1 -1
- package/aws-elasticloadbalancing/lib/elasticloadbalancing.generated.js +1 -1
- package/aws-elasticloadbalancing/lib/load-balancer.js +1 -1
- package/aws-elasticloadbalancingv2/lib/alb/application-listener-action.js +1 -1
- package/aws-elasticloadbalancingv2/lib/alb/application-listener-certificate.js +1 -1
- package/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.js +1 -1
- package/aws-elasticloadbalancingv2/lib/alb/application-listener.js +1 -1
- package/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.js +1 -1
- package/aws-elasticloadbalancingv2/lib/alb/application-target-group.js +1 -1
- package/aws-elasticloadbalancingv2/lib/alb/conditions.js +1 -1
- package/aws-elasticloadbalancingv2/lib/elasticloadbalancingv2.generated.js +1 -1
- package/aws-elasticloadbalancingv2/lib/nlb/network-listener-action.js +1 -1
- package/aws-elasticloadbalancingv2/lib/nlb/network-listener.js +1 -1
- package/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.js +1 -1
- package/aws-elasticloadbalancingv2/lib/nlb/network-target-group.js +1 -1
- package/aws-elasticloadbalancingv2/lib/shared/base-listener.js +1 -1
- package/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.js +1 -1
- package/aws-elasticloadbalancingv2/lib/shared/base-target-group.js +1 -1
- package/aws-elasticloadbalancingv2/lib/shared/listener-certificate.js +1 -1
- package/aws-elasticloadbalancingv2/lib/shared/load-balancer-targets.js +1 -1
- package/aws-elasticloadbalancingv2-actions/lib/cognito-action.js +1 -1
- package/aws-elasticloadbalancingv2-targets/lib/alb-target.js +1 -1
- package/aws-elasticloadbalancingv2-targets/lib/instance-target.js +1 -1
- package/aws-elasticloadbalancingv2-targets/lib/ip-target.js +1 -1
- package/aws-elasticloadbalancingv2-targets/lib/lambda-target.js +1 -1
- package/aws-elasticsearch/lib/domain.js +1 -1
- package/aws-elasticsearch/lib/elasticsearch.generated.js +1 -1
- package/aws-emr/lib/emr.generated.js +1 -1
- package/aws-emrcontainers/lib/emrcontainers.generated.js +1 -1
- package/aws-emrserverless/lib/emrserverless.generated.js +1 -1
- package/aws-events/lib/api-destination.js +1 -1
- package/aws-events/lib/archive.js +1 -1
- package/aws-events/lib/connection.js +1 -1
- package/aws-events/lib/event-bus.js +1 -1
- package/aws-events/lib/events.generated.js +1 -1
- package/aws-events/lib/input.js +2 -2
- package/aws-events/lib/rule.js +1 -1
- package/aws-events/lib/schedule.js +1 -1
- package/aws-events-targets/lib/api-destination.js +1 -1
- package/aws-events-targets/lib/api-gateway.js +1 -1
- package/aws-events-targets/lib/aws-api.js +1 -1
- package/aws-events-targets/lib/batch.js +1 -1
- package/aws-events-targets/lib/codebuild.js +1 -1
- package/aws-events-targets/lib/codepipeline.js +1 -1
- package/aws-events-targets/lib/ecs-task.js +1 -1
- package/aws-events-targets/lib/event-bus.js +1 -1
- package/aws-events-targets/lib/kinesis-firehose-stream.js +1 -1
- package/aws-events-targets/lib/kinesis-stream.js +1 -1
- package/aws-events-targets/lib/lambda.js +1 -1
- package/aws-events-targets/lib/log-group.js +2 -2
- package/aws-events-targets/lib/sns.js +1 -1
- package/aws-events-targets/lib/sqs.js +1 -1
- package/aws-events-targets/lib/state-machine.js +1 -1
- package/aws-eventschemas/lib/eventschemas.generated.js +1 -1
- package/aws-evidently/lib/evidently.generated.js +1 -1
- package/aws-finspace/lib/finspace.generated.js +1 -1
- package/aws-fis/lib/fis.generated.js +1 -1
- package/aws-fms/lib/fms.generated.js +1 -1
- package/aws-forecast/lib/forecast.generated.js +1 -1
- package/aws-frauddetector/lib/frauddetector.generated.js +1 -1
- package/aws-fsx/lib/file-system.js +1 -1
- package/aws-fsx/lib/fsx.generated.js +1 -1
- package/aws-fsx/lib/lustre-file-system.js +1 -1
- package/aws-fsx/lib/maintenance-time.js +1 -1
- package/aws-gamelift/lib/gamelift.generated.js +1 -1
- package/aws-globalaccelerator/lib/accelerator.js +1 -1
- package/aws-globalaccelerator/lib/endpoint-group.js +1 -1
- package/aws-globalaccelerator/lib/endpoint.js +1 -1
- package/aws-globalaccelerator/lib/globalaccelerator.generated.js +1 -1
- package/aws-globalaccelerator/lib/listener.js +1 -1
- package/aws-globalaccelerator-endpoints/lib/alb.js +1 -1
- package/aws-globalaccelerator-endpoints/lib/eip.js +1 -1
- package/aws-globalaccelerator-endpoints/lib/instance.js +1 -1
- package/aws-globalaccelerator-endpoints/lib/nlb.js +1 -1
- package/aws-glue/lib/glue.generated.js +1 -1
- package/aws-greengrass/lib/greengrass.generated.js +1 -1
- package/aws-greengrassv2/lib/greengrassv2.generated.js +1 -1
- package/aws-groundstation/lib/groundstation.generated.js +1 -1
- package/aws-guardduty/lib/guardduty.generated.js +1 -1
- package/aws-healthlake/lib/healthlake.generated.js +1 -1
- package/aws-iam/lib/access-key.js +1 -1
- package/aws-iam/lib/grant.js +1 -1
- package/aws-iam/lib/group.js +1 -1
- package/aws-iam/lib/iam.generated.js +1 -1
- package/aws-iam/lib/lazy-role.js +1 -1
- package/aws-iam/lib/managed-policy.js +1 -1
- package/aws-iam/lib/oidc-provider.js +1 -1
- package/aws-iam/lib/permissions-boundary.js +1 -1
- package/aws-iam/lib/policy-document.js +1 -1
- package/aws-iam/lib/policy-statement.js +1 -1
- package/aws-iam/lib/policy.js +1 -1
- package/aws-iam/lib/principals.js +1 -1
- package/aws-iam/lib/role.js +1 -1
- package/aws-iam/lib/saml-provider.js +1 -1
- package/aws-iam/lib/unknown-principal.js +1 -1
- package/aws-iam/lib/user.js +1 -1
- package/aws-imagebuilder/lib/imagebuilder.generated.js +1 -1
- package/aws-inspector/lib/inspector.generated.js +1 -1
- package/aws-inspectorv2/lib/inspectorv2.generated.js +1 -1
- package/aws-iot/lib/iot.generated.js +1 -1
- package/aws-iot1click/lib/iot1click.generated.js +1 -1
- package/aws-iotanalytics/lib/iotanalytics.generated.js +1 -1
- package/aws-iotcoredeviceadvisor/lib/iotcoredeviceadvisor.generated.js +1 -1
- package/aws-iotevents/lib/iotevents.generated.js +1 -1
- package/aws-iotfleethub/lib/iotfleethub.generated.js +1 -1
- package/aws-iotsitewise/lib/iotsitewise.generated.js +1 -1
- package/aws-iotthingsgraph/lib/iotthingsgraph.generated.js +1 -1
- package/aws-iottwinmaker/lib/iottwinmaker.generated.js +1 -1
- package/aws-iotwireless/lib/iotwireless.generated.js +1 -1
- package/aws-ivs/lib/ivs.generated.js +1 -1
- package/aws-kafkaconnect/lib/kafkaconnect.generated.js +1 -1
- package/aws-kendra/lib/kendra.generated.js +1 -1
- package/aws-kinesis/lib/kinesis.generated.js +1 -1
- package/aws-kinesis/lib/stream.js +1 -1
- package/aws-kinesisanalytics/lib/kinesisanalytics.generated.js +1 -1
- package/aws-kinesisanalytics/lib/kinesisanalyticsv2.generated.js +1 -1
- package/aws-kinesisanalyticsv2/lib/kinesisanalyticsv2.generated.js +1 -1
- package/aws-kinesisfirehose/lib/kinesisfirehose.generated.js +1 -1
- package/aws-kinesisvideo/lib/kinesisvideo.generated.js +1 -1
- package/aws-kms/lib/alias.js +1 -1
- package/aws-kms/lib/key.js +1 -1
- package/aws-kms/lib/kms.generated.js +1 -1
- package/aws-kms/lib/via-service-principal.js +1 -1
- package/aws-lakeformation/lib/lakeformation.generated.js +1 -1
- package/aws-lambda/lib/alias.js +1 -1
- package/aws-lambda/lib/architecture.js +1 -1
- package/aws-lambda/lib/code-signing-config.js +1 -1
- package/aws-lambda/lib/code.js +1 -1
- package/aws-lambda/lib/event-invoke-config.js +1 -1
- package/aws-lambda/lib/event-source-mapping.js +1 -1
- package/aws-lambda/lib/filesystem.js +1 -1
- package/aws-lambda/lib/function-base.js +1 -1
- package/aws-lambda/lib/function-url.js +1 -1
- package/aws-lambda/lib/function.js +1 -1
- package/aws-lambda/lib/handler.js +1 -1
- package/aws-lambda/lib/image-function.js +1 -1
- package/aws-lambda/lib/lambda-insights.js +1 -1
- package/aws-lambda/lib/lambda-version.js +1 -1
- package/aws-lambda/lib/lambda.generated.js +1 -1
- package/aws-lambda/lib/layers.js +1 -1
- package/aws-lambda/lib/log-retention.js +1 -1
- package/aws-lambda/lib/runtime.js +1 -1
- package/aws-lambda/lib/singleton-lambda.js +1 -1
- package/aws-lambda-destinations/lib/event-bridge.js +1 -1
- package/aws-lambda-destinations/lib/lambda.js +1 -1
- package/aws-lambda-destinations/lib/sns.js +1 -1
- package/aws-lambda-destinations/lib/sqs.js +1 -1
- package/aws-lambda-event-sources/lib/api.js +1 -1
- package/aws-lambda-event-sources/lib/dynamodb.js +1 -1
- package/aws-lambda-event-sources/lib/kafka.js +1 -1
- package/aws-lambda-event-sources/lib/kinesis.js +1 -1
- package/aws-lambda-event-sources/lib/s3.js +1 -1
- package/aws-lambda-event-sources/lib/sns-dlq.js +1 -1
- package/aws-lambda-event-sources/lib/sns.js +1 -1
- package/aws-lambda-event-sources/lib/sqs-dlq.js +1 -1
- package/aws-lambda-event-sources/lib/sqs.js +1 -1
- package/aws-lambda-event-sources/lib/stream.js +1 -1
- package/aws-lambda-nodejs/lib/function.js +1 -1
- package/aws-lex/lib/lex.generated.js +1 -1
- package/aws-licensemanager/lib/licensemanager.generated.js +1 -1
- package/aws-lightsail/lib/lightsail.generated.js +1 -1
- package/aws-location/lib/location.generated.js +1 -1
- package/aws-logs/lib/cross-account-destination.js +1 -1
- package/aws-logs/lib/log-group.js +1 -1
- package/aws-logs/lib/log-retention.js +1 -1
- package/aws-logs/lib/log-stream.js +1 -1
- package/aws-logs/lib/logs.generated.js +1 -1
- package/aws-logs/lib/metric-filter.js +1 -1
- package/aws-logs/lib/pattern.js +1 -1
- package/aws-logs/lib/policy.js +1 -1
- package/aws-logs/lib/query-definition.js +1 -1
- package/aws-logs/lib/subscription-filter.js +1 -1
- package/aws-logs-destinations/lib/kinesis.js +1 -1
- package/aws-logs-destinations/lib/lambda.js +1 -1
- package/aws-lookoutequipment/lib/lookoutequipment.generated.js +1 -1
- package/aws-lookoutmetrics/lib/lookoutmetrics.generated.js +1 -1
- package/aws-lookoutvision/lib/lookoutvision.generated.js +1 -1
- package/aws-macie/lib/macie.generated.js +1 -1
- package/aws-managedblockchain/lib/managedblockchain.generated.js +1 -1
- package/aws-mediaconnect/lib/mediaconnect.generated.js +1 -1
- package/aws-mediaconvert/lib/mediaconvert.generated.js +1 -1
- package/aws-medialive/lib/medialive.generated.js +1 -1
- package/aws-mediapackage/lib/mediapackage.generated.js +1 -1
- package/aws-mediastore/lib/mediastore.generated.js +1 -1
- package/aws-mediatailor/lib/mediatailor.generated.js +1 -1
- package/aws-memorydb/lib/memorydb.generated.js +1 -1
- package/aws-msk/lib/msk.generated.js +1 -1
- package/aws-mwaa/lib/mwaa.generated.js +1 -1
- package/aws-neptune/lib/neptune.generated.js +1 -1
- package/aws-networkfirewall/lib/networkfirewall.generated.js +1 -1
- package/aws-networkmanager/lib/networkmanager.generated.js +1 -1
- package/aws-nimblestudio/lib/nimblestudio.generated.js +1 -1
- package/aws-opensearchservice/lib/domain.js +1 -1
- package/aws-opensearchservice/lib/opensearchservice.generated.js +1 -1
- package/aws-opensearchservice/lib/version.js +1 -1
- package/aws-opsworks/lib/opsworks.generated.js +1 -1
- package/aws-opsworkscm/lib/opsworkscm.generated.js +1 -1
- package/aws-panorama/lib/panorama.generated.js +1 -1
- package/aws-personalize/lib/personalize.generated.js +1 -1
- package/aws-pinpoint/lib/pinpoint.generated.js +1 -1
- package/aws-pinpointemail/lib/pinpointemail.generated.js +1 -1
- package/aws-qldb/lib/qldb.generated.js +1 -1
- package/aws-quicksight/lib/quicksight.generated.js +1 -1
- package/aws-ram/lib/ram.generated.js +1 -1
- package/aws-rds/lib/cluster-engine.js +1 -1
- package/aws-rds/lib/cluster.js +1 -1
- package/aws-rds/lib/database-secret.js +1 -1
- package/aws-rds/lib/endpoint.js +1 -1
- package/aws-rds/lib/instance-engine.js +1 -1
- package/aws-rds/lib/instance.js +1 -1
- package/aws-rds/lib/option-group.js +1 -1
- package/aws-rds/lib/parameter-group.js +1 -1
- package/aws-rds/lib/props.js +1 -1
- package/aws-rds/lib/proxy.js +1 -1
- package/aws-rds/lib/rds.generated.js +1 -1
- package/aws-rds/lib/serverless-cluster.js +1 -1
- package/aws-rds/lib/subnet-group.js +1 -1
- package/aws-redshift/lib/redshift.generated.js +1 -1
- package/aws-redshiftserverless/lib/redshiftserverless.generated.js +1 -1
- package/aws-refactorspaces/lib/refactorspaces.generated.js +1 -1
- package/aws-rekognition/lib/rekognition.generated.js +1 -1
- package/aws-resiliencehub/lib/resiliencehub.generated.js +1 -1
- package/aws-resourcegroups/lib/resourcegroups.generated.js +1 -1
- package/aws-robomaker/lib/robomaker.generated.js +1 -1
- package/aws-route53/lib/hosted-zone.js +1 -1
- package/aws-route53/lib/record-set.js +1 -1
- package/aws-route53/lib/route53.generated.js +1 -1
- package/aws-route53/lib/vpc-endpoint-service-domain-name.js +1 -1
- package/aws-route53-patterns/lib/website-redirect.js +1 -1
- package/aws-route53-targets/lib/api-gateway-domain-name.js +1 -1
- package/aws-route53-targets/lib/api-gatewayv2-domain-name.js +1 -1
- package/aws-route53-targets/lib/bucket-website-target.js +1 -1
- package/aws-route53-targets/lib/classic-load-balancer-target.js +1 -1
- package/aws-route53-targets/lib/cloudfront-target.js +1 -1
- package/aws-route53-targets/lib/elastic-beanstalk-environment-target.js +1 -1
- package/aws-route53-targets/lib/global-accelerator-target.js +1 -1
- package/aws-route53-targets/lib/interface-vpc-endpoint-target.js +1 -1
- package/aws-route53-targets/lib/load-balancer-target.js +1 -1
- package/aws-route53-targets/lib/route53-record.js +1 -1
- package/aws-route53-targets/lib/userpool-domain.js +1 -1
- package/aws-route53recoverycontrol/lib/route53recoverycontrol.generated.js +1 -1
- package/aws-route53recoveryreadiness/lib/route53recoveryreadiness.generated.js +1 -1
- package/aws-route53resolver/lib/route53resolver.generated.js +1 -1
- package/aws-rum/lib/rum.generated.js +1 -1
- package/aws-s3/lib/bucket-policy.js +1 -1
- package/aws-s3/lib/bucket.js +1 -1
- package/aws-s3/lib/rule.js +1 -1
- package/aws-s3/lib/s3.generated.js +1 -1
- package/aws-s3-assets/lib/asset.js +1 -1
- package/aws-s3-deployment/lib/bucket-deployment.js +1 -1
- package/aws-s3-deployment/lib/source.js +1 -1
- package/aws-s3-notifications/lib/lambda.js +1 -1
- package/aws-s3-notifications/lib/sns.js +1 -1
- package/aws-s3-notifications/lib/sqs.js +1 -1
- package/aws-s3objectlambda/lib/s3objectlambda.generated.js +1 -1
- package/aws-s3outposts/lib/s3outposts.generated.js +1 -1
- package/aws-sagemaker/lib/sagemaker.generated.js +1 -1
- package/aws-sam/lib/sam.generated.js +1 -1
- package/aws-sdb/lib/sdb.generated.js +1 -1
- package/aws-secretsmanager/lib/policy.js +1 -1
- package/aws-secretsmanager/lib/rotation-schedule.js +1 -1
- package/aws-secretsmanager/lib/secret-rotation.js +1 -1
- package/aws-secretsmanager/lib/secret.js +1 -1
- package/aws-secretsmanager/lib/secretsmanager.generated.js +1 -1
- package/aws-securityhub/lib/securityhub.generated.js +1 -1
- package/aws-servicecatalog/lib/cloudformation-template.js +1 -1
- package/aws-servicecatalog/lib/portfolio.js +1 -1
- package/aws-servicecatalog/lib/product-stack-history.js +1 -1
- package/aws-servicecatalog/lib/product-stack.js +1 -1
- package/aws-servicecatalog/lib/product.js +1 -1
- package/aws-servicecatalog/lib/servicecatalog.generated.js +1 -1
- package/aws-servicecatalog/lib/tag-options.js +1 -1
- package/aws-servicecatalogappregistry/lib/servicecatalogappregistry.generated.js +1 -1
- package/aws-servicediscovery/lib/alias-target-instance.js +1 -1
- package/aws-servicediscovery/lib/cname-instance.js +1 -1
- package/aws-servicediscovery/lib/http-namespace.js +1 -1
- package/aws-servicediscovery/lib/instance.js +1 -1
- package/aws-servicediscovery/lib/ip-instance.js +1 -1
- package/aws-servicediscovery/lib/non-ip-instance.js +1 -1
- package/aws-servicediscovery/lib/private-dns-namespace.js +1 -1
- package/aws-servicediscovery/lib/public-dns-namespace.js +1 -1
- package/aws-servicediscovery/lib/service.js +1 -1
- package/aws-servicediscovery/lib/servicediscovery.generated.js +1 -1
- package/aws-ses/lib/configuration-set.js +1 -1
- package/aws-ses/lib/dedicated-ip-pool.js +1 -1
- package/aws-ses/lib/email-identity.js +1 -1
- package/aws-ses/lib/receipt-filter.js +1 -1
- package/aws-ses/lib/receipt-rule-set.js +1 -1
- package/aws-ses/lib/receipt-rule.js +1 -1
- package/aws-ses/lib/ses.generated.js +1 -1
- package/aws-ses-actions/lib/add-header.js +1 -1
- package/aws-ses-actions/lib/bounce.js +1 -1
- package/aws-ses-actions/lib/lambda.js +1 -1
- package/aws-ses-actions/lib/s3.js +1 -1
- package/aws-ses-actions/lib/sns.js +1 -1
- package/aws-ses-actions/lib/stop.js +1 -1
- package/aws-signer/lib/signer.generated.js +1 -1
- package/aws-signer/lib/signing-profile.js +1 -1
- package/aws-sns/lib/policy.js +1 -1
- package/aws-sns/lib/sns.generated.js +1 -1
- package/aws-sns/lib/subscription-filter.js +1 -1
- package/aws-sns/lib/subscription.js +1 -1
- package/aws-sns/lib/topic-base.js +1 -1
- package/aws-sns/lib/topic.js +1 -1
- package/aws-sns-subscriptions/lib/email.js +1 -1
- package/aws-sns-subscriptions/lib/lambda.js +1 -1
- package/aws-sns-subscriptions/lib/sms.js +1 -1
- package/aws-sns-subscriptions/lib/sqs.js +1 -1
- package/aws-sns-subscriptions/lib/url.js +1 -1
- package/aws-sqs/lib/policy.js +1 -1
- package/aws-sqs/lib/queue-base.js +1 -1
- package/aws-sqs/lib/queue.js +1 -1
- package/aws-sqs/lib/sqs.generated.js +1 -1
- package/aws-ssm/lib/parameter.js +1 -1
- package/aws-ssm/lib/ssm.generated.js +1 -1
- package/aws-ssmcontacts/lib/ssmcontacts.generated.js +1 -1
- package/aws-ssmincidents/lib/ssmincidents.generated.js +1 -1
- package/aws-sso/lib/sso.generated.js +1 -1
- package/aws-stepfunctions/lib/activity.js +1 -1
- package/aws-stepfunctions/lib/chain.js +1 -1
- package/aws-stepfunctions/lib/condition.js +1 -1
- package/aws-stepfunctions/lib/fields.js +1 -1
- package/aws-stepfunctions/lib/input.js +1 -1
- package/aws-stepfunctions/lib/state-graph.js +1 -1
- package/aws-stepfunctions/lib/state-machine-fragment.js +1 -1
- package/aws-stepfunctions/lib/state-machine.js +1 -1
- package/aws-stepfunctions/lib/state-transition-metrics.js +1 -1
- package/aws-stepfunctions/lib/states/choice.js +1 -1
- package/aws-stepfunctions/lib/states/custom-state.js +1 -1
- package/aws-stepfunctions/lib/states/fail.js +1 -1
- package/aws-stepfunctions/lib/states/map.js +1 -1
- package/aws-stepfunctions/lib/states/parallel.js +1 -1
- package/aws-stepfunctions/lib/states/pass.js +1 -1
- package/aws-stepfunctions/lib/states/state.js +1 -1
- package/aws-stepfunctions/lib/states/succeed.js +1 -1
- package/aws-stepfunctions/lib/states/task-base.js +1 -1
- package/aws-stepfunctions/lib/states/task.js +1 -1
- package/aws-stepfunctions/lib/states/wait.js +1 -1
- package/aws-stepfunctions/lib/stepfunctions.generated.js +1 -1
- package/aws-stepfunctions/lib/types.js +1 -1
- package/aws-stepfunctions-tasks/lib/apigateway/call-http-api.js +1 -1
- package/aws-stepfunctions-tasks/lib/apigateway/call-rest-api.js +1 -1
- package/aws-stepfunctions-tasks/lib/athena/get-query-execution.js +1 -1
- package/aws-stepfunctions-tasks/lib/athena/get-query-results.js +1 -1
- package/aws-stepfunctions-tasks/lib/athena/start-query-execution.js +1 -1
- package/aws-stepfunctions-tasks/lib/athena/stop-query-execution.js +1 -1
- package/aws-stepfunctions-tasks/lib/aws-sdk/call-aws-service.js +1 -1
- package/aws-stepfunctions-tasks/lib/batch/run-batch-job.js +1 -1
- package/aws-stepfunctions-tasks/lib/batch/submit-job.js +1 -1
- package/aws-stepfunctions-tasks/lib/codebuild/start-build.js +1 -1
- package/aws-stepfunctions-tasks/lib/databrew/start-job-run.js +1 -1
- package/aws-stepfunctions-tasks/lib/dynamodb/delete-item.js +1 -1
- package/aws-stepfunctions-tasks/lib/dynamodb/get-item.js +1 -1
- package/aws-stepfunctions-tasks/lib/dynamodb/put-item.js +1 -1
- package/aws-stepfunctions-tasks/lib/dynamodb/shared-types.js +1 -1
- package/aws-stepfunctions-tasks/lib/dynamodb/update-item.js +1 -1
- package/aws-stepfunctions-tasks/lib/ecs/run-ecs-ec2-task.js +1 -1
- package/aws-stepfunctions-tasks/lib/ecs/run-ecs-fargate-task.js +1 -1
- package/aws-stepfunctions-tasks/lib/ecs/run-ecs-task-base.js +1 -1
- package/aws-stepfunctions-tasks/lib/ecs/run-task.js +1 -1
- package/aws-stepfunctions-tasks/lib/eks/call.js +1 -1
- package/aws-stepfunctions-tasks/lib/emr/emr-add-step.js +1 -1
- package/aws-stepfunctions-tasks/lib/emr/emr-cancel-step.js +1 -1
- package/aws-stepfunctions-tasks/lib/emr/emr-create-cluster.js +1 -1
- package/aws-stepfunctions-tasks/lib/emr/emr-modify-instance-fleet-by-name.js +1 -1
- package/aws-stepfunctions-tasks/lib/emr/emr-modify-instance-group-by-name.js +1 -1
- package/aws-stepfunctions-tasks/lib/emr/emr-set-cluster-termination-protection.js +1 -1
- package/aws-stepfunctions-tasks/lib/emr/emr-terminate-cluster.js +1 -1
- package/aws-stepfunctions-tasks/lib/emrcontainers/create-virtual-cluster.js +1 -1
- package/aws-stepfunctions-tasks/lib/emrcontainers/delete-virtual-cluster.js +1 -1
- package/aws-stepfunctions-tasks/lib/emrcontainers/start-job-run.js +1 -1
- package/aws-stepfunctions-tasks/lib/evaluate-expression.js +1 -1
- package/aws-stepfunctions-tasks/lib/eventbridge/put-events.js +1 -1
- package/aws-stepfunctions-tasks/lib/glue/run-glue-job-task.js +1 -1
- package/aws-stepfunctions-tasks/lib/glue/start-job-run.js +1 -1
- package/aws-stepfunctions-tasks/lib/invoke-activity.js +1 -1
- package/aws-stepfunctions-tasks/lib/lambda/invoke-function.js +1 -1
- package/aws-stepfunctions-tasks/lib/lambda/invoke.js +1 -1
- package/aws-stepfunctions-tasks/lib/lambda/run-lambda-task.js +1 -1
- package/aws-stepfunctions-tasks/lib/sagemaker/base-types.js +1 -1
- package/aws-stepfunctions-tasks/lib/sagemaker/create-endpoint-config.js +1 -1
- package/aws-stepfunctions-tasks/lib/sagemaker/create-endpoint.js +1 -1
- package/aws-stepfunctions-tasks/lib/sagemaker/create-model.js +1 -1
- package/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.js +1 -1
- package/aws-stepfunctions-tasks/lib/sagemaker/create-transform-job.js +1 -1
- package/aws-stepfunctions-tasks/lib/sagemaker/update-endpoint.js +1 -1
- package/aws-stepfunctions-tasks/lib/sns/publish-to-topic.js +1 -1
- package/aws-stepfunctions-tasks/lib/sns/publish.js +1 -1
- package/aws-stepfunctions-tasks/lib/sqs/send-message.js +1 -1
- package/aws-stepfunctions-tasks/lib/sqs/send-to-queue.js +1 -1
- package/aws-stepfunctions-tasks/lib/start-execution.js +1 -1
- package/aws-stepfunctions-tasks/lib/stepfunctions/invoke-activity.js +1 -1
- package/aws-stepfunctions-tasks/lib/stepfunctions/start-execution.js +1 -1
- package/aws-synthetics/lib/synthetics.generated.js +1 -1
- package/aws-timestream/lib/timestream.generated.js +1 -1
- package/aws-transfer/lib/transfer.generated.js +1 -1
- package/aws-voiceid/lib/voiceid.generated.js +1 -1
- package/aws-waf/lib/waf.generated.js +1 -1
- package/aws-wafregional/lib/wafregional.generated.js +1 -1
- package/aws-wafv2/lib/wafv2.generated.js +1 -1
- package/aws-wisdom/lib/wisdom.generated.js +1 -1
- package/aws-workspaces/lib/workspaces.generated.js +1 -1
- package/aws-xray/lib/xray.generated.js +1 -1
- package/cloud-assembly-schema/lib/manifest.js +1 -1
- package/cloudformation-include/lib/cfn-include.js +1 -1
- package/core/lib/annotations.js +1 -1
- package/core/lib/app.js +1 -1
- package/core/lib/arn.js +1 -1
- package/core/lib/aspect.js +1 -1
- package/core/lib/asset-staging.js +1 -1
- package/core/lib/bundling.js +1 -1
- package/core/lib/cfn-codedeploy-blue-green-hook.js +1 -1
- package/core/lib/cfn-condition.js +1 -1
- package/core/lib/cfn-dynamic-reference.js +1 -1
- package/core/lib/cfn-element.js +1 -1
- package/core/lib/cfn-fn.js +1 -1
- package/core/lib/cfn-hook.js +1 -1
- package/core/lib/cfn-include.js +1 -1
- package/core/lib/cfn-json.js +1 -1
- package/core/lib/cfn-mapping.js +1 -1
- package/core/lib/cfn-output.js +1 -1
- package/core/lib/cfn-parameter.js +1 -1
- package/core/lib/cfn-pseudo.js +1 -1
- package/core/lib/cfn-resource.js +1 -1
- package/core/lib/cfn-rule.js +1 -1
- package/core/lib/cloudformation.generated.js +1 -1
- package/core/lib/context-provider.js +1 -1
- package/core/lib/custom-resource-provider/custom-resource-provider.js +1 -1
- package/core/lib/custom-resource.js +1 -1
- package/core/lib/duration.js +1 -1
- package/core/lib/expiration.js +1 -1
- package/core/lib/feature-flags.js +1 -1
- package/core/lib/fs/ignore.js +1 -1
- package/core/lib/fs/index.js +1 -1
- package/core/lib/lazy.js +1 -1
- package/core/lib/names.js +1 -1
- package/core/lib/nested-stack.js +1 -1
- package/core/lib/physical-name.js +1 -1
- package/core/lib/private/intrinsic.js +1 -1
- package/core/lib/reference.js +1 -1
- package/core/lib/resolvable.js +2 -2
- package/core/lib/resource.js +1 -1
- package/core/lib/runtime.js +2 -2
- package/core/lib/secret-value.js +1 -1
- package/core/lib/size.js +1 -1
- package/core/lib/stack-synthesizers/bootstrapless-synthesizer.js +1 -1
- package/core/lib/stack-synthesizers/cli-credentials-synthesizer.js +1 -1
- package/core/lib/stack-synthesizers/default-synthesizer.js +1 -1
- package/core/lib/stack-synthesizers/legacy.js +1 -1
- package/core/lib/stack-synthesizers/nested.js +1 -1
- package/core/lib/stack-synthesizers/stack-synthesizer.js +1 -1
- package/core/lib/stack.js +1 -1
- package/core/lib/stage.js +1 -1
- package/core/lib/string-fragments.js +1 -1
- package/core/lib/tag-aspect.js +1 -1
- package/core/lib/tag-manager.js +1 -1
- package/core/lib/token.js +1 -1
- package/core/lib/tree.js +1 -1
- package/custom-resources/lib/aws-custom-resource/aws-custom-resource.js +1 -1
- package/custom-resources/lib/provider-framework/provider.js +1 -1
- package/cx-api/lib/artifacts/asset-manifest-artifact.js +1 -1
- package/cx-api/lib/artifacts/cloudformation-artifact.js +1 -1
- package/cx-api/lib/artifacts/nested-cloud-assembly-artifact.js +1 -1
- package/cx-api/lib/artifacts/tree-cloud-artifact.js +1 -1
- package/cx-api/lib/cloud-artifact.js +1 -1
- package/cx-api/lib/cloud-assembly.js +1 -1
- package/cx-api/lib/environment.js +1 -1
- package/cx-api/lib/placeholders.js +1 -1
- package/lambda-layer-awscli/lib/awscli-layer.js +1 -1
- package/lambda-layer-awscli/lib/layer.zip +0 -0
- package/lambda-layer-kubectl/lib/kubectl-layer.js +1 -1
- package/lambda-layer-kubectl/lib/layer.zip +0 -0
- package/lambda-layer-node-proxy-agent/lib/layer.zip +0 -0
- package/lambda-layer-node-proxy-agent/lib/node-proxy-agent-layer.js +1 -1
- package/package.json +244 -244
- package/pipelines/lib/blueprint/file-set.js +1 -1
- package/pipelines/lib/blueprint/manual-approval.js +1 -1
- package/pipelines/lib/blueprint/shell-step.js +1 -1
- package/pipelines/lib/blueprint/stack-deployment.js +1 -1
- package/pipelines/lib/blueprint/stage-deployment.js +1 -1
- package/pipelines/lib/blueprint/step.js +1 -1
- package/pipelines/lib/blueprint/wave.js +1 -1
- package/pipelines/lib/codepipeline/artifact-map.js +1 -1
- package/pipelines/lib/codepipeline/codebuild-step.js +1 -1
- package/pipelines/lib/codepipeline/codepipeline-source.js +1 -1
- package/pipelines/lib/codepipeline/codepipeline.js +1 -1
- package/pipelines/lib/codepipeline/confirm-permissions-broadening.js +1 -1
- package/pipelines/lib/docker-credentials.js +1 -1
- package/pipelines/lib/legacy/actions/deploy-cdk-stack-action.js +1 -1
- package/pipelines/lib/legacy/actions/publish-assets-action.js +1 -1
- package/pipelines/lib/legacy/actions/update-pipeline-action.js +1 -1
- package/pipelines/lib/legacy/pipeline.js +1 -1
- package/pipelines/lib/legacy/stage.js +1 -1
- package/pipelines/lib/legacy/synths/simple-synth-action.js +1 -1
- package/pipelines/lib/legacy/validation/shell-script-action.js +1 -1
- package/pipelines/lib/main/pipeline-base.js +1 -1
- package/region-info/lib/built-ins.generated.d.ts +1 -1
- package/region-info/lib/default.js +1 -1
- package/region-info/lib/fact.js +1 -1
- package/region-info/lib/region-info.js +1 -1
- package/triggers/lib/trigger-function.js +1 -1
- package/triggers/lib/trigger.js +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var _a,_b,_c,_d,_e,_f;Object.defineProperty(exports,"__esModule",{value:!0}),exports.InterfaceVpcEndpoint=exports.InterfaceVpcEndpointAwsService=exports.InterfaceVpcEndpointService=exports.GatewayVpcEndpoint=exports.GatewayVpcEndpointAwsService=exports.VpcEndpointType=exports.VpcEndpoint=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../aws-iam"),cxschema=require("../../cloud-assembly-schema"),core_1=require("../../core"),connections_1=require("./connections"),ec2_generated_1=require("./ec2.generated"),peer_1=require("./peer"),port_1=require("./port"),security_group_1=require("./security-group"),util_1=require("./util");class VpcEndpoint extends core_1.Resource{addToPolicy(statement){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_PolicyStatement(statement)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addToPolicy),error}if(!statement.hasPrincipal)throw new Error("Statement must have a `Principal`.");this.policyDocument||(this.policyDocument=new iam.PolicyDocument),this.policyDocument.addStatements(statement)}}exports.VpcEndpoint=VpcEndpoint,_a=JSII_RTTI_SYMBOL_1,VpcEndpoint[_a]={fqn:"aws-cdk-lib.aws_ec2.VpcEndpoint",version:"2.34.0"};var VpcEndpointType;(function(VpcEndpointType2){VpcEndpointType2.INTERFACE="Interface",VpcEndpointType2.GATEWAY="Gateway"})(VpcEndpointType=exports.VpcEndpointType||(exports.VpcEndpointType={}));class GatewayVpcEndpointAwsService{constructor(name,prefix){this.name=`${prefix||"com.amazonaws"}.${core_1.Aws.REGION}.${name}`}}exports.GatewayVpcEndpointAwsService=GatewayVpcEndpointAwsService,_b=JSII_RTTI_SYMBOL_1,GatewayVpcEndpointAwsService[_b]={fqn:"aws-cdk-lib.aws_ec2.GatewayVpcEndpointAwsService",version:"2.34.0"},GatewayVpcEndpointAwsService.DYNAMODB=new GatewayVpcEndpointAwsService("dynamodb"),GatewayVpcEndpointAwsService.S3=new GatewayVpcEndpointAwsService("s3");class GatewayVpcEndpoint extends VpcEndpoint{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_GatewayVpcEndpointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,GatewayVpcEndpoint),error}const subnets=props.subnets?util_1.flatten(props.subnets.map(s=>props.vpc.selectSubnets(s).subnets)):[...props.vpc.privateSubnets,...props.vpc.publicSubnets,...props.vpc.isolatedSubnets],routeTableIds=util_1.allRouteTableIds(subnets);if(routeTableIds.length===0)throw new Error("Can't add a gateway endpoint to VPC; route table IDs are not available");const endpoint=new ec2_generated_1.CfnVPCEndpoint(this,"Resource",{policyDocument:core_1.Lazy.any({produce:()=>this.policyDocument}),routeTableIds,serviceName:props.service.name,vpcEndpointType:VpcEndpointType.GATEWAY,vpcId:props.vpc.vpcId});this.vpcEndpointId=endpoint.ref,this.vpcEndpointCreationTimestamp=endpoint.attrCreationTimestamp,this.vpcEndpointDnsEntries=endpoint.attrDnsEntries,this.vpcEndpointNetworkInterfaceIds=endpoint.attrNetworkInterfaceIds}static fromGatewayVpcEndpointId(scope,id,gatewayVpcEndpointId){class Import extends VpcEndpoint{constructor(){super(...arguments),this.vpcEndpointId=gatewayVpcEndpointId}}return new Import(scope,id)}}exports.GatewayVpcEndpoint=GatewayVpcEndpoint,_c=JSII_RTTI_SYMBOL_1,GatewayVpcEndpoint[_c]={fqn:"aws-cdk-lib.aws_ec2.GatewayVpcEndpoint",version:"2.34.0"};class InterfaceVpcEndpointService{constructor(name,port){this.privateDnsDefault=!1,this.name=name,this.port=port||443}}exports.InterfaceVpcEndpointService=InterfaceVpcEndpointService,_d=JSII_RTTI_SYMBOL_1,InterfaceVpcEndpointService[_d]={fqn:"aws-cdk-lib.aws_ec2.InterfaceVpcEndpointService",version:"2.34.0"};class InterfaceVpcEndpointAwsService{constructor(name,prefix,port){this.privateDnsDefault=!0;const region=core_1.Lazy.uncachedString({produce:context=>core_1.Stack.of(context.scope).region}),defaultEndpointPrefix=core_1.Lazy.uncachedString({produce:context=>{const regionName=core_1.Stack.of(context.scope).region;return this.getDefaultEndpointPrefix(name,regionName)}}),defaultEndpointSuffix=core_1.Lazy.uncachedString({produce:context=>{const regionName=core_1.Stack.of(context.scope).region;return this.getDefaultEndpointSuffix(name,regionName)}});this.name=`${prefix||defaultEndpointPrefix}.${region}.${name}${defaultEndpointSuffix}`,this.shortName=name,this.port=port||443}getDefaultEndpointPrefix(name,region){return{"cn-north-1":["application-autoscaling","athena","autoscaling","awsconnector","cassandra","cloudformation","codedeploy-commands-secure","databrew","dms","ebs","ec2","ecr.api","ecr.dkr","elasticbeanstalk","elasticfilesystem","elasticfilesystem-fips","execute-api","imagebuilder","iotsitewise.api","iotsitewise.data","kinesis-streams","lambda","license-manager","monitoring","rds","redshift","redshift-data","s3","sagemaker.api","sagemaker.featurestore-runtime","sagemaker.runtime","servicecatalog","sms","sqs","states","sts","synthetics","transcribe","transcribestreaming","transfer","xray"],"cn-northwest-1":["application-autoscaling","athena","autoscaling","awsconnector","cassandra","cloudformation","codedeploy-commands-secure","databrew","dms","ebs","ec2","ecr.api","ecr.dkr","elasticbeanstalk","elasticfilesystem","elasticfilesystem-fips","execute-api","imagebuilder","kinesis-streams","lambda","license-manager","monitoring","rds","redshift","redshift-data","s3","sagemaker.api","sagemaker.featurestore-runtime","sagemaker.runtime","servicecatalog","sms","sqs","states","sts","synthetics","transcribe","transcribestreaming","transfer","workspaces","xray"]}[region]?.includes(name)?"cn.com.amazonaws":"com.amazonaws"}getDefaultEndpointSuffix(name,region){return{"cn-north-1":["transcribe"],"cn-northwest-1":["transcribe"]}[region]?.includes(name)?".cn":""}}exports.InterfaceVpcEndpointAwsService=InterfaceVpcEndpointAwsService,_e=JSII_RTTI_SYMBOL_1,InterfaceVpcEndpointAwsService[_e]={fqn:"aws-cdk-lib.aws_ec2.InterfaceVpcEndpointAwsService",version:"2.34.0"},InterfaceVpcEndpointAwsService.SAGEMAKER_NOTEBOOK=new InterfaceVpcEndpointAwsService("notebook","aws.sagemaker"),InterfaceVpcEndpointAwsService.ATHENA=new InterfaceVpcEndpointAwsService("athena"),InterfaceVpcEndpointAwsService.CLOUDFORMATION=new InterfaceVpcEndpointAwsService("cloudformation"),InterfaceVpcEndpointAwsService.CLOUDTRAIL=new InterfaceVpcEndpointAwsService("cloudtrail"),InterfaceVpcEndpointAwsService.CODEBUILD=new InterfaceVpcEndpointAwsService("codebuild"),InterfaceVpcEndpointAwsService.CODEBUILD_FIPS=new InterfaceVpcEndpointAwsService("codebuild-fips"),InterfaceVpcEndpointAwsService.CODECOMMIT=new InterfaceVpcEndpointAwsService("codecommit"),InterfaceVpcEndpointAwsService.CODECOMMIT_FIPS=new InterfaceVpcEndpointAwsService("codecommit-fips"),InterfaceVpcEndpointAwsService.CODEGURU_PROFILER=new InterfaceVpcEndpointAwsService("codeguru-profiler"),InterfaceVpcEndpointAwsService.CODEGURU_REVIEWER=new InterfaceVpcEndpointAwsService("codeguru-reviewer"),InterfaceVpcEndpointAwsService.CODEPIPELINE=new InterfaceVpcEndpointAwsService("codepipeline"),InterfaceVpcEndpointAwsService.CONFIG=new InterfaceVpcEndpointAwsService("config"),InterfaceVpcEndpointAwsService.EC2=new InterfaceVpcEndpointAwsService("ec2"),InterfaceVpcEndpointAwsService.EC2_MESSAGES=new InterfaceVpcEndpointAwsService("ec2messages"),InterfaceVpcEndpointAwsService.ECR=new InterfaceVpcEndpointAwsService("ecr.api"),InterfaceVpcEndpointAwsService.ECR_DOCKER=new InterfaceVpcEndpointAwsService("ecr.dkr"),InterfaceVpcEndpointAwsService.ECS=new InterfaceVpcEndpointAwsService("ecs"),InterfaceVpcEndpointAwsService.ECS_AGENT=new InterfaceVpcEndpointAwsService("ecs-agent"),InterfaceVpcEndpointAwsService.ECS_TELEMETRY=new InterfaceVpcEndpointAwsService("ecs-telemetry"),InterfaceVpcEndpointAwsService.ELASTIC_FILESYSTEM=new InterfaceVpcEndpointAwsService("elasticfilesystem"),InterfaceVpcEndpointAwsService.ELASTIC_FILESYSTEM_FIPS=new InterfaceVpcEndpointAwsService("elasticfilesystem-fips"),InterfaceVpcEndpointAwsService.ELASTIC_INFERENCE_RUNTIME=new InterfaceVpcEndpointAwsService("elastic-inference.runtime"),InterfaceVpcEndpointAwsService.ELASTIC_LOAD_BALANCING=new InterfaceVpcEndpointAwsService("elasticloadbalancing"),InterfaceVpcEndpointAwsService.CLOUDWATCH_EVENTS=new InterfaceVpcEndpointAwsService("events"),InterfaceVpcEndpointAwsService.APIGATEWAY=new InterfaceVpcEndpointAwsService("execute-api"),InterfaceVpcEndpointAwsService.CODECOMMIT_GIT=new InterfaceVpcEndpointAwsService("git-codecommit"),InterfaceVpcEndpointAwsService.CODECOMMIT_GIT_FIPS=new InterfaceVpcEndpointAwsService("git-codecommit-fips"),InterfaceVpcEndpointAwsService.GLUE=new InterfaceVpcEndpointAwsService("glue"),InterfaceVpcEndpointAwsService.KEYSPACES=new InterfaceVpcEndpointAwsService("cassandra","",9142),InterfaceVpcEndpointAwsService.KINESIS_STREAMS=new InterfaceVpcEndpointAwsService("kinesis-streams"),InterfaceVpcEndpointAwsService.KINESIS_FIREHOSE=new InterfaceVpcEndpointAwsService("kinesis-firehose"),InterfaceVpcEndpointAwsService.KMS=new InterfaceVpcEndpointAwsService("kms"),InterfaceVpcEndpointAwsService.CLOUDWATCH_LOGS=new InterfaceVpcEndpointAwsService("logs"),InterfaceVpcEndpointAwsService.CLOUDWATCH=new InterfaceVpcEndpointAwsService("monitoring"),InterfaceVpcEndpointAwsService.RDS=new InterfaceVpcEndpointAwsService("rds"),InterfaceVpcEndpointAwsService.RDS_DATA=new InterfaceVpcEndpointAwsService("rds-data"),InterfaceVpcEndpointAwsService.SAGEMAKER_API=new InterfaceVpcEndpointAwsService("sagemaker.api"),InterfaceVpcEndpointAwsService.SAGEMAKER_RUNTIME=new InterfaceVpcEndpointAwsService("sagemaker.runtime"),InterfaceVpcEndpointAwsService.SAGEMAKER_RUNTIME_FIPS=new InterfaceVpcEndpointAwsService("sagemaker.runtime-fips"),InterfaceVpcEndpointAwsService.SECRETS_MANAGER=new InterfaceVpcEndpointAwsService("secretsmanager"),InterfaceVpcEndpointAwsService.SERVICE_CATALOG=new InterfaceVpcEndpointAwsService("servicecatalog"),InterfaceVpcEndpointAwsService.SNS=new InterfaceVpcEndpointAwsService("sns"),InterfaceVpcEndpointAwsService.SQS=new InterfaceVpcEndpointAwsService("sqs"),InterfaceVpcEndpointAwsService.SSM=new InterfaceVpcEndpointAwsService("ssm"),InterfaceVpcEndpointAwsService.SSM_MESSAGES=new InterfaceVpcEndpointAwsService("ssmmessages"),InterfaceVpcEndpointAwsService.STS=new InterfaceVpcEndpointAwsService("sts"),InterfaceVpcEndpointAwsService.TEXTRACT=new InterfaceVpcEndpointAwsService("textract"),InterfaceVpcEndpointAwsService.TEXTRACT_FIPS=new InterfaceVpcEndpointAwsService("textract-fips"),InterfaceVpcEndpointAwsService.TRANSFER=new InterfaceVpcEndpointAwsService("transfer.server"),InterfaceVpcEndpointAwsService.STORAGE_GATEWAY=new InterfaceVpcEndpointAwsService("storagegateway"),InterfaceVpcEndpointAwsService.REKOGNITION=new InterfaceVpcEndpointAwsService("rekognition"),InterfaceVpcEndpointAwsService.REKOGNITION_FIPS=new InterfaceVpcEndpointAwsService("rekognition-fips"),InterfaceVpcEndpointAwsService.STEP_FUNCTIONS=new InterfaceVpcEndpointAwsService("states"),InterfaceVpcEndpointAwsService.LAMBDA=new InterfaceVpcEndpointAwsService("lambda"),InterfaceVpcEndpointAwsService.TRANSCRIBE=new InterfaceVpcEndpointAwsService("transcribe"),InterfaceVpcEndpointAwsService.XRAY=new InterfaceVpcEndpointAwsService("xray");class InterfaceVpcEndpoint extends VpcEndpoint{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_InterfaceVpcEndpointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,InterfaceVpcEndpoint),error}const securityGroups=props.securityGroups||[new security_group_1.SecurityGroup(this,"SecurityGroup",{vpc:props.vpc})];this.securityGroupId=securityGroups[0].securityGroupId,this.connections=new connections_1.Connections({defaultPort:port_1.Port.tcp(props.service.port),securityGroups}),props.open!==!1&&this.connections.allowDefaultPortFrom(peer_1.Peer.ipv4(props.vpc.vpcCidrBlock));const subnetIds=this.endpointSubnets(props),endpoint=new ec2_generated_1.CfnVPCEndpoint(this,"Resource",{privateDnsEnabled:props.privateDnsEnabled??props.service.privateDnsDefault??!0,policyDocument:core_1.Lazy.any({produce:()=>this.policyDocument}),securityGroupIds:securityGroups.map(s=>s.securityGroupId),serviceName:props.service.name,vpcEndpointType:VpcEndpointType.INTERFACE,subnetIds,vpcId:props.vpc.vpcId});this.vpcEndpointId=endpoint.ref,this.vpcEndpointCreationTimestamp=endpoint.attrCreationTimestamp,this.vpcEndpointDnsEntries=endpoint.attrDnsEntries,this.vpcEndpointNetworkInterfaceIds=endpoint.attrNetworkInterfaceIds}static fromInterfaceVpcEndpointAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_InterfaceVpcEndpointAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromInterfaceVpcEndpointAttributes),error}const securityGroups=attrs.securityGroupId?[security_group_1.SecurityGroup.fromSecurityGroupId(scope,"SecurityGroup",attrs.securityGroupId)]:attrs.securityGroups;class Import extends core_1.Resource{constructor(){super(...arguments),this.vpcEndpointId=attrs.vpcEndpointId,this.connections=new connections_1.Connections({defaultPort:port_1.Port.tcp(attrs.port),securityGroups})}}return new Import(scope,id)}endpointSubnets(props){const lookupSupportedAzs=props.lookupSupportedAzs??!1,subnetSelection=props.vpc.selectSubnets({...props.subnets,onePerAz:!0}),subnets=subnetSelection.subnets;if(!subnetSelection.isPendingLookup&&subnetSelection.subnets.length==0)throw new Error("Cannot create a VPC Endpoint with no subnets");if(!lookupSupportedAzs)return subnetSelection.subnetIds;const lookupServiceName=core_1.Token.isUnresolved(props.service.name)&&props.service instanceof InterfaceVpcEndpointAwsService?core_1.Stack.of(this).resolve(props.service.name):props.service.name;this.validateCanLookupSupportedAzs(subnets,lookupServiceName);const availableAZs=this.availableAvailabilityZones(lookupServiceName),filteredSubnets=subnets.filter(s=>availableAZs.includes(s.availabilityZone));if(filteredSubnets.length==0)throw new Error(`lookupSupportedAzs returned ${availableAZs} but subnets have AZs ${subnets.map(s=>s.availabilityZone)}`);return filteredSubnets.map(s=>s.subnetId)}validateCanLookupSupportedAzs(subnets,serviceName){const agnosticAcct=core_1.Token.isUnresolved(this.env.account),agnosticRegion=core_1.Token.isUnresolved(this.env.region),agnosticService=core_1.Token.isUnresolved(serviceName),agnosticSubnets=subnets.some(s=>core_1.Token.isUnresolved(s.availabilityZone)),agnosticSubnetList=core_1.Token.isUnresolved(subnets.map(s=>s.availabilityZone));if(agnosticAcct||agnosticRegion)throw new Error("Cannot look up VPC endpoint availability zones if account/region are not specified");if(agnosticService)throw new Error(`Cannot lookup AZs for a service name with a Token: ${serviceName}`);if(agnosticSubnets||agnosticSubnetList){const agnostic=subnets.filter(s=>core_1.Token.isUnresolved(s.availabilityZone));throw new Error(`lookupSupportedAzs cannot filter on subnets with Token AZs: ${agnostic}`)}}availableAvailabilityZones(serviceName){const availableAZs=core_1.ContextProvider.getValue(this,{provider:cxschema.ContextProvider.ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER,dummyValue:this.stack.availabilityZones,props:{serviceName}}).value;if(!Array.isArray(availableAZs))throw new Error(`Discovered AZs for endpoint service ${serviceName} must be an array`);return availableAZs}}exports.InterfaceVpcEndpoint=InterfaceVpcEndpoint,_f=JSII_RTTI_SYMBOL_1,InterfaceVpcEndpoint[_f]={fqn:"aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint",version:"2.34.0"};
|
|
1
|
+
"use strict";var _a,_b,_c,_d,_e,_f;Object.defineProperty(exports,"__esModule",{value:!0}),exports.InterfaceVpcEndpoint=exports.InterfaceVpcEndpointAwsService=exports.InterfaceVpcEndpointService=exports.GatewayVpcEndpoint=exports.GatewayVpcEndpointAwsService=exports.VpcEndpointType=exports.VpcEndpoint=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../aws-iam"),cxschema=require("../../cloud-assembly-schema"),core_1=require("../../core"),connections_1=require("./connections"),ec2_generated_1=require("./ec2.generated"),peer_1=require("./peer"),port_1=require("./port"),security_group_1=require("./security-group"),util_1=require("./util");class VpcEndpoint extends core_1.Resource{addToPolicy(statement){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_PolicyStatement(statement)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addToPolicy),error}if(!statement.hasPrincipal)throw new Error("Statement must have a `Principal`.");this.policyDocument||(this.policyDocument=new iam.PolicyDocument),this.policyDocument.addStatements(statement)}}exports.VpcEndpoint=VpcEndpoint,_a=JSII_RTTI_SYMBOL_1,VpcEndpoint[_a]={fqn:"aws-cdk-lib.aws_ec2.VpcEndpoint",version:"2.34.1"};var VpcEndpointType;(function(VpcEndpointType2){VpcEndpointType2.INTERFACE="Interface",VpcEndpointType2.GATEWAY="Gateway"})(VpcEndpointType=exports.VpcEndpointType||(exports.VpcEndpointType={}));class GatewayVpcEndpointAwsService{constructor(name,prefix){this.name=`${prefix||"com.amazonaws"}.${core_1.Aws.REGION}.${name}`}}exports.GatewayVpcEndpointAwsService=GatewayVpcEndpointAwsService,_b=JSII_RTTI_SYMBOL_1,GatewayVpcEndpointAwsService[_b]={fqn:"aws-cdk-lib.aws_ec2.GatewayVpcEndpointAwsService",version:"2.34.1"},GatewayVpcEndpointAwsService.DYNAMODB=new GatewayVpcEndpointAwsService("dynamodb"),GatewayVpcEndpointAwsService.S3=new GatewayVpcEndpointAwsService("s3");class GatewayVpcEndpoint extends VpcEndpoint{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_GatewayVpcEndpointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,GatewayVpcEndpoint),error}const subnets=props.subnets?util_1.flatten(props.subnets.map(s=>props.vpc.selectSubnets(s).subnets)):[...props.vpc.privateSubnets,...props.vpc.publicSubnets,...props.vpc.isolatedSubnets],routeTableIds=util_1.allRouteTableIds(subnets);if(routeTableIds.length===0)throw new Error("Can't add a gateway endpoint to VPC; route table IDs are not available");const endpoint=new ec2_generated_1.CfnVPCEndpoint(this,"Resource",{policyDocument:core_1.Lazy.any({produce:()=>this.policyDocument}),routeTableIds,serviceName:props.service.name,vpcEndpointType:VpcEndpointType.GATEWAY,vpcId:props.vpc.vpcId});this.vpcEndpointId=endpoint.ref,this.vpcEndpointCreationTimestamp=endpoint.attrCreationTimestamp,this.vpcEndpointDnsEntries=endpoint.attrDnsEntries,this.vpcEndpointNetworkInterfaceIds=endpoint.attrNetworkInterfaceIds}static fromGatewayVpcEndpointId(scope,id,gatewayVpcEndpointId){class Import extends VpcEndpoint{constructor(){super(...arguments),this.vpcEndpointId=gatewayVpcEndpointId}}return new Import(scope,id)}}exports.GatewayVpcEndpoint=GatewayVpcEndpoint,_c=JSII_RTTI_SYMBOL_1,GatewayVpcEndpoint[_c]={fqn:"aws-cdk-lib.aws_ec2.GatewayVpcEndpoint",version:"2.34.1"};class InterfaceVpcEndpointService{constructor(name,port){this.privateDnsDefault=!1,this.name=name,this.port=port||443}}exports.InterfaceVpcEndpointService=InterfaceVpcEndpointService,_d=JSII_RTTI_SYMBOL_1,InterfaceVpcEndpointService[_d]={fqn:"aws-cdk-lib.aws_ec2.InterfaceVpcEndpointService",version:"2.34.1"};class InterfaceVpcEndpointAwsService{constructor(name,prefix,port){this.privateDnsDefault=!0;const region=core_1.Lazy.uncachedString({produce:context=>core_1.Stack.of(context.scope).region}),defaultEndpointPrefix=core_1.Lazy.uncachedString({produce:context=>{const regionName=core_1.Stack.of(context.scope).region;return this.getDefaultEndpointPrefix(name,regionName)}}),defaultEndpointSuffix=core_1.Lazy.uncachedString({produce:context=>{const regionName=core_1.Stack.of(context.scope).region;return this.getDefaultEndpointSuffix(name,regionName)}});this.name=`${prefix||defaultEndpointPrefix}.${region}.${name}${defaultEndpointSuffix}`,this.shortName=name,this.port=port||443}getDefaultEndpointPrefix(name,region){return{"cn-north-1":["application-autoscaling","athena","autoscaling","awsconnector","cassandra","cloudformation","codedeploy-commands-secure","databrew","dms","ebs","ec2","ecr.api","ecr.dkr","elasticbeanstalk","elasticfilesystem","elasticfilesystem-fips","execute-api","imagebuilder","iotsitewise.api","iotsitewise.data","kinesis-streams","lambda","license-manager","monitoring","rds","redshift","redshift-data","s3","sagemaker.api","sagemaker.featurestore-runtime","sagemaker.runtime","servicecatalog","sms","sqs","states","sts","synthetics","transcribe","transcribestreaming","transfer","xray"],"cn-northwest-1":["application-autoscaling","athena","autoscaling","awsconnector","cassandra","cloudformation","codedeploy-commands-secure","databrew","dms","ebs","ec2","ecr.api","ecr.dkr","elasticbeanstalk","elasticfilesystem","elasticfilesystem-fips","execute-api","imagebuilder","kinesis-streams","lambda","license-manager","monitoring","rds","redshift","redshift-data","s3","sagemaker.api","sagemaker.featurestore-runtime","sagemaker.runtime","servicecatalog","sms","sqs","states","sts","synthetics","transcribe","transcribestreaming","transfer","workspaces","xray"]}[region]?.includes(name)?"cn.com.amazonaws":"com.amazonaws"}getDefaultEndpointSuffix(name,region){return{"cn-north-1":["transcribe"],"cn-northwest-1":["transcribe"]}[region]?.includes(name)?".cn":""}}exports.InterfaceVpcEndpointAwsService=InterfaceVpcEndpointAwsService,_e=JSII_RTTI_SYMBOL_1,InterfaceVpcEndpointAwsService[_e]={fqn:"aws-cdk-lib.aws_ec2.InterfaceVpcEndpointAwsService",version:"2.34.1"},InterfaceVpcEndpointAwsService.SAGEMAKER_NOTEBOOK=new InterfaceVpcEndpointAwsService("notebook","aws.sagemaker"),InterfaceVpcEndpointAwsService.ATHENA=new InterfaceVpcEndpointAwsService("athena"),InterfaceVpcEndpointAwsService.CLOUDFORMATION=new InterfaceVpcEndpointAwsService("cloudformation"),InterfaceVpcEndpointAwsService.CLOUDTRAIL=new InterfaceVpcEndpointAwsService("cloudtrail"),InterfaceVpcEndpointAwsService.CODEBUILD=new InterfaceVpcEndpointAwsService("codebuild"),InterfaceVpcEndpointAwsService.CODEBUILD_FIPS=new InterfaceVpcEndpointAwsService("codebuild-fips"),InterfaceVpcEndpointAwsService.CODECOMMIT=new InterfaceVpcEndpointAwsService("codecommit"),InterfaceVpcEndpointAwsService.CODECOMMIT_FIPS=new InterfaceVpcEndpointAwsService("codecommit-fips"),InterfaceVpcEndpointAwsService.CODEGURU_PROFILER=new InterfaceVpcEndpointAwsService("codeguru-profiler"),InterfaceVpcEndpointAwsService.CODEGURU_REVIEWER=new InterfaceVpcEndpointAwsService("codeguru-reviewer"),InterfaceVpcEndpointAwsService.CODEPIPELINE=new InterfaceVpcEndpointAwsService("codepipeline"),InterfaceVpcEndpointAwsService.CONFIG=new InterfaceVpcEndpointAwsService("config"),InterfaceVpcEndpointAwsService.EC2=new InterfaceVpcEndpointAwsService("ec2"),InterfaceVpcEndpointAwsService.EC2_MESSAGES=new InterfaceVpcEndpointAwsService("ec2messages"),InterfaceVpcEndpointAwsService.ECR=new InterfaceVpcEndpointAwsService("ecr.api"),InterfaceVpcEndpointAwsService.ECR_DOCKER=new InterfaceVpcEndpointAwsService("ecr.dkr"),InterfaceVpcEndpointAwsService.ECS=new InterfaceVpcEndpointAwsService("ecs"),InterfaceVpcEndpointAwsService.ECS_AGENT=new InterfaceVpcEndpointAwsService("ecs-agent"),InterfaceVpcEndpointAwsService.ECS_TELEMETRY=new InterfaceVpcEndpointAwsService("ecs-telemetry"),InterfaceVpcEndpointAwsService.ELASTIC_FILESYSTEM=new InterfaceVpcEndpointAwsService("elasticfilesystem"),InterfaceVpcEndpointAwsService.ELASTIC_FILESYSTEM_FIPS=new InterfaceVpcEndpointAwsService("elasticfilesystem-fips"),InterfaceVpcEndpointAwsService.ELASTIC_INFERENCE_RUNTIME=new InterfaceVpcEndpointAwsService("elastic-inference.runtime"),InterfaceVpcEndpointAwsService.ELASTIC_LOAD_BALANCING=new InterfaceVpcEndpointAwsService("elasticloadbalancing"),InterfaceVpcEndpointAwsService.CLOUDWATCH_EVENTS=new InterfaceVpcEndpointAwsService("events"),InterfaceVpcEndpointAwsService.APIGATEWAY=new InterfaceVpcEndpointAwsService("execute-api"),InterfaceVpcEndpointAwsService.CODECOMMIT_GIT=new InterfaceVpcEndpointAwsService("git-codecommit"),InterfaceVpcEndpointAwsService.CODECOMMIT_GIT_FIPS=new InterfaceVpcEndpointAwsService("git-codecommit-fips"),InterfaceVpcEndpointAwsService.GLUE=new InterfaceVpcEndpointAwsService("glue"),InterfaceVpcEndpointAwsService.KEYSPACES=new InterfaceVpcEndpointAwsService("cassandra","",9142),InterfaceVpcEndpointAwsService.KINESIS_STREAMS=new InterfaceVpcEndpointAwsService("kinesis-streams"),InterfaceVpcEndpointAwsService.KINESIS_FIREHOSE=new InterfaceVpcEndpointAwsService("kinesis-firehose"),InterfaceVpcEndpointAwsService.KMS=new InterfaceVpcEndpointAwsService("kms"),InterfaceVpcEndpointAwsService.CLOUDWATCH_LOGS=new InterfaceVpcEndpointAwsService("logs"),InterfaceVpcEndpointAwsService.CLOUDWATCH=new InterfaceVpcEndpointAwsService("monitoring"),InterfaceVpcEndpointAwsService.RDS=new InterfaceVpcEndpointAwsService("rds"),InterfaceVpcEndpointAwsService.RDS_DATA=new InterfaceVpcEndpointAwsService("rds-data"),InterfaceVpcEndpointAwsService.SAGEMAKER_API=new InterfaceVpcEndpointAwsService("sagemaker.api"),InterfaceVpcEndpointAwsService.SAGEMAKER_RUNTIME=new InterfaceVpcEndpointAwsService("sagemaker.runtime"),InterfaceVpcEndpointAwsService.SAGEMAKER_RUNTIME_FIPS=new InterfaceVpcEndpointAwsService("sagemaker.runtime-fips"),InterfaceVpcEndpointAwsService.SECRETS_MANAGER=new InterfaceVpcEndpointAwsService("secretsmanager"),InterfaceVpcEndpointAwsService.SERVICE_CATALOG=new InterfaceVpcEndpointAwsService("servicecatalog"),InterfaceVpcEndpointAwsService.SNS=new InterfaceVpcEndpointAwsService("sns"),InterfaceVpcEndpointAwsService.SQS=new InterfaceVpcEndpointAwsService("sqs"),InterfaceVpcEndpointAwsService.SSM=new InterfaceVpcEndpointAwsService("ssm"),InterfaceVpcEndpointAwsService.SSM_MESSAGES=new InterfaceVpcEndpointAwsService("ssmmessages"),InterfaceVpcEndpointAwsService.STS=new InterfaceVpcEndpointAwsService("sts"),InterfaceVpcEndpointAwsService.TEXTRACT=new InterfaceVpcEndpointAwsService("textract"),InterfaceVpcEndpointAwsService.TEXTRACT_FIPS=new InterfaceVpcEndpointAwsService("textract-fips"),InterfaceVpcEndpointAwsService.TRANSFER=new InterfaceVpcEndpointAwsService("transfer.server"),InterfaceVpcEndpointAwsService.STORAGE_GATEWAY=new InterfaceVpcEndpointAwsService("storagegateway"),InterfaceVpcEndpointAwsService.REKOGNITION=new InterfaceVpcEndpointAwsService("rekognition"),InterfaceVpcEndpointAwsService.REKOGNITION_FIPS=new InterfaceVpcEndpointAwsService("rekognition-fips"),InterfaceVpcEndpointAwsService.STEP_FUNCTIONS=new InterfaceVpcEndpointAwsService("states"),InterfaceVpcEndpointAwsService.LAMBDA=new InterfaceVpcEndpointAwsService("lambda"),InterfaceVpcEndpointAwsService.TRANSCRIBE=new InterfaceVpcEndpointAwsService("transcribe"),InterfaceVpcEndpointAwsService.XRAY=new InterfaceVpcEndpointAwsService("xray");class InterfaceVpcEndpoint extends VpcEndpoint{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_InterfaceVpcEndpointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,InterfaceVpcEndpoint),error}const securityGroups=props.securityGroups||[new security_group_1.SecurityGroup(this,"SecurityGroup",{vpc:props.vpc})];this.securityGroupId=securityGroups[0].securityGroupId,this.connections=new connections_1.Connections({defaultPort:port_1.Port.tcp(props.service.port),securityGroups}),props.open!==!1&&this.connections.allowDefaultPortFrom(peer_1.Peer.ipv4(props.vpc.vpcCidrBlock));const subnetIds=this.endpointSubnets(props),endpoint=new ec2_generated_1.CfnVPCEndpoint(this,"Resource",{privateDnsEnabled:props.privateDnsEnabled??props.service.privateDnsDefault??!0,policyDocument:core_1.Lazy.any({produce:()=>this.policyDocument}),securityGroupIds:securityGroups.map(s=>s.securityGroupId),serviceName:props.service.name,vpcEndpointType:VpcEndpointType.INTERFACE,subnetIds,vpcId:props.vpc.vpcId});this.vpcEndpointId=endpoint.ref,this.vpcEndpointCreationTimestamp=endpoint.attrCreationTimestamp,this.vpcEndpointDnsEntries=endpoint.attrDnsEntries,this.vpcEndpointNetworkInterfaceIds=endpoint.attrNetworkInterfaceIds}static fromInterfaceVpcEndpointAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_InterfaceVpcEndpointAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromInterfaceVpcEndpointAttributes),error}const securityGroups=attrs.securityGroupId?[security_group_1.SecurityGroup.fromSecurityGroupId(scope,"SecurityGroup",attrs.securityGroupId)]:attrs.securityGroups;class Import extends core_1.Resource{constructor(){super(...arguments),this.vpcEndpointId=attrs.vpcEndpointId,this.connections=new connections_1.Connections({defaultPort:port_1.Port.tcp(attrs.port),securityGroups})}}return new Import(scope,id)}endpointSubnets(props){const lookupSupportedAzs=props.lookupSupportedAzs??!1,subnetSelection=props.vpc.selectSubnets({...props.subnets,onePerAz:!0}),subnets=subnetSelection.subnets;if(!subnetSelection.isPendingLookup&&subnetSelection.subnets.length==0)throw new Error("Cannot create a VPC Endpoint with no subnets");if(!lookupSupportedAzs)return subnetSelection.subnetIds;const lookupServiceName=core_1.Token.isUnresolved(props.service.name)&&props.service instanceof InterfaceVpcEndpointAwsService?core_1.Stack.of(this).resolve(props.service.name):props.service.name;this.validateCanLookupSupportedAzs(subnets,lookupServiceName);const availableAZs=this.availableAvailabilityZones(lookupServiceName),filteredSubnets=subnets.filter(s=>availableAZs.includes(s.availabilityZone));if(filteredSubnets.length==0)throw new Error(`lookupSupportedAzs returned ${availableAZs} but subnets have AZs ${subnets.map(s=>s.availabilityZone)}`);return filteredSubnets.map(s=>s.subnetId)}validateCanLookupSupportedAzs(subnets,serviceName){const agnosticAcct=core_1.Token.isUnresolved(this.env.account),agnosticRegion=core_1.Token.isUnresolved(this.env.region),agnosticService=core_1.Token.isUnresolved(serviceName),agnosticSubnets=subnets.some(s=>core_1.Token.isUnresolved(s.availabilityZone)),agnosticSubnetList=core_1.Token.isUnresolved(subnets.map(s=>s.availabilityZone));if(agnosticAcct||agnosticRegion)throw new Error("Cannot look up VPC endpoint availability zones if account/region are not specified");if(agnosticService)throw new Error(`Cannot lookup AZs for a service name with a Token: ${serviceName}`);if(agnosticSubnets||agnosticSubnetList){const agnostic=subnets.filter(s=>core_1.Token.isUnresolved(s.availabilityZone));throw new Error(`lookupSupportedAzs cannot filter on subnets with Token AZs: ${agnostic}`)}}availableAvailabilityZones(serviceName){const availableAZs=core_1.ContextProvider.getValue(this,{provider:cxschema.ContextProvider.ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER,dummyValue:this.stack.availabilityZones,props:{serviceName}}).value;if(!Array.isArray(availableAZs))throw new Error(`Discovered AZs for endpoint service ${serviceName} must be an array`);return availableAZs}}exports.InterfaceVpcEndpoint=InterfaceVpcEndpoint,_f=JSII_RTTI_SYMBOL_1,InterfaceVpcEndpoint[_f]={fqn:"aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint",version:"2.34.1"};
|
|
2
2
|
//# sourceMappingURL=vpc-endpoint.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlowLog=exports.FlowLogDestination=exports.FlowLogFileFormat=exports.FlowLogResourceType=exports.FlowLogDestinationType=exports.FlowLogTrafficType=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../aws-iam"),logs=require("../../aws-logs"),s3=require("../../aws-s3"),core_1=require("../../core"),cx_api_1=require("../../cx-api"),ec2_generated_1=require("./ec2.generated");var FlowLogTrafficType;(function(FlowLogTrafficType2){FlowLogTrafficType2.ACCEPT="ACCEPT",FlowLogTrafficType2.ALL="ALL",FlowLogTrafficType2.REJECT="REJECT"})(FlowLogTrafficType=exports.FlowLogTrafficType||(exports.FlowLogTrafficType={}));var FlowLogDestinationType;(function(FlowLogDestinationType2){FlowLogDestinationType2.CLOUD_WATCH_LOGS="cloud-watch-logs",FlowLogDestinationType2.S3="s3"})(FlowLogDestinationType=exports.FlowLogDestinationType||(exports.FlowLogDestinationType={}));class FlowLogResourceType{static fromSubnet(subnet){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_ISubnet(subnet)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromSubnet),error}return{resourceType:"Subnet",resourceId:subnet.subnetId}}static fromVpc(vpc){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_IVpc(vpc)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromVpc),error}return{resourceType:"VPC",resourceId:vpc.vpcId}}static fromNetworkInterfaceId(id){return{resourceType:"NetworkInterface",resourceId:id}}}exports.FlowLogResourceType=FlowLogResourceType,_a=JSII_RTTI_SYMBOL_1,FlowLogResourceType[_a]={fqn:"aws-cdk-lib.aws_ec2.FlowLogResourceType",version:"2.34.
|
|
1
|
+
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlowLog=exports.FlowLogDestination=exports.FlowLogFileFormat=exports.FlowLogResourceType=exports.FlowLogDestinationType=exports.FlowLogTrafficType=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../aws-iam"),logs=require("../../aws-logs"),s3=require("../../aws-s3"),core_1=require("../../core"),cx_api_1=require("../../cx-api"),ec2_generated_1=require("./ec2.generated");var FlowLogTrafficType;(function(FlowLogTrafficType2){FlowLogTrafficType2.ACCEPT="ACCEPT",FlowLogTrafficType2.ALL="ALL",FlowLogTrafficType2.REJECT="REJECT"})(FlowLogTrafficType=exports.FlowLogTrafficType||(exports.FlowLogTrafficType={}));var FlowLogDestinationType;(function(FlowLogDestinationType2){FlowLogDestinationType2.CLOUD_WATCH_LOGS="cloud-watch-logs",FlowLogDestinationType2.S3="s3"})(FlowLogDestinationType=exports.FlowLogDestinationType||(exports.FlowLogDestinationType={}));class FlowLogResourceType{static fromSubnet(subnet){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_ISubnet(subnet)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromSubnet),error}return{resourceType:"Subnet",resourceId:subnet.subnetId}}static fromVpc(vpc){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_IVpc(vpc)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromVpc),error}return{resourceType:"VPC",resourceId:vpc.vpcId}}static fromNetworkInterfaceId(id){return{resourceType:"NetworkInterface",resourceId:id}}}exports.FlowLogResourceType=FlowLogResourceType,_a=JSII_RTTI_SYMBOL_1,FlowLogResourceType[_a]={fqn:"aws-cdk-lib.aws_ec2.FlowLogResourceType",version:"2.34.1"};var FlowLogFileFormat;(function(FlowLogFileFormat2){FlowLogFileFormat2.PLAIN_TEXT="plain-text",FlowLogFileFormat2.PARQUET="parquet"})(FlowLogFileFormat=exports.FlowLogFileFormat||(exports.FlowLogFileFormat={}));class FlowLogDestination{static toCloudWatchLogs(logGroup,iamRole){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_logs_ILogGroup(logGroup),jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IRole(iamRole)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.toCloudWatchLogs),error}return new CloudWatchLogsDestination({logDestinationType:FlowLogDestinationType.CLOUD_WATCH_LOGS,logGroup,iamRole})}static toS3(bucket,keyPrefix,options){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_IBucket(bucket),jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_S3DestinationOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.toS3),error}return new S3Destination({logDestinationType:FlowLogDestinationType.S3,s3Bucket:bucket,keyPrefix,destinationOptions:options})}}exports.FlowLogDestination=FlowLogDestination,_b=JSII_RTTI_SYMBOL_1,FlowLogDestination[_b]={fqn:"aws-cdk-lib.aws_ec2.FlowLogDestination",version:"2.34.1"};class S3Destination extends FlowLogDestination{constructor(props){super(),this.props=props}bind(scope,_flowLog){let s3Bucket;if(this.props.s3Bucket===void 0?s3Bucket=new s3.Bucket(scope,"Bucket",{encryption:s3.BucketEncryption.UNENCRYPTED,removalPolicy:core_1.RemovalPolicy.RETAIN}):s3Bucket=this.props.s3Bucket,core_1.FeatureFlags.of(scope).isEnabled(cx_api_1.S3_CREATE_DEFAULT_LOGGING_POLICY)){const stack=core_1.Stack.of(scope);let keyPrefix=this.props.keyPrefix??"";keyPrefix&&!keyPrefix.endsWith("/")&&(keyPrefix=keyPrefix+"/");const prefix=this.props.destinationOptions?.hiveCompatiblePartitions?s3Bucket.arnForObjects(`${keyPrefix}AWSLogs/aws-account-id=${stack.account}/*`):s3Bucket.arnForObjects(`${keyPrefix}AWSLogs/${stack.account}/*`);s3Bucket.addToResourcePolicy(new iam.PolicyStatement({effect:iam.Effect.ALLOW,principals:[new iam.ServicePrincipal("delivery.logs.amazonaws.com")],resources:[prefix],actions:["s3:PutObject"],conditions:{StringEquals:{"s3:x-amz-acl":"bucket-owner-full-control","aws:SourceAccount":stack.account},ArnLike:{"aws:SourceArn":stack.formatArn({service:"logs",resource:"*"})}}})),s3Bucket.addToResourcePolicy(new iam.PolicyStatement({effect:iam.Effect.ALLOW,principals:[new iam.ServicePrincipal("delivery.logs.amazonaws.com")],resources:[s3Bucket.bucketArn],actions:["s3:GetBucketAcl","s3:ListBucket"],conditions:{StringEquals:{"aws:SourceAccount":stack.account},ArnLike:{"aws:SourceArn":stack.formatArn({service:"logs",resource:"*"})}}}))}return{logDestinationType:FlowLogDestinationType.S3,s3Bucket,keyPrefix:this.props.keyPrefix,destinationOptions:this.props.destinationOptions?.fileFormat||this.props.destinationOptions?.perHourPartition||this.props.destinationOptions?.hiveCompatiblePartitions?{fileFormat:this.props.destinationOptions.fileFormat??FlowLogFileFormat.PLAIN_TEXT,perHourPartition:this.props.destinationOptions.perHourPartition??!1,hiveCompatiblePartitions:this.props.destinationOptions.hiveCompatiblePartitions??!1}:void 0}}}class CloudWatchLogsDestination extends FlowLogDestination{constructor(props){super(),this.props=props}bind(scope,_flowLog){let iamRole,logGroup;return this.props.iamRole===void 0?iamRole=new iam.Role(scope,"IAMRole",{roleName:core_1.PhysicalName.GENERATE_IF_NEEDED,assumedBy:new iam.ServicePrincipal("vpc-flow-logs.amazonaws.com")}):iamRole=this.props.iamRole,this.props.logGroup===void 0?logGroup=new logs.LogGroup(scope,"LogGroup"):logGroup=this.props.logGroup,iamRole.addToPrincipalPolicy(new iam.PolicyStatement({actions:["logs:CreateLogStream","logs:PutLogEvents","logs:DescribeLogStreams"],effect:iam.Effect.ALLOW,resources:[logGroup.logGroupArn]})),iamRole.addToPrincipalPolicy(new iam.PolicyStatement({actions:["iam:PassRole"],effect:iam.Effect.ALLOW,resources:[iamRole.roleArn]})),{logDestinationType:FlowLogDestinationType.CLOUD_WATCH_LOGS,logGroup,iamRole}}}class FlowLogBase extends core_1.Resource{}class FlowLog extends FlowLogBase{constructor(scope,id,props){super(scope,id,{physicalName:props.flowLogName});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_FlowLogProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,FlowLog),error}const destinationConfig=(props.destination||FlowLogDestination.toCloudWatchLogs()).bind(this,this);this.logGroup=destinationConfig.logGroup,this.bucket=destinationConfig.s3Bucket,this.iamRole=destinationConfig.iamRole,this.keyPrefix=destinationConfig.keyPrefix;let logDestination;this.bucket&&(logDestination=this.keyPrefix?this.bucket.arnForObjects(this.keyPrefix):this.bucket.bucketArn);const flowLog=new ec2_generated_1.CfnFlowLog(this,"FlowLog",{destinationOptions:destinationConfig.destinationOptions,deliverLogsPermissionArn:this.iamRole?this.iamRole.roleArn:void 0,logDestinationType:destinationConfig.logDestinationType,logGroupName:this.logGroup?this.logGroup.logGroupName:void 0,resourceId:props.resourceType.resourceId,resourceType:props.resourceType.resourceType,trafficType:props.trafficType?props.trafficType:FlowLogTrafficType.ALL,logDestination});this.flowLogId=flowLog.ref,this.node.defaultChild=flowLog}static fromFlowLogId(scope,id,flowLogId){class Import extends FlowLogBase{constructor(){super(...arguments),this.flowLogId=flowLogId}}return new Import(scope,id)}}exports.FlowLog=FlowLog,_c=JSII_RTTI_SYMBOL_1,FlowLog[_c]={fqn:"aws-cdk-lib.aws_ec2.FlowLog",version:"2.34.1"};
|
|
2
2
|
//# sourceMappingURL=vpc-flow-logs.js.map
|
package/aws-ec2/lib/vpc.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var _a,_b,_c,_d;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PrivateSubnet=exports.PublicSubnet=exports.RouterType=exports.Subnet=exports.Vpc=exports.DefaultInstanceTenancy=exports.SubnetType=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cxschema=require("../../cloud-assembly-schema"),core_1=require("../../core"),cxapi=require("../../cx-api"),constructs_1=require("constructs"),client_vpn_endpoint_1=require("./client-vpn-endpoint"),ec2_generated_1=require("./ec2.generated"),nat_1=require("./nat"),network_acl_1=require("./network-acl"),network_util_1=require("./network-util"),subnet_1=require("./subnet"),util_1=require("./util"),vpc_endpoint_1=require("./vpc-endpoint"),vpc_flow_logs_1=require("./vpc-flow-logs"),vpn_1=require("./vpn"),VPC_SUBNET_SYMBOL=Symbol.for("@aws-cdk/aws-ec2.VpcSubnet");var SubnetType;(function(SubnetType2){SubnetType2.PRIVATE_ISOLATED="Isolated",SubnetType2.ISOLATED="Deprecated_Isolated",SubnetType2.PRIVATE_WITH_NAT="Private",SubnetType2.PRIVATE="Deprecated_Private",SubnetType2.PUBLIC="Public"})(SubnetType=exports.SubnetType||(exports.SubnetType={}));class VpcBase extends core_1.Resource{constructor(){super(...arguments),this.natDependencies=new Array,this.incompleteSubnetDefinition=!1}selectSubnets(selection={}){const subnets=this.selectSubnetObjects(selection),pubs=new Set(this.publicSubnets);return{subnetIds:subnets.map(s=>s.subnetId),get availabilityZones(){return subnets.map(s=>s.availabilityZone)},internetConnectivityEstablished:tap(new CompositeDependable,d=>subnets.forEach(s=>d.add(s.internetConnectivityEstablished))),subnets,hasPublic:subnets.some(s=>pubs.has(s)),isPendingLookup:this.incompleteSubnetDefinition}}enableVpnGateway(options){if(this.vpnGatewayId)throw new Error("The VPN Gateway has already been enabled.");const vpnGateway=new vpn_1.VpnGateway(this,"VpnGateway",{amazonSideAsn:options.amazonSideAsn,type:vpn_1.VpnConnectionType.IPSEC_1});this._vpnGatewayId=vpnGateway.gatewayId;const attachment=new ec2_generated_1.CfnVPCGatewayAttachment(this,"VPCVPNGW",{vpcId:this.vpcId,vpnGatewayId:this._vpnGatewayId}),vpnRoutePropagation=options.vpnRoutePropagation??[{}],routeTableIds=util_1.allRouteTableIds(util_1.flatten(vpnRoutePropagation.map(s=>this.selectSubnets(s).subnets)));routeTableIds.length===0&&core_1.Annotations.of(this).addError(`enableVpnGateway: no subnets matching selection: '${JSON.stringify(vpnRoutePropagation)}'. Select other subnets to add routes to.`),new ec2_generated_1.CfnVPNGatewayRoutePropagation(this,"RoutePropagation",{routeTableIds,vpnGatewayId:this._vpnGatewayId}).node.addDependency(attachment)}addVpnConnection(id,options){return new vpn_1.VpnConnection(this,id,{vpc:this,...options})}addClientVpnEndpoint(id,options){return new client_vpn_endpoint_1.ClientVpnEndpoint(this,id,{...options,vpc:this})}addInterfaceEndpoint(id,options){return new vpc_endpoint_1.InterfaceVpcEndpoint(this,id,{vpc:this,...options})}addGatewayEndpoint(id,options){return new vpc_endpoint_1.GatewayVpcEndpoint(this,id,{vpc:this,...options})}addFlowLog(id,options){return new vpc_flow_logs_1.FlowLog(this,id,{resourceType:vpc_flow_logs_1.FlowLogResourceType.fromVpc(this),...options})}get vpnGatewayId(){return this._vpnGatewayId}selectSubnetObjects(selection={}){if(selection=this.reifySelectionDefaults(selection),selection.subnets!==void 0)return selection.subnets;let subnets;if(selection.subnetGroupName!==void 0)subnets=this.selectSubnetObjectsByName(selection.subnetGroupName);else{const type=selection.subnetType||SubnetType.PRIVATE_WITH_NAT;subnets=this.selectSubnetObjectsByType(type)}return subnets=this.applySubnetFilters(subnets,selection.subnetFilters??[]),subnets}applySubnetFilters(subnets,filters){let filtered=subnets;for(const filter of filters)filtered=filter.selectSubnets(filtered);return filtered}selectSubnetObjectsByName(groupName){const allSubnets=[...this.publicSubnets,...this.privateSubnets,...this.isolatedSubnets],subnets=allSubnets.filter(s=>util_1.subnetGroupNameFromConstructId(s)===groupName);if(subnets.length===0&&!this.incompleteSubnetDefinition){const names=Array.from(new Set(allSubnets.map(util_1.subnetGroupNameFromConstructId)));throw new Error(`There are no subnet groups with name '${groupName}' in this VPC. Available names: ${names}`)}return subnets}selectSubnetObjectsByType(subnetType){const allSubnets={[SubnetType.PRIVATE_ISOLATED]:this.isolatedSubnets,[SubnetType.ISOLATED]:this.isolatedSubnets,[SubnetType.PRIVATE_WITH_NAT]:this.privateSubnets,[SubnetType.PRIVATE]:this.privateSubnets,[SubnetType.PUBLIC]:this.publicSubnets},subnets=allSubnets[subnetType];if(subnets.length===0&&!this.incompleteSubnetDefinition){const availableTypes=Object.entries(allSubnets).filter(([_,subs])=>subs.length>0).map(([typeName,_])=>typeName);throw new Error(`There are no '${subnetType}' subnet groups in this VPC. Available types: ${availableTypes}`)}return subnets}reifySelectionDefaults(placement){if(placement.subnetName!==void 0){if(placement.subnetGroupName!==void 0)throw new Error("Please use only 'subnetGroupName' ('subnetName' is deprecated and has the same behavior)");core_1.Annotations.of(this).addWarning("Usage of 'subnetName' in SubnetSelection is deprecated, use 'subnetGroupName' instead"),placement={...placement,subnetGroupName:placement.subnetName}}const providedSelections=["subnets","subnetType","subnetGroupName"].filter(key=>placement[key]!==void 0);if(providedSelections.length>1)throw new Error(`Only one of '${providedSelections}' can be supplied to subnet selection.`);if(placement.subnetType===void 0&&placement.subnetGroupName===void 0&&placement.subnets===void 0){let subnetType=this.privateSubnets.length?SubnetType.PRIVATE_WITH_NAT:this.isolatedSubnets.length?SubnetType.PRIVATE_ISOLATED:SubnetType.PUBLIC;placement={...placement,subnetType}}let subnetFilters=placement.subnetFilters??[];placement.availabilityZones!==void 0&&subnetFilters.push(subnet_1.SubnetFilter.availabilityZones(placement.availabilityZones)),placement.onePerAz&&subnetFilters.push(subnet_1.SubnetFilter.onePerAz()),placement={...placement,subnetFilters,availabilityZones:void 0,onePerAz:void 0};const{availabilityZones,onePerAz,...rest}=placement;return rest}}const NAME_TAG="Name";var DefaultInstanceTenancy;(function(DefaultInstanceTenancy2){DefaultInstanceTenancy2.DEFAULT="default",DefaultInstanceTenancy2.DEDICATED="dedicated"})(DefaultInstanceTenancy=exports.DefaultInstanceTenancy||(exports.DefaultInstanceTenancy={}));class Vpc extends VpcBase{constructor(scope,id,props={}){super(scope,id),this.publicSubnets=[],this.privateSubnets=[],this.isolatedSubnets=[],this.subnetConfiguration=[],this._internetConnectivityEstablished=new constructs_1.DependencyGroup;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_VpcProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Vpc),error}const stack=core_1.Stack.of(this);if(props.enableDnsHostnames&&!props.enableDnsSupport)throw new Error("To use DNS Hostnames, DNS Support must be enabled, however, it was explicitly disabled.");if(props.availabilityZones&&props.maxAzs)throw new Error("Vpc supports 'availabilityZones' or 'maxAzs', but not both.");const cidrBlock=ifUndefined(props.cidr,Vpc.DEFAULT_CIDR_RANGE);if(core_1.Token.isUnresolved(cidrBlock))throw new Error("'cidr' property must be a concrete CIDR string, got a Token (we need to parse it for automatic subdivision)");this.networkBuilder=new network_util_1.NetworkBuilder(cidrBlock),this.dnsHostnamesEnabled=props.enableDnsHostnames==null?!0:props.enableDnsHostnames,this.dnsSupportEnabled=props.enableDnsSupport==null?!0:props.enableDnsSupport;const instanceTenancy=props.defaultInstanceTenancy||"default";if(this.internetConnectivityEstablished=this._internetConnectivityEstablished,this.resource=new ec2_generated_1.CfnVPC(this,"Resource",{cidrBlock,enableDnsHostnames:this.dnsHostnamesEnabled,enableDnsSupport:this.dnsSupportEnabled,instanceTenancy}),this.vpcDefaultNetworkAcl=this.resource.attrDefaultNetworkAcl,this.vpcCidrBlockAssociations=this.resource.attrCidrBlockAssociations,this.vpcCidrBlock=this.resource.attrCidrBlock,this.vpcDefaultSecurityGroup=this.resource.attrDefaultSecurityGroup,this.vpcIpv6CidrBlocks=this.resource.attrIpv6CidrBlocks,core_1.Tags.of(this).add(NAME_TAG,props.vpcName||this.node.path),props.availabilityZones){const resolvedStackAzs=stack.availabilityZones.filter(az=>!core_1.Token.isUnresolved(az));if(!(resolvedStackAzs.length===0||props.availabilityZones.every(az=>core_1.Token.isUnresolved(az)||resolvedStackAzs.includes(az))))throw new Error(`Given VPC 'availabilityZones' ${props.availabilityZones} must be a subset of the stack's availability zones ${stack.availabilityZones}`);this.availabilityZones=props.availabilityZones}else{const maxAZs=props.maxAzs??3;this.availabilityZones=stack.availabilityZones.slice(0,maxAZs)}this.vpcId=this.resource.ref,this.vpcArn=core_1.Arn.format({service:"ec2",resource:"vpc",resourceName:this.vpcId},stack);const defaultSubnet=props.natGateways===0?Vpc.DEFAULT_SUBNETS_NO_NAT:Vpc.DEFAULT_SUBNETS;this.subnetConfiguration=ifUndefined(props.subnetConfiguration,defaultSubnet);const natGatewayPlacement=props.natGatewaySubnets||{subnetType:SubnetType.PUBLIC},natGatewayCount=determineNatGatewayCount(props.natGateways,this.subnetConfiguration,this.availabilityZones.length);if(this.createSubnets(),this.subnetConfiguration.filter(subnet=>subnet.subnetType!==SubnetType.PRIVATE_ISOLATED&&subnet.subnetType!==SubnetType.ISOLATED).length>0){const igw=new ec2_generated_1.CfnInternetGateway(this,"IGW",{});this.internetGatewayId=igw.ref,this._internetConnectivityEstablished.add(igw);const att=new ec2_generated_1.CfnVPCGatewayAttachment(this,"VPCGW",{internetGatewayId:igw.ref,vpcId:this.resource.ref});if(this.publicSubnets.forEach(publicSubnet=>{publicSubnet.addDefaultInternetRoute(igw.ref,att)}),natGatewayCount>0){const provider=props.natGatewayProvider||nat_1.NatProvider.gateway();this.createNatGateways(provider,natGatewayCount,natGatewayPlacement)}}if(props.vpnGateway&&this.publicSubnets.length===0&&this.privateSubnets.length===0&&this.isolatedSubnets.length===0)throw new Error("Can not enable the VPN gateway while the VPC has no subnets at all");if((props.vpnConnections||props.vpnGatewayAsn)&&props.vpnGateway===!1)throw new Error("Cannot specify `vpnConnections` or `vpnGatewayAsn` when `vpnGateway` is set to false.");if(props.vpnGateway||props.vpnConnections||props.vpnGatewayAsn){this.enableVpnGateway({amazonSideAsn:props.vpnGatewayAsn,type:vpn_1.VpnConnectionType.IPSEC_1,vpnRoutePropagation:props.vpnRoutePropagation});const vpnConnections=props.vpnConnections||{};for(const[connectionId,connection]of Object.entries(vpnConnections))this.addVpnConnection(connectionId,connection)}if(props.gatewayEndpoints){const gatewayEndpoints=props.gatewayEndpoints||{};for(const[endpointId,endpoint]of Object.entries(gatewayEndpoints))this.addGatewayEndpoint(endpointId,endpoint)}if(props.flowLogs){const flowLogs=props.flowLogs||{};for(const[flowLogId,flowLog]of Object.entries(flowLogs))this.addFlowLog(flowLogId,flowLog)}}static fromVpcAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_VpcAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromVpcAttributes),error}return new ImportedVpc(scope,id,attrs,!1)}static fromLookup(scope,id,options){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_VpcLookupOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromLookup),error}if(core_1.Token.isUnresolved(options.vpcId)||core_1.Token.isUnresolved(options.vpcName)||Object.values(options.tags||{}).some(core_1.Token.isUnresolved)||Object.keys(options.tags||{}).some(core_1.Token.isUnresolved))throw new Error("All arguments to Vpc.fromLookup() must be concrete (no Tokens)");const filter=makeTagFilter(options.tags);options.vpcId&&(filter["vpc-id"]=options.vpcId),options.vpcName&&(filter["tag:Name"]=options.vpcName),options.isDefault!==void 0&&(filter.isDefault=options.isDefault?"true":"false");const overrides={};options.region&&(overrides.region=options.region);const attributes=core_1.ContextProvider.getValue(scope,{provider:cxschema.ContextProvider.VPC_PROVIDER,props:{...overrides,filter,returnAsymmetricSubnets:!0,subnetGroupNameTag:options.subnetGroupNameTag},dummyValue:void 0}).value;return new LookedUpVpc(scope,id,attributes||DUMMY_VPC_PROPS,attributes===void 0);function makeTagFilter(tags){const result={};for(const[name,value]of Object.entries(tags||{}))result[`tag:${name}`]=value;return result}}addS3Endpoint(id,subnets){return new vpc_endpoint_1.GatewayVpcEndpoint(this,id,{service:vpc_endpoint_1.GatewayVpcEndpointAwsService.S3,vpc:this,subnets})}addDynamoDbEndpoint(id,subnets){return new vpc_endpoint_1.GatewayVpcEndpoint(this,id,{service:vpc_endpoint_1.GatewayVpcEndpointAwsService.DYNAMODB,vpc:this,subnets})}createNatGateways(provider,natCount,placement){const natSubnets=this.selectSubnetObjects(placement);for(const sub of natSubnets)if(this.publicSubnets.indexOf(sub)===-1)throw new Error(`natGatewayPlacement ${placement} contains non public subnet ${sub}`);provider.configureNat({vpc:this,natSubnets:natSubnets.slice(0,natCount),privateSubnets:this.privateSubnets})}createSubnets(){const remainingSpaceSubnets=[];for(const subnet of this.subnetConfiguration){if(subnet.cidrMask===void 0){remainingSpaceSubnets.push(subnet);continue}this.createSubnetResources(subnet,subnet.cidrMask)}const totalRemaining=remainingSpaceSubnets.length*this.availabilityZones.length,cidrMaskForRemaining=this.networkBuilder.maskForRemainingSubnets(totalRemaining);for(const subnet of remainingSpaceSubnets)this.createSubnetResources(subnet,cidrMaskForRemaining)}createSubnetResources(subnetConfig,cidrMask){this.availabilityZones.forEach((zone,index)=>{if(subnetConfig.reserved===!0){this.networkBuilder.addSubnet(cidrMask);return}let mapPublicIpOnLaunch=!1;if(subnetConfig.subnetType!==SubnetType.PUBLIC&&subnetConfig.mapPublicIpOnLaunch!==void 0)throw new Error(`${subnetConfig.subnetType} subnet cannot include mapPublicIpOnLaunch parameter`);subnetConfig.subnetType===SubnetType.PUBLIC&&(mapPublicIpOnLaunch=subnetConfig.mapPublicIpOnLaunch!==void 0?subnetConfig.mapPublicIpOnLaunch:!0);const name=util_1.subnetId(subnetConfig.name,index),subnetProps={availabilityZone:zone,vpcId:this.vpcId,cidrBlock:this.networkBuilder.addSubnet(cidrMask),mapPublicIpOnLaunch};let subnet;switch(subnetConfig.subnetType){case SubnetType.PUBLIC:const publicSubnet=new PublicSubnet(this,name,subnetProps);this.publicSubnets.push(publicSubnet),subnet=publicSubnet;break;case SubnetType.PRIVATE_WITH_NAT:case SubnetType.PRIVATE:const privateSubnet=new PrivateSubnet(this,name,subnetProps);this.privateSubnets.push(privateSubnet),subnet=privateSubnet;break;case SubnetType.PRIVATE_ISOLATED:case SubnetType.ISOLATED:const isolatedSubnet=new PrivateSubnet(this,name,subnetProps);this.isolatedSubnets.push(isolatedSubnet),subnet=isolatedSubnet;break;default:throw new Error(`Unrecognized subnet type: ${subnetConfig.subnetType}`)}const includeResourceTypes=[ec2_generated_1.CfnSubnet.CFN_RESOURCE_TYPE_NAME];core_1.Tags.of(subnet).add(SUBNETNAME_TAG,subnetConfig.name,{includeResourceTypes}),core_1.Tags.of(subnet).add(SUBNETTYPE_TAG,subnetTypeTagValue(subnetConfig.subnetType),{includeResourceTypes})})}}exports.Vpc=Vpc,_a=JSII_RTTI_SYMBOL_1,Vpc[_a]={fqn:"aws-cdk-lib.aws_ec2.Vpc",version:"2.34.0"},Vpc.DEFAULT_CIDR_RANGE="10.0.0.0/16",Vpc.DEFAULT_SUBNETS=[{subnetType:SubnetType.PUBLIC,name:util_1.defaultSubnetName(SubnetType.PUBLIC)},{subnetType:SubnetType.PRIVATE_WITH_NAT,name:util_1.defaultSubnetName(SubnetType.PRIVATE_WITH_NAT)}],Vpc.DEFAULT_SUBNETS_NO_NAT=[{subnetType:SubnetType.PUBLIC,name:util_1.defaultSubnetName(SubnetType.PUBLIC)},{subnetType:SubnetType.PRIVATE_ISOLATED,name:util_1.defaultSubnetName(SubnetType.PRIVATE_ISOLATED)}];const SUBNETTYPE_TAG="aws-cdk:subnet-type",SUBNETNAME_TAG="aws-cdk:subnet-name";function subnetTypeTagValue(type){switch(type){case SubnetType.PUBLIC:return"Public";case SubnetType.PRIVATE_WITH_NAT:case SubnetType.PRIVATE:return"Private";case SubnetType.PRIVATE_ISOLATED:case SubnetType.ISOLATED:return"Isolated"}}class Subnet extends core_1.Resource{constructor(scope,id,props){super(scope,id),this.dependencyElements=[],this._internetConnectivityEstablished=new constructs_1.DependencyGroup;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_SubnetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Subnet),error}Object.defineProperty(this,VPC_SUBNET_SYMBOL,{value:!0}),core_1.Tags.of(this).add(NAME_TAG,this.node.path),this.availabilityZone=props.availabilityZone,this.ipv4CidrBlock=props.cidrBlock;const subnet=new ec2_generated_1.CfnSubnet(this,"Subnet",{vpcId:props.vpcId,cidrBlock:props.cidrBlock,availabilityZone:props.availabilityZone,mapPublicIpOnLaunch:props.mapPublicIpOnLaunch});this.subnetId=subnet.ref,this.subnetVpcId=subnet.attrVpcId,this.subnetAvailabilityZone=subnet.attrAvailabilityZone,this.subnetIpv6CidrBlocks=subnet.attrIpv6CidrBlocks,this.subnetOutpostArn=subnet.attrOutpostArn,this._networkAcl=network_acl_1.NetworkAcl.fromNetworkAclId(this,"Acl",subnet.attrNetworkAclAssociationId),this.subnetNetworkAclAssociationId=core_1.Lazy.string({produce:()=>this._networkAcl.networkAclId}),this.node.defaultChild=subnet;const table=new ec2_generated_1.CfnRouteTable(this,"RouteTable",{vpcId:props.vpcId});this.routeTable={routeTableId:table.ref},new ec2_generated_1.CfnSubnetRouteTableAssociation(this,"RouteTableAssociation",{subnetId:this.subnetId,routeTableId:table.ref}),this.internetConnectivityEstablished=this._internetConnectivityEstablished}static isVpcSubnet(x){return VPC_SUBNET_SYMBOL in x}static fromSubnetAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_SubnetAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromSubnetAttributes),error}return new ImportedSubnet(scope,id,attrs)}static fromSubnetId(scope,id,subnetId){return this.fromSubnetAttributes(scope,id,{subnetId})}addDefaultInternetRoute(gatewayId,gatewayAttachment){const route=new ec2_generated_1.CfnRoute(this,"DefaultRoute",{routeTableId:this.routeTable.routeTableId,destinationCidrBlock:"0.0.0.0/0",gatewayId});route.node.addDependency(gatewayAttachment),this._internetConnectivityEstablished.add(route)}get networkAcl(){return this._networkAcl}addDefaultNatRoute(natGatewayId){this.addRoute("DefaultRoute",{routerType:RouterType.NAT_GATEWAY,routerId:natGatewayId,enablesInternetConnectivity:!0})}addRoute(id,options){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_AddRouteOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addRoute),error}if(options.destinationCidrBlock&&options.destinationIpv6CidrBlock)throw new Error("Cannot specify both 'destinationCidrBlock' and 'destinationIpv6CidrBlock'");const route=new ec2_generated_1.CfnRoute(this,id,{routeTableId:this.routeTable.routeTableId,destinationCidrBlock:options.destinationCidrBlock||(options.destinationIpv6CidrBlock===void 0?"0.0.0.0/0":void 0),destinationIpv6CidrBlock:options.destinationIpv6CidrBlock,[routerTypeToPropName(options.routerType)]:options.routerId});options.enablesInternetConnectivity&&this._internetConnectivityEstablished.add(route)}associateNetworkAcl(id,networkAcl){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_INetworkAcl(networkAcl)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.associateNetworkAcl),error}this._networkAcl=networkAcl;const scope=networkAcl instanceof constructs_1.Construct?networkAcl:this,other=networkAcl instanceof constructs_1.Construct?this:networkAcl;new network_acl_1.SubnetNetworkAclAssociation(scope,id+core_1.Names.nodeUniqueId(other.node),{networkAcl,subnet:this})}}exports.Subnet=Subnet,_b=JSII_RTTI_SYMBOL_1,Subnet[_b]={fqn:"aws-cdk-lib.aws_ec2.Subnet",version:"2.34.0"};var RouterType;(function(RouterType2){RouterType2.CARRIER_GATEWAY="CarrierGateway",RouterType2.EGRESS_ONLY_INTERNET_GATEWAY="EgressOnlyInternetGateway",RouterType2.GATEWAY="Gateway",RouterType2.INSTANCE="Instance",RouterType2.LOCAL_GATEWAY="LocalGateway",RouterType2.NAT_GATEWAY="NatGateway",RouterType2.NETWORK_INTERFACE="NetworkInterface",RouterType2.TRANSIT_GATEWAY="TransitGateway",RouterType2.VPC_PEERING_CONNECTION="VpcPeeringConnection",RouterType2.VPC_ENDPOINT="VpcEndpoint"})(RouterType=exports.RouterType||(exports.RouterType={}));function routerTypeToPropName(routerType){return{[RouterType.CARRIER_GATEWAY]:"carrierGatewayId",[RouterType.EGRESS_ONLY_INTERNET_GATEWAY]:"egressOnlyInternetGatewayId",[RouterType.GATEWAY]:"gatewayId",[RouterType.INSTANCE]:"instanceId",[RouterType.LOCAL_GATEWAY]:"localGatewayId",[RouterType.NAT_GATEWAY]:"natGatewayId",[RouterType.NETWORK_INTERFACE]:"networkInterfaceId",[RouterType.TRANSIT_GATEWAY]:"transitGatewayId",[RouterType.VPC_PEERING_CONNECTION]:"vpcPeeringConnectionId",[RouterType.VPC_ENDPOINT]:"vpcEndpointId"}[routerType]}class PublicSubnet extends Subnet{constructor(scope,id,props){super(scope,id,props);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_PublicSubnetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,PublicSubnet),error}}static fromPublicSubnetAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_PublicSubnetAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromPublicSubnetAttributes),error}return new ImportedSubnet(scope,id,attrs)}addNatGateway(eipAllocationId){return new ec2_generated_1.CfnNatGateway(this,"NATGateway",{subnetId:this.subnetId,allocationId:eipAllocationId??new ec2_generated_1.CfnEIP(this,"EIP",{domain:"vpc"}).attrAllocationId})}}exports.PublicSubnet=PublicSubnet,_c=JSII_RTTI_SYMBOL_1,PublicSubnet[_c]={fqn:"aws-cdk-lib.aws_ec2.PublicSubnet",version:"2.34.0"};class PrivateSubnet extends Subnet{constructor(scope,id,props){super(scope,id,props);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_PrivateSubnetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,PrivateSubnet),error}}static fromPrivateSubnetAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_PrivateSubnetAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromPrivateSubnetAttributes),error}return new ImportedSubnet(scope,id,attrs)}}exports.PrivateSubnet=PrivateSubnet,_d=JSII_RTTI_SYMBOL_1,PrivateSubnet[_d]={fqn:"aws-cdk-lib.aws_ec2.PrivateSubnet",version:"2.34.0"};function ifUndefined(value,defaultValue){return value??defaultValue}class ImportedVpc extends VpcBase{constructor(scope,id,props,isIncomplete){super(scope,id),this.internetConnectivityEstablished=new constructs_1.DependencyGroup,this.vpcId=props.vpcId,this.vpcArn=core_1.Arn.format({service:"ec2",resource:"vpc",resourceName:this.vpcId},core_1.Stack.of(this)),this.cidr=props.vpcCidrBlock,this.availabilityZones=props.availabilityZones,this._vpnGatewayId=props.vpnGatewayId,this.incompleteSubnetDefinition=isIncomplete;for(const k of Object.keys(props))Array.isArray(props[k])&&core_1.Token.isUnresolved(props[k])&&core_1.Annotations.of(this).addWarning(`fromVpcAttributes: '${k}' is a list token: the imported VPC will not work with constructs that require a list of subnets at synthesis time. Use 'Vpc.fromLookup()' or 'Fn.importListValue' instead.`);const pub=new util_1.ImportSubnetGroup(props.publicSubnetIds,props.publicSubnetNames,props.publicSubnetRouteTableIds,SubnetType.PUBLIC,this.availabilityZones,"publicSubnetIds","publicSubnetNames","publicSubnetRouteTableIds"),priv=new util_1.ImportSubnetGroup(props.privateSubnetIds,props.privateSubnetNames,props.privateSubnetRouteTableIds,SubnetType.PRIVATE_WITH_NAT,this.availabilityZones,"privateSubnetIds","privateSubnetNames","privateSubnetRouteTableIds"),iso=new util_1.ImportSubnetGroup(props.isolatedSubnetIds,props.isolatedSubnetNames,props.isolatedSubnetRouteTableIds,SubnetType.PRIVATE_ISOLATED,this.availabilityZones,"isolatedSubnetIds","isolatedSubnetNames","isolatedSubnetRouteTableIds");this.publicSubnets=pub.import(this),this.privateSubnets=priv.import(this),this.isolatedSubnets=iso.import(this)}get vpcCidrBlock(){if(this.cidr===void 0)throw new Error("Cannot perform this operation: 'vpcCidrBlock' was not supplied when creating this VPC");return this.cidr}}class LookedUpVpc extends VpcBase{constructor(scope,id,props,isIncomplete){super(scope,id),this.internetConnectivityEstablished=new constructs_1.DependencyGroup,this.vpcId=props.vpcId,this.vpcArn=core_1.Arn.format({service:"ec2",resource:"vpc",resourceName:this.vpcId},core_1.Stack.of(this)),this.cidr=props.vpcCidrBlock,this._vpnGatewayId=props.vpnGatewayId,this.incompleteSubnetDefinition=isIncomplete;const subnetGroups=props.subnetGroups||[],availabilityZones=Array.from(new Set(flatMap(subnetGroups,subnetGroup=>subnetGroup.subnets.map(subnet=>subnet.availabilityZone))));availabilityZones.sort((az1,az2)=>az1.localeCompare(az2)),this.availabilityZones=availabilityZones,this.publicSubnets=this.extractSubnetsOfType(subnetGroups,cxapi.VpcSubnetGroupType.PUBLIC),this.privateSubnets=this.extractSubnetsOfType(subnetGroups,cxapi.VpcSubnetGroupType.PRIVATE),this.isolatedSubnets=this.extractSubnetsOfType(subnetGroups,cxapi.VpcSubnetGroupType.ISOLATED)}get vpcCidrBlock(){if(this.cidr===void 0)throw new Error("Cannot perform this operation: 'vpcCidrBlock' was not found when looking up this VPC. Use a newer version of the CDK CLI and clear the old context value.");return this.cidr}extractSubnetsOfType(subnetGroups,subnetGroupType){return flatMap(subnetGroups.filter(subnetGroup=>subnetGroup.type===subnetGroupType),subnetGroup=>this.subnetGroupToSubnets(subnetGroup))}subnetGroupToSubnets(subnetGroup){const ret=new Array;for(let i=0;i<subnetGroup.subnets.length;i++){const vpcSubnet=subnetGroup.subnets[i];ret.push(Subnet.fromSubnetAttributes(this,`${subnetGroup.name}Subnet${i+1}`,{availabilityZone:vpcSubnet.availabilityZone,subnetId:vpcSubnet.subnetId,routeTableId:vpcSubnet.routeTableId,ipv4CidrBlock:vpcSubnet.cidr}))}return ret}}function flatMap(xs,fn){const ret=new Array;for(const x of xs)ret.push(...fn(x));return ret}class CompositeDependable{constructor(){this.dependables=new Array;const self=this;constructs_1.Dependable.implement(this,{get dependencyRoots(){const ret=new Array;for(const dep of self.dependables)ret.push(...constructs_1.Dependable.of(dep).dependencyRoots);return ret}})}add(dep){this.dependables.push(dep)}}function tap(x,fn){return fn(x),x}class ImportedSubnet extends core_1.Resource{constructor(scope,id,attrs){if(super(scope,id),this.internetConnectivityEstablished=new constructs_1.DependencyGroup,!attrs.routeTableId){const ref=core_1.Token.isUnresolved(attrs.subnetId)||core_1.Token.isUnresolved([attrs.subnetId])?`at '${constructs_1.Node.of(scope).path}/${id}'`:`'${attrs.subnetId}'`;core_1.Annotations.of(this).addWarning(`No routeTableId was provided to the subnet ${ref}. Attempting to read its .routeTable.routeTableId will return null/undefined. (More info: https://github.com/aws/aws-cdk/pull/3171)`)}this._ipv4CidrBlock=attrs.ipv4CidrBlock,this._availabilityZone=attrs.availabilityZone,this.subnetId=attrs.subnetId,this.routeTable={routeTableId:attrs.routeTableId}}get availabilityZone(){if(!this._availabilityZone)throw new Error("You cannot reference a Subnet's availability zone if it was not supplied. Add the availabilityZone when importing using Subnet.fromSubnetAttributes()");return this._availabilityZone}get ipv4CidrBlock(){if(!this._ipv4CidrBlock)throw new Error("You cannot reference an imported Subnet's IPv4 CIDR if it was not supplied. Add the ipv4CidrBlock when importing using Subnet.fromSubnetAttributes()");return this._ipv4CidrBlock}associateNetworkAcl(id,networkAcl){const scope=networkAcl instanceof constructs_1.Construct?networkAcl:this,other=networkAcl instanceof constructs_1.Construct?this:networkAcl;new network_acl_1.SubnetNetworkAclAssociation(scope,id+core_1.Names.nodeUniqueId(other.node),{networkAcl,subnet:this})}}function determineNatGatewayCount(requestedCount,subnetConfig,azCount){const hasPrivateSubnets=subnetConfig.some(c=>(c.subnetType===SubnetType.PRIVATE_WITH_NAT||c.subnetType===SubnetType.PRIVATE)&&!c.reserved),hasPublicSubnets=subnetConfig.some(c=>c.subnetType===SubnetType.PUBLIC),count=requestedCount!==void 0?Math.min(requestedCount,azCount):hasPrivateSubnets?azCount:0;if(count===0&&hasPrivateSubnets)throw new Error("If you do not want NAT gateways (natGateways=0), make sure you don't configure any PRIVATE subnets in 'subnetConfiguration' (make them PUBLIC or ISOLATED instead)");if(count>0&&!hasPublicSubnets)throw new Error(`If you configure PRIVATE subnets in 'subnetConfiguration', you must also configure PUBLIC subnets to put the NAT gateways into (got ${JSON.stringify(subnetConfig)}.`);return count}const DUMMY_VPC_PROPS={availabilityZones:[],vpcCidrBlock:"1.2.3.4/5",isolatedSubnetIds:void 0,isolatedSubnetNames:void 0,isolatedSubnetRouteTableIds:void 0,privateSubnetIds:void 0,privateSubnetNames:void 0,privateSubnetRouteTableIds:void 0,publicSubnetIds:void 0,publicSubnetNames:void 0,publicSubnetRouteTableIds:void 0,subnetGroups:[{name:"Public",type:cxapi.VpcSubnetGroupType.PUBLIC,subnets:[{availabilityZone:"dummy1a",subnetId:"s-12345",routeTableId:"rtb-12345s",cidr:"1.2.3.4/5"},{availabilityZone:"dummy1b",subnetId:"s-67890",routeTableId:"rtb-67890s",cidr:"1.2.3.4/5"}]},{name:"Private",type:cxapi.VpcSubnetGroupType.PRIVATE,subnets:[{availabilityZone:"dummy1a",subnetId:"p-12345",routeTableId:"rtb-12345p",cidr:"1.2.3.4/5"},{availabilityZone:"dummy1b",subnetId:"p-67890",routeTableId:"rtb-57890p",cidr:"1.2.3.4/5"}]},{name:"Isolated",type:cxapi.VpcSubnetGroupType.ISOLATED,subnets:[{availabilityZone:"dummy1a",subnetId:"p-12345",routeTableId:"rtb-12345p",cidr:"1.2.3.4/5"},{availabilityZone:"dummy1b",subnetId:"p-67890",routeTableId:"rtb-57890p",cidr:"1.2.3.4/5"}]}],vpcId:"vpc-12345"};
|
|
1
|
+
"use strict";var _a,_b,_c,_d;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PrivateSubnet=exports.PublicSubnet=exports.RouterType=exports.Subnet=exports.Vpc=exports.DefaultInstanceTenancy=exports.SubnetType=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cxschema=require("../../cloud-assembly-schema"),core_1=require("../../core"),cxapi=require("../../cx-api"),constructs_1=require("constructs"),client_vpn_endpoint_1=require("./client-vpn-endpoint"),ec2_generated_1=require("./ec2.generated"),nat_1=require("./nat"),network_acl_1=require("./network-acl"),network_util_1=require("./network-util"),subnet_1=require("./subnet"),util_1=require("./util"),vpc_endpoint_1=require("./vpc-endpoint"),vpc_flow_logs_1=require("./vpc-flow-logs"),vpn_1=require("./vpn"),VPC_SUBNET_SYMBOL=Symbol.for("@aws-cdk/aws-ec2.VpcSubnet");var SubnetType;(function(SubnetType2){SubnetType2.PRIVATE_ISOLATED="Isolated",SubnetType2.ISOLATED="Deprecated_Isolated",SubnetType2.PRIVATE_WITH_NAT="Private",SubnetType2.PRIVATE="Deprecated_Private",SubnetType2.PUBLIC="Public"})(SubnetType=exports.SubnetType||(exports.SubnetType={}));class VpcBase extends core_1.Resource{constructor(){super(...arguments),this.natDependencies=new Array,this.incompleteSubnetDefinition=!1}selectSubnets(selection={}){const subnets=this.selectSubnetObjects(selection),pubs=new Set(this.publicSubnets);return{subnetIds:subnets.map(s=>s.subnetId),get availabilityZones(){return subnets.map(s=>s.availabilityZone)},internetConnectivityEstablished:tap(new CompositeDependable,d=>subnets.forEach(s=>d.add(s.internetConnectivityEstablished))),subnets,hasPublic:subnets.some(s=>pubs.has(s)),isPendingLookup:this.incompleteSubnetDefinition}}enableVpnGateway(options){if(this.vpnGatewayId)throw new Error("The VPN Gateway has already been enabled.");const vpnGateway=new vpn_1.VpnGateway(this,"VpnGateway",{amazonSideAsn:options.amazonSideAsn,type:vpn_1.VpnConnectionType.IPSEC_1});this._vpnGatewayId=vpnGateway.gatewayId;const attachment=new ec2_generated_1.CfnVPCGatewayAttachment(this,"VPCVPNGW",{vpcId:this.vpcId,vpnGatewayId:this._vpnGatewayId}),vpnRoutePropagation=options.vpnRoutePropagation??[{}],routeTableIds=util_1.allRouteTableIds(util_1.flatten(vpnRoutePropagation.map(s=>this.selectSubnets(s).subnets)));routeTableIds.length===0&&core_1.Annotations.of(this).addError(`enableVpnGateway: no subnets matching selection: '${JSON.stringify(vpnRoutePropagation)}'. Select other subnets to add routes to.`),new ec2_generated_1.CfnVPNGatewayRoutePropagation(this,"RoutePropagation",{routeTableIds,vpnGatewayId:this._vpnGatewayId}).node.addDependency(attachment)}addVpnConnection(id,options){return new vpn_1.VpnConnection(this,id,{vpc:this,...options})}addClientVpnEndpoint(id,options){return new client_vpn_endpoint_1.ClientVpnEndpoint(this,id,{...options,vpc:this})}addInterfaceEndpoint(id,options){return new vpc_endpoint_1.InterfaceVpcEndpoint(this,id,{vpc:this,...options})}addGatewayEndpoint(id,options){return new vpc_endpoint_1.GatewayVpcEndpoint(this,id,{vpc:this,...options})}addFlowLog(id,options){return new vpc_flow_logs_1.FlowLog(this,id,{resourceType:vpc_flow_logs_1.FlowLogResourceType.fromVpc(this),...options})}get vpnGatewayId(){return this._vpnGatewayId}selectSubnetObjects(selection={}){if(selection=this.reifySelectionDefaults(selection),selection.subnets!==void 0)return selection.subnets;let subnets;if(selection.subnetGroupName!==void 0)subnets=this.selectSubnetObjectsByName(selection.subnetGroupName);else{const type=selection.subnetType||SubnetType.PRIVATE_WITH_NAT;subnets=this.selectSubnetObjectsByType(type)}return subnets=this.applySubnetFilters(subnets,selection.subnetFilters??[]),subnets}applySubnetFilters(subnets,filters){let filtered=subnets;for(const filter of filters)filtered=filter.selectSubnets(filtered);return filtered}selectSubnetObjectsByName(groupName){const allSubnets=[...this.publicSubnets,...this.privateSubnets,...this.isolatedSubnets],subnets=allSubnets.filter(s=>util_1.subnetGroupNameFromConstructId(s)===groupName);if(subnets.length===0&&!this.incompleteSubnetDefinition){const names=Array.from(new Set(allSubnets.map(util_1.subnetGroupNameFromConstructId)));throw new Error(`There are no subnet groups with name '${groupName}' in this VPC. Available names: ${names}`)}return subnets}selectSubnetObjectsByType(subnetType){const allSubnets={[SubnetType.PRIVATE_ISOLATED]:this.isolatedSubnets,[SubnetType.ISOLATED]:this.isolatedSubnets,[SubnetType.PRIVATE_WITH_NAT]:this.privateSubnets,[SubnetType.PRIVATE]:this.privateSubnets,[SubnetType.PUBLIC]:this.publicSubnets},subnets=allSubnets[subnetType];if(subnets.length===0&&!this.incompleteSubnetDefinition){const availableTypes=Object.entries(allSubnets).filter(([_,subs])=>subs.length>0).map(([typeName,_])=>typeName);throw new Error(`There are no '${subnetType}' subnet groups in this VPC. Available types: ${availableTypes}`)}return subnets}reifySelectionDefaults(placement){if(placement.subnetName!==void 0){if(placement.subnetGroupName!==void 0)throw new Error("Please use only 'subnetGroupName' ('subnetName' is deprecated and has the same behavior)");core_1.Annotations.of(this).addWarning("Usage of 'subnetName' in SubnetSelection is deprecated, use 'subnetGroupName' instead"),placement={...placement,subnetGroupName:placement.subnetName}}const providedSelections=["subnets","subnetType","subnetGroupName"].filter(key=>placement[key]!==void 0);if(providedSelections.length>1)throw new Error(`Only one of '${providedSelections}' can be supplied to subnet selection.`);if(placement.subnetType===void 0&&placement.subnetGroupName===void 0&&placement.subnets===void 0){let subnetType=this.privateSubnets.length?SubnetType.PRIVATE_WITH_NAT:this.isolatedSubnets.length?SubnetType.PRIVATE_ISOLATED:SubnetType.PUBLIC;placement={...placement,subnetType}}let subnetFilters=placement.subnetFilters??[];placement.availabilityZones!==void 0&&subnetFilters.push(subnet_1.SubnetFilter.availabilityZones(placement.availabilityZones)),placement.onePerAz&&subnetFilters.push(subnet_1.SubnetFilter.onePerAz()),placement={...placement,subnetFilters,availabilityZones:void 0,onePerAz:void 0};const{availabilityZones,onePerAz,...rest}=placement;return rest}}const NAME_TAG="Name";var DefaultInstanceTenancy;(function(DefaultInstanceTenancy2){DefaultInstanceTenancy2.DEFAULT="default",DefaultInstanceTenancy2.DEDICATED="dedicated"})(DefaultInstanceTenancy=exports.DefaultInstanceTenancy||(exports.DefaultInstanceTenancy={}));class Vpc extends VpcBase{constructor(scope,id,props={}){super(scope,id),this.publicSubnets=[],this.privateSubnets=[],this.isolatedSubnets=[],this.subnetConfiguration=[],this._internetConnectivityEstablished=new constructs_1.DependencyGroup;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_VpcProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Vpc),error}const stack=core_1.Stack.of(this);if(props.enableDnsHostnames&&!props.enableDnsSupport)throw new Error("To use DNS Hostnames, DNS Support must be enabled, however, it was explicitly disabled.");if(props.availabilityZones&&props.maxAzs)throw new Error("Vpc supports 'availabilityZones' or 'maxAzs', but not both.");const cidrBlock=ifUndefined(props.cidr,Vpc.DEFAULT_CIDR_RANGE);if(core_1.Token.isUnresolved(cidrBlock))throw new Error("'cidr' property must be a concrete CIDR string, got a Token (we need to parse it for automatic subdivision)");this.networkBuilder=new network_util_1.NetworkBuilder(cidrBlock),this.dnsHostnamesEnabled=props.enableDnsHostnames==null?!0:props.enableDnsHostnames,this.dnsSupportEnabled=props.enableDnsSupport==null?!0:props.enableDnsSupport;const instanceTenancy=props.defaultInstanceTenancy||"default";if(this.internetConnectivityEstablished=this._internetConnectivityEstablished,this.resource=new ec2_generated_1.CfnVPC(this,"Resource",{cidrBlock,enableDnsHostnames:this.dnsHostnamesEnabled,enableDnsSupport:this.dnsSupportEnabled,instanceTenancy}),this.vpcDefaultNetworkAcl=this.resource.attrDefaultNetworkAcl,this.vpcCidrBlockAssociations=this.resource.attrCidrBlockAssociations,this.vpcCidrBlock=this.resource.attrCidrBlock,this.vpcDefaultSecurityGroup=this.resource.attrDefaultSecurityGroup,this.vpcIpv6CidrBlocks=this.resource.attrIpv6CidrBlocks,core_1.Tags.of(this).add(NAME_TAG,props.vpcName||this.node.path),props.availabilityZones){const resolvedStackAzs=stack.availabilityZones.filter(az=>!core_1.Token.isUnresolved(az));if(!(resolvedStackAzs.length===0||props.availabilityZones.every(az=>core_1.Token.isUnresolved(az)||resolvedStackAzs.includes(az))))throw new Error(`Given VPC 'availabilityZones' ${props.availabilityZones} must be a subset of the stack's availability zones ${stack.availabilityZones}`);this.availabilityZones=props.availabilityZones}else{const maxAZs=props.maxAzs??3;this.availabilityZones=stack.availabilityZones.slice(0,maxAZs)}this.vpcId=this.resource.ref,this.vpcArn=core_1.Arn.format({service:"ec2",resource:"vpc",resourceName:this.vpcId},stack);const defaultSubnet=props.natGateways===0?Vpc.DEFAULT_SUBNETS_NO_NAT:Vpc.DEFAULT_SUBNETS;this.subnetConfiguration=ifUndefined(props.subnetConfiguration,defaultSubnet);const natGatewayPlacement=props.natGatewaySubnets||{subnetType:SubnetType.PUBLIC},natGatewayCount=determineNatGatewayCount(props.natGateways,this.subnetConfiguration,this.availabilityZones.length);if(this.createSubnets(),this.subnetConfiguration.filter(subnet=>subnet.subnetType!==SubnetType.PRIVATE_ISOLATED&&subnet.subnetType!==SubnetType.ISOLATED).length>0){const igw=new ec2_generated_1.CfnInternetGateway(this,"IGW",{});this.internetGatewayId=igw.ref,this._internetConnectivityEstablished.add(igw);const att=new ec2_generated_1.CfnVPCGatewayAttachment(this,"VPCGW",{internetGatewayId:igw.ref,vpcId:this.resource.ref});if(this.publicSubnets.forEach(publicSubnet=>{publicSubnet.addDefaultInternetRoute(igw.ref,att)}),natGatewayCount>0){const provider=props.natGatewayProvider||nat_1.NatProvider.gateway();this.createNatGateways(provider,natGatewayCount,natGatewayPlacement)}}if(props.vpnGateway&&this.publicSubnets.length===0&&this.privateSubnets.length===0&&this.isolatedSubnets.length===0)throw new Error("Can not enable the VPN gateway while the VPC has no subnets at all");if((props.vpnConnections||props.vpnGatewayAsn)&&props.vpnGateway===!1)throw new Error("Cannot specify `vpnConnections` or `vpnGatewayAsn` when `vpnGateway` is set to false.");if(props.vpnGateway||props.vpnConnections||props.vpnGatewayAsn){this.enableVpnGateway({amazonSideAsn:props.vpnGatewayAsn,type:vpn_1.VpnConnectionType.IPSEC_1,vpnRoutePropagation:props.vpnRoutePropagation});const vpnConnections=props.vpnConnections||{};for(const[connectionId,connection]of Object.entries(vpnConnections))this.addVpnConnection(connectionId,connection)}if(props.gatewayEndpoints){const gatewayEndpoints=props.gatewayEndpoints||{};for(const[endpointId,endpoint]of Object.entries(gatewayEndpoints))this.addGatewayEndpoint(endpointId,endpoint)}if(props.flowLogs){const flowLogs=props.flowLogs||{};for(const[flowLogId,flowLog]of Object.entries(flowLogs))this.addFlowLog(flowLogId,flowLog)}}static fromVpcAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_VpcAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromVpcAttributes),error}return new ImportedVpc(scope,id,attrs,!1)}static fromLookup(scope,id,options){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_VpcLookupOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromLookup),error}if(core_1.Token.isUnresolved(options.vpcId)||core_1.Token.isUnresolved(options.vpcName)||Object.values(options.tags||{}).some(core_1.Token.isUnresolved)||Object.keys(options.tags||{}).some(core_1.Token.isUnresolved))throw new Error("All arguments to Vpc.fromLookup() must be concrete (no Tokens)");const filter=makeTagFilter(options.tags);options.vpcId&&(filter["vpc-id"]=options.vpcId),options.vpcName&&(filter["tag:Name"]=options.vpcName),options.isDefault!==void 0&&(filter.isDefault=options.isDefault?"true":"false");const overrides={};options.region&&(overrides.region=options.region);const attributes=core_1.ContextProvider.getValue(scope,{provider:cxschema.ContextProvider.VPC_PROVIDER,props:{...overrides,filter,returnAsymmetricSubnets:!0,subnetGroupNameTag:options.subnetGroupNameTag},dummyValue:void 0}).value;return new LookedUpVpc(scope,id,attributes||DUMMY_VPC_PROPS,attributes===void 0);function makeTagFilter(tags){const result={};for(const[name,value]of Object.entries(tags||{}))result[`tag:${name}`]=value;return result}}addS3Endpoint(id,subnets){return new vpc_endpoint_1.GatewayVpcEndpoint(this,id,{service:vpc_endpoint_1.GatewayVpcEndpointAwsService.S3,vpc:this,subnets})}addDynamoDbEndpoint(id,subnets){return new vpc_endpoint_1.GatewayVpcEndpoint(this,id,{service:vpc_endpoint_1.GatewayVpcEndpointAwsService.DYNAMODB,vpc:this,subnets})}createNatGateways(provider,natCount,placement){const natSubnets=this.selectSubnetObjects(placement);for(const sub of natSubnets)if(this.publicSubnets.indexOf(sub)===-1)throw new Error(`natGatewayPlacement ${placement} contains non public subnet ${sub}`);provider.configureNat({vpc:this,natSubnets:natSubnets.slice(0,natCount),privateSubnets:this.privateSubnets})}createSubnets(){const remainingSpaceSubnets=[];for(const subnet of this.subnetConfiguration){if(subnet.cidrMask===void 0){remainingSpaceSubnets.push(subnet);continue}this.createSubnetResources(subnet,subnet.cidrMask)}const totalRemaining=remainingSpaceSubnets.length*this.availabilityZones.length,cidrMaskForRemaining=this.networkBuilder.maskForRemainingSubnets(totalRemaining);for(const subnet of remainingSpaceSubnets)this.createSubnetResources(subnet,cidrMaskForRemaining)}createSubnetResources(subnetConfig,cidrMask){this.availabilityZones.forEach((zone,index)=>{if(subnetConfig.reserved===!0){this.networkBuilder.addSubnet(cidrMask);return}let mapPublicIpOnLaunch=!1;if(subnetConfig.subnetType!==SubnetType.PUBLIC&&subnetConfig.mapPublicIpOnLaunch!==void 0)throw new Error(`${subnetConfig.subnetType} subnet cannot include mapPublicIpOnLaunch parameter`);subnetConfig.subnetType===SubnetType.PUBLIC&&(mapPublicIpOnLaunch=subnetConfig.mapPublicIpOnLaunch!==void 0?subnetConfig.mapPublicIpOnLaunch:!0);const name=util_1.subnetId(subnetConfig.name,index),subnetProps={availabilityZone:zone,vpcId:this.vpcId,cidrBlock:this.networkBuilder.addSubnet(cidrMask),mapPublicIpOnLaunch};let subnet;switch(subnetConfig.subnetType){case SubnetType.PUBLIC:const publicSubnet=new PublicSubnet(this,name,subnetProps);this.publicSubnets.push(publicSubnet),subnet=publicSubnet;break;case SubnetType.PRIVATE_WITH_NAT:case SubnetType.PRIVATE:const privateSubnet=new PrivateSubnet(this,name,subnetProps);this.privateSubnets.push(privateSubnet),subnet=privateSubnet;break;case SubnetType.PRIVATE_ISOLATED:case SubnetType.ISOLATED:const isolatedSubnet=new PrivateSubnet(this,name,subnetProps);this.isolatedSubnets.push(isolatedSubnet),subnet=isolatedSubnet;break;default:throw new Error(`Unrecognized subnet type: ${subnetConfig.subnetType}`)}const includeResourceTypes=[ec2_generated_1.CfnSubnet.CFN_RESOURCE_TYPE_NAME];core_1.Tags.of(subnet).add(SUBNETNAME_TAG,subnetConfig.name,{includeResourceTypes}),core_1.Tags.of(subnet).add(SUBNETTYPE_TAG,subnetTypeTagValue(subnetConfig.subnetType),{includeResourceTypes})})}}exports.Vpc=Vpc,_a=JSII_RTTI_SYMBOL_1,Vpc[_a]={fqn:"aws-cdk-lib.aws_ec2.Vpc",version:"2.34.1"},Vpc.DEFAULT_CIDR_RANGE="10.0.0.0/16",Vpc.DEFAULT_SUBNETS=[{subnetType:SubnetType.PUBLIC,name:util_1.defaultSubnetName(SubnetType.PUBLIC)},{subnetType:SubnetType.PRIVATE_WITH_NAT,name:util_1.defaultSubnetName(SubnetType.PRIVATE_WITH_NAT)}],Vpc.DEFAULT_SUBNETS_NO_NAT=[{subnetType:SubnetType.PUBLIC,name:util_1.defaultSubnetName(SubnetType.PUBLIC)},{subnetType:SubnetType.PRIVATE_ISOLATED,name:util_1.defaultSubnetName(SubnetType.PRIVATE_ISOLATED)}];const SUBNETTYPE_TAG="aws-cdk:subnet-type",SUBNETNAME_TAG="aws-cdk:subnet-name";function subnetTypeTagValue(type){switch(type){case SubnetType.PUBLIC:return"Public";case SubnetType.PRIVATE_WITH_NAT:case SubnetType.PRIVATE:return"Private";case SubnetType.PRIVATE_ISOLATED:case SubnetType.ISOLATED:return"Isolated"}}class Subnet extends core_1.Resource{constructor(scope,id,props){super(scope,id),this.dependencyElements=[],this._internetConnectivityEstablished=new constructs_1.DependencyGroup;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_SubnetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Subnet),error}Object.defineProperty(this,VPC_SUBNET_SYMBOL,{value:!0}),core_1.Tags.of(this).add(NAME_TAG,this.node.path),this.availabilityZone=props.availabilityZone,this.ipv4CidrBlock=props.cidrBlock;const subnet=new ec2_generated_1.CfnSubnet(this,"Subnet",{vpcId:props.vpcId,cidrBlock:props.cidrBlock,availabilityZone:props.availabilityZone,mapPublicIpOnLaunch:props.mapPublicIpOnLaunch});this.subnetId=subnet.ref,this.subnetVpcId=subnet.attrVpcId,this.subnetAvailabilityZone=subnet.attrAvailabilityZone,this.subnetIpv6CidrBlocks=subnet.attrIpv6CidrBlocks,this.subnetOutpostArn=subnet.attrOutpostArn,this._networkAcl=network_acl_1.NetworkAcl.fromNetworkAclId(this,"Acl",subnet.attrNetworkAclAssociationId),this.subnetNetworkAclAssociationId=core_1.Lazy.string({produce:()=>this._networkAcl.networkAclId}),this.node.defaultChild=subnet;const table=new ec2_generated_1.CfnRouteTable(this,"RouteTable",{vpcId:props.vpcId});this.routeTable={routeTableId:table.ref},new ec2_generated_1.CfnSubnetRouteTableAssociation(this,"RouteTableAssociation",{subnetId:this.subnetId,routeTableId:table.ref}),this.internetConnectivityEstablished=this._internetConnectivityEstablished}static isVpcSubnet(x){return VPC_SUBNET_SYMBOL in x}static fromSubnetAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_SubnetAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromSubnetAttributes),error}return new ImportedSubnet(scope,id,attrs)}static fromSubnetId(scope,id,subnetId){return this.fromSubnetAttributes(scope,id,{subnetId})}addDefaultInternetRoute(gatewayId,gatewayAttachment){const route=new ec2_generated_1.CfnRoute(this,"DefaultRoute",{routeTableId:this.routeTable.routeTableId,destinationCidrBlock:"0.0.0.0/0",gatewayId});route.node.addDependency(gatewayAttachment),this._internetConnectivityEstablished.add(route)}get networkAcl(){return this._networkAcl}addDefaultNatRoute(natGatewayId){this.addRoute("DefaultRoute",{routerType:RouterType.NAT_GATEWAY,routerId:natGatewayId,enablesInternetConnectivity:!0})}addRoute(id,options){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_AddRouteOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addRoute),error}if(options.destinationCidrBlock&&options.destinationIpv6CidrBlock)throw new Error("Cannot specify both 'destinationCidrBlock' and 'destinationIpv6CidrBlock'");const route=new ec2_generated_1.CfnRoute(this,id,{routeTableId:this.routeTable.routeTableId,destinationCidrBlock:options.destinationCidrBlock||(options.destinationIpv6CidrBlock===void 0?"0.0.0.0/0":void 0),destinationIpv6CidrBlock:options.destinationIpv6CidrBlock,[routerTypeToPropName(options.routerType)]:options.routerId});options.enablesInternetConnectivity&&this._internetConnectivityEstablished.add(route)}associateNetworkAcl(id,networkAcl){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_INetworkAcl(networkAcl)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.associateNetworkAcl),error}this._networkAcl=networkAcl;const scope=networkAcl instanceof constructs_1.Construct?networkAcl:this,other=networkAcl instanceof constructs_1.Construct?this:networkAcl;new network_acl_1.SubnetNetworkAclAssociation(scope,id+core_1.Names.nodeUniqueId(other.node),{networkAcl,subnet:this})}}exports.Subnet=Subnet,_b=JSII_RTTI_SYMBOL_1,Subnet[_b]={fqn:"aws-cdk-lib.aws_ec2.Subnet",version:"2.34.1"};var RouterType;(function(RouterType2){RouterType2.CARRIER_GATEWAY="CarrierGateway",RouterType2.EGRESS_ONLY_INTERNET_GATEWAY="EgressOnlyInternetGateway",RouterType2.GATEWAY="Gateway",RouterType2.INSTANCE="Instance",RouterType2.LOCAL_GATEWAY="LocalGateway",RouterType2.NAT_GATEWAY="NatGateway",RouterType2.NETWORK_INTERFACE="NetworkInterface",RouterType2.TRANSIT_GATEWAY="TransitGateway",RouterType2.VPC_PEERING_CONNECTION="VpcPeeringConnection",RouterType2.VPC_ENDPOINT="VpcEndpoint"})(RouterType=exports.RouterType||(exports.RouterType={}));function routerTypeToPropName(routerType){return{[RouterType.CARRIER_GATEWAY]:"carrierGatewayId",[RouterType.EGRESS_ONLY_INTERNET_GATEWAY]:"egressOnlyInternetGatewayId",[RouterType.GATEWAY]:"gatewayId",[RouterType.INSTANCE]:"instanceId",[RouterType.LOCAL_GATEWAY]:"localGatewayId",[RouterType.NAT_GATEWAY]:"natGatewayId",[RouterType.NETWORK_INTERFACE]:"networkInterfaceId",[RouterType.TRANSIT_GATEWAY]:"transitGatewayId",[RouterType.VPC_PEERING_CONNECTION]:"vpcPeeringConnectionId",[RouterType.VPC_ENDPOINT]:"vpcEndpointId"}[routerType]}class PublicSubnet extends Subnet{constructor(scope,id,props){super(scope,id,props);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_PublicSubnetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,PublicSubnet),error}}static fromPublicSubnetAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_PublicSubnetAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromPublicSubnetAttributes),error}return new ImportedSubnet(scope,id,attrs)}addNatGateway(eipAllocationId){return new ec2_generated_1.CfnNatGateway(this,"NATGateway",{subnetId:this.subnetId,allocationId:eipAllocationId??new ec2_generated_1.CfnEIP(this,"EIP",{domain:"vpc"}).attrAllocationId})}}exports.PublicSubnet=PublicSubnet,_c=JSII_RTTI_SYMBOL_1,PublicSubnet[_c]={fqn:"aws-cdk-lib.aws_ec2.PublicSubnet",version:"2.34.1"};class PrivateSubnet extends Subnet{constructor(scope,id,props){super(scope,id,props);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_PrivateSubnetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,PrivateSubnet),error}}static fromPrivateSubnetAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_PrivateSubnetAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromPrivateSubnetAttributes),error}return new ImportedSubnet(scope,id,attrs)}}exports.PrivateSubnet=PrivateSubnet,_d=JSII_RTTI_SYMBOL_1,PrivateSubnet[_d]={fqn:"aws-cdk-lib.aws_ec2.PrivateSubnet",version:"2.34.1"};function ifUndefined(value,defaultValue){return value??defaultValue}class ImportedVpc extends VpcBase{constructor(scope,id,props,isIncomplete){super(scope,id),this.internetConnectivityEstablished=new constructs_1.DependencyGroup,this.vpcId=props.vpcId,this.vpcArn=core_1.Arn.format({service:"ec2",resource:"vpc",resourceName:this.vpcId},core_1.Stack.of(this)),this.cidr=props.vpcCidrBlock,this.availabilityZones=props.availabilityZones,this._vpnGatewayId=props.vpnGatewayId,this.incompleteSubnetDefinition=isIncomplete;for(const k of Object.keys(props))Array.isArray(props[k])&&core_1.Token.isUnresolved(props[k])&&core_1.Annotations.of(this).addWarning(`fromVpcAttributes: '${k}' is a list token: the imported VPC will not work with constructs that require a list of subnets at synthesis time. Use 'Vpc.fromLookup()' or 'Fn.importListValue' instead.`);const pub=new util_1.ImportSubnetGroup(props.publicSubnetIds,props.publicSubnetNames,props.publicSubnetRouteTableIds,SubnetType.PUBLIC,this.availabilityZones,"publicSubnetIds","publicSubnetNames","publicSubnetRouteTableIds"),priv=new util_1.ImportSubnetGroup(props.privateSubnetIds,props.privateSubnetNames,props.privateSubnetRouteTableIds,SubnetType.PRIVATE_WITH_NAT,this.availabilityZones,"privateSubnetIds","privateSubnetNames","privateSubnetRouteTableIds"),iso=new util_1.ImportSubnetGroup(props.isolatedSubnetIds,props.isolatedSubnetNames,props.isolatedSubnetRouteTableIds,SubnetType.PRIVATE_ISOLATED,this.availabilityZones,"isolatedSubnetIds","isolatedSubnetNames","isolatedSubnetRouteTableIds");this.publicSubnets=pub.import(this),this.privateSubnets=priv.import(this),this.isolatedSubnets=iso.import(this)}get vpcCidrBlock(){if(this.cidr===void 0)throw new Error("Cannot perform this operation: 'vpcCidrBlock' was not supplied when creating this VPC");return this.cidr}}class LookedUpVpc extends VpcBase{constructor(scope,id,props,isIncomplete){super(scope,id),this.internetConnectivityEstablished=new constructs_1.DependencyGroup,this.vpcId=props.vpcId,this.vpcArn=core_1.Arn.format({service:"ec2",resource:"vpc",resourceName:this.vpcId},core_1.Stack.of(this)),this.cidr=props.vpcCidrBlock,this._vpnGatewayId=props.vpnGatewayId,this.incompleteSubnetDefinition=isIncomplete;const subnetGroups=props.subnetGroups||[],availabilityZones=Array.from(new Set(flatMap(subnetGroups,subnetGroup=>subnetGroup.subnets.map(subnet=>subnet.availabilityZone))));availabilityZones.sort((az1,az2)=>az1.localeCompare(az2)),this.availabilityZones=availabilityZones,this.publicSubnets=this.extractSubnetsOfType(subnetGroups,cxapi.VpcSubnetGroupType.PUBLIC),this.privateSubnets=this.extractSubnetsOfType(subnetGroups,cxapi.VpcSubnetGroupType.PRIVATE),this.isolatedSubnets=this.extractSubnetsOfType(subnetGroups,cxapi.VpcSubnetGroupType.ISOLATED)}get vpcCidrBlock(){if(this.cidr===void 0)throw new Error("Cannot perform this operation: 'vpcCidrBlock' was not found when looking up this VPC. Use a newer version of the CDK CLI and clear the old context value.");return this.cidr}extractSubnetsOfType(subnetGroups,subnetGroupType){return flatMap(subnetGroups.filter(subnetGroup=>subnetGroup.type===subnetGroupType),subnetGroup=>this.subnetGroupToSubnets(subnetGroup))}subnetGroupToSubnets(subnetGroup){const ret=new Array;for(let i=0;i<subnetGroup.subnets.length;i++){const vpcSubnet=subnetGroup.subnets[i];ret.push(Subnet.fromSubnetAttributes(this,`${subnetGroup.name}Subnet${i+1}`,{availabilityZone:vpcSubnet.availabilityZone,subnetId:vpcSubnet.subnetId,routeTableId:vpcSubnet.routeTableId,ipv4CidrBlock:vpcSubnet.cidr}))}return ret}}function flatMap(xs,fn){const ret=new Array;for(const x of xs)ret.push(...fn(x));return ret}class CompositeDependable{constructor(){this.dependables=new Array;const self=this;constructs_1.Dependable.implement(this,{get dependencyRoots(){const ret=new Array;for(const dep of self.dependables)ret.push(...constructs_1.Dependable.of(dep).dependencyRoots);return ret}})}add(dep){this.dependables.push(dep)}}function tap(x,fn){return fn(x),x}class ImportedSubnet extends core_1.Resource{constructor(scope,id,attrs){if(super(scope,id),this.internetConnectivityEstablished=new constructs_1.DependencyGroup,!attrs.routeTableId){const ref=core_1.Token.isUnresolved(attrs.subnetId)||core_1.Token.isUnresolved([attrs.subnetId])?`at '${constructs_1.Node.of(scope).path}/${id}'`:`'${attrs.subnetId}'`;core_1.Annotations.of(this).addWarning(`No routeTableId was provided to the subnet ${ref}. Attempting to read its .routeTable.routeTableId will return null/undefined. (More info: https://github.com/aws/aws-cdk/pull/3171)`)}this._ipv4CidrBlock=attrs.ipv4CidrBlock,this._availabilityZone=attrs.availabilityZone,this.subnetId=attrs.subnetId,this.routeTable={routeTableId:attrs.routeTableId}}get availabilityZone(){if(!this._availabilityZone)throw new Error("You cannot reference a Subnet's availability zone if it was not supplied. Add the availabilityZone when importing using Subnet.fromSubnetAttributes()");return this._availabilityZone}get ipv4CidrBlock(){if(!this._ipv4CidrBlock)throw new Error("You cannot reference an imported Subnet's IPv4 CIDR if it was not supplied. Add the ipv4CidrBlock when importing using Subnet.fromSubnetAttributes()");return this._ipv4CidrBlock}associateNetworkAcl(id,networkAcl){const scope=networkAcl instanceof constructs_1.Construct?networkAcl:this,other=networkAcl instanceof constructs_1.Construct?this:networkAcl;new network_acl_1.SubnetNetworkAclAssociation(scope,id+core_1.Names.nodeUniqueId(other.node),{networkAcl,subnet:this})}}function determineNatGatewayCount(requestedCount,subnetConfig,azCount){const hasPrivateSubnets=subnetConfig.some(c=>(c.subnetType===SubnetType.PRIVATE_WITH_NAT||c.subnetType===SubnetType.PRIVATE)&&!c.reserved),hasPublicSubnets=subnetConfig.some(c=>c.subnetType===SubnetType.PUBLIC),count=requestedCount!==void 0?Math.min(requestedCount,azCount):hasPrivateSubnets?azCount:0;if(count===0&&hasPrivateSubnets)throw new Error("If you do not want NAT gateways (natGateways=0), make sure you don't configure any PRIVATE subnets in 'subnetConfiguration' (make them PUBLIC or ISOLATED instead)");if(count>0&&!hasPublicSubnets)throw new Error(`If you configure PRIVATE subnets in 'subnetConfiguration', you must also configure PUBLIC subnets to put the NAT gateways into (got ${JSON.stringify(subnetConfig)}.`);return count}const DUMMY_VPC_PROPS={availabilityZones:[],vpcCidrBlock:"1.2.3.4/5",isolatedSubnetIds:void 0,isolatedSubnetNames:void 0,isolatedSubnetRouteTableIds:void 0,privateSubnetIds:void 0,privateSubnetNames:void 0,privateSubnetRouteTableIds:void 0,publicSubnetIds:void 0,publicSubnetNames:void 0,publicSubnetRouteTableIds:void 0,subnetGroups:[{name:"Public",type:cxapi.VpcSubnetGroupType.PUBLIC,subnets:[{availabilityZone:"dummy1a",subnetId:"s-12345",routeTableId:"rtb-12345s",cidr:"1.2.3.4/5"},{availabilityZone:"dummy1b",subnetId:"s-67890",routeTableId:"rtb-67890s",cidr:"1.2.3.4/5"}]},{name:"Private",type:cxapi.VpcSubnetGroupType.PRIVATE,subnets:[{availabilityZone:"dummy1a",subnetId:"p-12345",routeTableId:"rtb-12345p",cidr:"1.2.3.4/5"},{availabilityZone:"dummy1b",subnetId:"p-67890",routeTableId:"rtb-57890p",cidr:"1.2.3.4/5"}]},{name:"Isolated",type:cxapi.VpcSubnetGroupType.ISOLATED,subnets:[{availabilityZone:"dummy1a",subnetId:"p-12345",routeTableId:"rtb-12345p",cidr:"1.2.3.4/5"},{availabilityZone:"dummy1b",subnetId:"p-67890",routeTableId:"rtb-57890p",cidr:"1.2.3.4/5"}]}],vpcId:"vpc-12345"};
|
|
2
2
|
//# sourceMappingURL=vpc.js.map
|
package/aws-ec2/lib/vpn.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RESERVED_TUNNEL_INSIDE_CIDR=exports.VpnConnection=exports.VpnGateway=exports.VpnConnectionType=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),net=require("net"),cloudwatch=require("../../aws-cloudwatch"),core_1=require("../../core"),ec2_generated_1=require("./ec2.generated");var VpnConnectionType;(function(VpnConnectionType2){VpnConnectionType2.IPSEC_1="ipsec.1",VpnConnectionType2.DUMMY="dummy"})(VpnConnectionType=exports.VpnConnectionType||(exports.VpnConnectionType={}));class VpnGateway extends core_1.Resource{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_VpnGatewayProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,VpnGateway),error}const vpnGW=new ec2_generated_1.CfnVPNGateway(this,"Default",props);this.gatewayId=vpnGW.ref}}exports.VpnGateway=VpnGateway,_a=JSII_RTTI_SYMBOL_1,VpnGateway[_a]={fqn:"aws-cdk-lib.aws_ec2.VpnGateway",version:"2.34.
|
|
1
|
+
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RESERVED_TUNNEL_INSIDE_CIDR=exports.VpnConnection=exports.VpnGateway=exports.VpnConnectionType=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),net=require("net"),cloudwatch=require("../../aws-cloudwatch"),core_1=require("../../core"),ec2_generated_1=require("./ec2.generated");var VpnConnectionType;(function(VpnConnectionType2){VpnConnectionType2.IPSEC_1="ipsec.1",VpnConnectionType2.DUMMY="dummy"})(VpnConnectionType=exports.VpnConnectionType||(exports.VpnConnectionType={}));class VpnGateway extends core_1.Resource{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_VpnGatewayProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,VpnGateway),error}const vpnGW=new ec2_generated_1.CfnVPNGateway(this,"Default",props);this.gatewayId=vpnGW.ref}}exports.VpnGateway=VpnGateway,_a=JSII_RTTI_SYMBOL_1,VpnGateway[_a]={fqn:"aws-cdk-lib.aws_ec2.VpnGateway",version:"2.34.1"};class VpnConnection extends core_1.Resource{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ec2_VpnConnectionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,VpnConnection),error}if(props.vpc.vpnGatewayId||props.vpc.enableVpnGateway({type:"ipsec.1",amazonSideAsn:props.asn}),!core_1.Token.isUnresolved(props.ip)&&!net.isIPv4(props.ip))throw new Error(`The \`ip\` ${props.ip} is not a valid IPv4 address.`);const type=VpnConnectionType.IPSEC_1,bgpAsn=props.asn||65e3,customerGateway=new ec2_generated_1.CfnCustomerGateway(this,"CustomerGateway",{bgpAsn,ipAddress:props.ip,type});if(this.customerGatewayId=customerGateway.ref,this.customerGatewayAsn=bgpAsn,this.customerGatewayIp=props.ip,props.tunnelOptions){if(props.tunnelOptions.length>2)throw new Error("Cannot specify more than two `tunnelOptions`");if(props.tunnelOptions.length===2&&props.tunnelOptions[0].tunnelInsideCidr===props.tunnelOptions[1].tunnelInsideCidr)throw new Error(`Same ${props.tunnelOptions[0].tunnelInsideCidr} \`tunnelInsideCidr\` cannot be used for both tunnels.`);props.tunnelOptions.forEach((options,index)=>{if(options.preSharedKey&&options.preSharedKeySecret)throw new Error("Specify at most one of 'preSharedKey' and 'preSharedKeySecret'.");if(options.preSharedKey&&!core_1.Token.isUnresolved(options.preSharedKey)&&!/^[a-zA-Z1-9._][a-zA-Z\d._]{7,63}$/.test(options.preSharedKey))throw new Error(`The \`preSharedKey\` ${options.preSharedKey} for tunnel ${index+1} is invalid. Allowed characters are alphanumeric characters and ._. Must be between 8 and 64 characters in length and cannot start with zero (0).`);if(options.tunnelInsideCidr){if(exports.RESERVED_TUNNEL_INSIDE_CIDR.includes(options.tunnelInsideCidr))throw new Error(`The \`tunnelInsideCidr\` ${options.tunnelInsideCidr} for tunnel ${index+1} is a reserved inside CIDR.`);if(!/^169\.254\.\d{1,3}\.\d{1,3}\/30$/.test(options.tunnelInsideCidr))throw new Error(`The \`tunnelInsideCidr\` ${options.tunnelInsideCidr} for tunnel ${index+1} is not a size /30 CIDR block from the 169.254.0.0/16 range.`)}})}const vpnConnection=new ec2_generated_1.CfnVPNConnection(this,"Resource",{type,customerGatewayId:customerGateway.ref,staticRoutesOnly:!!props.staticRoutes,vpnGatewayId:props.vpc.vpnGatewayId,vpnTunnelOptionsSpecifications:props.tunnelOptions?.map(t=>({preSharedKey:t.preSharedKeySecret?.unsafeUnwrap()??t.preSharedKey,tunnelInsideCidr:t.tunnelInsideCidr}))});this.vpnId=vpnConnection.ref,props.staticRoutes&&props.staticRoutes.forEach(route=>{new ec2_generated_1.CfnVPNConnectionRoute(this,`Route${route.replace(/[^\d]/g,"")}`,{destinationCidrBlock:route,vpnConnectionId:this.vpnId})})}static metricAll(metricName,props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_cloudwatch_MetricOptions(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.metricAll),error}return new cloudwatch.Metric({namespace:"AWS/VPN",metricName,...props})}static metricAllTunnelState(props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_cloudwatch_MetricOptions(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.metricAllTunnelState),error}return this.metricAll("TunnelState",{statistic:"avg",...props})}static metricAllTunnelDataIn(props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_cloudwatch_MetricOptions(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.metricAllTunnelDataIn),error}return this.metricAll("TunnelDataIn",{statistic:"sum",...props})}static metricAllTunnelDataOut(props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_cloudwatch_MetricOptions(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.metricAllTunnelDataOut),error}return this.metricAll("TunnelDataOut",{statistic:"sum",...props})}}exports.VpnConnection=VpnConnection,_b=JSII_RTTI_SYMBOL_1,VpnConnection[_b]={fqn:"aws-cdk-lib.aws_ec2.VpnConnection",version:"2.34.1"},exports.RESERVED_TUNNEL_INSIDE_CIDR=["169.254.0.0/30","169.254.1.0/30","169.254.2.0/30","169.254.3.0/30","169.254.4.0/30","169.254.5.0/30","169.254.169.252/30"];
|
|
2
2
|
//# sourceMappingURL=vpn.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PublicGalleryAuthorizationToken=exports.AuthorizationToken=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../aws-iam");class AuthorizationToken{constructor(){}static grantRead(grantee){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantRead),error}grantee.grantPrincipal.addToPrincipalPolicy(new iam.PolicyStatement({actions:["ecr:GetAuthorizationToken"],resources:["*"]}))}}exports.AuthorizationToken=AuthorizationToken,_a=JSII_RTTI_SYMBOL_1,AuthorizationToken[_a]={fqn:"aws-cdk-lib.aws_ecr.AuthorizationToken",version:"2.34.
|
|
1
|
+
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PublicGalleryAuthorizationToken=exports.AuthorizationToken=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../aws-iam");class AuthorizationToken{constructor(){}static grantRead(grantee){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantRead),error}grantee.grantPrincipal.addToPrincipalPolicy(new iam.PolicyStatement({actions:["ecr:GetAuthorizationToken"],resources:["*"]}))}}exports.AuthorizationToken=AuthorizationToken,_a=JSII_RTTI_SYMBOL_1,AuthorizationToken[_a]={fqn:"aws-cdk-lib.aws_ecr.AuthorizationToken",version:"2.34.1"};class PublicGalleryAuthorizationToken{constructor(){}static grantRead(grantee){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantRead),error}grantee.grantPrincipal.addToPrincipalPolicy(new iam.PolicyStatement({actions:["ecr-public:GetAuthorizationToken","sts:GetServiceBearerToken"],resources:["*"]}))}}exports.PublicGalleryAuthorizationToken=PublicGalleryAuthorizationToken,_b=JSII_RTTI_SYMBOL_1,PublicGalleryAuthorizationToken[_b]={fqn:"aws-cdk-lib.aws_ecr.PublicGalleryAuthorizationToken",version:"2.34.1"};
|
|
2
2
|
//# sourceMappingURL=auth-token.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var _a,_b,_c,_d,_e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnRepository=exports.CfnReplicationConfiguration=exports.CfnRegistryPolicy=exports.CfnPullThroughCacheRule=exports.CfnPublicRepository=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cdk=require("../../core"),cfn_parse=require("../../core/lib/helpers-internal");function CfnPublicRepositoryPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("repositoryCatalogData",cdk.validateObject)(properties.repositoryCatalogData)),errors.collect(cdk.propertyValidator("repositoryName",cdk.validateString)(properties.repositoryName)),errors.collect(cdk.propertyValidator("repositoryPolicyText",cdk.validateObject)(properties.repositoryPolicyText)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnPublicRepositoryProps"')}function cfnPublicRepositoryPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPublicRepositoryPropsValidator(properties).assertSuccess(),{RepositoryCatalogData:cdk.objectToCloudFormation(properties.repositoryCatalogData),RepositoryName:cdk.stringToCloudFormation(properties.repositoryName),RepositoryPolicyText:cdk.objectToCloudFormation(properties.repositoryPolicyText),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnPublicRepositoryPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("repositoryCatalogData","RepositoryCatalogData",properties.RepositoryCatalogData!=null?cfn_parse.FromCloudFormation.getAny(properties.RepositoryCatalogData):void 0),ret.addPropertyResult("repositoryName","RepositoryName",properties.RepositoryName!=null?cfn_parse.FromCloudFormation.getString(properties.RepositoryName):void 0),ret.addPropertyResult("repositoryPolicyText","RepositoryPolicyText",properties.RepositoryPolicyText!=null?cfn_parse.FromCloudFormation.getAny(properties.RepositoryPolicyText):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnPublicRepository extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnPublicRepository.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnPublicRepositoryProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPublicRepository),error}this.attrArn=cdk.Token.asString(this.getAtt("Arn")),this.repositoryCatalogData=props.repositoryCatalogData,this.repositoryName=props.repositoryName,this.repositoryPolicyText=props.repositoryPolicyText,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::ECR::PublicRepository",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPublicRepositoryPropsFromCloudFormation(resourceProperties),ret=new CfnPublicRepository(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnPublicRepository.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{repositoryCatalogData:this.repositoryCatalogData,repositoryName:this.repositoryName,repositoryPolicyText:this.repositoryPolicyText,tags:this.tags.renderTags()}}renderProperties(props){return cfnPublicRepositoryPropsToCloudFormation(props)}}exports.CfnPublicRepository=CfnPublicRepository,_a=JSII_RTTI_SYMBOL_1,CfnPublicRepository[_a]={fqn:"aws-cdk-lib.aws_ecr.CfnPublicRepository",version:"2.34.0"},CfnPublicRepository.CFN_RESOURCE_TYPE_NAME="AWS::ECR::PublicRepository";function CfnPullThroughCacheRulePropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("ecrRepositoryPrefix",cdk.validateString)(properties.ecrRepositoryPrefix)),errors.collect(cdk.propertyValidator("upstreamRegistryUrl",cdk.validateString)(properties.upstreamRegistryUrl)),errors.wrap('supplied properties not correct for "CfnPullThroughCacheRuleProps"')}function cfnPullThroughCacheRulePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPullThroughCacheRulePropsValidator(properties).assertSuccess(),{EcrRepositoryPrefix:cdk.stringToCloudFormation(properties.ecrRepositoryPrefix),UpstreamRegistryUrl:cdk.stringToCloudFormation(properties.upstreamRegistryUrl)}):properties}function CfnPullThroughCacheRulePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("ecrRepositoryPrefix","EcrRepositoryPrefix",properties.EcrRepositoryPrefix!=null?cfn_parse.FromCloudFormation.getString(properties.EcrRepositoryPrefix):void 0),ret.addPropertyResult("upstreamRegistryUrl","UpstreamRegistryUrl",properties.UpstreamRegistryUrl!=null?cfn_parse.FromCloudFormation.getString(properties.UpstreamRegistryUrl):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnPullThroughCacheRule extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnPullThroughCacheRule.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnPullThroughCacheRuleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPullThroughCacheRule),error}this.ecrRepositoryPrefix=props.ecrRepositoryPrefix,this.upstreamRegistryUrl=props.upstreamRegistryUrl}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPullThroughCacheRulePropsFromCloudFormation(resourceProperties),ret=new CfnPullThroughCacheRule(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnPullThroughCacheRule.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{ecrRepositoryPrefix:this.ecrRepositoryPrefix,upstreamRegistryUrl:this.upstreamRegistryUrl}}renderProperties(props){return cfnPullThroughCacheRulePropsToCloudFormation(props)}}exports.CfnPullThroughCacheRule=CfnPullThroughCacheRule,_b=JSII_RTTI_SYMBOL_1,CfnPullThroughCacheRule[_b]={fqn:"aws-cdk-lib.aws_ecr.CfnPullThroughCacheRule",version:"2.34.0"},CfnPullThroughCacheRule.CFN_RESOURCE_TYPE_NAME="AWS::ECR::PullThroughCacheRule";function CfnRegistryPolicyPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("policyText",cdk.requiredValidator)(properties.policyText)),errors.collect(cdk.propertyValidator("policyText",cdk.validateObject)(properties.policyText)),errors.wrap('supplied properties not correct for "CfnRegistryPolicyProps"')}function cfnRegistryPolicyPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRegistryPolicyPropsValidator(properties).assertSuccess(),{PolicyText:cdk.objectToCloudFormation(properties.policyText)}):properties}function CfnRegistryPolicyPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("policyText","PolicyText",cfn_parse.FromCloudFormation.getAny(properties.PolicyText)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnRegistryPolicy extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnRegistryPolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnRegistryPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnRegistryPolicy),error}cdk.requireProperty(props,"policyText",this),this.attrRegistryId=cdk.Token.asString(this.getAtt("RegistryId")),this.policyText=props.policyText}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnRegistryPolicyPropsFromCloudFormation(resourceProperties),ret=new CfnRegistryPolicy(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnRegistryPolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{policyText:this.policyText}}renderProperties(props){return cfnRegistryPolicyPropsToCloudFormation(props)}}exports.CfnRegistryPolicy=CfnRegistryPolicy,_c=JSII_RTTI_SYMBOL_1,CfnRegistryPolicy[_c]={fqn:"aws-cdk-lib.aws_ecr.CfnRegistryPolicy",version:"2.34.0"},CfnRegistryPolicy.CFN_RESOURCE_TYPE_NAME="AWS::ECR::RegistryPolicy";function CfnReplicationConfigurationPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("replicationConfiguration",cdk.requiredValidator)(properties.replicationConfiguration)),errors.collect(cdk.propertyValidator("replicationConfiguration",CfnReplicationConfiguration_ReplicationConfigurationPropertyValidator)(properties.replicationConfiguration)),errors.wrap('supplied properties not correct for "CfnReplicationConfigurationProps"')}function cfnReplicationConfigurationPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfigurationPropsValidator(properties).assertSuccess(),{ReplicationConfiguration:cfnReplicationConfigurationReplicationConfigurationPropertyToCloudFormation(properties.replicationConfiguration)}):properties}function CfnReplicationConfigurationPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("replicationConfiguration","ReplicationConfiguration",CfnReplicationConfigurationReplicationConfigurationPropertyFromCloudFormation(properties.ReplicationConfiguration)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnReplicationConfiguration extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnReplicationConfiguration.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnReplicationConfigurationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnReplicationConfiguration),error}cdk.requireProperty(props,"replicationConfiguration",this),this.attrRegistryId=cdk.Token.asString(this.getAtt("RegistryId")),this.replicationConfiguration=props.replicationConfiguration}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnReplicationConfigurationPropsFromCloudFormation(resourceProperties),ret=new CfnReplicationConfiguration(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnReplicationConfiguration.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{replicationConfiguration:this.replicationConfiguration}}renderProperties(props){return cfnReplicationConfigurationPropsToCloudFormation(props)}}exports.CfnReplicationConfiguration=CfnReplicationConfiguration,_d=JSII_RTTI_SYMBOL_1,CfnReplicationConfiguration[_d]={fqn:"aws-cdk-lib.aws_ecr.CfnReplicationConfiguration",version:"2.34.0"},CfnReplicationConfiguration.CFN_RESOURCE_TYPE_NAME="AWS::ECR::ReplicationConfiguration";function CfnReplicationConfiguration_ReplicationConfigurationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("rules",cdk.requiredValidator)(properties.rules)),errors.collect(cdk.propertyValidator("rules",cdk.listValidator(CfnReplicationConfiguration_ReplicationRulePropertyValidator))(properties.rules)),errors.wrap('supplied properties not correct for "ReplicationConfigurationProperty"')}function cfnReplicationConfigurationReplicationConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfiguration_ReplicationConfigurationPropertyValidator(properties).assertSuccess(),{Rules:cdk.listMapper(cfnReplicationConfigurationReplicationRulePropertyToCloudFormation)(properties.rules)}):properties}function CfnReplicationConfigurationReplicationConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("rules","Rules",cfn_parse.FromCloudFormation.getArray(CfnReplicationConfigurationReplicationRulePropertyFromCloudFormation)(properties.Rules)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationConfiguration_ReplicationDestinationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("region",cdk.requiredValidator)(properties.region)),errors.collect(cdk.propertyValidator("region",cdk.validateString)(properties.region)),errors.collect(cdk.propertyValidator("registryId",cdk.requiredValidator)(properties.registryId)),errors.collect(cdk.propertyValidator("registryId",cdk.validateString)(properties.registryId)),errors.wrap('supplied properties not correct for "ReplicationDestinationProperty"')}function cfnReplicationConfigurationReplicationDestinationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfiguration_ReplicationDestinationPropertyValidator(properties).assertSuccess(),{Region:cdk.stringToCloudFormation(properties.region),RegistryId:cdk.stringToCloudFormation(properties.registryId)}):properties}function CfnReplicationConfigurationReplicationDestinationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("region","Region",cfn_parse.FromCloudFormation.getString(properties.Region)),ret.addPropertyResult("registryId","RegistryId",cfn_parse.FromCloudFormation.getString(properties.RegistryId)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationConfiguration_ReplicationRulePropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("destinations",cdk.requiredValidator)(properties.destinations)),errors.collect(cdk.propertyValidator("destinations",cdk.listValidator(CfnReplicationConfiguration_ReplicationDestinationPropertyValidator))(properties.destinations)),errors.collect(cdk.propertyValidator("repositoryFilters",cdk.listValidator(CfnReplicationConfiguration_RepositoryFilterPropertyValidator))(properties.repositoryFilters)),errors.wrap('supplied properties not correct for "ReplicationRuleProperty"')}function cfnReplicationConfigurationReplicationRulePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfiguration_ReplicationRulePropertyValidator(properties).assertSuccess(),{Destinations:cdk.listMapper(cfnReplicationConfigurationReplicationDestinationPropertyToCloudFormation)(properties.destinations),RepositoryFilters:cdk.listMapper(cfnReplicationConfigurationRepositoryFilterPropertyToCloudFormation)(properties.repositoryFilters)}):properties}function CfnReplicationConfigurationReplicationRulePropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("destinations","Destinations",cfn_parse.FromCloudFormation.getArray(CfnReplicationConfigurationReplicationDestinationPropertyFromCloudFormation)(properties.Destinations)),ret.addPropertyResult("repositoryFilters","RepositoryFilters",properties.RepositoryFilters!=null?cfn_parse.FromCloudFormation.getArray(CfnReplicationConfigurationRepositoryFilterPropertyFromCloudFormation)(properties.RepositoryFilters):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationConfiguration_RepositoryFilterPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("filter",cdk.requiredValidator)(properties.filter)),errors.collect(cdk.propertyValidator("filter",cdk.validateString)(properties.filter)),errors.collect(cdk.propertyValidator("filterType",cdk.requiredValidator)(properties.filterType)),errors.collect(cdk.propertyValidator("filterType",cdk.validateString)(properties.filterType)),errors.wrap('supplied properties not correct for "RepositoryFilterProperty"')}function cfnReplicationConfigurationRepositoryFilterPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfiguration_RepositoryFilterPropertyValidator(properties).assertSuccess(),{Filter:cdk.stringToCloudFormation(properties.filter),FilterType:cdk.stringToCloudFormation(properties.filterType)}):properties}function CfnReplicationConfigurationRepositoryFilterPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("filter","Filter",cfn_parse.FromCloudFormation.getString(properties.Filter)),ret.addPropertyResult("filterType","FilterType",cfn_parse.FromCloudFormation.getString(properties.FilterType)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRepositoryPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("encryptionConfiguration",CfnRepository_EncryptionConfigurationPropertyValidator)(properties.encryptionConfiguration)),errors.collect(cdk.propertyValidator("imageScanningConfiguration",CfnRepository_ImageScanningConfigurationPropertyValidator)(properties.imageScanningConfiguration)),errors.collect(cdk.propertyValidator("imageTagMutability",cdk.validateString)(properties.imageTagMutability)),errors.collect(cdk.propertyValidator("lifecyclePolicy",CfnRepository_LifecyclePolicyPropertyValidator)(properties.lifecyclePolicy)),errors.collect(cdk.propertyValidator("repositoryName",cdk.validateString)(properties.repositoryName)),errors.collect(cdk.propertyValidator("repositoryPolicyText",cdk.validateObject)(properties.repositoryPolicyText)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnRepositoryProps"')}function cfnRepositoryPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRepositoryPropsValidator(properties).assertSuccess(),{EncryptionConfiguration:cfnRepositoryEncryptionConfigurationPropertyToCloudFormation(properties.encryptionConfiguration),ImageScanningConfiguration:cfnRepositoryImageScanningConfigurationPropertyToCloudFormation(properties.imageScanningConfiguration),ImageTagMutability:cdk.stringToCloudFormation(properties.imageTagMutability),LifecyclePolicy:cfnRepositoryLifecyclePolicyPropertyToCloudFormation(properties.lifecyclePolicy),RepositoryName:cdk.stringToCloudFormation(properties.repositoryName),RepositoryPolicyText:cdk.objectToCloudFormation(properties.repositoryPolicyText),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnRepositoryPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("encryptionConfiguration","EncryptionConfiguration",properties.EncryptionConfiguration!=null?CfnRepositoryEncryptionConfigurationPropertyFromCloudFormation(properties.EncryptionConfiguration):void 0),ret.addPropertyResult("imageScanningConfiguration","ImageScanningConfiguration",properties.ImageScanningConfiguration!=null?CfnRepositoryImageScanningConfigurationPropertyFromCloudFormation(properties.ImageScanningConfiguration):void 0),ret.addPropertyResult("imageTagMutability","ImageTagMutability",properties.ImageTagMutability!=null?cfn_parse.FromCloudFormation.getString(properties.ImageTagMutability):void 0),ret.addPropertyResult("lifecyclePolicy","LifecyclePolicy",properties.LifecyclePolicy!=null?CfnRepositoryLifecyclePolicyPropertyFromCloudFormation(properties.LifecyclePolicy):void 0),ret.addPropertyResult("repositoryName","RepositoryName",properties.RepositoryName!=null?cfn_parse.FromCloudFormation.getString(properties.RepositoryName):void 0),ret.addPropertyResult("repositoryPolicyText","RepositoryPolicyText",properties.RepositoryPolicyText!=null?cfn_parse.FromCloudFormation.getAny(properties.RepositoryPolicyText):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnRepository extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnRepository.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnRepositoryProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnRepository),error}this.attrArn=cdk.Token.asString(this.getAtt("Arn")),this.attrRepositoryUri=cdk.Token.asString(this.getAtt("RepositoryUri")),this.encryptionConfiguration=props.encryptionConfiguration,this.imageScanningConfiguration=props.imageScanningConfiguration,this.imageTagMutability=props.imageTagMutability,this.lifecyclePolicy=props.lifecyclePolicy,this.repositoryName=props.repositoryName,this.repositoryPolicyText=props.repositoryPolicyText,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::ECR::Repository",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnRepositoryPropsFromCloudFormation(resourceProperties),ret=new CfnRepository(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnRepository.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{encryptionConfiguration:this.encryptionConfiguration,imageScanningConfiguration:this.imageScanningConfiguration,imageTagMutability:this.imageTagMutability,lifecyclePolicy:this.lifecyclePolicy,repositoryName:this.repositoryName,repositoryPolicyText:this.repositoryPolicyText,tags:this.tags.renderTags()}}renderProperties(props){return cfnRepositoryPropsToCloudFormation(props)}}exports.CfnRepository=CfnRepository,_e=JSII_RTTI_SYMBOL_1,CfnRepository[_e]={fqn:"aws-cdk-lib.aws_ecr.CfnRepository",version:"2.34.0"},CfnRepository.CFN_RESOURCE_TYPE_NAME="AWS::ECR::Repository";function CfnRepository_EncryptionConfigurationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("encryptionType",cdk.requiredValidator)(properties.encryptionType)),errors.collect(cdk.propertyValidator("encryptionType",cdk.validateString)(properties.encryptionType)),errors.collect(cdk.propertyValidator("kmsKey",cdk.validateString)(properties.kmsKey)),errors.wrap('supplied properties not correct for "EncryptionConfigurationProperty"')}function cfnRepositoryEncryptionConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRepository_EncryptionConfigurationPropertyValidator(properties).assertSuccess(),{EncryptionType:cdk.stringToCloudFormation(properties.encryptionType),KmsKey:cdk.stringToCloudFormation(properties.kmsKey)}):properties}function CfnRepositoryEncryptionConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("encryptionType","EncryptionType",cfn_parse.FromCloudFormation.getString(properties.EncryptionType)),ret.addPropertyResult("kmsKey","KmsKey",properties.KmsKey!=null?cfn_parse.FromCloudFormation.getString(properties.KmsKey):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRepository_ImageScanningConfigurationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("scanOnPush",cdk.validateBoolean)(properties.scanOnPush)),errors.wrap('supplied properties not correct for "ImageScanningConfigurationProperty"')}function cfnRepositoryImageScanningConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRepository_ImageScanningConfigurationPropertyValidator(properties).assertSuccess(),{ScanOnPush:cdk.booleanToCloudFormation(properties.scanOnPush)}):properties}function CfnRepositoryImageScanningConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("scanOnPush","ScanOnPush",properties.ScanOnPush!=null?cfn_parse.FromCloudFormation.getBoolean(properties.ScanOnPush):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRepository_LifecyclePolicyPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("lifecyclePolicyText",cdk.validateString)(properties.lifecyclePolicyText)),errors.collect(cdk.propertyValidator("registryId",cdk.validateString)(properties.registryId)),errors.wrap('supplied properties not correct for "LifecyclePolicyProperty"')}function cfnRepositoryLifecyclePolicyPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRepository_LifecyclePolicyPropertyValidator(properties).assertSuccess(),{LifecyclePolicyText:cdk.stringToCloudFormation(properties.lifecyclePolicyText),RegistryId:cdk.stringToCloudFormation(properties.registryId)}):properties}function CfnRepositoryLifecyclePolicyPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("lifecyclePolicyText","LifecyclePolicyText",properties.LifecyclePolicyText!=null?cfn_parse.FromCloudFormation.getString(properties.LifecyclePolicyText):void 0),ret.addPropertyResult("registryId","RegistryId",properties.RegistryId!=null?cfn_parse.FromCloudFormation.getString(properties.RegistryId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}
|
|
1
|
+
"use strict";var _a,_b,_c,_d,_e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnRepository=exports.CfnReplicationConfiguration=exports.CfnRegistryPolicy=exports.CfnPullThroughCacheRule=exports.CfnPublicRepository=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cdk=require("../../core"),cfn_parse=require("../../core/lib/helpers-internal");function CfnPublicRepositoryPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("repositoryCatalogData",cdk.validateObject)(properties.repositoryCatalogData)),errors.collect(cdk.propertyValidator("repositoryName",cdk.validateString)(properties.repositoryName)),errors.collect(cdk.propertyValidator("repositoryPolicyText",cdk.validateObject)(properties.repositoryPolicyText)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnPublicRepositoryProps"')}function cfnPublicRepositoryPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPublicRepositoryPropsValidator(properties).assertSuccess(),{RepositoryCatalogData:cdk.objectToCloudFormation(properties.repositoryCatalogData),RepositoryName:cdk.stringToCloudFormation(properties.repositoryName),RepositoryPolicyText:cdk.objectToCloudFormation(properties.repositoryPolicyText),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnPublicRepositoryPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("repositoryCatalogData","RepositoryCatalogData",properties.RepositoryCatalogData!=null?cfn_parse.FromCloudFormation.getAny(properties.RepositoryCatalogData):void 0),ret.addPropertyResult("repositoryName","RepositoryName",properties.RepositoryName!=null?cfn_parse.FromCloudFormation.getString(properties.RepositoryName):void 0),ret.addPropertyResult("repositoryPolicyText","RepositoryPolicyText",properties.RepositoryPolicyText!=null?cfn_parse.FromCloudFormation.getAny(properties.RepositoryPolicyText):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnPublicRepository extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnPublicRepository.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnPublicRepositoryProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPublicRepository),error}this.attrArn=cdk.Token.asString(this.getAtt("Arn")),this.repositoryCatalogData=props.repositoryCatalogData,this.repositoryName=props.repositoryName,this.repositoryPolicyText=props.repositoryPolicyText,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::ECR::PublicRepository",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPublicRepositoryPropsFromCloudFormation(resourceProperties),ret=new CfnPublicRepository(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnPublicRepository.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{repositoryCatalogData:this.repositoryCatalogData,repositoryName:this.repositoryName,repositoryPolicyText:this.repositoryPolicyText,tags:this.tags.renderTags()}}renderProperties(props){return cfnPublicRepositoryPropsToCloudFormation(props)}}exports.CfnPublicRepository=CfnPublicRepository,_a=JSII_RTTI_SYMBOL_1,CfnPublicRepository[_a]={fqn:"aws-cdk-lib.aws_ecr.CfnPublicRepository",version:"2.34.1"},CfnPublicRepository.CFN_RESOURCE_TYPE_NAME="AWS::ECR::PublicRepository";function CfnPullThroughCacheRulePropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("ecrRepositoryPrefix",cdk.validateString)(properties.ecrRepositoryPrefix)),errors.collect(cdk.propertyValidator("upstreamRegistryUrl",cdk.validateString)(properties.upstreamRegistryUrl)),errors.wrap('supplied properties not correct for "CfnPullThroughCacheRuleProps"')}function cfnPullThroughCacheRulePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPullThroughCacheRulePropsValidator(properties).assertSuccess(),{EcrRepositoryPrefix:cdk.stringToCloudFormation(properties.ecrRepositoryPrefix),UpstreamRegistryUrl:cdk.stringToCloudFormation(properties.upstreamRegistryUrl)}):properties}function CfnPullThroughCacheRulePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("ecrRepositoryPrefix","EcrRepositoryPrefix",properties.EcrRepositoryPrefix!=null?cfn_parse.FromCloudFormation.getString(properties.EcrRepositoryPrefix):void 0),ret.addPropertyResult("upstreamRegistryUrl","UpstreamRegistryUrl",properties.UpstreamRegistryUrl!=null?cfn_parse.FromCloudFormation.getString(properties.UpstreamRegistryUrl):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnPullThroughCacheRule extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnPullThroughCacheRule.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnPullThroughCacheRuleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPullThroughCacheRule),error}this.ecrRepositoryPrefix=props.ecrRepositoryPrefix,this.upstreamRegistryUrl=props.upstreamRegistryUrl}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPullThroughCacheRulePropsFromCloudFormation(resourceProperties),ret=new CfnPullThroughCacheRule(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnPullThroughCacheRule.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{ecrRepositoryPrefix:this.ecrRepositoryPrefix,upstreamRegistryUrl:this.upstreamRegistryUrl}}renderProperties(props){return cfnPullThroughCacheRulePropsToCloudFormation(props)}}exports.CfnPullThroughCacheRule=CfnPullThroughCacheRule,_b=JSII_RTTI_SYMBOL_1,CfnPullThroughCacheRule[_b]={fqn:"aws-cdk-lib.aws_ecr.CfnPullThroughCacheRule",version:"2.34.1"},CfnPullThroughCacheRule.CFN_RESOURCE_TYPE_NAME="AWS::ECR::PullThroughCacheRule";function CfnRegistryPolicyPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("policyText",cdk.requiredValidator)(properties.policyText)),errors.collect(cdk.propertyValidator("policyText",cdk.validateObject)(properties.policyText)),errors.wrap('supplied properties not correct for "CfnRegistryPolicyProps"')}function cfnRegistryPolicyPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRegistryPolicyPropsValidator(properties).assertSuccess(),{PolicyText:cdk.objectToCloudFormation(properties.policyText)}):properties}function CfnRegistryPolicyPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("policyText","PolicyText",cfn_parse.FromCloudFormation.getAny(properties.PolicyText)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnRegistryPolicy extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnRegistryPolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnRegistryPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnRegistryPolicy),error}cdk.requireProperty(props,"policyText",this),this.attrRegistryId=cdk.Token.asString(this.getAtt("RegistryId")),this.policyText=props.policyText}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnRegistryPolicyPropsFromCloudFormation(resourceProperties),ret=new CfnRegistryPolicy(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnRegistryPolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{policyText:this.policyText}}renderProperties(props){return cfnRegistryPolicyPropsToCloudFormation(props)}}exports.CfnRegistryPolicy=CfnRegistryPolicy,_c=JSII_RTTI_SYMBOL_1,CfnRegistryPolicy[_c]={fqn:"aws-cdk-lib.aws_ecr.CfnRegistryPolicy",version:"2.34.1"},CfnRegistryPolicy.CFN_RESOURCE_TYPE_NAME="AWS::ECR::RegistryPolicy";function CfnReplicationConfigurationPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("replicationConfiguration",cdk.requiredValidator)(properties.replicationConfiguration)),errors.collect(cdk.propertyValidator("replicationConfiguration",CfnReplicationConfiguration_ReplicationConfigurationPropertyValidator)(properties.replicationConfiguration)),errors.wrap('supplied properties not correct for "CfnReplicationConfigurationProps"')}function cfnReplicationConfigurationPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfigurationPropsValidator(properties).assertSuccess(),{ReplicationConfiguration:cfnReplicationConfigurationReplicationConfigurationPropertyToCloudFormation(properties.replicationConfiguration)}):properties}function CfnReplicationConfigurationPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("replicationConfiguration","ReplicationConfiguration",CfnReplicationConfigurationReplicationConfigurationPropertyFromCloudFormation(properties.ReplicationConfiguration)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnReplicationConfiguration extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnReplicationConfiguration.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnReplicationConfigurationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnReplicationConfiguration),error}cdk.requireProperty(props,"replicationConfiguration",this),this.attrRegistryId=cdk.Token.asString(this.getAtt("RegistryId")),this.replicationConfiguration=props.replicationConfiguration}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnReplicationConfigurationPropsFromCloudFormation(resourceProperties),ret=new CfnReplicationConfiguration(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnReplicationConfiguration.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{replicationConfiguration:this.replicationConfiguration}}renderProperties(props){return cfnReplicationConfigurationPropsToCloudFormation(props)}}exports.CfnReplicationConfiguration=CfnReplicationConfiguration,_d=JSII_RTTI_SYMBOL_1,CfnReplicationConfiguration[_d]={fqn:"aws-cdk-lib.aws_ecr.CfnReplicationConfiguration",version:"2.34.1"},CfnReplicationConfiguration.CFN_RESOURCE_TYPE_NAME="AWS::ECR::ReplicationConfiguration";function CfnReplicationConfiguration_ReplicationConfigurationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("rules",cdk.requiredValidator)(properties.rules)),errors.collect(cdk.propertyValidator("rules",cdk.listValidator(CfnReplicationConfiguration_ReplicationRulePropertyValidator))(properties.rules)),errors.wrap('supplied properties not correct for "ReplicationConfigurationProperty"')}function cfnReplicationConfigurationReplicationConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfiguration_ReplicationConfigurationPropertyValidator(properties).assertSuccess(),{Rules:cdk.listMapper(cfnReplicationConfigurationReplicationRulePropertyToCloudFormation)(properties.rules)}):properties}function CfnReplicationConfigurationReplicationConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("rules","Rules",cfn_parse.FromCloudFormation.getArray(CfnReplicationConfigurationReplicationRulePropertyFromCloudFormation)(properties.Rules)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationConfiguration_ReplicationDestinationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("region",cdk.requiredValidator)(properties.region)),errors.collect(cdk.propertyValidator("region",cdk.validateString)(properties.region)),errors.collect(cdk.propertyValidator("registryId",cdk.requiredValidator)(properties.registryId)),errors.collect(cdk.propertyValidator("registryId",cdk.validateString)(properties.registryId)),errors.wrap('supplied properties not correct for "ReplicationDestinationProperty"')}function cfnReplicationConfigurationReplicationDestinationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfiguration_ReplicationDestinationPropertyValidator(properties).assertSuccess(),{Region:cdk.stringToCloudFormation(properties.region),RegistryId:cdk.stringToCloudFormation(properties.registryId)}):properties}function CfnReplicationConfigurationReplicationDestinationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("region","Region",cfn_parse.FromCloudFormation.getString(properties.Region)),ret.addPropertyResult("registryId","RegistryId",cfn_parse.FromCloudFormation.getString(properties.RegistryId)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationConfiguration_ReplicationRulePropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("destinations",cdk.requiredValidator)(properties.destinations)),errors.collect(cdk.propertyValidator("destinations",cdk.listValidator(CfnReplicationConfiguration_ReplicationDestinationPropertyValidator))(properties.destinations)),errors.collect(cdk.propertyValidator("repositoryFilters",cdk.listValidator(CfnReplicationConfiguration_RepositoryFilterPropertyValidator))(properties.repositoryFilters)),errors.wrap('supplied properties not correct for "ReplicationRuleProperty"')}function cfnReplicationConfigurationReplicationRulePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfiguration_ReplicationRulePropertyValidator(properties).assertSuccess(),{Destinations:cdk.listMapper(cfnReplicationConfigurationReplicationDestinationPropertyToCloudFormation)(properties.destinations),RepositoryFilters:cdk.listMapper(cfnReplicationConfigurationRepositoryFilterPropertyToCloudFormation)(properties.repositoryFilters)}):properties}function CfnReplicationConfigurationReplicationRulePropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("destinations","Destinations",cfn_parse.FromCloudFormation.getArray(CfnReplicationConfigurationReplicationDestinationPropertyFromCloudFormation)(properties.Destinations)),ret.addPropertyResult("repositoryFilters","RepositoryFilters",properties.RepositoryFilters!=null?cfn_parse.FromCloudFormation.getArray(CfnReplicationConfigurationRepositoryFilterPropertyFromCloudFormation)(properties.RepositoryFilters):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationConfiguration_RepositoryFilterPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("filter",cdk.requiredValidator)(properties.filter)),errors.collect(cdk.propertyValidator("filter",cdk.validateString)(properties.filter)),errors.collect(cdk.propertyValidator("filterType",cdk.requiredValidator)(properties.filterType)),errors.collect(cdk.propertyValidator("filterType",cdk.validateString)(properties.filterType)),errors.wrap('supplied properties not correct for "RepositoryFilterProperty"')}function cfnReplicationConfigurationRepositoryFilterPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnReplicationConfiguration_RepositoryFilterPropertyValidator(properties).assertSuccess(),{Filter:cdk.stringToCloudFormation(properties.filter),FilterType:cdk.stringToCloudFormation(properties.filterType)}):properties}function CfnReplicationConfigurationRepositoryFilterPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("filter","Filter",cfn_parse.FromCloudFormation.getString(properties.Filter)),ret.addPropertyResult("filterType","FilterType",cfn_parse.FromCloudFormation.getString(properties.FilterType)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRepositoryPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("encryptionConfiguration",CfnRepository_EncryptionConfigurationPropertyValidator)(properties.encryptionConfiguration)),errors.collect(cdk.propertyValidator("imageScanningConfiguration",CfnRepository_ImageScanningConfigurationPropertyValidator)(properties.imageScanningConfiguration)),errors.collect(cdk.propertyValidator("imageTagMutability",cdk.validateString)(properties.imageTagMutability)),errors.collect(cdk.propertyValidator("lifecyclePolicy",CfnRepository_LifecyclePolicyPropertyValidator)(properties.lifecyclePolicy)),errors.collect(cdk.propertyValidator("repositoryName",cdk.validateString)(properties.repositoryName)),errors.collect(cdk.propertyValidator("repositoryPolicyText",cdk.validateObject)(properties.repositoryPolicyText)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnRepositoryProps"')}function cfnRepositoryPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRepositoryPropsValidator(properties).assertSuccess(),{EncryptionConfiguration:cfnRepositoryEncryptionConfigurationPropertyToCloudFormation(properties.encryptionConfiguration),ImageScanningConfiguration:cfnRepositoryImageScanningConfigurationPropertyToCloudFormation(properties.imageScanningConfiguration),ImageTagMutability:cdk.stringToCloudFormation(properties.imageTagMutability),LifecyclePolicy:cfnRepositoryLifecyclePolicyPropertyToCloudFormation(properties.lifecyclePolicy),RepositoryName:cdk.stringToCloudFormation(properties.repositoryName),RepositoryPolicyText:cdk.objectToCloudFormation(properties.repositoryPolicyText),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnRepositoryPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("encryptionConfiguration","EncryptionConfiguration",properties.EncryptionConfiguration!=null?CfnRepositoryEncryptionConfigurationPropertyFromCloudFormation(properties.EncryptionConfiguration):void 0),ret.addPropertyResult("imageScanningConfiguration","ImageScanningConfiguration",properties.ImageScanningConfiguration!=null?CfnRepositoryImageScanningConfigurationPropertyFromCloudFormation(properties.ImageScanningConfiguration):void 0),ret.addPropertyResult("imageTagMutability","ImageTagMutability",properties.ImageTagMutability!=null?cfn_parse.FromCloudFormation.getString(properties.ImageTagMutability):void 0),ret.addPropertyResult("lifecyclePolicy","LifecyclePolicy",properties.LifecyclePolicy!=null?CfnRepositoryLifecyclePolicyPropertyFromCloudFormation(properties.LifecyclePolicy):void 0),ret.addPropertyResult("repositoryName","RepositoryName",properties.RepositoryName!=null?cfn_parse.FromCloudFormation.getString(properties.RepositoryName):void 0),ret.addPropertyResult("repositoryPolicyText","RepositoryPolicyText",properties.RepositoryPolicyText!=null?cfn_parse.FromCloudFormation.getAny(properties.RepositoryPolicyText):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnRepository extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnRepository.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_CfnRepositoryProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnRepository),error}this.attrArn=cdk.Token.asString(this.getAtt("Arn")),this.attrRepositoryUri=cdk.Token.asString(this.getAtt("RepositoryUri")),this.encryptionConfiguration=props.encryptionConfiguration,this.imageScanningConfiguration=props.imageScanningConfiguration,this.imageTagMutability=props.imageTagMutability,this.lifecyclePolicy=props.lifecyclePolicy,this.repositoryName=props.repositoryName,this.repositoryPolicyText=props.repositoryPolicyText,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::ECR::Repository",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnRepositoryPropsFromCloudFormation(resourceProperties),ret=new CfnRepository(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnRepository.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{encryptionConfiguration:this.encryptionConfiguration,imageScanningConfiguration:this.imageScanningConfiguration,imageTagMutability:this.imageTagMutability,lifecyclePolicy:this.lifecyclePolicy,repositoryName:this.repositoryName,repositoryPolicyText:this.repositoryPolicyText,tags:this.tags.renderTags()}}renderProperties(props){return cfnRepositoryPropsToCloudFormation(props)}}exports.CfnRepository=CfnRepository,_e=JSII_RTTI_SYMBOL_1,CfnRepository[_e]={fqn:"aws-cdk-lib.aws_ecr.CfnRepository",version:"2.34.1"},CfnRepository.CFN_RESOURCE_TYPE_NAME="AWS::ECR::Repository";function CfnRepository_EncryptionConfigurationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("encryptionType",cdk.requiredValidator)(properties.encryptionType)),errors.collect(cdk.propertyValidator("encryptionType",cdk.validateString)(properties.encryptionType)),errors.collect(cdk.propertyValidator("kmsKey",cdk.validateString)(properties.kmsKey)),errors.wrap('supplied properties not correct for "EncryptionConfigurationProperty"')}function cfnRepositoryEncryptionConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRepository_EncryptionConfigurationPropertyValidator(properties).assertSuccess(),{EncryptionType:cdk.stringToCloudFormation(properties.encryptionType),KmsKey:cdk.stringToCloudFormation(properties.kmsKey)}):properties}function CfnRepositoryEncryptionConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("encryptionType","EncryptionType",cfn_parse.FromCloudFormation.getString(properties.EncryptionType)),ret.addPropertyResult("kmsKey","KmsKey",properties.KmsKey!=null?cfn_parse.FromCloudFormation.getString(properties.KmsKey):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRepository_ImageScanningConfigurationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("scanOnPush",cdk.validateBoolean)(properties.scanOnPush)),errors.wrap('supplied properties not correct for "ImageScanningConfigurationProperty"')}function cfnRepositoryImageScanningConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRepository_ImageScanningConfigurationPropertyValidator(properties).assertSuccess(),{ScanOnPush:cdk.booleanToCloudFormation(properties.scanOnPush)}):properties}function CfnRepositoryImageScanningConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("scanOnPush","ScanOnPush",properties.ScanOnPush!=null?cfn_parse.FromCloudFormation.getBoolean(properties.ScanOnPush):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRepository_LifecyclePolicyPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("lifecyclePolicyText",cdk.validateString)(properties.lifecyclePolicyText)),errors.collect(cdk.propertyValidator("registryId",cdk.validateString)(properties.registryId)),errors.wrap('supplied properties not correct for "LifecyclePolicyProperty"')}function cfnRepositoryLifecyclePolicyPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRepository_LifecyclePolicyPropertyValidator(properties).assertSuccess(),{LifecyclePolicyText:cdk.stringToCloudFormation(properties.lifecyclePolicyText),RegistryId:cdk.stringToCloudFormation(properties.registryId)}):properties}function CfnRepositoryLifecyclePolicyPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("lifecyclePolicyText","LifecyclePolicyText",properties.LifecyclePolicyText!=null?cfn_parse.FromCloudFormation.getString(properties.LifecyclePolicyText):void 0),ret.addPropertyResult("registryId","RegistryId",properties.RegistryId!=null?cfn_parse.FromCloudFormation.getString(properties.RegistryId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}
|
|
2
2
|
//# sourceMappingURL=ecr.generated.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RepositoryEncryption=exports.TagMutability=exports.Repository=exports.RepositoryBase=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),os_1=require("os"),events=require("../../aws-events"),iam=require("../../aws-iam"),core_1=require("../../core"),ecr_generated_1=require("./ecr.generated"),lifecycle_1=require("./lifecycle");class RepositoryBase extends core_1.Resource{get repositoryUri(){return this.repositoryUriForTag()}repositoryUriForTag(tag){const tagSuffix=tag?`:${tag}`:"";return this.repositoryUriWithSuffix(tagSuffix)}repositoryUriForDigest(digest){const digestSuffix=digest?`@${digest}`:"";return this.repositoryUriWithSuffix(digestSuffix)}repositoryUriForTagOrDigest(tagOrDigest){return tagOrDigest?.startsWith("sha256:")?this.repositoryUriForDigest(tagOrDigest):this.repositoryUriForTag(tagOrDigest)}repositoryUriWithSuffix(suffix){const parts=this.stack.splitArn(this.repositoryArn,core_1.ArnFormat.SLASH_RESOURCE_NAME);return`${parts.account}.dkr.ecr.${parts.region}.${this.stack.urlSuffix}/${this.repositoryName}${suffix}`}onCloudTrailEvent(id,options={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_events_OnEventOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.onCloudTrailEvent),error}const rule=new events.Rule(this,id,options);return rule.addTarget(options.target),rule.addEventPattern({source:["aws.ecr"],detailType:["AWS API Call via CloudTrail"],detail:{requestParameters:{repositoryName:[this.repositoryName]}}}),rule}onCloudTrailImagePushed(id,options={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_OnCloudTrailImagePushedOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.onCloudTrailImagePushed),error}const rule=this.onCloudTrailEvent(id,options);return rule.addEventPattern({detail:{eventName:["PutImage"],requestParameters:{imageTag:options.imageTag?[options.imageTag]:void 0}}}),rule}onImageScanCompleted(id,options={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_OnImageScanCompletedOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.onImageScanCompleted),error}const rule=new events.Rule(this,id,options);return rule.addTarget(options.target),rule.addEventPattern({source:["aws.ecr"],detailType:["ECR Image Scan"],detail:{"repository-name":[this.repositoryName],"scan-status":["COMPLETE"],"image-tags":options.imageTags??void 0}}),rule}onEvent(id,options={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_events_OnEventOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.onEvent),error}const rule=new events.Rule(this,id,options);return rule.addEventPattern({source:["aws.ecr"],resources:[this.repositoryArn]}),rule.addTarget(options.target),rule}grant(grantee,...actions){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grant),error}return iam.Grant.addToPrincipalOrResource({grantee,actions,resourceArns:[this.repositoryArn],resourceSelfArns:[],resource:this})}grantPull(grantee){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantPull),error}const ret=this.grant(grantee,"ecr:BatchCheckLayerAvailability","ecr:GetDownloadUrlForLayer","ecr:BatchGetImage");return iam.Grant.addToPrincipal({grantee,actions:["ecr:GetAuthorizationToken"],resourceArns:["*"],scope:this}),ret}grantPullPush(grantee){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantPullPush),error}return this.grantPull(grantee),this.grant(grantee,"ecr:PutImage","ecr:InitiateLayerUpload","ecr:UploadLayerPart","ecr:CompleteLayerUpload")}}exports.RepositoryBase=RepositoryBase,_a=JSII_RTTI_SYMBOL_1,RepositoryBase[_a]={fqn:"aws-cdk-lib.aws_ecr.RepositoryBase",version:"2.34.0"};class Repository extends RepositoryBase{constructor(scope,id,props={}){super(scope,id,{physicalName:props.repositoryName}),this.lifecycleRules=new Array;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_RepositoryProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Repository),error}Repository.validateRepositoryName(this.physicalName);const resource=new ecr_generated_1.CfnRepository(this,"Resource",{repositoryName:this.physicalName,repositoryPolicyText:core_1.Lazy.any({produce:()=>this.policyDocument}),lifecyclePolicy:core_1.Lazy.any({produce:()=>this.renderLifecyclePolicy()}),imageScanningConfiguration:props.imageScanOnPush!==void 0?{scanOnPush:props.imageScanOnPush}:void 0,imageTagMutability:props.imageTagMutability||void 0,encryptionConfiguration:this.parseEncryption(props)});resource.applyRemovalPolicy(props.removalPolicy),this.registryId=props.lifecycleRegistryId,props.lifecycleRules&&props.lifecycleRules.forEach(this.addLifecycleRule.bind(this)),this.repositoryName=this.getResourceNameAttribute(resource.ref),this.repositoryArn=this.getResourceArnAttribute(resource.attrArn,{service:"ecr",resource:"repository",resourceName:this.physicalName}),this.node.addValidation({validate:()=>this.policyDocument?.validateForResourcePolicy()??[]})}static fromRepositoryAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_RepositoryAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromRepositoryAttributes),error}class Import extends RepositoryBase{constructor(){super(...arguments),this.repositoryName=attrs.repositoryName,this.repositoryArn=attrs.repositoryArn}addToResourcePolicy(_statement){return{statementAdded:!1}}}return new Import(scope,id)}static fromRepositoryArn(scope,id,repositoryArn){if(core_1.Token.isUnresolved(repositoryArn))throw new Error('"repositoryArn" is a late-bound value, and therefore "repositoryName" is required. Use `fromRepositoryAttributes` instead');const repositoryName=repositoryArn.split("/").slice(1).join("/");class Import extends RepositoryBase{constructor(){super(...arguments),this.repositoryName=repositoryName,this.repositoryArn=repositoryArn}addToResourcePolicy(_statement){return{statementAdded:!1}}}return new Import(scope,id,{environmentFromArn:repositoryArn})}static fromRepositoryName(scope,id,repositoryName){class Import extends RepositoryBase{constructor(){super(...arguments),this.repositoryName=repositoryName,this.repositoryArn=Repository.arnForLocalRepository(repositoryName,scope)}addToResourcePolicy(_statement){return{statementAdded:!1}}}return new Import(scope,id)}static arnForLocalRepository(repositoryName,scope,account){return core_1.Stack.of(scope).formatArn({account,service:"ecr",resource:"repository",resourceName:repositoryName})}static validateRepositoryName(physicalName){const repositoryName=physicalName;if(!repositoryName||core_1.Token.isUnresolved(repositoryName))return;const errors=[];if((repositoryName.length<2||repositoryName.length>256)&&errors.push("Repository name must be at least 2 and no more than 256 characters"),/^(?:[a-z0-9]+(?:[._-][a-z0-9]+)*\/)*[a-z0-9]+(?:[._-][a-z0-9]+)*$/.test(repositoryName)||errors.push("Repository name must follow the specified pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*"),errors.length>0)throw new Error(`Invalid ECR repository name (value: ${repositoryName})${os_1.EOL}${errors.join(os_1.EOL)}`)}addToResourcePolicy(statement){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_PolicyStatement(statement)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addToResourcePolicy),error}return this.policyDocument===void 0&&(this.policyDocument=new iam.PolicyDocument),this.policyDocument.addStatements(statement),{statementAdded:!0,policyDependable:this.policyDocument}}addLifecycleRule(rule){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_LifecycleRule(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addLifecycleRule),error}if(rule.tagStatus===void 0&&(rule={...rule,tagStatus:rule.tagPrefixList===void 0?lifecycle_1.TagStatus.ANY:lifecycle_1.TagStatus.TAGGED}),rule.tagStatus===lifecycle_1.TagStatus.TAGGED&&(rule.tagPrefixList===void 0||rule.tagPrefixList.length===0))throw new Error("TagStatus.Tagged requires the specification of a tagPrefixList");if(rule.tagStatus!==lifecycle_1.TagStatus.TAGGED&&rule.tagPrefixList!==void 0)throw new Error("tagPrefixList can only be specified when tagStatus is set to Tagged");if(rule.maxImageAge!==void 0==(rule.maxImageCount!==void 0))throw new Error(`Life cycle rule must contain exactly one of 'maxImageAge' and 'maxImageCount', got: ${JSON.stringify(rule)}`);if(rule.tagStatus===lifecycle_1.TagStatus.ANY&&this.lifecycleRules.filter(r=>r.tagStatus===lifecycle_1.TagStatus.ANY).length>0)throw new Error("Life cycle can only have one TagStatus.Any rule");this.lifecycleRules.push({...rule})}renderLifecyclePolicy(){const stack=core_1.Stack.of(this);let lifecyclePolicyText;if(!(this.lifecycleRules.length===0&&!this.registryId))return this.lifecycleRules.length>0&&(lifecyclePolicyText=JSON.stringify(stack.resolve({rules:this.orderedLifecycleRules().map(renderLifecycleRule)}))),{lifecyclePolicyText,registryId:this.registryId}}orderedLifecycleRules(){if(this.lifecycleRules.length===0)return[];const prioritizedRules=this.lifecycleRules.filter(r=>r.rulePriority!==void 0&&r.tagStatus!==lifecycle_1.TagStatus.ANY),autoPrioritizedRules=this.lifecycleRules.filter(r=>r.rulePriority===void 0&&r.tagStatus!==lifecycle_1.TagStatus.ANY),anyRules=this.lifecycleRules.filter(r=>r.tagStatus===lifecycle_1.TagStatus.ANY);if(anyRules.length>0&&anyRules[0].rulePriority!==void 0&&autoPrioritizedRules.length>0)throw new Error("Cannot combine prioritized TagStatus.Any rule with unprioritized rules. Remove rulePriority from the 'Any' rule.");const prios=prioritizedRules.map(r=>r.rulePriority);let autoPrio=(prios.length>0?Math.max(...prios):0)+1;const ret=new Array;for(const rule of prioritizedRules.concat(autoPrioritizedRules).concat(anyRules))ret.push({...rule,rulePriority:rule.rulePriority??autoPrio++});return validateAnyRuleLast(ret),ret}parseEncryption(props){const encryptionType=props.encryption??(props.encryptionKey?RepositoryEncryption.KMS:RepositoryEncryption.AES_256);if(encryptionType!==RepositoryEncryption.KMS&&props.encryptionKey)throw new Error(`encryptionKey is specified, so 'encryption' must be set to KMS (value: ${encryptionType.value})`);if(encryptionType!==RepositoryEncryption.AES_256){if(encryptionType===RepositoryEncryption.KMS)return{encryptionType:"KMS",kmsKey:props.encryptionKey?.keyArn};throw new Error(`Unexpected 'encryptionType': ${encryptionType}`)}}}exports.Repository=Repository,_b=JSII_RTTI_SYMBOL_1,Repository[_b]={fqn:"aws-cdk-lib.aws_ecr.Repository",version:"2.34.0"};function validateAnyRuleLast(rules){const anyRules=rules.filter(r=>r.tagStatus===lifecycle_1.TagStatus.ANY);if(anyRules.length===1){const maxPrio=Math.max(...rules.map(r=>r.rulePriority));if(anyRules[0].rulePriority!==maxPrio)throw new Error(`TagStatus.Any rule must have highest priority, has ${anyRules[0].rulePriority} which is smaller than ${maxPrio}`)}}function renderLifecycleRule(rule){return{rulePriority:rule.rulePriority,description:rule.description,selection:{tagStatus:rule.tagStatus||lifecycle_1.TagStatus.ANY,tagPrefixList:rule.tagPrefixList,countType:rule.maxImageAge!==void 0?"sinceImagePushed":"imageCountMoreThan",countNumber:rule.maxImageAge?.toDays()??rule.maxImageCount,countUnit:rule.maxImageAge!==void 0?"days":void 0},action:{type:"expire"}}}var TagMutability;(function(TagMutability2){TagMutability2.MUTABLE="MUTABLE",TagMutability2.IMMUTABLE="IMMUTABLE"})(TagMutability=exports.TagMutability||(exports.TagMutability={}));class RepositoryEncryption{constructor(value){this.value=value}}exports.RepositoryEncryption=RepositoryEncryption,_c=JSII_RTTI_SYMBOL_1,RepositoryEncryption[_c]={fqn:"aws-cdk-lib.aws_ecr.RepositoryEncryption",version:"2.34.0"},RepositoryEncryption.AES_256=new RepositoryEncryption("AES256"),RepositoryEncryption.KMS=new RepositoryEncryption("KMS");
|
|
1
|
+
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RepositoryEncryption=exports.TagMutability=exports.Repository=exports.RepositoryBase=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),os_1=require("os"),events=require("../../aws-events"),iam=require("../../aws-iam"),core_1=require("../../core"),ecr_generated_1=require("./ecr.generated"),lifecycle_1=require("./lifecycle");class RepositoryBase extends core_1.Resource{get repositoryUri(){return this.repositoryUriForTag()}repositoryUriForTag(tag){const tagSuffix=tag?`:${tag}`:"";return this.repositoryUriWithSuffix(tagSuffix)}repositoryUriForDigest(digest){const digestSuffix=digest?`@${digest}`:"";return this.repositoryUriWithSuffix(digestSuffix)}repositoryUriForTagOrDigest(tagOrDigest){return tagOrDigest?.startsWith("sha256:")?this.repositoryUriForDigest(tagOrDigest):this.repositoryUriForTag(tagOrDigest)}repositoryUriWithSuffix(suffix){const parts=this.stack.splitArn(this.repositoryArn,core_1.ArnFormat.SLASH_RESOURCE_NAME);return`${parts.account}.dkr.ecr.${parts.region}.${this.stack.urlSuffix}/${this.repositoryName}${suffix}`}onCloudTrailEvent(id,options={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_events_OnEventOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.onCloudTrailEvent),error}const rule=new events.Rule(this,id,options);return rule.addTarget(options.target),rule.addEventPattern({source:["aws.ecr"],detailType:["AWS API Call via CloudTrail"],detail:{requestParameters:{repositoryName:[this.repositoryName]}}}),rule}onCloudTrailImagePushed(id,options={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_OnCloudTrailImagePushedOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.onCloudTrailImagePushed),error}const rule=this.onCloudTrailEvent(id,options);return rule.addEventPattern({detail:{eventName:["PutImage"],requestParameters:{imageTag:options.imageTag?[options.imageTag]:void 0}}}),rule}onImageScanCompleted(id,options={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_OnImageScanCompletedOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.onImageScanCompleted),error}const rule=new events.Rule(this,id,options);return rule.addTarget(options.target),rule.addEventPattern({source:["aws.ecr"],detailType:["ECR Image Scan"],detail:{"repository-name":[this.repositoryName],"scan-status":["COMPLETE"],"image-tags":options.imageTags??void 0}}),rule}onEvent(id,options={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_events_OnEventOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.onEvent),error}const rule=new events.Rule(this,id,options);return rule.addEventPattern({source:["aws.ecr"],resources:[this.repositoryArn]}),rule.addTarget(options.target),rule}grant(grantee,...actions){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grant),error}return iam.Grant.addToPrincipalOrResource({grantee,actions,resourceArns:[this.repositoryArn],resourceSelfArns:[],resource:this})}grantPull(grantee){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantPull),error}const ret=this.grant(grantee,"ecr:BatchCheckLayerAvailability","ecr:GetDownloadUrlForLayer","ecr:BatchGetImage");return iam.Grant.addToPrincipal({grantee,actions:["ecr:GetAuthorizationToken"],resourceArns:["*"],scope:this}),ret}grantPullPush(grantee){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantPullPush),error}return this.grantPull(grantee),this.grant(grantee,"ecr:PutImage","ecr:InitiateLayerUpload","ecr:UploadLayerPart","ecr:CompleteLayerUpload")}}exports.RepositoryBase=RepositoryBase,_a=JSII_RTTI_SYMBOL_1,RepositoryBase[_a]={fqn:"aws-cdk-lib.aws_ecr.RepositoryBase",version:"2.34.1"};class Repository extends RepositoryBase{constructor(scope,id,props={}){super(scope,id,{physicalName:props.repositoryName}),this.lifecycleRules=new Array;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_RepositoryProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Repository),error}Repository.validateRepositoryName(this.physicalName);const resource=new ecr_generated_1.CfnRepository(this,"Resource",{repositoryName:this.physicalName,repositoryPolicyText:core_1.Lazy.any({produce:()=>this.policyDocument}),lifecyclePolicy:core_1.Lazy.any({produce:()=>this.renderLifecyclePolicy()}),imageScanningConfiguration:props.imageScanOnPush!==void 0?{scanOnPush:props.imageScanOnPush}:void 0,imageTagMutability:props.imageTagMutability||void 0,encryptionConfiguration:this.parseEncryption(props)});resource.applyRemovalPolicy(props.removalPolicy),this.registryId=props.lifecycleRegistryId,props.lifecycleRules&&props.lifecycleRules.forEach(this.addLifecycleRule.bind(this)),this.repositoryName=this.getResourceNameAttribute(resource.ref),this.repositoryArn=this.getResourceArnAttribute(resource.attrArn,{service:"ecr",resource:"repository",resourceName:this.physicalName}),this.node.addValidation({validate:()=>this.policyDocument?.validateForResourcePolicy()??[]})}static fromRepositoryAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_RepositoryAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromRepositoryAttributes),error}class Import extends RepositoryBase{constructor(){super(...arguments),this.repositoryName=attrs.repositoryName,this.repositoryArn=attrs.repositoryArn}addToResourcePolicy(_statement){return{statementAdded:!1}}}return new Import(scope,id)}static fromRepositoryArn(scope,id,repositoryArn){if(core_1.Token.isUnresolved(repositoryArn))throw new Error('"repositoryArn" is a late-bound value, and therefore "repositoryName" is required. Use `fromRepositoryAttributes` instead');const repositoryName=repositoryArn.split("/").slice(1).join("/");class Import extends RepositoryBase{constructor(){super(...arguments),this.repositoryName=repositoryName,this.repositoryArn=repositoryArn}addToResourcePolicy(_statement){return{statementAdded:!1}}}return new Import(scope,id,{environmentFromArn:repositoryArn})}static fromRepositoryName(scope,id,repositoryName){class Import extends RepositoryBase{constructor(){super(...arguments),this.repositoryName=repositoryName,this.repositoryArn=Repository.arnForLocalRepository(repositoryName,scope)}addToResourcePolicy(_statement){return{statementAdded:!1}}}return new Import(scope,id)}static arnForLocalRepository(repositoryName,scope,account){return core_1.Stack.of(scope).formatArn({account,service:"ecr",resource:"repository",resourceName:repositoryName})}static validateRepositoryName(physicalName){const repositoryName=physicalName;if(!repositoryName||core_1.Token.isUnresolved(repositoryName))return;const errors=[];if((repositoryName.length<2||repositoryName.length>256)&&errors.push("Repository name must be at least 2 and no more than 256 characters"),/^(?:[a-z0-9]+(?:[._-][a-z0-9]+)*\/)*[a-z0-9]+(?:[._-][a-z0-9]+)*$/.test(repositoryName)||errors.push("Repository name must follow the specified pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*"),errors.length>0)throw new Error(`Invalid ECR repository name (value: ${repositoryName})${os_1.EOL}${errors.join(os_1.EOL)}`)}addToResourcePolicy(statement){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_PolicyStatement(statement)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addToResourcePolicy),error}return this.policyDocument===void 0&&(this.policyDocument=new iam.PolicyDocument),this.policyDocument.addStatements(statement),{statementAdded:!0,policyDependable:this.policyDocument}}addLifecycleRule(rule){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_LifecycleRule(rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addLifecycleRule),error}if(rule.tagStatus===void 0&&(rule={...rule,tagStatus:rule.tagPrefixList===void 0?lifecycle_1.TagStatus.ANY:lifecycle_1.TagStatus.TAGGED}),rule.tagStatus===lifecycle_1.TagStatus.TAGGED&&(rule.tagPrefixList===void 0||rule.tagPrefixList.length===0))throw new Error("TagStatus.Tagged requires the specification of a tagPrefixList");if(rule.tagStatus!==lifecycle_1.TagStatus.TAGGED&&rule.tagPrefixList!==void 0)throw new Error("tagPrefixList can only be specified when tagStatus is set to Tagged");if(rule.maxImageAge!==void 0==(rule.maxImageCount!==void 0))throw new Error(`Life cycle rule must contain exactly one of 'maxImageAge' and 'maxImageCount', got: ${JSON.stringify(rule)}`);if(rule.tagStatus===lifecycle_1.TagStatus.ANY&&this.lifecycleRules.filter(r=>r.tagStatus===lifecycle_1.TagStatus.ANY).length>0)throw new Error("Life cycle can only have one TagStatus.Any rule");this.lifecycleRules.push({...rule})}renderLifecyclePolicy(){const stack=core_1.Stack.of(this);let lifecyclePolicyText;if(!(this.lifecycleRules.length===0&&!this.registryId))return this.lifecycleRules.length>0&&(lifecyclePolicyText=JSON.stringify(stack.resolve({rules:this.orderedLifecycleRules().map(renderLifecycleRule)}))),{lifecyclePolicyText,registryId:this.registryId}}orderedLifecycleRules(){if(this.lifecycleRules.length===0)return[];const prioritizedRules=this.lifecycleRules.filter(r=>r.rulePriority!==void 0&&r.tagStatus!==lifecycle_1.TagStatus.ANY),autoPrioritizedRules=this.lifecycleRules.filter(r=>r.rulePriority===void 0&&r.tagStatus!==lifecycle_1.TagStatus.ANY),anyRules=this.lifecycleRules.filter(r=>r.tagStatus===lifecycle_1.TagStatus.ANY);if(anyRules.length>0&&anyRules[0].rulePriority!==void 0&&autoPrioritizedRules.length>0)throw new Error("Cannot combine prioritized TagStatus.Any rule with unprioritized rules. Remove rulePriority from the 'Any' rule.");const prios=prioritizedRules.map(r=>r.rulePriority);let autoPrio=(prios.length>0?Math.max(...prios):0)+1;const ret=new Array;for(const rule of prioritizedRules.concat(autoPrioritizedRules).concat(anyRules))ret.push({...rule,rulePriority:rule.rulePriority??autoPrio++});return validateAnyRuleLast(ret),ret}parseEncryption(props){const encryptionType=props.encryption??(props.encryptionKey?RepositoryEncryption.KMS:RepositoryEncryption.AES_256);if(encryptionType!==RepositoryEncryption.KMS&&props.encryptionKey)throw new Error(`encryptionKey is specified, so 'encryption' must be set to KMS (value: ${encryptionType.value})`);if(encryptionType!==RepositoryEncryption.AES_256){if(encryptionType===RepositoryEncryption.KMS)return{encryptionType:"KMS",kmsKey:props.encryptionKey?.keyArn};throw new Error(`Unexpected 'encryptionType': ${encryptionType}`)}}}exports.Repository=Repository,_b=JSII_RTTI_SYMBOL_1,Repository[_b]={fqn:"aws-cdk-lib.aws_ecr.Repository",version:"2.34.1"};function validateAnyRuleLast(rules){const anyRules=rules.filter(r=>r.tagStatus===lifecycle_1.TagStatus.ANY);if(anyRules.length===1){const maxPrio=Math.max(...rules.map(r=>r.rulePriority));if(anyRules[0].rulePriority!==maxPrio)throw new Error(`TagStatus.Any rule must have highest priority, has ${anyRules[0].rulePriority} which is smaller than ${maxPrio}`)}}function renderLifecycleRule(rule){return{rulePriority:rule.rulePriority,description:rule.description,selection:{tagStatus:rule.tagStatus||lifecycle_1.TagStatus.ANY,tagPrefixList:rule.tagPrefixList,countType:rule.maxImageAge!==void 0?"sinceImagePushed":"imageCountMoreThan",countNumber:rule.maxImageAge?.toDays()??rule.maxImageCount,countUnit:rule.maxImageAge!==void 0?"days":void 0},action:{type:"expire"}}}var TagMutability;(function(TagMutability2){TagMutability2.MUTABLE="MUTABLE",TagMutability2.IMMUTABLE="IMMUTABLE"})(TagMutability=exports.TagMutability||(exports.TagMutability={}));class RepositoryEncryption{constructor(value){this.value=value}}exports.RepositoryEncryption=RepositoryEncryption,_c=JSII_RTTI_SYMBOL_1,RepositoryEncryption[_c]={fqn:"aws-cdk-lib.aws_ecr.RepositoryEncryption",version:"2.34.1"},RepositoryEncryption.AES_256=new RepositoryEncryption("AES256"),RepositoryEncryption.KMS=new RepositoryEncryption("KMS");
|
|
2
2
|
//# sourceMappingURL=repository.js.map
|