:doc:`Inspector <../../inspector>` / Client / register_cross_account_access_role

**********************************
register_cross_account_access_role
**********************************



.. py:method:: Inspector.Client.register_cross_account_access_role(**kwargs)

  

  Registers the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRole>`_  


  **Request Syntax**
  ::

    response = client.register_cross_account_access_role(
        roleArn='string'
    )
    
  :type roleArn: string
  :param roleArn: **[REQUIRED]** 

    The ARN of the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`Inspector.Client.exceptions.InternalException`

  
  *   :py:class:`Inspector.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Inspector.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Inspector.Client.exceptions.InvalidCrossAccountRoleException`

  
  *   :py:class:`Inspector.Client.exceptions.ServiceTemporarilyUnavailableException`

  

  **Examples**

  Registers the IAM role that Amazon Inspector uses to list your EC2 instances at the start of the assessment run or when you call the PreviewAgents action.
  ::

    response = client.register_cross_account_access_role(
        roleArn='arn:aws:iam::123456789012:role/inspector',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  