AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Implementation for accessing AIOps

The CloudWatch investigations feature is a generative AI-powered assistant that can help you respond to incidents in your system. It uses generative AI to scan your system's telemetry and quickly surface suggestions that might be related to your issue. These suggestions include metrics, logs, deployment events, and root-cause hypotheses.

You can use API actions to create, manage, and delete investigation groups and investigation group policies. To start and manage investigations, you must use the CloudWatch console.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonServiceClient
    Amazon.AIOps.AmazonAIOpsClient

Namespace: Amazon.AIOps
Assembly: AWSSDK.AIOps.dll
Version: 3.x.y.z

Syntax

C#
public class AmazonAIOpsClient : AmazonServiceClient
         IAmazonAIOps, IAmazonService, IDisposable

The AmazonAIOpsClient type exposes the following members

Constructors

NameDescription
Public Method AmazonAIOpsClient()

Constructs AmazonAIOpsClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             

Public Method AmazonAIOpsClient(RegionEndpoint)

Constructs AmazonAIOpsClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             

Public Method AmazonAIOpsClient(AmazonAIOpsConfig)

Constructs AmazonAIOpsClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             

Public Method AmazonAIOpsClient(AWSCredentials)

Constructs AmazonAIOpsClient with AWS Credentials

Public Method AmazonAIOpsClient(AWSCredentials, RegionEndpoint)

Constructs AmazonAIOpsClient with AWS Credentials

Public Method AmazonAIOpsClient(AWSCredentials, AmazonAIOpsConfig)

Constructs AmazonAIOpsClient with AWS Credentials and an AmazonAIOpsClient Configuration object.

Public Method AmazonAIOpsClient(string, string)

Constructs AmazonAIOpsClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonAIOpsClient(string, string, RegionEndpoint)

Constructs AmazonAIOpsClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonAIOpsClient(string, string, AmazonAIOpsConfig)

Constructs AmazonAIOpsClient with AWS Access Key ID, AWS Secret Key and an AmazonAIOpsClient Configuration object.

Public Method AmazonAIOpsClient(string, string, string)

Constructs AmazonAIOpsClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonAIOpsClient(string, string, string, RegionEndpoint)

Constructs AmazonAIOpsClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonAIOpsClient(string, string, string, AmazonAIOpsConfig)

Constructs AmazonAIOpsClient with AWS Access Key ID, AWS Secret Key and an AmazonAIOpsClient Configuration object.

Properties

NameTypeDescription
Public Property Config Amazon.Runtime.IClientConfig Inherited from Amazon.Runtime.AmazonServiceClient.
Public Property Paginators Amazon.AIOps.Model.IAIOpsPaginatorFactory

Paginators for the service

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method CreateInvestigationGroup(CreateInvestigationGroupRequest)

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 CloudWatch investigations, you must be signed in to an IAM principal that has either the AIOpsConsoleAdminPolicy or the AdministratorAccess IAM policy attached, or to an account that has similar permissions.

You can configure CloudWatch alarms to start investigations and add events to investigations. If you create your investigation group with CreateInvestigationGroup and you want to enable alarms to do this, you must use PutInvestigationGroupPolicy to create a resource policy that grants this permission to CloudWatch alarms.

For more information about configuring CloudWatch alarms, see Using Amazon CloudWatch alarms

Public Method CreateInvestigationGroupAsync(CreateInvestigationGroupRequest, CancellationToken)

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 CloudWatch investigations, you must be signed in to an IAM principal that has either the AIOpsConsoleAdminPolicy or the AdministratorAccess IAM policy attached, or to an account that has similar permissions.

You can configure CloudWatch alarms to start investigations and add events to investigations. If you create your investigation group with CreateInvestigationGroup and you want to enable alarms to do this, you must use PutInvestigationGroupPolicy to create a resource policy that grants this permission to CloudWatch alarms.

For more information about configuring CloudWatch alarms, see Using Amazon CloudWatch alarms

Public Method DeleteInvestigationGroup(DeleteInvestigationGroupRequest)

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.

Public Method DeleteInvestigationGroupAsync(DeleteInvestigationGroupRequest, CancellationToken)

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.

Public Method DeleteInvestigationGroupPolicy(DeleteInvestigationGroupPolicyRequest)

Removes the IAM resource policy from being associated with the investigation group that you specify.

Public Method DeleteInvestigationGroupPolicyAsync(DeleteInvestigationGroupPolicyRequest, CancellationToken)

Removes the IAM resource policy from being associated with the investigation group that you specify.

Public Method DetermineServiceOperationEndpoint(AmazonWebServiceRequest)

Returns the endpoint that will be used for a particular request.

Public Method Dispose() Inherited from Amazon.Runtime.AmazonServiceClient.
Public Method GetInvestigationGroup(GetInvestigationGroupRequest)

Returns the configuration information for the specified investigation group.

Public Method GetInvestigationGroupAsync(GetInvestigationGroupRequest, CancellationToken)

Returns the configuration information for the specified investigation group.

Public Method GetInvestigationGroupPolicy(GetInvestigationGroupPolicyRequest)

Returns the JSON of the IAM resource policy associated with the specified investigation group in a string. For example, {\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"aiops.alarms.cloudwatch.amazonaws.com\"},\"Action\":[\"aiops:CreateInvestigation\",\"aiops:CreateInvestigationEvent\"],\"Resource\":\"*\",\"Condition\":{\"StringEquals\":{\"aws:SourceAccount\":\"111122223333\"},\"ArnLike\":{\"aws:SourceArn\":\"arn:aws:cloudwatch:us-east-1:111122223333:alarm:*\"}}}]}.

Public Method GetInvestigationGroupPolicyAsync(GetInvestigationGroupPolicyRequest, CancellationToken)

Returns the JSON of the IAM resource policy associated with the specified investigation group in a string. For example, {\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"aiops.alarms.cloudwatch.amazonaws.com\"},\"Action\":[\"aiops:CreateInvestigation\",\"aiops:CreateInvestigationEvent\"],\"Resource\":\"*\",\"Condition\":{\"StringEquals\":{\"aws:SourceAccount\":\"111122223333\"},\"ArnLike\":{\"aws:SourceArn\":\"arn:aws:cloudwatch:us-east-1:111122223333:alarm:*\"}}}]}.

Public Method ListInvestigationGroups(ListInvestigationGroupsRequest)

Returns the ARN and name of each investigation group in the account.

Public Method ListInvestigationGroupsAsync(ListInvestigationGroupsRequest, CancellationToken)

Returns the ARN and name of each investigation group in the account.

Public Method ListTagsForResource(ListTagsForResourceRequest)

Displays the tags associated with a CloudWatch investigations resource. Currently, investigation groups support tagging.

Public Method ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken)

Displays the tags associated with a CloudWatch investigations resource. Currently, investigation groups support tagging.

Public Method PutInvestigationGroupPolicy(PutInvestigationGroupPolicyRequest)

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:*" } } } ] }

Public Method PutInvestigationGroupPolicyAsync(PutInvestigationGroupPolicyRequest, CancellationToken)

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:*" } } } ] }

Public Method TagResource(TagResourceRequest)

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.

Public Method TagResourceAsync(TagResourceRequest, CancellationToken)

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.

Public Method UntagResource(UntagResourceRequest)

Removes one or more tags from the specified resource.

Public Method UntagResourceAsync(UntagResourceRequest, CancellationToken)

Removes one or more tags from the specified resource.

Public Method UpdateInvestigationGroup(UpdateInvestigationGroupRequest)

Updates the configuration of the specified investigation group.

Public Method UpdateInvestigationGroupAsync(UpdateInvestigationGroupRequest, CancellationToken)

Updates the configuration of the specified investigation group.

Events

NameDescription
Event AfterResponseEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event BeforeRequestEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event ExceptionEvent Inherited from Amazon.Runtime.AmazonServiceClient.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5