:doc:`CloudWatchObservabilityAccessManager <../../oam>` / Client / create_sink

***********
create_sink
***********



.. py:method:: CloudWatchObservabilityAccessManager.Client.create_sink(**kwargs)

  

  Use this to create a *sink* in the current account, so that it can be used as a monitoring account in CloudWatch cross-account observability. A sink is a resource that represents an attachment point in a monitoring account. Source accounts can link to the sink to send observability data.

   

  After you create a sink, you must create a sink policy that allows source accounts to attach to it. For more information, see `PutSinkPolicy <https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html>`__.

   

  Each account can contain one sink per Region. If you delete a sink, you can then create a new one in that Region.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/CreateSink>`_  


  **Request Syntax**
  ::

    response = client.create_sink(
        Name='string',
        Tags={
            'string': 'string'
        }
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    A name for the sink.

    

  
  :type Tags: dict
  :param Tags: 

    Assigns one or more tags (key-value pairs) to the link.

     

    Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

     

    For more information about using tags to control access, see `Controlling access to Amazon Web Services resources using tags <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html>`__.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'Arn': 'string',
          'Id': 'string',
          'Name': 'string',
          'Tags': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Arn** *(string) --* 

        The ARN of the sink that is newly created.

        
      

      - **Id** *(string) --* 

        The random ID string that Amazon Web Services generated as part of the sink ARN.

        
      

      - **Name** *(string) --* 

        The name of the sink.

        
      

      - **Tags** *(dict) --* 

        The tags assigned to the sink.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
  
  **Exceptions**
  
  *   :py:class:`CloudWatchObservabilityAccessManager.Client.exceptions.InternalServiceFault`

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

  
  *   :py:class:`CloudWatchObservabilityAccessManager.Client.exceptions.MissingRequiredParameterException`

  
  *   :py:class:`CloudWatchObservabilityAccessManager.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`CloudWatchObservabilityAccessManager.Client.exceptions.InvalidParameterException`

  