DescribeResourceGroups - Amazon Inspector Classic

DescribeResourceGroups

Describes the resource groups that are specified by the ARNs of the resource groups.

Request Syntax

{ "resourceGroupArns": [ "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.

resourceGroupArns

The ARN that specifies the resource group that you want to describe.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 10 items.

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

Required: Yes

Response Syntax

{ "failedItems": { "string" : { "failureCode": "string", "retryable": boolean } }, "resourceGroups": [ { "arn": "string", "createdAt": number, "tags": [ { "key": "string", "value": "string" } ] } ] }

Response Elements

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

The following data is returned in JSON format by the service.

failedItems

Resource group details that cannot be described. An error code is provided for each failed item.

Type: String to FailedItemDetails object map

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

resourceGroups

Information about a resource group.

Type: Array of ResourceGroup objects

Array Members: Minimum number of 0 items. Maximum number of 10 items.

Errors

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

InternalException

Internal server error.

HTTP Status Code: 500

InvalidInputException

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

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of DescribeResourceGroups.

Sample Request

POST / HTTP/1.1 Host: inspector.us-west-2.amazonaws.com Accept-Encoding: identity Content-Length: 92 X-Amz-Target: InspectorService.DescribeResourceGroups X-Amz-Date: 20160323T220453Z 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 { "resourceGroupArns": [ "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-PyGXopAI" ] }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: 4636d6a9-f143-11e5-9f03-eb6e194efa59 Content-Type: application/x-amz-json-1.1 Content-Length: 191 Date: Wed, 23 Mar 2016 22:04:54 GMT { "failedItems": {}, "resourceGroups": [ { "arn": "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-PyGXopAI", "createdAt": 1458074191.098, "tags": [ { "key": "Name", "value": "example" } ] } ] }

See Also

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