2025/06/18 - AWS AI Ops - 11 new api methods
Changes This is the initial SDK release for Amazon AI Operations (AIOps). AIOps is a generative AI-powered assistant that helps you respond to incidents in your system by scanning your system's telemetry and quickly surface suggestions that might be related to your issue.
Creates an IAM resource policy and assigns it to the specified investigation group.
If you create your investigation group with CreateInvestigationGroup and you want to enable CloudWatch alarms to create investigations and add events to investigations, you must use this operation to create a policy similar to this example.
{ "Version": "2008-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "Service": "aiops.alarms.cloudwatch.amazonaws.com" }, "Action": ["aiops:CreateInvestigation", "aiops:CreateInvestigationEvent"], "Resource": "*", "Condition": { "StringEquals": { "aws:SourceAccount": "account-id" }, "ArnLike": { "aws:SourceArn": "arn:aws:cloudwatch:region:account-id:alarm:*" } } }] }
See also: AWS API Documentation
Request Syntax
client.put_investigation_group_policy( identifier='string', policy='string' )
string
[REQUIRED]
Specify either the name or the ARN of the investigation group that you want to assign the policy to.
string
[REQUIRED]
The policy, in JSON format.
dict
Response Syntax
{ 'investigationGroupArn': 'string' }
Response Structure
(dict) --
investigationGroupArn (string) --
The ARN of the investigation group that will use this policy.
Removes one or more tags from the specified resource.
See also: AWS API Documentation
Request Syntax
client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the resource that you want to remove the tags from. You can use the ListInvestigationGroups operation to find the ARNs of investigation groups.
list
[REQUIRED]
The list of tag keys to remove from the resource.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
Creates an investigation group in your account. Creating an investigation group is a one-time setup task for each Region in your account. It is a necessary task to be able to perform investigations.
Settings in the investigation group help you centrally manage the common properties of your investigations, such as the following:
Who can access the investigations
Whether investigation data is encrypted with a customer managed Key Management Service key.
How long investigations and their data are retained by default.
Currently, you can have one investigation group in each Region in your account. Each investigation in a Region is a part of the investigation group in that Region
To create an investigation group and set up Amazon Q Developer operational investigations, you must be signed in to an IAM principal that has the either the AIOpsConsoleAdminPolicy or the AdministratorAccess IAM policy attached, or to an account that has similar permissions.
See also: AWS API Documentation
Request Syntax
client.create_investigation_group( name='string', roleArn='string', encryptionConfiguration={ 'type': 'AWS_OWNED_KEY'|'CUSTOMER_MANAGED_KMS_KEY', 'kmsKeyId': 'string' }, retentionInDays=123, tags={ 'string': 'string' }, tagKeyBoundaries=[ 'string', ], chatbotNotificationChannel={ 'string': [ 'string', ] }, isCloudTrailEventHistoryEnabled=True|False )
string
[REQUIRED]
A name for the investigation group.
string
[REQUIRED]
Specify the ARN of the IAM role that Amazon Q Developer operational investigations will use when it gathers investigation data. The permissions in this role determine which of your resources that Amazon Q Developer operational investigations will have access to during investigations.
For more information, see How to control what data Amazon Q has access to during investigations.
dict
Use this structure if you want to use a customer managed KMS key to encrypt your investigation data. If you omit this parameter, Amazon Q Developer operational investigations will use an Amazon Web Services key to encrypt the data. For more information, see Encryption of investigation data.
type (string) --
Displays whether investigation data is encrypted by a customer managed key or an Amazon Web Services owned kay.
kmsKeyId (string) --
If the investigation group uses a customer managed key for encryption, this field displays the ID of that key.
integer
Specify how long that investigation data is kept. For more information, see Operational investigation data retention.
If you omit this parameter, the default of 90 days is used.
dict
A list of key-value pairs to associate with the investigation group. You can associate as many as 50 tags with an investigation group. To be able to associate tags when you create the investigation group, you must have the cloudwatch:TagResource permission.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
(string) --
(string) --
list
Enter the existing custom tag keys for custom applications in your system. Resource tags help Amazon Q narrow the search space when it is unable to discover definite relationships between resources. For example, to discover that an Amazon ECS service depends on an Amazon RDS database, Amazon Q can discover this relationship using data sources such as X-Ray and CloudWatch Application Signals. However, if you haven't deployed these features, Amazon Q will attempt to identify possible relationships. Tag boundaries can be used to narrow the resources that will be discovered by Amazon Q in these cases.
You don't need to enter tags created by myApplications or CloudFormation, because Amazon Q can automatically detect those tags.
(string) --
dict
Use this structure to integrate Amazon Q Developer operational investigations with Amazon Q in chat applications. This structure is a string array. For the first string, specify the ARN of an Amazon SNS topic. For the array of strings, specify the ARNs of one or more Amazon Q in chat applications configurations that you want to associate with that topic. For more information about these configuration ARNs, see Getting started with Amazon Q in chat applications and Resource type defined by Amazon Web Services Chatbot.
(string) --
(list) --
(string) --
boolean
Specify true to enable Amazon Q Developer operational investigations to have access to change events that are recorded by CloudTrail. The default is true.
dict
Response Syntax
{ 'arn': 'string' }
Response Structure
(dict) --
arn (string) --
The ARN of the investigation group that you just created.
Displays the tags associated with a Amazon Q Developer operational investigations resource. Currently, investigation groups support tagging.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( resourceArn='string' )
string
[REQUIRED]
The ARN of the Amazon Q Developer operational investigations resource that you want to view tags for. You can use the ListInvestigationGroups operation to find the ARNs of investigation groups.
The ARN format for an investigation group is ``arn:aws:aiops:Region:account-id:investigation-group:investigation-group-id ``.
dict
Response Syntax
{ 'tags': { 'string': 'string' } }
Response Structure
(dict) --
tags (dict) --
The list of tag keys and values associated with the resource you specified.
(string) --
(string) --
Updates the configuration of the specified investigation group.
See also: AWS API Documentation
Request Syntax
client.update_investigation_group( identifier='string', roleArn='string', encryptionConfiguration={ 'type': 'AWS_OWNED_KEY'|'CUSTOMER_MANAGED_KMS_KEY', 'kmsKeyId': 'string' }, tagKeyBoundaries=[ 'string', ], chatbotNotificationChannel={ 'string': [ 'string', ] }, isCloudTrailEventHistoryEnabled=True|False )
string
[REQUIRED]
Specify either the name or the ARN of the investigation group that you want to modify.
string
Specify this field if you want to change the IAM role that Amazon Q Developer operational investigations will use when it gathers investigation data. To do so, specify the ARN of the new role.
The permissions in this role determine which of your resources that Amazon Q Developer operational investigations will have access to during investigations.
For more information, see EHow to control what data Amazon Q has access to during investigations.
dict
Use this structure if you want to use a customer managed KMS key to encrypt your investigation data. If you omit this parameter, Amazon Q Developer operational investigations will use an Amazon Web Services key to encrypt the data. For more information, see Encryption of investigation data.
type (string) --
Displays whether investigation data is encrypted by a customer managed key or an Amazon Web Services owned kay.
kmsKeyId (string) --
If the investigation group uses a customer managed key for encryption, this field displays the ID of that key.
list
Enter the existing custom tag keys for custom applications in your system. Resource tags help Amazon Q narrow the search space when it is unable to discover definite relationships between resources. For example, to discover that an Amazon ECS service depends on an Amazon RDS database, Amazon Q can discover this relationship using data sources such as X-Ray and CloudWatch Application Signals. However, if you haven't deployed these features, Amazon Q will attempt to identify possible relationships. Tag boundaries can be used to narrow the resources that will be discovered by Amazon Q in these cases.
You don't need to enter tags created by myApplications or CloudFormation, because Amazon Q can automatically detect those tags.
(string) --
dict
Use this structure to integrate Amazon Q Developer operational investigations with Amazon Q in chat applications. This structure is a string array. For the first string, specify the ARN of an Amazon SNS topic. For the array of strings, specify the ARNs of one or more Amazon Q in chat applications configurations that you want to associate with that topic. For more information about these configuration ARNs, see Getting started with Amazon Q in chat applications and Resource type defined by Amazon Web Services Chatbot.
(string) --
(list) --
(string) --
boolean
Specify true to enable Amazon Q Developer operational investigations to have access to change events that are recorded by CloudTrail. The default is true.
dict
Response Syntax
{}
Response Structure
(dict) --
Returns the IAM resource policy that is associated with the specified investigation group.
See also: AWS API Documentation
Request Syntax
client.get_investigation_group_policy( identifier='string' )
string
[REQUIRED]
Specify either the name or the ARN of the investigation group that you want to view the policy of.
dict
Response Syntax
{ 'investigationGroupArn': 'string', 'policy': 'string' }
Response Structure
(dict) --
investigationGroupArn (string) --
The Amazon Resource Name (ARN) of the investigation group that you want to view the policy of.
policy (string) --
The policy, in JSON format.
Removes the IAM resource policy from being associated with the investigation group that you specify.
See also: AWS API Documentation
Request Syntax
client.delete_investigation_group_policy( identifier='string' )
string
[REQUIRED]
Specify either the name or the ARN of the investigation group that you want to remove the policy from.
dict
Response Syntax
{}
Response Structure
(dict) --
Returns the configuration information for the specified investigation group.
See also: AWS API Documentation
Request Syntax
client.get_investigation_group( identifier='string' )
string
[REQUIRED]
Specify either the name or the ARN of the investigation group that you want to view.
dict
Response Syntax
{ 'createdBy': 'string', 'createdAt': datetime(2015, 1, 1), 'lastModifiedBy': 'string', 'lastModifiedAt': datetime(2015, 1, 1), 'name': 'string', 'arn': 'string', 'roleArn': 'string', 'encryptionConfiguration': { 'type': 'AWS_OWNED_KEY'|'CUSTOMER_MANAGED_KMS_KEY', 'kmsKeyId': 'string' }, 'retentionInDays': 123, 'chatbotNotificationChannel': { 'string': [ 'string', ] }, 'tagKeyBoundaries': [ 'string', ], 'isCloudTrailEventHistoryEnabled': True|False }
Response Structure
(dict) --
createdBy (string) --
The name of the user who created the investigation group.
createdAt (datetime) --
The date and time that the investigation group was created.
lastModifiedBy (string) --
The name of the user who created the investigation group.
lastModifiedAt (datetime) --
The date and time that the investigation group was most recently modified.
name (string) --
The name of the investigation group.
arn (string) --
The Amazon Resource Name (ARN) of the investigation group.
roleArn (string) --
The ARN of the IAM role that the investigation group uses for permissions to gather data.
encryptionConfiguration (dict) --
Specifies the customer managed KMS key that the investigation group uses to encrypt data, if there is one. If not, the investigation group uses an Amazon Web Services key to encrypt the data.
type (string) --
Displays whether investigation data is encrypted by a customer managed key or an Amazon Web Services owned kay.
kmsKeyId (string) --
If the investigation group uses a customer managed key for encryption, this field displays the ID of that key.
retentionInDays (integer) --
Specifies how long that investigation data is kept.
chatbotNotificationChannel (dict) --
This structure is a string array. The first string is the ARN of a Amazon SNS topic. The array of strings display the ARNs of Amazon Q in chat applications configurations that are associated with that topic. For more information about these configuration ARNs, see Getting started with Amazon Q in chat applications and Resource type defined by Amazon Web Services Chatbot.
(string) --
(list) --
(string) --
tagKeyBoundaries (list) --
Displays the custom tag keys for custom applications in your system that you have specified in the investigation group. Resource tags help Amazon Q narrow the search space when it is unable to discover definite relationships between resources.
(string) --
isCloudTrailEventHistoryEnabled (boolean) --
Specifies whether Amazon Q Developer operational investigationshas access to change events that are recorded by CloudTrail.
Returns the ARN and name of each investigation group in the account.
See also: AWS API Documentation
Request Syntax
client.list_investigation_groups( nextToken='string', maxResults=123 )
string
Include this value, if it was returned by the previous operation, to get the next set of service operations.
integer
The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
dict
Response Syntax
{ 'nextToken': 'string', 'investigationGroups': [ { 'arn': 'string', 'name': 'string' }, ] }
Response Structure
(dict) --
nextToken (string) --
Include this value in your next use of this operation to get the next set of service operations.
investigationGroups (list) --
An array of structures, where each structure contains the information about one investigation group in the account.
(dict) --
This structure contains information about one investigation group in the account.
arn (string) --
The Amazon Resource Name (ARN) of the investigation group.
name (string) --
The name of the investigation group.
Deletes the specified investigation group from your account. You can currently have one investigation group per Region in your account. After you delete an investigation group, you can later create a new investigation group in the same Region.
See also: AWS API Documentation
Request Syntax
client.delete_investigation_group( identifier='string' )
string
[REQUIRED]
Specify either the name or the ARN of the investigation group that you want to delete.
None
Assigns one or more tags (key-value pairs) to the specified resource.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
You can associate as many as 50 tags with a resource.
See also: AWS API Documentation
Request Syntax
client.tag_resource( resourceArn='string', tags={ 'string': 'string' } )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the resource that you want to apply the tags to. You can use the ListInvestigationGroups operation to find the ARNs of investigation groups.
dict
[REQUIRED]
The list of key-value pairs to associate with the resource.
(string) --
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --