Inspector.Client.
describe_resource_groups
(**kwargs)¶Describes the resource groups that are specified by the ARNs of the resource groups.
See also: AWS API Documentation
Request Syntax
response = client.describe_resource_groups(
resourceGroupArns=[
'string',
]
)
[REQUIRED]
The ARN that specifies the resource group that you want to describe.
{
'resourceGroups': [
{
'arn': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'createdAt': datetime(2015, 1, 1)
},
],
'failedItems': {
'string': {
'failureCode': 'INVALID_ARN'|'DUPLICATE_ARN'|'ITEM_DOES_NOT_EXIST'|'ACCESS_DENIED'|'LIMIT_EXCEEDED'|'INTERNAL_ERROR',
'retryable': True|False
}
}
}
Response Structure
Information about a resource group.
Contains information about a resource group. The resource group defines a set of tags that, when queried, identify the AWS resources that make up the assessment target. This data type is used as the response element in the DescribeResourceGroups action.
The ARN of the resource group.
The tags (key and value pairs) of the resource group. This data type property is used in the CreateResourceGroup action.
This data type is used as one of the elements of the ResourceGroup data type.
A tag key.
The value assigned to a tag key.
The time at which resource group is created.
Resource group details that cannot be described. An error code is provided for each failed item.
Includes details about the failed items.
The status code of a failed item.
Indicates whether you can immediately retry a request for this item for a specified resource.
Exceptions
Inspector.Client.exceptions.InternalException
Inspector.Client.exceptions.InvalidInputException
Examples
Describes the resource groups that are specified by the ARNs of the resource groups.
response = client.describe_resource_groups(
resourceGroupArns=[
'arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-PyGXopAI',
],
)
print(response)
Expected Output:
{
'failedItems': {
},
'resourceGroups': [
{
'arn': 'arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-PyGXopAI',
'createdAt': datetime(2016, 3, 15, 20, 36, 31, 1, 75, 0),
'tags': [
{
'key': 'Name',
'value': 'example',
},
],
},
],
'ResponseMetadata': {
'...': '...',
},
}