:doc:`IoT <../../iot>` / Client / update_role_alias

*****************
update_role_alias
*****************



.. py:method:: IoT.Client.update_role_alias(**kwargs)

  

  Updates a role alias.

   

  Requires permission to access the `UpdateRoleAlias <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

   

  .. warning::

     

    The value of `credentialDurationSeconds <https://docs.aws.amazon.com/iot/latest/apireference/API_UpdateRoleAlias.html#iot-UpdateRoleAlias-request-credentialDurationSeconds>`__ must be less than or equal to the maximum session duration of the IAM role that the role alias references. For more information, see `Modifying a role maximum session duration (Amazon Web Services API) <https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-api.html#roles-modify_max-session-duration-api>`__ from the Amazon Web Services Identity and Access Management User Guide.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/UpdateRoleAlias>`_  


  **Request Syntax**
  ::

    response = client.update_role_alias(
        roleAlias='string',
        roleArn='string',
        credentialDurationSeconds=123
    )
    
  :type roleAlias: string
  :param roleAlias: **[REQUIRED]** 

    The role alias to update.

    

  
  :type roleArn: string
  :param roleArn: 

    The role ARN.

    

  
  :type credentialDurationSeconds: integer
  :param credentialDurationSeconds: 

    The number of seconds the credential will be valid.

     

    This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.

    

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

    
    ::

      {
          'roleAlias': 'string',
          'roleAliasArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **roleAlias** *(string) --* 

        The role alias.

        
      

      - **roleAliasArn** *(string) --* 

        The role alias ARN.

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

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

  
  *   :py:class:`IoT.Client.exceptions.UnauthorizedException`

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

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

  