putInvestigationGroupPolicy
abstract suspend fun putInvestigationGroupPolicy(input: PutInvestigationGroupPolicyRequest): PutInvestigationGroupPolicyResponse
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": "<i>account-id</i>" }, "ArnLike": { "aws:SourceArn": "arn:aws:cloudwatch:<i>region</i>:<i>account-id</i>:alarm:*" } } }] }