Interface AiOpsClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder() method.
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic AiOpsClientBuilderbuilder()Create a builder that can be used to configure and create aAiOpsClient.static AiOpsClientcreate()Create aAiOpsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateInvestigationGroupResponsecreateInvestigationGroup(Consumer<CreateInvestigationGroupRequest.Builder> createInvestigationGroupRequest) Creates an investigation group in your account.default CreateInvestigationGroupResponsecreateInvestigationGroup(CreateInvestigationGroupRequest createInvestigationGroupRequest) Creates an investigation group in your account.default DeleteInvestigationGroupResponsedeleteInvestigationGroup(Consumer<DeleteInvestigationGroupRequest.Builder> deleteInvestigationGroupRequest) Deletes the specified investigation group from your account.default DeleteInvestigationGroupResponsedeleteInvestigationGroup(DeleteInvestigationGroupRequest deleteInvestigationGroupRequest) Deletes the specified investigation group from your account.deleteInvestigationGroupPolicy(Consumer<DeleteInvestigationGroupPolicyRequest.Builder> deleteInvestigationGroupPolicyRequest) Removes the IAM resource policy from being associated with the investigation group that you specify.deleteInvestigationGroupPolicy(DeleteInvestigationGroupPolicyRequest deleteInvestigationGroupPolicyRequest) Removes the IAM resource policy from being associated with the investigation group that you specify.default GetInvestigationGroupResponsegetInvestigationGroup(Consumer<GetInvestigationGroupRequest.Builder> getInvestigationGroupRequest) Returns the configuration information for the specified investigation group.default GetInvestigationGroupResponsegetInvestigationGroup(GetInvestigationGroupRequest getInvestigationGroupRequest) Returns the configuration information for the specified investigation group.getInvestigationGroupPolicy(Consumer<GetInvestigationGroupPolicyRequest.Builder> getInvestigationGroupPolicyRequest) Returns the JSON of the IAM resource policy associated with the specified investigation group in a string.getInvestigationGroupPolicy(GetInvestigationGroupPolicyRequest getInvestigationGroupPolicyRequest) Returns the JSON of the IAM resource policy associated with the specified investigation group in a string.default ListInvestigationGroupsResponselistInvestigationGroups(Consumer<ListInvestigationGroupsRequest.Builder> listInvestigationGroupsRequest) Returns the ARN and name of each investigation group in the account.default ListInvestigationGroupsResponselistInvestigationGroups(ListInvestigationGroupsRequest listInvestigationGroupsRequest) Returns the ARN and name of each investigation group in the account.default ListInvestigationGroupsIterablelistInvestigationGroupsPaginator(Consumer<ListInvestigationGroupsRequest.Builder> listInvestigationGroupsRequest) This is a variant oflistInvestigationGroups(software.amazon.awssdk.services.aiops.model.ListInvestigationGroupsRequest)operation.default ListInvestigationGroupsIterablelistInvestigationGroupsPaginator(ListInvestigationGroupsRequest listInvestigationGroupsRequest) This is a variant oflistInvestigationGroups(software.amazon.awssdk.services.aiops.model.ListInvestigationGroupsRequest)operation.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Displays the tags associated with a CloudWatch investigations resource.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Displays the tags associated with a CloudWatch investigations resource.putInvestigationGroupPolicy(Consumer<PutInvestigationGroupPolicyRequest.Builder> putInvestigationGroupPolicyRequest) Creates an IAM resource policy and assigns it to the specified investigation group.putInvestigationGroupPolicy(PutInvestigationGroupPolicyRequest putInvestigationGroupPolicyRequest) Creates an IAM resource policy and assigns it to the specified investigation group.default AiOpsServiceClientConfigurationThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadatadefault TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Assigns one or more tags (key-value pairs) to the specified resource.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest) Assigns one or more tags (key-value pairs) to the specified resource.default UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes one or more tags from the specified resource.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest) Removes one or more tags from the specified resource.default UpdateInvestigationGroupResponseupdateInvestigationGroup(Consumer<UpdateInvestigationGroupRequest.Builder> updateInvestigationGroupRequest) Updates the configuration of the specified investigation group.default UpdateInvestigationGroupResponseupdateInvestigationGroup(UpdateInvestigationGroupRequest updateInvestigationGroupRequest) Updates the configuration of the specified investigation group.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
createInvestigationGroup
default CreateInvestigationGroupResponse createInvestigationGroup(CreateInvestigationGroupRequest createInvestigationGroupRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ServiceQuotaExceededException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException 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
AIOpsConsoleAdminPolicyor theAdministratorAccessIAM 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
CreateInvestigationGroupand you want to enable alarms to do this, you must usePutInvestigationGroupPolicyto create a resource policy that grants this permission to CloudWatch alarms.For more information about configuring CloudWatch alarms, see Using Amazon CloudWatch alarms
- Parameters:
createInvestigationGroupRequest-- Returns:
- Result of the CreateInvestigationGroup operation returned by the service.
- See Also:
-
-
createInvestigationGroup
default CreateInvestigationGroupResponse createInvestigationGroup(Consumer<CreateInvestigationGroupRequest.Builder> createInvestigationGroupRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ServiceQuotaExceededException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException 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
AIOpsConsoleAdminPolicyor theAdministratorAccessIAM 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
CreateInvestigationGroupand you want to enable alarms to do this, you must usePutInvestigationGroupPolicyto create a resource policy that grants this permission to CloudWatch alarms.For more information about configuring CloudWatch alarms, see Using Amazon CloudWatch alarms
This is a convenience which creates an instance of the
CreateInvestigationGroupRequest.Builderavoiding the need to create one manually viaCreateInvestigationGroupRequest.builder()- Parameters:
createInvestigationGroupRequest- AConsumerthat will call methods onCreateInvestigationGroupRequest.Builderto create a request.- Returns:
- Result of the CreateInvestigationGroup operation returned by the service.
- See Also:
-
-
deleteInvestigationGroup
default DeleteInvestigationGroupResponse deleteInvestigationGroup(DeleteInvestigationGroupRequest deleteInvestigationGroupRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException 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.
- Parameters:
deleteInvestigationGroupRequest-- Returns:
- Result of the DeleteInvestigationGroup operation returned by the service.
- See Also:
-
deleteInvestigationGroup
default DeleteInvestigationGroupResponse deleteInvestigationGroup(Consumer<DeleteInvestigationGroupRequest.Builder> deleteInvestigationGroupRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException 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.
This is a convenience which creates an instance of the
DeleteInvestigationGroupRequest.Builderavoiding the need to create one manually viaDeleteInvestigationGroupRequest.builder()- Parameters:
deleteInvestigationGroupRequest- AConsumerthat will call methods onDeleteInvestigationGroupRequest.Builderto create a request.- Returns:
- Result of the DeleteInvestigationGroup operation returned by the service.
- See Also:
-
deleteInvestigationGroupPolicy
default DeleteInvestigationGroupPolicyResponse deleteInvestigationGroupPolicy(DeleteInvestigationGroupPolicyRequest deleteInvestigationGroupPolicyRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Removes the IAM resource policy from being associated with the investigation group that you specify.
- Parameters:
deleteInvestigationGroupPolicyRequest-- Returns:
- Result of the DeleteInvestigationGroupPolicy operation returned by the service.
- See Also:
-
deleteInvestigationGroupPolicy
default DeleteInvestigationGroupPolicyResponse deleteInvestigationGroupPolicy(Consumer<DeleteInvestigationGroupPolicyRequest.Builder> deleteInvestigationGroupPolicyRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Removes the IAM resource policy from being associated with the investigation group that you specify.
This is a convenience which creates an instance of the
DeleteInvestigationGroupPolicyRequest.Builderavoiding the need to create one manually viaDeleteInvestigationGroupPolicyRequest.builder()- Parameters:
deleteInvestigationGroupPolicyRequest- AConsumerthat will call methods onDeleteInvestigationGroupPolicyRequest.Builderto create a request.- Returns:
- Result of the DeleteInvestigationGroupPolicy operation returned by the service.
- See Also:
-
getInvestigationGroup
default GetInvestigationGroupResponse getInvestigationGroup(GetInvestigationGroupRequest getInvestigationGroupRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Returns the configuration information for the specified investigation group.
- Parameters:
getInvestigationGroupRequest-- Returns:
- Result of the GetInvestigationGroup operation returned by the service.
- See Also:
-
getInvestigationGroup
default GetInvestigationGroupResponse getInvestigationGroup(Consumer<GetInvestigationGroupRequest.Builder> getInvestigationGroupRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Returns the configuration information for the specified investigation group.
This is a convenience which creates an instance of the
GetInvestigationGroupRequest.Builderavoiding the need to create one manually viaGetInvestigationGroupRequest.builder()- Parameters:
getInvestigationGroupRequest- AConsumerthat will call methods onGetInvestigationGroupRequest.Builderto create a request.- Returns:
- Result of the GetInvestigationGroup operation returned by the service.
- See Also:
-
getInvestigationGroupPolicy
default GetInvestigationGroupPolicyResponse getInvestigationGroupPolicy(GetInvestigationGroupPolicyRequest getInvestigationGroupPolicyRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException 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:*\"}}}]}.- Parameters:
getInvestigationGroupPolicyRequest-- Returns:
- Result of the GetInvestigationGroupPolicy operation returned by the service.
- See Also:
-
getInvestigationGroupPolicy
default GetInvestigationGroupPolicyResponse getInvestigationGroupPolicy(Consumer<GetInvestigationGroupPolicyRequest.Builder> getInvestigationGroupPolicyRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException 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:*\"}}}]}.
This is a convenience which creates an instance of the
GetInvestigationGroupPolicyRequest.Builderavoiding the need to create one manually viaGetInvestigationGroupPolicyRequest.builder()- Parameters:
getInvestigationGroupPolicyRequest- AConsumerthat will call methods onGetInvestigationGroupPolicyRequest.Builderto create a request.- Returns:
- Result of the GetInvestigationGroupPolicy operation returned by the service.
- See Also:
-
listInvestigationGroups
default ListInvestigationGroupsResponse listInvestigationGroups(ListInvestigationGroupsRequest listInvestigationGroupsRequest) throws AccessDeniedException, ForbiddenException, ThrottlingException, ResourceNotFoundException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Returns the ARN and name of each investigation group in the account.
- Parameters:
listInvestigationGroupsRequest-- Returns:
- Result of the ListInvestigationGroups operation returned by the service.
- See Also:
-
listInvestigationGroups
default ListInvestigationGroupsResponse listInvestigationGroups(Consumer<ListInvestigationGroupsRequest.Builder> listInvestigationGroupsRequest) throws AccessDeniedException, ForbiddenException, ThrottlingException, ResourceNotFoundException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Returns the ARN and name of each investigation group in the account.
This is a convenience which creates an instance of the
ListInvestigationGroupsRequest.Builderavoiding the need to create one manually viaListInvestigationGroupsRequest.builder()- Parameters:
listInvestigationGroupsRequest- AConsumerthat will call methods onListInvestigationGroupsRequest.Builderto create a request.- Returns:
- Result of the ListInvestigationGroups operation returned by the service.
- See Also:
-
listInvestigationGroupsPaginator
default ListInvestigationGroupsIterable listInvestigationGroupsPaginator(ListInvestigationGroupsRequest listInvestigationGroupsRequest) throws AccessDeniedException, ForbiddenException, ThrottlingException, ResourceNotFoundException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException This is a variant of
listInvestigationGroups(software.amazon.awssdk.services.aiops.model.ListInvestigationGroupsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.aiops.paginators.ListInvestigationGroupsIterable responses = client.listInvestigationGroupsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.aiops.paginators.ListInvestigationGroupsIterable responses = client .listInvestigationGroupsPaginator(request); for (software.amazon.awssdk.services.aiops.model.ListInvestigationGroupsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.aiops.paginators.ListInvestigationGroupsIterable responses = client.listInvestigationGroupsPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listInvestigationGroups(software.amazon.awssdk.services.aiops.model.ListInvestigationGroupsRequest)operation.- Parameters:
listInvestigationGroupsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listInvestigationGroupsPaginator
default ListInvestigationGroupsIterable listInvestigationGroupsPaginator(Consumer<ListInvestigationGroupsRequest.Builder> listInvestigationGroupsRequest) throws AccessDeniedException, ForbiddenException, ThrottlingException, ResourceNotFoundException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException This is a variant of
listInvestigationGroups(software.amazon.awssdk.services.aiops.model.ListInvestigationGroupsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.aiops.paginators.ListInvestigationGroupsIterable responses = client.listInvestigationGroupsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.aiops.paginators.ListInvestigationGroupsIterable responses = client .listInvestigationGroupsPaginator(request); for (software.amazon.awssdk.services.aiops.model.ListInvestigationGroupsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.aiops.paginators.ListInvestigationGroupsIterable responses = client.listInvestigationGroupsPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listInvestigationGroups(software.amazon.awssdk.services.aiops.model.ListInvestigationGroupsRequest)operation.
This is a convenience which creates an instance of the
ListInvestigationGroupsRequest.Builderavoiding the need to create one manually viaListInvestigationGroupsRequest.builder()- Parameters:
listInvestigationGroupsRequest- AConsumerthat will call methods onListInvestigationGroupsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Displays the tags associated with a CloudWatch investigations resource. Currently, investigation groups support tagging.
- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Displays the tags associated with a CloudWatch investigations resource. Currently, investigation groups support tagging.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
putInvestigationGroupPolicy
default PutInvestigationGroupPolicyResponse putInvestigationGroupPolicy(PutInvestigationGroupPolicyRequest putInvestigationGroupPolicyRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Creates an IAM resource policy and assigns it to the specified investigation group.
If you create your investigation group with
CreateInvestigationGroupand 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:*" } } } ] }- Parameters:
putInvestigationGroupPolicyRequest-- Returns:
- Result of the PutInvestigationGroupPolicy operation returned by the service.
- See Also:
-
putInvestigationGroupPolicy
default PutInvestigationGroupPolicyResponse putInvestigationGroupPolicy(Consumer<PutInvestigationGroupPolicyRequest.Builder> putInvestigationGroupPolicyRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Creates an IAM resource policy and assigns it to the specified investigation group.
If you create your investigation group with
CreateInvestigationGroupand 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:*" } } } ] }
This is a convenience which creates an instance of the
PutInvestigationGroupPolicyRequest.Builderavoiding the need to create one manually viaPutInvestigationGroupPolicyRequest.builder()- Parameters:
putInvestigationGroupPolicyRequest- AConsumerthat will call methods onPutInvestigationGroupPolicyRequest.Builderto create a request.- Returns:
- Result of the PutInvestigationGroupPolicy operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException 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.
- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException 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.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Removes one or more tags from the specified resource.
- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Removes one or more tags from the specified resource.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
updateInvestigationGroup
default UpdateInvestigationGroupResponse updateInvestigationGroup(UpdateInvestigationGroupRequest updateInvestigationGroupRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Updates the configuration of the specified investigation group.
- Parameters:
updateInvestigationGroupRequest-- Returns:
- Result of the UpdateInvestigationGroup operation returned by the service.
- See Also:
-
updateInvestigationGroup
default UpdateInvestigationGroupResponse updateInvestigationGroup(Consumer<UpdateInvestigationGroupRequest.Builder> updateInvestigationGroupRequest) throws AccessDeniedException, ForbiddenException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, AiOpsException Updates the configuration of the specified investigation group.
This is a convenience which creates an instance of the
UpdateInvestigationGroupRequest.Builderavoiding the need to create one manually viaUpdateInvestigationGroupRequest.builder()- Parameters:
updateInvestigationGroupRequest- AConsumerthat will call methods onUpdateInvestigationGroupRequest.Builderto create a request.- Returns:
- Result of the UpdateInvestigationGroup operation returned by the service.
- See Also:
-
create
Create aAiOpsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aAiOpsClient. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-