@SdkInternalApi
    final SetVaultNotificationsResult executeSetVaultNotifications(SetVaultNotificationsRequest setVaultNotificationsRequest) {

        ExecutionContext executionContext = createExecutionContext(setVaultNotificationsRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<SetVaultNotificationsRequest> request = null;
        Response<SetVaultNotificationsResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new SetVaultNotificationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(setVaultNotificationsRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Glacier");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetVaultNotifications");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            HttpResponseHandler<AmazonWebServiceResponse<SetVaultNotificationsResult>> responseHandler = protocolFactory
                    .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
                            new SetVaultNotificationsResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
This operation configures notifications that will be sent when specific events happen to a vault. By default, you
don't get any notifications.
</p>
<p>
To configure vault notifications, send a PUT request to the <code>notification-configuration</code> subresource
of the vault. The request should include a JSON document that provides an Amazon SNS topic and specific events
for which you want Amazon S3 Glacier to send notifications to the topic.
</p>
<p>
Amazon SNS topics must grant permission to the vault to be allowed to publish notifications to the topic. You can
configure a vault to publish a notification for the following vault events:
</p>
<ul>
<li>
<p>
<b>ArchiveRetrievalCompleted</b> This event occurs when a job that was initiated for an archive retrieval is
completed (<a>InitiateJob</a>). The status of the completed job can be "Succeeded" or "Failed". The notification
sent to the SNS topic is the same output as returned from <a>DescribeJob</a>.
</p>
</li>
<li>
<p>
<b>InventoryRetrievalCompleted</b> This event occurs when a job that was initiated for an inventory retrieval is
completed (<a>InitiateJob</a>). The status of the completed job can be "Succeeded" or "Failed". The notification
sent to the SNS topic is the same output as returned from <a>DescribeJob</a>.
</p>
</li>
</ul>
<p>
An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access
Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform
specific actions. For more information, see <a
href="https://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control
Using AWS Identity and Access Management (IAM)</a>.
</p>
<p>
For conceptual information and underlying REST API, see <a
href="https://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault
Notifications in Amazon S3 Glacier</a> and <a
href="https://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-put.html">Set Vault
Notification Configuration </a> in the <i>Amazon Glacier Developer Guide</i>.
</p>

@param setVaultNotificationsRequest
       Provides options to configure notifications that will be sent when specific events happen to a vault.
@return Result of the SetVaultNotifications operation returned by the service.
@throws ResourceNotFoundException
        Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.
@throws InvalidParameterValueException
        Returned if a parameter of the request is incorrectly specified.
@throws MissingParameterValueException
        Returned if a required header or parameter is missing from the request.
@throws ServiceUnavailableException
        Returned if the service cannot complete the request.
@sample AmazonGlacier.SetVaultNotifications
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/AmazonGlacierClient.java