:doc:`NetworkManager <../../networkmanager>` / Client / create_transit_gateway_route_table_attachment

*********************************************
create_transit_gateway_route_table_attachment
*********************************************



.. py:method:: NetworkManager.Client.create_transit_gateway_route_table_attachment(**kwargs)

  

  Creates a transit gateway route table attachment.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateTransitGatewayRouteTableAttachment>`_  


  **Request Syntax**
  ::

    response = client.create_transit_gateway_route_table_attachment(
        PeeringId='string',
        TransitGatewayRouteTableArn='string',
        RoutingPolicyLabel='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        ClientToken='string'
    )
    
  :type PeeringId: string
  :param PeeringId: **[REQUIRED]** 

    The ID of the peer for the

    

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

    The ARN of the transit gateway route table for the attachment request. For example, ``"TransitGatewayRouteTableArn": "arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456"``.

    

  
  :type RoutingPolicyLabel: string
  :param RoutingPolicyLabel: 

    The routing policy label to apply to the Transit Gateway route table attachment for traffic routing decisions.

    

  
  :type Tags: list
  :param Tags: 

    The list of key-value tags associated with the request.

    

  
    - *(dict) --* 

      Describes a tag.

      

    
      - **Key** *(string) --* 

        The tag key.

         

        Constraints: Maximum length of 128 characters.

        

      
      - **Value** *(string) --* 

        The tag value.

         

        Constraints: Maximum length of 256 characters.

        

      
    

  :type ClientToken: string
  :param ClientToken: 

    The client token associated with the request.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'TransitGatewayRouteTableAttachment': {
              'Attachment': {
                  'CoreNetworkId': 'string',
                  'CoreNetworkArn': 'string',
                  'AttachmentId': 'string',
                  'OwnerAccountId': 'string',
                  'AttachmentType': 'CONNECT'|'SITE_TO_SITE_VPN'|'VPC'|'DIRECT_CONNECT_GATEWAY'|'TRANSIT_GATEWAY_ROUTE_TABLE',
                  'State': 'REJECTED'|'PENDING_ATTACHMENT_ACCEPTANCE'|'CREATING'|'FAILED'|'AVAILABLE'|'UPDATING'|'PENDING_NETWORK_UPDATE'|'PENDING_TAG_ACCEPTANCE'|'DELETING',
                  'EdgeLocation': 'string',
                  'EdgeLocations': [
                      'string',
                  ],
                  'ResourceArn': 'string',
                  'AttachmentPolicyRuleNumber': 123,
                  'SegmentName': 'string',
                  'NetworkFunctionGroupName': 'string',
                  'Tags': [
                      {
                          'Key': 'string',
                          'Value': 'string'
                      },
                  ],
                  'ProposedSegmentChange': {
                      'Tags': [
                          {
                              'Key': 'string',
                              'Value': 'string'
                          },
                      ],
                      'AttachmentPolicyRuleNumber': 123,
                      'SegmentName': 'string'
                  },
                  'ProposedNetworkFunctionGroupChange': {
                      'Tags': [
                          {
                              'Key': 'string',
                              'Value': 'string'
                          },
                      ],
                      'AttachmentPolicyRuleNumber': 123,
                      'NetworkFunctionGroupName': 'string'
                  },
                  'CreatedAt': datetime(2015, 1, 1),
                  'UpdatedAt': datetime(2015, 1, 1),
                  'LastModificationErrors': [
                      {
                          'Code': 'VPC_NOT_FOUND'|'SUBNET_NOT_FOUND'|'SUBNET_DUPLICATED_IN_AVAILABILITY_ZONE'|'SUBNET_NO_FREE_ADDRESSES'|'SUBNET_UNSUPPORTED_AVAILABILITY_ZONE'|'SUBNET_NO_IPV6_CIDRS'|'VPN_CONNECTION_NOT_FOUND'|'MAXIMUM_NO_ENCAP_LIMIT_EXCEEDED'|'DIRECT_CONNECT_GATEWAY_NOT_FOUND'|'DIRECT_CONNECT_GATEWAY_EXISTING_ATTACHMENTS'|'DIRECT_CONNECT_GATEWAY_NO_PRIVATE_VIF'|'VPN_EXISTING_ASSOCIATIONS'|'VPC_UNSUPPORTED_FEATURES',
                          'Message': 'string',
                          'ResourceArn': 'string',
                          'RequestId': 'string'
                      },
                  ]
              },
              'PeeringId': 'string',
              'TransitGatewayRouteTableArn': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **TransitGatewayRouteTableAttachment** *(dict) --* 

        The route table associated with the create transit gateway route table attachment request.

        
        

        - **Attachment** *(dict) --* 

          Describes a core network attachment.

          
          

          - **CoreNetworkId** *(string) --* 

            The ID of a core network.

            
          

          - **CoreNetworkArn** *(string) --* 

            The ARN of a core network.

            
          

          - **AttachmentId** *(string) --* 

            The ID of the attachment.

            
          

          - **OwnerAccountId** *(string) --* 

            The ID of the attachment account owner.

            
          

          - **AttachmentType** *(string) --* 

            The type of attachment.

            
          

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

            The state of the attachment.

            
          

          - **EdgeLocation** *(string) --* 

            The Region where the edge is located. This is returned for all attachment types except a Direct Connect gateway attachment, which instead returns ``EdgeLocations``.

            
          

          - **EdgeLocations** *(list) --* 

            The edge locations that the Direct Connect gateway is associated with. This is returned only for Direct Connect gateway attachments. All other attachment types retrun ``EdgeLocation``.

            
            

            - *(string) --* 
        
          

          - **ResourceArn** *(string) --* 

            The attachment resource ARN.

            
          

          - **AttachmentPolicyRuleNumber** *(integer) --* 

            The policy rule number associated with the attachment.

            
          

          - **SegmentName** *(string) --* 

            The name of the segment attachment.

            
          

          - **NetworkFunctionGroupName** *(string) --* 

            The name of the network function group.

            
          

          - **Tags** *(list) --* 

            The tags associated with the attachment.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The tag key.

                 

                Constraints: Maximum length of 128 characters.

                
              

              - **Value** *(string) --* 

                The tag value.

                 

                Constraints: Maximum length of 256 characters.

                
          
        
          

          - **ProposedSegmentChange** *(dict) --* 

            The attachment to move from one segment to another.

            
            

            - **Tags** *(list) --* 

              The list of key-value tags that changed for the segment.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The tag key.

                   

                  Constraints: Maximum length of 128 characters.

                  
                

                - **Value** *(string) --* 

                  The tag value.

                   

                  Constraints: Maximum length of 256 characters.

                  
            
          
            

            - **AttachmentPolicyRuleNumber** *(integer) --* 

              The rule number in the policy document that applies to this change.

              
            

            - **SegmentName** *(string) --* 

              The name of the segment to change.

              
        
          

          - **ProposedNetworkFunctionGroupChange** *(dict) --* 

            Describes a proposed change to a network function group associated with the attachment.

            
            

            - **Tags** *(list) --* 

              The list of proposed changes to the key-value tags associated with the network function group.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The tag key.

                   

                  Constraints: Maximum length of 128 characters.

                  
                

                - **Value** *(string) --* 

                  The tag value.

                   

                  Constraints: Maximum length of 256 characters.

                  
            
          
            

            - **AttachmentPolicyRuleNumber** *(integer) --* 

              The proposed new attachment policy rule number for the network function group.

              
            

            - **NetworkFunctionGroupName** *(string) --* 

              The proposed name change for the network function group name.

              
        
          

          - **CreatedAt** *(datetime) --* 

            The timestamp when the attachment was created.

            
          

          - **UpdatedAt** *(datetime) --* 

            The timestamp when the attachment was last updated.

            
          

          - **LastModificationErrors** *(list) --* 

            Describes the error associated with the attachment request.

            
            

            - *(dict) --* 

              Describes the error associated with an attachment request.

              
              

              - **Code** *(string) --* 

                The error code for the attachment request.

                
              

              - **Message** *(string) --* 

                The message associated with the error ``code``.

                
              

              - **ResourceArn** *(string) --* 

                The ARN of the requested attachment resource.

                
              

              - **RequestId** *(string) --* 

                The ID of the attachment request.

                
          
        
      
        

        - **PeeringId** *(string) --* 

          The ID of the peering attachment.

          
        

        - **TransitGatewayRouteTableArn** *(string) --* 

          The ARN of the transit gateway attachment route table. For example, ``"TransitGatewayRouteTableArn": "arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456"``.

          
    
  
  **Exceptions**
  
  *   :py:class:`NetworkManager.Client.exceptions.ValidationException`

  
  *   :py:class:`NetworkManager.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`NetworkManager.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`NetworkManager.Client.exceptions.ConflictException`

  
  *   :py:class:`NetworkManager.Client.exceptions.ThrottlingException`

  
  *   :py:class:`NetworkManager.Client.exceptions.InternalServerException`

  