:doc:`EC2 <../../ec2>` / Client / associate_route_server

**********************
associate_route_server
**********************



.. py:method:: EC2.Client.associate_route_server(**kwargs)

  

  Associates a route server with a VPC to enable dynamic route updates.

   

  A route server association is the connection established between a route server and a VPC.

   

  For more information see `Dynamic routing in your VPC with VPC Route Server <https://docs.aws.amazon.com/vpc/latest/userguide/dynamic-routing-route-server.html>`__ in the *Amazon VPC User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteServer>`_  


  **Request Syntax**
  ::

    response = client.associate_route_server(
        RouteServerId='string',
        VpcId='string',
        DryRun=True|False
    )
    
  :type RouteServerId: string
  :param RouteServerId: **[REQUIRED]** 

    The unique identifier for the route server to be associated.

    

  
  :type VpcId: string
  :param VpcId: **[REQUIRED]** 

    The ID of the VPC to associate with the route server.

    

  
  :type DryRun: boolean
  :param DryRun: 

    A check for 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``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'RouteServerAssociation': {
              'RouteServerId': 'string',
              'VpcId': 'string',
              'State': 'associating'|'associated'|'disassociating'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RouteServerAssociation** *(dict) --* 

        Information about the association between the route server and the VPC.

        
        

        - **RouteServerId** *(string) --* 

          The ID of the associated route server.

          
        

        - **VpcId** *(string) --* 

          The ID of the associated VPC.

          
        

        - **State** *(string) --* 

          The current state of the association.

          
    
  