:doc:`OpenSearchService <../../opensearch>` / Client / create_vpc_endpoint

*******************
create_vpc_endpoint
*******************



.. py:method:: OpenSearchService.Client.create_vpc_endpoint(**kwargs)

  

  Creates an Amazon OpenSearch Service-managed VPC endpoint.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/opensearch-2021-01-01/CreateVpcEndpoint>`_  


  **Request Syntax**
  ::

    response = client.create_vpc_endpoint(
        DomainArn='string',
        VpcOptions={
            'SubnetIds': [
                'string',
            ],
            'SecurityGroupIds': [
                'string',
            ]
        },
        ClientToken='string'
    )
    
  :type DomainArn: string
  :param DomainArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the domain to create the endpoint for.

    

  
  :type VpcOptions: dict
  :param VpcOptions: **[REQUIRED]** 

    Options to specify the subnets and security groups for the endpoint.

    

  
    - **SubnetIds** *(list) --* 

      A list of subnet IDs associated with the VPC endpoints for the domain. If your domain uses multiple Availability Zones, you need to provide two subnet IDs, one per zone. Otherwise, provide only one.

      

    
      - *(string) --* 

      
  
    - **SecurityGroupIds** *(list) --* 

      The list of security group IDs associated with the VPC endpoints for the domain. If you do not provide a security group ID, OpenSearch Service uses the default security group for the VPC.

      

    
      - *(string) --* 

      
  
  
  :type ClientToken: string
  :param ClientToken: 

    Unique, case-sensitive identifier to ensure idempotency of the request.

    

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

    
    ::

      {
          'VpcEndpoint': {
              'VpcEndpointId': 'string',
              'VpcEndpointOwner': 'string',
              'DomainArn': 'string',
              'VpcOptions': {
                  'VPCId': 'string',
                  'SubnetIds': [
                      'string',
                  ],
                  'AvailabilityZones': [
                      'string',
                  ],
                  'SecurityGroupIds': [
                      'string',
                  ]
              },
              'Status': 'CREATING'|'CREATE_FAILED'|'ACTIVE'|'UPDATING'|'UPDATE_FAILED'|'DELETING'|'DELETE_FAILED',
              'Endpoint': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **VpcEndpoint** *(dict) --* 

        Information about the newly created VPC endpoint.

        
        

        - **VpcEndpointId** *(string) --* 

          The unique identifier of the endpoint.

          
        

        - **VpcEndpointOwner** *(string) --* 

          The creator of the endpoint.

          
        

        - **DomainArn** *(string) --* 

          The Amazon Resource Name (ARN) of the domain associated with the endpoint.

          
        

        - **VpcOptions** *(dict) --* 

          Options to specify the subnets and security groups for an Amazon OpenSearch Service VPC endpoint.

          
          

          - **VPCId** *(string) --* 

            The ID for your VPC. Amazon VPC generates this value when you create a VPC.

            
          

          - **SubnetIds** *(list) --* 

            A list of subnet IDs associated with the VPC endpoints for the domain.

            
            

            - *(string) --* 
        
          

          - **AvailabilityZones** *(list) --* 

            The list of Availability Zones associated with the VPC subnets.

            
            

            - *(string) --* 
        
          

          - **SecurityGroupIds** *(list) --* 

            The list of security group IDs associated with the VPC endpoints for the domain.

            
            

            - *(string) --* 
        
      
        

        - **Status** *(string) --* 

          The current status of the endpoint.

          
        

        - **Endpoint** *(string) --* 

          The connection endpoint ID for connecting to the domain.

          
    
  
  **Exceptions**
  
  *   :py:class:`OpenSearchService.Client.exceptions.ConflictException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.ValidationException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.LimitExceededException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.InternalException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.DisabledOperationException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.BaseException`

  