Navigation

  • index
  • modules |
  • next |
  • previous |
  • Boto3 Docs 1.26.85 documentation »
  • Available services »
  • EC2 »
  • Vpc »
Boto3 Docs 1.26.85 documentation

Table Of Contents

  • Quickstart
  • A sample tutorial
  • Code examples
  • Developer guide
  • Security
  • Available services
    • AccessAnalyzer
    • Account
    • ACM
    • ACMPCA
    • AlexaForBusiness
    • PrometheusService
    • Amplify
    • AmplifyBackend
    • AmplifyUIBuilder
    • APIGateway
    • ApiGatewayManagementApi
    • ApiGatewayV2
    • AppConfig
    • AppConfigData
    • Appflow
    • AppIntegrationsService
    • ApplicationAutoScaling
    • ApplicationInsights
    • ApplicationCostProfiler
    • AppMesh
    • AppRunner
    • AppStream
    • AppSync
    • ARCZonalShift
    • Athena
    • AuditManager
    • AutoScaling
    • AutoScalingPlans
    • Backup
    • BackupGateway
    • BackupStorage
    • Batch
    • BillingConductor
    • Braket
    • Budgets
    • CostExplorer
    • Chime
    • ChimeSDKIdentity
    • ChimeSDKMediaPipelines
    • ChimeSDKMeetings
    • ChimeSDKMessaging
    • ChimeSDKVoice
    • CleanRoomsService
    • Cloud9
    • CloudControlApi
    • CloudDirectory
    • CloudFormation
    • CloudFront
    • CloudHSM
    • CloudHSMV2
    • CloudSearch
    • CloudSearchDomain
    • CloudTrail
    • CloudTrailDataService
    • CloudWatch
    • CodeArtifact
    • CodeBuild
    • CodeCatalyst
    • CodeCommit
    • CodeDeploy
    • CodeGuruReviewer
    • CodeGuruProfiler
    • CodePipeline
    • CodeStar
    • CodeStarconnections
    • CodeStarNotifications
    • CognitoIdentity
    • CognitoIdentityProvider
    • CognitoSync
    • Comprehend
    • ComprehendMedical
    • ComputeOptimizer
    • ConfigService
    • Connect
    • ConnectContactLens
    • ConnectCampaignService
    • ConnectCases
    • ConnectParticipant
    • ControlTower
    • CostandUsageReportService
    • CustomerProfiles
    • GlueDataBrew
    • DataExchange
    • DataPipeline
    • DataSync
    • DAX
    • Detective
    • DeviceFarm
    • DevOpsGuru
    • DirectConnect
    • ApplicationDiscoveryService
    • DLM
    • DatabaseMigrationService
    • DocDB
    • DocDBElastic
    • drs
    • DirectoryService
    • DynamoDB
    • DynamoDBStreams
    • EBS
    • EC2
      • Client
      • Paginators
      • Waiters
      • Resources
    • EC2InstanceConnect
    • ECR
    • ECRPublic
    • ECS
    • EFS
    • EKS
    • ElasticInference
    • ElastiCache
    • ElasticBeanstalk
    • ElasticTranscoder
    • ElasticLoadBalancing
    • ElasticLoadBalancingv2
    • EMR
    • EMRContainers
    • EMRServerless
    • ElasticsearchService
    • EventBridge
    • CloudWatchEvidently
    • finspace
    • FinSpaceData
    • Firehose
    • FIS
    • FMS
    • ForecastService
    • ForecastQueryService
    • FraudDetector
    • FSx
    • GameLift
    • GameSparks
    • Glacier
    • GlobalAccelerator
    • Glue
    • ManagedGrafana
    • Greengrass
    • GreengrassV2
    • GroundStation
    • GuardDuty
    • Health
    • HealthLake
    • Honeycode
    • IAM
    • IdentityStore
    • imagebuilder
    • ImportExport
    • Inspector
    • Inspector2
    • CloudWatchInternetMonitor
    • IoT
    • IoTDataPlane
    • IoTJobsDataPlane
    • IoTRoboRunner
    • IoT1ClickDevicesService
    • IoT1ClickProjects
    • IoTAnalytics
    • IoTDeviceAdvisor
    • IoTEvents
    • IoTEventsData
    • IoTFleetHub
    • IoTFleetWise
    • IoTSecureTunneling
    • IoTSiteWise
    • IoTThingsGraph
    • IoTTwinMaker
    • IoTWireless
    • IVS
    • ivschat
    • Kafka
    • KafkaConnect
    • kendra
    • KendraRanking
    • Keyspaces
    • Kinesis
    • KinesisVideoArchivedMedia
    • KinesisVideoMedia
    • KinesisVideoSignalingChannels
    • KinesisVideoWebRTCStorage
    • KinesisAnalytics
    • KinesisAnalyticsV2
    • KinesisVideo
    • KMS
    • LakeFormation
    • Lambda
    • LexModelBuildingService
    • LexRuntimeService
    • LexModelsV2
    • LexRuntimeV2
    • LicenseManager
    • LicenseManagerLinuxSubscriptions
    • LicenseManagerUserSubscriptions
    • Lightsail
    • LocationService
    • CloudWatchLogs
    • LookoutEquipment
    • LookoutMetrics
    • LookoutforVision
    • MainframeModernization
    • MachineLearning
    • Macie
    • Macie2
    • ManagedBlockchain
    • MarketplaceCatalog
    • MarketplaceEntitlementService
    • MarketplaceCommerceAnalytics
    • MediaConnect
    • MediaConvert
    • MediaLive
    • MediaPackage
    • MediaPackageVod
    • MediaStore
    • MediaStoreData
    • MediaTailor
    • MemoryDB
    • MarketplaceMetering
    • MigrationHub
    • mgn
    • MigrationHubRefactorSpaces
    • MigrationHubConfig
    • MigrationHubOrchestrator
    • MigrationHubStrategyRecommendations
    • Mobile
    • MQ
    • MTurk
    • MWAA
    • Neptune
    • NetworkFirewall
    • NetworkManager
    • NimbleStudio
    • CloudWatchObservabilityAccessManager
    • Omics
    • OpenSearchService
    • OpenSearchServiceServerless
    • OpsWorks
    • OpsWorksCM
    • Organizations
    • Outposts
    • Panorama
    • Personalize
    • PersonalizeEvents
    • PersonalizeRuntime
    • PI
    • Pinpoint
    • PinpointEmail
    • PinpointSMSVoice
    • PinpointSMSVoiceV2
    • EventBridgePipes
    • Polly
    • Pricing
    • Private5G
    • Proton
    • QLDB
    • QLDBSession
    • QuickSight
    • RAM
    • RecycleBin
    • RDS
    • RDSDataService
    • Redshift
    • RedshiftDataAPIService
    • RedshiftServerless
    • Rekognition
    • ResilienceHub
    • ResourceExplorer
    • ResourceGroups
    • ResourceGroupsTaggingAPI
    • RoboMaker
    • IAMRolesAnywhere
    • Route53
    • Route53RecoveryCluster
    • Route53RecoveryControlConfig
    • Route53RecoveryReadiness
    • Route53Domains
    • Route53Resolver
    • CloudWatchRUM
    • S3
    • S3Control
    • S3Outposts
    • SageMaker
    • AugmentedAIRuntime
    • SagemakerEdgeManager
    • SageMakerFeatureStoreRuntime
    • SageMakergeospatialcapabilities
    • SageMakerMetrics
    • SageMakerRuntime
    • SavingsPlans
    • EventBridgeScheduler
    • Schemas
    • SimpleDB
    • SecretsManager
    • SecurityHub
    • SecurityLake
    • ServerlessApplicationRepository
    • ServiceQuotas
    • ServiceCatalog
    • AppRegistry
    • ServiceDiscovery
    • SES
    • SESV2
    • Shield
    • signer
    • SimSpaceWeaver
    • SMS
    • PinpointSMSVoice
    • SnowDeviceManagement
    • Snowball
    • SNS
    • SQS
    • SSM
    • SSMContacts
    • SSMIncidents
    • SsmSap
    • SSO
    • SSOAdmin
    • SSOOIDC
    • SFN
    • StorageGateway
    • STS
    • Support
    • SupportApp
    • SWF
    • Synthetics
    • Textract
    • TimestreamQuery
    • TimestreamWrite
    • TelcoNetworkBuilder
    • TranscribeService
    • Transfer
    • Translate
    • VoiceID
    • WAF
    • WAFRegional
    • WAFV2
    • WellArchitected
    • ConnectWisdomService
    • WorkDocs
    • WorkLink
    • WorkMail
    • WorkMailMessageFlow
    • WorkSpaces
    • WorkSpacesWeb
    • XRay
  • Core references
  • Customization references
  1. Docs
  2. Available services
  3. EC2
  4. Vpc
  5. attach_classic_link_instance

attach_classic_link_instance¶

attach_classic_link_instance(**kwargs)¶

Note

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

Linking your instance to a VPC is sometimes referred to as attaching your instance.

See also: AWS API Documentation

Request Syntax

response = vpc.attach_classic_link_instance(
    DryRun=True|False,
    Groups=[
        'string',
    ],
    InstanceId='string',

)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Groups (list) --

    [REQUIRED]

    The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

    • (string) --
  • InstanceId (string) --

    [REQUIRED]

    The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

associate_dhcp_options
attach_internet_gateway

Navigation

  • index
  • modules |
  • next |
  • previous |
  • Boto3 Docs 1.26.85 documentation »
  • Available services »
  • EC2 »
  • Vpc »
Privacy | Site Terms | Cookie preferences | © Copyright 2023, Amazon Web Services, Inc. Created using Sphinx.