:doc:`ElasticBeanstalk <../../elasticbeanstalk>` / Client / associate_environment_operations_role

*************************************
associate_environment_operations_role
*************************************



.. py:method:: ElasticBeanstalk.Client.associate_environment_operations_role(**kwargs)

  

  Add or change the operations role used by an environment. After this call is made, Elastic Beanstalk uses the associated operations role for permissions to downstream services during subsequent calls acting on this environment. For more information, see `Operations roles <https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-operationsrole.html>`__ in the *AWS Elastic Beanstalk Developer Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/AssociateEnvironmentOperationsRole>`_  


  **Request Syntax**
  ::

    response = client.associate_environment_operations_role(
        EnvironmentName='string',
        OperationsRole='string'
    )
    
  :type EnvironmentName: string
  :param EnvironmentName: **[REQUIRED]** 

    The name of the environment to which to set the operations role.

    

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

    The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`ElasticBeanstalk.Client.exceptions.InsufficientPrivilegesException`

  