software.amazon.awssdk.services.clouddirectory.DefaultCloudDirectoryClient Maven / Gradle / Ivy
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.clouddirectory;
import java.util.Collections;
import java.util.List;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.clouddirectory.internal.CloudDirectoryServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.clouddirectory.model.AccessDeniedException;
import software.amazon.awssdk.services.clouddirectory.model.AddFacetToObjectRequest;
import software.amazon.awssdk.services.clouddirectory.model.AddFacetToObjectResponse;
import software.amazon.awssdk.services.clouddirectory.model.ApplySchemaRequest;
import software.amazon.awssdk.services.clouddirectory.model.ApplySchemaResponse;
import software.amazon.awssdk.services.clouddirectory.model.AttachObjectRequest;
import software.amazon.awssdk.services.clouddirectory.model.AttachObjectResponse;
import software.amazon.awssdk.services.clouddirectory.model.AttachPolicyRequest;
import software.amazon.awssdk.services.clouddirectory.model.AttachPolicyResponse;
import software.amazon.awssdk.services.clouddirectory.model.AttachToIndexRequest;
import software.amazon.awssdk.services.clouddirectory.model.AttachToIndexResponse;
import software.amazon.awssdk.services.clouddirectory.model.AttachTypedLinkRequest;
import software.amazon.awssdk.services.clouddirectory.model.AttachTypedLinkResponse;
import software.amazon.awssdk.services.clouddirectory.model.BatchReadRequest;
import software.amazon.awssdk.services.clouddirectory.model.BatchReadResponse;
import software.amazon.awssdk.services.clouddirectory.model.BatchWriteException;
import software.amazon.awssdk.services.clouddirectory.model.BatchWriteRequest;
import software.amazon.awssdk.services.clouddirectory.model.BatchWriteResponse;
import software.amazon.awssdk.services.clouddirectory.model.CannotListParentOfRootException;
import software.amazon.awssdk.services.clouddirectory.model.CloudDirectoryException;
import software.amazon.awssdk.services.clouddirectory.model.CreateDirectoryRequest;
import software.amazon.awssdk.services.clouddirectory.model.CreateDirectoryResponse;
import software.amazon.awssdk.services.clouddirectory.model.CreateFacetRequest;
import software.amazon.awssdk.services.clouddirectory.model.CreateFacetResponse;
import software.amazon.awssdk.services.clouddirectory.model.CreateIndexRequest;
import software.amazon.awssdk.services.clouddirectory.model.CreateIndexResponse;
import software.amazon.awssdk.services.clouddirectory.model.CreateObjectRequest;
import software.amazon.awssdk.services.clouddirectory.model.CreateObjectResponse;
import software.amazon.awssdk.services.clouddirectory.model.CreateSchemaRequest;
import software.amazon.awssdk.services.clouddirectory.model.CreateSchemaResponse;
import software.amazon.awssdk.services.clouddirectory.model.CreateTypedLinkFacetRequest;
import software.amazon.awssdk.services.clouddirectory.model.CreateTypedLinkFacetResponse;
import software.amazon.awssdk.services.clouddirectory.model.DeleteDirectoryRequest;
import software.amazon.awssdk.services.clouddirectory.model.DeleteDirectoryResponse;
import software.amazon.awssdk.services.clouddirectory.model.DeleteFacetRequest;
import software.amazon.awssdk.services.clouddirectory.model.DeleteFacetResponse;
import software.amazon.awssdk.services.clouddirectory.model.DeleteObjectRequest;
import software.amazon.awssdk.services.clouddirectory.model.DeleteObjectResponse;
import software.amazon.awssdk.services.clouddirectory.model.DeleteSchemaRequest;
import software.amazon.awssdk.services.clouddirectory.model.DeleteSchemaResponse;
import software.amazon.awssdk.services.clouddirectory.model.DeleteTypedLinkFacetRequest;
import software.amazon.awssdk.services.clouddirectory.model.DeleteTypedLinkFacetResponse;
import software.amazon.awssdk.services.clouddirectory.model.DetachFromIndexRequest;
import software.amazon.awssdk.services.clouddirectory.model.DetachFromIndexResponse;
import software.amazon.awssdk.services.clouddirectory.model.DetachObjectRequest;
import software.amazon.awssdk.services.clouddirectory.model.DetachObjectResponse;
import software.amazon.awssdk.services.clouddirectory.model.DetachPolicyRequest;
import software.amazon.awssdk.services.clouddirectory.model.DetachPolicyResponse;
import software.amazon.awssdk.services.clouddirectory.model.DetachTypedLinkRequest;
import software.amazon.awssdk.services.clouddirectory.model.DetachTypedLinkResponse;
import software.amazon.awssdk.services.clouddirectory.model.DirectoryAlreadyExistsException;
import software.amazon.awssdk.services.clouddirectory.model.DirectoryDeletedException;
import software.amazon.awssdk.services.clouddirectory.model.DirectoryNotDisabledException;
import software.amazon.awssdk.services.clouddirectory.model.DirectoryNotEnabledException;
import software.amazon.awssdk.services.clouddirectory.model.DisableDirectoryRequest;
import software.amazon.awssdk.services.clouddirectory.model.DisableDirectoryResponse;
import software.amazon.awssdk.services.clouddirectory.model.EnableDirectoryRequest;
import software.amazon.awssdk.services.clouddirectory.model.EnableDirectoryResponse;
import software.amazon.awssdk.services.clouddirectory.model.FacetAlreadyExistsException;
import software.amazon.awssdk.services.clouddirectory.model.FacetInUseException;
import software.amazon.awssdk.services.clouddirectory.model.FacetNotFoundException;
import software.amazon.awssdk.services.clouddirectory.model.FacetValidationException;
import software.amazon.awssdk.services.clouddirectory.model.GetAppliedSchemaVersionRequest;
import software.amazon.awssdk.services.clouddirectory.model.GetAppliedSchemaVersionResponse;
import software.amazon.awssdk.services.clouddirectory.model.GetDirectoryRequest;
import software.amazon.awssdk.services.clouddirectory.model.GetDirectoryResponse;
import software.amazon.awssdk.services.clouddirectory.model.GetFacetRequest;
import software.amazon.awssdk.services.clouddirectory.model.GetFacetResponse;
import software.amazon.awssdk.services.clouddirectory.model.GetLinkAttributesRequest;
import software.amazon.awssdk.services.clouddirectory.model.GetLinkAttributesResponse;
import software.amazon.awssdk.services.clouddirectory.model.GetObjectAttributesRequest;
import software.amazon.awssdk.services.clouddirectory.model.GetObjectAttributesResponse;
import software.amazon.awssdk.services.clouddirectory.model.GetObjectInformationRequest;
import software.amazon.awssdk.services.clouddirectory.model.GetObjectInformationResponse;
import software.amazon.awssdk.services.clouddirectory.model.GetSchemaAsJsonRequest;
import software.amazon.awssdk.services.clouddirectory.model.GetSchemaAsJsonResponse;
import software.amazon.awssdk.services.clouddirectory.model.GetTypedLinkFacetInformationRequest;
import software.amazon.awssdk.services.clouddirectory.model.GetTypedLinkFacetInformationResponse;
import software.amazon.awssdk.services.clouddirectory.model.IncompatibleSchemaException;
import software.amazon.awssdk.services.clouddirectory.model.IndexedAttributeMissingException;
import software.amazon.awssdk.services.clouddirectory.model.InternalServiceException;
import software.amazon.awssdk.services.clouddirectory.model.InvalidArnException;
import software.amazon.awssdk.services.clouddirectory.model.InvalidAttachmentException;
import software.amazon.awssdk.services.clouddirectory.model.InvalidFacetUpdateException;
import software.amazon.awssdk.services.clouddirectory.model.InvalidNextTokenException;
import software.amazon.awssdk.services.clouddirectory.model.InvalidRuleException;
import software.amazon.awssdk.services.clouddirectory.model.InvalidSchemaDocException;
import software.amazon.awssdk.services.clouddirectory.model.InvalidTaggingRequestException;
import software.amazon.awssdk.services.clouddirectory.model.LimitExceededException;
import software.amazon.awssdk.services.clouddirectory.model.LinkNameAlreadyInUseException;
import software.amazon.awssdk.services.clouddirectory.model.ListAppliedSchemaArnsRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListAppliedSchemaArnsResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListAttachedIndicesRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListAttachedIndicesResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListDevelopmentSchemaArnsRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListDevelopmentSchemaArnsResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListDirectoriesRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListDirectoriesResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListFacetAttributesRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListFacetAttributesResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListFacetNamesRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListFacetNamesResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListIncomingTypedLinksRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListIncomingTypedLinksResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListIndexRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListIndexResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListManagedSchemaArnsRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListManagedSchemaArnsResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectAttributesRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectAttributesResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectChildrenRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectChildrenResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectParentPathsRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectParentPathsResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectParentsRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectParentsResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectPoliciesRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListObjectPoliciesResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListOutgoingTypedLinksRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListOutgoingTypedLinksResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListPolicyAttachmentsRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListPolicyAttachmentsResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListPublishedSchemaArnsRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListPublishedSchemaArnsResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListTypedLinkFacetAttributesRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListTypedLinkFacetAttributesResponse;
import software.amazon.awssdk.services.clouddirectory.model.ListTypedLinkFacetNamesRequest;
import software.amazon.awssdk.services.clouddirectory.model.ListTypedLinkFacetNamesResponse;
import software.amazon.awssdk.services.clouddirectory.model.LookupPolicyRequest;
import software.amazon.awssdk.services.clouddirectory.model.LookupPolicyResponse;
import software.amazon.awssdk.services.clouddirectory.model.NotIndexException;
import software.amazon.awssdk.services.clouddirectory.model.NotNodeException;
import software.amazon.awssdk.services.clouddirectory.model.NotPolicyException;
import software.amazon.awssdk.services.clouddirectory.model.ObjectAlreadyDetachedException;
import software.amazon.awssdk.services.clouddirectory.model.ObjectNotDetachedException;
import software.amazon.awssdk.services.clouddirectory.model.PublishSchemaRequest;
import software.amazon.awssdk.services.clouddirectory.model.PublishSchemaResponse;
import software.amazon.awssdk.services.clouddirectory.model.PutSchemaFromJsonRequest;
import software.amazon.awssdk.services.clouddirectory.model.PutSchemaFromJsonResponse;
import software.amazon.awssdk.services.clouddirectory.model.RemoveFacetFromObjectRequest;
import software.amazon.awssdk.services.clouddirectory.model.RemoveFacetFromObjectResponse;
import software.amazon.awssdk.services.clouddirectory.model.ResourceNotFoundException;
import software.amazon.awssdk.services.clouddirectory.model.RetryableConflictException;
import software.amazon.awssdk.services.clouddirectory.model.SchemaAlreadyExistsException;
import software.amazon.awssdk.services.clouddirectory.model.SchemaAlreadyPublishedException;
import software.amazon.awssdk.services.clouddirectory.model.StillContainsLinksException;
import software.amazon.awssdk.services.clouddirectory.model.TagResourceRequest;
import software.amazon.awssdk.services.clouddirectory.model.TagResourceResponse;
import software.amazon.awssdk.services.clouddirectory.model.UnsupportedIndexTypeException;
import software.amazon.awssdk.services.clouddirectory.model.UntagResourceRequest;
import software.amazon.awssdk.services.clouddirectory.model.UntagResourceResponse;
import software.amazon.awssdk.services.clouddirectory.model.UpdateFacetRequest;
import software.amazon.awssdk.services.clouddirectory.model.UpdateFacetResponse;
import software.amazon.awssdk.services.clouddirectory.model.UpdateLinkAttributesRequest;
import software.amazon.awssdk.services.clouddirectory.model.UpdateLinkAttributesResponse;
import software.amazon.awssdk.services.clouddirectory.model.UpdateObjectAttributesRequest;
import software.amazon.awssdk.services.clouddirectory.model.UpdateObjectAttributesResponse;
import software.amazon.awssdk.services.clouddirectory.model.UpdateSchemaRequest;
import software.amazon.awssdk.services.clouddirectory.model.UpdateSchemaResponse;
import software.amazon.awssdk.services.clouddirectory.model.UpdateTypedLinkFacetRequest;
import software.amazon.awssdk.services.clouddirectory.model.UpdateTypedLinkFacetResponse;
import software.amazon.awssdk.services.clouddirectory.model.UpgradeAppliedSchemaRequest;
import software.amazon.awssdk.services.clouddirectory.model.UpgradeAppliedSchemaResponse;
import software.amazon.awssdk.services.clouddirectory.model.UpgradePublishedSchemaRequest;
import software.amazon.awssdk.services.clouddirectory.model.UpgradePublishedSchemaResponse;
import software.amazon.awssdk.services.clouddirectory.model.ValidationException;
import software.amazon.awssdk.services.clouddirectory.transform.AddFacetToObjectRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ApplySchemaRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.AttachObjectRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.AttachPolicyRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.AttachToIndexRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.AttachTypedLinkRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.BatchReadRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.BatchWriteRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.CreateDirectoryRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.CreateFacetRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.CreateIndexRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.CreateObjectRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.CreateSchemaRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.CreateTypedLinkFacetRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DeleteDirectoryRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DeleteFacetRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DeleteObjectRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DeleteSchemaRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DeleteTypedLinkFacetRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DetachFromIndexRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DetachObjectRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DetachPolicyRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DetachTypedLinkRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.DisableDirectoryRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.EnableDirectoryRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.GetAppliedSchemaVersionRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.GetDirectoryRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.GetFacetRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.GetLinkAttributesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.GetObjectAttributesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.GetObjectInformationRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.GetSchemaAsJsonRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.GetTypedLinkFacetInformationRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListAppliedSchemaArnsRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListAttachedIndicesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListDevelopmentSchemaArnsRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListDirectoriesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListFacetAttributesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListFacetNamesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListIncomingTypedLinksRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListIndexRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListManagedSchemaArnsRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListObjectAttributesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListObjectChildrenRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListObjectParentPathsRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListObjectParentsRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListObjectPoliciesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListOutgoingTypedLinksRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListPolicyAttachmentsRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListPublishedSchemaArnsRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListTypedLinkFacetAttributesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.ListTypedLinkFacetNamesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.LookupPolicyRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.PublishSchemaRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.PutSchemaFromJsonRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.RemoveFacetFromObjectRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.UpdateFacetRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.UpdateLinkAttributesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.UpdateObjectAttributesRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.UpdateSchemaRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.UpdateTypedLinkFacetRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.UpgradeAppliedSchemaRequestMarshaller;
import software.amazon.awssdk.services.clouddirectory.transform.UpgradePublishedSchemaRequestMarshaller;
import software.amazon.awssdk.utils.Logger;
/**
* Internal implementation of {@link CloudDirectoryClient}.
*
* @see CloudDirectoryClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultCloudDirectoryClient implements CloudDirectoryClient {
private static final Logger log = Logger.loggerFor(DefaultCloudDirectoryClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.REST_JSON).build();
private final SyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultCloudDirectoryClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
/**
*
* Adds a new Facet to an object. An object can have more than one facet applied on it.
*
*
* @param addFacetToObjectRequest
* @return Result of the AddFacetToObject operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.AddFacetToObject
* @see AWS API Documentation
*/
@Override
public AddFacetToObjectResponse addFacetToObject(AddFacetToObjectRequest addFacetToObjectRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AddFacetToObjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(addFacetToObjectRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, addFacetToObjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddFacetToObject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AddFacetToObject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(addFacetToObjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AddFacetToObjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Copies the input published schema, at the specified version, into the Directory with the same name and
* version as that of the published schema.
*
*
* @param applySchemaRequest
* @return Result of the ApplySchema operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws SchemaAlreadyExistsException
* Indicates that a schema could not be created due to a naming conflict. Please select a different name and
* then try again.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidAttachmentException
* Indicates that an attempt to make an attachment was invalid. For example, attaching two nodes with a link
* type that is not applicable to the nodes or attempting to apply a schema to a directory a second time.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ApplySchema
* @see AWS
* API Documentation
*/
@Override
public ApplySchemaResponse applySchema(ApplySchemaRequest applySchemaRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
SchemaAlreadyExistsException, ResourceNotFoundException, InvalidAttachmentException, AwsServiceException,
SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ApplySchemaResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(applySchemaRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, applySchemaRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ApplySchema");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ApplySchema").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(applySchemaRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ApplySchemaRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Attaches an existing object to another object. An object can be accessed in two ways:
*
*
* -
*
* Using the path
*
*
* -
*
* Using ObjectIdentifier
*
*
*
*
* @param attachObjectRequest
* @return Result of the AttachObject operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws LinkNameAlreadyInUseException
* Indicates that a link could not be created due to a naming conflict. Choose a different name and then try
* again.
* @throws InvalidAttachmentException
* Indicates that an attempt to make an attachment was invalid. For example, attaching two nodes with a link
* type that is not applicable to the nodes or attempting to apply a schema to a directory a second time.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.AttachObject
* @see AWS
* API Documentation
*/
@Override
public AttachObjectResponse attachObject(AttachObjectRequest attachObjectRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, ResourceNotFoundException, LinkNameAlreadyInUseException, InvalidAttachmentException,
FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AttachObjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(attachObjectRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, attachObjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachObject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AttachObject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(attachObjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AttachObjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Attaches a policy object to a regular object. An object can have a limited number of attached policies.
*
*
* @param attachPolicyRequest
* @return Result of the AttachPolicy operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws NotPolicyException
* Indicates that the requested operation can only operate on policy objects.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.AttachPolicy
* @see AWS
* API Documentation
*/
@Override
public AttachPolicyResponse attachPolicy(AttachPolicyRequest attachPolicyRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, ResourceNotFoundException, NotPolicyException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AttachPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(attachPolicyRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, attachPolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachPolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AttachPolicy").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(attachPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AttachPolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Attaches the specified object to the specified index.
*
*
* @param attachToIndexRequest
* @return Result of the AttachToIndex operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws InvalidAttachmentException
* Indicates that an attempt to make an attachment was invalid. For example, attaching two nodes with a link
* type that is not applicable to the nodes or attempting to apply a schema to a directory a second time.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws LinkNameAlreadyInUseException
* Indicates that a link could not be created due to a naming conflict. Choose a different name and then try
* again.
* @throws IndexedAttributeMissingException
* An object has been attempted to be attached to an object that does not have the appropriate attribute
* value.
* @throws NotIndexException
* Indicates that the requested operation can only operate on index objects.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.AttachToIndex
* @see AWS
* API Documentation
*/
@Override
public AttachToIndexResponse attachToIndex(AttachToIndexRequest attachToIndexRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, InvalidAttachmentException, ResourceNotFoundException, LinkNameAlreadyInUseException,
IndexedAttributeMissingException, NotIndexException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AttachToIndexResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(attachToIndexRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, attachToIndexRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachToIndex");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AttachToIndex").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(attachToIndexRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AttachToIndexRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Attaches a typed link to a specified source and target object. For more information, see Typed Links.
*
*
* @param attachTypedLinkRequest
* @return Result of the AttachTypedLink operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidAttachmentException
* Indicates that an attempt to make an attachment was invalid. For example, attaching two nodes with a link
* type that is not applicable to the nodes or attempting to apply a schema to a directory a second time.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.AttachTypedLink
* @see AWS API Documentation
*/
@Override
public AttachTypedLinkResponse attachTypedLink(AttachTypedLinkRequest attachTypedLinkRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
InvalidAttachmentException, FacetValidationException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AttachTypedLinkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(attachTypedLinkRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, attachTypedLinkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachTypedLink");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AttachTypedLink").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(attachTypedLinkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AttachTypedLinkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Performs all the read operations in a batch.
*
*
* @param batchReadRequest
* @return Result of the BatchRead operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.BatchRead
* @see AWS API
* Documentation
*/
@Override
public BatchReadResponse batchRead(BatchReadRequest batchReadRequest) throws InternalServiceException, InvalidArnException,
RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
BatchReadResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchReadRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, batchReadRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchRead");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("BatchRead").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(batchReadRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new BatchReadRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Performs all the write operations in a batch. Either all the operations succeed or none.
*
*
* @param batchWriteRequest
* @return Result of the BatchWrite operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws BatchWriteException
* A BatchWrite
exception has occurred.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.BatchWrite
* @see AWS API
* Documentation
*/
@Override
public BatchWriteResponse batchWrite(BatchWriteRequest batchWriteRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, BatchWriteException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
BatchWriteResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchWriteRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, batchWriteRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchWrite");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("BatchWrite").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(batchWriteRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new BatchWriteRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a Directory by copying the published schema into the directory. A directory cannot be created
* without a schema.
*
*
* You can also quickly create a directory using a managed schema, called the QuickStartSchema
. For
* more information, see Managed Schema
* in the Amazon Cloud Directory Developer Guide.
*
*
* @param createDirectoryRequest
* @return Result of the CreateDirectory operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryAlreadyExistsException
* Indicates that a Directory could not be created due to a naming conflict. Choose a different name
* and try again.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.CreateDirectory
* @see AWS API Documentation
*/
@Override
public CreateDirectoryResponse createDirectory(CreateDirectoryRequest createDirectoryRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryAlreadyExistsException, ResourceNotFoundException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateDirectoryResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDirectoryRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDirectoryRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDirectory");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateDirectory").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createDirectoryRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateDirectoryRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new Facet in a schema. Facet creation is allowed only in development or applied schemas.
*
*
* @param createFacetRequest
* @return Result of the CreateFacet operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetAlreadyExistsException
* A facet with the same name already exists.
* @throws InvalidRuleException
* Occurs when any of the rule parameter keys or values are invalid.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.CreateFacet
* @see AWS
* API Documentation
*/
@Override
public CreateFacetResponse createFacet(CreateFacetRequest createFacetRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, FacetAlreadyExistsException, InvalidRuleException, FacetValidationException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateFacetResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createFacetRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createFacetRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateFacet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateFacet").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(createFacetRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateFacetRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an index object. See Indexing and
* search for more information.
*
*
* @param createIndexRequest
* @return Result of the CreateIndex operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws LinkNameAlreadyInUseException
* Indicates that a link could not be created due to a naming conflict. Choose a different name and then try
* again.
* @throws UnsupportedIndexTypeException
* Indicates that the requested index type is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.CreateIndex
* @see AWS
* API Documentation
*/
@Override
public CreateIndexResponse createIndex(CreateIndexRequest createIndexRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, ResourceNotFoundException, FacetValidationException, LinkNameAlreadyInUseException,
UnsupportedIndexTypeException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateIndexResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createIndexRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createIndexRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateIndex");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateIndex").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(createIndexRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateIndexRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an object in a Directory. Additionally attaches the object to a parent, if a parent reference and
* LinkName
is specified. An object is simply a collection of Facet attributes. You can also use
* this API call to create a policy object, if the facet from which you create the object is a policy facet.
*
*
* @param createObjectRequest
* @return Result of the CreateObject operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws LinkNameAlreadyInUseException
* Indicates that a link could not be created due to a naming conflict. Choose a different name and then try
* again.
* @throws UnsupportedIndexTypeException
* Indicates that the requested index type is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.CreateObject
* @see AWS
* API Documentation
*/
@Override
public CreateObjectResponse createObject(CreateObjectRequest createObjectRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, ResourceNotFoundException, FacetValidationException, LinkNameAlreadyInUseException,
UnsupportedIndexTypeException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateObjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createObjectRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createObjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateObject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateObject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createObjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateObjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new schema in a development state. A schema can exist in three phases:
*
*
* -
*
* Development: This is a mutable phase of the schema. All new schemas are in the development phase. Once the
* schema is finalized, it can be published.
*
*
* -
*
* Published: Published schemas are immutable and have a version associated with them.
*
*
* -
*
* Applied: Applied schemas are mutable in a way that allows you to add new schema facets. You can also add
* new, nonrequired attributes to existing schema facets. You can apply only published schemas to directories.
*
*
*
*
* @param createSchemaRequest
* @return Result of the CreateSchema operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws SchemaAlreadyExistsException
* Indicates that a schema could not be created due to a naming conflict. Please select a different name and
* then try again.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.CreateSchema
* @see AWS
* API Documentation
*/
@Override
public CreateSchemaResponse createSchema(CreateSchemaRequest createSchemaRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
SchemaAlreadyExistsException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateSchemaResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSchemaRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createSchemaRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSchema");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateSchema").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createSchemaRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateSchemaRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a TypedLinkFacet. For more information, see Typed Links.
*
*
* @param createTypedLinkFacetRequest
* @return Result of the CreateTypedLinkFacet operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetAlreadyExistsException
* A facet with the same name already exists.
* @throws InvalidRuleException
* Occurs when any of the rule parameter keys or values are invalid.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.CreateTypedLinkFacet
* @see AWS API Documentation
*/
@Override
public CreateTypedLinkFacetResponse createTypedLinkFacet(CreateTypedLinkFacetRequest createTypedLinkFacetRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, ResourceNotFoundException, FacetAlreadyExistsException,
InvalidRuleException, FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateTypedLinkFacetResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTypedLinkFacetRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createTypedLinkFacetRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTypedLinkFacet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateTypedLinkFacet").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createTypedLinkFacetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateTypedLinkFacetRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a directory. Only disabled directories can be deleted. A deleted directory cannot be undone. Exercise
* extreme caution when deleting directories.
*
*
* @param deleteDirectoryRequest
* @return Result of the DeleteDirectory operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws DirectoryNotDisabledException
* An operation can only operate on a disabled directory.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryDeletedException
* A directory that has been deleted and to which access has been attempted. Note: The requested resource
* will eventually cease to exist.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DeleteDirectory
* @see AWS API Documentation
*/
@Override
public DeleteDirectoryResponse deleteDirectory(DeleteDirectoryRequest deleteDirectoryRequest)
throws ResourceNotFoundException, DirectoryNotDisabledException, InternalServiceException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryDeletedException, RetryableConflictException,
InvalidArnException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteDirectoryResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDirectoryRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDirectoryRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDirectory");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteDirectory").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteDirectoryRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteDirectoryRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a given Facet. All attributes and Rules that are associated with the facet will be deleted.
* Only development schema facets are allowed deletion.
*
*
* @param deleteFacetRequest
* @return Result of the DeleteFacet operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetNotFoundException
* The specified Facet could not be found.
* @throws FacetInUseException
* Occurs when deleting a facet that contains an attribute that is a target to an attribute reference in a
* different facet.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DeleteFacet
* @see AWS
* API Documentation
*/
@Override
public DeleteFacetResponse deleteFacet(DeleteFacetRequest deleteFacetRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, FacetNotFoundException, FacetInUseException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteFacetResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteFacetRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteFacetRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteFacet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteFacet").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(deleteFacetRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteFacetRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an object and its associated attributes. Only objects with no children and no parents can be deleted. The
* maximum number of attributes that can be deleted during an object deletion is 30. For more information, see Amazon Cloud Directory
* Limits.
*
*
* @param deleteObjectRequest
* @return Result of the DeleteObject operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ObjectNotDetachedException
* Indicates that the requested operation cannot be completed because the object has not been detached from
* the tree.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DeleteObject
* @see AWS
* API Documentation
*/
@Override
public DeleteObjectResponse deleteObject(DeleteObjectRequest deleteObjectRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, ResourceNotFoundException, ObjectNotDetachedException, AwsServiceException,
SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteObjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteObjectRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteObjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteObject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteObject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteObjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteObjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a given schema. Schemas in a development and published state can only be deleted.
*
*
* @param deleteSchemaRequest
* @return Result of the DeleteSchema operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws StillContainsLinksException
* The object could not be deleted because links still exist. Remove the links and then try the operation
* again.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DeleteSchema
* @see AWS
* API Documentation
*/
@Override
public DeleteSchemaResponse deleteSchema(DeleteSchemaRequest deleteSchemaRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, StillContainsLinksException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteSchemaResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSchemaRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSchemaRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSchema");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteSchema").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteSchemaRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteSchemaRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a TypedLinkFacet. For more information, see Typed Links.
*
*
* @param deleteTypedLinkFacetRequest
* @return Result of the DeleteTypedLinkFacet operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetNotFoundException
* The specified Facet could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DeleteTypedLinkFacet
* @see AWS API Documentation
*/
@Override
public DeleteTypedLinkFacetResponse deleteTypedLinkFacet(DeleteTypedLinkFacetRequest deleteTypedLinkFacetRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, ResourceNotFoundException, FacetNotFoundException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteTypedLinkFacetResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteTypedLinkFacetRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTypedLinkFacetRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTypedLinkFacet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteTypedLinkFacet").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteTypedLinkFacetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteTypedLinkFacetRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Detaches the specified object from the specified index.
*
*
* @param detachFromIndexRequest
* @return Result of the DetachFromIndex operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ObjectAlreadyDetachedException
* Indicates that the object is not attached to the index.
* @throws NotIndexException
* Indicates that the requested operation can only operate on index objects.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DetachFromIndex
* @see AWS API Documentation
*/
@Override
public DetachFromIndexResponse detachFromIndex(DetachFromIndexRequest detachFromIndexRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
ObjectAlreadyDetachedException, NotIndexException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DetachFromIndexResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(detachFromIndexRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, detachFromIndexRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachFromIndex");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DetachFromIndex").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(detachFromIndexRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DetachFromIndexRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Detaches a given object from the parent object. The object that is to be detached from the parent is specified by
* the link name.
*
*
* @param detachObjectRequest
* @return Result of the DetachObject operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws NotNodeException
* Occurs when any invalid operations are performed on an object that is not a node, such as calling
* ListObjectChildren
for a leaf node object.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DetachObject
* @see AWS
* API Documentation
*/
@Override
public DetachObjectResponse detachObject(DetachObjectRequest detachObjectRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, ResourceNotFoundException, NotNodeException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DetachObjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(detachObjectRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, detachObjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachObject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DetachObject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(detachObjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DetachObjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Detaches a policy from an object.
*
*
* @param detachPolicyRequest
* @return Result of the DetachPolicy operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws NotPolicyException
* Indicates that the requested operation can only operate on policy objects.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DetachPolicy
* @see AWS
* API Documentation
*/
@Override
public DetachPolicyResponse detachPolicy(DetachPolicyRequest detachPolicyRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, ResourceNotFoundException, NotPolicyException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DetachPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(detachPolicyRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, detachPolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachPolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DetachPolicy").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(detachPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DetachPolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Detaches a typed link from a specified source and target object. For more information, see Typed Links.
*
*
* @param detachTypedLinkRequest
* @return Result of the DetachTypedLink operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DetachTypedLink
* @see AWS API Documentation
*/
@Override
public DetachTypedLinkResponse detachTypedLink(DetachTypedLinkRequest detachTypedLinkRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DetachTypedLinkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(detachTypedLinkRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, detachTypedLinkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachTypedLink");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DetachTypedLink").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(detachTypedLinkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DetachTypedLinkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the specified directory. Disabled directories cannot be read or written to. Only enabled directories can
* be disabled. Disabled directories may be reenabled.
*
*
* @param disableDirectoryRequest
* @return Result of the DisableDirectory operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws DirectoryDeletedException
* A directory that has been deleted and to which access has been attempted. Note: The requested resource
* will eventually cease to exist.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.DisableDirectory
* @see AWS API Documentation
*/
@Override
public DisableDirectoryResponse disableDirectory(DisableDirectoryRequest disableDirectoryRequest)
throws ResourceNotFoundException, DirectoryDeletedException, InternalServiceException, ValidationException,
LimitExceededException, AccessDeniedException, RetryableConflictException, InvalidArnException, AwsServiceException,
SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DisableDirectoryResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disableDirectoryRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, disableDirectoryRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisableDirectory");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DisableDirectory").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(disableDirectoryRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisableDirectoryRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Enables the specified directory. Only disabled directories can be enabled. Once enabled, the directory can then
* be read and written to.
*
*
* @param enableDirectoryRequest
* @return Result of the EnableDirectory operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws DirectoryDeletedException
* A directory that has been deleted and to which access has been attempted. Note: The requested resource
* will eventually cease to exist.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.EnableDirectory
* @see AWS API Documentation
*/
@Override
public EnableDirectoryResponse enableDirectory(EnableDirectoryRequest enableDirectoryRequest)
throws ResourceNotFoundException, DirectoryDeletedException, InternalServiceException, ValidationException,
LimitExceededException, AccessDeniedException, RetryableConflictException, InvalidArnException, AwsServiceException,
SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
EnableDirectoryResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(enableDirectoryRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, enableDirectoryRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableDirectory");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("EnableDirectory").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(enableDirectoryRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new EnableDirectoryRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns current applied schema version ARN, including the minor version in use.
*
*
* @param getAppliedSchemaVersionRequest
* @return Result of the GetAppliedSchemaVersion operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.GetAppliedSchemaVersion
* @see AWS API Documentation
*/
@Override
public GetAppliedSchemaVersionResponse getAppliedSchemaVersion(GetAppliedSchemaVersionRequest getAppliedSchemaVersionRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetAppliedSchemaVersionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAppliedSchemaVersionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getAppliedSchemaVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAppliedSchemaVersion");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetAppliedSchemaVersion").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getAppliedSchemaVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetAppliedSchemaVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves metadata about a directory.
*
*
* @param getDirectoryRequest
* @return Result of the GetDirectory operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.GetDirectory
* @see AWS
* API Documentation
*/
@Override
public GetDirectoryResponse getDirectory(GetDirectoryRequest getDirectoryRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetDirectoryResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDirectoryRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getDirectoryRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDirectory");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetDirectory").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getDirectoryRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetDirectoryRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets details of the Facet, such as facet name, attributes, Rules, or ObjectType
. You
* can call this on all kinds of schema facets -- published, development, or applied.
*
*
* @param getFacetRequest
* @return Result of the GetFacet operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetNotFoundException
* The specified Facet could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.GetFacet
* @see AWS API
* Documentation
*/
@Override
public GetFacetResponse getFacet(GetFacetRequest getFacetRequest) throws InternalServiceException, InvalidArnException,
RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, FacetNotFoundException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetFacetResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getFacetRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getFacetRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetFacet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetFacet").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getFacetRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetFacetRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves attributes that are associated with a typed link.
*
*
* @param getLinkAttributesRequest
* @return Result of the GetLinkAttributes operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.GetLinkAttributes
* @see AWS API Documentation
*/
@Override
public GetLinkAttributesResponse getLinkAttributes(GetLinkAttributesRequest getLinkAttributesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetLinkAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getLinkAttributesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getLinkAttributesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLinkAttributes");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetLinkAttributes").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getLinkAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetLinkAttributesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves attributes within a facet that are associated with an object.
*
*
* @param getObjectAttributesRequest
* @return Result of the GetObjectAttributes operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.GetObjectAttributes
* @see AWS API Documentation
*/
@Override
public GetObjectAttributesResponse getObjectAttributes(GetObjectAttributesRequest getObjectAttributesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetObjectAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getObjectAttributesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getObjectAttributesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetObjectAttributes");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetObjectAttributes").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getObjectAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetObjectAttributesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves metadata about an object.
*
*
* @param getObjectInformationRequest
* @return Result of the GetObjectInformation operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.GetObjectInformation
* @see AWS API Documentation
*/
@Override
public GetObjectInformationResponse getObjectInformation(GetObjectInformationRequest getObjectInformationRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetObjectInformationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getObjectInformationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getObjectInformationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetObjectInformation");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetObjectInformation").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getObjectInformationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetObjectInformationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a JSON representation of the schema. See JSON
* Schema Format for more information.
*
*
* @param getSchemaAsJsonRequest
* @return Result of the GetSchemaAsJson operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.GetSchemaAsJson
* @see AWS API Documentation
*/
@Override
public GetSchemaAsJsonResponse getSchemaAsJson(GetSchemaAsJsonRequest getSchemaAsJsonRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetSchemaAsJsonResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getSchemaAsJsonRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getSchemaAsJsonRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSchemaAsJson");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetSchemaAsJson").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getSchemaAsJsonRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetSchemaAsJsonRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the identity attribute order for a specific TypedLinkFacet. For more information, see Typed Links.
*
*
* @param getTypedLinkFacetInformationRequest
* @return Result of the GetTypedLinkFacetInformation operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws FacetNotFoundException
* The specified Facet could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.GetTypedLinkFacetInformation
* @see AWS API Documentation
*/
@Override
public GetTypedLinkFacetInformationResponse getTypedLinkFacetInformation(
GetTypedLinkFacetInformationRequest getTypedLinkFacetInformationRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, InvalidNextTokenException, FacetNotFoundException, AwsServiceException,
SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetTypedLinkFacetInformationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTypedLinkFacetInformationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getTypedLinkFacetInformationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTypedLinkFacetInformation");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetTypedLinkFacetInformation").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getTypedLinkFacetInformationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetTypedLinkFacetInformationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists schema major versions applied to a directory. If SchemaArn
is provided, lists the minor
* version.
*
*
* @param listAppliedSchemaArnsRequest
* @return Result of the ListAppliedSchemaArns operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListAppliedSchemaArns
* @see AWS API Documentation
*/
@Override
public ListAppliedSchemaArnsResponse listAppliedSchemaArns(ListAppliedSchemaArnsRequest listAppliedSchemaArnsRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, ResourceNotFoundException, InvalidNextTokenException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListAppliedSchemaArnsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAppliedSchemaArnsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listAppliedSchemaArnsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAppliedSchemaArns");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListAppliedSchemaArns").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listAppliedSchemaArnsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListAppliedSchemaArnsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists indices attached to the specified object.
*
*
* @param listAttachedIndicesRequest
* @return Result of the ListAttachedIndices operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListAttachedIndices
* @see AWS API Documentation
*/
@Override
public ListAttachedIndicesResponse listAttachedIndices(ListAttachedIndicesRequest listAttachedIndicesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListAttachedIndicesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAttachedIndicesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listAttachedIndicesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAttachedIndices");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListAttachedIndices").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listAttachedIndicesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListAttachedIndicesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves each Amazon Resource Name (ARN) of schemas in the development state.
*
*
* @param listDevelopmentSchemaArnsRequest
* @return Result of the ListDevelopmentSchemaArns operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListDevelopmentSchemaArns
* @see AWS API Documentation
*/
@Override
public ListDevelopmentSchemaArnsResponse listDevelopmentSchemaArns(
ListDevelopmentSchemaArnsRequest listDevelopmentSchemaArnsRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, InvalidNextTokenException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListDevelopmentSchemaArnsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listDevelopmentSchemaArnsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listDevelopmentSchemaArnsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDevelopmentSchemaArns");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListDevelopmentSchemaArns").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listDevelopmentSchemaArnsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListDevelopmentSchemaArnsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists directories created within an account.
*
*
* @param listDirectoriesRequest
* @return Result of the ListDirectories operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListDirectories
* @see AWS API Documentation
*/
@Override
public ListDirectoriesResponse listDirectories(ListDirectoriesRequest listDirectoriesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, InvalidNextTokenException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListDirectoriesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listDirectoriesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listDirectoriesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDirectories");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListDirectories").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listDirectoriesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListDirectoriesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves attributes attached to the facet.
*
*
* @param listFacetAttributesRequest
* @return Result of the ListFacetAttributes operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetNotFoundException
* The specified Facet could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListFacetAttributes
* @see AWS API Documentation
*/
@Override
public ListFacetAttributesResponse listFacetAttributes(ListFacetAttributesRequest listFacetAttributesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, ResourceNotFoundException, FacetNotFoundException,
InvalidNextTokenException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListFacetAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listFacetAttributesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listFacetAttributesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListFacetAttributes");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListFacetAttributes").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listFacetAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListFacetAttributesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves the names of facets that exist in a schema.
*
*
* @param listFacetNamesRequest
* @return Result of the ListFacetNames operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListFacetNames
* @see AWS
* API Documentation
*/
@Override
public ListFacetNamesResponse listFacetNames(ListFacetNamesRequest listFacetNamesRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, InvalidNextTokenException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListFacetNamesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listFacetNamesRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listFacetNamesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListFacetNames");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListFacetNames").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listFacetNamesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListFacetNamesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a paginated list of all the incoming TypedLinkSpecifier information for an object. It also
* supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
*
*
* @param listIncomingTypedLinksRequest
* @return Result of the ListIncomingTypedLinks operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListIncomingTypedLinks
* @see AWS API Documentation
*/
@Override
public ListIncomingTypedLinksResponse listIncomingTypedLinks(ListIncomingTypedLinksRequest listIncomingTypedLinksRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
InvalidNextTokenException, FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListIncomingTypedLinksResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listIncomingTypedLinksRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listIncomingTypedLinksRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListIncomingTypedLinks");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListIncomingTypedLinks").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listIncomingTypedLinksRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListIncomingTypedLinksRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists objects attached to the specified index.
*
*
* @param listIndexRequest
* @return Result of the ListIndex operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws NotIndexException
* Indicates that the requested operation can only operate on index objects.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListIndex
* @see AWS API
* Documentation
*/
@Override
public ListIndexResponse listIndex(ListIndexRequest listIndexRequest) throws InternalServiceException, InvalidArnException,
RetryableConflictException, FacetValidationException, ValidationException, LimitExceededException,
AccessDeniedException, DirectoryNotEnabledException, InvalidNextTokenException, ResourceNotFoundException,
NotIndexException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListIndexResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listIndexRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listIndexRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListIndex");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListIndex").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(listIndexRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListIndexRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists the major version families of each managed schema. If a major version ARN is provided as SchemaArn, the
* minor version revisions in that family are listed instead.
*
*
* @param listManagedSchemaArnsRequest
* @return Result of the ListManagedSchemaArns operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListManagedSchemaArns
* @see AWS API Documentation
*/
@Override
public ListManagedSchemaArnsResponse listManagedSchemaArns(ListManagedSchemaArnsRequest listManagedSchemaArnsRequest)
throws InternalServiceException, InvalidArnException, ValidationException, AccessDeniedException,
ResourceNotFoundException, InvalidNextTokenException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListManagedSchemaArnsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listManagedSchemaArnsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listManagedSchemaArnsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListManagedSchemaArns");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListManagedSchemaArns").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listManagedSchemaArnsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListManagedSchemaArnsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists all attributes that are associated with an object.
*
*
* @param listObjectAttributesRequest
* @return Result of the ListObjectAttributes operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListObjectAttributes
* @see AWS API Documentation
*/
@Override
public ListObjectAttributesResponse listObjectAttributes(ListObjectAttributesRequest listObjectAttributesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
InvalidNextTokenException, FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListObjectAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listObjectAttributesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listObjectAttributesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListObjectAttributes");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListObjectAttributes").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listObjectAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListObjectAttributesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a paginated list of child objects that are associated with a given object.
*
*
* @param listObjectChildrenRequest
* @return Result of the ListObjectChildren operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws NotNodeException
* Occurs when any invalid operations are performed on an object that is not a node, such as calling
* ListObjectChildren
for a leaf node object.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListObjectChildren
* @see AWS API Documentation
*/
@Override
public ListObjectChildrenResponse listObjectChildren(ListObjectChildrenRequest listObjectChildrenRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
InvalidNextTokenException, NotNodeException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListObjectChildrenResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listObjectChildrenRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listObjectChildrenRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListObjectChildren");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListObjectChildren").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listObjectChildrenRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListObjectChildrenRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves all available parent paths for any object type such as node, leaf node, policy node, and index node
* objects. For more information about objects, see Directory Structure.
*
*
* Use this API to evaluate all parents for an object. The call returns all objects from the root of the directory
* up to the requested object. The API returns the number of paths based on user-defined MaxResults
, in
* case there are multiple paths to the parent. The order of the paths and nodes returned is consistent among
* multiple API calls unless the objects are deleted or moved. Paths not leading to the directory root are ignored
* from the target object.
*
*
* @param listObjectParentPathsRequest
* @return Result of the ListObjectParentPaths operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListObjectParentPaths
* @see AWS API Documentation
*/
@Override
public ListObjectParentPathsResponse listObjectParentPaths(ListObjectParentPathsRequest listObjectParentPathsRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, InvalidNextTokenException,
ResourceNotFoundException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListObjectParentPathsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listObjectParentPathsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listObjectParentPathsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListObjectParentPaths");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListObjectParentPaths").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listObjectParentPathsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListObjectParentPathsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists parent objects that are associated with a given object in pagination fashion.
*
*
* @param listObjectParentsRequest
* @return Result of the ListObjectParents operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws CannotListParentOfRootException
* Cannot list the parents of a Directory root.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListObjectParents
* @see AWS API Documentation
*/
@Override
public ListObjectParentsResponse listObjectParents(ListObjectParentsRequest listObjectParentsRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
InvalidNextTokenException, CannotListParentOfRootException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListObjectParentsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listObjectParentsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listObjectParentsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListObjectParents");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListObjectParents").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listObjectParentsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListObjectParentsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns policies attached to an object in pagination fashion.
*
*
* @param listObjectPoliciesRequest
* @return Result of the ListObjectPolicies operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListObjectPolicies
* @see AWS API Documentation
*/
@Override
public ListObjectPoliciesResponse listObjectPolicies(ListObjectPoliciesRequest listObjectPoliciesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
InvalidNextTokenException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListObjectPoliciesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listObjectPoliciesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listObjectPoliciesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListObjectPolicies");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListObjectPolicies").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listObjectPoliciesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListObjectPoliciesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a paginated list of all the outgoing TypedLinkSpecifier information for an object. It also
* supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
*
*
* @param listOutgoingTypedLinksRequest
* @return Result of the ListOutgoingTypedLinks operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListOutgoingTypedLinks
* @see AWS API Documentation
*/
@Override
public ListOutgoingTypedLinksResponse listOutgoingTypedLinks(ListOutgoingTypedLinksRequest listOutgoingTypedLinksRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
InvalidNextTokenException, FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListOutgoingTypedLinksResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listOutgoingTypedLinksRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listOutgoingTypedLinksRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOutgoingTypedLinks");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListOutgoingTypedLinks").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listOutgoingTypedLinksRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListOutgoingTypedLinksRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns all of the ObjectIdentifiers
to which a given policy is attached.
*
*
* @param listPolicyAttachmentsRequest
* @return Result of the ListPolicyAttachments operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws NotPolicyException
* Indicates that the requested operation can only operate on policy objects.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListPolicyAttachments
* @see AWS API Documentation
*/
@Override
public ListPolicyAttachmentsResponse listPolicyAttachments(ListPolicyAttachmentsRequest listPolicyAttachmentsRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, InvalidNextTokenException,
ResourceNotFoundException, NotPolicyException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListPolicyAttachmentsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPolicyAttachmentsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listPolicyAttachmentsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPolicyAttachments");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListPolicyAttachments").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listPolicyAttachmentsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListPolicyAttachmentsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists the major version families of each published schema. If a major version ARN is provided as
* SchemaArn
, the minor version revisions in that family are listed instead.
*
*
* @param listPublishedSchemaArnsRequest
* @return Result of the ListPublishedSchemaArns operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListPublishedSchemaArns
* @see AWS API Documentation
*/
@Override
public ListPublishedSchemaArnsResponse listPublishedSchemaArns(ListPublishedSchemaArnsRequest listPublishedSchemaArnsRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, ResourceNotFoundException, InvalidNextTokenException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListPublishedSchemaArnsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPublishedSchemaArnsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listPublishedSchemaArnsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPublishedSchemaArns");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListPublishedSchemaArns").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listPublishedSchemaArnsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListPublishedSchemaArnsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns tags for a resource. Tagging is currently supported only for directories with a limit of 50 tags per
* directory. All 50 tags are returned for a given directory with this API call.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidTaggingRequestException
* Can occur for multiple reasons such as when you tag a resource that doesn’t exist or if you specify a
* higher number of tags for a resource than the allowed limit. Allowed limit is 50 tags per resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListTagsForResource
* @see AWS API Documentation
*/
@Override
public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, ResourceNotFoundException, InvalidTaggingRequestException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTagsForResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsForResourceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTagsForResource").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listTagsForResourceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a paginated list of all attribute definitions for a particular TypedLinkFacet. For more
* information, see Typed Links.
*
*
* @param listTypedLinkFacetAttributesRequest
* @return Result of the ListTypedLinkFacetAttributes operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetNotFoundException
* The specified Facet could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListTypedLinkFacetAttributes
* @see AWS API Documentation
*/
@Override
public ListTypedLinkFacetAttributesResponse listTypedLinkFacetAttributes(
ListTypedLinkFacetAttributesRequest listTypedLinkFacetAttributesRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, FacetNotFoundException, InvalidNextTokenException, AwsServiceException,
SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTypedLinkFacetAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTypedLinkFacetAttributesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTypedLinkFacetAttributesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTypedLinkFacetAttributes");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListTypedLinkFacetAttributes").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listTypedLinkFacetAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTypedLinkFacetAttributesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a paginated list of TypedLink
facet names for a particular schema. For more information, see
* Typed Links.
*
*
* @param listTypedLinkFacetNamesRequest
* @return Result of the ListTypedLinkFacetNames operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.ListTypedLinkFacetNames
* @see AWS API Documentation
*/
@Override
public ListTypedLinkFacetNamesResponse listTypedLinkFacetNames(ListTypedLinkFacetNamesRequest listTypedLinkFacetNamesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, ResourceNotFoundException, InvalidNextTokenException,
AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTypedLinkFacetNamesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTypedLinkFacetNamesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTypedLinkFacetNamesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTypedLinkFacetNames");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListTypedLinkFacetNames").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listTypedLinkFacetNamesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTypedLinkFacetNamesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists all policies from the root of the Directory to the object specified. If there are no policies
* present, an empty list is returned. If policies are present, and if some objects don't have the policies
* attached, it returns the ObjectIdentifier
for such objects. If policies are present, it returns
* ObjectIdentifier
, policyId
, and policyType
. Paths that don't lead to the
* root from the target object are ignored. For more information, see Policies.
*
*
* @param lookupPolicyRequest
* @return Result of the LookupPolicy operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws InvalidNextTokenException
* Indicates that the NextToken
value is not valid.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.LookupPolicy
* @see AWS
* API Documentation
*/
@Override
public LookupPolicyResponse lookupPolicy(LookupPolicyRequest lookupPolicyRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
DirectoryNotEnabledException, InvalidNextTokenException, ResourceNotFoundException, AwsServiceException,
SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
LookupPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(lookupPolicyRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, lookupPolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "LookupPolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("LookupPolicy").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(lookupPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new LookupPolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Publishes a development schema with a major version and a recommended minor version.
*
*
* @param publishSchemaRequest
* @return Result of the PublishSchema operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws SchemaAlreadyPublishedException
* Indicates that a schema is already published.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.PublishSchema
* @see AWS
* API Documentation
*/
@Override
public PublishSchemaResponse publishSchema(PublishSchemaRequest publishSchemaRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, SchemaAlreadyPublishedException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
PublishSchemaResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(publishSchemaRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, publishSchemaRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PublishSchema");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("PublishSchema").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(publishSchemaRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new PublishSchemaRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Allows a schema to be updated using JSON upload. Only available for development schemas. See JSON
* Schema Format for more information.
*
*
* @param putSchemaFromJsonRequest
* @return Result of the PutSchemaFromJson operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws InvalidSchemaDocException
* Indicates that the provided SchemaDoc
value is not valid.
* @throws InvalidRuleException
* Occurs when any of the rule parameter keys or values are invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.PutSchemaFromJson
* @see AWS API Documentation
*/
@Override
public PutSchemaFromJsonResponse putSchemaFromJson(PutSchemaFromJsonRequest putSchemaFromJsonRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, InvalidSchemaDocException, InvalidRuleException, AwsServiceException,
SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
PutSchemaFromJsonResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putSchemaFromJsonRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, putSchemaFromJsonRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutSchemaFromJson");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("PutSchemaFromJson").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(putSchemaFromJsonRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new PutSchemaFromJsonRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Removes the specified facet from the specified object.
*
*
* @param removeFacetFromObjectRequest
* @return Result of the RemoveFacetFromObject operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.RemoveFacetFromObject
* @see AWS API Documentation
*/
@Override
public RemoveFacetFromObjectResponse removeFacetFromObject(RemoveFacetFromObjectRequest removeFacetFromObjectRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, RemoveFacetFromObjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(removeFacetFromObjectRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, removeFacetFromObjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveFacetFromObject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("RemoveFacetFromObject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(removeFacetFromObjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new RemoveFacetFromObjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* An API operation for adding tags to a resource.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidTaggingRequestException
* Can occur for multiple reasons such as when you tag a resource that doesn’t exist or if you specify a
* higher number of tags for a resource than the allowed limit. Allowed limit is 50 tags per resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.TagResource
* @see AWS
* API Documentation
*/
@Override
public TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, InvalidTaggingRequestException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
TagResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagResourceRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, tagResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagResource");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("TagResource").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(tagResourceRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new TagResourceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* An API operation for removing tags from a resource.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws InvalidTaggingRequestException
* Can occur for multiple reasons such as when you tag a resource that doesn’t exist or if you specify a
* higher number of tags for a resource than the allowed limit. Allowed limit is 50 tags per resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.UntagResource
* @see AWS
* API Documentation
*/
@Override
public UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, InvalidTaggingRequestException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
UntagResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagResourceRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, untagResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagResource");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UntagResource").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(untagResourceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UntagResourceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Does the following:
*
*
* -
*
* Adds new Attributes
, Rules
, or ObjectTypes
.
*
*
* -
*
* Updates existing Attributes
, Rules
, or ObjectTypes
.
*
*
* -
*
* Deletes existing Attributes
, Rules
, or ObjectTypes
.
*
*
*
*
* @param updateFacetRequest
* @return Result of the UpdateFacet operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws InvalidFacetUpdateException
* An attempt to modify a Facet resulted in an invalid schema exception.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetNotFoundException
* The specified Facet could not be found.
* @throws InvalidRuleException
* Occurs when any of the rule parameter keys or values are invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.UpdateFacet
* @see AWS
* API Documentation
*/
@Override
public UpdateFacetResponse updateFacet(UpdateFacetRequest updateFacetRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
InvalidFacetUpdateException, FacetValidationException, ResourceNotFoundException, FacetNotFoundException,
InvalidRuleException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
UpdateFacetResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateFacetRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateFacetRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateFacet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateFacet").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(updateFacetRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateFacetRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Updates a given typed link’s attributes. Attributes to be updated must not contribute to the typed link’s
* identity, as defined by its IdentityAttributeOrder
.
*
*
* @param updateLinkAttributesRequest
* @return Result of the UpdateLinkAttributes operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.UpdateLinkAttributes
* @see AWS API Documentation
*/
@Override
public UpdateLinkAttributesResponse updateLinkAttributes(UpdateLinkAttributesRequest updateLinkAttributesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
FacetValidationException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, UpdateLinkAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateLinkAttributesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateLinkAttributesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateLinkAttributes");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateLinkAttributes").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(updateLinkAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateLinkAttributesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Updates a given object's attributes.
*
*
* @param updateObjectAttributesRequest
* @return Result of the UpdateObjectAttributes operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws DirectoryNotEnabledException
* Operations are only permitted on enabled directories.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws LinkNameAlreadyInUseException
* Indicates that a link could not be created due to a naming conflict. Choose a different name and then try
* again.
* @throws FacetValidationException
* The Facet that you provided was not well formed or could not be validated with the schema.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.UpdateObjectAttributes
* @see AWS API Documentation
*/
@Override
public UpdateObjectAttributesResponse updateObjectAttributes(UpdateObjectAttributesRequest updateObjectAttributesRequest)
throws InternalServiceException, InvalidArnException, RetryableConflictException, ValidationException,
LimitExceededException, AccessDeniedException, DirectoryNotEnabledException, ResourceNotFoundException,
LinkNameAlreadyInUseException, FacetValidationException, AwsServiceException, SdkClientException,
CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, UpdateObjectAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateObjectAttributesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateObjectAttributesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CloudDirectory");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateObjectAttributes");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateObjectAttributes").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(updateObjectAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateObjectAttributesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Updates the schema name with a new name. Only development schema names can be updated.
*
*
* @param updateSchemaRequest
* @return Result of the UpdateSchema operation returned by the service.
* @throws InternalServiceException
* Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in
* which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any
* operational issues with the service.
* @throws InvalidArnException
* Indicates that the provided ARN value is not valid.
* @throws RetryableConflictException
* Occurs when a conflict with a previous successful write is detected. For example, if a write operation
* occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this
* exception may result. This generally occurs when the previous write did not have time to propagate to the
* host serving the current request. A retry (with appropriate backoff logic) is the recommended response to
* this exception.
* @throws ValidationException
* Indicates that your request is malformed in some manner. See the exception message.
* @throws LimitExceededException
* Indicates that limits are exceeded. See Limits for more
* information.
* @throws AccessDeniedException
* Access denied or directory not found. Either you don't have permissions for this directory or the
* directory does not exist. Try calling ListDirectories and check your permissions.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CloudDirectoryException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CloudDirectoryClient.UpdateSchema
* @see AWS
* API Documentation
*/
@Override
public UpdateSchemaResponse updateSchema(UpdateSchemaRequest updateSchemaRequest) throws InternalServiceException,
InvalidArnException, RetryableConflictException, ValidationException, LimitExceededException, AccessDeniedException,
ResourceNotFoundException, AwsServiceException, SdkClientException, CloudDirectoryException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
UpdateSchemaResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateSchemaRequest, this.clientConfiguration);
List