RegisterCrossAccountAccessRole - Amazon Inspector Classic

RegisterCrossAccountAccessRole

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

Request Syntax

{ "roleArn": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

roleArn

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 300.

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalException

Internal server error.

HTTP Status Code: 500

InvalidCrossAccountRoleException

Amazon Inspector Classic cannot assume the cross-account role that it needs to list your EC2 instances during the assessment run.

HTTP Status Code: 400

InvalidInputException

The request was rejected because an invalid or out-of-range value was supplied for an input parameter.

HTTP Status Code: 400

ServiceTemporarilyUnavailableException

The serice is temporary unavailable.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of RegisterCrossAccountAccessRole.

Sample Request

POST / HTTP/1.1 Host: inspector.us-west-2.amazonaws.com Accept-Encoding: identity Content-Length: 55 X-Amz-Target: InspectorService.RegisterCrossAccountAccessRole X-Amz-Date: 20160329T225544Z User-Agent: aws-cli/1.10.12 Python/2.7.9 Windows/7 botocore/1.4.3 Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "roleArn": "arn:aws:iam::123456789012:role/inspector" }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: 5f553cfa-f601-11e5-a47c-b7e2de2d572c Content-Type: application/x-amz-json-1.1 Content-Length: 0 Date: Tue, 29 Mar 2016 22:55:46 GMT

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: