:doc:`IoTAnalytics <../../iotanalytics>` / Client / update_channel

**************
update_channel
**************



.. py:method:: IoTAnalytics.Client.update_channel(**kwargs)

  

  Used to update the settings of a channel.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotanalytics-2017-11-27/UpdateChannel>`_  


  **Request Syntax**
  ::

    response = client.update_channel(
        channelName='string',
        channelStorage={
            'serviceManagedS3': {}
            ,
            'customerManagedS3': {
                'bucket': 'string',
                'keyPrefix': 'string',
                'roleArn': 'string'
            }
        },
        retentionPeriod={
            'unlimited': True|False,
            'numberOfDays': 123
        }
    )
    
  :type channelName: string
  :param channelName: **[REQUIRED]** 

    The name of the channel to be updated.

    

  
  :type channelStorage: dict
  :param channelStorage: 

    Where channel data is stored. You can choose one of ``serviceManagedS3`` or ``customerManagedS3`` storage. If not specified, the default is ``serviceManagedS3``. You can't change this storage option after the channel is created.

    

  
    - **serviceManagedS3** *(dict) --* 

      Used to store channel data in an S3 bucket managed by IoT Analytics. You can't change the choice of S3 storage after the data store is created.

      

    
    
    - **customerManagedS3** *(dict) --* 

      Used to store channel data in an S3 bucket that you manage. If customer managed storage is selected, the ``retentionPeriod`` parameter is ignored. You can't change the choice of S3 storage after the data store is created.

      

    
      - **bucket** *(string) --* **[REQUIRED]** 

        The name of the S3 bucket in which channel data is stored.

        

      
      - **keyPrefix** *(string) --* 

        (Optional) The prefix used to create the keys of the channel data objects. Each object in an S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

        

      
      - **roleArn** *(string) --* **[REQUIRED]** 

        The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

        

      
    
  
  :type retentionPeriod: dict
  :param retentionPeriod: 

    How long, in days, message data is kept for the channel. The retention period can't be updated if the channel's Amazon S3 storage is customer-managed.

    

  
    - **unlimited** *(boolean) --* 

      If true, message data is kept indefinitely.

      

    
    - **numberOfDays** *(integer) --* 

      The number of days that message data is kept. The ``unlimited`` parameter must be false.

      

    
  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`IoTAnalytics.Client.exceptions.InvalidRequestException`

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

  
  *   :py:class:`IoTAnalytics.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoTAnalytics.Client.exceptions.ServiceUnavailableException`

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

  